@schneideress/dashboardframework 0.0.99 → 0.0.100

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.
@@ -887,6 +887,7 @@
887
887
  this.widgetList = Array();
888
888
  this.gridheight = 300;
889
889
  this.isWidgetLoaded = false;
890
+ this.domResized = false;
890
891
  this.widgetHeight = 3;
891
892
  this.widgetWidth = 5;
892
893
  }
@@ -906,6 +907,7 @@
906
907
  */
907
908
  function () {
908
909
  areaContext.setAreaHeight();
910
+ areaContext.domResized = !areaContext.domResized;
909
911
  }), 1000);
910
912
  };
911
913
  /**
@@ -934,12 +936,28 @@
934
936
  this.inititateEventBusSubscritions();
935
937
  }
936
938
  };
939
+ // public invokeResizeEvent() {
940
+ // this.widgetContainers.forEach(function(container,i){
941
+ // container.invokeWidgetResizedEvent();
942
+ // });
943
+ // }
937
944
  /**To set GridsterConfig */
945
+ // public invokeResizeEvent() {
946
+ // this.widgetContainers.forEach(function(container,i){
947
+ // container.invokeWidgetResizedEvent();
948
+ // });
949
+ // }
938
950
  /**
939
951
  * To set GridsterConfig
940
952
  * @return {?}
941
953
  */
942
- RADashboardArea.prototype.initiateGridsterConfig = /**
954
+ RADashboardArea.prototype.initiateGridsterConfig =
955
+ // public invokeResizeEvent() {
956
+ // this.widgetContainers.forEach(function(container,i){
957
+ // container.invokeWidgetResizedEvent();
958
+ // });
959
+ // }
960
+ /**
943
961
  * To set GridsterConfig
944
962
  * @return {?}
945
963
  */
@@ -1186,7 +1204,7 @@
1186
1204
  areaHeight = 600;
1187
1205
  }
1188
1206
  this.gridheight = areaHeight;
1189
- console.log('area height adjusted');
1207
+ console.log('area height adjusted1');
1190
1208
  };
1191
1209
  /** To remove a widget instance from dashboard and to save info in database */
1192
1210
  /**
@@ -1384,7 +1402,7 @@
1384
1402
  RADashboardArea.decorators = [
1385
1403
  { type: core.Component, args: [{
1386
1404
  selector: 'ra-dashboard-area',
1387
- 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]=\"item.widgetInfo.rowHeight\" [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",
1405
+ 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]=\"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",
1388
1406
  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)}"]
1389
1407
  }] }
1390
1408
  ];
@@ -1442,6 +1460,8 @@
1442
1460
  */
1443
1461
  RADashboardArea.prototype.isWidgetLoaded;
1444
1462
  /** @type {?} */
1463
+ RADashboardArea.prototype.domResized;
1464
+ /** @type {?} */
1445
1465
  RADashboardArea.prototype.userDashboardId;
1446
1466
  /** @type {?} */
1447
1467
  RADashboardArea.prototype.areaKey;
@@ -1529,6 +1549,17 @@
1529
1549
  }
1530
1550
  }));
1531
1551
  }
1552
+ Object.defineProperty(RAWidgetContainer.prototype, "setResized", {
1553
+ set: /**
1554
+ * @param {?} resized
1555
+ * @return {?}
1556
+ */
1557
+ function (resized) {
1558
+ this.invokeWidgetResizedEvent();
1559
+ },
1560
+ enumerable: true,
1561
+ configurable: true
1562
+ });
1532
1563
  /**
1533
1564
  * @param {?} changes
1534
1565
  * @return {?}
@@ -1558,14 +1589,23 @@
1558
1589
  }
1559
1590
  if (changes.width && changes.width.currentValue != changes.width.previousValue ||
1560
1591
  (changes.height && changes.height.currentValue != changes.height.previousValue)) {
1561
- if (this.widgetElement) {
1562
- /** @type {?} */
1563
- var size = {};
1564
- size.height = this.height;
1565
- size.width = this.width;
1566
- size.cellHeight = this.gridCellHeight;
1567
- this.widgetElement.widgetResized(size);
1568
- }
1592
+ this.invokeWidgetResizedEvent();
1593
+ }
1594
+ };
1595
+ /**
1596
+ * @return {?}
1597
+ */
1598
+ RAWidgetContainer.prototype.invokeWidgetResizedEvent = /**
1599
+ * @return {?}
1600
+ */
1601
+ function () {
1602
+ if (this.widgetElement) {
1603
+ /** @type {?} */
1604
+ var size = {};
1605
+ size.height = this.height;
1606
+ size.width = this.width;
1607
+ size.cellHeight = this.gridCellHeight;
1608
+ this.widgetElement.widgetResized(size);
1569
1609
  }
1570
1610
  };
1571
1611
  /**
@@ -1992,7 +2032,8 @@
1992
2032
  width: [{ type: core.Input, args: ['widget-width',] }],
1993
2033
  height: [{ type: core.Input, args: ['widget-height',] }],
1994
2034
  gridCellHeight: [{ type: core.Input, args: ['grid-cell-height',] }],
1995
- widgetDeleted: [{ type: core.Output }]
2035
+ widgetDeleted: [{ type: core.Output }],
2036
+ setResized: [{ type: core.Input, args: ['dom-resized',] }]
1996
2037
  };
1997
2038
  return RAWidgetContainer;
1998
2039
  }());
@@ -2067,6 +2108,8 @@
2067
2108
  RAWidgetContainer.prototype.widgetDeleted;
2068
2109
  /** @type {?} */
2069
2110
  RAWidgetContainer.prototype.lockTitle;
2111
+ /** @type {?} */
2112
+ RAWidgetContainer.prototype.domResized;
2070
2113
  /**
2071
2114
  * @type {?}
2072
2115
  * @private