@sumaris-net/ngx-components 2.3.0 → 2.3.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/esm2020/public_api.mjs +2 -1
- package/esm2020/src/app/admin/users/users.mjs +1 -1
- package/esm2020/src/app/core/auth/auth.form.mjs +1 -1
- package/esm2020/src/app/core/graphql/graphql.service.mjs +1 -1
- package/esm2020/src/app/core/graphql/graphql.utils.mjs +1 -1
- package/esm2020/src/app/core/services/account.service.mjs +1 -1
- package/esm2020/src/app/core/services/base-graphql-service.class.mjs +1 -1
- package/esm2020/src/app/core/services/config/core.config.mjs +1 -1
- package/esm2020/src/app/core/services/network.service.mjs +3 -24
- package/esm2020/src/app/core/services/network.types.mjs +20 -0
- package/esm2020/src/app/core/services/platform.service.mjs +1 -1
- package/esm2020/src/app/shared/services/entity-service.class.mjs +1 -1
- package/fesm2015/sumaris-net.ngx-components.mjs +20 -22
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +20 -22
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/src/app/core/graphql/graphql.service.d.ts +1 -1
- package/src/app/core/graphql/graphql.utils.d.ts +4 -1
- package/src/app/core/services/account.service.d.ts +2 -1
- package/src/app/core/services/base-graphql-service.class.d.ts +1 -1
- package/src/app/core/services/network.service.d.ts +2 -5
- package/src/app/core/services/network.types.d.ts +5 -0
- package/src/app/shared/services/entity-service.class.d.ts +1 -1
|
@@ -14553,6 +14553,25 @@ StartableObservableService = __decorate([
|
|
|
14553
14553
|
__param(0, Optional())
|
|
14554
14554
|
], StartableObservableService);
|
|
14555
14555
|
|
|
14556
|
+
function getConnectionType(type) {
|
|
14557
|
+
switch (type) {
|
|
14558
|
+
case Connection.NONE:
|
|
14559
|
+
return 'none';
|
|
14560
|
+
case Connection.ETHERNET:
|
|
14561
|
+
return 'ethernet';
|
|
14562
|
+
case Connection.WIFI:
|
|
14563
|
+
return 'wifi';
|
|
14564
|
+
case Connection.CELL:
|
|
14565
|
+
case Connection.CELL_2G:
|
|
14566
|
+
case Connection.CELL_3G:
|
|
14567
|
+
case Connection.CELL_4G:
|
|
14568
|
+
return 'cellular';
|
|
14569
|
+
case Connection.UNKNOWN:
|
|
14570
|
+
default:
|
|
14571
|
+
return 'unknown';
|
|
14572
|
+
}
|
|
14573
|
+
}
|
|
14574
|
+
|
|
14556
14575
|
// Base58 encoding/decoding
|
|
14557
14576
|
// Originally written by Mike Hearn for BitcoinJ
|
|
14558
14577
|
// Copyright (c) 2011 Google Inc
|
|
@@ -14735,25 +14754,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
14735
14754
|
args: [{ providedIn: 'root' }]
|
|
14736
14755
|
}] });
|
|
14737
14756
|
|
|
14738
|
-
function getConnectionType(type) {
|
|
14739
|
-
switch (type) {
|
|
14740
|
-
case Connection.NONE:
|
|
14741
|
-
return 'none';
|
|
14742
|
-
case Connection.ETHERNET:
|
|
14743
|
-
return 'ethernet';
|
|
14744
|
-
case Connection.WIFI:
|
|
14745
|
-
return 'wifi';
|
|
14746
|
-
case Connection.CELL:
|
|
14747
|
-
case Connection.CELL_2G:
|
|
14748
|
-
case Connection.CELL_3G:
|
|
14749
|
-
case Connection.CELL_4G:
|
|
14750
|
-
return 'cell';
|
|
14751
|
-
case Connection.UNKNOWN:
|
|
14752
|
-
return 'unknown';
|
|
14753
|
-
default:
|
|
14754
|
-
return 'ethernet';
|
|
14755
|
-
}
|
|
14756
|
-
}
|
|
14757
14757
|
const NetworkRefreshTimerPeriod = {
|
|
14758
14758
|
MOBILE: 1000 * 60 * 10 /* every 10 min */,
|
|
14759
14759
|
DESKTOP: 1000 * 60 * 5 /* every 5 min */
|
|
@@ -15226,9 +15226,7 @@ class NetworkService extends StartableObservableService {
|
|
|
15226
15226
|
return uri;
|
|
15227
15227
|
}
|
|
15228
15228
|
onDeviceConnectionChanged(connectionType) {
|
|
15229
|
-
connectionType = (connectionType
|
|
15230
|
-
if (connectionType.startsWith('cell'))
|
|
15231
|
-
connectionType = 'cell';
|
|
15229
|
+
connectionType = getConnectionType(connectionType);
|
|
15232
15230
|
if (connectionType !== this._deviceConnectionType) {
|
|
15233
15231
|
this._deviceConnectionType = connectionType;
|
|
15234
15232
|
// If NOT already forced as offline, emit event
|