@schneideress/dashboardframework 0.0.276 → 0.0.277

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.
@@ -5,7 +5,6 @@ import { BaseService, RATranslateService, RAPermissionService, DomService, RACom
5
5
  import { filter, map } from 'rxjs/operators';
6
6
  import { NgxUiLoaderService, NgxUiLoaderModule } from 'ngx-ui-loader';
7
7
  import { NotifierService, NotifierModule } from 'angular-notifier';
8
- import { Router } from '@angular/router';
9
8
  import { RaWidgetlockStatus, WidgetViewState, RADownloadType, RADownloadOption } from '@schneideress/widgetframework';
10
9
  import { BrowserModule } from '@angular/platform-browser';
11
10
  import { HttpClientModule } from '@angular/common/http';
@@ -380,7 +379,7 @@ RADashboardResponsiveService = __decorate([
380
379
  ], RADashboardResponsiveService);
381
380
 
382
381
  let RADashboardArea = class RADashboardArea {
383
- constructor(dashboardService, ngZone, ngxService, translateService, notifier, responsiveService, permissionService, router) {
382
+ constructor(dashboardService, ngZone, ngxService, translateService, notifier, responsiveService, permissionService) {
384
383
  this.dashboardService = dashboardService;
385
384
  this.ngZone = ngZone;
386
385
  this.ngxService = ngxService;
@@ -388,7 +387,6 @@ let RADashboardArea = class RADashboardArea {
388
387
  this.notifier = notifier;
389
388
  this.responsiveService = responsiveService;
390
389
  this.permissionService = permissionService;
391
- this.router = router;
392
390
  this.widgetList = Array();
393
391
  this.gridheight = 300;
394
392
  this.gridcellHeight = 0;
@@ -398,6 +396,7 @@ let RADashboardArea = class RADashboardArea {
398
396
  this.domResized = false;
399
397
  this.showEmptyDashboard = false;
400
398
  this.isWidgetMgmnt = false;
399
+ this.templateId = '';
401
400
  this.widgetHeight = 2;
402
401
  this.widgetWidth = 4;
403
402
  this.hideDashboardBanner = new EventEmitter();
@@ -562,14 +561,12 @@ let RADashboardArea = class RADashboardArea {
562
561
  }
563
562
  /** To retrieve widgets based on userDashboardid and area name */
564
563
  loadWidgets(userDashboarId, areaKey) {
565
- const currentUrl = this.router.url;
566
- let IsTypeIndicator = false;
567
- if (currentUrl.includes('indicatorDashboard'))
568
- IsTypeIndicator = true;
564
+ if (localStorage.getItem('IndicatorDashboardTemplateId'))
565
+ this.templateId = localStorage.getItem('IndicatorDashboardTemplateId');
569
566
  let widgetInfo = {
570
567
  dashboardId: userDashboarId.toString(),
571
568
  dashboardAreaKey: areaKey,
572
- IsTypeIndicator: IsTypeIndicator
569
+ templateId: this.templateId
573
570
  };
574
571
  this.widgetList = [];
575
572
  this.dashboardService.getWidgetsByDashboardArea(widgetInfo, this.appConfig).subscribe(widgets => {
@@ -808,8 +805,7 @@ RADashboardArea.ctorParameters = () => [
808
805
  { type: RATranslateService },
809
806
  { type: NotifierService },
810
807
  { type: RADashboardResponsiveService },
811
- { type: RAPermissionService },
812
- { type: Router }
808
+ { type: RAPermissionService }
813
809
  ];
814
810
  __decorate([
815
811
  Input('user-dashboard-id'),
@@ -859,8 +855,7 @@ RADashboardArea = __decorate([
859
855
  RATranslateService,
860
856
  NotifierService,
861
857
  RADashboardResponsiveService,
862
- RAPermissionService,
863
- Router])
858
+ RAPermissionService])
864
859
  ], RADashboardArea);
865
860
 
866
861
  let LockTooltip = class LockTooltip {