@c8y/ngx-components 1017.0.461 → 1017.0.466

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 (28) hide show
  1. package/context-dashboard/add-dashboard.factory.d.ts +3 -2
  2. package/context-dashboard/context-dashboard.model.d.ts +28 -0
  3. package/context-dashboard/context-dashboard.service.d.ts +4 -2
  4. package/context-dashboard/dashboard-availability.component.d.ts +3 -2
  5. package/context-dashboard/report-dashboard/report-dashboard-list.component.d.ts +3 -2
  6. package/core/common/ApplicationOptions.d.ts +2 -2
  7. package/core/common/humanize-app-name.pipe.d.ts +2 -1
  8. package/core/login/credentials.component.d.ts +1 -3
  9. package/core/login/login.component.d.ts +3 -1
  10. package/esm2020/context-dashboard/add-dashboard.factory.mjs +17 -5
  11. package/esm2020/context-dashboard/context-dashboard.component.mjs +23 -3
  12. package/esm2020/context-dashboard/context-dashboard.model.mjs +29 -1
  13. package/esm2020/context-dashboard/context-dashboard.service.mjs +21 -6
  14. package/esm2020/context-dashboard/dashboard-availability.component.mjs +17 -5
  15. package/esm2020/context-dashboard/report-dashboard/report-dashboard-list.component.mjs +21 -6
  16. package/esm2020/core/common/ApplicationOptions.mjs +1 -1
  17. package/esm2020/core/common/humanize-app-name.pipe.mjs +10 -5
  18. package/esm2020/core/login/credentials.component.mjs +14 -17
  19. package/esm2020/core/login/login.component.mjs +18 -15
  20. package/fesm2015/c8y-ngx-components-context-dashboard.mjs +114 -13
  21. package/fesm2015/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  22. package/fesm2015/c8y-ngx-components.mjs +86 -82
  23. package/fesm2015/c8y-ngx-components.mjs.map +1 -1
  24. package/fesm2020/c8y-ngx-components-context-dashboard.mjs +113 -13
  25. package/fesm2020/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  26. package/fesm2020/c8y-ngx-components.mjs +86 -82
  27. package/fesm2020/c8y-ngx-components.mjs.map +1 -1
  28. package/package.json +2 -2
@@ -113,9 +113,37 @@ const DASHBOARD_THEME_CLASSES = [
113
113
  ];
114
114
  const STYLING_CLASS_PREFIXES = ['dashboard-theme-', 'panel-title-', 'panel-content-'];
115
115
  const ALL_GLOBAL_ROLES_SELECTED = 'all';
116
+ const PRODUCT_EXPERIENCE = {
117
+ DASHBOARD: {
118
+ EVENTS: {
119
+ DASHBOARDS: 'dashboards',
120
+ REPORTS: 'reports'
121
+ },
122
+ COMPONENTS: {
123
+ DASHBOARD_VIEW: 'context-dashboard',
124
+ DASHBOARD_AVAILABILITY: 'dashboard-availability',
125
+ REPORTS_LIST: 'report-dashboard-list',
126
+ ADD_REPORT: 'report-dashboard-list',
127
+ ADD_DASHBOARD: 'add-dashboard',
128
+ DELETE_DASHBOARD: 'context-dashboard'
129
+ },
130
+ CONTEXT: {
131
+ REPORT: 'report',
132
+ DEVICE: 'device',
133
+ ASSET: 'asset',
134
+ GROUP: 'group'
135
+ },
136
+ ACTIONS: {
137
+ APPLY_GLOBAL_ROLES_CHANGES: 'applyGlobalRolesChanges',
138
+ DELETE: 'delete',
139
+ LOAD: 'load',
140
+ CREATE: 'create'
141
+ }
142
+ }
143
+ };
116
144
 
