@schneideress/dashboardframework 0.0.272 → 0.0.273

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.
@@ -523,6 +523,9 @@ var RADashboardArea = /** @class */ (function () {
523
523
  };
524
524
  }
525
525
  };
526
+ RADashboardArea.prototype.widgetLoaded = function (widget) {
527
+ widget.canLoadData = true;
528
+ };
526
529
  /** To initiate eventbus subsctiptions */
527
530
  RADashboardArea.prototype.inititateEventBusSubscritions = function () {
528
531
  var _this = this;
@@ -636,7 +639,7 @@ var RADashboardArea = /** @class */ (function () {
636
639
  var _this = this;
637
640
  if (this.templateConfig && this.templateConfig.initialWidgetCount)
638
641
  this.initialWidgetCount = this.templateConfig.initialWidgetCount;
639
- if (location.href.indexOf('loadAllWidgets') > -1)
642
+ if (location.href.indexOf('/kiosk/') > -1)
640
643
  this.initialWidgetCount = 1000;
641
644
  this.currentLoadedIndex = 0;
642
645
  this.loading = false;
@@ -669,6 +672,7 @@ var RADashboardArea = /** @class */ (function () {
669
672
  });
670
673
  };
671
674
  RADashboardArea.prototype.loadWidgetsDelta = function () {
675
+ var _this = this;
672
676
  var _a;
673
677
  if (!this.loading) {
674
678
  this.loading = true;
@@ -676,7 +680,9 @@ var RADashboardArea = /** @class */ (function () {
676
680
  this.currentLoadedIndex += this.initialWidgetCount;
677
681
  (_a = this.widgetList).push.apply(_a, __spread(widgets));
678
682
  this.setAreaHeight();
679
- this.loading = false;
683
+ setTimeout(function () {
684
+ _this.loading = false;
685
+ });
680
686
  }
681
687
  };
682
688
  RADashboardArea.prototype.dataLoaded = function (widgetElement) {
@@ -985,7 +991,7 @@ var RADashboardArea = /** @class */ (function () {
985
991
  RADashboardArea = __decorate([
986
992
  Component({
987
993
  selector: 'ra-dashboard-area',
988
- template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\"\r\n [ngStyle]=\"{'height': userWidgets.length > 0 ? (gridheight + 'px') : 'unset'}\">\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 (dataLoaded)=\"dataLoaded($event)\"\r\n [bulk-action-data]=\"bulkActionData\" [dashboard-info]=\"dashboardInfo\" [app-config]=\"appConfig\"\r\n [event-bus]=\"raDashboardEventBus\" (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\"\r\n [global-filter]=\"globalFilter\" [grid-cell-height]=\"gridcellHeight\" *ngIf=\"gridcellHeight && gridcellHeight > 0\"\r\n [widget-width]=\"item.cols\" [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\"\r\n [dom-resized]=\"domResized\" (updateAppliedFilters)=\"updateAppliedFilters($event)\">\r\n </ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n\r\n <div class=\"empty-padding kiosk-hide\" *ngIf=\"showEmptyDashboard\">\r\n <div class=\"empty-wrapper\">\r\n <div></div>\r\n <div class=\"empty-prefix\">\r\n <!-- <i class=\"fal fa-edit edit-icon\"></i> -->\r\n <span>{{emptyDashboardTitle}}</span>\r\n </div>\r\n <hr class=\"horizontalLine-solid\" />\r\n <div class=\"empty-content light\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n {{emptyDashboardMsg1}} <br />\r\n {{emptyDashboardMsg2}}\r\n </div>\r\n <button *ngIf=\"isWidgetMgmnt\" class=\"btn btnLib btn-sm dashboard-button light\" (click)=\"buttonClick()\">\r\n <i class=\"{{emptyDashboardButtonIcon}}\"></i>{{emptyDashboardButtonText}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>\r\n<div #divBottom></div>",
994
+ template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\"\r\n [ngStyle]=\"{'height': userWidgets.length > 0 ? (gridheight + 'px') : 'unset'}\">\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 (widgetLoaded)=\"widgetLoaded(item)\" [canLoadData]=\"item.canLoadData\" (dataLoaded)=\"dataLoaded($event)\"\r\n [bulk-action-data]=\"bulkActionData\" [dashboard-info]=\"dashboardInfo\" [app-config]=\"appConfig\"\r\n [event-bus]=\"raDashboardEventBus\" (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\"\r\n [global-filter]=\"globalFilter\" [grid-cell-height]=\"gridcellHeight\" *ngIf=\"gridcellHeight && gridcellHeight > 0\"\r\n [widget-width]=\"item.cols\" [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\"\r\n [dom-resized]=\"domResized\" (updateAppliedFilters)=\"updateAppliedFilters($event)\">\r\n </ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n\r\n <div class=\"empty-padding kiosk-hide\" *ngIf=\"showEmptyDashboard\">\r\n <div class=\"empty-wrapper\">\r\n <div></div>\r\n <div class=\"empty-prefix\">\r\n <!-- <i class=\"fal fa-edit edit-icon\"></i> -->\r\n <span>{{emptyDashboardTitle}}</span>\r\n </div>\r\n <hr class=\"horizontalLine-solid\" />\r\n <div class=\"empty-content light\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n {{emptyDashboardMsg1}} <br />\r\n {{emptyDashboardMsg2}}\r\n </div>\r\n <button *ngIf=\"isWidgetMgmnt\" class=\"btn btnLib btn-sm dashboard-button light\" (click)=\"buttonClick()\">\r\n <i class=\"{{emptyDashboardButtonIcon}}\"></i>{{emptyDashboardButtonText}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>\r\n<div #divBottom></div>",
989
995
  styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#fff;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;user-select:text;box-shadow:none}gridster-item:hover{box-shadow:0 1px 10px rgba(0,0,0,.15)!important}@media screen and (max-width:685px){.gridster-mobile{height:auto!important;margin-bottom:50px!important}}@media screen and (max-width:350px){.gridster-mobile{min-height:330px!important;margin-bottom:0!important}}.empty-padding{padding:15px 0;background-color:#fff;display:flex}.empty-wrapper{background-color:#fff;border:1px solid #9fa0a4;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:18px;padding:15px}.empty-content{color:#626469;width:100%;padding:15px}.empty-msg{padding:0 0 15px;font-size:16px}.horizontalLine-solid{border-top:1px solid #cbcbcb;margin:0 15px}.dashboard-button{padding:5px 10px 5px 5px!important}.btnLib{background-color:#ededed;color:#333!important}.btn-group-sm>.btn,.btn-sm{padding:5px 20px 5px 5px}.edit-icon{color:#32ad3c;font-size:24px;margin-right:15px}.empty-title{margin-top:10px}@media screen and (max-width:600px){.empty-padding{padding:15px 0;background-color:#fff;width:100%;display:block}.empty-wrapper{display:flex;background-color:#fff;border:1px solid #9fa0a4;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:16px;display:flex;height:40px;padding:15px}.empty-content{color:#333;display:flex;padding:15px}.empty-msg{padding:0 0 15px;font-size:14px}.edit-icon{color:#32ad3c;font-size:20px;margin-right:6px}.empty-title{margin-top:6px}}"]
990
996
  }),
991
997
  __metadata("design:paramtypes", [RaDashboardService,
@@ -1089,6 +1095,7 @@ var RAWidgetContainer = /** @class */ (function () {
1089
1095
  this.showExcell = true;
1090
1096
  this.hideTitle = false;
1091
1097
  this.inapplicableFilters = [];
1098
+ this.canLoadData = false;
1092
1099
  this.widgetDeleted = new EventEmitter();
1093
1100
  this.updateAppliedFilters = new EventEmitter();
1094
1101
  this.dataLoaded = new EventEmitter();
@@ -1161,6 +1168,10 @@ var RAWidgetContainer = /** @class */ (function () {
1161
1168
  this.invokeWidgetResizedEvent();
1162
1169
  }
1163
1170
  }
1171
+ if (changes.canLoadData && changes.canLoadData.currentValue != changes.canLoadData.previousValue) {
1172
+ if (this.canLoadData)
1173
+ this.refreshWidget(this.data.widgetInfo);
1174
+ }
1164
1175
  };
1165
1176
  RAWidgetContainer.prototype.invokeWidgetResizedEvent = function () {
1166
1177
  if (this.widgetElement) {
@@ -1428,7 +1439,7 @@ var RAWidgetContainer = /** @class */ (function () {
1428
1439
  widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
1429
1440
  widgetConfigFilter.globalFilter = this.globalFilter;
1430
1441
  widgetConfigFilter.dashboardInfo = me.dashboardInfo;
1431
- this.widgetElement.loadContent(widgetConfigFilter);
1442
+ //this.widgetElement.loadContent(widgetConfigFilter);
1432
1443
  this.widgetLoaded.emit();
1433
1444
  return [4 /*yield*/, this.setLock(widgetConfigFilter.config)];
1434
1445
  case 1:
@@ -1907,6 +1918,10 @@ var RAWidgetContainer = /** @class */ (function () {
1907
1918
  Input('bulk-action-data'),
1908
1919
  __metadata("design:type", Object)
1909
1920
  ], RAWidgetContainer.prototype, "bulkActionData", void 0);
1921
+ __decorate([
1922
+ Input(),
1923
+ __metadata("design:type", Boolean)
1924
+ ], RAWidgetContainer.prototype, "canLoadData", void 0);
1910
1925
  __decorate([
1911
1926
  Output(),
1912
1927
  __metadata("design:type", Object)