@schneideress/dashboardframework 0.0.192 → 0.0.194

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.
@@ -398,7 +398,7 @@ var RAEvent = {
398
398
  UpdateGlobalFilterFromMapWidget: "UpdateGlobalFilterFromMapWidget",
399
399
  /**To add widget on empty dashboard */
400
400
  AddWidgetEmptyDashboard: "AddWidgetEmptyDashboard",
401
- /**To raise widget added event */
401
+ /**To raise new widget add click event */
402
402
  AddNewWidgetToDashboard: "AddNewWidgetToDashboard",
403
403
  };
404
404
  /** @enum {string} */
@@ -728,8 +728,10 @@ 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;
734
+ this.hasWidgets = false;
733
735
  this.widgetHeight = 2;
734
736
  this.widgetWidth = 4;
735
737
  }
@@ -1065,6 +1067,7 @@ var RADashboardArea = /** @class */ (function () {
1065
1067
  function (widgets) {
1066
1068
  _this.userWidgets = widgets;
1067
1069
  if (widgets && widgets.length > 0) {
1070
+ _this.hasWidgets = true;
1068
1071
  _this.widgetList = _this.mapObjectListToGridsterItemList(widgets);
1069
1072
  _this.setAreaHeight();
1070
1073
  }
@@ -1145,6 +1148,7 @@ var RADashboardArea = /** @class */ (function () {
1145
1148
  */
1146
1149
  function (widgetInstanceId, isalertDisabled) {
1147
1150
  if (isalertDisabled === void 0) { isalertDisabled = false; }
1151
+ this.hasWidgets = this.widgetList && this.widgetList.length > 0 ? true : false;
1148
1152
  /** @type {?} */
1149
1153
  var gridsterItem = this.widgetList.filter((/**
1150
1154
  * @param {?} item
@@ -1393,8 +1397,8 @@ var RADashboardArea = /** @class */ (function () {
1393
1397
  RADashboardArea.decorators = [
1394
1398
  { type: Component, args: [{
1395
1399
  selector: 'ra-dashboard-area',
1396
- 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
- 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}}"]
1400
+ template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\" [style.height.px]=\"userWidgets.length > 0 ? (hasWidgets ? 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;\">{{'emptydashboard'|translate}}</span>\r\n </div>\r\n <div class=\"empty-content light\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n {{'emptydashboardmessage'|translate}}\r\n </div>\r\n <button class=\"btn btnLib btn-sm m-1 dashboard-button light\" (click)=\"addNewWidget()\">\r\n <i class=\"fal fa-plus m-1\"></i>{{'addawidgets'|translate}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>",
1401
+ 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;color:#333}.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}}"]
1398
1402
  }] }
1399
1403
  ];
1400
1404
  /** @nocollapse */
@@ -1427,10 +1431,7 @@ if (false) {
1427
1431
  RADashboardArea.prototype.gridheight;
1428
1432
  /** @type {?} */
1429
1433
  RADashboardArea.prototype.gridcellHeight;
1430
- /**
1431
- * @type {?}
1432
- * @private
1433
- */
1434
+ /** @type {?} */
1434
1435
  RADashboardArea.prototype.userWidgets;
1435
1436
  /**
1436
1437
  * @type {?}
@@ -1465,6 +1466,8 @@ if (false) {
1465
1466
  /** @type {?} */
1466
1467
  RADashboardArea.prototype.domResized;
1467
1468
  /** @type {?} */
1469
+ RADashboardArea.prototype.hasWidgets;
1470
+ /** @type {?} */
1468
1471
  RADashboardArea.prototype.userDashboardId;
1469
1472
  /** @type {?} */
1470
1473
  RADashboardArea.prototype.areaKey;