117
145
  class ContextDashboardService {
118
- constructor(inventory, tabs, modal, translateService, router, navigator, permissions, alert, dynamicComponent) {
146
+ constructor(inventory, tabs, modal, translateService, router, navigator, permissions, alert, dynamicComponent, groupService) {
119
147
  this.inventory = inventory;
120
148
  this.tabs = tabs;
121
149
  this.modal = modal;
@@ -125,6 +153,7 @@ class ContextDashboardService {
125
153
  this.permissions = permissions;
126
154
  this.alert = alert;
127
155
  this.dynamicComponent = dynamicComponent;
156
+ this.groupService = groupService;
128
157
  this.REPORT_PARTIAL_NAME = 'report_';
129
158
  this.INVENTORY_ROLES = ['ROLE_INVENTORY_ADMIN'];
130
159
  this.cache = new Map();
@@ -325,6 +354,20 @@ class ContextDashboardService {
325
354
  }
326
355
  }
327
356
  }
357
+ getContextForGS(mo) {
358
+ if (this.groupService.isDevice(mo)) {
359
+ return PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.DEVICE;
360
+ }
361
+ else if (this.groupService.isAsset(mo)) {
362
+ return PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.ASSET;
363
+ }
364
+ else if (this.groupService.isGroup(mo)) {
365
+ return PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.GROUP;
366
+ }
367
+ else {
368
+ return null;
369
+ }
370
+ }
328
371
  async serializeWidgetConfigs(dashboard) {
329
372
  const children = cloneDeep(dashboard.c8y_Dashboard.children);
330
373
  if (!children) {
@@ -501,14 +544,14 @@ class ContextDashboardService {
501
544
  return null;
502
545
  }
503
546
  }
504
- ContextDashboardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ContextDashboardService, deps: [{ token: i1.InventoryService }, { token: i2.TabsService }, { token: i2.ModalService }, { token: i3.TranslateService }, { token: i1$1.Router }, { token: i2.NavigatorService }, { token: i2.Permissions }, { token: i2.AlertService }, { token: i2.DynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable });
547
+ ContextDashboardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ContextDashboardService, deps: [{ token: i1.InventoryService }, { token: i2.TabsService }, { token: i2.ModalService }, { token: i3.TranslateService }, { token: i1$1.Router }, { token: i2.NavigatorService }, { token: i2.Permissions }, { token: i2.AlertService }, { token: i2.DynamicComponentService }, { token: i2.GroupService }], target: i0.ɵɵFactoryTarget.Injectable });
505
548
  ContextDashboardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ContextDashboardService, providedIn: 'root' });
506
549
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ContextDashboardService, decorators: [{
507
550
  type: Injectable,
508
551
  args: [{
509
552
  providedIn: 'root'
510
553
  }]
511
- }], ctorParameters: function () { return [{ type: i1.InventoryService }, { type: i2.TabsService }, { type: i2.ModalService }, { type: i3.TranslateService }, { type: i1$1.Router }, { type: i2.NavigatorService }, { type: i2.Permissions }, { type: i2.AlertService }, { type: i2.DynamicComponentService }]; } });
554
+ }], ctorParameters: function () { return [{ type: i1.InventoryService }, { type: i2.TabsService }, { type: i2.ModalService }, { type: i3.TranslateService }, { type: i1$1.Router }, { type: i2.NavigatorService }, { type: i2.Permissions }, { type: i2.AlertService }, { type: i2.DynamicComponentService }, { type: i2.GroupService }]; } });
512
555
 
513
556
  class ReportDashboardService {
514
557
  constructor(inventoryService, navigatorService) {
@@ -670,8 +713,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
670
713
  }] } });
671
714
 
