@schneideress/dashboardframework 0.0.200 → 0.0.201
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 +14 -3
- 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 +17 -5
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +16 -5
- package/fesm2015/schneideress-dashboardframework.js +15 -3
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +14 -3
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-dashboard-area/ra.dashboard.area.d.ts +4 -2
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -567,14 +567,16 @@ class RADashboardArea {
|
|
|
567
567
|
* @param {?} translateService
|
|
568
568
|
* @param {?} notifier
|
|
569
569
|
* @param {?} responsiveService
|
|
570
|
+
* @param {?} permissionService
|
|
570
571
|
*/
|
|
571
|
-
constructor(dashboardService, ngZone, ngxService, translateService, notifier, responsiveService) {
|
|
572
|
+
constructor(dashboardService, ngZone, ngxService, translateService, notifier, responsiveService, permissionService) {
|
|
572
573
|
this.dashboardService = dashboardService;
|
|
573
574
|
this.ngZone = ngZone;
|
|
574
575
|
this.ngxService = ngxService;
|
|
575
576
|
this.translateService = translateService;
|
|
576
577
|
this.notifier = notifier;
|
|
577
578
|
this.responsiveService = responsiveService;
|
|
579
|
+
this.permissionService = permissionService;
|
|
578
580
|
this.widgetList = Array();
|
|
579
581
|
this.gridheight = 300;
|
|
580
582
|
this.gridcellHeight = 0;
|
|
@@ -582,6 +584,7 @@ class RADashboardArea {
|
|
|
582
584
|
this.isWidgetLoaded = false;
|
|
583
585
|
this.domResized = false;
|
|
584
586
|
this.showEmptyDashboard = false;
|
|
587
|
+
this.isDashboardMgmnt = false;
|
|
585
588
|
this.widgetHeight = 2;
|
|
586
589
|
this.widgetWidth = 4;
|
|
587
590
|
this.hideDashboardBanner = new EventEmitter();
|
|
@@ -623,6 +626,7 @@ class RADashboardArea {
|
|
|
623
626
|
* @return {?}
|
|
624
627
|
*/
|
|
625
628
|
ngOnChanges(changes) {
|
|
629
|
+
this.isDashboardMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
626
630
|
if (this.raDashboardEventBus && this.appConfig && !this.isWidgetLoaded) {
|
|
627
631
|
this.isWidgetLoaded = true;
|
|
628
632
|
this.loadWidgets(this.userDashboardId, this.areaKey);
|
|
@@ -1138,7 +1142,7 @@ class RADashboardArea {
|
|
|
1138
1142
|
RADashboardArea.decorators = [
|
|
1139
1143
|
{ type: Component, args: [{
|
|
1140
1144
|
selector: 'ra-dashboard-area',
|
|
1141
|
-
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 [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=\"showEmptyDashboard\">\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 edit-icon\"></i>\r\n <span class=\"empty-title\">{{'dashboard.emptydashboard'|translate}}</span>\r\n </div>\r\n <div class=\"empty-content light\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n {{'dashboard.emptydashboardmessage'|translate}} <br />\r\n {{'dashboard.emptydashboardmessage2'|translate}}\r\n </div>\r\n <button class=\"btn btnLib btn-sm m-1 dashboard-button light\" (click)=\"addNewWidget()\">\r\n <i class=\"fal fa-plus m-1\"></i>{{'dashboard.addawidgets'|translate}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>",
|
|
1145
|
+
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 [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=\"showEmptyDashboard\">\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 edit-icon\"></i>\r\n <span class=\"empty-title\">{{'dashboard.emptydashboard'|translate}}</span>\r\n </div>\r\n <div class=\"empty-content light\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n {{'dashboard.emptydashboardmessage'|translate}} <br />\r\n {{'dashboard.emptydashboardmessage2'|translate}}\r\n </div>\r\n <button *ngIf=\"isDashboardMgmnt\" class=\"btn btnLib btn-sm m-1 dashboard-button light\" (click)=\"addNewWidget()\">\r\n <i class=\"fal fa-plus m-1\"></i>{{'dashboard.addawidgets'|translate}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>",
|
|
1142
1146
|
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;margin-bottom:50px!important}}@media screen and (max-width:350px){.gridster-mobile{min-height:330px!important;margin-bottom:0!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;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:10px;background-color:#ededed;width:100%;display:block}.empty-wrapper{display:flex;background-color:#fff;border-radius:8px;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:16px;display:flex;height:40px;padding:6px 10px 8px}.empty-content{color:#333;display:flex;padding:5px 10px 10px;margin-top:44px;margin-left:-185px;border-left:none}.empty-msg{padding:12px 10px 10px 5px;font-size:14px;border-top:1px solid #a9afb1}.edit-icon{color:#32ad3c;font-size:20px;margin-right:6px}.empty-title{margin-top:6px}}"]
|
|
1143
1147
|
}] }
|
|
1144
1148
|
];
|
|
@@ -1149,7 +1153,8 @@ RADashboardArea.ctorParameters = () => [
|
|
|
1149
1153
|
{ type: NgxUiLoaderService },
|
|
1150
1154
|
{ type: RATranslateService },
|
|
1151
1155
|
{ type: NotifierService },
|
|
1152
|
-
{ type: RADashboardResponsiveService }
|
|
1156
|
+
{ type: RADashboardResponsiveService },
|
|
1157
|
+
{ type: RAPermissionService }
|
|
1153
1158
|
];
|
|
1154
1159
|
RADashboardArea.propDecorators = {
|
|
1155
1160
|
userDashboardId: [{ type: Input, args: ['user-dashboard-id',] }],
|
|
@@ -1208,6 +1213,8 @@ if (false) {
|
|
|
1208
1213
|
/** @type {?} */
|
|
1209
1214
|
RADashboardArea.prototype.showEmptyDashboard;
|
|
1210
1215
|
/** @type {?} */
|
|
1216
|
+
RADashboardArea.prototype.isDashboardMgmnt;
|
|
1217
|
+
/** @type {?} */
|
|
1211
1218
|
RADashboardArea.prototype.userDashboardId;
|
|
1212
1219
|
/** @type {?} */
|
|
1213
1220
|
RADashboardArea.prototype.areaKey;
|
|
@@ -1255,6 +1262,11 @@ if (false) {
|
|
|
1255
1262
|
* @private
|
|
1256
1263
|
*/
|
|
1257
1264
|
RADashboardArea.prototype.responsiveService;
|
|
1265
|
+
/**
|
|
1266
|
+
* @type {?}
|
|
1267
|
+
* @private
|
|
1268
|
+
*/
|
|
1269
|
+
RADashboardArea.prototype.permissionService;
|
|
1258
1270
|
}
|
|
1259
1271
|
|
|
1260
1272
|
/**
|