@c8y/ngx-components 1018.503.45 → 1018.503.50

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 (63) hide show
  1. package/context-dashboard/add-dashboard.factory.d.ts +3 -2
  2. package/context-dashboard/context-dashboard.model.d.ts +16 -1
  3. package/context-dashboard/context-dashboard.service.d.ts +4 -2
  4. package/context-dashboard/report-dashboard/report-dashboard-list.component.d.ts +3 -2
  5. package/core/common/ApplicationOptions.d.ts +2 -2
  6. package/core/login/credentials.component.d.ts +1 -3
  7. package/core/login/login.component.d.ts +3 -1
  8. package/esm2020/context-dashboard/add-dashboard.factory.mjs +17 -5
  9. package/esm2020/context-dashboard/context-dashboard.component.mjs +24 -4
  10. package/esm2020/context-dashboard/context-dashboard.model.mjs +19 -4
  11. package/esm2020/context-dashboard/context-dashboard.service.mjs +21 -6
  12. package/esm2020/context-dashboard/dashboard-availability.component.mjs +3 -3
  13. package/esm2020/context-dashboard/report-dashboard/report-dashboard-list.component.mjs +21 -6
  14. package/esm2020/core/common/ApplicationOptions.mjs +1 -1
  15. package/esm2020/core/login/credentials.component.mjs +15 -18
  16. package/esm2020/core/login/login.component.mjs +18 -15
  17. package/esm2020/widgets/implementations/device-control-message/device-control-message-widget-view/device-control-message-widget-view.component.mjs +17 -9
  18. package/esm2020/widgets/implementations/map/map-widget.component.mjs +26 -11
  19. package/esm2020/widgets/implementations/three-d-rotation/lazy-box-model/lazy-load-box-model.mjs +3 -3
  20. package/esm2020/widgets/implementations/three-d-rotation/lazy-phone-model/lazy-load-phone-model.mjs +3 -3
  21. package/fesm2015/c8y-ngx-components-context-dashboard.mjs +91 -15
  22. package/fesm2015/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  23. package/fesm2015/c8y-ngx-components-widgets-implementations-device-control-message.mjs +19 -8
  24. package/fesm2015/c8y-ngx-components-widgets-implementations-device-control-message.mjs.map +1 -1
  25. package/fesm2015/c8y-ngx-components-widgets-implementations-map.mjs +37 -20
  26. package/fesm2015/c8y-ngx-components-widgets-implementations-map.mjs.map +1 -1
  27. package/fesm2015/c8y-ngx-components-widgets-implementations-three-d-rotation-lazy-box-model.mjs +2 -2
  28. package/fesm2015/c8y-ngx-components-widgets-implementations-three-d-rotation-lazy-box-model.mjs.map +1 -1
  29. package/fesm2015/c8y-ngx-components-widgets-implementations-three-d-rotation-lazy-phone-model.mjs +2 -2
  30. package/fesm2015/c8y-ngx-components-widgets-implementations-three-d-rotation-lazy-phone-model.mjs.map +1 -1
  31. package/fesm2015/c8y-ngx-components.mjs +11 -11
  32. package/fesm2015/c8y-ngx-components.mjs.map +1 -1
  33. package/fesm2020/c8y-ngx-components-context-dashboard.mjs +91 -15
  34. package/fesm2020/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  35. package/fesm2020/c8y-ngx-components-widgets-implementations-device-control-message.mjs +15 -8
  36. package/fesm2020/c8y-ngx-components-widgets-implementations-device-control-message.mjs.map +1 -1
  37. package/fesm2020/c8y-ngx-components-widgets-implementations-map.mjs +25 -13
  38. package/fesm2020/c8y-ngx-components-widgets-implementations-map.mjs.map +1 -1
  39. package/fesm2020/c8y-ngx-components-widgets-implementations-three-d-rotation-lazy-box-model.mjs +2 -2
  40. package/fesm2020/c8y-ngx-components-widgets-implementations-three-d-rotation-lazy-box-model.mjs.map +1 -1
  41. package/fesm2020/c8y-ngx-components-widgets-implementations-three-d-rotation-lazy-phone-model.mjs +2 -2
  42. package/fesm2020/c8y-ngx-components-widgets-implementations-three-d-rotation-lazy-phone-model.mjs.map +1 -1
  43. package/fesm2020/c8y-ngx-components.mjs +11 -11
  44. package/fesm2020/c8y-ngx-components.mjs.map +1 -1
  45. package/package.json +1 -1
  46. package/widgets/implementations/device-control-message/device-control-message-widget-view/device-control-message-widget-view.component.d.ts +4 -2
  47. package/widgets/implementations/map/map-widget.component.d.ts +7 -4
  48. package/widgets/implementations/three-d-rotation/lazy-box-model/lazy-load-box-model.d.ts +79 -1
  49. package/widgets/implementations/three-d-rotation/lazy-phone-model/lazy-load-phone-model.d.ts +76 -1
  50. package/esm2020/widgets/implementations/three-d-rotation/box-model/c8y-ngx-components-widgets-implementations-three-d-rotation-box-model.mjs +0 -5
  51. package/esm2020/widgets/implementations/three-d-rotation/box-model/index.mjs +0 -4
  52. package/esm2020/widgets/implementations/three-d-rotation/phone-model/c8y-ngx-components-widgets-implementations-three-d-rotation-phone-model.mjs +0 -5
  53. package/esm2020/widgets/implementations/three-d-rotation/phone-model/index.mjs +0 -4
  54. package/fesm2015/c8y-ngx-components-widgets-implementations-three-d-rotation-box-model.mjs +0 -10
  55. package/fesm2015/c8y-ngx-components-widgets-implementations-three-d-rotation-box-model.mjs.map +0 -1
  56. package/fesm2015/c8y-ngx-components-widgets-implementations-three-d-rotation-phone-model.mjs +0 -10
  57. package/fesm2015/c8y-ngx-components-widgets-implementations-three-d-rotation-phone-model.mjs.map +0 -1
  58. package/fesm2020/c8y-ngx-components-widgets-implementations-three-d-rotation-box-model.mjs +0 -10
  59. package/fesm2020/c8y-ngx-components-widgets-implementations-three-d-rotation-box-model.mjs.map +0 -1
  60. package/fesm2020/c8y-ngx-components-widgets-implementations-three-d-rotation-phone-model.mjs +0 -10
  61. package/fesm2020/c8y-ngx-components-widgets-implementations-three-d-rotation-phone-model.mjs.map +0 -1
  62. package/widgets/implementations/three-d-rotation/box-model/index.d.ts +0 -1
  63. package/widgets/implementations/three-d-rotation/phone-model/index.d.ts +0 -1