672
715
  class DashboardAvailabilityComponent {
673
- constructor(userGroupService) {
716
+ constructor(userGroupService, gainsightService) {
674
717
  this.userGroupService = userGroupService;
718
+ this.gainsightService = gainsightService;
675
719
  this.globalRolesIdsChange = new EventEmitter();
676
720
  this.globalRolesItems = [];
677
721
  this.globalRolesItemsSelected = [];
@@ -702,10 +746,20 @@ class DashboardAvailabilityComponent {
702
746
  this.globalRolesItemsSelected = items;
703
747
  if (allItemsSelected) {
704
748
  this.globalRolesIdsChange.emit(ALL_GLOBAL_ROLES_SELECTED);
749
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {
750
+ component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.DASHBOARD_AVAILABILITY,
751
+ action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.APPLY_GLOBAL_ROLES_CHANGES,
752
+ globalRoles: ALL_GLOBAL_ROLES_SELECTED
753
+ });
705
754
  }
706
755
  else {
707
756
  const selectedGlobalRolesIds = items.map(i => i.id);
708
757
  this.globalRolesIdsChange.emit([...selectedGlobalRolesIds]);
758
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {
759
+ component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.DASHBOARD_AVAILABILITY,
760
+ action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.APPLY_GLOBAL_ROLES_CHANGES,
761
+ globalRoles: selectedGlobalRolesIds?.sort()?.join()
762
+ });
709
763
  }
710
764
  }
711
765
  async getGlobalRoles() {
@@ -726,12 +780,12 @@ class DashboardAvailabilityComponent {
726
780
  .filter(Boolean);
727
781
  }
728
782
  }
729
- DashboardAvailabilityComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: DashboardAvailabilityComponent, deps: [{ token: i1.UserGroupService }], target: i0.ɵɵFactoryTarget.Component });
783
+ DashboardAvailabilityComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: DashboardAvailabilityComponent, deps: [{ token: i1.UserGroupService }, { token: i2.GainsightService }], target: i0.ɵɵFactoryTarget.Component });
730
784
  DashboardAvailabilityComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: DashboardAvailabilityComponent, selector: "c8y-dashboard-availability", inputs: { globalRolesIds: "globalRolesIds" }, outputs: { globalRolesIdsChange: "globalRolesIdsChange" }, ngImport: i0, template: "<c8y-form-group class=\"p-b-24 m-b-0\">\n <div class=\"legend form-block\">\n <span>{{ 'Availability' | translate }}</span>\n </div>\n <label for=\"availability\">\n <span class=\"m-r-4\" id=\"availability\">\n {{ 'Global roles' | translate }}\n </span>\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n type=\"button\"\n popover=\"{{\n 'Select the global roles for which the dashboard will be available' | translate\n }}\"\n triggers=\"focus\"\n placement=\"right\"\n container=\"body\"\n >\n <i [c8yIcon]=\"'question-circle-o'\"></i>\n </button>\n </label>\n <c8y-select\n style=\"width: 180px\"\n [items]=\"globalRolesItems\"\n [selected]=\"globalRolesItemsSelected\"\n (onChange)=\"onSelected($event)\"\n ></c8y-select>\n</c8y-form-group>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "component", type: i2.SelectComponent, selector: "c8y-select", inputs: ["placeholder", "selectedLabel", "applyLabel", "items", "selected", "updateItems", "disableApplyOnNoSelection"], outputs: ["onChange"] }, { kind: "component", type: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { 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: i2.C8yTranslatePipe, name: "translate" }] });
731
785
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: DashboardAvailabilityComponent, decorators: [{
732
786
  type: Component,
733
787
  args: [{ selector: 'c8y-dashboard-availability', template: "<c8y-form-group class=\"p-b-24 m-b-0\">\n <div class=\"legend form-block\">\n <span>{{ 'Availability' | translate }}</span>\n </div>\n <label for=\"availability\">\n <span class=\"m-r-4\" id=\"availability\">\n {{ 'Global roles' | translate }}\n </span>\n <button\n class=\"btn-help btn-help--sm\"\n [attr.aria-label]=\"'Help' | translate\"\n type=\"button\"\n popover=\"{{\n 'Select the global roles for which the dashboard will be available' | translate\n }}\"\n triggers=\"focus\"\n placement=\"right\"\n container=\"body\"\n >\n <i [c8yIcon]=\"'question-circle-o'\"></i>\n </button>\n </label>\n <c8y-select\n style=\"width: 180px\"\n [items]=\"globalRolesItems\"\n [selected]=\"globalRolesItemsSelected\"\n (onChange)=\"onSelected($event)\"\n ></c8y-select>\n</c8y-form-group>\n" }]
734
- }], ctorParameters: function () { return [{ type: i1.UserGroupService }]; }, propDecorators: { globalRolesIds: [{
788
+ }], ctorParameters: function () { return [{ type: i1.UserGroupService }, { type: i2.GainsightService }]; }, propDecorators: { globalRolesIds: [{
735
789
  type: Input
736
790
  }], globalRolesIdsChange: [{
737
791
  type: Output
@@ -863,11 +917,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
863
917
  }] } });
864
918
 
