@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.
- package/bundles/sumaris-net.ngx-components.umd.js +8 -8
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +3 -0
- package/esm2015/src/app/core/services/base-entity-service.class.js +6 -6
- package/esm2015/src/app/shared/platforms.js +3 -3
- package/fesm2015/sumaris-net.ngx-components.js +7 -7
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/i18n/en-US.json +21 -2
- package/src/assets/i18n/en.json +19 -1
- package/src/assets/i18n/fr.json +2 -2
|
@@ -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,
|
|
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
|
-
|
|
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 <
|
|
24476
|
-
|
|
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*/,
|
|
24479
|
+
return [2 /*return*/, result];
|
|
24480
24480
|
}
|
|
24481
24481
|
});
|
|
24482
24482
|
});
|