@schneideress/dashboardframework 0.0.5 → 0.0.6

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.
@@ -55,9 +55,7 @@ class RaDashboardService extends BaseService {
55
55
  */
56
56
  getWidgetsByDashboardArea(widgetInfo, appConfig) {
57
57
  this.baseUrl = appConfig.apiBaseUrl;
58
- /** @type {?} */
59
- var url = 'widget/GetWidgetByArea';
60
- return this.post(url, widgetInfo);
58
+ return this.post('widget/GetWidgetByArea', widgetInfo);
61
59
  }
62
60
  /**
63
61
  * @param {?} widgetList
@@ -66,9 +64,7 @@ class RaDashboardService extends BaseService {
66
64
  */
67
65
  updateWidgets(widgetList, appConfig) {
68
66
  this.baseUrl = appConfig.apiBaseUrl;
69
- /** @type {?} */
70
- var url = 'widget/UpdateAreaWidgets';
71
- return this.post(url, widgetList);
67
+ return this.post('widget/UpdateAreaWidgets', widgetList);
72
68
  }
73
69
  /**
74
70
  * @param {?} widgetInfo
@@ -95,9 +91,7 @@ class RaDashboardService extends BaseService {
95
91
  */
96
92
  addWidget(widgetInfo, appConfig) {
97
93
  this.baseUrl = appConfig.apiBaseUrl;
98
- /** @type {?} */
99
- var url = 'widget/AddWidgetUser';
100
- return this.post(url, widgetInfo);
94
+ return this.post('widget/AddWidgetUser', widgetInfo);
101
95
  }
102
96
  /**
103
97
  * To Delete current widget from DOM
@@ -107,9 +101,7 @@ class RaDashboardService extends BaseService {
107
101
  */
108
102
  deleteWidget(widgetInfo, appConfig) {
109
103
  this.baseUrl = appConfig.apiBaseUrl;
110
- /** @type {?} */
111
- var url = 'widget/DeleteWidgetUser';
112
- return this.post(url, widgetInfo);
104
+ return this.post('widget/DeleteWidgetUser', widgetInfo);
113
105
  }
114
106
  /**
115
107
  * To Update widgetInfo in database
@@ -119,9 +111,7 @@ class RaDashboardService extends BaseService {
119
111
  */
120
112
  updateWidget(widgetInfo, appConfig) {
121
113
  this.baseUrl = appConfig.apiBaseUrl;
122
- /** @type {?} */
123
- var url = 'widget/UpdateUserWidget';
124
- return this.post(url, widgetInfo);
114
+ return this.post('widget/UpdateUserWidget', widgetInfo);
125
115
  }
126
116
  /**
127
117
  * To Move or change position if current widget container
@@ -447,8 +437,7 @@ class RADashboardArea {
447
437
  dashboardId: userDashboarId.toString(),
448
438
  dashboardAreaKey: areaKey
449
439
  }));
450
- /** @type {?} */
451
- let widgets = this.dashboardService.getWidgetsByDashboardArea(widgetInfo, this.appConfig).subscribe((/**
440
+ this.dashboardService.getWidgetsByDashboardArea(widgetInfo, this.appConfig).subscribe((/**
452
441
  * @param {?} widgets
453
442
  * @return {?}
454
443
  */
@@ -601,7 +590,7 @@ RADashboardArea.decorators = [
601
590
  { type: Component, args: [{
602
591
  selector: 'ra-dashboard-area',
603
592
  template: "<div #gridWrapper class=\"wrap gridster\" [style.height.px]=\"gridheight\">\r\n<!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\">\r\n <gridster-item [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container [app-config]=\"appConfig\" [event-bus]=\"raDashboardEventBus\" (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\"\r\n [global-filter]=\"globalFilter\" [widget-instance-id]=\"item.widgetInstanceId\"></ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n</div>\r\n",
604
- styles: ["gridster{width:inherit;background:#f1f1f1;border:1px solid #ccc;resize:height;display:flex;min-height:300px}gridster-item{border:1px solid #ccc;background:#fff!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}"]
593
+ styles: ["gridster{width:inherit;resize:height;display:flex;min-height:300px}gridster-item{border:1px solid #ccc;background:#fff!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}"]
605
594
  }] }
606
595
  ];
607
596
  /** @nocollapse */
@@ -743,7 +732,7 @@ class RAWidgetContainer {
743
732
  globalFilter: this.globalFilter
744
733
  }));
745
734
  /** @type {?} */
746
- let widgetCOntainer = this;
735
+ let widgetContainer = this;
747
736
  this.dashboardService.loadExternalScript(widgetInfo.scriptUrl, (/**
748
737
  * @return {?}
749
738
  */
@@ -754,7 +743,10 @@ class RAWidgetContainer {
754
743
  * @return {?}
755
744
  */
756
745
  () => {
757
- widgetCOntainer.widgetElement.loadContent(widgetConfigFilter, this.appConfig);
746
+ widgetConfigFilter.appConfig = this.appConfig;
747
+ widgetConfigFilter.widgetInfo = (/** @type {?} */ ({}));
748
+ widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
749
+ widgetContainer.widgetElement.loadContent(widgetConfigFilter, this.appConfig);
758
750
  }), 2000);
759
751
  }));
