@sumaris-net/ngx-components 1.15.5 → 1.15.8
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 +19 -14
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/form/entity-editor.class.js +5 -2
- package/esm2015/src/app/core/services/platform.service.js +12 -2
- package/esm2015/src/app/shared/platforms.js +3 -11
- package/fesm2015/sumaris-net.ngx-components.js +18 -13
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/services/platform.service.d.ts +4 -0
- package/src/app/shared/platforms.d.ts +1 -6
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -4687,17 +4687,9 @@
|
|
|
4687
4687
|
var userAgent = win.navigator.userAgent || win.navigator.vendor || window.opera;
|
|
4688
4688
|
return expr.test(userAgent);
|
|
4689
4689
|
};
|
|
4690
|
-
var
|
|
4691
|
-
var userAgent = win.navigator.userAgent || win.navigator.vendor || window.opera;
|
|
4692
|
-
return /windows/i.test(userAgent);
|
|
4693
|
-
};
|
|
4694
|
-
/**
|
|
4695
|
-
* Detect desktop, by fine cursor. See https://github.com/ionic-team/ionic-framework/issues/19942
|
|
4696
|
-
* @param win
|
|
4697
|
-
*/
|
|
4698
|
-
var isDesktop = function (win) { return matchMedia(win, '(any-pointer:fine)'); };
|
|
4690
|
+
var isWindows = function (win) { return testUserAgent(win, /windows/i); };
|
|
4699
4691
|
var isTouchUi = function (win) { return matchMedia(win, '(any-pointer:coarse)'); };
|
|
4700
|
-
var isMobile = function (win) { return isTouchUi(win) && !
|
|
4692
|
+
var isMobile = function (win) { return isTouchUi(win) && !isWindows(win); };
|
|
4701
4693
|
var isIpad = function (win) {
|
|
4702
4694
|
// iOS 12 and below
|
|
4703
4695
|
if (testUserAgent(win, /iPad/i)) {
|
|
@@ -17759,6 +17751,10 @@
|
|
|
17759
17751
|
var templateObject_1$3, templateObject_2$3, templateObject_3$2, templateObject_4$2, templateObject_5$1;
|
|
17760
17752
|
|
|
17761
17753
|
var moment$3 = momentImported__namespace;
|
|
17754
|
+
var AndroidOsEnvironment = Object.freeze({
|
|
17755
|
+
DIRECTORY_DOWNLOADS: 'Download',
|
|
17756
|
+
DIRECTORY_DOWNLOADS_OLD: 'Downloads',
|
|
17757
|
+
});
|
|
17762
17758
|
var PlatformService = /** @class */ (function (_super) {
|
|
17763
17759
|
__extends(PlatformService, _super);
|
|
17764
17760
|
function PlatformService(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
|
|
@@ -17955,7 +17951,7 @@
|
|
|
17955
17951
|
var location$ = this._downloadingJobs.get(request.uri);
|
|
17956
17952
|
if (location$)
|
|
17957
17953
|
return location$;
|
|
17958
|
-
request = Object.assign(Object.assign({ visibleInDownloadsUi: true, notificationVisibility: ngx$6.NotificationVisibility.VisibleNotifyCompleted, title: request.title || request.filename }, request), { destinationInExternalPublicDir: Object.assign({ dirType:
|
|
17954
|
+
request = Object.assign(Object.assign({ visibleInDownloadsUi: true, notificationVisibility: ngx$6.NotificationVisibility.VisibleNotifyCompleted, title: request.title || request.filename }, request), { destinationInExternalPublicDir: Object.assign({ dirType: AndroidOsEnvironment.DIRECTORY_DOWNLOADS, subPath: request.filename || request.title || '' }, request.destinationInExternalPublicDir) });
|
|
17959
17955
|
console.debug('[platform] Downloading, using request: ' + JSON.stringify(request));
|
|
17960
17956
|
// Start download
|
|
17961
17957
|
location$ = rxjs.from(this.downloader.download(request));
|
|
@@ -17968,9 +17964,15 @@
|
|
|
17968
17964
|
_this._downloadingJobs.delete(request.uri);
|
|
17969
17965
|
return location;
|
|
17970
17966
|
}), operators.catchError(function (err) {
|
|
17967
|
+
var _a;
|
|
17971
17968
|
console.error('[platform] Unable to download: ' + (err && err.message || err));
|
|
17972
17969
|
// Forget the request
|
|
17973
17970
|
_this._downloadingJobs.delete(request.uri);
|
|
17971
|
+
// Retry with another location - issue in older Android version
|
|
17972
|
+
if (((_a = request.destinationInExternalPublicDir) === null || _a === void 0 ? void 0 : _a.dirType) === AndroidOsEnvironment.DIRECTORY_DOWNLOADS) {
|
|
17973
|
+
request.destinationInExternalPublicDir.dirType = AndroidOsEnvironment.DIRECTORY_DOWNLOADS_OLD;
|
|
17974
|
+
return _this.download(request);
|
|
17975
|
+
}
|
|
17974
17976
|
throw err;
|
|
17975
17977
|
}));
|
|
17976
17978
|
}
|
|
@@ -28353,7 +28355,10 @@
|
|
|
28353
28355
|
}
|
|
28354
28356
|
};
|
|
28355
28357
|
AppEntityEditor.prototype.setError = function (err, opts) {
|
|
28356
|
-
if (!err
|
|
28358
|
+
if (!err) {
|
|
28359
|
+
this.error = undefined;
|
|
28360
|
+
}
|
|
28361
|
+
else if (typeof err === 'string') {
|
|
28357
28362
|
console.error('[entity-editor] Error: ' + (err || ''));
|
|
28358
28363
|
this.error = err;
|
|
28359
28364
|
}
|
|
@@ -31231,6 +31236,7 @@
|
|
|
31231
31236
|
exports.AdminModule = AdminModule;
|
|
31232
31237
|
exports.AdminRoutingModule = AdminRoutingModule;
|
|
31233
31238
|
exports.Alerts = Alerts;
|
|
31239
|
+
exports.AndroidOsEnvironment = AndroidOsEnvironment;
|
|
31234
31240
|
exports.AppEditor = AppEditor;
|
|
31235
31241
|
exports.AppEditorOptions = AppEditorOptions;
|
|
31236
31242
|
exports.AppEntityEditor = AppEntityEditor;
|
|
@@ -31526,7 +31532,6 @@
|
|
|
31526
31532
|
exports.isAndroid = isAndroid;
|
|
31527
31533
|
exports.isControlHasInput = isControlHasInput;
|
|
31528
31534
|
exports.isCordova = isCordova;
|
|
31529
|
-
exports.isDesktop = isDesktop;
|
|
31530
31535
|
exports.isEmptyArray = isEmptyArray;
|
|
31531
31536
|
exports.isIOS = isIOS;
|
|
31532
31537
|
exports.isInputElement = isInputElement;
|
|
@@ -31546,7 +31551,7 @@
|
|
|
31546
31551
|
exports.isProgressEvent = isProgressEvent;
|
|
31547
31552
|
exports.isResponseEvent = isResponseEvent;
|
|
31548
31553
|
exports.isTouchUi = isTouchUi;
|
|
31549
|
-
exports.
|
|
31554
|
+
exports.isWindows = isWindows;
|
|
31550
31555
|
exports.joinProperties = joinProperties;
|
|
31551
31556
|
exports.joinPropertiesPath = joinPropertiesPath;
|
|
31552
31557
|
exports.logFormErrors = logFormErrors;
|