@schneideress/dashboardframework 0.0.256 → 0.0.258

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.
@@ -69,6 +69,12 @@ var RaDashboardService = /** @class */ (function (_super) {
69
69
  /**To Update widgetInfo in database */
70
70
  RaDashboardService.prototype.updateWidget = function (widgetInfo, appConfig) {
71
71
  this.baseUrl = appConfig.apiBaseUrl;
72
+ var info = {};
73
+ info.widgetConfigInfo = widgetInfo.widgetConfigInfo;
74
+ info.widgetInstanceId = widgetInfo.widgetInstanceId;
75
+ info.widgetTitle = widgetInfo.widgetTitle;
76
+ info.widgetType = widgetInfo.widgetType;
77
+ info.widgetId = widgetInfo.widgetId;
72
78
  return this.post('widget/UpdateUserWidget', widgetInfo);
73
79
  };
74
80
  /** To Move or change position if current widget container*/
@@ -196,7 +202,7 @@ var RAEventKey;
196
202
  var GridsterConfigDefaultSettings = {
197
203
  gridType: 'scrollVertical',
198
204
  compactType: 'none',
199
- margin: 0,
205
+ margin: 10,
200
206
  outerMargin: true,
201
207
  outerMarginTop: 10,
202
208
  outerMarginRight: 0,
@@ -353,7 +359,7 @@ var RADashboardResponsiveService = /** @class */ (function () {
353
359
  widget.settings = JSON.parse(widget.widgetSettings);
354
360
  }
355
361
  if (widget.templateSettings) {
356
- widget.templateSettings = JSON.parse(widget.templateSettings);
362
+ widget.templateWidgetSettings = JSON.parse(widget.templateSettings);
357
363
  }
358
364
  var gridsterItem = {
359
365
  cols: this.getWidth(widget.width),
@@ -1591,11 +1597,11 @@ var RAWidgetContainer = /** @class */ (function () {
1591
1597
  var html = '<div id="ra-db-widget-menu"' + 'style="' + style + '" class="download-content dropdown-content widget-config-item dropdown-click" style="z-index: 1002;">';
1592
1598
  var settings = '';
1593
1599
  if (this.isWidgetMgmnt) {
1594
- if (!this.data.widgetInfo.templateSettings.hideEdit)
1600
+ if (!this.data.widgetInfo.templateWidgetSettings && !this.data.widgetInfo.templateWidgetSettings.hideEdit)
1595
1601
  settings += this.getHtmlForButton('wcEditWidget', 'fal fa-edit', this.editText);
1596
- if (!this.data.widgetInfo.templateSettings.hideCopy)
1602
+ if (!this.data.widgetInfo.templateWidgetSettings && !this.data.widgetInfo.templateWidgetSettings.hideCopy)
1597
1603
  settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
1598
- if (!this.data.widgetInfo.templateSettings.hideMove)
1604
+ if (!this.data.widgetInfo.templateWidgetSettings && !this.data.widgetInfo.templateWidgetSettings.hideMove)
1599
1605
  settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
1600
1606
  }
1601
1607
  var customPageParams = false;
@@ -1605,14 +1611,14 @@ var RAWidgetContainer = /** @class */ (function () {
1605
1611
  customPageParams = true;
1606
1612
  }
1607
1613
  }
1608
- if (!this.data.widgetInfo.templateSettings.hideVisitPage && (this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
1614
+ if (!this.data.widgetInfo.templateWidgetSettings && !this.data.widgetInfo.templateWidgetSettings.hideVisitPage && (this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
1609
1615
  settings += '<a style="max-height: 30px;align-items: center;align-content: center; display: flex;" id="wcVisitWidget">';
1610
1616
  settings += '<i style="padding-left: 4px;font-size: 27px !important;" class="fal fa-angle-right"></i> ';
1611
1617
  settings += '<span style="padding-left: 11px;margin-top: 2px;" style="padding-left: 6px;">';
1612
1618
  settings += this.translateService.translate('Common.visitpage');
1613
1619
  settings += '</span></a>';
1614
1620
  }
1615
- if (!this.data.widgetInfo.templateSettings.hideVisitPage && (this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
1621
+ if (!this.data.widgetInfo.templateWidgetSettings && !this.data.widgetInfo.templateWidgetSettings.hideVisitPage && (this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
1616
1622
  html += '<div style="color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;">';
1617
1623
  html += this.translateService.translate('Common.settings') + '</div>';
1618
1624
  html += settings;
@@ -1644,7 +1650,7 @@ var RAWidgetContainer = /** @class */ (function () {
1644
1650
  if (this.isDownloadIconVisible && this.isWidgetMgmnt && this.showExcell) {
1645
1651
  html += this.getHr();
1646
1652
  }
1647
- if (this.isWidgetMgmnt && !this.data.widgetInfo.templateSettings.hideDelete) {
1653
+ if (this.isWidgetMgmnt && !this.data.widgetInfo.templateWidgetSettings && !this.data.widgetInfo.templateWidgetSettings.hideDelete) {
1648
1654
  html += '<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>';
1649
1655
  html += this.deleteText;
1650
1656
  html += '</span></a>';
@@ -2497,7 +2503,7 @@ var GridsterRenderer = /** @class */ (function () {
2497
2503
  else {
2498
2504
  var x = Math.round(this.gridster.curColWidth * item.x);
2499
2505
  var y = Math.round(this.gridster.curRowHeight * item.y);
2500
- var width = this.gridster.curColWidth * item.cols - this.gridster.$options.margin;
2506
+ var width = this.gridster.curColWidth * item.cols - this.gridster.$options.margin - 7;
2501
2507
  var height = (this.gridster.curRowHeight * item.rows - this.gridster.$options.margin);
2502
2508
  // set the cell style
2503
2509
  this.setCellPosition(renderer, el, x, y);