@schneideress/dashboardframework 0.0.202 → 0.0.203

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.
@@ -555,37 +555,38 @@ var RADashboardResponsiveService = /** @class */ (function () {
555
555
  enumerable: true,
556
556
  configurable: true
557
557
  });
558
- Object.defineProperty(RADashboardResponsiveService.prototype, "GridsterConfig", {
559
- get: /**
560
- * @return {?}
561
- */
562
- function () {
563
- /** @type {?} */
564
- var config = GridsterConfigDefaultSettings;
565
- config.minCols = this.currentResInfo.maxCols;
566
- config.maxCols = this.currentResInfo.maxCols;
567
- config.minRows = this.currentResInfo.minCols;
568
- config.maxItemCols = this.currentResInfo.maxCols;
569
- config.minItemCols = this.currentResInfo.minCols;
570
- config.minItemRows = this.currentResInfo.minCols;
571
- config.minItemArea = this.currentResInfo.minCols * this.currentResInfo.minCols;
572
- config.defaultItemCols = this.currentResInfo.minCols;
573
- config.defaultItemRows = this.currentResInfo.minCols;
574
- if (!this.IsDesktopView) {
575
- config.resizable.enabled = false;
576
- config.swap = false;
577
- config.draggable.enabled = false;
578
- }
579
- else {
580
- config.resizable.enabled = true;
581
- config.swap = true;
582
- config.draggable.enabled = true;
583
- }
584
- return config;
585
- },
586
- enumerable: true,
587
- configurable: true
588
- });
558
+ /**
559
+ * @param {?} isWidgetMgmnt
560
+ * @return {?}
561
+ */
562
+ RADashboardResponsiveService.prototype.getGridsterConfig = /**
563
+ * @param {?} isWidgetMgmnt
564
+ * @return {?}
565
+ */
566
+ function (isWidgetMgmnt) {
567
+ /** @type {?} */
568
+ var config = GridsterConfigDefaultSettings;
569
+ config.minCols = this.currentResInfo.maxCols;
570
+ config.maxCols = this.currentResInfo.maxCols;
571
+ config.minRows = this.currentResInfo.minCols;
572
+ config.maxItemCols = this.currentResInfo.maxCols;
573
+ config.minItemCols = this.currentResInfo.minCols;
574
+ config.minItemRows = this.currentResInfo.minCols;
575
+ config.minItemArea = this.currentResInfo.minCols * this.currentResInfo.minCols;
576
+ config.defaultItemCols = this.currentResInfo.minCols;
577
+ config.defaultItemRows = this.currentResInfo.minCols;
578
+ if (!this.IsDesktopView || !isWidgetMgmnt) {
579
+ config.resizable.enabled = false;
580
+ config.swap = false;
581
+ config.draggable.enabled = false;
582
+ }
583
+ else {
584
+ config.resizable.enabled = true;
585
+ config.swap = true;
586
+ config.draggable.enabled = true;
587
+ }
588
+ return config;
589
+ };
589
590
  /**To map IwidgetInfo object to gridsterItem */
590
591
  /**
591
592
  * To map IwidgetInfo object to gridsterItem
@@ -734,7 +735,7 @@ var RADashboardArea = /** @class */ (function () {
734
735
  this.isWidgetLoaded = false;
735
736
  this.domResized = false;
736
737
  this.showEmptyDashboard = false;
737
- this.isDashboardMgmnt = false;
738
+ this.isWidgetMgmnt = false;
738
739
  this.widgetHeight = 2;
739
740
  this.widgetWidth = 4;
740
741
  this.hideDashboardBanner = new EventEmitter();
@@ -784,7 +785,7 @@ var RADashboardArea = /** @class */ (function () {
784
785
  * @return {?}
785
786
  */
786
787
  function (changes) {
787
- this.isDashboardMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
788
+ this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
788
789
  if (this.raDashboardEventBus && this.appConfig && !this.isWidgetLoaded) {
789
790
  this.isWidgetLoaded = true;
790
791
  this.loadWidgets(this.userDashboardId, this.areaKey);
@@ -805,7 +806,7 @@ var RADashboardArea = /** @class */ (function () {
805
806
  function () {
806
807
  var _this = this;
807
808
  /**To override default configuration values to the gridster control */
808
- this.options = this.responsiveService.GridsterConfig;
809
+ this.options = this.responsiveService.getGridsterConfig(this.isWidgetMgmnt);
809
810
  this.options.initCallback = (/**
810
811
  * @param {?} gridster
811
812
  * @return {?}
@@ -1411,7 +1412,7 @@ var RADashboardArea = /** @class */ (function () {
1411
1412
  RADashboardArea.decorators = [
1412
1413
  { type: Component, args: [{
1413
1414
  selector: 'ra-dashboard-area',
1414
- 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>",
1415
+ 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=\"isWidgetMgmnt\" 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>",
1415
1416
  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}}"]
1416
1417
  }] }
1417
1418
  ];
@@ -1484,7 +1485,7 @@ if (false) {
1484
1485
  /** @type {?} */
1485
1486
  RADashboardArea.prototype.showEmptyDashboard;
1486
1487
  /** @type {?} */
1487
- RADashboardArea.prototype.isDashboardMgmnt;
1488
+ RADashboardArea.prototype.isWidgetMgmnt;
1488
1489
  /** @type {?} */
1489
1490
  RADashboardArea.prototype.userDashboardId;
1490
1491
  /** @type {?} */