@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';
@@ -395,7 +394,7 @@ var RADashboardResponsiveService = /** @class */ (function () {
395
394
  }());
396
395
 
397
396
  var RADashboardArea = /** @class */ (function () {
398
- function RADashboardArea(dashboardService, ngZone, ngxService, translateService, notifier, responsiveService, permissionService, router) {
397
+ function RADashboardArea(dashboardService, ngZone, ngxService, translateService, notifier, responsiveService, permissionService) {
399
398
  this.dashboardService = dashboardService;
400
399
  this.ngZone = ngZone;
401
400
  this.ngxService = ngxService;
@@ -403,7 +402,6 @@ var RADashboardArea = /** @class */ (function () {
403
402
  this.notifier = notifier;
404
403
  this.responsiveService = responsiveService;
405
404
  this.permissionService = permissionService;
406
- this.router = router;
407
405
  this.widgetList = Array();
408
406
  this.gridheight = 300;
409
407
  this.gridcellHeight = 0;
@@ -413,6 +411,7 @@ var RADashboardArea = /** @class */ (function () {
413
411
  this.domResized = false;
414
412
  this.showEmptyDashboard = false;
415
413
  this.isWidgetMgmnt = false;
414
+ this.templateId = '';
416
415
  this.widgetHeight = 2;
417
416
  this.widgetWidth = 4;
418
417
  this.hideDashboardBanner = new EventEmitter();
@@ -581,14 +580,12 @@ var RADashboardArea = /** @class */ (function () {
581
580
  /** To retrieve widgets based on userDashboardid and area name */
582
581
  RADashboardArea.prototype.loadWidgets = function (userDashboarId, areaKey) {
583
582
  var _this = this;
584
- var currentUrl = this.router.url;
585
- var IsTypeIndicator = false;
586
- if (currentUrl.includes('indicatorDashboard'))
587
- IsTypeIndicator = true;
583
+ if (localStorage.getItem('IndicatorDashboardTemplateId'))
584
+ this.templateId = localStorage.getItem('IndicatorDashboardTemplateId');
588
585
  var widgetInfo = {
589
586
  dashboardId: userDashboarId.toString(),
590
587
  dashboardAreaKey: areaKey,
591
- IsTypeIndicator: IsTypeIndicator
588
+ templateId: this.templateId
592
589
  };
593
590
  this.widgetList = [];
594
591
  this.dashboardService.getWidgetsByDashboardArea(widgetInfo, this.appConfig).subscribe(function (widgets) {
@@ -832,8 +829,7 @@ var RADashboardArea = /** @class */ (function () {
832
829
  { type: RATranslateService },
833
830
  { type: NotifierService },
834
831
  { type: RADashboardResponsiveService },
835
- { type: RAPermissionService },
836
- { type: Router }
832
+ { type: RAPermissionService }
837
833
  ]; };
838
834
  __decorate([
839
835
  Input('user-dashboard-id'),
@@ -883,8 +879,7 @@ var RADashboardArea = /** @class */ (function () {
883
879
  RATranslateService,
884
880
  NotifierService,
885
881
  RADashboardResponsiveService,
886
- RAPermissionService,
887
- Router])
882
+ RAPermissionService])
888
883
  ], RADashboardArea);
889
884
  return RADashboardArea;
890
885
  }());