@schneideress/dashboardframework 0.0.23 → 0.0.24
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 +40 -20
- 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/lib/ra-dashboard-area/ra.dashboard.area.js +21 -8
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +36 -10
- package/esm2015/lib/ra.dashboard.service.js +2 -1
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +20 -8
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +35 -11
- package/esm5/lib/ra.dashboard.service.js +2 -1
- package/fesm2015/schneideress-dashboardframework.js +39 -25
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +37 -26
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-dashboard-area/ra.dashboard.area.d.ts +3 -1
- package/lib/ra-widget-container/ra.widget.container.component.d.ts +6 -3
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@schneideress/ess-util'), require('rxjs/operators'), require('ngx-ui-loader'), require('angular-notifier'), require('@angular/platform-browser'), require('@angular/common/http'), require('@angular/common')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@schneideress/dashboardframework', ['exports', '@angular/core', 'rxjs', '@schneideress/ess-util', 'rxjs/operators', 'ngx-ui-loader', 'angular-notifier', '@angular/platform-browser', '@angular/common/http', '@angular/common'], factory) :
|
|
4
|
-
(global = global || self, factory((global.schneideress = global.schneideress || {}, global.schneideress.dashboardframework = {}), global.ng.core, global.rxjs, global['@schneideress/ess-util'], global.rxjs.operators, global['ngx-ui-loader'], global['angular-notifier'], global.ng.platformBrowser, global.ng.common.http, global.ng.common));
|
|
5
|
-
}(this, function (exports, core, rxjs, essUtil, operators, ngxUiLoader, angularNotifier, platformBrowser, http, common) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@schneideress/ess-util'), require('rxjs/operators'), require('ngx-ui-loader'), require('angular-notifier'), require('@schneideress/ess-base'), require('@angular/platform-browser'), require('@angular/common/http'), require('@angular/common')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@schneideress/dashboardframework', ['exports', '@angular/core', 'rxjs', '@schneideress/ess-util', 'rxjs/operators', 'ngx-ui-loader', 'angular-notifier', '@schneideress/ess-base', '@angular/platform-browser', '@angular/common/http', '@angular/common'], factory) :
|
|
4
|
+
(global = global || self, factory((global.schneideress = global.schneideress || {}, global.schneideress.dashboardframework = {}), global.ng.core, global.rxjs, global['@schneideress/ess-util'], global.rxjs.operators, global['ngx-ui-loader'], global['angular-notifier'], global.essBase, global.ng.platformBrowser, global.ng.common.http, global.ng.common));
|
|
5
|
+
}(this, function (exports, core, rxjs, essUtil, operators, ngxUiLoader, angularNotifier, essBase, platformBrowser, http, common) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -211,6 +211,7 @@
|
|
|
211
211
|
*/
|
|
212
212
|
function (widgetInfo, appConfig) {
|
|
213
213
|
this.baseUrl = appConfig.apiBaseUrl;
|
|
214
|
+
console.log('in update widget service');
|
|
214
215
|
return this.post('widget/UpdateUserWidget', widgetInfo);
|
|
215
216
|
};
|
|
216
217
|
/** To Move or change position if current widget container*/
|
|
@@ -506,10 +507,11 @@
|
|
|
506
507
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
507
508
|
*/
|
|
508
509
|
var RADashboardArea = /** @class */ (function () {
|
|
509
|
-
function RADashboardArea(dashboardService, ngZone, ngxService, notifier) {
|
|
510
|
+
function RADashboardArea(dashboardService, ngZone, ngxService, translateService, notifier) {
|
|
510
511
|
this.dashboardService = dashboardService;
|
|
511
512
|
this.ngZone = ngZone;
|
|
512
513
|
this.ngxService = ngxService;
|
|
514
|
+
this.translateService = translateService;
|
|
513
515
|
this.notifier = notifier;
|
|
514
516
|
this.widgetList = Array();
|
|
515
517
|
this.gridheight = 300;
|
|
@@ -641,10 +643,14 @@
|
|
|
641
643
|
* @return {?}
|
|
642
644
|
*/
|
|
643
645
|
function () {
|
|
644
|
-
this.conifgAddClick
|
|
645
|
-
|
|
646
|
-
this.
|
|
647
|
-
|
|
646
|
+
if (this.conifgAddClick)
|
|
647
|
+
this.conifgAddClick.unsubscribe();
|
|
648
|
+
if (this.widgetAddEvent)
|
|
649
|
+
this.widgetAddEvent.unsubscribe();
|
|
650
|
+
if (this.widgetDeleteEvent)
|
|
651
|
+
this.widgetDeleteEvent.unsubscribe();
|
|
652
|
+
if (this.widgetLibraryDoneClick)
|
|
653
|
+
this.widgetLibraryDoneClick.unsubscribe();
|
|
648
654
|
};
|
|
649
655
|
/**To update position/dimention of all widgets in the area */
|
|
650
656
|
/**
|
|
@@ -757,7 +763,7 @@
|
|
|
757
763
|
this.widgetList.splice(this.widgetList.indexOf(widget[0]), 1);
|
|
758
764
|
this.setAreaHeight();
|
|
759
765
|
if (!isalertDisabled) {
|
|
760
|
-
this.notifier.notify('success', "
|
|
766
|
+
this.notifier.notify('success', " " + this.translateService.translate('DeletedSuccesfully') + " [" + widget[0].widgetInfo.widgetTitle + "] " + this.translateService.translate('Widget') + " ");
|
|
761
767
|
}
|
|
762
768
|
}
|
|
763
769
|
};
|
|
@@ -914,7 +920,7 @@
|
|
|
914
920
|
{ type: core.Component, args: [{
|
|
915
921
|
selector: 'ra-dashboard-area',
|
|
916
922
|
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 <notifier-container></notifier-container>\r\n</div>\r\n\r\n",
|
|
917
|
-
styles: ["gridster{width:inherit;resize:height;display:flex}gridster-item{background:#fff!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}"]
|
|
923
|
+
styles: ["gridster{width:inherit;resize:height;display:flex;min-height:600px}gridster-item{background:#fff!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}"]
|
|
918
924
|
}] }
|
|
919
925
|
];
|
|
920
926
|
/** @nocollapse */
|
|
@@ -922,6 +928,7 @@
|
|
|
922
928
|
{ type: RaDashboardService },
|
|
923
929
|
{ type: core.NgZone },
|
|
924
930
|
{ type: ngxUiLoader.NgxUiLoaderService },
|
|
931
|
+
{ type: essBase.TranslateService },
|
|
925
932
|
{ type: angularNotifier.NotifierService }
|
|
926
933
|
]; };
|
|
927
934
|
RADashboardArea.propDecorators = {
|
|
@@ -941,9 +948,11 @@
|
|
|
941
948
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
942
949
|
*/
|
|
943
950
|
var RAWidgetContainer = /** @class */ (function () {
|
|
944
|
-
function RAWidgetContainer(dashboardService, ngxService, notifier) {
|
|
951
|
+
function RAWidgetContainer(dashboardService, ngxService, translateService, ngZone, notifier) {
|
|
945
952
|
this.dashboardService = dashboardService;
|
|
946
953
|
this.ngxService = ngxService;
|
|
954
|
+
this.translateService = translateService;
|
|
955
|
+
this.ngZone = ngZone;
|
|
947
956
|
this.notifier = notifier;
|
|
948
957
|
this.isIEOrEdge = /msie\s|trident\/|edge\//i.test(window.navigator.userAgent);
|
|
949
958
|
this.widgetDeleted = new core.EventEmitter();
|
|
@@ -964,7 +973,13 @@
|
|
|
964
973
|
* @return {?}
|
|
965
974
|
*/
|
|
966
975
|
function (e) {
|
|
967
|
-
|
|
976
|
+
console.log('in config changed subscription');
|
|
977
|
+
_this.ngZone.run((/**
|
|
978
|
+
* @return {?}
|
|
979
|
+
*/
|
|
980
|
+
function () {
|
|
981
|
+
_this.configChangeEventHandler(e);
|
|
982
|
+
}));
|
|
968
983
|
}));
|
|
969
984
|
}
|
|
970
985
|
if (this.widgetElement && changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
|
|
@@ -993,7 +1008,8 @@
|
|
|
993
1008
|
* @return {?}
|
|
994
1009
|
*/
|
|
995
1010
|
function () {
|
|
996
|
-
this.configChanged
|
|
1011
|
+
if (this.configChanged)
|
|
1012
|
+
this.configChanged.unsubscribe();
|
|
997
1013
|
};
|
|
998
1014
|
/** To Edit current widget configuration*/
|
|
999
1015
|
/**
|
|
@@ -1031,7 +1047,7 @@
|
|
|
1031
1047
|
widgetContainerContext.widgetDeleted.emit(_this.data.widgetInfo.widgetInstanceId);
|
|
1032
1048
|
}
|
|
1033
1049
|
else {
|
|
1034
|
-
widgetContainerContext.notifier.notify('error', "
|
|
1050
|
+
widgetContainerContext.notifier.notify('error', " " + _this.translateService.translate('FailedToRemoveWidget') + " (" + _this.data.widgetInfo.widgetTitle + ")!");
|
|
1035
1051
|
}
|
|
1036
1052
|
}));
|
|
1037
1053
|
};
|
|
@@ -1062,15 +1078,16 @@
|
|
|
1062
1078
|
//this.dashboardService.copyWidget(widgetInfo);
|
|
1063
1079
|
};
|
|
1064
1080
|
/**
|
|
1065
|
-
* @param {?}
|
|
1081
|
+
* @param {?} widgetInfo
|
|
1066
1082
|
* @return {?}
|
|
1067
1083
|
*/
|
|
1068
1084
|
RAWidgetContainer.prototype.configChangeEventHandler = /**
|
|
1069
|
-
* @param {?}
|
|
1085
|
+
* @param {?} widgetInfo
|
|
1070
1086
|
* @return {?}
|
|
1071
1087
|
*/
|
|
1072
|
-
function (
|
|
1073
|
-
this.data.widgetInfo
|
|
1088
|
+
function (widgetInfo) {
|
|
1089
|
+
this.data.widgetInfo = widgetInfo;
|
|
1090
|
+
// this.data.widgetInfo.widgetConfigInfo.config = config;
|
|
1074
1091
|
this.refreshWidget(this.data.widgetInfo);
|
|
1075
1092
|
this.updateWidget(this.data.widgetInfo);
|
|
1076
1093
|
};
|
|
@@ -1141,7 +1158,8 @@
|
|
|
1141
1158
|
var widgetConfigFilter = (/** @type {?} */ ({
|
|
1142
1159
|
config: widgetInfo.widgetConfigInfo.config,
|
|
1143
1160
|
globalFilter: this.globalFilter,
|
|
1144
|
-
appConfig: this.appConfig
|
|
1161
|
+
appConfig: this.appConfig,
|
|
1162
|
+
widgetInfo: widgetInfo
|
|
1145
1163
|
}));
|
|
1146
1164
|
widgetContainerContext.widgetElement.loadContent(widgetConfigFilter);
|
|
1147
1165
|
};
|
|
@@ -1156,6 +1174,8 @@
|
|
|
1156
1174
|
RAWidgetContainer.ctorParameters = function () { return [
|
|
1157
1175
|
{ type: RaDashboardService },
|
|
1158
1176
|
{ type: ngxUiLoader.NgxUiLoaderService },
|
|
1177
|
+
{ type: essBase.TranslateService },
|
|
1178
|
+
{ type: core.NgZone },
|
|
1159
1179
|
{ type: angularNotifier.NotifierService }
|
|
1160
1180
|
]; };
|
|
1161
1181
|
RAWidgetContainer.propDecorators = {
|