@schneideress/dashboardframework 0.0.191 → 0.0.193

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.
@@ -728,6 +728,7 @@ var RADashboardArea = /** @class */ (function () {
728
728
  this.widgetList = Array();
729
729
  this.gridheight = 300;
730
730
  this.gridcellHeight = 0;
731
+ this.userWidgets = [];
731
732
  this.isWidgetLoaded = false;
732
733
  this.domResized = false;
733
734
  this.widgetHeight = 2;
@@ -1081,49 +1082,54 @@ var RADashboardArea = /** @class */ (function () {
1081
1082
  */
1082
1083
  function () {
1083
1084
  var _this = this;
1084
- /** @type {?} */
1085
- var isMobile = false;
1086
- if (this.options.mobileBreakpoint > this.gridWrapper.nativeElement.clientWidth) {
1087
- isMobile = true;
1088
- }
1089
- /** @type {?} */
1090
- var areaScrollHeight = 0;
1091
- /** @type {?} */
1092
- var areaHeight = 0;
1093
- /** @type {?} */
1094
- var curRowHeight = 0;
1095
- if (this.options.api) {
1096
- curRowHeight = this.options.api.getCurrentRowHeight();
1097
- }
1098
- this.widgetList.forEach((/**
1099
- * @param {?} t
1085
+ setTimeout((/**
1100
1086
  * @return {?}
1101
1087
  */
1102
- function (t) {
1088
+ function () {
1089
+ /** @type {?} */
1090
+ var isMobile = false;
1091
+ if (_this.options.mobileBreakpoint > _this.gridWrapper.nativeElement.clientWidth) {
1092
+ isMobile = true;
1093
+ }
1094
+ /** @type {?} */
1095
+ var areaScrollHeight = 0;
1096
+ /** @type {?} */
1097
+ var areaHeight = 0;
1098
+ /** @type {?} */
1099
+ var curRowHeight = 0;
1100
+ if (_this.options.api) {
1101
+ curRowHeight = _this.options.api.getCurrentRowHeight();
1102
+ }
1103
+ _this.widgetList.forEach((/**
1104
+ * @param {?} t
1105
+ * @return {?}
1106
+ */
1107
+ function (t) {
1108
+ /** @type {?} */
1109
+ var currentHeight = t.y + t.rows;
1110
+ if (currentHeight > areaScrollHeight) {
1111
+ areaScrollHeight = currentHeight;
1112
+ }
1113
+ if (curRowHeight == 0) {
1114
+ currentHeight = _this.widgetList[0].curRowHeight;
1115
+ }
1116
+ t.widgetInfo.rowHeight = curRowHeight;
1117
+ }));
1118
+ _this.gridcellHeight = curRowHeight;
1119
+ if (_this.options.api) {
1120
+ areaHeight = areaScrollHeight * _this.options.api.getCurrentRowHeight() + 100;
1121
+ }
1103
1122
  /** @type {?} */
1104
- var currentHeight = t.y + t.rows;
1105
- if (currentHeight > areaScrollHeight) {
1106
- areaScrollHeight = currentHeight;
1123
+ var areaScrollHeightMob = 0;
1124
+ if (isMobile) {
1125
+ areaScrollHeightMob = _this.widgetList.length * 300 + 200;
1126
+ areaHeight = areaScrollHeightMob;
1107
1127
  }
1108
- if (curRowHeight == 0) {
1109
- currentHeight = _this.widgetList[0].curRowHeight;
1128
+ if (areaHeight < 600) {
1129
+ areaHeight = 600;
1110
1130
  }
1111
- t.widgetInfo.rowHeight = curRowHeight;
1131
+ _this.gridheight = areaHeight;
1112
1132
  }));
1113
- this.gridcellHeight = curRowHeight;
1114
- if (this.options.api) {
1115
- areaHeight = areaScrollHeight * this.options.api.getCurrentRowHeight() + 100;
1116
- }
1117
- /** @type {?} */
1118
- var areaScrollHeightMob = 0;
1119
- if (isMobile) {
1120
- areaScrollHeightMob = this.widgetList.length * 300 + 200;
1121
- areaHeight = areaScrollHeightMob;
1122
- }
1123
- if (areaHeight < 600) {
1124
- areaHeight = 600;
1125
- }
1126
- this.gridheight = areaHeight;
1127
1133
  };
1128
1134
  /** To remove a widget instance from dashboard and to save info in database */
1129
1135
  /**
@@ -1388,7 +1394,7 @@ var RADashboardArea = /** @class */ (function () {
1388
1394
  RADashboardArea.decorators = [
1389
1395
  { type: Component, args: [{
1390
1396
  selector: 'ra-dashboard-area',
1391
- template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\" [style.height.px]=\"widgetList.length > 0 ? gridheight : ''\">\r\n <!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\" *ngIf=\"widgetList.length > 0\">\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\r\n <div class=\"empty-padding kiosk-hide\" *ngIf=\"widgetList.length <= 0\">\r\n <div class=\"empty-wrapper\">\r\n <div></div>\r\n <div class=\"m-1 empty-prefix\">\r\n <i class=\"fal fa-edit\" style=\"color:#32AD3C; font-size: 24px; margin-right: 15px;\"></i>\r\n <span style=\"margin-top: 10px;\">Empty Dashboard</span>\r\n </div>\r\n <div class=\"empty-content\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n This dashboard doesn\u2019t contain any widgets. <br />\r\n Widgets can be added via the Dashboard Menu in the upper left.\r\n </div>\r\n <button class=\"btn btnLib btn-sm m-1 dashboard-button\" (click)=\"addNewWidget()\">\r\n <i class=\"fal fa-plus m-1\"></i>Add a Widgets</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>",
1397
+ template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\" [style.height.px]=\"userWidgets.length > 0 ? gridheight : ''\">\r\n <!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\" *ngIf=\"userWidgets.length > 0\">\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\r\n <div class=\"empty-padding kiosk-hide\" *ngIf=\"userWidgets.length == 0\">\r\n <div class=\"empty-wrapper\">\r\n <div></div>\r\n <div class=\"m-1 empty-prefix\">\r\n <i class=\"fal fa-edit\" style=\"color:#32AD3C; font-size: 24px; margin-right: 15px;\"></i>\r\n <span style=\"margin-top: 10px;\">Empty Dashboard</span>\r\n </div>\r\n <div class=\"empty-content\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n This dashboard doesn\u2019t contain any widgets. <br />\r\n Widgets can be added via the Dashboard Menu in the upper left.\r\n </div>\r\n <button class=\"btn btnLib btn-sm m-1 dashboard-button\" (click)=\"addNewWidget()\">\r\n <i class=\"fal fa-plus m-1\"></i>Add a Widgets</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>",
1392
1398
  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)}@media screen and (max-width:685px){.gridster-mobile{height:auto!important}}.empty-padding{padding:40px 20px 20px;background-color:#ededed;display:flex;justify-content:center;align-content:center}.empty-wrapper{display:flex;background-color:#fff;border-radius:8px;min-height:125px;width:72%}.empty-prefix{color:#32ad3c;font-size:18px;display:flex;align-items:center;padding:10px 30px;min-width:-webkit-max-content;min-width:max-content;min-width:-moz-max-content}.empty-content{color:#333;border-left:1px solid #a9afb1;width:100%;display:flex;align-items:center;padding:15px 30px 10px 40px}.empty-msg{padding:0 0 5px;font-size:16px}.dashboard-button{padding:5px 10px 5px 5px!important}.btnLib{background-color:#ededed}.btn-group-sm>.btn,.btn-sm{padding:5px 20px 5px 5px}@media screen and (max-width:500px){.empty-padding{padding:20px;background-color:#ededed;width:480px;display:block}.empty-prefix{color:#32ad3c;font-size:18px;display:flex;height:39px;padding:6px 120px 10px 33px}.empty-content{color:#333;border-top:1px solid #a9afb1;display:flex;padding:10px 30px;margin-top:44px;margin-left:-366px;border-left:none}.empty-msg{padding:4px 4px 10px;font-size:16px}}"]
1393
1399
  }] }
1394
1400
  ];
@@ -1422,10 +1428,7 @@ if (false) {
1422
1428
  RADashboardArea.prototype.gridheight;
1423
1429
  /** @type {?} */
1424
1430
  RADashboardArea.prototype.gridcellHeight;
1425
- /**
1426
- * @type {?}
1427
- * @private
1428
- */
1431
+ /** @type {?} */
1429
1432
  RADashboardArea.prototype.userWidgets;
1430
1433
  /**
1431
1434
  * @type {?}