865
919
  class AddDashboardFactory {
866
- constructor(permissions, contextDashboardService, bsModal, contextRoute) {
920
+ constructor(permissions, contextDashboardService, bsModal, contextRoute, gainsightService) {
867
921
  this.permissions = permissions;
868
922
  this.contextDashboardService = contextDashboardService;
869
923
  this.bsModal = bsModal;
870
924
  this.contextRoute = contextRoute;
925
+ this.gainsightService = gainsightService;
871
926
  }
872
927
  async get(activatedRoute) {
873
928
  this.currentContext = this.contextRoute.getContextData(activatedRoute);
@@ -902,6 +957,16 @@ class AddDashboardFactory {
902
957
  const dashboardMO = await this.contextDashboardService.create(dashboardCfg, this.currentContext);
903
958
  await this.contextDashboardService.navigateToDashboard(dashboardMO);
904
959
  modal.close();
960
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {
961
+ component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.ADD_DASHBOARD,
962
+ action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.CREATE,
963
+ name: dashboardCfg.name,
964
+ id: dashboardMO.id,
965
+ dashboardType: dashboardMO.c8y_Dashboard.deviceType
966
+ ? dashboardMO.c8y_Dashboard.deviceTypeValue
967
+ : null,
968
+ context: this.contextDashboardService.getContextForGS(this.currentContext.contextData)
969
+ });
905
970
  }
906
971
  catch (ex) {
907
972
  // intended empty
@@ -914,14 +979,14 @@ class AddDashboardFactory {
914
979
  return this.permissions.hasAnyRole(['ROLE_INVENTORY_ADMIN', 'ROLE_INVENTORY_CREATE']);
915
980
  }
916
981
  }
917
- AddDashboardFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: AddDashboardFactory, deps: [{ token: i2.Permissions }, { token: ContextDashboardService }, { token: i3$1.BsModalService }, { token: i2.ContextRouteService }], target: i0.ɵɵFactoryTarget.Injectable });
982
+ AddDashboardFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: AddDashboardFactory, deps: [{ token: i2.Permissions }, { token: ContextDashboardService }, { token: i3$1.BsModalService }, { token: i2.ContextRouteService }, { token: i2.GainsightService }], target: i0.ɵɵFactoryTarget.Injectable });
918
983
  AddDashboardFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: AddDashboardFactory, providedIn: 'root' });
919
984
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: AddDashboardFactory, decorators: [{
920
985
  type: Injectable,
921
986
  args: [{
922
987
  providedIn: 'root'
923
988
  }]
924
- }], ctorParameters: function () { return [{ type: i2.Permissions }, { type: ContextDashboardService }, { type: i3$1.BsModalService }, { type: i2.ContextRouteService }]; } });
989
+ }], ctorParameters: function () { return [{ type: i2.Permissions }, { type: ContextDashboardService }, { type: i3$1.BsModalService }, { type: i2.ContextRouteService }, { type: i2.GainsightService }]; } });
925
990
 
926
991
  class AddDashboardComponent {
927
992
  constructor(addDashboardFactory) {
@@ -1374,6 +1439,14 @@ class ContextDashboardComponent {
1374
1439
  const route = this.route.parent.snapshot.url.map(segment => segment.path).join('/');
1375
1440
  this.router.navigateByUrl(route);
1376
1441
  }
1442
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {
1443
+ component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.DELETE_DASHBOARD,
1444
+ action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.DELETE,
1445
+ name: this.dashboard.name,
1446
+ id: this.mo.id,
1447
+ dashboardType: this.dashboard.deviceType ? this.dashboard.deviceTypeValue : null,
1448
+ context: this.contextDashboardService.getContextForGS(this.context)
1449
+ });
1377
1450
  }
