@schneideress/dashboardframework 0.0.259 → 0.0.261

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.
@@ -202,7 +202,7 @@ var RAEventKey;
202
202
  var GridsterConfigDefaultSettings = {
203
203
  gridType: 'scrollVertical',
204
204
  compactType: 'none',
205
- margin: 10,
205
+ margin: 0,
206
206
  outerMargin: true,
207
207
  outerMarginTop: 10,
208
208
  outerMarginRight: 0,
@@ -458,15 +458,17 @@ var RADashboardArea = /** @class */ (function () {
458
458
  }
459
459
  else {
460
460
  setTimeout(function () {
461
- _this.raDashboardEventBus.subscribe(RAEvent.BulkActionClick).subscribe(function (data) {
462
- _this.bulkActionData = JSON.parse(JSON.stringify(data)); // To create a new reference;
463
- });
464
461
  _this.gridcellHeight = _this.options.api.getCurrentRowHeight();
465
462
  _this.domResized = !_this.domResized;
466
463
  _this.setAreaHeight();
467
464
  }, 100);
468
465
  }
469
466
  });
467
+ setTimeout(function () {
468
+ _this.raDashboardEventBus.subscribe(RAEvent.BulkActionClick).subscribe(function (data) {
469
+ _this.bulkActionData = JSON.parse(JSON.stringify(data)); // To create a new reference;
470
+ });
471
+ });
470
472
  };
471
473
  RADashboardArea.prototype.ngOnChanges = function (changes) {
472
474
  this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
@@ -892,7 +894,7 @@ var RADashboardArea = /** @class */ (function () {
892
894
  RADashboardArea = __decorate([
893
895
  Component({
894
896
  selector: 'ra-dashboard-area',
895
- 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 [dashboard-info]=\"dashboardInfo\" [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 (updateAppliedFilters)=\"updateAppliedFilters($event)\">\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>",
897
+ 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 [bulk-action-data]=\"bulkActionData\" [dashboard-info]=\"dashboardInfo\" [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 (updateAppliedFilters)=\"updateAppliedFilters($event)\">\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>",
896
898
  styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#fff;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;user-select:text;box-shadow:none}gridster-item:hover{box-shadow:0 1px 10px rgba(0,0,0,.15)!important}@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:#fff;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:#fff;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}}"]
897
899
  }),
898
900
  __metadata("design:paramtypes", [RaDashboardService,
@@ -1597,11 +1599,11 @@ var RAWidgetContainer = /** @class */ (function () {
1597
1599
  var html = '<div id="ra-db-widget-menu"' + 'style="' + style + '" class="download-content dropdown-content widget-config-item dropdown-click" style="z-index: 1002;">';
1598
1600
  var settings = '';
1599
1601
  if (this.isWidgetMgmnt) {
1600
- if (!this.data.widgetInfo.templateWidgetSettings.hideEdit)
1602
+ if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideEdit)
1601
1603
  settings += this.getHtmlForButton('wcEditWidget', 'fal fa-edit', this.editText);
1602
- if (!this.data.widgetInfo.templateWidgetSettings.hideCopy)
1604
+ if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideCopy)
1603
1605
  settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
1604
- if (!this.data.widgetInfo.templateWidgetSettings.hideMove)
1606
+ if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideMove)
1605
1607
  settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
1606
1608
  }
1607
1609
  var customPageParams = false;
@@ -1611,14 +1613,14 @@ var RAWidgetContainer = /** @class */ (function () {
1611
1613
  customPageParams = true;
1612
1614
  }
1613
1615
  }
1614
- if (!this.data.widgetInfo.templateWidgetSettings.hideVisitPage && (this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
1616
+ if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideVisitPage && (this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
1615
1617
  settings += '<a style="max-height: 30px;align-items: center;align-content: center; display: flex;" id="wcVisitWidget">';
1616
1618
  settings += '<i style="padding-left: 4px;font-size: 27px !important;" class="fal fa-angle-right"></i> ';
1617
1619
  settings += '<span style="padding-left: 11px;margin-top: 2px;" style="padding-left: 6px;">';
1618
1620
  settings += this.translateService.translate('Common.visitpage');
1619
1621
  settings += '</span></a>';
1620
1622
  }
1621
- if (!this.data.widgetInfo.templateWidgetSettings.hideVisitPage && (this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
1623
+ if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideVisitPage && (this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
1622
1624
  html += '<div style="color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;">';
1623
1625
  html += this.translateService.translate('Common.settings') + '</div>';
1624
1626
  html += settings;
@@ -1650,7 +1652,7 @@ var RAWidgetContainer = /** @class */ (function () {
1650
1652
  if (this.isDownloadIconVisible && this.isWidgetMgmnt && this.showExcell) {
1651
1653
  html += this.getHr();
1652
1654
  }
1653
- if (this.isWidgetMgmnt && !this.data.widgetInfo.templateWidgetSettings.hideDelete) {
1655
+ if (this.isWidgetMgmnt && !this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideDelete) {
1654
1656
  html += '<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>';
1655
1657
  html += this.deleteText;
1656
1658
  html += '</span></a>';
@@ -2503,7 +2505,7 @@ var GridsterRenderer = /** @class */ (function () {
2503
2505
  else {
2504
2506
  var x = Math.round(this.gridster.curColWidth * item.x);
2505
2507
  var y = Math.round(this.gridster.curRowHeight * item.y);
2506
- var width = this.gridster.curColWidth * item.cols - this.gridster.$options.margin - 5;
2508
+ var width = this.gridster.curColWidth * item.cols - this.gridster.$options.margin;
2507
2509
  var height = (this.gridster.curRowHeight * item.rows - this.gridster.$options.margin);
2508
2510
  // set the cell style
2509
2511
  this.setCellPosition(renderer, el, x, y);
@@ -4630,8 +4632,8 @@ var GridsterItemComponent = /** @class */ (function () {
4630
4632
  GridsterItemComponent.prototype.updateItemSize = function () {
4631
4633
  var top = this.$item.y * this.gridster.curRowHeight;
4632
4634
  var left = this.$item.x * this.gridster.curColWidth;
4633
- var width = this.$item.cols * this.gridster.curColWidth - this.gridster.$options.margin - 5;
4634
- var height = this.$item.rows * this.gridster.curRowHeight - this.gridster.$options.margin - 5;
4635
+ var width = this.$item.cols * this.gridster.curColWidth - this.gridster.$options.margin;
4636
+ var height = this.$item.rows * this.gridster.curRowHeight - this.gridster.$options.margin;
4635
4637
  if (!this.init && width > 0 && height > 0) {
4636
4638
  this.init = true;
4637
4639
  if (this.item.initCallback) {