@sumaris-net/ngx-components 1.8.2 → 1.9.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "1.8.2",
4
+ "version": "1.9.0",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
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';
@@ -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>;
@@ -21,7 +21,6 @@ export declare interface LocalSettings {
21
21
  locale: string;
22
22
  usageMode?: UsageMode;
23
23
  mobile?: boolean;
24
- touchUi?: boolean;
25
24
  properties?: PropertiesMap;
26
25
  pageHistory?: HistoryPageReference[];
27
26
  offlineFeatures?: (string | OfflineFeature)[];
@@ -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 from a web browser (and NOT inside an Android or iOs App).
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
- isWebOrDesktop(): boolean;
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(mobile: boolean): void;
72
+ protected configureCordovaPlugins(): void;
70
73
  protected configureTranslate(): void;
71
74
  protected configureCache(online?: boolean): void;
72
75
  protected storageReady(): Promise<LocalForage>;
@@ -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 elementRef;
9
- private timer;
10
- private touchUi;
11
- constructor(elementRef: ElementRef, platform: Platform, keyboard: Keyboard);
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;