@hpcc-js/eclwatch 2.77.3 → 2.77.4

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/dist/index.es6.js CHANGED
@@ -10,8 +10,8 @@ import { Legend, Carousel, ChartPanel } from '@hpcc-js/layout';
10
10
  import { ReactTimelineSeries } from '@hpcc-js/timeline';
11
11
 
12
12
  var PKG_NAME = "@hpcc-js/eclwatch";
13
- var PKG_VERSION = "2.77.3";
14
- var BUILD_VERSION = "2.108.3";
13
+ var PKG_VERSION = "2.77.4";
14
+ var BUILD_VERSION = "2.108.4";
15
15
 
16
16
  /******************************************************************************
17
17
  Copyright (c) Microsoft Corporation.
@@ -1084,7 +1084,7 @@ function safeEncode(item) {
1084
1084
  return item;
1085
1085
  }
1086
1086
  var Store = /** @class */ (function () {
1087
- function Store(wuResult, schema, renderHtml, filter) {
1087
+ function Store(wuResult, schema, renderHtml, filter, onError) {
1088
1088
  if (filter === void 0) { filter = {}; }
1089
1089
  this._cache = {};
1090
1090
  this._filter = {};
@@ -1093,6 +1093,7 @@ var Store = /** @class */ (function () {
1093
1093
  this._columns = this.schema2Columns(this.schema.root);
1094
1094
  this.rowFormatter = new RowFormatter(this._columns, renderHtml);
1095
1095
  this._filter = filter;
1096
+ this.onError = onError;
1096
1097
  }
1097
1098
  Store.prototype.columns = function () {
1098
1099
  return this._columns;
@@ -1246,6 +1247,9 @@ var Store = /** @class */ (function () {
1246
1247
  return formattedRow;
1247
1248
  })
1248
1249
  };
1250
+ }).catch(function (err) {
1251
+ _this.onError(err.Message || "An exception has occurred");
1252
+ return { totalLength: 0, data: [] };
1249
1253
  });
1250
1254
  this._cache[cacheKey] = retVal;
1251
1255
  return retVal;
@@ -1316,7 +1320,12 @@ var WUResult = /** @class */ (function (_super) {
1316
1320
  if (result_1) {
1317
1321
  result_1.fetchXMLSchema().then(function (schema) {
1318
1322
  var _a, _b;
1319
- _this._localStore = new Store(result_1, schema, _this.renderHtml(), _this.filter());
1323
+ _this._localStore = new Store(result_1, schema, _this.renderHtml(), _this.filter(), function (msg) {
1324
+ if (_this._dgrid) {
1325
+ _this._dgrid.noDataMessage = "<span class='dojoxGridNoData'>".concat(msg, "</span>");
1326
+ _this._dgrid.refresh();
1327
+ }
1328
+ });
1320
1329
  (_a = _this._dgrid) === null || _a === void 0 ? void 0 : _a.set("columns", _this._localStore.columns());
1321
1330
  (_b = _this._dgrid) === null || _b === void 0 ? void 0 : _b.set("collection", _this._localStore);
1322
1331
  });