@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.
@@ -930,13 +930,14 @@
930
930
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
931
931
  */
932
932
  var RADashboardArea = /** @class */ (function () {
933
- function RADashboardArea(dashboardService, ngZone, ngxService, translateService, notifier, responsiveService) {
933
+ function RADashboardArea(dashboardService, ngZone, ngxService, translateService, notifier, responsiveService, permissionService) {
934
934
  this.dashboardService = dashboardService;
935
935
  this.ngZone = ngZone;
936
936
  this.ngxService = ngxService;
937
937
  this.translateService = translateService;
938
938
  this.notifier = notifier;
939
939
  this.responsiveService = responsiveService;
940
+ this.permissionService = permissionService;
940
941
  this.widgetList = Array();
941
942
  this.gridheight = 300;
942
943
  this.gridcellHeight = 0;
@@ -944,6 +945,7 @@
944
945
  this.isWidgetLoaded = false;
945
946
  this.domResized = false;
946
947
  this.showEmptyDashboard = false;
948
+ this.isDashboardMgmnt = false;
947
949
  this.widgetHeight = 2;
948
950
  this.widgetWidth = 4;
949
951
  this.hideDashboardBanner = new core.EventEmitter();
@@ -993,6 +995,7 @@
993
995
  * @return {?}
994
996
  */
995
997
  function (changes) {
998
+ this.isDashboardMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
996
999
  if (this.raDashboardEventBus && this.appConfig && !this.isWidgetLoaded) {
997
1000
  this.isWidgetLoaded = true;
998
1001
  this.loadWidgets(this.userDashboardId, this.areaKey);
@@ -1618,7 +1621,7 @@
1618
1621
  RADashboardArea.decorators = [
1619
1622
  { type: core.Component, args: [{
1620
1623
  selector: 'ra-dashboard-area',
1621
- 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>",
1624
+ 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>",
1622
1625
  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}}"]
1623
1626
  }] }
1624
1627
  ];
@@ -1629,7 +1632,8 @@
1629
1632
  { type: ngxUiLoader.NgxUiLoaderService },
1630
1633
  { type: raCommon.RATranslateService },
1631
1634
  { type: angularNotifier.NotifierService },
1632
- { type: RADashboardResponsiveService }
1635
+ { type: RADashboardResponsiveService },
1636
+ { type: raCommon.RAPermissionService }
1633
1637
  ]; };
1634
1638
  RADashboardArea.propDecorators = {
1635
1639
  userDashboardId: [{ type: core.Input, args: ['user-dashboard-id',] }],
@@ -1690,6 +1694,8 @@
1690
1694
  /** @type {?} */
1691
1695
  RADashboardArea.prototype.showEmptyDashboard;
1692
1696
  /** @type {?} */
1697
+ RADashboardArea.prototype.isDashboardMgmnt;
1698
+ /** @type {?} */
1693
1699
  RADashboardArea.prototype.userDashboardId;
1694
1700
  /** @type {?} */
1695
1701
  RADashboardArea.prototype.areaKey;
@@ -1737,6 +1743,11 @@
1737
1743
  * @private
1738
1744
  */
1739
1745
  RADashboardArea.prototype.responsiveService;
1746
+ /**
1747
+ * @type {?}
1748
+ * @private
1749
+ */
1750
+ RADashboardArea.prototype.permissionService;
1740
1751
  }
1741
1752
 
1742
1753
  /**