@@ -119,13 +119,28 @@ const ALL_GLOBAL_ROLES_SELECTED = 'all';
119
119
  const PRODUCT_EXPERIENCE = {
120
120
  DASHBOARD: {
121
121
  EVENTS: {
122
- DASHBOARD_AVAILABILITY: 'dashboardAvailability'
122
+ DASHBOARDS: 'dashboards',
123
+ REPORTS: 'reports'
123
124
  },
124
125
  COMPONENTS: {
125
- DASHBOARD_AVAILABILITY: 'dashboard-availability'
126
+ DASHBOARD_VIEW: 'context-dashboard',
127
+ DASHBOARD_AVAILABILITY: 'dashboard-availability',
128
+ REPORTS_LIST: 'report-dashboard-list',
129
+ ADD_REPORT: 'report-dashboard-list',
130
+ ADD_DASHBOARD: 'add-dashboard',
131
+ DELETE_DASHBOARD: 'context-dashboard'
132
+ },
133
+ CONTEXT: {
134
+ REPORT: 'report',
135
+ DEVICE: 'device',
136
+ ASSET: 'asset',
137
+ GROUP: 'group'
126
138
  },
127
139
  ACTIONS: {
128
- APPLY_GLOBAL_ROLES_CHANGES: 'applyGlobalRolesChanges'
140
+ APPLY_GLOBAL_ROLES_CHANGES: 'applyGlobalRolesChanges',
141
+ DELETE: 'delete',
142
+ LOAD: 'load',
143
+ CREATE: 'create'
129
144
  }
130
145
  }
131
146
  };
@@ -231,7 +246,7 @@ class ContextDashboardService {
231
246
  this._formDisabled = value;
232
247
  this.formDisabledSubject.next(value);
233
248
  }