1378
1451
  /**
1379
1452
  * Edits the current dashboard
@@ -1635,6 +1708,18 @@ class ContextDashboardComponent {
1635
1708
  this.addReportDashboardSettings();
1636
1709
  }
1637
1710
  this.isLoading = false;
1711
+ this.gainsightService.triggerEvent(isReport
1712
+ ? PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS
1713
+ : PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {
1714
+ component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.DASHBOARD_VIEW,
1715
+ action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.LOAD,
1716
+ name: this.dashboard.name,
1717
+ id: this.mo.id,
1718
+ dashboardType: this.dashboard.deviceType ? this.dashboard.deviceTypeValue : null,
1719
+ context: isReport
1720
+ ? PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.REPORT
1721
+ : this.contextDashboardService.getContextForGS(this.context)
1722
+ });
1638
1723
  }
1639
1724
  mergeWidgetClasses(widget) {
1640
1725
  const hasHeaderClass = WIDGET_HEADER_CLASSES.find(el => widget.classes && widget.classes[el.class]);
@@ -2835,7 +2920,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
2835
2920
  }] });
2836
2921
 
2837
2922
  class ReportDashboardListComponent {
2838
- constructor(inventoryService, contextDashboardService, bsModal, translateService, modal, alertService, reportDashboardService, permissions) {
2923
+ constructor(inventoryService, contextDashboardService, bsModal, translateService, modal, alertService, reportDashboardService, permissions, gainsightService) {
2839
2924
  this.inventoryService = inventoryService;
2840
2925
  this.contextDashboardService = contextDashboardService;
2841
2926
  this.bsModal = bsModal;
@@ -2844,6 +2929,7 @@ class ReportDashboardListComponent {
2844
2929
  this.alertService = alertService;
2845
2930
  this.reportDashboardService = reportDashboardService;
2846
2931
  this.permissions = permissions;
2932
+ this.gainsightService = gainsightService;
2847
2933
  this.textFilter$ = new BehaviorSubject('');
2848
2934
  this.reload$ = new BehaviorSubject(null);
2849
2935
  this.reloading = false;
@@ -2894,6 +2980,13 @@ class ReportDashboardListComponent {
2894
2980
  }
2895
2981
  this.reload$.next();
2896
2982
  modal.close();
2983
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS, {
2984
+ component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.ADD_REPORT,
2985
+ action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.CREATE,
2986
+ name: report.name,
2987
+ id: report.id,
2988
+ context: PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.REPORT
2989
+ });
2897
2990
  }
2898
2991
  catch (ex) {
2899
2992
  if (ex) {
@@ -2923,6 +3016,13 @@ class ReportDashboardListComponent {
2923
3016
  this.reportDashboardService.removeNavigatorNode(report);
2924
3017
  }
2925
3018
  this.reload$.next();
3019
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS, {
3020
+ component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.REPORTS_LIST,
3021
+ action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.DELETE,
3022
+ name: report.name,
3023
+ id: report.id,
3024
+ context: PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.REPORT
3025
+ });
2926
3026
  }
2927
3027
  catch (ex) {
2928
3028
  if (ex) {
@@ -2938,12 +3038,12 @@ class ReportDashboardListComponent {
2938
3038
  : this.reportDashboardService.removeNavigatorNode(report);
2939
3039
  }
2940
3040
  }
2941
- ReportDashboardListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ReportDashboardListComponent, deps: [{ token: i1.InventoryService }, { token: ContextDashboardService }, { token: i3$1.BsModalService }, { token: i3.TranslateService }, { token: i2.ModalService }, { token: i2.AlertService }, { token: ReportDashboardService }, { token: i2.Permissions }], target: i0.ɵɵFactoryTarget.Component });
3041
+ ReportDashboardListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ReportDashboardListComponent, deps: [{ token: i1.InventoryService }, { token: ContextDashboardService }, { token: i3$1.BsModalService }, { token: i3.TranslateService }, { token: i2.ModalService }, { token: i2.AlertService }, { token: ReportDashboardService }, { token: i2.Permissions }, { token: i2.GainsightService }], target: i0.ɵɵFactoryTarget.Component });
2942
3042
  ReportDashboardListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", 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 [placement]=\"'left'\" itemClass=\"navbar-form\">\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n type=\"search\"\n [attr.aria-label]=\"'Filter' | translate\"\n placeholder=\"{{ 'Filter\u2026' | translate }}\"\n [ngModel]=\"textFilter$ | async\"\n (ngModelChange)=\"textFilter$.next($event)\"\n />\n <span class=\"input-group-addon\">\n <i c8yIcon=\"search\" *ngIf=\"(textFilter$ | async).length === 0\"></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 [attr.data-cy]=\"'reports-add-report-action-bar-button'\"\n type=\"button\"\n (click)=\"add()\"\n [disabled]=\"!canAddReport\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add report' | translate }}\n </button>\n <button\n *ngIf=\"!canAddReport\"\n class=\"btn btn-dot m-r-16\"\n popover=\"{{ 'You don\\'t have permission to add reports' | translate }}\"\n triggers=\"focus\"\n placement=\"top\"\n container=\"body\"\n >\n <i [c8yIcon]=\"'info-circle'\" class=\"text-primary\"></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 [ngClass]=\"{ 'icon-spin': reloading }\" c8yIcon=\"refresh\"></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 class=\"text-muted\" *ngIf=\"!report.description; else showDescription\">\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 class=\"c8y-switch c8y-switch--inline\" title=\"{{ 'Show in navigator' | translate }}\">\n <input\n [(ngModel)]=\"!!report.c8y_IsNavigatorNode\"\n type=\"checkbox\"\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 (click)=\"delete(report)\"\n tooltip=\"{{ 'Remove report' | translate }}\"\n [delay]=\"500\"\n [attr.aria-label]=\"'Remove report' | translate\"\n type=\"button\"\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 (click)=\"delete(report)\"\n title=\"{{ 'Remove report' | translate }}\"\n type=\"button\"\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 *ngIf=\"(reports$ | async)?.data.length === 0\"\n [icon]=\"'c8y-reports'\"\n [title]=\"'There are no reports defined.' | translate\"\n [subtitle]=\"'Add a report first.' | translate\"\n>\n <p>\n <button\n title=\"{{ 'Add report' | translate }}\"\n type=\"button\"\n class=\"btn btn-primary\"\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 translate ngNonBindable>\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: i2.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId"] }, { kind: "component", type: i2.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ForOfDirective, selector: "[c8yFor]", inputs: ["c8yForOf", "c8yForLoadMore", "c8yForPipe", "c8yForNotFound", "c8yForMaxIterations", "c8yForLoadingTemplate", "c8yForLoadNextLabel", "c8yForRealtime", "c8yForRealtimeOptions", "c8yForComparator", "c8yForEnableVirtualScroll", "c8yForVirtualScrollElementSize", "c8yForVirtualScrollStrategy", "c8yForVirtualScrollContainerHeight"], outputs: ["c8yForCount"] }, { kind: "component", type: i2.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: i2.GuideHrefDirective, selector: "[c8y-guide-href]", inputs: ["c8y-guide-href"] }, { kind: "component", type: i2.GuideDocsComponent, selector: "[c8y-guide-docs]" }, { kind: "component", type: i2.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "emptyActions", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i2.ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "component", type: i2.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: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "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: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }] });
2943
3043
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ReportDashboardListComponent, decorators: [{
2944
3044
  type: Component,
2945
3045
  args: [{ selector: 'c8y-report-dashboard-list', template: "<c8y-title>\n {{ 'Reports' | translate }}\n</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'left'\" itemClass=\"navbar-form\">\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n type=\"search\"\n [attr.aria-label]=\"'Filter' | translate\"\n placeholder=\"{{ 'Filter\u2026' | translate }}\"\n [ngModel]=\"textFilter$ | async\"\n (ngModelChange)=\"textFilter$.next($event)\"\n />\n <span class=\"input-group-addon\">\n <i c8yIcon=\"search\" *ngIf=\"(textFilter$ | async).length === 0\"></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 [attr.data-cy]=\"'reports-add-report-action-bar-button'\"\n type=\"button\"\n (click)=\"add()\"\n [disabled]=\"!canAddReport\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add report' | translate }}\n </button>\n <button\n *ngIf=\"!canAddReport\"\n class=\"btn btn-dot m-r-16\"\n popover=\"{{ 'You don\\'t have permission to add reports' | translate }}\"\n triggers=\"focus\"\n placement=\"top\"\n container=\"body\"\n >\n <i [c8yIcon]=\"'info-circle'\" class=\"text-primary\"></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 [ngClass]=\"{ 'icon-spin': reloading }\" c8yIcon=\"refresh\"></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 class=\"text-muted\" *ngIf=\"!report.description; else showDescription\">\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 class=\"c8y-switch c8y-switch--inline\" title=\"{{ 'Show in navigator' | translate }}\">\n <input\n [(ngModel)]=\"!!report.c8y_IsNavigatorNode\"\n type=\"checkbox\"\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 (click)=\"delete(report)\"\n tooltip=\"{{ 'Remove report' | translate }}\"\n [delay]=\"500\"\n [attr.aria-label]=\"'Remove report' | translate\"\n type=\"button\"\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 (click)=\"delete(report)\"\n title=\"{{ 'Remove report' | translate }}\"\n type=\"button\"\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 *ngIf=\"(reports$ | async)?.data.length === 0\"\n [icon]=\"'c8y-reports'\"\n [title]=\"'There are no reports defined.' | translate\"\n [subtitle]=\"'Add a report first.' | translate\"\n>\n <p>\n <button\n title=\"{{ 'Add report' | translate }}\"\n type=\"button\"\n class=\"btn btn-primary\"\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 translate ngNonBindable>\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" }]
2946
- }], ctorParameters: function () { return [{ type: i1.InventoryService }, { type: ContextDashboardService }, { type: i3$1.BsModalService }, { type: i3.TranslateService }, { type: i2.ModalService }, { type: i2.AlertService }, { type: ReportDashboardService }, { type: i2.Permissions }]; }, propDecorators: { filter: [{
3046
+ }], ctorParameters: function () { return [{ type: i1.InventoryService }, { type: ContextDashboardService }, { type: i3$1.BsModalService }, { type: i3.TranslateService }, { type: i2.ModalService }, { type: i2.AlertService }, { type: ReportDashboardService }, { type: i2.Permissions }, { type: i2.GainsightService }]; }, propDecorators: { filter: [{
2947
3047
  type: ViewChild,
2948
3048
  args: [FilterInputComponent, { static: false }]
2949
3049
  }] } });
@@ -3033,5 +3133,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
3033
3133
  * Generated bundle index. Do not edit.
3034
3134
  */
