@schneideress/dashboardframework 0.0.232 → 0.0.233

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.
@@ -405,6 +405,8 @@ var RAEvent = {
405
405
  LaunchCustomWidgetFlyout: "LaunchCustomWidgetFlyout",
406
406
  /**update applied filter badge for inaplicable filters */
407
407
  UpdateAppledFiterForInapplicableFilter: "UpdateAppledFiterForInapplicableFilter",
408
+ /**show inapplicable filter message in global filter flyout */
409
+ ShowInapplicableFilterMessage: "ShowInapplicableFilterMessage",
408
410
  };
409
411
  /** @enum {string} */
410
412
  var RAEventKey = {
@@ -751,6 +753,7 @@ var RADashboardArea = /** @class */ (function () {
751
753
  this.gridheight = 300;
752
754
  this.gridcellHeight = 0;
753
755
  this.userWidgets = [];
756
+ this.PAMWidgets = [];
754
757
  this.isWidgetLoaded = false;
755
758
  this.domResized = false;
756
759
  this.showEmptyDashboard = false;
@@ -1105,6 +1108,21 @@ var RADashboardArea = /** @class */ (function () {
1105
1108
  */
1106
1109
  function (widgets) {
1107
1110
  _this.userWidgets = widgets;
1111
+ _this.PAMWidgets = [];
1112
+ widgets.forEach((/**
1113
+ * @param {?} element
1114
+ * @return {?}
1115
+ */
1116
+ function (element) {
1117
+ /** @type {?} */
1118
+ var settings = undefined;
1119
+ if (element.widgetSettings) {
1120
+ settings = JSON.parse(element.widgetSettings);
1121
+ if (settings && settings.isPAMWidget)
1122
+ _this.PAMWidgets.push(element.widgetInstanceId);
1123
+ }
1124
+ }));
1125
+ _this.checkPAMWidgets();
1108
1126
  if (widgets && widgets.length > 0) {
1109
1127
  _this.widgetList = _this.mapObjectListToGridsterItemList(widgets);
1110
1128
  _this.setAreaHeight();
@@ -1212,6 +1230,13 @@ var RADashboardArea = /** @class */ (function () {
1212
1230
  if (widget.length > 0) {
1213
1231
  this.userWidgets.splice(this.userWidgets.indexOf(widget[0]), 1);
1214
1232
  }
1233
+ if (this.PAMWidgets.length > 0) {
1234
+ /** @type {?} */
1235
+ var indx = this.PAMWidgets.indexOf(widgetInstanceId);
1236
+ if (indx > -1)
1237
+ this.PAMWidgets.splice(indx, 1);
1238
+ this.checkPAMWidgets();
1239
+ }
1215
1240
  this.widgetList.splice(this.widgetList.indexOf(gridsterItem[0]), 1);
1216
1241
  this.setAreaHeight();
1217
1242
  if (!isalertDisabled) {
@@ -1316,6 +1341,10 @@ var RADashboardArea = /** @class */ (function () {
1316
1341
  }));
1317
1342
  }
1318
1343
  }
1344
+ if (widget.settings && widget.settings.isPAMWidget) {
1345
+ _this.PAMWidgets.push(widget.widgetInstanceId);
1346
+ _this.checkPAMWidgets();
1347
+ }
1319
1348
  _this.raDashboardEventBus.publish(RAEvent.WidgetAdded, widget);
1320
1349
  }));
1321
1350
  };
@@ -1373,6 +1402,10 @@ var RADashboardArea = /** @class */ (function () {
1373
1402
  var gridsterItem = this.responsiveService.getGridsterItem(data);
1374
1403
  this.widgetList.push(gridsterItem);
1375
1404
  this.setAreaHeight();
1405
+ if (data.settings && data.settings.isPAMWidget) {
1406
+ this.PAMWidgets.push(data.widgetInstanceId);
1407
+ this.checkPAMWidgets();
1408
+ }
1376
1409
  };
1377
1410
  /**
1378
1411
  * @param {?} widgetList
@@ -1455,6 +1488,20 @@ var RADashboardArea = /** @class */ (function () {
1455
1488
  function (data) {
1456
1489
  this.raDashboardEventBus.publish(RAEvent.UpdateAppledFiterForInapplicableFilter, data);
1457
1490
  };
1491
+ /**
1492
+ * @return {?}
1493
+ */
1494
+ RADashboardArea.prototype.checkPAMWidgets = /**
1495
+ * @return {?}
1496
+ */
1497
+ function () {
1498
+ if (this.PAMWidgets.length > 0) {
1499
+ this.raDashboardEventBus.publish(RAEvent.ShowInapplicableFilterMessage, true);
1500
+ }
1501
+ else {
1502
+ this.raDashboardEventBus.publish(RAEvent.ShowInapplicableFilterMessage, false);
1503
+ }
1504
+ };
1458
1505
  RADashboardArea.decorators = [
1459
1506
  { type: Component, args: [{
1460
1507
  selector: 'ra-dashboard-area',
@@ -1496,6 +1543,8 @@ if (false) {
1496
1543
  RADashboardArea.prototype.gridcellHeight;
1497
1544
  /** @type {?} */
1498
1545
  RADashboardArea.prototype.userWidgets;
1546
+ /** @type {?} */
1547
+ RADashboardArea.prototype.PAMWidgets;
1499
1548
  /**
1500
1549
  * @type {?}
1501
1550
  * @private
@@ -8316,13 +8365,12 @@ var RaBaseDashboardFilter = /** @class */ (function () {
8316
8365
  function (async) {
8317
8366
  return _this.getFilterConfig();
8318
8367
  });
8319
- this.setAllFilterConfig = (/**
8320
- * @param {?} globalFilter
8321
- * @param {?} appConfig
8368
+ this.setInapplicableFilterMsg = (/**
8369
+ * @param {?} status
8322
8370
  * @return {?}
8323
8371
  */
8324
- function (globalFilter, appConfig) {
8325
- _this.setFilterConfig(globalFilter, appConfig);
8372
+ function (status) {
8373
+ _this.showHideInapplicableMsg(status);
8326
8374
  });
8327
8375
  this.isValidEntry = (/**
8328
8376
  * @return {?}
@@ -8336,6 +8384,14 @@ var RaBaseDashboardFilter = /** @class */ (function () {
8336
8384
  function () {
8337
8385
  _this.clearData();
8338
8386
  });
8387
+ this.setAllFilterConfig = (/**
8388
+ * @param {?} globalFilter
8389
+ * @param {?} appConfig
8390
+ * @return {?}
8391
+ */
8392
+ function (globalFilter, appConfig) {
8393
+ _this.setFilterConfig(globalFilter, appConfig);
8394
+ });
8339
8395
  }
8340
8396
  /**
8341
8397
  * @return {?}
@@ -8350,9 +8406,10 @@ var RaBaseDashboardFilter = /** @class */ (function () {
8350
8406
  };
8351
8407
  RaBaseDashboardFilter.propDecorators = {
8352
8408
  getAllFilterConfig: [{ type: Input }],
8353
- setAllFilterConfig: [{ type: Input }],
8409
+ setInapplicableFilterMsg: [{ type: Input }],
8354
8410
  isValidEntry: [{ type: Input }],
8355
- clearAllData: [{ type: Input }]
8411
+ clearAllData: [{ type: Input }],
8412
+ setAllFilterConfig: [{ type: Input }]
8356
8413
  };
8357
8414
  return RaBaseDashboardFilter;
8358
8415
  }());
@@ -8363,11 +8420,13 @@ if (false) {
8363
8420
  */
8364
8421
  RaBaseDashboardFilter.prototype.getAllFilterConfig;
8365
8422
  /** @type {?} */
8366
- RaBaseDashboardFilter.prototype.setAllFilterConfig;
8423
+ RaBaseDashboardFilter.prototype.setInapplicableFilterMsg;
8367
8424
  /** @type {?} */
8368
8425
  RaBaseDashboardFilter.prototype.isValidEntry;
8369
8426
  /** @type {?} */
8370
8427
  RaBaseDashboardFilter.prototype.clearAllData;
8428
+ /** @type {?} */
8429
+ RaBaseDashboardFilter.prototype.setAllFilterConfig;
8371
8430
  /**
8372
8431
  * @abstract
8373
8432
  * @return {?}
@@ -8390,6 +8449,12 @@ if (false) {
8390
8449
  * @return {?}
8391
8450
  */
8392
8451
  RaBaseDashboardFilter.prototype.isValid = function () { };
8452
+ /**
8453
+ * @abstract
8454
+ * @param {?} status
8455
+ * @return {?}
8456
+ */
8457
+ RaBaseDashboardFilter.prototype.showHideInapplicableMsg = function (status) { };
8393
8458
  }
8394
8459
 
8395
8460
  /**