234
- constructor(inventory, tabs, modal, translateService, router, navigator, permissions, alert, dynamicComponent) {
249
+ constructor(inventory, tabs, modal, translateService, router, navigator, permissions, alert, dynamicComponent, groupService) {
235
250
  this.inventory = inventory;
236
251
  this.tabs = tabs;
237
252
  this.modal = modal;
@@ -241,6 +256,7 @@ class ContextDashboardService {
241
256
  this.permissions = permissions;
242
257
  this.alert = alert;
243
258
  this.dynamicComponent = dynamicComponent;
259
+ this.groupService = groupService;
244
260
  this.REPORT_PARTIAL_NAME = 'report_';
245
261
  this.INVENTORY_ROLES = [
246
262
  Permissions.ROLE_INVENTORY_ADMIN,
@@ -461,6 +477,20 @@ class ContextDashboardService {
461
477
  }
462
478
  });
463
479
  }
480
+ getContextForGS(mo) {
481
+ if (this.groupService.isDevice(mo)) {
482
+ return PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.DEVICE;
483
+ }
484
+ else if (this.groupService.isAsset(mo)) {
485
+ return PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.ASSET;
486
+ }
487
+ else if (this.groupService.isGroup(mo)) {
488
+ return PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.GROUP;
489
+ }
490
+ else {
491
+ return null;
492
+ }
493
+ }
464
494
  adjustDashboardFor24Columns(dashboards) {
465
495
  if (Array.isArray(dashboards)) {
466
496
  return dashboards.map(dashboard => this.adjustDashboardFor24Columns(dashboard));
@@ -665,14 +695,14 @@ class ContextDashboardService {
665
695
  return null;
666
696
  }
667
697
  }
668
- ContextDashboardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ContextDashboardService, deps: [{ token: i1.InventoryService }, { token: i5.TabsService }, { token: i5.ModalService }, { token: i3.TranslateService }, { token: i1$1.Router }, { token: i5.NavigatorService }, { token: i5.Permissions }, { token: i5.AlertService }, { token: i5.DynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable });
698
+ ContextDashboardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ContextDashboardService, deps: [{ token: i1.InventoryService }, { token: i5.TabsService }, { token: i5.ModalService }, { token: i3.TranslateService }, { token: i1$1.Router }, { token: i5.NavigatorService }, { token: i5.Permissions }, { token: i5.AlertService }, { token: i5.DynamicComponentService }, { token: i5.GroupService }], target: i0.ɵɵFactoryTarget.Injectable });
669
699
  ContextDashboardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ContextDashboardService, providedIn: 'root' });
670
700
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ContextDashboardService, decorators: [{
671
701
  type: Injectable,
672
702
  args: [{
673
703
  providedIn: 'root'
674
704
  }]
675
- }], ctorParameters: function () { return [{ type: i1.InventoryService }, { type: i5.TabsService }, { type: i5.ModalService }, { type: i3.TranslateService }, { type: i1$1.Router }, { type: i5.NavigatorService }, { type: i5.Permissions }, { type: i5.AlertService }, { type: i5.DynamicComponentService }]; } });
705
+ }], ctorParameters: function () { return [{ type: i1.InventoryService }, { type: i5.TabsService }, { type: i5.ModalService }, { type: i3.TranslateService }, { type: i1$1.Router }, { type: i5.NavigatorService }, { type: i5.Permissions }, { type: i5.AlertService }, { type: i5.DynamicComponentService }, { type: i5.GroupService }]; } });
676
706
 
