@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.
@@ -719,13 +719,14 @@ if (false) {
719
719
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
720
720
  */
721
721
  var RADashboardArea = /** @class */ (function () {
722
- function RADashboardArea(dashboardService, ngZone, ngxService, translateService, notifier, responsiveService) {
722
+ function RADashboardArea(dashboardService, ngZone, ngxService, translateService, notifier, responsiveService, permissionService) {
723
723
  this.dashboardService = dashboardService;
724
724
  this.ngZone = ngZone;
725
725
  this.ngxService = ngxService;
726
726
  this.translateService = translateService;
727
727
  this.notifier = notifier;
728
728
  this.responsiveService = responsiveService;
729
+ this.permissionService = permissionService;
729
730
  this.widgetList = Array();
730
731
  this.gridheight = 300;
731
732
  this.gridcellHeight = 0;
@@ -733,6 +734,7 @@ var RADashboardArea = /** @class */ (function () {
733
734
  this.isWidgetLoaded = false;
734
735
  this.domResized = false;
735
736
  this.showEmptyDashboard = false;
737
+ this.isDashboardMgmnt = false;
736
738
  this.widgetHeight = 2;
737
739
  this.widgetWidth = 4;
738
740
  this.hideDashboardBanner = new EventEmitter();
@@ -782,6 +784,7 @@ var RADashboardArea = /** @class */ (function () {
782
784
  * @return {?}
783
785
  */
784
786
  function (changes) {
787
+ this.isDashboardMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
785
788
  if (this.raDashboardEventBus && this.appConfig && !this.isWidgetLoaded) {
786
789
  this.isWidgetLoaded = true;
787
790
  this.loadWidgets(this.userDashboardId, this.areaKey);
@@ -1407,7 +1410,7 @@ var RADashboardArea = /** @class */ (function () {
1407
1410
  RADashboardArea.decorators = [
1408
1411
  { type: Component, args: [{
1409
1412
  selector: 'ra-dashboard-area',
1410
- 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>",
1413
+ 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>",
1411
1414
  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}}"]
1412
1415
  }] }
1413
1416
  ];
@@ -1418,7 +1421,8 @@ var RADashboardArea = /** @class */ (function () {
1418
1421
  { type: NgxUiLoaderService },
1419
1422
  { type: RATranslateService },
1420
1423
  { type: NotifierService },
1421
- { type: RADashboardResponsiveService }
1424
+ { type: RADashboardResponsiveService },
1425
+ { type: RAPermissionService }
1422
1426
  ]; };
1423
1427
  RADashboardArea.propDecorators = {
1424
1428
  userDashboardId: [{ type: Input, args: ['user-dashboard-id',] }],
@@ -1479,6 +1483,8 @@ if (false) {
1479
1483
  /** @type {?} */
1480
1484
  RADashboardArea.prototype.showEmptyDashboard;
1481
1485
  /** @type {?} */
1486
+ RADashboardArea.prototype.isDashboardMgmnt;
1487
+ /** @type {?} */
1482
1488
  RADashboardArea.prototype.userDashboardId;
1483
1489
  /** @type {?} */
1484
1490
  RADashboardArea.prototype.areaKey;
@@ -1526,6 +1532,11 @@ if (false) {
1526
1532
  * @private
1527
1533
  */
1528
1534
  RADashboardArea.prototype.responsiveService;
1535
+ /**
1536
+ * @type {?}
1537
+ * @private
1538
+ */
1539
+ RADashboardArea.prototype.permissionService;
1529
1540
  }
1530
1541
 
1531
1542
  /**