@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
|
@@ -5,6 +5,7 @@ import { BaseService } from '@schneideress/ess-util';
|
|
|
5
5
|
import { filter, map } from 'rxjs/operators';
|
|
6
6
|
import { NgxUiLoaderService, NgxUiLoaderModule } from 'ngx-ui-loader';
|
|
7
7
|
import { NotifierService, NotifierModule } from 'angular-notifier';
|
|
8
|
+
import { TranslateService } from '@schneideress/ess-base';
|
|
8
9
|
import { BrowserModule } from '@angular/platform-browser';
|
|
9
10
|
import { HttpClientModule } from '@angular/common/http';
|
|
10
11
|
import { CommonModule } from '@angular/common';
|
|
@@ -176,6 +177,7 @@ var RaDashboardService = /** @class */ (function (_super) {
|
|
|
176
177
|
*/
|
|
177
178
|
function (widgetInfo, appConfig) {
|
|
178
179
|
this.baseUrl = appConfig.apiBaseUrl;
|
|
180
|
+
console.log('in update widget service');
|
|
179
181
|
return this.post('widget/UpdateUserWidget', widgetInfo);
|
|
180
182
|
};
|
|
181
183
|
/** To Move or change position if current widget container*/
|
|
@@ -471,10 +473,11 @@ var GridsterConfigDefaultSettings = {
|
|
|
471
473
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
472
474
|
*/
|
|
473
475
|
var RADashboardArea = /** @class */ (function () {
|
|
474
|
-
function RADashboardArea(dashboardService, ngZone, ngxService, notifier) {
|
|
476
|
+
function RADashboardArea(dashboardService, ngZone, ngxService, translateService, notifier) {
|
|
475
477
|
this.dashboardService = dashboardService;
|
|
476
478
|
this.ngZone = ngZone;
|
|
477
479
|
this.ngxService = ngxService;
|
|
480
|
+
this.translateService = translateService;
|
|
478
481
|
this.notifier = notifier;
|
|
479
482
|
this.widgetList = Array();
|
|
480
483
|
this.gridheight = 300;
|
|
@@ -606,10 +609,14 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
606
609
|
* @return {?}
|
|
607
610
|
*/
|
|
608
611
|
function () {
|
|
609
|
-
this.conifgAddClick
|
|
610
|
-
|
|
611
|
-
this.
|
|
612
|
-
|
|
612
|
+
if (this.conifgAddClick)
|
|
613
|
+
this.conifgAddClick.unsubscribe();
|
|
614
|
+
if (this.widgetAddEvent)
|
|
615
|
+
this.widgetAddEvent.unsubscribe();
|
|
616
|
+
if (this.widgetDeleteEvent)
|
|
617
|
+
this.widgetDeleteEvent.unsubscribe();
|
|
618
|
+
if (this.widgetLibraryDoneClick)
|
|
619
|
+
this.widgetLibraryDoneClick.unsubscribe();
|
|
613
620
|
};
|
|
614
621
|
/**To update position/dimention of all widgets in the area */
|
|
615
622
|
/**
|
|
@@ -722,7 +729,7 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
722
729
|
this.widgetList.splice(this.widgetList.indexOf(widget[0]), 1);
|
|
723
730
|
this.setAreaHeight();
|
|
724
731
|
if (!isalertDisabled) {
|
|
725
|
-
this.notifier.notify('success', "
|
|
732
|
+
this.notifier.notify('success', " " + this.translateService.translate('DeletedSuccesfully') + " [" + widget[0].widgetInfo.widgetTitle + "] " + this.translateService.translate('Widget') + " ");
|
|
726
733
|
}
|
|
727
734
|
}
|
|
728
735
|
};
|
|
@@ -879,7 +886,7 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
879
886
|
{ type: Component, args: [{
|
|
880
887
|
selector: 'ra-dashboard-area',
|
|
881
888
|
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",
|
|
882
|
-
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}"]
|
|
889
|
+
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}"]
|
|
883
890
|
}] }
|
|
884
891
|
];
|
|
885
892
|
/** @nocollapse */
|
|
@@ -887,6 +894,7 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
887
894
|
{ type: RaDashboardService },
|
|
888
895
|
{ type: NgZone },
|
|
889
896
|
{ type: NgxUiLoaderService },
|
|
897
|
+
{ type: TranslateService },
|
|
890
898
|
{ type: NotifierService }
|
|
891
899
|
]; };
|
|
892
900
|
RADashboardArea.propDecorators = {
|
|
@@ -906,9 +914,11 @@ var RADashboardArea = /** @class */ (function () {
|
|
|
906
914
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
907
915
|
*/
|
|
908
916
|
var RAWidgetContainer = /** @class */ (function () {
|
|
909
|
-
function RAWidgetContainer(dashboardService, ngxService, notifier) {
|
|
917
|
+
function RAWidgetContainer(dashboardService, ngxService, translateService, ngZone, notifier) {
|
|
910
918
|
this.dashboardService = dashboardService;
|
|
911
919
|
this.ngxService = ngxService;
|
|
920
|
+
this.translateService = translateService;
|
|
921
|
+
this.ngZone = ngZone;
|
|
912
922
|
this.notifier = notifier;
|
|
913
923
|
this.isIEOrEdge = /msie\s|trident\/|edge\//i.test(window.navigator.userAgent);
|
|
914
924
|
this.widgetDeleted = new EventEmitter();
|
|
@@ -929,7 +939,13 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
929
939
|
* @return {?}
|
|
930
940
|
*/
|
|
931
941
|
function (e) {
|
|
932
|
-
|
|
942
|
+
console.log('in config changed subscription');
|
|
943
|
+
_this.ngZone.run((/**
|
|
944
|
+
* @return {?}
|
|
945
|
+
*/
|
|
946
|
+
function () {
|
|
947
|
+
_this.configChangeEventHandler(e);
|
|
948
|
+
}));
|
|
933
949
|
}));
|
|
934
950
|
}
|
|
935
951
|
if (this.widgetElement && changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
|
|
@@ -958,7 +974,8 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
958
974
|
* @return {?}
|
|
959
975
|
*/
|
|
960
976
|
function () {
|
|
961
|
-
this.configChanged
|
|
977
|
+
if (this.configChanged)
|
|
978
|
+
this.configChanged.unsubscribe();
|
|
962
979
|
};
|
|
963
980
|
/** To Edit current widget configuration*/
|
|
964
981
|
/**
|
|
@@ -996,7 +1013,7 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
996
1013
|
widgetContainerContext.widgetDeleted.emit(_this.data.widgetInfo.widgetInstanceId);
|
|
997
1014
|
}
|
|
998
1015
|
else {
|
|
999
|
-
widgetContainerContext.notifier.notify('error', "
|
|
1016
|
+
widgetContainerContext.notifier.notify('error', " " + _this.translateService.translate('FailedToRemoveWidget') + " (" + _this.data.widgetInfo.widgetTitle + ")!");
|
|
1000
1017
|
}
|
|
1001
1018
|
}));
|
|
1002
1019
|
};
|
|
@@ -1027,15 +1044,16 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1027
1044
|
//this.dashboardService.copyWidget(widgetInfo);
|
|
1028
1045
|
};
|
|
1029
1046
|
/**
|
|
1030
|
-
* @param {?}
|
|
1047
|
+
* @param {?} widgetInfo
|
|
1031
1048
|
* @return {?}
|
|
1032
1049
|
*/
|
|
1033
1050
|
RAWidgetContainer.prototype.configChangeEventHandler = /**
|
|
1034
|
-
* @param {?}
|
|
1051
|
+
* @param {?} widgetInfo
|
|
1035
1052
|
* @return {?}
|
|
1036
1053
|
*/
|
|
1037
|
-
function (
|
|
1038
|
-
this.data.widgetInfo
|
|
1054
|
+
function (widgetInfo) {
|
|
1055
|
+
this.data.widgetInfo = widgetInfo;
|
|
1056
|
+
// this.data.widgetInfo.widgetConfigInfo.config = config;
|
|
1039
1057
|
this.refreshWidget(this.data.widgetInfo);
|
|
1040
1058
|
this.updateWidget(this.data.widgetInfo);
|
|
1041
1059
|
};
|
|
@@ -1106,7 +1124,8 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1106
1124
|
var widgetConfigFilter = (/** @type {?} */ ({
|
|
1107
1125
|
config: widgetInfo.widgetConfigInfo.config,
|
|
1108
1126
|
globalFilter: this.globalFilter,
|
|
1109
|
-
appConfig: this.appConfig
|
|
1127
|
+
appConfig: this.appConfig,
|
|
1128
|
+
widgetInfo: widgetInfo
|
|
1110
1129
|
}));
|
|
1111
1130
|
widgetContainerContext.widgetElement.loadContent(widgetConfigFilter);
|
|
1112
1131
|
};
|
|
@@ -1121,6 +1140,8 @@ var RAWidgetContainer = /** @class */ (function () {
|
|
|
1121
1140
|
RAWidgetContainer.ctorParameters = function () { return [
|
|
1122
1141
|
{ type: RaDashboardService },
|
|
1123
1142
|
{ type: NgxUiLoaderService },
|
|
1143
|
+
{ type: TranslateService },
|
|
1144
|
+
{ type: NgZone },
|
|
1124
1145
|
{ type: NotifierService }
|
|
1125
1146
|
]; };
|
|
1126
1147
|
RAWidgetContainer.propDecorators = {
|
|
@@ -5764,15 +5785,5 @@ var RaBaseDashboardFilter = /** @class */ (function () {
|
|
|
5764
5785
|
return RaBaseDashboardFilter;
|
|
5765
5786
|
}());
|
|
5766
5787
|
|
|
5767
|
-
/**
|
|
5768
|
-
* @fileoverview added by tsickle
|
|
5769
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5770
|
-
*/
|
|
5771
|
-
|
|
5772
|
-
/**
|
|
5773
|
-
* @fileoverview added by tsickle
|
|
5774
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5775
|
-
*/
|
|
5776
|
-
|
|
5777
5788
|
export { DashboardFrameworkModule, RADashboardArea, RADashboardEventBus, RAEvent, RAEventKey, RAWidgetContainer, RaBaseDashboardFilter, RaBaseDashboardTemplate, RaDashboardService, GridsterModule as ɵa, GridsterComponent as ɵb, GridsterItemComponent as ɵc, GridsterPreviewComponent as ɵd, customNotifierOptions as ɵe };
|
|
5778
5789
|
//# sourceMappingURL=schneideress-dashboardframework.js.map
|