@schneideress/dashboardframework 0.0.129 → 0.0.131

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.
@@ -392,6 +392,8 @@ var RAEvent = {
392
392
  QuickLinkRefresh: "QuickLinkRefresh",
393
393
  /**To raise widget added event */
394
394
  WidgetAdded: "WidgetAdded",
395
+ /**To update global filter site from map widget selected site */
396
+ UpdateGlobalFilterFromMapWidget: "UpdateGlobalFilterFromMapWidget",
395
397
  };
396
398
  /** @enum {string} */
397
399
  var RAEventKey = {
@@ -1032,7 +1034,6 @@ var RADashboardArea = /** @class */ (function () {
1032
1034
  */
1033
1035
  function (widgetInstanceId, isalertDisabled) {
1034
1036
  if (isalertDisabled === void 0) { isalertDisabled = false; }
1035
- debugger;
1036
1037
  console.log("goCorona");
1037
1038
  /** @type {?} */
1038
1039
  var widget = this.widgetList.filter((/**
@@ -1417,7 +1418,15 @@ var RAWidgetContainer = /** @class */ (function () {
1417
1418
  }));
1418
1419
  }
1419
1420
  if (this.widgetElement && changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
1420
- this.refreshWidget(this.data.widgetInfo);
1421
+ /** @type {?} */
1422
+ var filterObj = this.getParsedConfig(this.globalFilter);
1423
+ if (filterObj.WidgetInstanceId) {
1424
+ if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
1425
+ this.refreshWidget(this.data.widgetInfo);
1426
+ }
1427
+ else {
1428
+ this.refreshWidget(this.data.widgetInfo);
1429
+ }
1421
1430
  }
1422
1431
  if (changes.width && changes.width.currentValue != changes.width.previousValue ||
1423
1432
  (changes.height && changes.height.currentValue != changes.height.previousValue)) {
@@ -1940,6 +1949,32 @@ var RAWidgetContainer = /** @class */ (function () {
1940
1949
  }
1941
1950
  this.isDownloadChartVisible = false;
1942
1951
  };
1952
+ /**
1953
+ * @private
1954
+ * @param {?} config
1955
+ * @return {?}
1956
+ */
1957
+ RAWidgetContainer.prototype.getParsedConfig = /**
1958
+ * @private
1959
+ * @param {?} config
1960
+ * @return {?}
1961
+ */
1962
+ function (config) {
1963
+ /** @type {?} */
1964
+ var parsedConfig;
1965
+ if (config) {
1966
+ if (typeof config === 'string') {
1967
+ try {
1968
+ parsedConfig = JSON.parse(config);
1969
+ }
1970
+ catch (_a) {
1971
+ parsedConfig = {};
1972
+ }
1973
+ return parsedConfig;
1974
+ }
1975
+ }
1976
+ return config;
1977
+ };
1943
1978
  RAWidgetContainer.decorators = [
1944
1979
  { type: Component, args: [{
1945
1980
  selector: 'ra-widget-container',