@schneideress/dashboardframework 0.0.173 → 0.0.175

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.
@@ -424,16 +424,16 @@ var GridsterConfigDefaultSettings = {
424
424
  mobileBreakpoint: 640,
425
425
  minCols: 10,
426
426
  maxCols: 10,
427
- minRows: 2,
427
+ minRows: 1,
428
428
  maxRows: 100,
429
429
  maxItemCols: 10,
430
- minItemCols: 2,
430
+ minItemCols: 1,
431
431
  maxItemRows: 1000,
432
- minItemRows: 2,
432
+ minItemRows: 1,
433
433
  maxItemArea: 1000,
434
- minItemArea: 4,
435
- defaultItemCols: 2,
436
- defaultItemRows: 2,
434
+ minItemArea: 2,
435
+ defaultItemCols: 1,
436
+ defaultItemRows: 1,
437
437
  keepFixedHeightInMobile: false,
438
438
  keepFixedWidthInMobile: false,
439
439
  scrollSensitivity: 10,
@@ -766,6 +766,18 @@ var RADashboardArea = /** @class */ (function () {
766
766
  var _this = this;
767
767
  /**To override default configuration values to the gridster control */
768
768
  this.options = this.responsiveService.GridsterConfig;
769
+ this.options.initCallback = (/**
770
+ * @param {?} gridster
771
+ * @return {?}
772
+ */
773
+ function (gridster) {
774
+ console.log('grid inititalized');
775
+ console.log(_this.options.api);
776
+ if (_this.options.api) {
777
+ _this.gridcellHeight = _this.options.api.getCurrentRowHeight();
778
+ console.log('cell height is' + _this.gridcellHeight);
779
+ }
780
+ });
769
781
  this.options.itemChangeCallback = (/**
770
782
  * @param {?} item
771
783
  * @return {?}
@@ -1318,7 +1330,7 @@ var RADashboardArea = /** @class */ (function () {
1318
1330
  RADashboardArea.decorators = [
1319
1331
  { type: Component, args: [{
1320
1332
  selector: 'ra-dashboard-area',
1321
- 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\" [grid-cell-height]=\"(gridcellHeight > 0)?gridcellHeight:item.widgetInfo.rowHeight\" [widget-width]=\"item.cols\" [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\" [dom-resized]=\"domResized\"></ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n <notifier-container></notifier-container>\r\n</div>\r\n\r\n",
1333
+ 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\"\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 </ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n <notifier-container></notifier-container>\r\n</div>\r\n",
1322
1334
  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;-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)}"]
1323
1335
  }] }
1324
1336
  ];
@@ -1752,6 +1764,7 @@ var RAWidgetContainer = /** @class */ (function () {
1752
1764
  var widgetConfigFilter, widgetContainer;
1753
1765
  var _this = this;
1754
1766
  return __generator(this, function (_a) {
1767
+ widgetInfo.rowHeight = this.gridCellHeight;
1755
1768
  widgetConfigFilter = (/** @type {?} */ ({
1756
1769
  config: widgetInfo.widgetConfigInfo.config,
1757
1770
  globalFilter: this.globalFilter
@@ -1943,6 +1956,7 @@ var RAWidgetContainer = /** @class */ (function () {
1943
1956
  return __generator(this, function (_a) {
1944
1957
  switch (_a.label) {
1945
1958
  case 0:
1959
+ widgetInfo.rowHeight = this.gridCellHeight;
1946
1960
  this.setNotConfiguredState(widgetInfo);
1947
1961
  widgetContainerContext = this;
1948
1962
  widgetConfigFilter = (/** @type {?} */ ({