@schneideress/dashboardframework 0.0.265 → 0.0.267
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.
- package/bundles/schneideress-dashboardframework.umd.js +49 -8
- package/bundles/schneideress-dashboardframework.umd.js.map +1 -1
- package/bundles/schneideress-dashboardframework.umd.min.js +1 -1
- package/bundles/schneideress-dashboardframework.umd.min.js.map +1 -1
- package/esm2015/lib/ra-dashboard-area/ra.dashboard.area.js +23 -2
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +28 -8
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +23 -2
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +28 -8
- package/fesm2015/schneideress-dashboardframework.js +49 -8
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +49 -8
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-dashboard-area/ra.dashboard.area.d.ts +3 -0
- package/lib/ra-widget-container/ra.widget.container.component.d.ts +4 -2
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -417,6 +417,7 @@ let RADashboardArea = class RADashboardArea {
|
|
|
417
417
|
this.domResized = false;
|
|
418
418
|
this.showEmptyDashboard = false;
|
|
419
419
|
this.isWidgetMgmnt = false;
|
|
420
|
+
this.initialWidgetCount = 10;
|
|
420
421
|
this.widgetHeight = 2;
|
|
421
422
|
this.widgetWidth = 4;
|
|
422
423
|
this.hideDashboardBanner = new EventEmitter();
|
|
@@ -635,8 +636,28 @@ let RADashboardArea = class RADashboardArea {
|
|
|
635
636
|
this.showEmptyDashboard = true;
|
|
636
637
|
this.raDashboardEventBus.publish(RAEvent.HideDashboardBanner, this.showEmptyDashboard);
|
|
637
638
|
}
|
|
639
|
+
if (this.widgetList) {
|
|
640
|
+
if (this.widgetList.length < this.initialWidgetCount) {
|
|
641
|
+
for (let i = 0; i < this.widgetList.length; i++)
|
|
642
|
+
this.loadWidgetData(this.widgetList[i]);
|
|
643
|
+
}
|
|
644
|
+
else
|
|
645
|
+
for (let i = 0; i < this.initialWidgetCount; i++)
|
|
646
|
+
this.loadWidgetData(this.widgetList[i]);
|
|
647
|
+
}
|
|
638
648
|
});
|
|
639
649
|
}
|
|
650
|
+
loadWidgetData(widget) {
|
|
651
|
+
widget.canLoadData = true;
|
|
652
|
+
}
|
|
653
|
+
dataLoaded() {
|
|
654
|
+
for (let i = this.initialWidgetCount; i < this.widgetList.length; i++) {
|
|
655
|
+
if (!this.widgetList[i].canLoadData) {
|
|
656
|
+
this.widgetList[i].canLoadData = true;
|
|
657
|
+
break;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
}
|
|
640
661
|
/** To set Area(Gridster) height dynamically as widgets are added/removed */
|
|
641
662
|
setAreaHeight() {
|
|
642
663
|
setTimeout(() => {
|
|
@@ -897,7 +918,7 @@ __decorate([
|
|
|
897
918
|
RADashboardArea = __decorate([
|
|
898
919
|
Component({
|
|
899
920
|
selector: 'ra-dashboard-area',
|
|
900
|
-
template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\" [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 [bulk-action-data]=\"bulkActionData\" [dashboard-info]=\"dashboardInfo\" [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 (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>",
|
|
921
|
+
template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\" [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()\" [canLoadData]=\"item.canLoadData\" [bulk-action-data]=\"bulkActionData\" [dashboard-info]=\"dashboardInfo\" [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 (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>",
|
|
901
922
|
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}}"]
|
|
902
923
|
}),
|
|
903
924
|
__metadata("design:paramtypes", [RaDashboardService,
|
|
@@ -996,8 +1017,10 @@ let RAWidgetContainer = class RAWidgetContainer {
|
|
|
996
1017
|
this.showExcell = true;
|
|
997
1018
|
this.hideTitle = false;
|
|
998
1019
|
this.inapplicableFilters = [];
|
|
1020
|
+
this.canLoadData = false;
|
|
999
1021
|
this.widgetDeleted = new EventEmitter();
|
|
1000
1022
|
this.updateAppliedFilters = new EventEmitter();
|
|
1023
|
+
this.dataLoaded = new EventEmitter();
|
|
1001
1024
|
this.isWidgetStateApplicable = false;
|
|
1002
1025
|
this.widgetEmptyState = '';
|
|
1003
1026
|
this.lockVisible = false;
|
|
@@ -1041,13 +1064,15 @@ let RAWidgetContainer = class RAWidgetContainer {
|
|
|
1041
1064
|
}
|
|
1042
1065
|
}
|
|
1043
1066
|
if (changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
if (
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1067
|
+
if (!this.dashboardInfo.curatedFilters) {
|
|
1068
|
+
let filterObj = this.getParsedConfig(this.globalFilter);
|
|
1069
|
+
if (filterObj.WidgetInstanceId) {
|
|
1070
|
+
if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
|
|
1071
|
+
this.refreshWidget(this.data.widgetInfo);
|
|
1072
|
+
}
|
|
1073
|
+
else {
|
|
1074
|
+
//this.refreshWidget(this.data.widgetInfo);
|
|
1075
|
+
}
|
|
1051
1076
|
}
|
|
1052
1077
|
}
|
|
1053
1078
|
if (changes.width && changes.width.currentValue != changes.width.previousValue ||
|
|
@@ -1055,6 +1080,10 @@ let RAWidgetContainer = class RAWidgetContainer {
|
|
|
1055
1080
|
this.invokeWidgetResizedEvent();
|
|
1056
1081
|
}
|
|
1057
1082
|
}
|
|
1083
|
+
if (changes.canLoadData && changes.width.currentValue != changes.width.previousValue) {
|
|
1084
|
+
if (this.canLoadData)
|
|
1085
|
+
this.refreshWidget(this.data.widgetInfo);
|
|
1086
|
+
}
|
|
1058
1087
|
}
|
|
1059
1088
|
invokeWidgetResizedEvent() {
|
|
1060
1089
|
if (this.widgetElement) {
|
|
@@ -1232,6 +1261,10 @@ let RAWidgetContainer = class RAWidgetContainer {
|
|
|
1232
1261
|
this.showPanel = true;
|
|
1233
1262
|
else
|
|
1234
1263
|
this.showPanel = false;
|
|
1264
|
+
if (!this.data.dataLoaded) {
|
|
1265
|
+
this.data.dataLoaded = true;
|
|
1266
|
+
this.dataLoaded.emit();
|
|
1267
|
+
}
|
|
1235
1268
|
break;
|
|
1236
1269
|
case 'onConfigEditClicked':
|
|
1237
1270
|
this.editWidget();
|
|
@@ -1746,6 +1779,10 @@ __decorate([
|
|
|
1746
1779
|
Input('bulk-action-data'),
|
|
1747
1780
|
__metadata("design:type", Object)
|
|
1748
1781
|
], RAWidgetContainer.prototype, "bulkActionData", void 0);
|
|
1782
|
+
__decorate([
|
|
1783
|
+
Input(),
|
|
1784
|
+
__metadata("design:type", Boolean)
|
|
1785
|
+
], RAWidgetContainer.prototype, "canLoadData", void 0);
|
|
1749
1786
|
__decorate([
|
|
1750
1787
|
Output(),
|
|
1751
1788
|
__metadata("design:type", Object)
|
|
@@ -1754,6 +1791,10 @@ __decorate([
|
|
|
1754
1791
|
Output(),
|
|
1755
1792
|
__metadata("design:type", Object)
|
|
1756
1793
|
], RAWidgetContainer.prototype, "updateAppliedFilters", void 0);
|
|
1794
|
+
__decorate([
|
|
1795
|
+
Output(),
|
|
1796
|
+
__metadata("design:type", Object)
|
|
1797
|
+
], RAWidgetContainer.prototype, "dataLoaded", void 0);
|
|
1757
1798
|
__decorate([
|
|
1758
1799
|
Input('dom-resized'),
|
|
1759
1800
|
__metadata("design:type", Boolean),
|