@schneideress/dashboardframework 0.0.262 → 0.0.264
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 +35 -5
- 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 +32 -6
- package/esm2015/lib/ra.event.enum.js +5 -1
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +32 -6
- package/esm5/lib/ra.event.enum.js +5 -1
- package/fesm2015/schneideress-dashboardframework.js +35 -5
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +35 -5
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-dashboard-area/ra.dashboard.area.d.ts +11 -1
- package/lib/ra.event.enum.d.ts +5 -1
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -403,6 +403,10 @@
|
|
|
403
403
|
RAEvent["ShowInapplicableFilterMessage"] = "ShowInapplicableFilterMessage";
|
|
404
404
|
/** Bulk Action Clicked */
|
|
405
405
|
RAEvent["BulkActionClick"] = "BulkActionClick";
|
|
406
|
+
/** Global Filter Clicked */
|
|
407
|
+
/** When user change the curated filter(eg:data streams), system will create/delete widgets */
|
|
408
|
+
RAEvent["CuratedFilterChange"] = "CuratedFilterChange";
|
|
409
|
+
RAEvent["GlobalFilterClick"] = "GlobalFilterClick";
|
|
406
410
|
})(exports.RAEvent || (exports.RAEvent = {}));
|
|
407
411
|
|
|
408
412
|
(function (RAEventKey) {
|
|
@@ -647,6 +651,7 @@
|
|
|
647
651
|
var _this = this;
|
|
648
652
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
649
653
|
this.initiateGridsterConfig();
|
|
654
|
+
this.setEmptyDashboardConfig();
|
|
650
655
|
this.lastViewType = this.responsiveService.IsDesktopView ? 'desktop' : 'mobile';
|
|
651
656
|
this.responsiveService.resized.subscribe(function (isDesktop) {
|
|
652
657
|
if (_this.lastViewType != (isDesktop ? 'desktop' : 'mobile') || !isDesktop) {
|
|
@@ -676,7 +681,7 @@
|
|
|
676
681
|
}
|
|
677
682
|
});
|
|
678
683
|
setTimeout(function () {
|
|
679
|
-
_this.raDashboardEventBus.subscribe(exports.RAEvent.BulkActionClick).subscribe(function (data) {
|
|
684
|
+
_this.bulkActionClick = _this.raDashboardEventBus.subscribe(exports.RAEvent.BulkActionClick).subscribe(function (data) {
|
|
680
685
|
_this.bulkActionData = JSON.parse(JSON.stringify(data)); // To create a new reference;
|
|
681
686
|
});
|
|
682
687
|
});
|
|
@@ -692,6 +697,16 @@
|
|
|
692
697
|
this.inititateEventBusSubscritions();
|
|
693
698
|
}
|
|
694
699
|
};
|
|
700
|
+
RADashboardArea.prototype.setEmptyDashboardConfig = function () {
|
|
701
|
+
if (this.dashboardInfo && this.dashboardInfo.templateConfig.emptyDashboardHeader) {
|
|
702
|
+
this.emptyDashboardTitle = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.titleKey);
|
|
703
|
+
this.emptyDashboardMsg1 = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey1);
|
|
704
|
+
this.emptyDashboardMsg2 = (this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) ? this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) : '';
|
|
705
|
+
this.emptyDashboardButtonText = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonTextKey);
|
|
706
|
+
this.emptyDashboardButtonIcon = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon : '';
|
|
707
|
+
this.emptyDashboardButtonAction = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction : '';
|
|
708
|
+
}
|
|
709
|
+
};
|
|
695
710
|
/**To set GridsterConfig */
|
|
696
711
|
RADashboardArea.prototype.initiateGridsterConfig = function () {
|
|
697
712
|
var _this = this;
|
|
@@ -731,6 +746,11 @@
|
|
|
731
746
|
_this.addWidget(e);
|
|
732
747
|
});
|
|
733
748
|
});
|
|
749
|
+
this.curatedFilterChange = this.raDashboardEventBus.subscribe(exports.RAEvent.CuratedFilterChange).subscribe(function (e) {
|
|
750
|
+
_this.ngZone.run(function () {
|
|
751
|
+
_this.addRemoveWidgets(e);
|
|
752
|
+
});
|
|
753
|
+
});
|
|
734
754
|
this.rearrangeWidgetClick = this.raDashboardEventBus.subscribe(exports.RAEvent.RearrangeClicked).subscribe(function (e) {
|
|
735
755
|
_this.ngZone.run(function () {
|
|
736
756
|
_this.rearrangeWidgets();
|
|
@@ -779,6 +799,10 @@
|
|
|
779
799
|
this.widgetLibraryDoneClick.unsubscribe();
|
|
780
800
|
if (this.rearrangeWidgetClick)
|
|
781
801
|
this.rearrangeWidgetClick.unsubscribe();
|
|
802
|
+
if (this.curatedFilterChange)
|
|
803
|
+
this.curatedFilterChange.unsubscribe();
|
|
804
|
+
if (this.bulkActionClick)
|
|
805
|
+
this.bulkActionClick.unsubscribe();
|
|
782
806
|
};
|
|
783
807
|
/**To update position/dimention of all widgets in the area */
|
|
784
808
|
RADashboardArea.prototype.updateWidgets = function () {
|
|
@@ -927,6 +951,9 @@
|
|
|
927
951
|
_this.setAreaHeight();
|
|
928
952
|
});
|
|
929
953
|
};
|
|
954
|
+
//to add widgets into gridster when there is a change in curated filter
|
|
955
|
+
RADashboardArea.prototype.addRemoveWidgets = function (data) {
|
|
956
|
+
};
|
|
930
957
|
/**To add widget instance to the database with the next available position and to make changes in
|
|
931
958
|
* dashboard area.
|
|
932
959
|
*/
|
|
@@ -1039,8 +1066,11 @@
|
|
|
1039
1066
|
});
|
|
1040
1067
|
return widgetListArray;
|
|
1041
1068
|
};
|
|
1042
|
-
RADashboardArea.prototype.
|
|
1043
|
-
this.
|
|
1069
|
+
RADashboardArea.prototype.buttonClick = function () {
|
|
1070
|
+
if (this.emptyDashboardButtonAction == "widgets")
|
|
1071
|
+
this.raDashboardEventBus.publish(exports.RAEvent.AddNewWidgetToDashboard, null);
|
|
1072
|
+
else if (this.emptyDashboardButtonAction == "filter")
|
|
1073
|
+
this.raDashboardEventBus.publish(exports.RAEvent.GlobalFilterClick, null);
|
|
1044
1074
|
};
|
|
1045
1075
|
RADashboardArea.prototype.updateAppliedFilters = function (data) {
|
|
1046
1076
|
this.raDashboardEventBus.publish(exports.RAEvent.UpdateAppledFiterForInapplicableFilter, data);
|
|
@@ -1105,8 +1135,8 @@
|
|
|
1105
1135
|
RADashboardArea = __decorate([
|
|
1106
1136
|
core.Component({
|
|
1107
1137
|
selector: 'ra-dashboard-area',
|
|
1108
|
-
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=\"
|
|
1109
|
-
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:
|
|
1138
|
+
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>",
|
|
1139
|
+
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}}"]
|
|
1110
1140
|
}),
|
|
1111
1141
|
__metadata("design:paramtypes", [RaDashboardService,
|
|
1112
1142
|
core.NgZone,
|