@schneideress/dashboardframework 0.0.269 → 0.0.271

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 (34) hide show
  1. package/bundles/schneideress-dashboardframework.umd.js +54 -197
  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 +20 -100
  8. package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +31 -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 +2 -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 +20 -107
  17. package/esm5/lib/ra-widget-container/ra.widget.container.component.js +31 -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 +2 -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 +54 -190
  24. package/fesm2015/schneideress-dashboardframework.js.map +1 -1
  25. package/fesm5/schneideress-dashboardframework.js +54 -197
  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.dashboard.service.d.ts +1 -0
  32. package/lib/ra.event.enum.d.ts +1 -7
  33. package/package.json +1 -1
  34. package/schneideress-dashboardframework.metadata.json +1 -1
@@ -17,6 +17,7 @@ var RaDashboardService = /** @class */ (function (_super) {
17
17
  function RaDashboardService(injector) {
18
18
  var _this = _super.call(this, injector, '') || this;
19
19
  _this.loadedScripts = [];
20
+ _this.clientId = undefined;
20
21
  return _this;
21
22
  }
22
23
  /*
@@ -69,12 +70,6 @@ var RaDashboardService = /** @class */ (function (_super) {
69
70
  /**To Update widgetInfo in database */
70
71
  RaDashboardService.prototype.updateWidget = function (widgetInfo, appConfig) {
71
72
  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
73
  return this.post('widget/UpdateUserWidget', widgetInfo);
79
74
  };
80
75
  /** To Move or change position if current widget container*/
@@ -190,12 +185,6 @@ var RAEvent;
190
185
  RAEvent["UpdateAppledFiterForInapplicableFilter"] = "UpdateAppledFiterForInapplicableFilter";
191
186
  /**show inapplicable filter message in global filter flyout */
192
187
  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
188
  })(RAEvent || (RAEvent = {}));
200
189
  var RAEventKey;
201
190
  (function (RAEventKey) {
@@ -209,9 +198,9 @@ var GridsterConfigDefaultSettings = {
209
198
  margin: 10,
210
199
  outerMargin: true,
211
200
  outerMarginTop: 10,
212
- outerMarginRight: 0,
201
+ outerMarginRight: 10,
213
202
  outerMarginBottom: 30,
214
- outerMarginLeft: 0,
203
+ outerMarginLeft: 10,
215
204
  useTransformPositioning: true,
216
205
  mobileBreakpoint: 640,
217
206
  minCols: 10,
@@ -326,7 +315,7 @@ var RADashboardResponsiveService = /** @class */ (function () {
326
315
  enumerable: true,
327
316
  configurable: true
328
317
  });
329
- RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt, resize, canMove) {
318
+ RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt) {
330
319
  var config = GridsterConfigDefaultSettings;
331
320
  config.minCols = this.currentResInfo.maxCols;
332
321
  config.maxCols = this.currentResInfo.maxCols;
@@ -348,13 +337,6 @@ var RADashboardResponsiveService = /** @class */ (function () {
348
337
  config.swap = true;
349
338
  config.draggable.enabled = true;
350
339
  }
351
- if (!resize) {
352
- config.resizable.enabled = false;
353
- config.swap = false;
354
- }
355
- if (!canMove) {
356
- config.draggable.enabled = false;
357
- }
358
340
  return config;
359
341
  };
360
342
  /**To map IwidgetInfo object to gridsterItem */
@@ -362,9 +344,6 @@ var RADashboardResponsiveService = /** @class */ (function () {
362
344
  if (widget.widgetSettings) {
363
345
  widget.settings = JSON.parse(widget.widgetSettings);
364
346
  }
365
- if (widget.templateSettings) {
366
- widget.templateWidgetSettings = JSON.parse(widget.templateSettings);
367
- }
368
347
  var gridsterItem = {
369
348
  cols: this.getWidth(widget.width),
370
349
  rows: this.getHeight(widget.height),
@@ -432,7 +411,6 @@ var RADashboardArea = /** @class */ (function () {
432
411
  this.domResized = false;
433
412
  this.showEmptyDashboard = false;
434
413
  this.isWidgetMgmnt = false;
435
- this.initialWidgetCount = 10;
436
414
  this.widgetHeight = 2;
437
415
  this.widgetWidth = 4;
438
416
  this.hideDashboardBanner = new EventEmitter();
@@ -441,7 +419,6 @@ var RADashboardArea = /** @class */ (function () {
441
419
  var _this = this;
442
420
  this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
443
421
  this.initiateGridsterConfig();
444
- this.setEmptyDashboardConfig();
445
422
  this.lastViewType = this.responsiveService.IsDesktopView ? 'desktop' : 'mobile';
446
423
  this.responsiveService.resized.subscribe(function (isDesktop) {
447
424
  if (_this.lastViewType != (isDesktop ? 'desktop' : 'mobile') || !isDesktop) {
@@ -470,11 +447,6 @@ var RADashboardArea = /** @class */ (function () {
470
447
  }, 100);
471
448
  }
472
449
  });
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
450
  };
479
451
  RADashboardArea.prototype.ngOnChanges = function (changes) {
480
452
  this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
@@ -482,41 +454,28 @@ var RADashboardArea = /** @class */ (function () {
482
454
  this.isWidgetLoaded = true;
483
455
  this.loadWidgets(this.userDashboardId, this.areaKey);
484
456
  }
485
- this.initiateGridsterConfig();
486
457
  if (changes.raDashboardEventBus && changes.raDashboardEventBus.currentValue != changes.raDashboardEventBus.previousValue) {
487
458
  this.inititateEventBusSubscritions();
488
459
  }
489
460
  };
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
461
  /**To set GridsterConfig */
501
462
  RADashboardArea.prototype.initiateGridsterConfig = function () {
502
463
  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
- }
464
+ /**To override default configuration values to the gridster control */
465
+ this.options = this.responsiveService.getGridsterConfig(this.isWidgetMgmnt);
466
+ this.options.initCallback = function (gridster) {
467
+ if (_this.options.api) {
468
+ _this.gridcellHeight = _this.options.api.getCurrentRowHeight();
469
+ }
470
+ };
471
+ this.options.itemChangeCallback = function (item) {
472
+ if (_this.responsiveService.IsDesktopView) {
473
+ if (item.widgetInfo && item.widgetInfo.widgetInstanceId) {
474
+ _this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
516
475
  }
517
- _this.setAreaHeight();
518
- };
519
- }
476
+ }
477
+ _this.setAreaHeight();
478
+ };
520
479
  };
521
480
  /** To initiate eventbus subsctiptions */
522
481
  RADashboardArea.prototype.inititateEventBusSubscritions = function () {
@@ -536,11 +495,6 @@ var RADashboardArea = /** @class */ (function () {
536
495
  _this.addWidget(e);
537
496
  });
538
497
  });
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
498
  this.rearrangeWidgetClick = this.raDashboardEventBus.subscribe(RAEvent.RearrangeClicked).subscribe(function (e) {
545
499
  _this.ngZone.run(function () {
546
500
  _this.rearrangeWidgets();
@@ -589,10 +543,6 @@ var RADashboardArea = /** @class */ (function () {
589
543
  this.widgetLibraryDoneClick.unsubscribe();
590
544
  if (this.rearrangeWidgetClick)
591
545
  this.rearrangeWidgetClick.unsubscribe();
592
- if (this.curatedFilterChange)
593
- this.curatedFilterChange.unsubscribe();
594
- if (this.bulkActionClick)
595
- this.bulkActionClick.unsubscribe();
596
546
  };
597
547
  /**To update position/dimention of all widgets in the area */
598
548
  RADashboardArea.prototype.updateWidgets = function () {
@@ -629,8 +579,6 @@ var RADashboardArea = /** @class */ (function () {
629
579
  /** To retrieve widgets based on userDashboardid and area name */
630
580
  RADashboardArea.prototype.loadWidgets = function (userDashboarId, areaKey) {
631
581
  var _this = this;
632
- if (this.templateConfig && this.templateConfig.initialWidgetCount)
633
- this.initialWidgetCount = this.templateConfig.initialWidgetCount;
634
582
  var widgetInfo = {
635
583
  dashboardId: userDashboarId.toString(),
636
584
  dashboardAreaKey: areaKey
@@ -638,6 +586,7 @@ var RADashboardArea = /** @class */ (function () {
638
586
  this.widgetList = [];
639
587
  this.dashboardService.getWidgetsByDashboardArea(widgetInfo, this.appConfig).subscribe(function (widgets) {
640
588
  _this.userWidgets = widgets;
589
+ _this.dashboardService.clientId = widgets[0].clientId;
641
590
  _this.PAMWidgets = [];
642
591
  widgets.forEach(function (element) {
643
592
  var settings = undefined;
@@ -659,52 +608,6 @@ var RADashboardArea = /** @class */ (function () {
659
608
  }
660
609
  });
661
610
  };
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
- if (widget.dataTriggered) {
671
- this.loadWidgetData(widget);
672
- }
673
- };
674
- RADashboardArea.prototype.startLoadWidgetData = function (lst) {
675
- if (lst) {
676
- if (lst.length < this.initialWidgetCount) {
677
- for (var i = 0; i < lst.length; i++)
678
- this.loadWidgetData(lst[i]);
679
- }
680
- else
681
- for (var i = 0; i < this.initialWidgetCount; i++)
682
- this.loadWidgetData(lst[i]);
683
- }
684
- };
685
- RADashboardArea.prototype.loadWidgetData = function (widget) {
686
- widget.dataTriggered = true;
687
- if (widget.widgetLoaded) {
688
- widget.canLoadData = true;
689
- }
690
- };
691
- RADashboardArea.prototype.dataLoaded = function () {
692
- var _this = this;
693
- var _loop_1 = function (i) {
694
- if (!this_1.widgetList[i].dataTriggered) {
695
- setTimeout(function () {
696
- _this.loadWidgetData(_this.widgetList[i]);
697
- });
698
- return "break";
699
- }
700
- };
701
- var this_1 = this;
702
- for (var i = 0; i < this.widgetList.length; i++) {
703
- var state_1 = _loop_1(i);
704
- if (state_1 === "break")
705
- break;
706
- }
707
- };
708
611
  /** To set Area(Gridster) height dynamically as widgets are added/removed */
709
612
  RADashboardArea.prototype.setAreaHeight = function () {
710
613
  var _this = this;
@@ -901,11 +804,8 @@ var RADashboardArea = /** @class */ (function () {
901
804
  });
902
805
  return widgetListArray;
903
806
  };
904
- RADashboardArea.prototype.buttonClick = function () {
905
- if (this.emptyDashboardButtonAction == "widgets")
906
- this.raDashboardEventBus.publish(RAEvent.AddNewWidgetToDashboard, null);
907
- else if (this.emptyDashboardButtonAction == "filter")
908
- this.raDashboardEventBus.publish(RAEvent.GlobalFilterClick, null);
807
+ RADashboardArea.prototype.addNewWidget = function () {
808
+ this.raDashboardEventBus.publish(RAEvent.AddNewWidgetToDashboard, null);
909
809
  };
910
810
  RADashboardArea.prototype.updateAppliedFilters = function (data) {
911
811
  this.raDashboardEventBus.publish(RAEvent.UpdateAppledFiterForInapplicableFilter, data);
@@ -955,14 +855,6 @@ var RADashboardArea = /** @class */ (function () {
955
855
  Input('app-config'),
956
856
  __metadata("design:type", Object)
957
857
  ], RADashboardArea.prototype, "appConfig", void 0);
958
- __decorate([
959
- Input('dashboard-info'),
960
- __metadata("design:type", Object)
961
- ], RADashboardArea.prototype, "dashboardInfo", void 0);
962
- __decorate([
963
- Input(),
964
- __metadata("design:type", Object)
965
- ], RADashboardArea.prototype, "templateConfig", void 0);
966
858
  __decorate([
967
859
  Output(),
968
860
  __metadata("design:type", Object)
@@ -974,8 +866,8 @@ var RADashboardArea = /** @class */ (function () {
974
866
  RADashboardArea = __decorate([
975
867
  Component({
976
868
  selector: 'ra-dashboard-area',
977
- 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>",
978
- 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}}"]
869
+ 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>",
870
+ 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}}"]
979
871
  }),
980
872
  __metadata("design:paramtypes", [RaDashboardService,
981
873
  NgZone,
@@ -1078,11 +970,8 @@ var RAWidgetContainer = /** @class */ (function () {
1078
970
  this.showExcell = true;
1079
971
  this.hideTitle = false;
1080
972
  this.inapplicableFilters = [];
1081
- this.canLoadData = false;
1082
973
  this.widgetDeleted = new EventEmitter();
1083
974
  this.updateAppliedFilters = new EventEmitter();
1084
- this.dataLoaded = new EventEmitter();
1085
- this.widgetLoaded = new EventEmitter();
1086
975
  this.isWidgetStateApplicable = false;
1087
976
  this.widgetEmptyState = '';
1088
977
  this.lockVisible = false;
@@ -1107,7 +996,7 @@ var RAWidgetContainer = /** @class */ (function () {
1107
996
  configurable: true
1108
997
  });
1109
998
  RAWidgetContainer.prototype.ngOnInit = function () {
1110
- this.WidgetDisplayName = this.translateService.translate('Common.' + this.data.widgetInfo.widgetTitle, true);
999
+ this.WidgetDisplayName = this.getwidgetTitleTranslation(this.data.widgetInfo.widgetTitle);
1111
1000
  this.lockIconTitle = this.translateService.translate('Common.lockedfields');
1112
1001
  this.lockIconFooter = this.translateService.translate('Common.lockedfieldseditinfo');
1113
1002
  this.inapplicableIconTitle = this.translateService.translate('Common.InapplicableFilters');
@@ -1128,32 +1017,19 @@ var RAWidgetContainer = /** @class */ (function () {
1128
1017
  });
1129
1018
  });
1130
1019
  }
1131
- if (this.widgetElement) {
1132
- if (changes.bulkActionData && changes.bulkActionData.currentValue != changes.bulkActionData.previousValue) {
1133
- if (typeof this.widgetElement.bulkActionClicked === "function") {
1134
- this.widgetElement.bulkActionClicked(this.bulkActionData);
1135
- }
1136
- }
1137
- if (changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
1138
- if (!this.dashboardInfo.curatedFilters) {
1139
- var filterObj = this.getParsedConfig(this.globalFilter);
1140
- if (filterObj.WidgetInstanceId) {
1141
- if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
1142
- this.refreshWidget(this.data.widgetInfo);
1143
- }
1144
- else {
1145
- //this.refreshWidget(this.data.widgetInfo);
1146
- }
1147
- }
1020
+ if (this.widgetElement && changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
1021
+ var filterObj = this.getParsedConfig(this.globalFilter);
1022
+ if (filterObj.WidgetInstanceId) {
1023
+ if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
1024
+ this.refreshWidget(this.data.widgetInfo);
1148
1025
  }
1149
- if (changes.width && changes.width.currentValue != changes.width.previousValue ||
1150
- (changes.height && changes.height.currentValue != changes.height.previousValue)) {
1151
- this.invokeWidgetResizedEvent();
1026
+ else {
1027
+ this.refreshWidget(this.data.widgetInfo);
1152
1028
  }
1153
1029
  }
1154
- if (changes.canLoadData && changes.canLoadData.currentValue != changes.canLoadData.previousValue) {
1155
- if (this.canLoadData)
1156
- this.refreshWidget(this.data.widgetInfo);
1030
+ if (changes.width && changes.width.currentValue != changes.width.previousValue ||
1031
+ (changes.height && changes.height.currentValue != changes.height.previousValue)) {
1032
+ this.invokeWidgetResizedEvent();
1157
1033
  }
1158
1034
  };
1159
1035
  RAWidgetContainer.prototype.invokeWidgetResizedEvent = function () {
@@ -1345,10 +1221,6 @@ var RAWidgetContainer = /** @class */ (function () {
1345
1221
  _this.showPanel = true;
1346
1222
  else
1347
1223
  _this.showPanel = false;
1348
- if (!_this.data.dataLoaded) {
1349
- _this.data.dataLoaded = true;
1350
- _this.dataLoaded.emit();
1351
- }
1352
1224
  break;
1353
1225
  case 'onConfigEditClicked':
1354
1226
  _this.editWidget();
@@ -1421,9 +1293,7 @@ var RAWidgetContainer = /** @class */ (function () {
1421
1293
  widgetConfigFilter.configChanges = this.getConfigChanges(false);
1422
1294
  widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
1423
1295
  widgetConfigFilter.globalFilter = this.globalFilter;
1424
- widgetConfigFilter.dashboardInfo = me.dashboardInfo;
1425
- // this.widgetElement.loadContent(widgetConfigFilter);
1426
- this.widgetLoaded.emit();
1296
+ this.widgetElement.loadContent(widgetConfigFilter);
1427
1297
  return [4 /*yield*/, this.setLock(widgetConfigFilter.config)];
1428
1298
  case 1:
1429
1299
  _a.sent();
@@ -1693,12 +1563,9 @@ var RAWidgetContainer = /** @class */ (function () {
1693
1563
  var html = '<div id="ra-db-widget-menu"' + 'style="' + style + '" class="download-content dropdown-content widget-config-item dropdown-click" style="z-index: 1002;">';
1694
1564
  var settings = '';
1695
1565
  if (this.isWidgetMgmnt) {
1696
- if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideEdit)
1697
- settings += this.getHtmlForButton('wcEditWidget', 'fal fa-edit', this.editText);
1698
- if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideCopy)
1699
- settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
1700
- if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideMove)
1701
- settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
1566
+ settings += this.getHtmlForButton('wcEditWidget', 'fal fa-edit', this.editText);
1567
+ settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
1568
+ settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
1702
1569
  }
1703
1570
  var customPageParams = false;
1704
1571
  if (this.data.widgetInfo && this.data.widgetInfo.widgetSettings) {
@@ -1707,14 +1574,14 @@ var RAWidgetContainer = /** @class */ (function () {
1707
1574
  customPageParams = true;
1708
1575
  }
1709
1576
  }
1710
- if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideVisitPage && (this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
1577
+ if ((this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
1711
1578
  settings += '<a style="max-height: 30px;align-items: center;align-content: center; display: flex;" id="wcVisitWidget">';
1712
1579
  settings += '<i style="padding-left: 4px;font-size: 27px !important;" class="fal fa-angle-right"></i> ';
1713
1580
  settings += '<span style="padding-left: 11px;margin-top: 2px;" style="padding-left: 6px;">';
1714
1581
  settings += this.translateService.translate('Common.visitpage');
1715
1582
  settings += '</span></a>';
1716
1583
  }
1717
- if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideVisitPage && (this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
1584
+ if ((this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
1718
1585
  html += '<div style="color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;">';
1719
1586
  html += this.translateService.translate('Common.settings') + '</div>';
1720
1587
  html += settings;
@@ -1746,7 +1613,7 @@ var RAWidgetContainer = /** @class */ (function () {
1746
1613
  if (this.isDownloadIconVisible && this.isWidgetMgmnt && this.showExcell) {
1747
1614
  html += this.getHr();
1748
1615
  }
1749
- if (this.isWidgetMgmnt && !this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideDelete) {
1616
+ if (this.isWidgetMgmnt) {
1750
1617
  html += '<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>';
1751
1618
  html += this.deleteText;
1752
1619
  html += '</span></a>';
@@ -1827,6 +1694,18 @@ var RAWidgetContainer = /** @class */ (function () {
1827
1694
  if (this.currentComponent)
1828
1695
  this.popupInstance.removeMe(this.currentComponent);
1829
1696
  };
1697
+ RAWidgetContainer.prototype.getwidgetTitleTranslation = function (item) {
1698
+ var rKey = 'DBW_' + this.translateService.makeCode(item);
1699
+ var translatedString = '';
1700
+ var translationModule = this.dashboardService.clientId + '_DBW';
1701
+ translatedString = this.translateService.translate(translationModule + '.' + rKey);
1702
+ if (translatedString.toLowerCase() === rKey.toLowerCase()) {
1703
+ return item;
1704
+ }
1705
+ else {
1706
+ return translatedString;
1707
+ }
1708
+ };
1830
1709
  RAWidgetContainer.ctorParameters = function () { return [
1831
1710
  { type: RaDashboardService },
1832
1711
  { type: NgxUiLoaderService },
@@ -1869,10 +1748,6 @@ var RAWidgetContainer = /** @class */ (function () {
1869
1748
  Input('global-filter'),
1870
1749
  __metadata("design:type", Object)
1871
1750
  ], RAWidgetContainer.prototype, "globalFilter", void 0);
1872
- __decorate([
1873
- Input('dashboard-info'),
1874
- __metadata("design:type", Object)
1875
- ], RAWidgetContainer.prototype, "dashboardInfo", void 0);
1876
1751
  __decorate([
1877
1752
  Input('data'),
1878
1753
  __metadata("design:type", Object)
@@ -1897,14 +1772,6 @@ var RAWidgetContainer = /** @class */ (function () {
1897
1772
  Input('grid-cell-height'),
1898
1773
  __metadata("design:type", Number)
1899
1774
  ], RAWidgetContainer.prototype, "gridCellHeight", void 0);
1900
- __decorate([
1901
- Input('bulk-action-data'),
1902
- __metadata("design:type", Object)
1903
- ], RAWidgetContainer.prototype, "bulkActionData", void 0);
1904
- __decorate([
1905
- Input(),
1906
- __metadata("design:type", Boolean)
1907
- ], RAWidgetContainer.prototype, "canLoadData", void 0);
1908
1775
  __decorate([
1909
1776
  Output(),
1910
1777
  __metadata("design:type", Object)
@@ -1913,14 +1780,6 @@ var RAWidgetContainer = /** @class */ (function () {
1913
1780
  Output(),
1914
1781
  __metadata("design:type", Object)
1915
1782
  ], RAWidgetContainer.prototype, "updateAppliedFilters", void 0);
1916
- __decorate([
1917
- Output(),
1918
- __metadata("design:type", Object)
1919
- ], RAWidgetContainer.prototype, "dataLoaded", void 0);
1920
- __decorate([
1921
- Output(),
1922
- __metadata("design:type", Object)
1923
- ], RAWidgetContainer.prototype, "widgetLoaded", void 0);
1924
1783
  __decorate([
1925
1784
  Input('dom-resized'),
1926
1785
  __metadata("design:type", Boolean),
@@ -4919,13 +4778,11 @@ var RaBaseDashboardTemplate = /** @class */ (function () {
4919
4778
  function RaBaseDashboardTemplate(ngZone) {
4920
4779
  var _this = this;
4921
4780
  this.ngZone = ngZone;
4922
- this.initialize = function (eventBus, userDashboardId, appConfig, dashboardInfo, templateConfig) {
4781
+ this.initialize = function (eventBus, userDashboardId, appConfig) {
4923
4782
  _this.ngZone.run(function () {
4924
4783
  _this.userDashboardId = userDashboardId;
4925
4784
  _this.appConfig = appConfig;
4926
4785
  _this.raDashboardEventBus = eventBus;
4927
- _this.dashboardInfo = dashboardInfo;
4928
- _this.templateConfig = templateConfig;
4929
4786
  });
4930
4787
  _this.init();
4931
4788
  };