@schneideress/dashboardframework 0.0.263 → 0.0.264

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.
@@ -404,6 +404,8 @@
404
404
  /** Bulk Action Clicked */
405
405
  RAEvent["BulkActionClick"] = "BulkActionClick";
406
406
  /** Global Filter Clicked */
407
+ /** When user change the curated filter(eg:data streams), system will create/delete widgets */
408
+ RAEvent["CuratedFilterChange"] = "CuratedFilterChange";
407
409
  RAEvent["GlobalFilterClick"] = "GlobalFilterClick";
408
410
  })(exports.RAEvent || (exports.RAEvent = {}));
409
411
 
@@ -679,7 +681,7 @@
679
681
  }
680
682
  });
681
683
  setTimeout(function () {
682
- _this.raDashboardEventBus.subscribe(exports.RAEvent.BulkActionClick).subscribe(function (data) {
684
+ _this.bulkActionClick = _this.raDashboardEventBus.subscribe(exports.RAEvent.BulkActionClick).subscribe(function (data) {
683
685
  _this.bulkActionData = JSON.parse(JSON.stringify(data)); // To create a new reference;
684
686
  });
685
687
  });
@@ -744,6 +746,11 @@
744
746
  _this.addWidget(e);
745
747
  });
746
748
  });
749
+ this.curatedFilterChange = this.raDashboardEventBus.subscribe(exports.RAEvent.CuratedFilterChange).subscribe(function (e) {
750
+ _this.ngZone.run(function () {
751
+ _this.addRemoveWidgets(e);
752
+ });
753
+ });
747
754
  this.rearrangeWidgetClick = this.raDashboardEventBus.subscribe(exports.RAEvent.RearrangeClicked).subscribe(function (e) {
748
755
  _this.ngZone.run(function () {
749
756
  _this.rearrangeWidgets();
@@ -792,6 +799,10 @@
792
799
  this.widgetLibraryDoneClick.unsubscribe();
793
800
  if (this.rearrangeWidgetClick)
794
801
  this.rearrangeWidgetClick.unsubscribe();
802
+ if (this.curatedFilterChange)
803
+ this.curatedFilterChange.unsubscribe();
804
+ if (this.bulkActionClick)
805
+ this.bulkActionClick.unsubscribe();
795
806
  };
796
807
  /**To update position/dimention of all widgets in the area */
797
808
  RADashboardArea.prototype.updateWidgets = function () {
@@ -940,6 +951,9 @@
940
951
  _this.setAreaHeight();
941
952
  });
942
953
  };
954
+ //to add widgets into gridster when there is a change in curated filter
955
+ RADashboardArea.prototype.addRemoveWidgets = function (data) {
956
+ };
943
957
  /**To add widget instance to the database with the next available position and to make changes in
944
958
  * dashboard area.
945
959
  */