@sumaris-net/ngx-components 18.27.10 → 18.27.11
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/doc/changelog.md +3 -0
- package/esm2022/src/app/core/services/account.service.mjs +10 -5
- package/fesm2022/sumaris-net.ngx-components.mjs +9 -4
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/services/account.service.d.ts +1 -1
- package/src/assets/manifest.json +1 -1
|
@@ -24469,7 +24469,10 @@ class AccountService extends BaseGraphqlService {
|
|
|
24469
24469
|
// Initialize GraphQL operations (allow overrides)
|
|
24470
24470
|
this.queries = { ...Queries$1, ...(accountOptions?.queries || {}) };
|
|
24471
24471
|
this.mutations = { ...Mutations$1, ...(accountOptions?.mutations || {}) };
|
|
24472
|
-
this.subscriptions = {
|
|
24472
|
+
this.subscriptions = {
|
|
24473
|
+
...AccountSubscriptions,
|
|
24474
|
+
...(accountOptions?.subscriptions || {}),
|
|
24475
|
+
};
|
|
24473
24476
|
this._enableListenChanges = !environment.account || environment.account.enableListenChanges !== false; // True by default
|
|
24474
24477
|
this._listenIntervalInSeconds = toNumber(environment.account && environment.account.listenIntervalInSeconds, 0); // no timer by default
|
|
24475
24478
|
this._debug = !environment.production;
|
|
@@ -25304,14 +25307,14 @@ class AccountService extends BaseGraphqlService {
|
|
|
25304
25307
|
console.error('[account] Error while saving account locally: ' + ((err && err.message) || err), err);
|
|
25305
25308
|
}
|
|
25306
25309
|
}
|
|
25307
|
-
async saveLocalSettingsRemotely(source) {
|
|
25310
|
+
async saveLocalSettingsRemotely(source, force) {
|
|
25308
25311
|
if (!source || !this.isLogin() || source.accountInheritance === false)
|
|
25309
25312
|
return; // Skip
|
|
25310
25313
|
const account = this.account;
|
|
25311
25314
|
// Merge local settings into account's settings
|
|
25312
25315
|
const settings = UserSettings.fromObject(account.settings) || new UserSettings();
|
|
25313
25316
|
const changed = settings.merge(source, this._remoteLocalSettingsKeys);
|
|
25314
|
-
if (!changed)
|
|
25317
|
+
if (!changed && !force)
|
|
25315
25318
|
return; // Skip if unchanged
|
|
25316
25319
|
// Save remotely
|
|
25317
25320
|
this.account.settings = settings;
|
|
@@ -25576,7 +25579,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
25576
25579
|
}] }] });
|
|
25577
25580
|
function provideAccountService() {
|
|
25578
25581
|
return {
|
|
25579
|
-
provide: APP_ACCOUNT_SERVICE,
|
|
25582
|
+
provide: APP_ACCOUNT_SERVICE,
|
|
25583
|
+
useClass: AccountService,
|
|
25584
|
+
deps: [ENVIRONMENT],
|
|
25580
25585
|
};
|
|
25581
25586
|
}
|
|
25582
25587
|
|