@sumaris-net/ngx-components 2.0.0-rc30 → 2.0.0-rc32
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/src/app/core/form/text-popover/text-form.component.mjs +12 -7
- package/esm2020/src/app/core/form/text-popover/text-popover.component.mjs +6 -3
- package/esm2020/src/app/core/graphql/graphql.utils.mjs +2 -3
- package/esm2020/src/app/core/peer/select-peer.modal.mjs +54 -10
- package/esm2020/src/app/core/peer/select-peer.module.mjs +7 -4
- package/esm2020/src/app/core/services/config.service.mjs +1 -1
- package/esm2020/src/app/core/services/network.service.mjs +3 -3
- package/esm2020/src/app/core/settings/settings.page.mjs +8 -5
- package/esm2020/src/app/shared/dates.mjs +6 -23
- package/esm2020/src/app/shared/file/file.service.mjs +2 -3
- package/esm2020/src/app/shared/modules.mjs +11 -0
- package/fesm2015/sumaris-net.ngx-components.mjs +1201 -1169
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +7640 -7597
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/text-popover/text-form.component.d.ts +3 -2
- package/src/app/core/form/text-popover/text-popover.component.d.ts +4 -1
- package/src/app/core/peer/select-peer.modal.d.ts +19 -5
- package/src/app/core/peer/select-peer.module.d.ts +2 -1
- package/src/app/core/services/network.service.d.ts +3 -4
- package/src/app/core/settings/settings.page.d.ts +2 -4
- package/src/app/shared/dates.d.ts +5 -11
- package/src/app/shared/modules.d.ts +5 -0
- package/src/assets/i18n/fr.json +1 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectorRef, ElementRef, EventEmitter, Injector, OnInit } from '@angular/core';
|
|
2
|
-
import { UntypedFormBuilder, UntypedFormControl } from '@angular/forms';
|
|
2
|
+
import { UntypedFormBuilder, UntypedFormControl, ValidatorFn } from '@angular/forms';
|
|
3
3
|
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
|
4
4
|
import { AppForm } from '../form.class';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
@@ -15,6 +15,7 @@ export declare class TextForm extends AppForm<{
|
|
|
15
15
|
autoHeight: boolean;
|
|
16
16
|
maxLength: number;
|
|
17
17
|
autofocus: boolean;
|
|
18
|
+
validator: ValidatorFn;
|
|
18
19
|
textAreaChanges: EventEmitter<string>;
|
|
19
20
|
textArea: ElementRef;
|
|
20
21
|
textInput: ElementRef;
|
|
@@ -27,5 +28,5 @@ export declare class TextForm extends AppForm<{
|
|
|
27
28
|
focusInput(): void;
|
|
28
29
|
protected markForCheck(): void;
|
|
29
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextForm, never>;
|
|
30
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TextForm, "app-text-form", never, { "showError": "showError"; "placeholder": "placeholder"; "multiline": "multiline"; "autoHeight": "autoHeight"; "maxLength": "maxLength"; "autofocus": "autofocus"; }, { "textAreaChanges": "textAreaChanges"; }, never, never, false>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextForm, "app-text-form", never, { "showError": "showError"; "placeholder": "placeholder"; "multiline": "multiline"; "autoHeight": "autoHeight"; "maxLength": "maxLength"; "autofocus": "autofocus"; "validator": "validator"; }, { "textAreaChanges": "textAreaChanges"; }, never, never, false>;
|
|
31
32
|
}
|
|
@@ -3,6 +3,7 @@ import { PopoverController } from '@ionic/angular';
|
|
|
3
3
|
import { Subscription } from 'rxjs';
|
|
4
4
|
import { TranslateService } from '@ngx-translate/core';
|
|
5
5
|
import { TextForm } from './text-form.component';
|
|
6
|
+
import { ValidatorFn } from '@angular/forms';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export interface TextPopoverOptions {
|
|
8
9
|
text?: string;
|
|
@@ -11,6 +12,7 @@ export interface TextPopoverOptions {
|
|
|
11
12
|
multiline?: boolean;
|
|
12
13
|
maxLength?: number;
|
|
13
14
|
autofocus?: boolean;
|
|
15
|
+
validator?: ValidatorFn;
|
|
14
16
|
}
|
|
15
17
|
export declare class TextPopover implements OnInit, AfterViewInit, OnDestroy, TextPopoverOptions {
|
|
16
18
|
protected popoverController: PopoverController;
|
|
@@ -22,6 +24,7 @@ export declare class TextPopover implements OnInit, AfterViewInit, OnDestroy, Te
|
|
|
22
24
|
multiline: boolean;
|
|
23
25
|
maxLength: number;
|
|
24
26
|
autofocus: boolean;
|
|
27
|
+
validator: ValidatorFn;
|
|
25
28
|
subscription: Subscription;
|
|
26
29
|
get disabled(): boolean;
|
|
27
30
|
get enabled(): boolean;
|
|
@@ -36,5 +39,5 @@ export declare class TextPopover implements OnInit, AfterViewInit, OnDestroy, Te
|
|
|
36
39
|
cancel(): void;
|
|
37
40
|
ngOnDestroy(): void;
|
|
38
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextPopover, never>;
|
|
39
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TextPopover, "app-text-popover", never, { "text": "text"; "placeholder": "placeholder"; "editing": "editing"; "multiline": "multiline"; "maxLength": "maxLength"; "autofocus": "autofocus"; }, {}, never, never, false>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextPopover, "app-text-popover", never, { "text": "text"; "placeholder": "placeholder"; "editing": "editing"; "multiline": "multiline"; "maxLength": "maxLength"; "autofocus": "autofocus"; "validator": "validator"; }, {}, never, never, false>;
|
|
40
43
|
}
|
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
import { ChangeDetectorRef, EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
-
import { ModalController } from '@ionic/angular';
|
|
2
|
+
import { ModalController, PopoverController } from '@ionic/angular';
|
|
3
3
|
import { Peer } from '../services/model/peer.model';
|
|
4
4
|
import { Observable, Subject } from 'rxjs';
|
|
5
5
|
import { HttpClient } from '@angular/common/http';
|
|
6
|
+
import { TextPopoverOptions } from '../form/text-popover/text-popover.component';
|
|
7
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
6
8
|
import * as i0 from "@angular/core";
|
|
7
|
-
export
|
|
9
|
+
export interface ISelectPeerModalOptions {
|
|
10
|
+
canCancel: boolean;
|
|
11
|
+
allowSelectDownPeer: boolean;
|
|
12
|
+
onRefresh: EventEmitter<Event>;
|
|
13
|
+
showSetManuallyButton: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare class SelectPeerModal implements OnDestroy, ISelectPeerModalOptions {
|
|
8
16
|
private modalCtrl;
|
|
9
|
-
private
|
|
17
|
+
private popoverController;
|
|
18
|
+
private translate;
|
|
10
19
|
private http;
|
|
20
|
+
private cd;
|
|
11
21
|
protected environment: any;
|
|
12
22
|
private _subscription;
|
|
13
23
|
loading: boolean;
|
|
24
|
+
mobile: boolean;
|
|
14
25
|
$peers: Subject<Peer[]>;
|
|
15
26
|
peerMinVersion: any;
|
|
16
27
|
canCancel: boolean;
|
|
17
28
|
allowSelectDownPeer: boolean;
|
|
18
29
|
onRefresh: EventEmitter<Event>;
|
|
19
|
-
|
|
30
|
+
showSetManuallyButton: boolean;
|
|
31
|
+
constructor(modalCtrl: ModalController, popoverController: PopoverController, translate: TranslateService, http: HttpClient, cd: ChangeDetectorRef, environment: any);
|
|
20
32
|
set peers(peers: Observable<Peer[]>);
|
|
21
33
|
cancel(): void;
|
|
22
34
|
ngOnDestroy(): void;
|
|
@@ -28,9 +40,11 @@ export declare class SelectPeerModal implements OnDestroy {
|
|
|
28
40
|
*/
|
|
29
41
|
isCompatible(peer: Peer): boolean;
|
|
30
42
|
refresh(event: any): void;
|
|
43
|
+
clickSetManually(event?: Event): Promise<void>;
|
|
31
44
|
refreshPeers(peers: Peer[]): Promise<void>;
|
|
32
45
|
protected refreshPeer(peer: Peer): Promise<Peer>;
|
|
46
|
+
protected openPeerUrlPopover(event: Event, opts?: Partial<TextPopoverOptions>): Promise<any>;
|
|
33
47
|
protected markForCheck(): void;
|
|
34
48
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectPeerModal, never>;
|
|
35
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SelectPeerModal, "select-peer-modal", never, { "canCancel": "canCancel"; "allowSelectDownPeer": "allowSelectDownPeer"; "onRefresh": "onRefresh"; }, {}, never, never, false>;
|
|
49
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectPeerModal, "select-peer-modal", never, { "canCancel": "canCancel"; "allowSelectDownPeer": "allowSelectDownPeer"; "onRefresh": "onRefresh"; "showSetManuallyButton": "showSetManuallyButton"; }, {}, never, never, false>;
|
|
36
50
|
}
|
|
@@ -3,8 +3,9 @@ import * as i1 from "./select-peer.modal";
|
|
|
3
3
|
import * as i2 from "../../shared/shared.module";
|
|
4
4
|
import * as i3 from "@angular/common/http";
|
|
5
5
|
import * as i4 from "@ngx-translate/core";
|
|
6
|
+
import * as i5 from "../form/text-popover/text-popover.module";
|
|
6
7
|
export declare class AppSelectPeerModule {
|
|
7
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<AppSelectPeerModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AppSelectPeerModule, [typeof i1.SelectPeerModal], [typeof i2.SharedModule, typeof i3.HttpClientModule, typeof i4.TranslateModule], [typeof i4.TranslateModule, typeof i1.SelectPeerModal]>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AppSelectPeerModule, [typeof i1.SelectPeerModal], [typeof i2.SharedModule, typeof i3.HttpClientModule, typeof i4.TranslateModule, typeof i5.AppTextPopoverModule], [typeof i4.TranslateModule, typeof i1.SelectPeerModal]>;
|
|
9
10
|
static ɵinj: i0.ɵɵInjectorDeclaration<AppSelectPeerModule>;
|
|
10
11
|
}
|
|
@@ -4,6 +4,7 @@ import { TranslateService } from '@ngx-translate/core';
|
|
|
4
4
|
import { Storage } from '@ionic/storage-angular';
|
|
5
5
|
import { Peer } from './model/peer.model';
|
|
6
6
|
import { ModalController, Platform, ToastController } from '@ionic/angular';
|
|
7
|
+
import { ISelectPeerModalOptions } from '../peer/select-peer.modal';
|
|
7
8
|
import { BehaviorSubject, Subscription } from 'rxjs';
|
|
8
9
|
import { LocalSettingsService } from './local-settings.service';
|
|
9
10
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
@@ -18,6 +19,7 @@ export declare type ConnectionType = 'none' | 'wifi' | 'ethernet' | 'cell' | 'un
|
|
|
18
19
|
export declare type AuthTokenType = 'token' | 'basic' | 'basic-and-token';
|
|
19
20
|
export declare function getConnectionType(type: Connection): ConnectionType;
|
|
20
21
|
export declare type NetworkEventType = 'start' | 'peerChanged' | 'statusChanged' | 'resetCache' | 'beforeTryOnlineFinish';
|
|
22
|
+
export declare const PEER_URL_REGEXP: RegExp;
|
|
21
23
|
export declare class NetworkService extends StartableObservableService<Peer, Peer> {
|
|
22
24
|
private _document;
|
|
23
25
|
private platform;
|
|
@@ -96,10 +98,7 @@ export declare class NetworkService extends StartableObservableService<Peer, Pee
|
|
|
96
98
|
setForceOffline(value?: boolean, opts?: {
|
|
97
99
|
showToast?: boolean;
|
|
98
100
|
}): void;
|
|
99
|
-
showSelectPeerModal(opts?:
|
|
100
|
-
allowSelectDownPeer?: boolean;
|
|
101
|
-
canCancel?: boolean;
|
|
102
|
-
}): Promise<Peer | undefined>;
|
|
101
|
+
showSelectPeerModal(opts?: Partial<ISelectPeerModalOptions>): Promise<Peer | undefined>;
|
|
103
102
|
clearCache(opts?: {
|
|
104
103
|
emitEvent?: boolean;
|
|
105
104
|
}): Promise<void>;
|
|
@@ -14,6 +14,7 @@ import { AlertController } from '@ionic/angular';
|
|
|
14
14
|
import { Property } from '../../shared/types';
|
|
15
15
|
import { Router } from '@angular/router';
|
|
16
16
|
import { CanLeave } from '../../shared/guard/component-dirty.guard';
|
|
17
|
+
import { ISelectPeerModalOptions } from '../peer/select-peer.modal';
|
|
17
18
|
import * as i0 from "@angular/core";
|
|
18
19
|
export declare class SettingsPage extends AppForm<LocalSettings> implements OnInit, OnDestroy, CanLeave {
|
|
19
20
|
protected platform: PlatformService;
|
|
@@ -52,10 +53,7 @@ export declare class SettingsPage extends AppForm<LocalSettings> implements OnIn
|
|
|
52
53
|
setAccountInheritance(enable: boolean, opts?: {
|
|
53
54
|
emitEvent?: boolean;
|
|
54
55
|
}): void;
|
|
55
|
-
showSelectPeerModal(opts?:
|
|
56
|
-
allowSelectDownPeer?: boolean;
|
|
57
|
-
canCancel?: boolean;
|
|
58
|
-
}): Promise<void>;
|
|
56
|
+
showSelectPeerModal(opts?: Partial<ISelectPeerModalOptions>): Promise<void>;
|
|
59
57
|
cancel(event?: Event): Promise<void>;
|
|
60
58
|
close(event?: Event): Promise<boolean>;
|
|
61
59
|
clearCache(event?: Event): Promise<void>;
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import { Duration, Moment, unitOfTime } from 'moment';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as momentImported from 'moment';
|
|
3
|
+
import 'moment-timezone';
|
|
4
4
|
export declare const DATE_UNIX_TIMESTAMP = "X";
|
|
5
5
|
export declare const DATE_UNIX_MS_TIMESTAMP = "x";
|
|
6
6
|
export declare const MOMENT_NO_TIME_PROPERTY = "_hasNoTime";
|
|
7
|
-
export declare type
|
|
8
|
-
|
|
9
|
-
};
|
|
7
|
+
export declare type MomentDefault = typeof momentImported;
|
|
8
|
+
export declare const moment: typeof momentImported;
|
|
10
9
|
export declare class DateUtils {
|
|
11
|
-
|
|
10
|
+
static moment: typeof momentImported;
|
|
12
11
|
static toDateISOString: typeof toDateISOString;
|
|
13
12
|
static fromDateISOString: typeof fromDateISOString;
|
|
14
13
|
static toDuration: typeof toDuration;
|
|
15
|
-
private static isEsModule;
|
|
16
|
-
static set moment(value: MomentNamespace);
|
|
17
|
-
static get moment(): MomentNamespace;
|
|
18
14
|
static min(date1: Moment, date2: Moment): Moment;
|
|
19
15
|
static max(date1: Moment, date2: Moment): Moment;
|
|
20
16
|
static equals(date1: Moment | string, date2: Moment | string): boolean;
|
|
@@ -42,5 +38,3 @@ export declare function fromDateISOString(value: any): Moment | undefined;
|
|
|
42
38
|
export declare function fromUnixTimestamp(timeInSec: number): Moment;
|
|
43
39
|
export declare function fromUnixMsTimestamp(timeInMs: number): Moment;
|
|
44
40
|
export declare function toDuration(value: number, unit?: moment.unitOfTime.DurationConstructor): Duration;
|
|
45
|
-
declare const moment: MomentNamespace;
|
|
46
|
-
export { moment };
|
package/src/assets/i18n/fr.json
CHANGED
|
@@ -365,6 +365,7 @@
|
|
|
365
365
|
"OFFLINE": "Nœud injoignable",
|
|
366
366
|
"SELECT_MODAL": {
|
|
367
367
|
"TITLE": "Nœuds réseau",
|
|
368
|
+
"BTN_SET_MANUALLY": "Saisir manuellement",
|
|
368
369
|
"HELP": "Veuillez choisir un nœud réseau auquel vous connecter :",
|
|
369
370
|
"NOT_COMPATIBLE_HELP": "Version requise : v{{version}} ou +"
|
|
370
371
|
}
|