@sumaris-net/ngx-components 1.19.1 → 1.19.2

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.
@@ -1357,13 +1357,13 @@
1357
1357
  var isIOS = function (win) { return testUserAgent(win, /iPhone|iPod/i) || isIpad(win); };
1358
1358
  var isAndroid = function (win) { return testUserAgent(win, /android|sink/i); };
1359
1359
  var isCordova = function (win) {
1360
- if (_cache.cordova === undefined) {
1360
+ if (_cache.cordova === null || _cache.cordova === undefined) {
1361
1361
  _cache.cordova = !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
1362
1362
  }
1363
1363
  return _cache.cordova;
1364
1364
  };
1365
1365
  var isMobile = function (win) {
1366
- if (_cache.mobile === undefined) {
1366
+ if (_cache.mobile === null || _cache.mobile === undefined) {
1367
1367
  _cache.mobile = isCordova(window)
1368
1368
  || isAndroid(win) || isIOS(window)
1369
1369
  || (isTouchUi(win) && !isWindows(win));
@@ -24431,7 +24431,7 @@
24431
24431
  };
24432
24432
  BaseEntityService.prototype.loadAll = function (offset, size, sortBy, sortDirection, filter, opts) {
24433
24433
  return __awaiter(this, void 0, void 0, function () {
24434
- var debug, variables, now, withTotal, query, _b, data, total, entities, res, nextOffset_1;
24434
+ var debug, variables, now, withTotal, query, _b, data, total, entities, result, nextOffset_1;
24435
24435
  var _this = this;
24436
24436
  return __generator(this, function (_c) {
24437
24437
  switch (_c.label) {
@@ -24465,18 +24465,18 @@
24465
24465
  (data || []);
24466
24466
  if (debug)
24467
24467
  console.debug(this._logPrefix + (this._logTypeName + " items loaded in " + (Date.now() - now) + "ms"));
24468
- res = {
24468
+ result = {
24469
24469
  data: entities,
24470
- total: total
24470
+ total: total || entities.length
24471
24471
  };
24472
24472
  // Add fetch more capability, if total was fetched
24473
24473
  if (withTotal) {
24474
24474
  nextOffset_1 = (offset || 0) + entities.length;
24475
- if (nextOffset_1 < res.total) {
24476
- res.fetchMore = function () { return _this.loadAll(nextOffset_1, size, sortBy, sortDirection, filter, opts); };
24475
+ if (nextOffset_1 < result.total) {
24476
+ result.fetchMore = function () { return _this.loadAll(nextOffset_1, size, sortBy, sortDirection, filter, opts); };
24477
24477
  }
24478
24478
  }
24479
- return [2 /*return*/, res];
24479
+ return [2 /*return*/, result];
24480
24480
  }
24481
24481
  });
24482
24482
  });