@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.
@@ -761,37 +761,38 @@
761
761
  enumerable: true,
762
762
  configurable: true
763
763
  });
764
- Object.defineProperty(RADashboardResponsiveService.prototype, "GridsterConfig", {
765
- get: /**
766
- * @return {?}
767
- */
768
- function () {
769
- /** @type {?} */
770
- var config = GridsterConfigDefaultSettings;
771
- config.minCols = this.currentResInfo.maxCols;
772
- config.maxCols = this.currentResInfo.maxCols;
773
- config.minRows = this.currentResInfo.minCols;
774
- config.maxItemCols = this.currentResInfo.maxCols;
775
- config.minItemCols = this.currentResInfo.minCols;
776
- config.minItemRows = this.currentResInfo.minCols;
777
- config.minItemArea = this.currentResInfo.minCols * this.currentResInfo.minCols;
778
- config.defaultItemCols = this.currentResInfo.minCols;
779
- config.defaultItemRows = this.currentResInfo.minCols;
780
- if (!this.IsDesktopView) {
781
- config.resizable.enabled = false;
782
- config.swap = false;
783
- config.draggable.enabled = false;
784
- }
785
- else {
786
- config.resizable.enabled = true;
787
- config.swap = true;
788
- config.draggable.enabled = true;
789
- }
790
- return config;
791
- },
792
- enumerable: true,
793
- configurable: true
794
- });
764
+ /**
765
+ * @param {?} isWidgetMgmnt
766
+ * @return {?}
767
+ */
768
+ RADashboardResponsiveService.prototype.getGridsterConfig = /**
769
+ * @param {?} isWidgetMgmnt
770
+ * @return {?}
771
+ */
772
+ function (isWidgetMgmnt) {
773
+ /** @type {?} */
774
+ var config = GridsterConfigDefaultSettings;
775
+ config.minCols = this.currentResInfo.maxCols;
776
+ config.maxCols = this.currentResInfo.maxCols;
777
+ config.minRows = this.currentResInfo.minCols;
778
+ config.maxItemCols = this.currentResInfo.maxCols;
779
+ config.minItemCols = this.currentResInfo.minCols;
780
+ config.minItemRows = this.currentResInfo.minCols;
781
+ config.minItemArea = this.currentResInfo.minCols * this.currentResInfo.minCols;
782
+ config.defaultItemCols = this.currentResInfo.minCols;
783
+ config.defaultItemRows = this.currentResInfo.minCols;
784
+ if (!this.IsDesktopView || !isWidgetMgmnt) {
785
+ config.resizable.enabled = false;
786
+ config.swap = false;
787
+ config.draggable.enabled = false;
788
+ }
789
+ else {
790
+ config.resizable.enabled = true;
791
+ config.swap = true;
792
+ config.draggable.enabled = true;
793
+ }
794
+ return config;
795
+ };
795
796
  /**To map IwidgetInfo object to gridsterItem */
796
797
  /**
797
798
  * To map IwidgetInfo object to gridsterItem
@@ -940,7 +941,7 @@
940
941
  this.isWidgetLoaded = false;
941
942
  this.domResized = false;
942
943
  this.showEmptyDashboard = false;
943
- this.isDashboardMgmnt = false;
944
+ this.isWidgetMgmnt = false;
944
945
  this.widgetHeight = 2;
945
946
  this.widgetWidth = 4;
946
947
  this.hideDashboardBanner = new core.EventEmitter();
@@ -990,7 +991,7 @@
990
991
  * @return {?}
991
992
  */
992
993
  function (changes) {
993
- this.isDashboardMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
994
+ this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
994
995
  if (this.raDashboardEventBus && this.appConfig && !this.isWidgetLoaded) {
995
996
  this.isWidgetLoaded = true;
996
997
  this.loadWidgets(this.userDashboardId, this.areaKey);
@@ -1011,7 +1012,7 @@
1011
1012
  function () {
1012
1013
  var _this = this;
1013
1014
  /**To override default configuration values to the gridster control */
1014
- this.options = this.responsiveService.GridsterConfig;
1015
+ this.options = this.responsiveService.getGridsterConfig(this.isWidgetMgmnt);
1015
1016
  this.options.initCallback = (/**
1016
1017
  * @param {?} gridster
1017
1018
  * @return {?}
@@ -1617,7 +1618,7 @@
1617
1618
  RADashboardArea.decorators = [
1618
1619
  { type: core.Component, args: [{
1619
1620
  selector: 'ra-dashboard-area',
1620
- 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>",
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 *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>",
1621
1622
  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}}"]
1622
1623
  }] }
1623
1624
  ];
@@ -1690,7 +1691,7 @@
1690
1691
  /** @type {?} */
1691
1692
  RADashboardArea.prototype.showEmptyDashboard;
1692
1693
  /** @type {?} */
1693
- RADashboardArea.prototype.isDashboardMgmnt;
1694
+ RADashboardArea.prototype.isWidgetMgmnt;
1694
1695
  /** @type {?} */
1695
1696
  RADashboardArea.prototype.userDashboardId;
1696
1697
  /** @type {?} */