@sumaris-net/ngx-components 0.28.0 → 0.28.4
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 +135 -63
- 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/esm2015/src/app/core/account/account.js +4 -5
- package/esm2015/src/app/core/auth/form/form-auth.js +3 -4
- package/esm2015/src/app/core/form/editor.class.js +10 -2
- package/esm2015/src/app/core/form/entity-editor.class.js +15 -7
- package/esm2015/src/app/core/form/form.class.js +24 -10
- package/esm2015/src/app/core/form/list.form.js +2 -3
- package/esm2015/src/app/core/form/properties.form.js +2 -3
- package/esm2015/src/app/core/settings/settings.page.js +3 -4
- package/esm2015/src/app/shared/dates.js +2 -2
- package/esm2015/src/app/shared/pipes/translate-context.pipe.js +4 -8
- package/esm2015/src/app/shared/services/translate-context.service.js +38 -13
- package/fesm2015/sumaris-net.ngx-components.js +95 -46
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/account/account.d.ts +0 -1
- package/src/app/core/auth/form/form-auth.d.ts +0 -1
- package/src/app/core/form/editor.class.d.ts +2 -0
- package/src/app/core/form/form.class.d.ts +10 -2
- package/src/app/core/form/list.form.d.ts +0 -1
- package/src/app/core/form/properties.form.d.ts +0 -1
- package/src/app/core/settings/settings.page.d.ts +0 -1
- package/src/app/shared/services/translate-context.service.d.ts +10 -0
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
|
@@ -20,7 +20,6 @@ export declare class AccountPage extends AppForm<Account> implements OnDestroy {
|
|
|
20
20
|
protected translate: TranslateService;
|
|
21
21
|
protected settings: LocalSettingsService;
|
|
22
22
|
protected cd: ChangeDetectorRef;
|
|
23
|
-
loading: boolean;
|
|
24
23
|
isLogin: boolean;
|
|
25
24
|
changesSubscription: Subscription;
|
|
26
25
|
account: Account;
|
|
@@ -5,6 +5,7 @@ import { AlertController, IonContent, ToastController } from '@ionic/angular';
|
|
|
5
5
|
import { TranslateService } from '@ngx-translate/core';
|
|
6
6
|
import { BehaviorSubject, Subscription, TeardownLogic } from 'rxjs';
|
|
7
7
|
import { AppTable } from '../table/table.class';
|
|
8
|
+
import { AppForm } from './form.class';
|
|
8
9
|
import { FormButtonsBarToken } from './form-buttons-bar.component';
|
|
9
10
|
import { IAppForm, IAppFormGetter } from './form.utils';
|
|
10
11
|
import { ShowToastOptions } from '../../shared/toasts';
|
|
@@ -56,6 +57,7 @@ export declare abstract class AppEditor<T = any, ID = number, O = any> implement
|
|
|
56
57
|
formButtonsBar: FormButtonsBarToken | null;
|
|
57
58
|
content: IonContent;
|
|
58
59
|
get tables(): AppTable<any>[];
|
|
60
|
+
get forms(): AppForm<any>[];
|
|
59
61
|
get dirty(): boolean;
|
|
60
62
|
/**
|
|
61
63
|
* Is valid (tables and forms)
|
|
@@ -18,14 +18,22 @@ export declare abstract class AppForm<T> implements IAppForm, OnInit, OnDestroy,
|
|
|
18
18
|
protected errorTranslator: FormErrorTranslator;
|
|
19
19
|
protected _enable: boolean;
|
|
20
20
|
protected _$ready: BehaviorSubject<boolean>;
|
|
21
|
-
protected
|
|
21
|
+
protected _$loading: BehaviorSubject<boolean>;
|
|
22
22
|
protected i18nFieldPrefix: string;
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated
|
|
25
|
+
*/
|
|
26
|
+
protected set _loading(value: boolean);
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated
|
|
29
|
+
*/
|
|
30
|
+
protected get _loading(): boolean;
|
|
23
31
|
private _subscription;
|
|
24
32
|
private _form;
|
|
25
33
|
debug: boolean;
|
|
26
34
|
tabindex: number;
|
|
27
35
|
errorTranslatorOptions: FormErrorTranslatorOptions;
|
|
28
|
-
|
|
36
|
+
get loading(): boolean;
|
|
29
37
|
get value(): any;
|
|
30
38
|
set value(data: any);
|
|
31
39
|
get dirty(): boolean;
|
|
@@ -26,7 +26,6 @@ export declare class AppListForm<T = any> extends AppForm<T[]> implements OnInit
|
|
|
26
26
|
protected settings: LocalSettingsService;
|
|
27
27
|
protected cd: ChangeDetectorRef;
|
|
28
28
|
private formGroupDir;
|
|
29
|
-
loading: boolean;
|
|
30
29
|
helper: FormArrayHelper<T>;
|
|
31
30
|
selection: SelectionModel<T>;
|
|
32
31
|
formArrayName: string;
|
|
@@ -13,7 +13,6 @@ export declare class AppPropertiesForm<T = Property> extends AppForm<T[]> implem
|
|
|
13
13
|
protected settings: LocalSettingsService;
|
|
14
14
|
protected cd: ChangeDetectorRef;
|
|
15
15
|
private formGroupDir;
|
|
16
|
-
loading: boolean;
|
|
17
16
|
definitionsMapByKey: FormFieldDefinitionMap;
|
|
18
17
|
definitionsByIndex: {
|
|
19
18
|
[index: number]: FormFieldDefinition;
|
|
@@ -5,6 +5,15 @@ export declare class TranslateContextService {
|
|
|
5
5
|
constructor(translate: TranslateService);
|
|
6
6
|
get(key: string, context?: string, interpolateParams?: Object): Observable<any>;
|
|
7
7
|
instant(key: string, context?: string, interpolateParams?: Object): any;
|
|
8
|
+
/**
|
|
9
|
+
* Compute contextual i18n keys, using the context as suffix.<br>
|
|
10
|
+
* Suffix can be simple name (like 'aaa' - will return ['<key>.aaa']) or complexe (like 'aaa.bbb' - will return ['<key>.aaa.bbb', '<key>.aaa']
|
|
11
|
+
*
|
|
12
|
+
* @param key
|
|
13
|
+
* @param context
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
16
|
+
contextualKeys(key: string, context: string): string[];
|
|
8
17
|
/**
|
|
9
18
|
* Compute a contextual i18n key, using the context as suffix
|
|
10
19
|
*
|
|
@@ -13,4 +22,5 @@ export declare class TranslateContextService {
|
|
|
13
22
|
* @private
|
|
14
23
|
*/
|
|
15
24
|
contextualKey(key: string, context: string): string;
|
|
25
|
+
private findFirstValid;
|
|
16
26
|
}
|