3035
3135
 
3036
- export { ALL_GLOBAL_ROLES_SELECTED, AddDashboardComponent, AddDashboardFactory, AppearanceSettingsComponent, COCKPIT_HOME_DASHBOARD_CONFIG, CONTEXT_DASHBOARD_CONFIG, CockpitDashboardComponent, CockpitDashboardModule, ContextDashboardComponent, ContextDashboardModule, ContextDashboardService, ContextDashboardType, DASHBOARD_THEME_CLASSES, DEFAULT_COCKPIT_HOME_WIDGETS, DashboardActionBarFactory, DashboardDetailComponent, DeviceDashboardGuard, DeviceInfoDashboardComponent, DeviceInfoDashboardModule, DeviceManagementHomeDashboardComponent, DeviceManagementHomeDashboardModule, GroupDashboardGuard, LegacyWelcomeComponent, PasteDashboardActionComponent, REPORT_DEFAULT_NAVIGATION_NODE_PRIORITY, ReportDashboardGuard, ReportDashboardListComponent, ReportDashboardModule, ReportDashboardNavigationFactory, ReportDashboardService, STYLING_CLASS_PREFIXES, WIDGET_CONTENT_CLASSES, WIDGET_HEADER_CLASSES, WelcomeToCockpit, WidgetConfigComponent, WidgetPreviewComponent, WidgetService };
3136
+ export { ALL_GLOBAL_ROLES_SELECTED, AddDashboardComponent, AddDashboardFactory, AppearanceSettingsComponent, COCKPIT_HOME_DASHBOARD_CONFIG, CONTEXT_DASHBOARD_CONFIG, CockpitDashboardComponent, CockpitDashboardModule, ContextDashboardComponent, ContextDashboardModule, ContextDashboardService, ContextDashboardType, DASHBOARD_THEME_CLASSES, DEFAULT_COCKPIT_HOME_WIDGETS, DashboardActionBarFactory, DashboardDetailComponent, DeviceDashboardGuard, DeviceInfoDashboardComponent, DeviceInfoDashboardModule, DeviceManagementHomeDashboardComponent, DeviceManagementHomeDashboardModule, GroupDashboardGuard, LegacyWelcomeComponent, PRODUCT_EXPERIENCE, PasteDashboardActionComponent, REPORT_DEFAULT_NAVIGATION_NODE_PRIORITY, ReportDashboardGuard, ReportDashboardListComponent, ReportDashboardModule, ReportDashboardNavigationFactory, ReportDashboardService, STYLING_CLASS_PREFIXES, WIDGET_CONTENT_CLASSES, WIDGET_HEADER_CLASSES, WelcomeToCockpit, WidgetConfigComponent, WidgetPreviewComponent, WidgetService };
3037
3137
  //# sourceMappingURL=c8y-ngx-components-context-dashboard.mjs.map