@schneideress/dashboardframework 0.0.268 → 0.0.270

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 (33) hide show
  1. package/bundles/schneideress-dashboardframework.umd.js +51 -192
  2. package/bundles/schneideress-dashboardframework.umd.js.map +1 -1
  3. package/bundles/schneideress-dashboardframework.umd.min.js +2 -2
  4. package/bundles/schneideress-dashboardframework.umd.min.js.map +1 -1
  5. package/esm2015/gridster/lib/gridsterItem.component.js +1 -1
  6. package/esm2015/gridster/lib/gridsterRenderer.service.js +1 -1
  7. package/esm2015/lib/ra-dashboard-area/ra.dashboard.area.js +19 -101
  8. package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +30 -64
  9. package/esm2015/lib/ra.base.dashboard.template.js +2 -4
  10. package/esm2015/lib/ra.dashboard.responsive.service.js +2 -12
  11. package/esm2015/lib/ra.dashboard.service.js +1 -7
  12. package/esm2015/lib/ra.event.enum.js +1 -7
  13. package/esm2015/lib/ra.gridster.config.js +3 -3
  14. package/esm5/gridster/lib/gridsterItem.component.js +1 -1
  15. package/esm5/gridster/lib/gridsterRenderer.service.js +1 -1
  16. package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +19 -102
  17. package/esm5/lib/ra-widget-container/ra.widget.container.component.js +30 -64
  18. package/esm5/lib/ra.base.dashboard.template.js +2 -4
  19. package/esm5/lib/ra.dashboard.responsive.service.js +2 -12
  20. package/esm5/lib/ra.dashboard.service.js +1 -7
  21. package/esm5/lib/ra.event.enum.js +1 -7
  22. package/esm5/lib/ra.gridster.config.js +3 -3
  23. package/fesm2015/schneideress-dashboardframework.js +51 -191
  24. package/fesm2015/schneideress-dashboardframework.js.map +1 -1
  25. package/fesm5/schneideress-dashboardframework.js +51 -192
  26. package/fesm5/schneideress-dashboardframework.js.map +1 -1
  27. package/lib/ra-dashboard-area/ra.dashboard.area.d.ts +2 -20
  28. package/lib/ra-widget-container/ra.widget.container.component.d.ts +2 -6
  29. package/lib/ra.base.dashboard.template.d.ts +2 -4
  30. package/lib/ra.dashboard.responsive.service.d.ts +1 -1
  31. package/lib/ra.event.enum.d.ts +1 -7
  32. package/package.json +1 -1
  33. package/schneideress-dashboardframework.metadata.json +1 -1
@@ -69,12 +69,6 @@ var RaDashboardService = /** @class */ (function (_super) {
69
69
  /**To Update widgetInfo in database */
70
70
  RaDashboardService.prototype.updateWidget = function (widgetInfo, appConfig) {
71
71
  this.baseUrl = appConfig.apiBaseUrl;
72
- var info = {};
73
- info.widgetConfigInfo = widgetInfo.widgetConfigInfo;
74
- info.widgetInstanceId = widgetInfo.widgetInstanceId;
75
- info.widgetTitle = widgetInfo.widgetTitle;
76
- info.widgetType = widgetInfo.widgetType;
77
- info.widgetId = widgetInfo.widgetId;
78
72
  return this.post('widget/UpdateUserWidget', widgetInfo);
79
73
  };
80
74
  /** To Move or change position if current widget container*/
@@ -190,12 +184,6 @@ var RAEvent;
190
184
  RAEvent["UpdateAppledFiterForInapplicableFilter"] = "UpdateAppledFiterForInapplicableFilter";
191
185
  /**show inapplicable filter message in global filter flyout */
192
186
  RAEvent["ShowInapplicableFilterMessage"] = "ShowInapplicableFilterMessage";
193
- /** Bulk Action Clicked */
194
- RAEvent["BulkActionClick"] = "BulkActionClick";
195
- /** Global Filter Clicked */
196
- /** When user change the curated filter(eg:data streams), system will create/delete widgets */
197
- RAEvent["CuratedFilterChange"] = "CuratedFilterChange";
198
- RAEvent["GlobalFilterClick"] = "GlobalFilterClick";
199
187
  })(RAEvent || (RAEvent = {}));
200
188
  var RAEventKey;
