@schneideress/dashboardframework 0.0.189 → 0.0.191

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,6 +398,8 @@ var RAEvent = {
398
398
  UpdateGlobalFilterFromMapWidget: "UpdateGlobalFilterFromMapWidget",
399
399
  /**To add widget on empty dashboard */
400
400
  AddWidgetEmptyDashboard: "AddWidgetEmptyDashboard",
401
+ /**To raise widget added event */
402
+ AddNewWidgetToDashboard: "AddNewWidgetToDashboard",
401
403
  };
402
404
  /** @enum {string} */
403
405
  var RAEventKey = {
@@ -1374,11 +1376,20 @@ var RADashboardArea = /** @class */ (function () {
1374
1376
  }));
1375
1377
  return widgetListArray;
1376
1378
  };
1379
+ /**
1380
+ * @return {?}
1381
+ */
1382
+ RADashboardArea.prototype.addNewWidget = /**
1383
+ * @return {?}
1384
+ */
1385
+ function () {
1386
+ this.raDashboardEventBus.publish(RAEvent.AddNewWidgetToDashboard, null);
1387
+ };
1377
1388
  RADashboardArea.decorators = [
1378
1389
  { type: Component, args: [{
1379
1390
  selector: 'ra-dashboard-area',
1380
- template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\" [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",
1381
- 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}}"]
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>",
1392
+ 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}}"]
1382
1393
  }] }
1383
1394
  ];
1384
1395
  /** @nocollapse */
@@ -2394,14 +2405,14 @@ var RAWidgetContainer = /** @class */ (function () {
2394
2405
  html += this.getHtmlForButton('wcDownloadExcel', 'fal fa-download', this.excelText);
2395
2406
  html += '</div>';
2396
2407
  }
2397
- if (this.isDownloadIconVisible && this.isWidgetMgmnt) {
2398
- html += this.getHr();
2399
- }
2400
- if (this.isWidgetMgmnt) {
2401
- html += '<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>';
2402
- html += this.deleteText;
2403
- html += '</span></a>';
2404
- }
2408
+ }
2409
+ if (this.isDownloadIconVisible && this.isWidgetMgmnt) {
2410
+ html += this.getHr();
2411
+ }
2412
+ if (this.isWidgetMgmnt) {
2413
+ html += '<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>';
2414
+ html += this.deleteText;
2415
+ html += '</span></a>';
2405
2416
  }
2406
2417
  html += '</div>';
2407
2418
  return html;