@schneideress/dashboardframework 0.0.9 → 0.0.10

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.
@@ -370,6 +370,8 @@ var RAEvent = {
370
370
  LoadDashboard: "LoadDashboard",
371
371
  /** triggers when user clicks on copywidget */
372
372
  CopyWidget: "CopyWidget",
373
+ /**triggers when user clicks on Move widget */
374
+ MoveWidget: "MoveWidget",
373
375
  };
374
376
  /** @enum {string} */
375
377
  var RAEventKey = {
@@ -914,16 +916,16 @@ var RAWidgetContainer = /** @class */ (function () {
914
916
  /** To Move or change position if current widget container*/
915
917
  /**
916
918
  * To Move or change position if current widget container
917
- * @param {?} widgetInfo
918
919
  * @return {?}
919
920
  */
920
921
  RAWidgetContainer.prototype.moveWidget = /**
921
922
  * To Move or change position if current widget container
922
- * @param {?} widgetInfo
923
923
  * @return {?}
924
924
  */
925
- function (widgetInfo) {
926
- this.dashboardService.moveWidget(widgetInfo);
925
+ function () {
926
+ console.log('in move widget');
927
+ this.raDashboardEventBus.publish(RAEvent.MoveWidget, this.data.widgetInfo);
928
+ // this.dashboardService.moveWidget(widgetInfo);
927
929
  };
928
930
  /** To Copy Current widget with same configuration*/
929
931
  /**
@@ -938,20 +940,6 @@ var RAWidgetContainer = /** @class */ (function () {
938
940
  this.raDashboardEventBus.publish(RAEvent.CopyWidget, this.data.widgetInfo);
939
941
  //this.dashboardService.copyWidget(widgetInfo);
940
942
  };
941
- /** To Collapse current widget*/
942
- /**
943
- * To Collapse current widget
944
- * @param {?} widgetInfo
945
- * @return {?}
946
- */
947
- RAWidgetContainer.prototype.collapse = /**
948
- * To Collapse current widget
949
- * @param {?} widgetInfo
950
- * @return {?}
951
- */
952
- function (widgetInfo) {
953
- this.dashboardService.collapse(widgetInfo);
954
- };
955
943
  /**
956
944
  * @param {?} config
957
945
  * @return {?}
@@ -1009,7 +997,13 @@ var RAWidgetContainer = /** @class */ (function () {
1009
997
  widgetConfigFilter.appConfig = _this.appConfig;
1010
998
  widgetConfigFilter.widgetInfo = (/** @type {?} */ ({}));
1011
999
  widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
1012
- widgetContainer.widgetElement.loadContent(widgetConfigFilter, _this.appConfig);
1000
+ widgetContainer.widgetElement.loadContent(widgetConfigFilter);
1001
+ widgetContainer.widgetElement.addEventListener('load-data-initiated', (/**
1002
+ * @param {?} hidePanel
1003
+ * @return {?}
1004
+ */
1005
+ function (hidePanel) {
1006
+ }));
1013
1007
  }), 2000);
1014
1008
  }));
1015
1009
  };
@@ -1028,14 +1022,15 @@ var RAWidgetContainer = /** @class */ (function () {
1028
1022
  /** @type {?} */
1029
1023
  var widgetConfigFilter = (/** @type {?} */ ({
1030
1024
  config: widgetInfo.widgetConfigInfo.config,
1031
- globalFilter: this.globalFilter
1025
+ globalFilter: this.globalFilter,
1026
+ appConfig: this.appConfig
1032
1027
  }));
1033
- this.widgetElement.loadContent(widgetConfigFilter, this.appConfig);
1028
+ this.widgetElement.loadContent(widgetConfigFilter);
1034
1029
  };
1035
1030
  RAWidgetContainer.decorators = [
1036
1031
  { type: Component, args: [{
1037
1032
  selector: 'ra-widget-container',
1038
- template: "<div class=\"wc-wrapper\">\r\n <div class=\"wcheader\">\r\n <div class=\"col-md-12 wc-mover\">\r\n <div class=\"row\">\r\n <div class=\"col-md-11 float-left\" style=\"width:96%;\">{{data.widgetInfo.title?data.widgetInfo.title:\"Title\"}}\r\n </div>\r\n <div class=\"col-md-1\">\r\n <div class=\"float-right\">\r\n <div class=\"dropdown\">\r\n <div class=\"dropbtn\"> <i class=\"fal fa-cog\"></i></div>\r\n <div class=\"dropdown-content\">\r\n <a (click)=\"editWidget()\">Edit</a>\r\n <a (click)=\"copyWidget()\">Copy</a>\r\n <a (click)=\"moveWidget(data)\">Move</a> \r\n <hr class=\"hr\">\r\n <a (click)=\"deleteWidget()\">Delete</a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"wcBody\">\r\n <div class=\"wcBodyBorder\" #ctlWidget></div>\r\n </div>\r\n</div>\r\n",
1033
+ template: "<div class=\"wc-wrapper\">\r\n <div class=\"wcheader\">\r\n <div class=\"col-md-12 wc-mover\">\r\n <div class=\"row\">\r\n <div class=\"col-md-11 float-left\" style=\"width:96%;\">{{data.widgetInfo.title?data.widgetInfo.title:\"Title\"}}\r\n </div>\r\n <div class=\"col-md-1\">\r\n <div class=\"float-right\">\r\n <div class=\"dropdown\">\r\n <div class=\"dropbtn\"> <i class=\"fal fa-cog\"></i></div>\r\n <div class=\"dropdown-content\">\r\n <a (click)=\"editWidget()\">Edit</a>\r\n <a (click)=\"copyWidget()\">Copy</a>\r\n <a (click)=\"moveWidget()\">Move</a> \r\n <hr class=\"hr\">\r\n <a (click)=\"deleteWidget()\">Delete</a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"wcBody\">\r\n <div class=\"wcBodyBorder\" #ctlWidget></div>\r\n </div>\r\n</div>\r\n",
1039
1034
  styles: [".wcheader{width:100%;height:26px;background:#fff;color:#3dcd58;padding:7px 7px 0 6px;font-family:\"Arial Rounded MT\";border-bottom:1px solid;border-color:#fff;font-size:16px}.wc-mover{cursor:all-scroll}.wcBody{padding:8px}.wcBodyBorder{border:1px dashed #e6e2e2}.sp_icon{float:left;margin:0 15% 0 0}.dropbtn{cursor:pointer;color:#42b4e6}.dropdown{display:none;position:relative}.dropdown hr{margin:0!important}.dropdown-content{display:none;position:absolute;right:0;background-color:#f9f9f9;min-width:100px;box-shadow:0 8px 16px 8px rgba(0,0,0,.2);z-index:1;font-size:12px;font-family:\"Arial Rounded MT\"}.dropdown-content a{color:#000;padding:5px 16px;text-decoration:none;display:block;cursor:pointer}.dropdown-content a:hover{background-color:#f1f1f1}.dropdown:hover .dropdown-content,.wc-wrapper:hover .dropdown{display:block}.dropdown:hover .dropbtn{color:#2b7797}.hr{border:0;border-top:1px solid rgba(0,0,0,.1)}"]
1040
1035
  }] }
1041
1036
  ];