201
189
  (function (RAEventKey) {
@@ -209,9 +197,9 @@ var GridsterConfigDefaultSettings = {
209
197
  margin: 10,
210
198
  outerMargin: true,
211
199
  outerMarginTop: 10,
212
- outerMarginRight: 0,
200
+ outerMarginRight: 10,
213
201
  outerMarginBottom: 30,
214
- outerMarginLeft: 0,
202
+ outerMarginLeft: 10,
215
203
  useTransformPositioning: true,
216
204
  mobileBreakpoint: 640,
217
205
  minCols: 10,
@@ -326,7 +314,7 @@ var RADashboardResponsiveService = /** @class */ (function () {
326
314
  enumerable: true,
327
315
  configurable: true
328
316
  });
329
- RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt, resize, canMove) {
317
+ RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt) {
330
318
  var config = GridsterConfigDefaultSettings;
331
319
  config.minCols = this.currentResInfo.maxCols;
332
320
  config.maxCols = this.currentResInfo.maxCols;
@@ -348,13 +336,6 @@ var RADashboardResponsiveService = /** @class */ (function () {
348
336
  config.swap = true;
349
337
  config.draggable.enabled = true;
350
338
  }
351
- if (!resize) {
352
- config.resizable.enabled = false;
353
- config.swap = false;
354
- }
355
- if (!canMove) {
356
- config.draggable.enabled = false;
357
- }
358
339
  return config;
359
340
  };
360
341
  /**To map IwidgetInfo object to gridsterItem */
@@ -362,9 +343,6 @@ var RADashboardResponsiveService = /** @class */ (function () {
362
343
  if (widget.widgetSettings) {
363
344
  widget.settings = JSON.parse(widget.widgetSettings);
364
345
  }
365
- if (widget.templateSettings) {
366
- widget.templateWidgetSettings = JSON.parse(widget.templateSettings);
367
- }
368
346
  var gridsterItem = {
369
347
  cols: this.getWidth(widget.width),
370
348
  rows: this.getHeight(widget.height),
@@ -432,7 +410,6 @@ var RADashboardArea = /** @class */ (function () {
432
410
  this.domResized = false;
433
411
  this.showEmptyDashboard = false;
434
412
  this.isWidgetMgmnt = false;
435
- this.initialWidgetCount = 10;
436
413
  this.widgetHeight = 2;
437
414
  this.widgetWidth = 4;
438
415
  this.hideDashboardBanner = new EventEmitter();
@@ -441,7 +418,6 @@ var RADashboardArea = /** @class */ (function () {
441
418
  var _this = this;
442
419
  this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
443
420
  this.initiateGridsterConfig();
444
- this.setEmptyDashboardConfig();
445
421
  this.lastViewType = this.responsiveService.IsDesktopView ? 'desktop' : 'mobile';
446
422
  this.responsiveService.resized.subscribe(function (isDesktop) {
447
423
  if (_this.lastViewType != (isDesktop ? 'desktop' : 'mobile') || !isDesktop) {
@@ -470,11 +446,6 @@ var RADashboardArea = /** @class */ (function () {
470
446
  }, 100);
471
447
  }
472
448
  });
473
- setTimeout(function () {
474
- _this.bulkActionClick = _this.raDashboardEventBus.subscribe(RAEvent.BulkActionClick).subscribe(function (data) {
475
- _this.bulkActionData = JSON.parse(JSON.stringify(data)); // To create a new reference;
476
- });
477
- });
478
449
  };
479
450
  RADashboardArea.prototype.ngOnChanges = function (changes) {
480
451
  this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
@@ -482,41 +453,28 @@ var RADashboardArea = /** @class */ (function () {
482
453
  this.isWidgetLoaded = true;
483
454
  this.loadWidgets(this.userDashboardId, this.areaKey);
484
455
  }
485
- this.initiateGridsterConfig();
486
456
  if (changes.raDashboardEventBus && changes.raDashboardEventBus.currentValue != changes.raDashboardEventBus.previousValue) {
487
457
  this.inititateEventBusSubscritions();
488
458
  }
489
459
  };
490
- RADashboardArea.prototype.setEmptyDashboardConfig = function () {
491
- if (this.dashboardInfo && this.dashboardInfo.templateConfig.emptyDashboardHeader) {
492
- this.emptyDashboardTitle = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.titleKey);
493
- this.emptyDashboardMsg1 = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey1);
494
- this.emptyDashboardMsg2 = (this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) ? this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) : '';
495
- this.emptyDashboardButtonText = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonTextKey);
496
- this.emptyDashboardButtonIcon = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon : '';
497
- this.emptyDashboardButtonAction = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction : '';
498
- }
499
- };
500
460
  /**To set GridsterConfig */
501
461
  RADashboardArea.prototype.initiateGridsterConfig = function () {
502
462
  var _this = this;
503
- if (this.dashboardInfo) {
504
- /**To override default configuration values to the gridster control */
505
- this.options = this.responsiveService.getGridsterConfig(this.isWidgetMgmnt, this.dashboardInfo.templateConfig.widget.canResize, this.dashboardInfo.templateConfig.widget.canMove);
506
- this.options.initCallback = function (gridster) {
507
- if (_this.options.api) {
508
- _this.gridcellHeight = _this.options.api.getCurrentRowHeight();
509
- }
510
- };
511
- this.options.itemChangeCallback = function (item) {
512
- if (_this.responsiveService.IsDesktopView) {
513
- if (item.widgetInfo && item.widgetInfo.widgetInstanceId) {
514
- _this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
515
- }
463
+ /**To override default configuration values to the gridster control */
464
+ this.options = this.responsiveService.getGridsterConfig(this.isWidgetMgmnt);
465
+ this.options.initCallback = function (gridster) {
466
+ if (_this.options.api) {
467
+ _this.gridcellHeight = _this.options.api.getCurrentRowHeight();
468
+ }
469
+ };
470
+ this.options.itemChangeCallback = function (item) {
471
+ if (_this.responsiveService.IsDesktopView) {
472
+ if (item.widgetInfo && item.widgetInfo.widgetInstanceId) {
473
+ _this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
516
474
  }
517
- _this.setAreaHeight();
518
- };
519
- }
475
+ }
476
+ _this.setAreaHeight();
477
+ };
520
478
  };
521
479
  /** To initiate eventbus subsctiptions */
522
480
  RADashboardArea.prototype.inititateEventBusSubscritions = function () {
@@ -536,11 +494,6 @@ var RADashboardArea = /** @class */ (function () {
536
494
  _this.addWidget(e);
537
495
  });
538
496
  });
539
- this.curatedFilterChange = this.raDashboardEventBus.subscribe(RAEvent.CuratedFilterChange).subscribe(function (e) {
540
- _this.ngZone.run(function () {
541
- _this.loadWidgets(_this.userDashboardId, _this.areaKey);
542
- });
543
- });
544
497
  this.rearrangeWidgetClick = this.raDashboardEventBus.subscribe(RAEvent.RearrangeClicked).subscribe(function (e) {
545
498
  _this.ngZone.run(function () {
546
499
  _this.rearrangeWidgets();
@@ -589,10 +542,6 @@ var RADashboardArea = /** @class */ (function () {
589
542
  this.widgetLibraryDoneClick.unsubscribe();
590
543
  if (this.rearrangeWidgetClick)
591
544
  this.rearrangeWidgetClick.unsubscribe();
592
- if (this.curatedFilterChange)
593
- this.curatedFilterChange.unsubscribe();
594
- if (this.bulkActionClick)
595
- this.bulkActionClick.unsubscribe();
596
545
  };
597
546
  /**To update position/dimention of all widgets in the area */
598
547
  RADashboardArea.prototype.updateWidgets = function () {
@@ -629,8 +578,6 @@ var RADashboardArea = /** @class */ (function () {
629
578
  /** To retrieve widgets based on userDashboardid and area name */
630
579
  RADashboardArea.prototype.loadWidgets = function (userDashboarId, areaKey) {
631
580
  var _this = this;
632
- if (this.templateConfig && this.templateConfig.initialWidgetCount)
633
- this.initialWidgetCount = this.templateConfig.initialWidgetCount;
634
581
  var widgetInfo = {
635
582
  dashboardId: userDashboarId.toString(),
636
583
  dashboardAreaKey: areaKey
@@ -659,47 +606,6 @@ var RADashboardArea = /** @class */ (function () {
659
606
  }
660
607
  });
661
608
  };
662
- RADashboardArea.prototype.widgetLoaded = function (widget) {
663
- var lst = this.widgetList.filter(function (item) {
664
- return item.widgetLoaded == true;
665
- });
666
- widget.widgetLoaded = true;
667
- if (lst.length == 0) {
668
- this.startLoadWidgetData(this.widgetList);
669
- }
670
- };
671
- RADashboardArea.prototype.startLoadWidgetData = function (lst) {
672
- if (lst) {
673
- if (lst.length < this.initialWidgetCount) {
674
- for (var i = 0; i < lst.length; i++)
675
- this.loadWidgetData(lst[i]);
676
- }
677
- else
678
- for (var i = 0; i < this.initialWidgetCount; i++)
679
- this.loadWidgetData(lst[i]);
680
- }
681
- };
682
- RADashboardArea.prototype.loadWidgetData = function (widget) {
683
- var _this = this;
684
- widget.dataTriggered = true;
685
- if (widget.widgetLoaded) {
686
- setTimeout(function () {
687
- widget.canLoadData = true;
688
- });
689
- }
690
- else
691
- setTimeout(function () {
692
- _this.loadWidgetData(widget);
693
- }, 1000);
694
- };
695
- RADashboardArea.prototype.dataLoaded = function () {
696
- for (var i = 0; i < this.widgetList.length; i++) {
697
- if (!this.widgetList[i].dataTriggered) {
698
- this.loadWidgetData(this.widgetList[i]);
699
- break;
700
- }
701
- }
702
- };
703
609
  /** To set Area(Gridster) height dynamically as widgets are added/removed */
704
610
  RADashboardArea.prototype.setAreaHeight = function () {
705
611
  var _this = this;
@@ -896,11 +802,8 @@ var RADashboardArea = /** @class */ (function () {
896
802
  });
897
803
  return widgetListArray;
898
804
  };
899
- RADashboardArea.prototype.buttonClick = function () {
900
- if (this.emptyDashboardButtonAction == "widgets")
901
- this.raDashboardEventBus.publish(RAEvent.AddNewWidgetToDashboard, null);
902
- else if (this.emptyDashboardButtonAction == "filter")
903
- this.raDashboardEventBus.publish(RAEvent.GlobalFilterClick, null);
805
+ RADashboardArea.prototype.addNewWidget = function () {
806
+ this.raDashboardEventBus.publish(RAEvent.AddNewWidgetToDashboard, null);
904
807
  };
905
808
  RADashboardArea.prototype.updateAppliedFilters = function (data) {
906
809
  this.raDashboardEventBus.publish(RAEvent.UpdateAppledFiterForInapplicableFilter, data);
@@ -950,14 +853,6 @@ var RADashboardArea = /** @class */ (function () {
950
853
  Input('app-config'),
951
854
  __metadata("design:type", Object)
952
855
  ], RADashboardArea.prototype, "appConfig", void 0);
953
- __decorate([
954
- Input('dashboard-info'),
955
- __metadata("design:type", Object)
956
- ], RADashboardArea.prototype, "dashboardInfo", void 0);
957
- __decorate([
958
- Input(),
959
- __metadata("design:type", Object)
960
- ], RADashboardArea.prototype, "templateConfig", void 0);
961
856
  __decorate([
962
857
  Output(),
963
858
  __metadata("design:type", Object)
@@ -969,8 +864,8 @@ var RADashboardArea = /** @class */ (function () {
969
864
  RADashboardArea = __decorate([
970
865
  Component({
971
866
  selector: 'ra-dashboard-area',
972
- template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\" [ngStyle]=\"{'height': userWidgets.length > 0 ? (gridheight + 'px') : 'unset'}\">\r\n <!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\" *ngIf=\"userWidgets.length > 0\">\r\n <gridster-item [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container (widgetLoaded)=\"widgetLoaded(item)\" (dataLoaded)=\"dataLoaded()\" [canLoadData]=\"item.canLoadData\" [bulk-action-data]=\"bulkActionData\" [dashboard-info]=\"dashboardInfo\" [app-config]=\"appConfig\" [event-bus]=\"raDashboardEventBus\"\r\n (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\" [global-filter]=\"globalFilter\"\r\n [grid-cell-height]=\"gridcellHeight\" *ngIf=\"gridcellHeight && gridcellHeight > 0\" [widget-width]=\"item.cols\"\r\n [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\" [dom-resized]=\"domResized\"\r\n (updateAppliedFilters)=\"updateAppliedFilters($event)\">\r\n </ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n\r\n <div class=\"empty-padding kiosk-hide\" *ngIf=\"showEmptyDashboard\">\r\n <div class=\"empty-wrapper\">\r\n <div></div>\r\n <div class=\"empty-prefix\">\r\n <!-- <i class=\"fal fa-edit edit-icon\"></i> -->\r\n <span>{{emptyDashboardTitle}}</span>\r\n </div>\r\n <hr class=\"horizontalLine-solid\" />\r\n <div class=\"empty-content light\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n {{emptyDashboardMsg1}} <br />\r\n {{emptyDashboardMsg2}}\r\n </div>\r\n <button *ngIf=\"isWidgetMgmnt\" class=\"btn btnLib btn-sm dashboard-button light\" (click)=\"buttonClick()\">\r\n <i class=\"{{emptyDashboardButtonIcon}}\"></i>{{emptyDashboardButtonText}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>",
973
- styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#fff;overflow-y:hidden!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;-moz-user-select:text;user-select:text;box-shadow:none}gridster-item:hover{box-shadow:0 1px 10px rgba(0,0,0,.15)!important}@media screen and (max-width:685px){.gridster-mobile{height:auto!important;margin-bottom:50px!important}}@media screen and (max-width:350px){.gridster-mobile{min-height:330px!important;margin-bottom:0!important}}.empty-padding{padding:15px 0;background-color:#fff;display:flex}.empty-wrapper{background-color:#fff;border:1px solid #9fa0a4;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:18px;padding:15px}.empty-content{color:#626469;width:100%;padding:15px}.empty-msg{padding:0 0 15px;font-size:16px}.horizontalLine-solid{border-top:1px solid #cbcbcb;margin:0 15px}.dashboard-button{padding:5px 10px 5px 5px!important}.btnLib{background-color:#ededed;color:#333!important}.btn-group-sm>.btn,.btn-sm{padding:5px 20px 5px 5px}.edit-icon{color:#32ad3c;font-size:24px;margin-right:15px}.empty-title{margin-top:10px}@media screen and (max-width:600px){.empty-padding{padding:15px 0;background-color:#fff;width:100%;display:block}.empty-wrapper{display:flex;background-color:#fff;border:1px solid #9fa0a4;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:16px;display:flex;height:40px;padding:15px}.empty-content{color:#333;display:flex;padding:15px}.empty-msg{padding:0 0 15px;font-size:14px}.edit-icon{color:#32ad3c;font-size:20px;margin-right:6px}.empty-title{margin-top:6px}}"]
867
+ template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\" [ngStyle]=\"{'height': userWidgets.length > 0 ? (gridheight + 'px') : 'unset'}\">\r\n <!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\" *ngIf=\"userWidgets.length > 0\">\r\n <gridster-item [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container [app-config]=\"appConfig\" [event-bus]=\"raDashboardEventBus\"\r\n (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\" [global-filter]=\"globalFilter\"\r\n [grid-cell-height]=\"gridcellHeight\" *ngIf=\"gridcellHeight && gridcellHeight > 0\" [widget-width]=\"item.cols\"\r\n [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\" [dom-resized]=\"domResized\"\r\n (updateAppliedFilters)=\"updateAppliedFilters($event)\">\r\n </ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n\r\n <div class=\"empty-padding kiosk-hide\" *ngIf=\"showEmptyDashboard\">\r\n <div class=\"empty-wrapper\">\r\n <div></div>\r\n <div class=\"m-1 empty-prefix\">\r\n <i class=\"fal fa-edit edit-icon\"></i>\r\n <span class=\"empty-title\">{{'dashboard.emptydashboard'|translate}}</span>\r\n </div>\r\n <div class=\"empty-content light\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n {{'dashboard.emptydashboardmessage'|translate}} <br />\r\n {{'dashboard.emptydashboardmessage2'|translate}}\r\n </div>\r\n <button *ngIf=\"isWidgetMgmnt\" class=\"btn btnLib btn-sm m-1 dashboard-button light\" (click)=\"addNewWidget()\">\r\n <i class=\"fal fa-plus m-1\"></i>{{'dashboard.addawidgets'|translate}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>",
868
+ styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#ededed;overflow-y:hidden!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;-moz-user-select:text;user-select:text;box-shadow:0 1px 10px rgba(0,0,0,.05)}gridster-item:hover{box-shadow:0 1px 10px rgba(0,0,0,.15)}@media screen and (max-width:685px){.gridster-mobile{height:auto!important;margin-bottom:50px!important}}@media screen and (max-width:350px){.gridster-mobile{min-height:330px!important;margin-bottom:0!important}}.empty-padding{padding:40px 20px 20px;background-color:#ededed;display:flex;justify-content:center;align-content:center}.empty-wrapper{display:flex;background-color:#fff;border-radius:8px;min-height:125px;width:72%}.empty-prefix{color:#32ad3c;font-size:18px;display:flex;align-items:center;padding:10px 30px;min-width:-webkit-max-content;min-width:max-content;min-width:-moz-max-content}.empty-content{color:#333;border-left:1px solid #a9afb1;width:100%;display:flex;align-items:center;padding:15px 30px 10px 40px}.empty-msg{padding:0 0 5px;font-size:16px}.dashboard-button{padding:5px 10px 5px 5px!important}.btnLib{background-color:#ededed;color:#333!important}.btn-group-sm>.btn,.btn-sm{padding:5px 20px 5px 5px}.edit-icon{color:#32ad3c;font-size:24px;margin-right:15px}.empty-title{margin-top:10px}@media screen and (max-width:600px){.empty-padding{padding:10px;background-color:#ededed;width:100%;display:block}.empty-wrapper{display:flex;background-color:#fff;border-radius:8px;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:16px;display:flex;height:40px;padding:6px 10px 8px}.empty-content{color:#333;display:flex;padding:5px 10px 10px;margin-top:44px;margin-left:-185px;border-left:none}.empty-msg{padding:12px 10px 10px 5px;font-size:14px;border-top:1px solid #a9afb1}.edit-icon{color:#32ad3c;font-size:20px;margin-right:6px}.empty-title{margin-top:6px}}"]
974
869
  }),
975
870
  __metadata("design:paramtypes", [RaDashboardService,
976
871
  NgZone,
@@ -1073,11 +968,8 @@ var RAWidgetContainer = /** @class */ (function () {
1073
968
  this.showExcell = true;
1074
969
  this.hideTitle = false;
1075
970
  this.inapplicableFilters = [];
1076
- this.canLoadData = false;
1077
971
  this.widgetDeleted = new EventEmitter();
1078
972
  this.updateAppliedFilters = new EventEmitter();
1079
- this.dataLoaded = new EventEmitter();
1080
- this.widgetLoaded = new EventEmitter();
1081
973
  this.isWidgetStateApplicable = false;
1082
974
  this.widgetEmptyState = '';
1083
975
  this.lockVisible = false;
@@ -1102,7 +994,7 @@ var RAWidgetContainer = /** @class */ (function () {
1102
994
  configurable: true
1103
995
  });
1104
996
  RAWidgetContainer.prototype.ngOnInit = function () {
1105
- this.WidgetDisplayName = this.translateService.translate('Common.' + this.data.widgetInfo.widgetTitle, true);
997
+ this.WidgetDisplayName = this.getwidgetTitleTranslation(this.data.widgetInfo.widgetTitle);
1106
998
  this.lockIconTitle = this.translateService.translate('Common.lockedfields');
1107
999
  this.lockIconFooter = this.translateService.translate('Common.lockedfieldseditinfo');
1108
1000
  this.inapplicableIconTitle = this.translateService.translate('Common.InapplicableFilters');
@@ -1123,32 +1015,19 @@ var RAWidgetContainer = /** @class */ (function () {
1123
1015
  });
1124
1016
  });
1125
1017
  }
1126
- if (this.widgetElement) {
1127
- if (changes.bulkActionData && changes.bulkActionData.currentValue != changes.bulkActionData.previousValue) {
1128
- if (typeof this.widgetElement.bulkActionClicked === "function") {
1129
- this.widgetElement.bulkActionClicked(this.bulkActionData);
1130
- }
1018
+ if (this.widgetElement && changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
1019
+ var filterObj = this.getParsedConfig(this.globalFilter);
1020
+ if (filterObj.WidgetInstanceId) {
1021
+ if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
1022
+ this.refreshWidget(this.data.widgetInfo);
1131
1023
  }
1132
- if (changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
1133
- if (!this.dashboardInfo.curatedFilters) {
1134
- var filterObj = this.getParsedConfig(this.globalFilter);
1135
- if (filterObj.WidgetInstanceId) {
1136
- if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
1137
- this.refreshWidget(this.data.widgetInfo);
1138
- }
1139
- else {
1140
- //this.refreshWidget(this.data.widgetInfo);
1141
- }
1142
- }
1143
- }
1144
- if (changes.width && changes.width.currentValue != changes.width.previousValue ||
1145
- (changes.height && changes.height.currentValue != changes.height.previousValue)) {
1146
- this.invokeWidgetResizedEvent();
1024
+ else {
1025
+ this.refreshWidget(this.data.widgetInfo);
1147
1026
  }
1148
1027
  }
1149
- if (changes.canLoadData && changes.canLoadData.currentValue != changes.canLoadData.previousValue) {
1150
- if (this.canLoadData)
1151
- this.refreshWidget(this.data.widgetInfo);
1028
+ if (changes.width && changes.width.currentValue != changes.width.previousValue ||
1029
+ (changes.height && changes.height.currentValue != changes.height.previousValue)) {
1030
+ this.invokeWidgetResizedEvent();
1152
1031
  }
1153
1032
  };
1154
1033
  RAWidgetContainer.prototype.invokeWidgetResizedEvent = function () {
@@ -1340,10 +1219,6 @@ var RAWidgetContainer = /** @class */ (function () {
1340
1219
  _this.showPanel = true;
1341
1220
  else
1342
1221
  _this.showPanel = false;
1343
- if (!_this.data.dataLoaded) {
1344
- _this.data.dataLoaded = true;
1345
- _this.dataLoaded.emit();
1346
- }
1347
1222
  break;
1348
1223
  case 'onConfigEditClicked':
1349
1224
  _this.editWidget();
@@ -1416,9 +1291,7 @@ var RAWidgetContainer = /** @class */ (function () {
1416
1291
  widgetConfigFilter.configChanges = this.getConfigChanges(false);
1417
1292
  widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
1418
1293
  widgetConfigFilter.globalFilter = this.globalFilter;
1419
- widgetConfigFilter.dashboardInfo = me.dashboardInfo;
1420
- // this.widgetElement.loadContent(widgetConfigFilter);
1421
- this.widgetLoaded.emit();
1294
+ this.widgetElement.loadContent(widgetConfigFilter);
1422
1295
  return [4 /*yield*/, this.setLock(widgetConfigFilter.config)];
1423
1296
  case 1:
1424
1297
  _a.sent();
@@ -1688,12 +1561,9 @@ var RAWidgetContainer = /** @class */ (function () {
1688
1561
  var html = '<div id="ra-db-widget-menu"' + 'style="' + style + '" class="download-content dropdown-content widget-config-item dropdown-click" style="z-index: 1002;">';
1689
1562
  var settings = '';
1690
1563
  if (this.isWidgetMgmnt) {
1691
- if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideEdit)
1692
- settings += this.getHtmlForButton('wcEditWidget', 'fal fa-edit', this.editText);
1693
- if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideCopy)
1694
- settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
1695
- if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideMove)
1696
- settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
1564
+ settings += this.getHtmlForButton('wcEditWidget', 'fal fa-edit', this.editText);
1565
+ settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
1566
+ settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
1697
1567
  }
1698
1568
  var customPageParams = false;
1699
1569
  if (this.data.widgetInfo && this.data.widgetInfo.widgetSettings) {
@@ -1702,14 +1572,14 @@ var RAWidgetContainer = /** @class */ (function () {
1702
1572
  customPageParams = true;
1703
1573
  }
1704
1574
  }
1705
- if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideVisitPage && (this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
1575
+ if ((this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
1706
1576
  settings += '<a style="max-height: 30px;align-items: center;align-content: center; display: flex;" id="wcVisitWidget">';
1707
1577
  settings += '<i style="padding-left: 4px;font-size: 27px !important;" class="fal fa-angle-right"></i> ';
1708
1578
  settings += '<span style="padding-left: 11px;margin-top: 2px;" style="padding-left: 6px;">';
1709
1579
  settings += this.translateService.translate('Common.visitpage');
1710
1580
  settings += '</span></a>';
1711
1581
  }
1712
- if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideVisitPage && (this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
1582
+ if ((this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
1713
1583
  html += '<div style="color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;">';
1714
1584
  html += this.translateService.translate('Common.settings') + '</div>';
1715
1585
  html += settings;
@@ -1741,7 +1611,7 @@ var RAWidgetContainer = /** @class */ (function () {
1741
1611
  if (this.isDownloadIconVisible && this.isWidgetMgmnt && this.showExcell) {
1742
1612
  html += this.getHr();
1743
1613
  }
1744
- if (this.isWidgetMgmnt && !this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideDelete) {
1614
+ if (this.isWidgetMgmnt) {
1745
1615
  html += '<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>';
1746
1616
  html += this.deleteText;
1747
1617
  html += '</span></a>';
@@ -1822,6 +1692,17 @@ var RAWidgetContainer = /** @class */ (function () {
1822
1692
  if (this.currentComponent)
1823
1693
  this.popupInstance.removeMe(this.currentComponent);
1824
1694
  };
1695
+ RAWidgetContainer.prototype.getwidgetTitleTranslation = function (item) {
1696
+ var rKey = 'DBW_' + this.translateService.makeCode(item);
1697
+ var translatedString = '';
1698
+ translatedString = this.translateService.translate('Common.' + rKey);
1699
+ if (translatedString.toLowerCase() === rKey.toLowerCase()) {
1700
+ return item;
1701
+ }
1702
+ else {
1703
+ return translatedString;
1704
+ }
1705
+ };
1825
1706
  RAWidgetContainer.ctorParameters = function () { return [
1826
1707
  { type: RaDashboardService },
1827
1708
  { type: NgxUiLoaderService },
@@ -1864,10 +1745,6 @@ var RAWidgetContainer = /** @class */ (function () {
1864
1745
  Input('global-filter'),
1865
1746
  __metadata("design:type", Object)
1866
1747
  ], RAWidgetContainer.prototype, "globalFilter", void 0);
1867
- __decorate([
1868
- Input('dashboard-info'),
1869
- __metadata("design:type", Object)
1870
- ], RAWidgetContainer.prototype, "dashboardInfo", void 0);
1871
1748
  __decorate([
1872
1749
  Input('data'),
1873
1750
  __metadata("design:type", Object)
@@ -1892,14 +1769,6 @@ var RAWidgetContainer = /** @class */ (function () {
1892
1769
  Input('grid-cell-height'),
1893
1770
  __metadata("design:type", Number)
1894
1771
  ], RAWidgetContainer.prototype, "gridCellHeight", void 0);
1895
- __decorate([
1896
- Input('bulk-action-data'),
1897
- __metadata("design:type", Object)
1898
- ], RAWidgetContainer.prototype, "bulkActionData", void 0);
1899
- __decorate([
1900
- Input(),
1901
- __metadata("design:type", Boolean)
1902
- ], RAWidgetContainer.prototype, "canLoadData", void 0);
1903
1772
  __decorate([
1904
1773
  Output(),
1905
1774
  __metadata("design:type", Object)
@@ -1908,14 +1777,6 @@ var RAWidgetContainer = /** @class */ (function () {
1908
1777
  Output(),
1909
1778
  __metadata("design:type", Object)
1910
1779
  ], RAWidgetContainer.prototype, "updateAppliedFilters", void 0);
1911
- __decorate([
1912
- Output(),
1913
- __metadata("design:type", Object)
1914
- ], RAWidgetContainer.prototype, "dataLoaded", void 0);
1915
- __decorate([
1916
- Output(),
1917
- __metadata("design:type", Object)
1918
- ], RAWidgetContainer.prototype, "widgetLoaded", void 0);
1919
1780
  __decorate([
1920
1781
  Input('dom-resized'),
1921
1782
  __metadata("design:type", Boolean),
@@ -4914,13 +4775,11 @@ var RaBaseDashboardTemplate = /** @class */ (function () {
4914
4775
  function RaBaseDashboardTemplate(ngZone) {
4915
4776
  var _this = this;
4916
4777
  this.ngZone = ngZone;
4917
- this.initialize = function (eventBus, userDashboardId, appConfig, dashboardInfo, templateConfig) {
4778
+ this.initialize = function (eventBus, userDashboardId, appConfig) {
4918
4779
  _this.ngZone.run(function () {
4919
4780
  _this.userDashboardId = userDashboardId;
4920
4781
  _this.appConfig = appConfig;
4921
4782
  _this.raDashboardEventBus = eventBus;
4922
- _this.dashboardInfo = dashboardInfo;
4923
- _this.templateConfig = templateConfig;
4924
4783
  });
4925
4784
  _this.init();
4926
4785
  };