@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.
- package/bundles/schneideress-dashboardframework.umd.js +15 -21
- package/bundles/schneideress-dashboardframework.umd.js.map +1 -1
- package/bundles/schneideress-dashboardframework.umd.min.js +1 -1
- package/bundles/schneideress-dashboardframework.umd.min.js.map +1 -1
- package/esm2015/gridster/lib/gridster.component.js +1 -1
- package/esm2015/lib/ra-dashboard-area/ra.dashboard.area.js +3 -4
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +6 -3
- package/esm2015/lib/ra.dashboard.service.js +6 -16
- package/esm2015/lib/ra.event.enum.js +3 -1
- package/esm5/gridster/lib/gridster.component.js +1 -1
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +3 -4
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +6 -3
- package/esm5/lib/ra.dashboard.service.js +6 -16
- package/esm5/lib/ra.event.enum.js +3 -1
- package/fesm2015/schneideress-dashboardframework.js +15 -21
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +15 -21
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra.event.enum.d.ts +3 -1
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -55,9 +55,7 @@ class RaDashboardService extends BaseService {
|
|
|
55
55
|
*/
|
|
56
56
|
getWidgetsByDashboardArea(widgetInfo, appConfig) {
|
|
57
57
|
this.baseUrl = appConfig.apiBaseUrl;
|
|
58
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
@@ -254,6 +244,8 @@ const RAEvent = {
|
|
|
254
244
|
DashboardChanged: "dashboardChanged",
|
|
255
245
|
/** triggers when user clicks the close button on library */
|
|
256
246
|
WidgetLibraryCloseBtnClicked: "WidgetLibraryCloseBtnClicked",
|
|
247
|
+
/** triggers when user clicks on view dashboard*/
|
|
248
|
+
LoadDashboard: "LoadDashboard",
|
|
257
249
|
};
|
|
258
250
|
/** @enum {string} */
|
|
259
251
|
const RAEventKey = {
|
|
@@ -445,8 +437,7 @@ class RADashboardArea {
|
|
|
445
437
|
dashboardId: userDashboarId.toString(),
|
|
446
438
|
dashboardAreaKey: areaKey
|
|
447
439
|
}));
|
|
448
|
-
/**
|
|
449
|
-
let widgets = this.dashboardService.getWidgetsByDashboardArea(widgetInfo, this.appConfig).subscribe((/**
|
|
440
|
+
this.dashboardService.getWidgetsByDashboardArea(widgetInfo, this.appConfig).subscribe((/**
|
|
450
441
|
* @param {?} widgets
|
|
451
442
|
* @return {?}
|
|
452
443
|
*/
|
|
@@ -599,7 +590,7 @@ RADashboardArea.decorators = [
|
|
|
599
590
|
{ type: Component, args: [{
|
|
600
591
|
selector: 'ra-dashboard-area',
|
|
601
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",
|
|
602
|
-
styles: ["gridster{width:inherit;
|
|
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}"]
|
|
603
594
|
}] }
|
|
604
595
|
];
|
|
605
596
|
/** @nocollapse */
|
|
@@ -741,7 +732,7 @@ class RAWidgetContainer {
|
|
|
741
732
|
globalFilter: this.globalFilter
|
|
742
733
|
}));
|
|
743
734
|
/** @type {?} */
|
|
744
|
-
let
|
|
735
|
+
let widgetContainer = this;
|
|
745
736
|
this.dashboardService.loadExternalScript(widgetInfo.scriptUrl, (/**
|
|
746
737
|
* @return {?}
|
|
747
738
|
*/
|
|
@@ -752,7 +743,10 @@ class RAWidgetContainer {
|
|
|
752
743
|
* @return {?}
|
|
753
744
|
*/
|
|
754
745
|
() => {
|
|
755
|
-
|
|
746
|
+
widgetConfigFilter.appConfig = this.appConfig;
|
|
747
|
+
widgetConfigFilter.widgetInfo = (/** @type {?} */ ({}));
|
|
748
|
+
widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
|
|
749
|
+
widgetContainer.widgetElement.loadContent(widgetConfigFilter, this.appConfig);
|
|
756
750
|
}), 2000);
|
|
757
751
|
}));
|
|
758
752
|
}
|
|
@@ -2501,7 +2495,7 @@ GridsterComponent.decorators = [
|
|
|
2501
2495
|
selector: 'gridster',
|
|
2502
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",
|
|
2503
2497
|
encapsulation: ViewEncapsulation.None,
|
|
2504
|
-
styles: ["gridster{clear:both;position:relative;box-sizing:border-box;background
|
|
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}"]
|
|
2505
2499
|
}] }
|
|
2506
2500
|
];
|
|
2507
2501
|
/** @nocollapse */
|