@schneideress/dashboardframework 0.0.4 → 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.
@@ -114,9 +114,7 @@
114
114
  */
115
115
  function (widgetInfo, appConfig) {
116
116
  this.baseUrl = appConfig.apiBaseUrl;
117
- /** @type {?} */
118
- var url = 'widget/GetWidgetByArea';
119
- return this.post(url, widgetInfo);
117
+ return this.post('widget/GetWidgetByArea', widgetInfo);
120
118
  };
121
119
  /**
122
120
  * @param {?} widgetList
@@ -130,9 +128,7 @@
130
128
  */
131
129
  function (widgetList, appConfig) {
132
130
  this.baseUrl = appConfig.apiBaseUrl;
133
- /** @type {?} */
134
- var url = 'widget/UpdateAreaWidgets';
135
- return this.post(url, widgetList);
131
+ return this.post('widget/UpdateAreaWidgets', widgetList);
136
132
  };
137
133
  /**
138
134
  * @param {?} widgetInfo
@@ -181,9 +177,7 @@
181
177
  */
182
178
  function (widgetInfo, appConfig) {
183
179
  this.baseUrl = appConfig.apiBaseUrl;
184
- /** @type {?} */
185
- var url = 'widget/AddWidgetUser';
186
- return this.post(url, widgetInfo);
180
+ return this.post('widget/AddWidgetUser', widgetInfo);
187
181
  };
188
182
  /** To Delete current widget from DOM*/
189
183
  /**
@@ -200,9 +194,7 @@
200
194
  */
201
195
  function (widgetInfo, appConfig) {
202
196
  this.baseUrl = appConfig.apiBaseUrl;
203
- /** @type {?} */
204
- var url = 'widget/DeleteWidgetUser';
205
- return this.post(url, widgetInfo);
197
+ return this.post('widget/DeleteWidgetUser', widgetInfo);
206
198
  };
207
199
  /**To Update widgetInfo in database */
208
200
  /**
@@ -219,9 +211,7 @@
219
211
  */
220
212
  function (widgetInfo, appConfig) {
221
213
  this.baseUrl = appConfig.apiBaseUrl;
222
- /** @type {?} */
223
- var url = 'widget/UpdateUserWidget';
224
- return this.post(url, widgetInfo);
214
+ return this.post('widget/UpdateUserWidget', widgetInfo);
225
215
  };
226
216
  /** To Move or change position if current widget container*/
227
217
  /**
@@ -412,6 +402,8 @@
412
402
  DashboardChanged: "dashboardChanged",
413
403
  /** triggers when user clicks the close button on library */
414
404
  WidgetLibraryCloseBtnClicked: "WidgetLibraryCloseBtnClicked",
405
+ /** triggers when user clicks on view dashboard*/
406
+ LoadDashboard: "LoadDashboard",
415
407
  };
416
408
  /** @enum {string} */
417
409
  var RAEventKey = {
@@ -621,8 +613,7 @@
621
613
  dashboardId: userDashboarId.toString(),
622
614
  dashboardAreaKey: areaKey
623
615
  }));
624
- /** @type {?} */
625
- var widgets = this.dashboardService.getWidgetsByDashboardArea(widgetInfo, this.appConfig).subscribe((/**
616
+ this.dashboardService.getWidgetsByDashboardArea(widgetInfo, this.appConfig).subscribe((/**
626
617
  * @param {?} widgets
627
618
  * @return {?}
628
619
  */
@@ -815,7 +806,7 @@
815
806
  { type: core.Component, args: [{
816
807
  selector: 'ra-dashboard-area',
817
808
  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",
818
- 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}"]
809
+ 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}"]
819
810
  }] }
820
811
  ];
821
812
  /** @nocollapse */
@@ -1012,7 +1003,7 @@
1012
1003
  globalFilter: this.globalFilter
1013
1004
  }));
1014
1005
  /** @type {?} */
1015
- var widgetCOntainer = this;
1006
+ var widgetContainer = this;
1016
1007
  this.dashboardService.loadExternalScript(widgetInfo.scriptUrl, (/**
1017
1008
  * @return {?}
1018
1009
  */
@@ -1023,7 +1014,10 @@
1023
1014
  * @return {?}
1024
1015
  */
1025
1016
  function () {
1026
- widgetCOntainer.widgetElement.loadContent(widgetConfigFilter, _this.appConfig);
1017
+ widgetConfigFilter.appConfig = _this.appConfig;
1018
+ widgetConfigFilter.widgetInfo = (/** @type {?} */ ({}));
1019
+ widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
1020
+ widgetContainer.widgetElement.loadContent(widgetConfigFilter, _this.appConfig);
1027
1021
  }), 2000);
1028
1022
  }));
1029
1023
  };
@@ -3037,7 +3031,7 @@
3037
3031
  selector: 'gridster',
3038
3032
  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",
3039
3033
  encapsulation: core.ViewEncapsulation.None,
3040
- 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}"]
3034
+ 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}"]
3041
3035
  }] }
3042
3036
  ];
3043
3037
  /** @nocollapse */