@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.
@@ -598,6 +598,8 @@
598
598
  QuickLinkRefresh: "QuickLinkRefresh",
599
599
  /**To raise widget added event */
600
600
  WidgetAdded: "WidgetAdded",
601
+ /**To update global filter site from map widget selected site */
602
+ UpdateGlobalFilterFromMapWidget: "UpdateGlobalFilterFromMapWidget",
601
603
  };
602
604
  /** @enum {string} */
603
605
  var RAEventKey = {
@@ -1238,7 +1240,6 @@
1238
1240
  */
1239
1241
  function (widgetInstanceId, isalertDisabled) {
1240
1242
  if (isalertDisabled === void 0) { isalertDisabled = false; }
1241
- debugger;
1242
1243
  console.log("goCorona");
1243
1244
  /** @type {?} */
1244
1245
  var widget = this.widgetList.filter((/**
@@ -1623,7 +1624,15 @@
1623
1624
  }));
1624
1625
  }
1625
1626
  if (this.widgetElement && changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
1626
- this.refreshWidget(this.data.widgetInfo);
1627
+ /** @type {?} */
1628
+ var filterObj = this.getParsedConfig(this.globalFilter);
1629
+ if (filterObj.WidgetInstanceId) {
1630
+ if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
1631
+ this.refreshWidget(this.data.widgetInfo);
1632
+ }
1633
+ else {
1634
+ this.refreshWidget(this.data.widgetInfo);
1635
+ }
1627
1636
  }
1628
1637
  if (changes.width && changes.width.currentValue != changes.width.previousValue ||
1629
1638
  (changes.height && changes.height.currentValue != changes.height.previousValue)) {
@@ -2146,6 +2155,32 @@
2146
2155
  }
2147
2156
  this.isDownloadChartVisible = false;
2148
2157
  };
2158
+ /**
2159
+ * @private
2160
+ * @param {?} config
2161
+ * @return {?}
2162
+ */
2163
+ RAWidgetContainer.prototype.getParsedConfig = /**
2164
+ * @private
2165
+ * @param {?} config
2166
+ * @return {?}
2167
+ */
2168
+ function (config) {
2169
+ /** @type {?} */
2170
+ var parsedConfig;
2171
+ if (config) {
2172
+ if (typeof config === 'string') {
2173
+ try {
2174
+ parsedConfig = JSON.parse(config);
2175
+ }
2176
+ catch (_a) {
2177
+ parsedConfig = {};
2178
+ }
2179
+ return parsedConfig;
2180
+ }
2181
+ }
2182
+ return config;
2183
+ };
2149
2184
  RAWidgetContainer.decorators = [
2150
2185
  { type: core.Component, args: [{
2151
2186
  selector: 'ra-widget-container',