@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
|
@@ -192,6 +192,10 @@ var RAEvent;
|
|
|
192
192
|
RAEvent["ShowInapplicableFilterMessage"] = "ShowInapplicableFilterMessage";
|
|
193
193
|
/** Bulk Action Clicked */
|
|
194
194
|
RAEvent["BulkActionClick"] = "BulkActionClick";
|
|
195
|
+
/** Global Filter Clicked */
|
|
196
|
+
/** When user change the curated filter(eg:data streams), system will create/delete widgets */
|
|
197
|
+
RAEvent["CuratedFilterChange"] = "CuratedFilterChange";
|
|
198
|
+
RAEvent["GlobalFilterClick"] = "GlobalFilterClick";
|
|
195
199
|
})(RAEvent || (RAEvent = {}));
|
|
196
200
|
var RAEventKey;
|
|
197
201
|
(function (RAEventKey) {
|
|
@@ -436,6 +440,7 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
436
440
|
var _this = this;
|
|
437
441
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
438
442
|
this.initiateGridsterConfig();
|
|
443
|
+
this.setEmptyDashboardConfig();
|
|
439
444
|
this.lastViewType = this.responsiveService.IsDesktopView ? 'desktop' : 'mobile';
|
|
440
445
|
this.responsiveService.resized.subscribe(function (isDesktop) {
|
|
441
446
|
if (_this.lastViewType != (isDesktop ? 'desktop' : 'mobile') || !isDesktop) {
|
|
@@ -465,7 +470,7 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
465
470
|
}
|
|
466
471
|
});
|
|
467
472
|
setTimeout(function () {
|
|
468
|
-
_this.raDashboardEventBus.subscribe(RAEvent.BulkActionClick).subscribe(function (data) {
|
|
473
|
+
_this.bulkActionClick = _this.raDashboardEventBus.subscribe(RAEvent.BulkActionClick).subscribe(function (data) {
|
|
469
474
|
_this.bulkActionData = JSON.parse(JSON.stringify(data)); // To create a new reference;
|
|
470
475
|
});
|
|
471
476
|
});
|
|
@@ -481,6 +486,16 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
481
486
|
this.inititateEventBusSubscritions();
|
|
482
487
|
}
|
|
483
488
|
};
|
|
489
|
+
RADashboardArea.prototype.setEmptyDashboardConfig = function () {
|
|
490
|
+
if (this.dashboardInfo && this.dashboardInfo.templateConfig.emptyDashboardHeader) {
|
|
491
|
+
this.emptyDashboardTitle = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.titleKey);
|
|
492
|
+
this.emptyDashboardMsg1 = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey1);
|
|
493
|
+
this.emptyDashboardMsg2 = (this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) ? this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) : '';
|
|
494
|
+
this.emptyDashboardButtonText = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonTextKey);
|
|
495
|
+
this.emptyDashboardButtonIcon = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon : '';
|
|
496
|
+
this.emptyDashboardButtonAction = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction : '';
|
|
497
|
+
}
|
|
498
|
+
};
|
|
484
499
|
/**To set GridsterConfig */
|
|
485
500
|
RADashboardArea.prototype.initiateGridsterConfig = function () {
|
|
486
501
|
var _this = this;
|
|
@@ -520,6 +535,11 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
520
535
|
_this.addWidget(e);
|
|
521
536
|
});
|
|
522
537
|
});
|
|
538
|
+
this.curatedFilterChange = this.raDashboardEventBus.subscribe(RAEvent.CuratedFilterChange).subscribe(function (e) {
|
|
539
|
+
_this.ngZone.run(function () {
|
|
540
|
+
_this.addRemoveWidgets(e);
|
|
541
|
+
});
|
|
542
|
+
});
|
|
523
543
|
this.rearrangeWidgetClick = this.raDashboardEventBus.subscribe(RAEvent.RearrangeClicked).subscribe(function (e) {
|
|
524
544
|
_this.ngZone.run(function () {
|
|
525
545
|
_this.rearrangeWidgets();
|
|
@@ -568,6 +588,10 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
568
588
|
this.widgetLibraryDoneClick.unsubscribe();
|
|
569
589
|
if (this.rearrangeWidgetClick)
|
|
570
590
|
this.rearrangeWidgetClick.unsubscribe();
|
|
591
|
+
if (this.curatedFilterChange)
|
|
592
|
+
this.curatedFilterChange.unsubscribe();
|
|
593
|
+
if (this.bulkActionClick)
|
|
594
|
+
this.bulkActionClick.unsubscribe();
|
|
571
595
|
};
|
|
572
596
|
/**To update position/dimention of all widgets in the area */
|
|
573
597
|
RADashboardArea.prototype.updateWidgets = function () {
|
|
@@ -716,6 +740,9 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
716
740
|
_this.setAreaHeight();
|
|
717
741
|
});
|
|
718
742
|
};
|
|
743
|
+
//to add widgets into gridster when there is a change in curated filter
|
|
744
|
+
RADashboardArea.prototype.addRemoveWidgets = function (data) {
|
|
745
|
+
};
|
|
719
746
|
/**To add widget instance to the database with the next available position and to make changes in
|
|
720
747
|
* dashboard area.
|
|
721
748
|
*/
|
|
@@ -828,8 +855,11 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
828
855
|
});
|
|
829
856
|
return widgetListArray;
|
|
830
857
|
};
|
|
831
|
-
RADashboardArea.prototype.
|
|
832
|
-
this.
|
|
858
|
+
RADashboardArea.prototype.buttonClick = function () {
|
|
859
|
+
if (this.emptyDashboardButtonAction == "widgets")
|
|
860
|
+
this.raDashboardEventBus.publish(RAEvent.AddNewWidgetToDashboard, null);
|
|
861
|
+
else if (this.emptyDashboardButtonAction == "filter")
|
|
862
|
+
this.raDashboardEventBus.publish(RAEvent.GlobalFilterClick, null);
|
|
833
863
|
};
|
|
834
864
|
RADashboardArea.prototype.updateAppliedFilters = function (data) {
|
|
835
865
|
this.raDashboardEventBus.publish(RAEvent.UpdateAppledFiterForInapplicableFilter, data);
|
|
@@ -894,8 +924,8 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
894
924
|
RADashboardArea = __decorate([
|
|
895
925
|
Component({
|
|
896
926
|
selector: 'ra-dashboard-area',
|
|
897
|
-
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=\"
|
|
898
|
-
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:
|
|
927
|
+
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>",
|
|
928
|
+
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}}"]
|
|
899
929
|
}),
|
|
900
930
|
__metadata("design:paramtypes", [RaDashboardService,
|
|
901
931
|
NgZone,
|