@schneideress/dashboardframework 0.0.22 → 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.
@@ -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;
@@ -761,7 +763,7 @@
761
763
  this.widgetList.splice(this.widgetList.indexOf(widget[0]), 1);
762
764
  this.setAreaHeight();
763
765
  if (!isalertDisabled) {
764
- this.notifier.notify('success', "Widget (" + widget[0].widgetInfo.widgetTitle + ") deleted successfully!");
766
+ this.notifier.notify('success', " " + this.translateService.translate('DeletedSuccesfully') + " [" + widget[0].widgetInfo.widgetTitle + "] " + this.translateService.translate('Widget') + " ");
765
767
  }
766
768
  }
767
769
  };
@@ -926,6 +928,7 @@
926
928
  { type: RaDashboardService },
927
929
  { type: core.NgZone },
928
930
  { type: ngxUiLoader.NgxUiLoaderService },
931
+ { type: essBase.TranslateService },
929
932
  { type: angularNotifier.NotifierService }
930
933
  ]; };
931
934
  RADashboardArea.propDecorators = {
@@ -945,9 +948,11 @@
945
948
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
946
949
  */
947
950
  var RAWidgetContainer = /** @class */ (function () {
948
- function RAWidgetContainer(dashboardService, ngxService, notifier) {
951
+ function RAWidgetContainer(dashboardService, ngxService, translateService, ngZone, notifier) {
949
952
  this.dashboardService = dashboardService;
950
953
  this.ngxService = ngxService;
954
+ this.translateService = translateService;
955
+ this.ngZone = ngZone;
951
956
  this.notifier = notifier;
952
957
  this.isIEOrEdge = /msie\s|trident\/|edge\//i.test(window.navigator.userAgent);
953
958
  this.widgetDeleted = new core.EventEmitter();
@@ -968,7 +973,13 @@
968
973
  * @return {?}
969
974
  */
970
975
  function (e) {
971
- _this.configChangeEventHandler(e);
976
+ console.log('in config changed subscription');
977
+ _this.ngZone.run((/**
978
+ * @return {?}
979
+ */
980
+ function () {
981
+ _this.configChangeEventHandler(e);
982
+ }));
972
983
  }));
973
984
  }
974
985
  if (this.widgetElement && changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
@@ -1036,7 +1047,7 @@
1036
1047
  widgetContainerContext.widgetDeleted.emit(_this.data.widgetInfo.widgetInstanceId);
1037
1048
  }
1038
1049
  else {
1039
- widgetContainerContext.notifier.notify('error', "Failed to remove widget (" + _this.data.widgetInfo.widgetTitle + ")!");
1050
+ widgetContainerContext.notifier.notify('error', " " + _this.translateService.translate('FailedToRemoveWidget') + " (" + _this.data.widgetInfo.widgetTitle + ")!");
1040
1051
  }
1041
1052
  }));
1042
1053
  };
@@ -1067,15 +1078,16 @@
1067
1078
  //this.dashboardService.copyWidget(widgetInfo);
1068
1079
  };
1069
1080
  /**
1070
- * @param {?} config
1081
+ * @param {?} widgetInfo
1071
1082
  * @return {?}
1072
1083
  */
1073
1084
  RAWidgetContainer.prototype.configChangeEventHandler = /**
1074
- * @param {?} config
1085
+ * @param {?} widgetInfo
1075
1086
  * @return {?}
1076
1087
  */
1077
- function (config) {
1078
- this.data.widgetInfo.widgetConfigInfo.config = config;
1088
+ function (widgetInfo) {
1089
+ this.data.widgetInfo = widgetInfo;
1090
+ // this.data.widgetInfo.widgetConfigInfo.config = config;
1079
1091
  this.refreshWidget(this.data.widgetInfo);
1080
1092
  this.updateWidget(this.data.widgetInfo);
1081
1093
  };
@@ -1146,7 +1158,8 @@
1146
1158
  var widgetConfigFilter = (/** @type {?} */ ({
1147
1159
  config: widgetInfo.widgetConfigInfo.config,
1148
1160
  globalFilter: this.globalFilter,
1149
- appConfig: this.appConfig
1161
+ appConfig: this.appConfig,
1162
+ widgetInfo: widgetInfo
1150
1163
  }));
1151
1164
  widgetContainerContext.widgetElement.loadContent(widgetConfigFilter);
1152
1165
  };
@@ -1161,6 +1174,8 @@
1161
1174
  RAWidgetContainer.ctorParameters = function () { return [
1162
1175
  { type: RaDashboardService },
1163
1176
  { type: ngxUiLoader.NgxUiLoaderService },
1177
+ { type: essBase.TranslateService },
1178
+ { type: core.NgZone },
1164
1179
  { type: angularNotifier.NotifierService }
1165
1180
  ]; };
1166
1181
  RAWidgetContainer.propDecorators = {