@sumaris-net/ngx-components 1.8.0 → 1.9.1
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 +211 -196
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +7 -2
- package/esm2015/public_api.js +2 -1
- package/esm2015/src/app/admin/users/list/users.js +5 -22
- package/esm2015/src/app/core/form/entity-editor.class.js +5 -1
- package/esm2015/src/app/core/home/home.js +2 -2
- package/esm2015/src/app/core/services/account.service.js +38 -27
- package/esm2015/src/app/core/services/base-entity-service.class.js +2 -2
- package/esm2015/src/app/core/services/local-settings.service.js +18 -14
- package/esm2015/src/app/core/services/model/settings.model.js +1 -1
- package/esm2015/src/app/core/services/platform.service.js +35 -31
- package/esm2015/src/app/core/table/memory-table.class.js +2 -7
- package/esm2015/src/app/core/table/table.class.js +21 -24
- package/esm2015/src/app/shared/directives/autofocus.directive.js +15 -24
- package/esm2015/src/app/shared/platforms.js +36 -0
- package/esm2015/src/app/shared/services/progress-bar.service.js +1 -1
- package/esm2015/src/app/social/list/user-events.table.js +3 -8
- package/fesm2015/sumaris-net.ngx-components.js +165 -135
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/src/app/admin/users/list/users.d.ts +1 -12
- 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/local-settings.service.d.ts +0 -2
- package/src/app/core/services/model/settings.model.d.ts +0 -1
- package/src/app/core/services/platform.service.d.ts +8 -5
- package/src/app/core/table/memory-table.class.d.ts +0 -1
- package/src/app/core/table/table.class.d.ts +7 -9
- package/src/app/shared/directives/autofocus.directive.d.ts +4 -5
- package/src/app/shared/platforms.d.ts +13 -0
- package/src/app/social/list/user-events.table.d.ts +0 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -73,6 +73,7 @@ export * from './src/app/shared/functions';
|
|
|
73
73
|
export * from './src/app/shared/observables';
|
|
74
74
|
export * from './src/app/shared/events';
|
|
75
75
|
export * from './src/app/shared/alerts';
|
|
76
|
+
export * from './src/app/shared/platforms';
|
|
76
77
|
export * from './src/app/shared/hotkeys/shared-hotkeys.module';
|
|
77
78
|
export * from './src/app/shared/hotkeys/hotkeys.service';
|
|
78
79
|
export * from './src/app/shared/hotkeys/dialog/hotkeys-dialog.component';
|
|
@@ -2,27 +2,16 @@ import { ChangeDetectorRef, Injector, OnInit } from '@angular/core';
|
|
|
2
2
|
import { Person } from '../../../core/services/model/person.model';
|
|
3
3
|
import { referentialToString } from '../../../core/services/model/referential.model';
|
|
4
4
|
import { PersonService } from '../../services/person.service';
|
|
5
|
-
import { ModalController } from '@ionic/angular';
|
|
6
|
-
import { ActivatedRoute, Router } from '@angular/router';
|
|
7
5
|
import { AccountService } from '../../../core/services/account.service';
|
|
8
|
-
import { Location } from '@angular/common';
|
|
9
6
|
import { AbstractControl, FormBuilder, FormGroup } from '@angular/forms';
|
|
10
7
|
import { AppTable } from '../../../core/table/table.class';
|
|
11
8
|
import { ValidatorService } from '@e-is/ngx-material-table';
|
|
12
9
|
import { FormFieldDefinition } from '../../../shared/form/field.model';
|
|
13
|
-
import { PlatformService } from '../../../core/services/platform.service';
|
|
14
|
-
import { LocalSettingsService } from '../../../core/services/local-settings.service';
|
|
15
10
|
import { PersonFilter } from '../../services/filter/person.filter';
|
|
16
11
|
import { ConfigService } from '../../../core/services/config.service';
|
|
17
12
|
import { MatExpansionPanel } from '@angular/material/expansion';
|
|
18
13
|
export declare class UsersPage extends AppTable<Person, PersonFilter> implements OnInit {
|
|
19
|
-
protected route: ActivatedRoute;
|
|
20
|
-
protected router: Router;
|
|
21
|
-
protected platform: PlatformService;
|
|
22
|
-
protected location: Location;
|
|
23
|
-
protected modalCtrl: ModalController;
|
|
24
14
|
protected accountService: AccountService;
|
|
25
|
-
protected settings: LocalSettingsService;
|
|
26
15
|
protected validatorService: ValidatorService;
|
|
27
16
|
protected configService: ConfigService;
|
|
28
17
|
protected dataService: PersonService;
|
|
@@ -38,7 +27,7 @@ export declare class UsersPage extends AppTable<Person, PersonFilter> implements
|
|
|
38
27
|
set showUsernameExtranetColumn(value: boolean);
|
|
39
28
|
useSticky: boolean;
|
|
40
29
|
filterExpansionPanel: MatExpansionPanel;
|
|
41
|
-
constructor(
|
|
30
|
+
constructor(injector: Injector, accountService: AccountService, validatorService: ValidatorService, configService: ConfigService, dataService: PersonService, cd: ChangeDetectorRef, formBuilder: FormBuilder, environment: any);
|
|
42
31
|
ngOnInit(): void;
|
|
43
32
|
applyFilterAndClosePanel(event?: UIEvent): void;
|
|
44
33
|
resetFilter(event?: UIEvent): void;
|
|
@@ -139,7 +139,7 @@ export declare abstract class AppEntityEditor<T extends Entity<T, ID>, S extends
|
|
|
139
139
|
emitEvent?: boolean;
|
|
140
140
|
detailsCssClass?: string;
|
|
141
141
|
}): void;
|
|
142
|
-
|
|
142
|
+
canUserWrite(data: T, opts?: any): boolean;
|
|
143
143
|
protected abstract registerForms(): any;
|
|
144
144
|
protected abstract computeTitle(data: T): Promise<string>;
|
|
145
145
|
protected abstract setValue(data: T): Promise<void> | void;
|
|
@@ -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[]>;
|
|
@@ -33,8 +33,6 @@ export declare class LocalSettingsService extends StartableService<LocalSettings
|
|
|
33
33
|
get usageMode(): UsageMode;
|
|
34
34
|
get mobile(): boolean;
|
|
35
35
|
set mobile(value: boolean);
|
|
36
|
-
get touchUi(): boolean;
|
|
37
|
-
set touchUi(value: boolean);
|
|
38
36
|
get pageHistory(): HistoryPageReference[];
|
|
39
37
|
constructor(translate: TranslateService, platform: Platform, storage: Storage, environment: any, defaultSettings: LocalSettings, defaultOptionsMap: FormFieldDefinitionMap);
|
|
40
38
|
ngOnStart(): Promise<LocalSettings>;
|
|
@@ -43,17 +43,20 @@ export declare class PlatformService extends StartableService {
|
|
|
43
43
|
private _mobile;
|
|
44
44
|
private _cordova;
|
|
45
45
|
private _android;
|
|
46
|
+
private _ios;
|
|
46
47
|
private _downloadingJobs;
|
|
47
|
-
touchUi: boolean;
|
|
48
|
-
get mobile(): boolean;
|
|
49
48
|
constructor(platform: Platform, cdkPlatform: CdkPlatform, toastController: ToastController, translate: TranslateService, dateAdapter: MomentDateAdapter, entitiesStorage: EntitiesStorage, settings: LocalSettingsService, networkService: NetworkService, accountService: AccountService, configService: ConfigService, cache: CacheService, storage: Storage, audioProvider: AudioProvider, environment: any, statusBar: StatusBar, keyboard: Keyboard, splashScreen: SplashScreen, browser: InAppBrowser, downloader: Downloader);
|
|
50
49
|
is(platformName: Platforms): boolean;
|
|
50
|
+
get mobile(): boolean;
|
|
51
51
|
/**
|
|
52
|
-
* Say if opened has been opened
|
|
52
|
+
* Say if opened has been opened inside an Android or iOs App.
|
|
53
53
|
* This is used to known if there is cordova features
|
|
54
54
|
*/
|
|
55
|
-
|
|
55
|
+
isCordova(): boolean;
|
|
56
56
|
isAndroidCordova(): boolean;
|
|
57
|
+
isIOSCordova(): boolean;
|
|
58
|
+
isWeb(): boolean;
|
|
59
|
+
isApp(): boolean;
|
|
57
60
|
get canDownload(): boolean;
|
|
58
61
|
get canOpenFile(): boolean;
|
|
59
62
|
width(): number;
|
|
@@ -66,7 +69,7 @@ export declare class PlatformService extends StartableService {
|
|
|
66
69
|
filename?: string;
|
|
67
70
|
} & Partial<DownloadRequest>): Observable<string>;
|
|
68
71
|
openFile(filePath: string, fileMimeType: string): Promise<any>;
|
|
69
|
-
protected configureCordovaPlugins(
|
|
72
|
+
protected configureCordovaPlugins(): void;
|
|
70
73
|
protected configureTranslate(): void;
|
|
71
74
|
protected configureCache(online?: boolean): void;
|
|
72
75
|
protected storageReady(): Promise<LocalForage>;
|
|
@@ -5,7 +5,6 @@ import { AppTable } from './table.class';
|
|
|
5
5
|
import { IEntity } from '../services/model/entity.model';
|
|
6
6
|
import { InMemoryEntitiesService } from '../../shared/services/memory-entity-service.class';
|
|
7
7
|
export declare abstract class AppInMemoryTable<T extends IEntity<T, ID>, F = any, ID = number> extends AppTable<T, F, ID> {
|
|
8
|
-
protected injector: Injector;
|
|
9
8
|
protected columns: string[];
|
|
10
9
|
protected dataType: new () => T;
|
|
11
10
|
protected memoryDataService: InMemoryEntitiesService<T, F, ID>;
|
|
@@ -7,14 +7,13 @@ import { TableElement } from '@e-is/ngx-material-table';
|
|
|
7
7
|
import { EntitiesTableDataSource } from './entities-table-datasource.class';
|
|
8
8
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
9
9
|
import { IEntity } from '../services/model/entity.model';
|
|
10
|
-
import { AlertController, ModalController,
|
|
10
|
+
import { AlertController, ModalController, ToastController } from '@ionic/angular';
|
|
11
11
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
12
12
|
import { ColumnItem } from './table-select-columns.component';
|
|
13
13
|
import { Location } from '@angular/common';
|
|
14
14
|
import { IAppForm } from '../form/form.utils';
|
|
15
15
|
import { LocalSettingsService } from '../services/local-settings.service';
|
|
16
16
|
import { TranslateService } from '@ngx-translate/core';
|
|
17
|
-
import { PlatformService } from '../services/platform.service';
|
|
18
17
|
import { MatAutocompleteConfigHolder, MatAutocompleteFieldAddOptions, MatAutocompleteFieldConfig } from '../../shared/material/autocomplete/material.autocomplete';
|
|
19
18
|
import { CompletableEvent } from '../../shared/events';
|
|
20
19
|
import { WaitForOptions } from '../../shared/observables';
|
|
@@ -45,12 +44,6 @@ export interface IModalDetailOptions<T = any> {
|
|
|
45
44
|
}
|
|
46
45
|
export declare type SaveActionType = 'delete' | 'sort' | 'filter';
|
|
47
46
|
export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = number> implements OnInit, OnDestroy, AfterViewInit, IAppForm, IFormControlPathTranslator {
|
|
48
|
-
protected route: ActivatedRoute;
|
|
49
|
-
protected router: Router;
|
|
50
|
-
protected platform: Platform | PlatformService;
|
|
51
|
-
protected location: Location;
|
|
52
|
-
protected modalCtrl: ModalController;
|
|
53
|
-
protected settings: LocalSettingsService;
|
|
54
47
|
protected columns: string[];
|
|
55
48
|
protected _dataSource?: EntitiesTableDataSource<T, F, ID>;
|
|
56
49
|
private _filter?;
|
|
@@ -62,7 +55,12 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
|
|
|
62
55
|
protected _destroy$: Subject<unknown>;
|
|
63
56
|
protected _autocompleteConfigHolder: MatAutocompleteConfigHolder;
|
|
64
57
|
protected allowRowDetail: boolean;
|
|
58
|
+
protected route: ActivatedRoute;
|
|
59
|
+
protected router: Router;
|
|
60
|
+
protected location: Location;
|
|
61
|
+
protected settings: LocalSettingsService;
|
|
65
62
|
protected translate: TranslateService;
|
|
63
|
+
protected modalCtrl: ModalController;
|
|
66
64
|
protected alertCtrl: AlertController;
|
|
67
65
|
protected toastController: ToastController;
|
|
68
66
|
protected previouslyEditedRowId: number;
|
|
@@ -215,7 +213,7 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
|
|
|
215
213
|
table: MatTable<T>;
|
|
216
214
|
childPaginator: MatPaginator;
|
|
217
215
|
sort: MatSort;
|
|
218
|
-
protected constructor(
|
|
216
|
+
protected constructor(injector: Injector, columns: string[], _dataSource?: EntitiesTableDataSource<T, F, ID>, _filter?: F);
|
|
219
217
|
ngOnInit(): void;
|
|
220
218
|
ngAfterViewInit(): void;
|
|
221
219
|
ngOnDestroy(): void;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { AfterContentInit, ElementRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { Platform } from '@ionic/angular';
|
|
3
2
|
import { Keyboard } from '@ionic-native/keyboard/ngx';
|
|
4
3
|
export declare class AutofocusDirective implements AfterContentInit, OnChanges, OnDestroy {
|
|
5
4
|
protected keyboard: Keyboard;
|
|
6
5
|
shouldFocusElement: any;
|
|
7
6
|
timerDelay: number;
|
|
8
|
-
private
|
|
9
|
-
private
|
|
10
|
-
private
|
|
11
|
-
constructor(elementRef: ElementRef,
|
|
7
|
+
private readonly _elementRef;
|
|
8
|
+
private readonly _mobile;
|
|
9
|
+
private _timer;
|
|
10
|
+
constructor(elementRef: ElementRef, keyboard: Keyboard);
|
|
12
11
|
ngAfterContentInit(): void;
|
|
13
12
|
ngOnChanges(changes: SimpleChanges): void;
|
|
14
13
|
ngOnDestroy(): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const matchMedia: (win: Window, query: string) => boolean;
|
|
2
|
+
export declare const testUserAgent: (win: Window, expr: RegExp) => boolean;
|
|
3
|
+
export declare const isWindow: (win?: Window) => boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Detect desktop, by fine cursor. See https://github.com/ionic-team/ionic-framework/issues/19942
|
|
6
|
+
* @param win
|
|
7
|
+
*/
|
|
8
|
+
export declare const isDesktop: (win?: Window) => boolean;
|
|
9
|
+
export declare const isTouchUi: (win?: Window) => boolean;
|
|
10
|
+
export declare const isMobile: (win: Window) => boolean;
|
|
11
|
+
export declare const isIOS: (win: Window) => boolean;
|
|
12
|
+
export declare const isAndroid: (win: Window) => boolean;
|
|
13
|
+
export declare const isCordova: (win: any) => boolean;
|
|
@@ -34,7 +34,6 @@ export interface UserEventIcon {
|
|
|
34
34
|
color?: PredefinedColors;
|
|
35
35
|
}
|
|
36
36
|
export declare class UserEventsTable extends AppTable<UserEvent, UserEventFilter> implements OnInit {
|
|
37
|
-
protected injector: Injector;
|
|
38
37
|
protected accountService: AccountService;
|
|
39
38
|
protected service: UserEventService;
|
|
40
39
|
protected entities: EntitiesStorage;
|