@schneideress/dashboardframework 0.0.59 → 0.0.61

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.
@@ -576,6 +576,8 @@
576
576
  favoriteIconRefresh: "favoriteIconRefresh",
577
577
  /**to refresh menu content */
578
578
  QuickLinkRefresh: "QuickLinkRefresh",
579
+ /**To raise widget added event */
580
+ WidgetAdded: "WidgetAdded",
579
581
  };
580
582
  /** @enum {string} */
581
583
  var RAEventKey = {
@@ -850,7 +852,7 @@
850
852
  },
851
853
  swap: true,
852
854
  pushItems: true,
853
- disablePushOnDrag: true,
855
+ disablePushOnDrag: false,
854
856
  disablePushOnResize: false,
855
857
  pushDirections: { north: true, east: true, south: true, west: true },
856
858
  pushResizeItems: true,
@@ -859,6 +861,10 @@
859
861
  disableWarnings: false,
860
862
  scrollToNewItems: true,
861
863
  autoResizeonDrag: false,
864
+ setGridSize: true
865
+ //itemResizeCallback: (item) => this.itemResize(item),
866
+ //itemChangeCallback: (item) => this.itemCallBack(item),
867
+ //itemInitCallback: (item) => this.itemInitCallback(item)
862
868
  };
863
869
 
864
870
  /**
@@ -926,8 +932,6 @@
926
932
  areaContext.setAreaHeight();
927
933
  areaContext.updateWidgets();
928
934
  });
929
- console.log('gridster options are');
930
- console.log(this.options);
931
935
  };
932
936
  /** To initiate eventbus subsctiptions */
933
937
  /**
@@ -1232,6 +1236,7 @@
1232
1236
  function () {
1233
1237
  _this.updateWidgets();
1234
1238
  }), 1000);
1239
+ _this.raDashboardEventBus.publish(RAEvent.WidgetAdded, widget);
1235
1240
  }));
1236
1241
  };
1237
1242
  /** To add widget to current widget list ,invoked from copy widget window*/
@@ -1343,8 +1348,8 @@
1343
1348
  RADashboardArea.decorators = [
1344
1349
  { type: core.Component, args: [{
1345
1350
  selector: 'ra-dashboard-area',
1346
- template: "<div #gridWrapper class=\"wrap gridster\" [style.height.px]=\"gridheight\">\r\n<!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\">\r\n <gridster-item [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container [app-config]=\"appConfig\" [event-bus]=\"raDashboardEventBus\" (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\"\r\n [global-filter]=\"globalFilter\" [widget-width]=\"item.cols\" [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\"></ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n <notifier-container></notifier-container>\r\n</div>\r\n\r\n",
1347
- styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#fcfcfc}.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;-ms-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)}"]
1351
+ template: "<div #gridWrapper class=\"wrap gridster\" >\r\n<!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\">\r\n <gridster-item [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container [app-config]=\"appConfig\" [event-bus]=\"raDashboardEventBus\" (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\"\r\n [global-filter]=\"globalFilter\" [widget-width]=\"item.cols\" [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\"></ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n <notifier-container></notifier-container>\r\n</div>\r\n\r\n",
1352
+ styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#fcfcfc;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;-ms-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)}"]
1348
1353
  }] }
1349
1354
  ];
1350
1355
  /** @nocollapse */