@sumaris-net/ngx-components 1.4.7 → 1.5.3
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 +94 -60
- 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 +7 -0
- package/esm2015/src/app/core/account/account.js +42 -11
- package/esm2015/src/app/core/form/form.class.js +4 -1
- package/esm2015/src/app/core/services/local-settings.service.js +3 -3
- package/esm2015/src/app/core/settings/settings.page.js +10 -12
- package/esm2015/src/app/shared/material/autocomplete/material.autocomplete.js +13 -5
- package/fesm2015/sumaris-net.ngx-components.js +65 -27
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/account/account.d.ts +9 -4
- package/src/app/core/form/form.class.d.ts +1 -0
- package/src/app/core/settings/settings.page.d.ts +3 -3
- package/src/theme/_ngx-components.scss +7 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
|
@@ -11,10 +11,13 @@ import { FormFieldDefinition } from '../../shared/form/field.model';
|
|
|
11
11
|
import { LocalSettingsService } from '../services/local-settings.service';
|
|
12
12
|
import { LocaleConfig } from '../services/model/settings.model';
|
|
13
13
|
import { Router } from '@angular/router';
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
import { CanLeave } from '../../shared/guard/component-dirty.guard';
|
|
15
|
+
import { NetworkService } from '../services/network.service';
|
|
16
|
+
export declare class AccountPage extends AppForm<Account> implements OnDestroy, CanLeave {
|
|
16
17
|
formBuilder: FormBuilder;
|
|
17
18
|
accountService: AccountService;
|
|
19
|
+
network: NetworkService;
|
|
20
|
+
protected router: Router;
|
|
18
21
|
protected validatorService: AccountValidatorService;
|
|
19
22
|
protected settingsValidatorService: UserSettingsValidatorService;
|
|
20
23
|
protected translate: TranslateService;
|
|
@@ -22,6 +25,7 @@ export declare class AccountPage extends AppForm<Account> implements OnDestroy {
|
|
|
22
25
|
protected cd: ChangeDetectorRef;
|
|
23
26
|
isLogin: boolean;
|
|
24
27
|
changesSubscription: Subscription;
|
|
28
|
+
networkSubscription: Subscription;
|
|
25
29
|
account: Account;
|
|
26
30
|
email: any;
|
|
27
31
|
additionalFields: FormFieldDefinition[];
|
|
@@ -31,7 +35,7 @@ export declare class AccountPage extends AppForm<Account> implements OnDestroy {
|
|
|
31
35
|
latLongFormats: ("DD" | "DDMM" | "DDMMSS")[];
|
|
32
36
|
saving: boolean;
|
|
33
37
|
submitted: boolean;
|
|
34
|
-
constructor(injector: Injector,
|
|
38
|
+
constructor(injector: Injector, formBuilder: FormBuilder, accountService: AccountService, network: NetworkService, router: Router, validatorService: AccountValidatorService, settingsValidatorService: UserSettingsValidatorService, translate: TranslateService, settings: LocalSettingsService, cd: ChangeDetectorRef, locales: any);
|
|
35
39
|
ngOnDestroy(): void;
|
|
36
40
|
onLogin(account: Account): void;
|
|
37
41
|
onLogout(): void;
|
|
@@ -39,7 +43,8 @@ export declare class AccountPage extends AppForm<Account> implements OnDestroy {
|
|
|
39
43
|
startListenChanges(): void;
|
|
40
44
|
stopListenChanges(): void;
|
|
41
45
|
sendConfirmationEmail(event: MouseEvent): Promise<boolean>;
|
|
42
|
-
save(event: MouseEvent): Promise<
|
|
46
|
+
save(event: MouseEvent): Promise<boolean>;
|
|
43
47
|
enable(): void;
|
|
48
|
+
cancel(): Promise<void>;
|
|
44
49
|
protected markForCheck(): void;
|
|
45
50
|
}
|
|
@@ -123,6 +123,7 @@ export declare abstract class AppForm<T> implements IAppForm, OnInit, OnDestroy,
|
|
|
123
123
|
protected getFormError(form: FormGroup, opts?: FormErrorTranslatorOptions): string;
|
|
124
124
|
protected getI18nFieldName(path: string): string;
|
|
125
125
|
protected registerSubscription(sub: Subscription): Subscription;
|
|
126
|
+
protected unregisterSubscription(sub: Subscription): void;
|
|
126
127
|
protected registerAutocompleteField<T = any, F = any>(fieldName: string, opts?: MatAutocompleteFieldAddOptions<T, F>): MatAutocompleteFieldConfig<T, F>;
|
|
127
128
|
protected markForCheck(): void;
|
|
128
129
|
}
|
|
@@ -47,7 +47,7 @@ export declare class SettingsPage extends AppForm<LocalSettings> implements OnIn
|
|
|
47
47
|
removePropertyAt(index: number): void;
|
|
48
48
|
load(): Promise<void>;
|
|
49
49
|
updateView(data: LocalSettings): void;
|
|
50
|
-
save(event?:
|
|
50
|
+
save(event?: Event, options?: any): Promise<boolean>;
|
|
51
51
|
setAccountInheritance(enable: boolean, opts?: {
|
|
52
52
|
emitEvent?: boolean;
|
|
53
53
|
}): void;
|
|
@@ -55,8 +55,8 @@ export declare class SettingsPage extends AppForm<LocalSettings> implements OnIn
|
|
|
55
55
|
allowSelectDownPeer?: boolean;
|
|
56
56
|
canCancel?: boolean;
|
|
57
57
|
}): Promise<void>;
|
|
58
|
-
cancel(event?:
|
|
59
|
-
close(event?:
|
|
58
|
+
cancel(event?: Event): Promise<void>;
|
|
59
|
+
close(event?: Event): Promise<boolean>;
|
|
60
60
|
clearCache(event?: UIEvent): Promise<void>;
|
|
61
61
|
protected getValue(): Promise<LocalSettings>;
|
|
62
62
|
protected getJsonValueToSave(): Promise<any>;
|
|
@@ -327,13 +327,19 @@ mat-option:not(:last-child) {
|
|
|
327
327
|
ion-row.mat-select-header,
|
|
328
328
|
ion-row.mat-menu-header,
|
|
329
329
|
ion-row.mat-autocomplete-header {
|
|
330
|
+
/* Set header as sticky*/
|
|
331
|
+
position: -webkit-sticky;
|
|
332
|
+
position: sticky;
|
|
333
|
+
top: 0;
|
|
334
|
+
z-index: 1001;
|
|
335
|
+
|
|
330
336
|
background-color: var(--ion-color-secondary);
|
|
331
337
|
color: var(--ion-color-secondary-contrast);
|
|
338
|
+
border-bottom: 1px solid #{$app-select-option-border-color};
|
|
332
339
|
@include font-size(12px);
|
|
333
340
|
font-weight: 500;
|
|
334
341
|
height: 20px;
|
|
335
342
|
line-height: 20px;
|
|
336
|
-
border-bottom: 1px solid #{$app-select-option-border-color};
|
|
337
343
|
|
|
338
344
|
ion-col {
|
|
339
345
|
white-space: nowrap;
|