@sumaris-net/ngx-components 1.7.3 → 1.8.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 +59 -57
- 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 +6 -1
- package/esm2015/src/app/core/form/entity-editor.class.js +5 -1
- package/esm2015/src/app/core/services/account.service.js +38 -27
- package/esm2015/src/app/core/services/base-entity-service.class.js +4 -1
- package/esm2015/src/app/core/services/config.service.js +11 -4
- package/esm2015/src/app/shared/material/autocomplete/material.autocomplete.js +2 -2
- package/esm2015/src/app/shared/services/entity-service.class.js +1 -1
- package/esm2015/src/app/shared/services/progress-bar.service.js +1 -1
- package/fesm2015/sumaris-net.ngx-components.js +49 -26
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/entity-editor.class.d.ts +1 -1
- package/src/app/core/services/account.service.d.ts +2 -0
- package/src/app/core/services/base-entity-service.class.d.ts +1 -0
- package/src/app/core/services/config.service.d.ts +4 -1
- package/src/app/shared/services/entity-service.class.d.ts +1 -0
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
|
@@ -139,12 +139,12 @@ export declare abstract class AppEntityEditor<T extends Entity<T, ID>, S extends
|
|
|
139
139
|
emitEvent?: boolean;
|
|
140
140
|
detailsCssClass?: string;
|
|
141
141
|
}): void;
|
|
142
|
+
canUserWrite(data: T, opts?: any): boolean;
|
|
142
143
|
protected abstract registerForms(): any;
|
|
143
144
|
protected abstract computeTitle(data: T): Promise<string>;
|
|
144
145
|
protected abstract setValue(data: T): Promise<void> | void;
|
|
145
146
|
protected abstract get form(): FormGroup;
|
|
146
147
|
protected abstract getFirstInvalidTabIndex(): number;
|
|
147
|
-
protected abstract canUserWrite(data: T): boolean;
|
|
148
148
|
/**
|
|
149
149
|
* Return undefined to keep same tab
|
|
150
150
|
* @protected
|
|
@@ -48,6 +48,7 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
48
48
|
onChange: Subject<Account>;
|
|
49
49
|
onAuthTokenChange: Subject<string>;
|
|
50
50
|
onAuthBasicChange: Subject<string>;
|
|
51
|
+
private _stopWatching$;
|
|
51
52
|
private _cache;
|
|
52
53
|
private _$additionalFields;
|
|
53
54
|
private _tokenType$;
|
|
@@ -109,6 +110,7 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
109
110
|
isEmailExists(email: string): Promise<boolean>;
|
|
110
111
|
sendConfirmationEmail(email: string, locale?: string): Promise<boolean>;
|
|
111
112
|
confirmEmail(email: String, code: String): Promise<boolean>;
|
|
113
|
+
watch(): Observable<Account>;
|
|
112
114
|
listenChanges(): Subscription;
|
|
113
115
|
get additionalFields(): FormFieldDefinition[];
|
|
114
116
|
get $additionalFields(): Observable<FormFieldDefinition[]>;
|
|
@@ -75,6 +75,7 @@ export declare abstract class BaseEntityService<T extends Entity<T, ID>, F exten
|
|
|
75
75
|
withTotal?: boolean;
|
|
76
76
|
}): Promise<LoadResult<T>>;
|
|
77
77
|
countAll(filter?: Partial<F>, opts?: LO): Promise<number>;
|
|
78
|
+
canUserWrite(data: T, opts?: any): boolean;
|
|
78
79
|
saveAll(entities: T[], opts?: EntitySaveOptions): Promise<T[]>;
|
|
79
80
|
/**
|
|
80
81
|
* Save a referential entity
|
|
@@ -12,6 +12,7 @@ import { TranslateService } from '@ngx-translate/core';
|
|
|
12
12
|
import { EntityServiceLoadOptions, IEntityService } from '../../shared/services/entity-service.class';
|
|
13
13
|
import { BaseGraphqlService } from './base-graphql-service.class';
|
|
14
14
|
import { IStartableService } from '../../shared/services/startable-service.class';
|
|
15
|
+
import { AccountService } from './account.service';
|
|
15
16
|
export declare const Fragments: {
|
|
16
17
|
config: import("graphql/language/ast").DocumentNode;
|
|
17
18
|
};
|
|
@@ -24,16 +25,18 @@ export declare class ConfigService extends BaseGraphqlService<Configuration, any
|
|
|
24
25
|
protected file: FileService;
|
|
25
26
|
protected toastController: ToastController;
|
|
26
27
|
protected translate: TranslateService;
|
|
28
|
+
protected accountService: AccountService;
|
|
27
29
|
protected environment: any;
|
|
28
30
|
private _optionDefs;
|
|
29
31
|
private $data;
|
|
30
32
|
get config(): Observable<Configuration>;
|
|
31
|
-
constructor(platform: Platform, graphql: GraphqlService, storage: Storage, network: NetworkService, file: FileService, toastController: ToastController, translate: TranslateService, environment: any, defaultOptionsMap: FormFieldDefinitionMap);
|
|
33
|
+
constructor(platform: Platform, graphql: GraphqlService, storage: Storage, network: NetworkService, file: FileService, toastController: ToastController, translate: TranslateService, accountService: AccountService, environment: any, defaultOptionsMap: FormFieldDefinitionMap);
|
|
32
34
|
protected ngOnStart(): Promise<Configuration>;
|
|
33
35
|
loadDefault(opts?: EntityServiceLoadOptions): Promise<Configuration>;
|
|
34
36
|
load(id: number, opts?: EntityServiceLoadOptions & {
|
|
35
37
|
query?: any;
|
|
36
38
|
}): Promise<Configuration>;
|
|
39
|
+
canUserWrite(data: Configuration, opts?: any): boolean;
|
|
37
40
|
/**
|
|
38
41
|
* Save a configuration
|
|
39
42
|
*
|
|
@@ -30,6 +30,7 @@ export declare interface EntityServiceLoadOptions {
|
|
|
30
30
|
}
|
|
31
31
|
export declare interface IEntityService<T, ID = any, LO = EntityServiceLoadOptions> {
|
|
32
32
|
load(id: ID, opts?: LO): Promise<T>;
|
|
33
|
+
canUserWrite(data: T, opts?: any): boolean;
|
|
33
34
|
save(data: T, opts?: any): Promise<T>;
|
|
34
35
|
delete(data: T, opts?: any): Promise<any>;
|
|
35
36
|
listenChanges(id: ID, opts?: any): Observable<T | undefined>;
|