@sumaris-net/ngx-components 2.4.82-rc7 → 2.4.83
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 +4 -0
- package/esm2020/src/app/core/form/entity/entity-editor.class.mjs +7 -1
- package/esm2020/src/app/core/services/auth-guard.service.mjs +5 -5
- package/esm2020/src/app/core/services/model/entity.model.mjs +2 -2
- package/fesm2015/sumaris-net.ngx-components.mjs +11 -5
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +11 -5
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/entity/entity-editor.class.d.ts +2 -0
|
@@ -11383,7 +11383,7 @@ function isInstanceOf(obj, constructor) {
|
|
|
11383
11383
|
class EntityUtils {
|
|
11384
11384
|
// Check that the object has a NOT nil attribute (ID by default)
|
|
11385
11385
|
static isEntity(obj) {
|
|
11386
|
-
return isNotNil(obj
|
|
11386
|
+
return isNotNil(obj?.__typename) && (typeof obj.fromObject === 'function') && (typeof obj.asObject === 'function');
|
|
11387
11387
|
}
|
|
11388
11388
|
// Check that the object has a NOT nil attribute (ID by default)
|
|
11389
11389
|
static isNotEmpty(obj, checkedAttribute) {
|
|
@@ -25754,12 +25754,12 @@ class AuthGuardService {
|
|
|
25754
25754
|
// Force login
|
|
25755
25755
|
if (!this.accountService.isLogin()) {
|
|
25756
25756
|
if (this._debug)
|
|
25757
|
-
console.debug('[auth-
|
|
25757
|
+
console.debug('[auth-guard] Need authentication for page /' + next.url.join('/'));
|
|
25758
25758
|
return this.login(next)
|
|
25759
25759
|
.then(res => {
|
|
25760
25760
|
if (!res) {
|
|
25761
25761
|
if (this._debug)
|
|
25762
|
-
console.debug('[auth-
|
|
25762
|
+
console.debug('[auth-guard] Authentication cancelled. Could not access to /' + next.url.join('/'));
|
|
25763
25763
|
return this.router.parseUrl('/home');
|
|
25764
25764
|
}
|
|
25765
25765
|
// Iterate
|
|
@@ -25768,11 +25768,11 @@ class AuthGuardService {
|
|
|
25768
25768
|
}
|
|
25769
25769
|
if (next.data && next.data.profile && !this.accountService.hasMinProfile(next.data.profile)) {
|
|
25770
25770
|
if (this._debug)
|
|
25771
|
-
console.debug('[auth-
|
|
25771
|
+
console.debug('[auth-guard] Not authorized access to /' + next.url.join('/') + '. Missing required profile: ' + next.data.profile);
|
|
25772
25772
|
return false;
|
|
25773
25773
|
}
|
|
25774
25774
|
if (this._debug)
|
|
25775
|
-
console.debug('[auth-
|
|
25775
|
+
console.debug('[auth-guard] Authorized access to /' + next.url.join('/'));
|
|
25776
25776
|
return true;
|
|
25777
25777
|
}
|
|
25778
25778
|
login(next) {
|
|
@@ -29067,6 +29067,12 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
29067
29067
|
get service() {
|
|
29068
29068
|
return this.dataService;
|
|
29069
29069
|
}
|
|
29070
|
+
get autoOpenNextTab() {
|
|
29071
|
+
return this._autoOpenNextTab;
|
|
29072
|
+
}
|
|
29073
|
+
set autoOpenNextTab(value) {
|
|
29074
|
+
this._autoOpenNextTab = value;
|
|
29075
|
+
}
|
|
29070
29076
|
get pathIdAttribute() {
|
|
29071
29077
|
return this._pathIdAttribute;
|
|
29072
29078
|
}
|