677
707
  class AppearanceSettingsComponent {
678
708
  constructor() {
@@ -782,7 +812,7 @@ class DashboardAvailabilityComponent {
782
812
  this.globalRolesItemsSelected = items;
783
813
  if (allItemsSelected) {
784
814
  this.globalRolesIdsChange.emit(ALL_GLOBAL_ROLES_SELECTED);
785
- this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARD_AVAILABILITY, {
815
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {
786
816
  component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.DASHBOARD_AVAILABILITY,
787
817
  action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.APPLY_GLOBAL_ROLES_CHANGES,
788
818
  globalRoles: ALL_GLOBAL_ROLES_SELECTED
@@ -791,7 +821,7 @@ class DashboardAvailabilityComponent {
791
821
  else {
792
822
  const selectedGlobalRolesIds = items.map(i => i.id);
793
823
  this.globalRolesIdsChange.emit([...selectedGlobalRolesIds]);
794
- this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARD_AVAILABILITY, {
824
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {
795
825
  component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.DASHBOARD_AVAILABILITY,
796
826
  action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.APPLY_GLOBAL_ROLES_CHANGES,
797
827
  globalRoles: (_a = selectedGlobalRolesIds === null || selectedGlobalRolesIds === void 0 ? void 0 : selectedGlobalRolesIds.sort()) === null || _a === void 0 ? void 0 : _a.join()
@@ -953,11 +983,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
953
983
  }] } });
954
984
 
955
985
  class AddDashboardFactory {
956
- constructor(permissions, contextDashboardService, bsModal, contextRoute) {
986
+ constructor(permissions, contextDashboardService, bsModal, contextRoute, gainsightService) {
957
987
  this.permissions = permissions;
958
988
  this.contextDashboardService = contextDashboardService;
959
989
  this.bsModal = bsModal;
960
990
  this.contextRoute = contextRoute;
991
+ this.gainsightService = gainsightService;
961
992
  }
962
993
  get(activatedRoute) {
963
994
  var _a;
@@ -996,6 +1027,16 @@ class AddDashboardFactory {
996
1027
  const dashboardMO = yield this.contextDashboardService.create(dashboardCfg, this.currentContext);
997
1028
  yield this.contextDashboardService.navigateToDashboard(dashboardMO);
998
1029
  modal.close();
1030
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {
1031
+ component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.ADD_DASHBOARD,
1032
+ action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.CREATE,
1033
+ name: dashboardCfg.name,
1034
+ id: dashboardMO.id,
1035
+ dashboardType: dashboardMO.c8y_Dashboard.deviceType
1036
+ ? dashboardMO.c8y_Dashboard.deviceTypeValue
1037
+ : null,
1038
+ context: this.contextDashboardService.getContextForGS(this.currentContext.contextData)
1039
+ });
999
1040
  }
1000
1041
  catch (ex) {
1001
1042
  // intended empty
@@ -1021,14 +1062,14 @@ class AddDashboardFactory {
1021
1062
  });
1022
1063
  }
1023
1064
  }
1024
- AddDashboardFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AddDashboardFactory, deps: [{ token: i5.Permissions }, { token: ContextDashboardService }, { token: i3$1.BsModalService }, { token: i5.ContextRouteService }], target: i0.ɵɵFactoryTarget.Injectable });
1065
+ AddDashboardFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AddDashboardFactory, deps: [{ token: i5.Permissions }, { token: ContextDashboardService }, { token: i3$1.BsModalService }, { token: i5.ContextRouteService }, { token: i5.GainsightService }], target: i0.ɵɵFactoryTarget.Injectable });
1025
1066
  AddDashboardFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AddDashboardFactory, providedIn: 'root' });
1026
1067
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AddDashboardFactory, decorators: [{
1027
1068
  type: Injectable,
1028
1069
  args: [{
1029
1070
  providedIn: 'root'
1030
1071
  }]
1031
- }], ctorParameters: function () { return [{ type: i5.Permissions }, { type: ContextDashboardService }, { type: i3$1.BsModalService }, { type: i5.ContextRouteService }]; } });
1072
+ }], ctorParameters: function () { return [{ type: i5.Permissions }, { type: ContextDashboardService }, { type: i3$1.BsModalService }, { type: i5.ContextRouteService }, { type: i5.GainsightService }]; } });
1032
1073
 
1033
1074
  class AddDashboardComponent {
1034
1075
  constructor(addDashboardFactory) {
@@ -1505,6 +1546,14 @@ class ContextDashboardComponent {
1505
1546
  const route = this.route.parent.snapshot.url.map(segment => segment.path).join('/');
1506
1547
  this.router.navigateByUrl(route);
1507
1548
  }
1549
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {
1550
+ component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.DELETE_DASHBOARD,
1551
+ action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.DELETE,
1552
+ name: this.dashboard.name,
1553
+ id: this.mo.id,
1554
+ dashboardType: this.dashboard.deviceType ? this.dashboard.deviceTypeValue : null,
1555
+ context: this.contextDashboardService.getContextForGS(this.context)
1556
+ });
1508
1557
  });
