@sumaris-net/ngx-components 2.4.145 → 2.4.147
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 +3 -3
- package/esm2020/src/app/core/account/account.page.mjs +15 -21
- package/esm2020/src/app/core/graphql/graphql.service.mjs +43 -33
- package/esm2020/src/app/core/home/home.mjs +9 -10
- package/esm2020/src/app/core/menu/menu.service.mjs +2 -2
- package/esm2020/src/app/core/register/register-confirm.page.mjs +9 -9
- package/esm2020/src/app/core/services/account.service.mjs +29 -24
- package/esm2020/src/app/core/services/base-entity-service.class.mjs +43 -19
- package/esm2020/src/app/core/services/base-graphql-service.class.mjs +6 -2
- package/esm2020/src/app/core/services/errors.mjs +2 -1
- package/esm2020/src/app/core/services/model/account.model.mjs +2 -2
- package/esm2020/src/app/core/services/model/person.model.mjs +12 -2
- package/esm2020/src/app/core/services/model/referential.model.mjs +3 -3
- package/esm2020/src/app/core/services/platform.service.mjs +42 -33
- package/esm2020/src/app/core/services/validator/base.validator.class.mjs +2 -2
- package/esm2020/src/app/core/settings/settings.page.mjs +2 -2
- package/esm2020/src/app/core/table/table.class.mjs +70 -63
- package/esm2020/src/app/core/table/table.utils.mjs +2 -4
- package/esm2020/src/app/shared/directives/autofocus.directive.mjs +5 -4
- package/esm2020/src/app/shared/file/images.utils.mjs +3 -3
- package/esm2020/src/app/shared/help/help.modal.mjs +1 -1
- package/esm2020/src/app/shared/image/gallery/image-gallery.component.mjs +2 -2
- package/esm2020/src/app/shared/logging/logging-service.class.mjs +11 -8
- package/esm2020/src/app/shared/material/autocomplete/material.autocomplete.mjs +3 -3
- package/esm2020/src/app/shared/observables.mjs +1 -1
- package/esm2020/src/app/shared/services/memory-entity-service.class.mjs +1 -1
- package/esm2020/src/app/shared/services/startable-service.class.mjs +2 -2
- package/esm2020/src/app/shared/services/translate-context.service.mjs +14 -11
- package/esm2020/src/app/shared/shared.module.mjs +22 -6
- package/esm2020/src/app/social/message/message.service.mjs +6 -4
- package/esm2020/src/environments/environment.class.mjs +1 -1
- package/esm2020/src/environments/environment.loader.mjs +79 -0
- package/esm2020/src/environments/environment.mjs +19 -16
- package/fesm2015/sumaris-net.ngx-components.mjs +632 -460
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +621 -460
- 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 +21 -23
- package/src/app/core/home/home.d.ts +5 -5
- package/src/app/core/services/account.service.d.ts +9 -2
- package/src/app/core/services/base-entity-service.class.d.ts +22 -3
- package/src/app/core/services/errors.d.ts +1 -0
- package/src/app/core/services/model/person.model.d.ts +1 -0
- package/src/app/core/services/platform.service.d.ts +1 -0
- package/src/app/core/services/validator/base.validator.class.d.ts +1 -1
- package/src/app/core/settings/settings.page.d.ts +1 -1
- package/src/app/core/table/table.class.d.ts +10 -8
- package/src/app/shared/services/translate-context.service.d.ts +2 -2
- package/src/app/shared/shared.module.d.ts +5 -3
- package/src/assets/environments/environment-test.json +6 -0
- package/src/assets/i18n/en-US.json +1 -0
- package/src/assets/i18n/en.json +1 -0
- package/src/assets/i18n/fr.json +5 -6
- package/src/environments/environment.class.d.ts +1 -0
- package/src/environments/environment.loader.d.ts +26 -0
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './src/environments/environment.class';
|
|
2
|
+
export * from './src/environments/environment.loader';
|
|
2
3
|
export * from './src/app/shared/constants';
|
|
3
4
|
export * from './src/app/shared/shared.module';
|
|
4
5
|
export { SharedRoutingModule } from './src/app/shared/shared-routing.module';
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { Observable } from
|
|
2
|
-
import { Apollo, ExtraSubscriptionOptions, QueryRef } from
|
|
3
|
-
import { ApolloCache, ApolloClient, FetchPolicy, MutationUpdaterFn, OperationVariables, TypePolicies, WatchQueryFetchPolicy } from
|
|
4
|
-
import { ServiceError } from
|
|
5
|
-
import { InjectionToken } from
|
|
6
|
-
import { NetworkService } from
|
|
7
|
-
import { EmptyObject } from
|
|
8
|
-
import { Platform } from
|
|
9
|
-
import { IEntity } from
|
|
10
|
-
import { Resolvers } from
|
|
11
|
-
import { HttpLink } from
|
|
12
|
-
import { ErrorPolicy, MutationBaseOptions } from
|
|
13
|
-
import { Cache } from
|
|
14
|
-
import { Environment } from
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { DocumentNode } from "graphql";
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { Apollo, ExtraSubscriptionOptions, QueryRef } from 'apollo-angular';
|
|
3
|
+
import { ApolloCache, ApolloClient, FetchPolicy, MutationUpdaterFn, OperationVariables, TypePolicies, WatchQueryFetchPolicy } from '@apollo/client/core';
|
|
4
|
+
import { ServiceError } from '../services/errors';
|
|
5
|
+
import { InjectionToken } from '@angular/core';
|
|
6
|
+
import { NetworkService } from '../services/network.service';
|
|
7
|
+
import { EmptyObject } from './graphql.utils';
|
|
8
|
+
import { Platform } from '@ionic/angular';
|
|
9
|
+
import { IEntity } from '../services/model/entity.model';
|
|
10
|
+
import { Resolvers } from '@apollo/client/core/types';
|
|
11
|
+
import { HttpLink } from 'apollo-angular/http';
|
|
12
|
+
import { ErrorPolicy, MutationBaseOptions } from '@apollo/client/core/watchQueryOptions';
|
|
13
|
+
import { Cache } from '@apollo/client/cache/core/types/Cache';
|
|
14
|
+
import { Environment } from '../../../environments/environment.class';
|
|
15
|
+
import { PropertiesMap } from '../../shared/types';
|
|
16
|
+
import { StartableService } from '../../shared/services/startable-service.class';
|
|
17
|
+
import { StorageService } from '../../shared/storage/storage.service';
|
|
18
|
+
import { DocumentNode } from 'graphql';
|
|
20
19
|
import * as i0 from "@angular/core";
|
|
21
20
|
export interface WatchQueryOptions<V> {
|
|
22
21
|
query: any;
|
|
@@ -50,7 +49,6 @@ export declare class GraphqlService extends StartableService<ApolloClient<any>>
|
|
|
50
49
|
private httpLink;
|
|
51
50
|
private network;
|
|
52
51
|
private storage;
|
|
53
|
-
private cryptoService;
|
|
54
52
|
protected environment: Environment;
|
|
55
53
|
private typePolicies;
|
|
56
54
|
private fragments;
|
|
@@ -65,7 +63,7 @@ export declare class GraphqlService extends StartableService<ApolloClient<any>>
|
|
|
65
63
|
get client(): ApolloClient<any>;
|
|
66
64
|
get cache(): ApolloCache<any>;
|
|
67
65
|
get defaultFetchPolicy(): WatchQueryFetchPolicy;
|
|
68
|
-
constructor(platform: Platform, apollo: Apollo, httpLink: HttpLink, network: NetworkService, storage: StorageService,
|
|
66
|
+
constructor(platform: Platform, apollo: Apollo, httpLink: HttpLink, network: NetworkService, storage: StorageService, environment: Environment, typePolicies: TypePolicies, fragments: DocumentNode[]);
|
|
69
67
|
setAuthToken(token: string): Promise<void>;
|
|
70
68
|
setAuthBasic(basic: string): Promise<void>;
|
|
71
69
|
/**
|
|
@@ -105,7 +103,7 @@ export declare class GraphqlService extends StartableService<ApolloClient<any>>
|
|
|
105
103
|
data: T[];
|
|
106
104
|
equalsFn?: (d1: T, d2: T) => boolean;
|
|
107
105
|
sortFn?: (d1: T, d2: T) => number;
|
|
108
|
-
}):
|
|
106
|
+
}): number;
|
|
109
107
|
/**
|
|
110
108
|
* Remove from cache, and return if removed or not
|
|
111
109
|
*
|
|
@@ -144,6 +142,6 @@ export declare class GraphqlService extends StartableService<ApolloClient<any>>
|
|
|
144
142
|
private createAppErrorByCode;
|
|
145
143
|
private getI18nErrorMessageByCode;
|
|
146
144
|
private toAppError;
|
|
147
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GraphqlService, [null, null, null, null, null, null,
|
|
145
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GraphqlService, [null, null, null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
148
146
|
static ɵprov: i0.ɵɵInjectableDeclaration<GraphqlService>;
|
|
149
147
|
}
|
|
@@ -16,7 +16,7 @@ import { ShowToastOptions } from '../../shared/toast/toasts';
|
|
|
16
16
|
import { Environment } from '../../../environments/environment.class';
|
|
17
17
|
import { HistoryPageReference } from '../services/model/history.model';
|
|
18
18
|
import * as i0 from "@angular/core";
|
|
19
|
-
export declare
|
|
19
|
+
export declare const getRandomImage: (files: string[]) => string;
|
|
20
20
|
export declare const APP_HOME_BUTTONS: InjectionToken<IMenuItem[]>;
|
|
21
21
|
export declare class HomePage implements OnDestroy {
|
|
22
22
|
private accountService;
|
|
@@ -32,22 +32,22 @@ export declare class HomePage implements OnDestroy {
|
|
|
32
32
|
locales: LocaleConfig[];
|
|
33
33
|
buttons: IMenuItem[];
|
|
34
34
|
private readonly _debug;
|
|
35
|
-
private _started;
|
|
36
35
|
private _subscription;
|
|
37
36
|
private _config;
|
|
38
37
|
loading: boolean;
|
|
39
38
|
waitingNetwork: boolean;
|
|
40
39
|
showSpinner: boolean;
|
|
41
|
-
accountName:
|
|
40
|
+
accountName: string;
|
|
42
41
|
isLogin: boolean;
|
|
43
42
|
$partners: BehaviorSubject<Department[]>;
|
|
44
43
|
loadingBanner: boolean;
|
|
45
|
-
logo:
|
|
46
|
-
description:
|
|
44
|
+
logo: string;
|
|
45
|
+
description: string;
|
|
47
46
|
appName: string;
|
|
48
47
|
isWeb: boolean;
|
|
49
48
|
canRegister: boolean;
|
|
50
49
|
contentStyle: any;
|
|
50
|
+
contentCredits: string;
|
|
51
51
|
pageHistory: HistoryPageReference[];
|
|
52
52
|
offline: boolean;
|
|
53
53
|
$filteredButtons: BehaviorSubject<IMenuItem[]>;
|
|
@@ -28,7 +28,7 @@ export declare interface AccountDetails {
|
|
|
28
28
|
pubkey: string;
|
|
29
29
|
person: Person;
|
|
30
30
|
department: Department;
|
|
31
|
-
mainProfile:
|
|
31
|
+
mainProfile: string;
|
|
32
32
|
}
|
|
33
33
|
export interface AuthData {
|
|
34
34
|
username: string;
|
|
@@ -42,6 +42,11 @@ export declare interface IsEmailExistsVariables {
|
|
|
42
42
|
email: string;
|
|
43
43
|
hash: string;
|
|
44
44
|
}
|
|
45
|
+
interface IAuthChallenge {
|
|
46
|
+
pubkey: string;
|
|
47
|
+
challenge: string;
|
|
48
|
+
signature: string;
|
|
49
|
+
}
|
|
45
50
|
export interface AccountWatchOptions {
|
|
46
51
|
intervalInSeconds?: number;
|
|
47
52
|
}
|
|
@@ -129,7 +134,7 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
129
134
|
*/
|
|
130
135
|
isEmailExists(email: string): Promise<boolean>;
|
|
131
136
|
sendConfirmationEmail(email: string, locale?: string): Promise<boolean>;
|
|
132
|
-
confirmEmail(email:
|
|
137
|
+
confirmEmail(email: string, code: string): Promise<boolean>;
|
|
133
138
|
listenChanges(opts?: AccountWatchOptions): Subscription;
|
|
134
139
|
get additionalFields(): FormFieldDefinition[];
|
|
135
140
|
get $additionalFields(): Observable<FormFieldDefinition[]>;
|
|
@@ -161,6 +166,7 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
161
166
|
*/
|
|
162
167
|
protected saveSettingsRemotely(settings: UserSettings): Promise<void>;
|
|
163
168
|
protected authenticateAndGetToken(token?: string, counter?: number): Promise<string>;
|
|
169
|
+
protected getAuthChallenge(): Promise<IAuthChallenge>;
|
|
164
170
|
protected startListenRemoteChanges(opts?: AccountWatchOptions): Subscription;
|
|
165
171
|
protected stopListenRemoteChanges(): void;
|
|
166
172
|
protected watchChanges(opts?: AccountWatchOptions): Observable<Account>;
|
|
@@ -170,3 +176,4 @@ export declare class AccountService extends BaseGraphqlService<Account, any, num
|
|
|
170
176
|
static ɵfac: i0.ɵɵFactoryDeclaration<AccountService, [null, null, null, null, null, { optional: true; }, { optional: true; }, null]>;
|
|
171
177
|
static ɵprov: i0.ɵɵInjectableDeclaration<AccountService>;
|
|
172
178
|
}
|
|
179
|
+
export {};
|
|
@@ -30,7 +30,15 @@ export interface BaseEntityServiceOptions<T extends Entity<any, ID>, ID = number
|
|
|
30
30
|
queries: Q;
|
|
31
31
|
mutations?: Partial<M>;
|
|
32
32
|
subscriptions?: Partial<S>;
|
|
33
|
+
equals?: (e1: T, e2: T) => boolean;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Use 'equals' instead
|
|
36
|
+
*/
|
|
33
37
|
equalsFn?: (e1: T, e2: T) => boolean;
|
|
38
|
+
isNew?: (e: T) => boolean;
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Use 'isNew' instead
|
|
41
|
+
*/
|
|
34
42
|
isNewFn?: (e: T) => boolean;
|
|
35
43
|
defaultSortBy?: keyof T;
|
|
36
44
|
defaultSortDirection?: SortDirection;
|
|
@@ -55,15 +63,15 @@ export declare abstract class BaseEntityService<T extends Entity<T, ID>, F exten
|
|
|
55
63
|
protected readonly queries: Q;
|
|
56
64
|
protected readonly mutations: Partial<M>;
|
|
57
65
|
protected readonly subscriptions: Partial<S>;
|
|
58
|
-
protected readonly
|
|
59
|
-
protected readonly
|
|
66
|
+
protected readonly _equalsFn: (e1: T, e2: T) => boolean;
|
|
67
|
+
protected readonly _isNewFn: (e: T) => boolean;
|
|
60
68
|
protected readonly defaultSortBy: keyof T;
|
|
61
69
|
protected readonly defaultSortDirection: SortDirection;
|
|
62
70
|
protected readonly watchQueriesUpdatePolicy: MutableWatchQueriesUpdatePolicy;
|
|
63
71
|
protected constructor(graphql: GraphqlService, platform: PlatformService, dataType: new () => T, filterType: new () => F, options: BaseEntityServiceOptions<T, ID, Q, M, S>);
|
|
64
72
|
watch(id: number, opts?: WO): Observable<T>;
|
|
65
73
|
load(id: ID, opts?: LO): Promise<T>;
|
|
66
|
-
watchAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection,
|
|
74
|
+
watchAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection, dataFilter?: F, opts?: WO): Observable<LoadResult<T>>;
|
|
67
75
|
loadAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection, filter?: Partial<F>, opts?: LO & {
|
|
68
76
|
debug?: boolean;
|
|
69
77
|
}): Promise<LoadResult<T>>;
|
|
@@ -91,6 +99,17 @@ export declare abstract class BaseEntityService<T extends Entity<T, ID>, F exten
|
|
|
91
99
|
copyIdAndUpdateDate(source: T, target: T): void;
|
|
92
100
|
fromObject(source: any): T;
|
|
93
101
|
asFilter(source: any): F;
|
|
102
|
+
equals(d1: T, d2: T): boolean;
|
|
103
|
+
isNew(data: T): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* @deprecated Use equals() instead
|
|
106
|
+
*/
|
|
107
|
+
equalsFn(d1: T, d2: T): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* @deprecated Use isNew() instead
|
|
110
|
+
* @param data
|
|
111
|
+
*/
|
|
112
|
+
isNewFn(data: T): boolean;
|
|
94
113
|
protected ngOnStart(): Promise<void>;
|
|
95
114
|
protected fillDefaultProperties(source: T): void;
|
|
96
115
|
protected asObject(entity: T, opts?: EntityAsObjectOptions): any;
|
|
@@ -21,6 +21,7 @@ export declare class Person<T extends Person<any> = Person<any>> extends Entity<
|
|
|
21
21
|
constructor(__typename?: string);
|
|
22
22
|
asObject(opts?: ReferentialAsObjectOptions): any;
|
|
23
23
|
fromObject(source: any): void;
|
|
24
|
+
equals(other: T): boolean;
|
|
24
25
|
}
|
|
25
26
|
export declare class PersonUtils {
|
|
26
27
|
static getMainProfile(profiles?: string[]): UserProfileLabel;
|
|
@@ -82,6 +82,7 @@ export declare class PlatformService extends StartableService {
|
|
|
82
82
|
protected configureGlobalCssClass(mobile: boolean, win?: any): void;
|
|
83
83
|
protected configureCapacitorPlugins(): Promise<void>;
|
|
84
84
|
protected configureTranslate(): Promise<void>;
|
|
85
|
+
protected applyLocale(locale: string): void;
|
|
85
86
|
protected configureCache(online?: boolean): void;
|
|
86
87
|
protected checkAppVersion(opts?: {
|
|
87
88
|
canReload?: boolean;
|
|
@@ -11,7 +11,7 @@ export declare abstract class AppValidatorService<T = any> extends ValidatorServ
|
|
|
11
11
|
getRowValidator(): UntypedFormGroup;
|
|
12
12
|
getFormGroup(data?: T): UntypedFormGroup;
|
|
13
13
|
getFormGroupConfig(data?: T): {
|
|
14
|
-
[key: string]: any;
|
|
14
|
+
[key: string]: any[];
|
|
15
15
|
};
|
|
16
16
|
getI18nFormErrors(control: AbstractControl): string[];
|
|
17
17
|
getI18nErrors(errors: FormErrors): string[];
|
|
@@ -57,7 +57,7 @@ export declare class SettingsPage extends AppForm<LocalSettings> implements OnIn
|
|
|
57
57
|
}): void;
|
|
58
58
|
showSelectPeerModal(opts?: Partial<ISelectPeerModalOptions>): Promise<void>;
|
|
59
59
|
cancel(event?: Event): Promise<void>;
|
|
60
|
-
close(
|
|
60
|
+
close(_?: Event): Promise<boolean>;
|
|
61
61
|
clearCache(event?: Event): Promise<void>;
|
|
62
62
|
executeAction(event: Event, item: IMenuItem): Promise<void>;
|
|
63
63
|
protected getValue(): Promise<LocalSettings>;
|
|
@@ -58,11 +58,11 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
|
|
|
58
58
|
readonly dirtySubject: BehaviorSubject<boolean>;
|
|
59
59
|
readonly errorSubject: BehaviorSubject<string>;
|
|
60
60
|
get error(): string;
|
|
61
|
+
set error(error: string);
|
|
61
62
|
/**
|
|
62
63
|
* @deprecated
|
|
63
64
|
*/
|
|
64
65
|
get error$(): Observable<string>;
|
|
65
|
-
set error(error: string);
|
|
66
66
|
selection: SelectionModel<TableElement<T>>;
|
|
67
67
|
permanentSelection: SelectionModel<T>;
|
|
68
68
|
editedRow: TableElement<T>;
|
|
@@ -272,7 +272,7 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
|
|
|
272
272
|
moveRow(id: number, direction: number): void;
|
|
273
273
|
ready(opts?: WaitForOptions): Promise<void>;
|
|
274
274
|
waitIdle(opts?: WaitForOptions): Promise<void>;
|
|
275
|
-
openSelectColumnsModal(
|
|
275
|
+
openSelectColumnsModal(_?: Event): Promise<any>;
|
|
276
276
|
trackByFn(index: number, row: TableElement<T>): number;
|
|
277
277
|
doRefresh(event?: CompletableEvent): void;
|
|
278
278
|
getCurrentColumns(): ColumnItem[];
|
|
@@ -362,6 +362,14 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
|
|
|
362
362
|
onlySelf?: boolean;
|
|
363
363
|
emitEVent?: boolean;
|
|
364
364
|
}): void;
|
|
365
|
+
protected getPageSettings<T = any>(propertyName?: string): T;
|
|
366
|
+
protected savePageSettings(value: any, propertyName?: string): Promise<void>;
|
|
367
|
+
/**
|
|
368
|
+
* Initialize the permanent selection model
|
|
369
|
+
*
|
|
370
|
+
* @protected
|
|
371
|
+
*/
|
|
372
|
+
protected initPermanentSelection(): void;
|
|
365
373
|
private listenSortAndPaginationEvents;
|
|
366
374
|
private editRowById;
|
|
367
375
|
private setLoading;
|
|
@@ -374,12 +382,6 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
|
|
|
374
382
|
private listenDatasourceLoading;
|
|
375
383
|
private startCellValueChanges;
|
|
376
384
|
private stopCellValueChanges;
|
|
377
|
-
/**
|
|
378
|
-
* Initialize the permanent selection model
|
|
379
|
-
*
|
|
380
|
-
* @protected
|
|
381
|
-
*/
|
|
382
|
-
protected initPermanentSelection(): void;
|
|
383
385
|
static ɵfac: i0.ɵɵFactoryDeclaration<AppTable<any, any, any>, never>;
|
|
384
386
|
static ɵdir: i0.ɵɵDirectiveDeclaration<AppTable<any, any, any>, never, never, { "settingsId": "settingsId"; "debug": "debug"; "i18nColumnPrefix": "i18nColumnPrefix"; "i18nColumnSuffix": "i18nColumnSuffix"; "autoLoad": "autoLoad"; "readOnly": "readOnly"; "inlineEdition": "inlineEdition"; "focusFirstColumn": "focusFirstColumn"; "confirmBeforeDelete": "confirmBeforeDelete"; "confirmBeforeCancel": "confirmBeforeCancel"; "undoableDeletion": "undoableDeletion"; "saveBeforeDelete": "saveBeforeDelete"; "keepEditedRowOnSave": "keepEditedRowOnSave"; "saveBeforeSort": "saveBeforeSort"; "saveBeforeFilter": "saveBeforeFilter"; "propagateRowError": "propagateRowError"; "defaultSortBy": "defaultSortBy"; "defaultSortDirection": "defaultSortDirection"; "defaultPageSize": "defaultPageSize"; "defaultPageSizeOptions": "defaultPageSizeOptions"; "focusColumn": "focusColumn"; "dataSource": "dataSource"; "filter": "filter"; "disabled": "disabled"; "paginator": "paginator"; }, { "onRefresh": "onRefresh"; "onOpenRow": "onOpenRow"; "onNewRow": "onNewRow"; "onStartEditingRow": "onStartEditingRow"; "onConfirmEditCreateRow": "onConfirmEditCreateRow"; "onCancelOrDeleteRow": "onCancelOrDeleteRow"; "onBeforeDeleteRows": "onBeforeDeleteRows"; "onBeforeCancelRows": "onBeforeCancelRows"; "onBeforeSave": "onBeforeSave"; "onAfterDeletedRows": "onAfterDeletedRows"; "onSort": "onSort"; "onDirty": "onDirty"; "onError": "onError"; }, never, never, false>;
|
|
385
387
|
}
|
|
@@ -4,8 +4,8 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export declare class TranslateContextService {
|
|
5
5
|
protected translate: TranslateService;
|
|
6
6
|
constructor(translate: TranslateService);
|
|
7
|
-
get(key: string | string[], context?: string, interpolateParams?:
|
|
8
|
-
instant(key: string | string[], context?: string, interpolateParams?:
|
|
7
|
+
get(key: string | string[], context?: string, interpolateParams?: any): Observable<any>;
|
|
8
|
+
instant(key: string | string[], context?: string, interpolateParams?: any): any;
|
|
9
9
|
/**
|
|
10
10
|
* Compute contextual i18n keys, using the context as suffix.<br>
|
|
11
11
|
* Suffix can be simple name (like 'aaa' - will return ['<key>.aaa']) or complexe (like 'aaa.bbb' - will return ['<key>.aaa.bbb', '<key>.aaa']
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
1
|
+
import { ModuleWithProviders, Provider } from '@angular/core';
|
|
2
2
|
import { CloseScrollStrategy, Overlay } from '@angular/cdk/overlay';
|
|
3
|
-
import { Environment } from '../../environments/environment.class';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
import * as i1 from "./form/field.component";
|
|
6
5
|
import * as i2 from "./form/loading-spinner";
|
|
@@ -23,8 +22,11 @@ import * as i18 from "./hotkeys/shared-hotkeys.module";
|
|
|
23
22
|
import * as i19 from "./toolbar/toolbar.module";
|
|
24
23
|
import * as i20 from "ngx-jdenticon";
|
|
25
24
|
export declare function scrollFactory(overlay: Overlay): () => CloseScrollStrategy;
|
|
25
|
+
export interface SharedModuleConfig {
|
|
26
|
+
loader?: Provider;
|
|
27
|
+
}
|
|
26
28
|
export declare class SharedModule {
|
|
27
|
-
static forRoot(
|
|
29
|
+
static forRoot(config?: SharedModuleConfig): ModuleWithProviders<SharedModule>;
|
|
28
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<SharedModule, never>;
|
|
29
31
|
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedModule, [typeof i1.AppFormField, typeof i2.AppLoadingSpinner, typeof i3.AppHelpModal, typeof i4.UploadFileComponent, typeof i5.UploadFilePopover, typeof i6.SharedTestsPage], [typeof i7.CommonModule, typeof i8.IonicModule, typeof i9.ReactiveFormsModule, typeof i10.TranslateModule, typeof i11.ColorPickerModule, typeof i12.TextMaskModule, typeof i13.DragDropModule, typeof i14.MarkdownModule, typeof i15.SharedMaterialModule, typeof i16.SharedDirectivesModule, typeof i17.SharedPipesModule, typeof i18.SharedHotkeysModule, typeof i19.SharedToolbarModule], [typeof i7.CommonModule, typeof i8.IonicModule, typeof i10.TranslateModule, typeof i9.ReactiveFormsModule, typeof i11.ColorPickerModule, typeof i12.TextMaskModule, typeof i13.DragDropModule, typeof i14.MarkdownModule, typeof i20.NgxJdenticonModule, typeof i15.SharedMaterialModule, typeof i16.SharedDirectivesModule, typeof i17.SharedPipesModule, typeof i18.SharedHotkeysModule, typeof i19.SharedToolbarModule, typeof i1.AppFormField, typeof i2.AppLoadingSpinner, typeof i3.AppHelpModal, typeof i4.UploadFileComponent, typeof i5.UploadFilePopover, typeof i6.SharedTestsPage]>;
|
|
30
32
|
static ɵinj: i0.ɵɵInjectorDeclaration<SharedModule>;
|
package/src/assets/i18n/en.json
CHANGED
package/src/assets/i18n/fr.json
CHANGED
|
@@ -106,6 +106,7 @@
|
|
|
106
106
|
|
|
107
107
|
"YES": "Oui",
|
|
108
108
|
"NO": "Non",
|
|
109
|
+
"DEBUG": "Debug",
|
|
109
110
|
|
|
110
111
|
"UPDATED_ON": "Mise à jour le",
|
|
111
112
|
"RECORDER": "Saisisseur",
|
|
@@ -115,17 +116,15 @@
|
|
|
115
116
|
"PLEASE_WAIT": "Veuillez patienter...",
|
|
116
117
|
"NO_DATA": "Aucune donnée",
|
|
117
118
|
"MISSING": "Manquant",
|
|
118
|
-
|
|
119
119
|
"DISPLAYED_COLUMNS": "Paramétrage des colonnes",
|
|
120
120
|
"DISPLAYED_COLUMNS_DOTS": "Paramétrage des colonnes...",
|
|
121
|
-
|
|
122
121
|
"FORM": {
|
|
123
122
|
"HAS_ERROR": "Veuillez corriger des erreurs dans le formulaire"
|
|
124
123
|
},
|
|
125
124
|
"PAGINATOR": {
|
|
126
|
-
"ITEMS_PER_PAGE":"Nombre de lignes",
|
|
127
|
-
"NEXT_PAGE":"Page suivante",
|
|
128
|
-
"PREVIOUS_PAGE":"Page précédente",
|
|
125
|
+
"ITEMS_PER_PAGE": "Nombre de lignes",
|
|
126
|
+
"NEXT_PAGE": "Page suivante",
|
|
127
|
+
"PREVIOUS_PAGE": "Page précédente",
|
|
129
128
|
"OF": "sur"
|
|
130
129
|
},
|
|
131
130
|
"TABLE": {
|
|
@@ -319,7 +318,7 @@
|
|
|
319
318
|
"USAGE_MODE": "Mode de saisie",
|
|
320
319
|
"USAGE_MODE_FIELD": "Mode saisie <b>terrain</b>",
|
|
321
320
|
"USAGE_MODE_DESK": "Mode saisie <b>bureau</b>",
|
|
322
|
-
"USAGE_MODES":
|
|
321
|
+
"USAGE_MODES": {
|
|
323
322
|
"FIELD": "Saisie terrain",
|
|
324
323
|
"DESK": "Saisie bureau"
|
|
325
324
|
},
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Environment } from './environment.class';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare abstract class EnvironmentLoader<T extends Environment = Environment> {
|
|
5
|
+
abstract load(): Promise<T>;
|
|
6
|
+
abstract get(): T;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EnvironmentLoader<any>, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EnvironmentLoader<any>, never, never, {}, {}, never, never, false>;
|
|
9
|
+
}
|
|
10
|
+
export declare class EnvironmentHttpLoader<T extends Environment = Environment> extends EnvironmentLoader<T> {
|
|
11
|
+
protected http: HttpClient;
|
|
12
|
+
private readonly _logPrefix;
|
|
13
|
+
protected _debug: boolean;
|
|
14
|
+
protected _environment: T;
|
|
15
|
+
protected _loaded: boolean;
|
|
16
|
+
protected readonly _externalEnvironmentUrl: string;
|
|
17
|
+
constructor(http: HttpClient, defaultEnvironment?: T);
|
|
18
|
+
/**
|
|
19
|
+
* Get the loaded environment. Should be call after loaded
|
|
20
|
+
*/
|
|
21
|
+
get(): T;
|
|
22
|
+
load(): Promise<T>;
|
|
23
|
+
protected fetch(url: string): Promise<Partial<T>>;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EnvironmentHttpLoader<any>, never>;
|
|
25
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EnvironmentHttpLoader<any>>;
|
|
26
|
+
}
|