@sumaris-net/ngx-components 1.15.3 → 1.15.6
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 +99 -72
- 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 +4 -0
- package/esm2015/src/app/core/services/platform.service.js +1 -1
- package/esm2015/src/app/shared/dates.js +15 -1
- package/esm2015/src/app/shared/material/datetime/material.date.js +42 -22
- package/esm2015/src/app/shared/material/datetime/material.datetime.js +41 -39
- package/esm2015/src/app/shared/material/datetime/testing/mat-date.test.js +2 -2
- package/esm2015/src/app/shared/platforms.js +3 -11
- package/fesm2015/sumaris-net.ngx-components.js +99 -71
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/dates.d.ts +7 -0
- package/src/app/shared/material/datetime/material.date.d.ts +6 -3
- package/src/app/shared/material/datetime/material.datetime.d.ts +5 -4
- package/src/app/shared/platforms.d.ts +1 -6
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
|
@@ -17,6 +17,13 @@ export declare class DateUtils {
|
|
|
17
17
|
* @param keepLocalTime if true, only the timezone (and offset) is updated, keeping the local time same. Consequently, it will now point to a different point in time if the offset has changed.
|
|
18
18
|
*/
|
|
19
19
|
static resetTime(value: Moment | string, timezone?: string, keepLocalTime?: boolean): Moment | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Test if a date is on the given day of week
|
|
22
|
+
* @param date
|
|
23
|
+
* @param weekday
|
|
24
|
+
* @param timezone
|
|
25
|
+
*/
|
|
26
|
+
static isAtDay(date: string | Moment, weekday: number, timezone?: string): boolean;
|
|
20
27
|
}
|
|
21
28
|
export declare function toDateISOString(value: any): string | undefined;
|
|
22
29
|
export declare function fromDateISOString(value: any): Moment | undefined;
|
|
@@ -6,7 +6,7 @@ import { Moment } from 'moment';
|
|
|
6
6
|
import { Keyboard } from '@ionic-native/keyboard/ngx';
|
|
7
7
|
import { InputElement } from '../../inputs';
|
|
8
8
|
import { FloatLabelType } from '@angular/material/form-field';
|
|
9
|
-
import { MatDatepicker, MatDatepickerInputEvent } from '@angular/material/datepicker';
|
|
9
|
+
import { DateFilterFn, MatDatepicker, MatDatepickerInputEvent } from '@angular/material/datepicker';
|
|
10
10
|
import { DateAdapter } from '@angular/material/core';
|
|
11
11
|
export declare class MatDate implements OnInit, OnDestroy, ControlValueAccessor, InputElement {
|
|
12
12
|
private platform;
|
|
@@ -41,6 +41,7 @@ export declare class MatDate implements OnInit, OnDestroy, ControlValueAccessor,
|
|
|
41
41
|
startDate: Moment | null;
|
|
42
42
|
clearable: boolean;
|
|
43
43
|
timezone: string;
|
|
44
|
+
datePickerFilter: DateFilterFn<Moment>;
|
|
44
45
|
set readonly(value: boolean);
|
|
45
46
|
get readonly(): boolean;
|
|
46
47
|
set tabindex(value: number);
|
|
@@ -51,7 +52,7 @@ export declare class MatDate implements OnInit, OnDestroy, ControlValueAccessor,
|
|
|
51
52
|
constructor(platform: Platform, dateAdapter: DateAdapter<Moment>, translate: TranslateService, formBuilder: FormBuilder, cd: ChangeDetectorRef, keyboard: Keyboard, formGroupDir: FormGroupDirective);
|
|
52
53
|
ngOnInit(): void;
|
|
53
54
|
ngOnDestroy(): void;
|
|
54
|
-
writeValue(
|
|
55
|
+
writeValue(value: any): void;
|
|
55
56
|
registerOnChange(fn: any): void;
|
|
56
57
|
registerOnTouched(fn: any): void;
|
|
57
58
|
setDisabledState(isDisabled: boolean): void;
|
|
@@ -62,7 +63,9 @@ export declare class MatDate implements OnInit, OnDestroy, ControlValueAccessor,
|
|
|
62
63
|
focus(): void;
|
|
63
64
|
clear(): void;
|
|
64
65
|
private updatePattern;
|
|
65
|
-
checkIfTouched(
|
|
66
|
+
checkIfTouched(opts?: {
|
|
67
|
+
emitEvent?: boolean;
|
|
68
|
+
}): void;
|
|
66
69
|
private onFormChange;
|
|
67
70
|
private waitKeyboardHide;
|
|
68
71
|
private emitChange;
|
|
@@ -7,7 +7,7 @@ import { TranslateService } from '@ngx-translate/core';
|
|
|
7
7
|
import { Moment } from 'moment';
|
|
8
8
|
import { Keyboard } from '@ionic-native/keyboard/ngx';
|
|
9
9
|
import { InputElement } from '../../inputs';
|
|
10
|
-
import { MatDatepicker, MatDatepickerInputEvent } from '@angular/material/datepicker';
|
|
10
|
+
import { DateFilterFn, MatDatepicker, MatDatepickerInputEvent } from '@angular/material/datepicker';
|
|
11
11
|
declare interface NgxTimePicker {
|
|
12
12
|
selectedHour: {
|
|
13
13
|
time: number;
|
|
@@ -34,8 +34,8 @@ export declare class MatDateTime implements OnInit, OnDestroy, ControlValueAcces
|
|
|
34
34
|
private _tabindex;
|
|
35
35
|
private _keyboardHideDelay;
|
|
36
36
|
_readonly: boolean;
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
dayControl: FormControl;
|
|
38
|
+
hourControl: FormControl;
|
|
39
39
|
displayPattern: string;
|
|
40
40
|
dayPattern: string;
|
|
41
41
|
locale: string;
|
|
@@ -52,6 +52,7 @@ export declare class MatDateTime implements OnInit, OnDestroy, ControlValueAcces
|
|
|
52
52
|
autofocus: boolean;
|
|
53
53
|
startDate: Moment | null;
|
|
54
54
|
clearable: boolean;
|
|
55
|
+
datePickerFilter: DateFilterFn<Moment>;
|
|
55
56
|
set readonly(value: boolean);
|
|
56
57
|
get readonly(): boolean;
|
|
57
58
|
set tabindex(value: number);
|
|
@@ -63,7 +64,7 @@ export declare class MatDateTime implements OnInit, OnDestroy, ControlValueAcces
|
|
|
63
64
|
constructor(platform: Platform, dateAdapter: DateAdapter<Moment>, translate: TranslateService, formBuilder: FormBuilder, cd: ChangeDetectorRef, keyboard: Keyboard, formGroupDir: FormGroupDirective);
|
|
64
65
|
ngOnInit(): void;
|
|
65
66
|
ngOnDestroy(): void;
|
|
66
|
-
writeValue(
|
|
67
|
+
writeValue(value: any): void;
|
|
67
68
|
registerOnChange(fn: any): void;
|
|
68
69
|
registerOnTouched(fn: any): void;
|
|
69
70
|
setDisabledState(isDisabled: boolean): void;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
export declare const matchMedia: (win: Window, query: string) => boolean;
|
|
2
2
|
export declare const testUserAgent: (win: Window, expr: RegExp) => boolean;
|
|
3
|
-
export declare const
|
|
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;
|
|
3
|
+
export declare const isWindows: (win?: Window) => boolean;
|
|
9
4
|
export declare const isTouchUi: (win?: Window) => boolean;
|
|
10
5
|
export declare const isMobile: (win: Window) => boolean;
|
|
11
6
|
export declare const isIOS: (win: Window) => boolean;
|