1509
1558
  }
1510
1559
  /**
@@ -1562,7 +1611,7 @@ class ContextDashboardComponent {
1562
1611
  }
1563
1612
  get isDeviceTypeDashboard() {
1564
1613
  var _a;
1565
- return !!((_a = this.dashboard) === null || _a === void 0 ? void 0 : _a.deviceType) && !!this.dashboard.deviceTypeValue;
1614
+ return !!((_a = this.dashboard) === null || _a === void 0 ? void 0 : _a.deviceType);
1566
1615
  }
1567
1616
  /**
1568
1617
  * Edits a widget on the dashboard.
@@ -1786,6 +1835,18 @@ class ContextDashboardComponent {
1786
1835
  this.addReportDashboardSettings();
1787
1836
  }
1788
1837
  this.isLoading = false;
1838
+ this.gainsightService.triggerEvent(isReport
1839
+ ? PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS
1840
+ : PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {
1841
+ component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.DASHBOARD_VIEW,
1842
+ action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.LOAD,
1843
+ name: this.dashboard.name,
1844
+ id: this.mo.id,
1845
+ dashboardType: this.dashboard.deviceType ? this.dashboard.deviceTypeValue : null,
1846
+ context: isReport
1847
+ ? PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.REPORT
1848
+ : this.contextDashboardService.getContextForGS(this.context)
1849
+ });
1789
1850
  });
1790
1851
  }
1791
1852
  mergeWidgetClasses(widget) {
@@ -2606,7 +2667,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
2606
2667
  }] });
2607
2668
 
2608
2669
  class ReportDashboardListComponent {
2609
- constructor(inventoryService, contextDashboardService, bsModal, translateService, modal, alertService, reportDashboardService, permissions) {
2670
+ constructor(inventoryService, contextDashboardService, bsModal, translateService, modal, alertService, reportDashboardService, permissions, gainsightService) {
2610
2671
  this.inventoryService = inventoryService;
2611
2672
  this.contextDashboardService = contextDashboardService;
2612
2673
  this.bsModal = bsModal;
@@ -2615,6 +2676,7 @@ class ReportDashboardListComponent {
2615
2676
  this.alertService = alertService;
2616
2677
  this.reportDashboardService = reportDashboardService;
2617
2678
  this.permissions = permissions;
2679
+ this.gainsightService = gainsightService;
2618
2680
  this.textFilter$ = new BehaviorSubject('');
2619
2681
  this.reload$ = new BehaviorSubject(null);
2620
2682
  this.reloading = false;
@@ -2671,6 +2733,13 @@ class ReportDashboardListComponent {
2671
2733
  }
2672
2734
  this.reload$.next();
2673
2735
  modal.close();
2736
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS, {
2737
+ component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.ADD_REPORT,
2738
+ action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.CREATE,
2739
+ name: report.name,
2740
+ id: report.id,
2741
+ context: PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.REPORT
2742
+ });
2674
2743
  }
2675
2744
  catch (ex) {
2676
2745
  if (ex) {
@@ -2703,6 +2772,13 @@ class ReportDashboardListComponent {
2703
2772
  this.reportDashboardService.removeNavigatorNode(report);
2704
2773
  }
2705
2774
  this.reload$.next();
2775
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS, {
2776
+ component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.REPORTS_LIST,
2777
+ action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.DELETE,
2778
+ name: report.name,
2779
+ id: report.id,
2780
+ context: PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.REPORT
2781
+ });
2706
2782
  }
2707
2783
  catch (ex) {
2708
2784
  if (ex) {
@@ -2721,12 +2797,12 @@ class ReportDashboardListComponent {
2721
2797
  });
2722
2798
  }
2723
2799
  }
2724
- ReportDashboardListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ReportDashboardListComponent, deps: [{ token: i1.InventoryService }, { token: ContextDashboardService }, { token: i3$1.BsModalService }, { token: i3.TranslateService }, { token: i5.ModalService }, { token: i5.AlertService }, { token: ReportDashboardService }, { token: i5.Permissions }], target: i0.ɵɵFactoryTarget.Component });
2800
+ ReportDashboardListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ReportDashboardListComponent, deps: [{ token: i1.InventoryService }, { token: ContextDashboardService }, { token: i3$1.BsModalService }, { token: i3.TranslateService }, { token: i5.ModalService }, { token: i5.AlertService }, { token: ReportDashboardService }, { token: i5.Permissions }, { token: i5.GainsightService }], target: i0.ɵɵFactoryTarget.Component });
2725
2801
  ReportDashboardListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: ReportDashboardListComponent, selector: "c8y-report-dashboard-list", viewQueries: [{ propertyName: "filter", first: true, predicate: FilterInputComponent, descendants: true }], ngImport: i0, template: "<c8y-title>\n {{ 'Reports' | translate }}\n</c8y-title>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form\"\n>\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Filter' | translate\"\n placeholder=\"{{ 'Filter\u2026' | translate }}\"\n type=\"search\"\n [ngModel]=\"textFilter$ | async\"\n (ngModelChange)=\"textFilter$.next($event)\"\n />\n <span class=\"input-group-addon\">\n <i\n c8yIcon=\"search\"\n *ngIf=\"(textFilter$ | async).length === 0\"\n ></i>\n <i\n class=\"text-muted\"\n c8yIcon=\"times\"\n *ngIf=\"(textFilter$ | async).length > 0\"\n (click)=\"textFilter$.next('')\"\n px-event=\"Clear filtering reports\"\n ></i>\n </span>\n </div>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add report' | translate }}\"\n type=\"button\"\n [attr.data-cy]=\"'reports-add-report-action-bar-button'\"\n (click)=\"add()\"\n [disabled]=\"!canAddReport\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add report' | translate }}\n </button>\n <button\n class=\"btn btn-dot m-r-16\"\n aria-label=\"{{ 'Info' | translate }}\"\n popover=\"{{ 'You don\\'t have permission to add reports' | translate }}\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n *ngIf=\"!canAddReport\"\n >\n <i\n class=\"text-primary\"\n [c8yIcon]=\"'info-circle'\"\n ></i>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"loadReports()\"\n >\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': reloading }\"\n ></i>\n {{ 'Reload' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-help src=\"/users-guide/cockpit/#reports\"></c8y-help>\n\n<c8y-list-group>\n <c8y-li\n class=\"page-sticky-header hidden-xs hidden-sm\"\n *ngIf=\"(reports$ | async)?.data.length > 0\"\n >\n <c8y-li-icon>\n <i class=\"p-l-24\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-3\">\n {{ 'Report' | translate }}\n </div>\n <div class=\"col-6\">\n {{ 'Description' | translate }}\n </div>\n <div class=\"col-2\">\n {{ 'Show in navigator' | translate }}\n </div>\n </c8y-li-body>\n </c8y-li>\n\n <c8y-li *c8yFor=\"let report of reports$; let i = index; loadMore: 'auto'\">\n <c8y-li-icon [icon]=\"report.icon\"></c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-3\">\n <button\n class=\"btn-clean\"\n title=\"{{ report.name }}\"\n type=\"button\"\n routerLink=\"/reports/{{ report.id }}\"\n >\n <span class=\"text-truncate\">\n {{ report.name }}\n </span>\n </button>\n </div>\n <div class=\"col-6\">\n <p class=\"small text-truncate-wrap\">\n <em\n class=\"text-muted\"\n *ngIf=\"!report.description; else showDescription\"\n >\n {{ 'No description available' | translate }}\n </em>\n <ng-template #showDescription>\n {{ report.description }}\n </ng-template>\n </p>\n </div>\n <div class=\"col-2 fit-h-20 m-t-xs-8\">\n <label\n class=\"c8y-switch c8y-switch--inline\"\n title=\"{{ 'Show in navigator' | translate }}\"\n >\n <input\n type=\"checkbox\"\n [(ngModel)]=\"!!report.c8y_IsNavigatorNode\"\n (change)=\"update(report)\"\n />\n <span></span>\n <span class=\"visible-xs\">\n {{ 'Show in navigator' | translate }}\n </span>\n </label>\n </div>\n <div class=\"col-1 hidden-xs\">\n <button\n class=\"btn btn-dot btn-dot--danger showOnHover m-l-auto d-flex\"\n [attr.aria-label]=\"'Remove report' | translate\"\n tooltip=\"{{ 'Remove report' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"delete(report)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n <div class=\"visible-xs p-t-8 text-right\">\n <button\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Remove report' | translate }}\"\n type=\"button\"\n (click)=\"delete(report)\"\n >\n <i c8yIcon=\"delete\"></i>\n {{ 'Remove report' | translate }}\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n</c8y-list-group>\n\n<c8y-ui-empty-state\n [icon]=\"'c8y-reports'\"\n [title]=\"'There are no reports defined.' | translate\"\n [subtitle]=\"'Add a report first.' | translate\"\n *ngIf=\"(reports$ | async)?.data.length === 0\"\n>\n <p>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Add report' | translate }}\"\n type=\"button\"\n [attr.data-cy]=\"'reports-add-report-empty-state-button'\"\n [disabled]=\"!canAddReport\"\n (click)=\"add()\"\n >\n {{ 'Add report' | translate }}\n </button>\n </p>\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a c8y-guide-href=\"users-guide/cockpit/#reports\">User guide`KEEP_ORIGINAL`</a>\n .\n </small>\n </p>\n</c8y-ui-empty-state>\n", dependencies: [{ kind: "component", type: i5.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "component", type: i5.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i5.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i5.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i5$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.ForOfDirective, selector: "[c8yFor]", inputs: ["c8yForOf", "c8yForLoadMore", "c8yForPipe", "c8yForNotFound", "c8yForMaxIterations", "c8yForLoadingTemplate", "c8yForLoadNextLabel", "c8yForRealtime", "c8yForRealtimeOptions", "c8yForComparator", "c8yForEnableVirtualScroll", "c8yForVirtualScrollElementSize", "c8yForVirtualScrollStrategy", "c8yForVirtualScrollContainerHeight"], outputs: ["c8yForCount"] }, { kind: "component", type: i5.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.GuideHrefDirective, selector: "[c8y-guide-href]", inputs: ["c8y-guide-href"] }, { kind: "component", type: i5.GuideDocsComponent, selector: "[c8y-guide-docs]" }, { kind: "component", type: i5.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i5.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "emptyActions", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i5.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i5.ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "component", type: i5.HelpComponent, selector: "c8y-help", inputs: ["src", "isCollapsed", "priority", "icon"] }, { kind: "directive", type: i3$2.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i4.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: i5.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i5$1.AsyncPipe, name: "async" }] });
2726
2802
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ReportDashboardListComponent, decorators: [{
2727
2803
  type: Component,
2728
2804
  args: [{ selector: 'c8y-report-dashboard-list', template: "<c8y-title>\n {{ 'Reports' | translate }}\n</c8y-title>\n\n<c8y-action-bar-item\n [placement]=\"'left'\"\n itemClass=\"navbar-form\"\n>\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Filter' | translate\"\n placeholder=\"{{ 'Filter\u2026' | translate }}\"\n type=\"search\"\n [ngModel]=\"textFilter$ | async\"\n (ngModelChange)=\"textFilter$.next($event)\"\n />\n <span class=\"input-group-addon\">\n <i\n c8yIcon=\"search\"\n *ngIf=\"(textFilter$ | async).length === 0\"\n ></i>\n <i\n class=\"text-muted\"\n c8yIcon=\"times\"\n *ngIf=\"(textFilter$ | async).length > 0\"\n (click)=\"textFilter$.next('')\"\n px-event=\"Clear filtering reports\"\n ></i>\n </span>\n </div>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add report' | translate }}\"\n type=\"button\"\n [attr.data-cy]=\"'reports-add-report-action-bar-button'\"\n (click)=\"add()\"\n [disabled]=\"!canAddReport\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add report' | translate }}\n </button>\n <button\n class=\"btn btn-dot m-r-16\"\n aria-label=\"{{ 'Info' | translate }}\"\n popover=\"{{ 'You don\\'t have permission to add reports' | translate }}\"\n placement=\"top\"\n triggers=\"focus\"\n container=\"body\"\n type=\"button\"\n *ngIf=\"!canAddReport\"\n >\n <i\n class=\"text-primary\"\n [c8yIcon]=\"'info-circle'\"\n ></i>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n (click)=\"loadReports()\"\n >\n <i\n c8yIcon=\"refresh\"\n [ngClass]=\"{ 'icon-spin': reloading }\"\n ></i>\n {{ 'Reload' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-help src=\"/users-guide/cockpit/#reports\"></c8y-help>\n\n<c8y-list-group>\n <c8y-li\n class=\"page-sticky-header hidden-xs hidden-sm\"\n *ngIf=\"(reports$ | async)?.data.length > 0\"\n >\n <c8y-li-icon>\n <i class=\"p-l-24\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-3\">\n {{ 'Report' | translate }}\n </div>\n <div class=\"col-6\">\n {{ 'Description' | translate }}\n </div>\n <div class=\"col-2\">\n {{ 'Show in navigator' | translate }}\n </div>\n </c8y-li-body>\n </c8y-li>\n\n <c8y-li *c8yFor=\"let report of reports$; let i = index; loadMore: 'auto'\">\n <c8y-li-icon [icon]=\"report.icon\"></c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-3\">\n <button\n class=\"btn-clean\"\n title=\"{{ report.name }}\"\n type=\"button\"\n routerLink=\"/reports/{{ report.id }}\"\n >\n <span class=\"text-truncate\">\n {{ report.name }}\n </span>\n </button>\n </div>\n <div class=\"col-6\">\n <p class=\"small text-truncate-wrap\">\n <em\n class=\"text-muted\"\n *ngIf=\"!report.description; else showDescription\"\n >\n {{ 'No description available' | translate }}\n </em>\n <ng-template #showDescription>\n {{ report.description }}\n </ng-template>\n </p>\n </div>\n <div class=\"col-2 fit-h-20 m-t-xs-8\">\n <label\n class=\"c8y-switch c8y-switch--inline\"\n title=\"{{ 'Show in navigator' | translate }}\"\n >\n <input\n type=\"checkbox\"\n [(ngModel)]=\"!!report.c8y_IsNavigatorNode\"\n (change)=\"update(report)\"\n />\n <span></span>\n <span class=\"visible-xs\">\n {{ 'Show in navigator' | translate }}\n </span>\n </label>\n </div>\n <div class=\"col-1 hidden-xs\">\n <button\n class=\"btn btn-dot btn-dot--danger showOnHover m-l-auto d-flex\"\n [attr.aria-label]=\"'Remove report' | translate\"\n tooltip=\"{{ 'Remove report' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"delete(report)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n <div class=\"visible-xs p-t-8 text-right\">\n <button\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Remove report' | translate }}\"\n type=\"button\"\n (click)=\"delete(report)\"\n >\n <i c8yIcon=\"delete\"></i>\n {{ 'Remove report' | translate }}\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n</c8y-list-group>\n\n<c8y-ui-empty-state\n [icon]=\"'c8y-reports'\"\n [title]=\"'There are no reports defined.' | translate\"\n [subtitle]=\"'Add a report first.' | translate\"\n *ngIf=\"(reports$ | async)?.data.length === 0\"\n>\n <p>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Add report' | translate }}\"\n type=\"button\"\n [attr.data-cy]=\"'reports-add-report-empty-state-button'\"\n [disabled]=\"!canAddReport\"\n (click)=\"add()\"\n >\n {{ 'Add report' | translate }}\n </button>\n </p>\n <p c8y-guide-docs>\n <small\n translate\n ngNonBindable\n >\n Find out more in the\n <a c8y-guide-href=\"users-guide/cockpit/#reports\">User guide`KEEP_ORIGINAL`</a>\n .\n </small>\n </p>\n</c8y-ui-empty-state>\n" }]
2729
- }], ctorParameters: function () { return [{ type: i1.InventoryService }, { type: ContextDashboardService }, { type: i3$1.BsModalService }, { type: i3.TranslateService }, { type: i5.ModalService }, { type: i5.AlertService }, { type: ReportDashboardService }, { type: i5.Permissions }]; }, propDecorators: { filter: [{
2805
+ }], ctorParameters: function () { return [{ type: i1.InventoryService }, { type: ContextDashboardService }, { type: i3$1.BsModalService }, { type: i3.TranslateService }, { type: i5.ModalService }, { type: i5.AlertService }, { type: ReportDashboardService }, { type: i5.Permissions }, { type: i5.GainsightService }]; }, propDecorators: { filter: [{
2730
2806
  type: ViewChild,
2731
2807
  args: [FilterInputComponent, { static: false }]
2732
2808
  }] } });