760
752
  }
@@ -2503,7 +2495,7 @@ GridsterComponent.decorators = [
2503
2495
  selector: 'gridster',
2504
2496
  template: "<div class=\"gridster-column\" *ngFor=\"let column of gridColumns; let i = index;\"\r\n [ngStyle]=\"gridRenderer.getGridColumnStyle(i)\"></div>\r\n<div class=\"gridster-row\" *ngFor=\"let row of gridRows; let i = index;\"\r\n [ngStyle]=\"gridRenderer.getGridRowStyle(i)\"></div>\r\n<ng-content></ng-content>\r\n<gridster-preview class=\"gridster-preview\"></gridster-preview>\r\n",
2505
2497
  encapsulation: ViewEncapsulation.None,
2506
- styles: ["gridster{clear:both;position:relative;box-sizing:border-box;background:grey;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;overflow:auto}gridster.fit{overflow-x:hidden;overflow-y:hidden}gridster.scrollVertical{overflow-x:hidden;overflow-y:auto}gridster.scrollHorizontal{overflow-x:auto;overflow-y:hidden}gridster.fixed{overflow:auto}gridster.mobile{overflow-x:hidden;overflow-y:auto}gridster.mobile gridster-item{position:relative}gridster .gridster-column,gridster .gridster-row{position:absolute;display:none;transition:.3s;box-sizing:border-box}gridster.display-grid .gridster-column,gridster.display-grid .gridster-row{display:block}gridster .gridster-column{border-left:1px solid #ccc;border-right:1px solid #ccc}gridster .gridster-row{border-top:1px solid #ccc;border-bottom:1px solid #ccc}"]
2498
+ styles: ["gridster{clear:both;position:relative;box-sizing:border-box;background:#fff;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;overflow:auto}gridster.fit{overflow-x:hidden;overflow-y:hidden}gridster.scrollVertical{overflow-x:hidden;overflow-y:auto}gridster.scrollHorizontal{overflow-x:auto;overflow-y:hidden}gridster.fixed{overflow:auto}gridster.mobile{overflow-x:hidden;overflow-y:auto}gridster.mobile gridster-item{position:relative}gridster .gridster-column,gridster .gridster-row{position:absolute;display:none;transition:.3s;box-sizing:border-box}gridster.display-grid .gridster-column,gridster.display-grid .gridster-row{display:block}gridster .gridster-column{border-left:1px solid #ccc;border-right:1px solid #ccc}gridster .gridster-row{border-top:1px solid #ccc;border-bottom:1px solid #ccc}"]
2507
2499
  }] }
2508
2500
  ];
2509
2501
  /** @nocollapse */