@sumaris-net/ngx-components 2.3.6 → 2.3.7-rc2
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/public_api.mjs +2 -1
- package/esm2020/src/app/shared/dates.mjs +2 -2
- package/esm2020/src/app/shared/material/datetime/material.date.mjs +16 -15
- package/esm2020/src/app/shared/material/datetime/material.dateshort.mjs +225 -167
- package/esm2020/src/app/shared/material/datetime/material.datetime.mjs +10 -7
- package/esm2020/src/app/shared/material/datetime/testing/mat-dateshort.test.mjs +103 -0
- package/esm2020/src/app/shared/material/material.testing.module.mjs +12 -1
- package/fesm2015/sumaris-net.ngx-components.mjs +341 -184
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +341 -185
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/src/app/shared/material/datetime/material.date.d.ts +2 -2
- package/src/app/shared/material/datetime/material.dateshort.d.ts +40 -32
- package/src/app/shared/material/datetime/testing/mat-dateshort.test.d.ts +29 -0
- package/src/app/shared/material/material.testing.module.d.ts +16 -15
- package/src/theme/_ngx-components.scss +10 -7
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -230,6 +230,7 @@ export * from './src/app/shared/material/latlong/testing/latlong.test';
|
|
|
230
230
|
export * from './src/app/shared/material/swipe/testing/swipe.test';
|
|
231
231
|
export * from './src/app/shared/material/datetime/testing/mat-date-time.test';
|
|
232
232
|
export * from './src/app/shared/material/datetime/testing/mat-date.test';
|
|
233
|
+
export * from './src/app/shared/material/datetime/testing/mat-dateshort.test';
|
|
233
234
|
export * from './src/app/shared/material/chips/testing/chips.test';
|
|
234
235
|
export * from './src/app/shared/material/numpad/testing/numpad.test';
|
|
235
236
|
export * from './src/app/shared/testing/observable.test';
|
|
@@ -15,7 +15,7 @@ export declare class MatDate implements OnInit, AfterViewInit, OnDestroy, Contro
|
|
|
15
15
|
private formGroupDir;
|
|
16
16
|
private _onChangeCallback;
|
|
17
17
|
private _onTouchedCallback;
|
|
18
|
-
private _subscription;
|
|
18
|
+
private readonly _subscription;
|
|
19
19
|
private _writing;
|
|
20
20
|
private _disabling;
|
|
21
21
|
private _tabindex;
|
|
@@ -70,5 +70,5 @@ export declare class MatDate implements OnInit, AfterViewInit, OnDestroy, Contro
|
|
|
70
70
|
private markAsDirty;
|
|
71
71
|
private markForCheck;
|
|
72
72
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatDate, [null, null, null, null, { optional: true; }]>;
|
|
73
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatDate, "mat-date-field", never, { "mobile": "mobile"; "formControl": "formControl"; "formControlName": "formControlName"; "placeholder": "placeholder"; "floatLabel": "floatLabel"; "appearance": "appearance"; "required": "required"; "compact": "compact"; "placeholderChar": "placeholderChar"; "autofocus": "autofocus"; "startDate": "startDate"; "clearable": "clearable"; "timezone": "timezone"; "datePickerFilter": "datePickerFilter"; "readonly": "readonly"; "tabindex": "tabindex"; }, {}, never, ["mat-error", "mat-hint", "[matPrefix]"], false>;
|
|
73
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatDate, "mat-date-field", never, { "mobile": "mobile"; "formControl": "formControl"; "formControlName": "formControlName"; "placeholder": "placeholder"; "floatLabel": "floatLabel"; "appearance": "appearance"; "required": "required"; "compact": "compact"; "placeholderChar": "placeholderChar"; "autofocus": "autofocus"; "startDate": "startDate"; "clearable": "clearable"; "timezone": "timezone"; "datePickerFilter": "datePickerFilter"; "readonly": "readonly"; "tabindex": "tabindex"; }, {}, never, ["mat-error", "mat-hint", "[matPrefix]", "[matSuffix]"], false>;
|
|
74
74
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ChangeDetectorRef, ElementRef, OnInit
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, OnInit } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor, FormGroupDirective, UntypedFormBuilder, UntypedFormControl } from '@angular/forms';
|
|
3
3
|
import { TranslateService } from '@ngx-translate/core';
|
|
4
4
|
import { Moment } from 'moment/moment';
|
|
5
5
|
import { InputElement } from '../../inputs';
|
|
6
6
|
import { FloatLabelType, MatFormFieldAppearance } from '@angular/material/form-field';
|
|
7
|
-
import { MatDatepicker } from '@angular/material/datepicker';
|
|
8
|
-
import {
|
|
7
|
+
import { DateFilterFn, MatDatepicker, MatDatepickerInputEvent } from '@angular/material/datepicker';
|
|
8
|
+
import { MomentDateAdapter } from '@angular/material-moment-adapter';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
export declare class MatDateShort implements OnInit, ControlValueAccessor, InputElement {
|
|
11
11
|
private dateAdapter;
|
|
@@ -15,53 +15,61 @@ export declare class MatDateShort implements OnInit, ControlValueAccessor, Input
|
|
|
15
15
|
private formGroupDir;
|
|
16
16
|
private _onChangeCallback;
|
|
17
17
|
private _onTouchedCallback;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
_value: Moment;
|
|
18
|
+
private readonly _subscription;
|
|
19
|
+
private _writing;
|
|
20
|
+
private _disabling;
|
|
21
|
+
private _tabindex;
|
|
22
|
+
private _readonly;
|
|
23
|
+
textControl: UntypedFormControl;
|
|
24
|
+
datePattern: string;
|
|
26
25
|
locale: string;
|
|
27
|
-
|
|
26
|
+
readonly mask: RegExp[];
|
|
28
27
|
mobile: boolean;
|
|
29
|
-
disabled: boolean;
|
|
30
28
|
formControl: UntypedFormControl;
|
|
31
29
|
formControlName: string;
|
|
32
30
|
placeholder: string;
|
|
33
31
|
floatLabel: FloatLabelType;
|
|
34
32
|
appearance: MatFormFieldAppearance;
|
|
35
|
-
readonly: boolean;
|
|
36
33
|
required: boolean;
|
|
37
34
|
compact: boolean;
|
|
38
35
|
placeholderChar: string;
|
|
36
|
+
autofocus: boolean;
|
|
37
|
+
startDate: Moment | null;
|
|
38
|
+
clearable: boolean;
|
|
39
|
+
datePickerFilter: DateFilterFn<Moment>;
|
|
40
|
+
set readonly(value: boolean);
|
|
41
|
+
get readonly(): boolean;
|
|
39
42
|
set tabindex(value: number);
|
|
40
43
|
get tabindex(): number;
|
|
41
|
-
startDate: Date;
|
|
42
|
-
clearable: boolean;
|
|
43
|
-
datePicker1: MatDatepicker<Moment>;
|
|
44
|
-
datePicker2: MatDatepicker<Moment>;
|
|
45
|
-
matInputs: QueryList<ElementRef>;
|
|
46
44
|
get value(): any;
|
|
47
|
-
|
|
45
|
+
get disabled(): boolean;
|
|
46
|
+
datePicker: MatDatepicker<Moment>;
|
|
47
|
+
_matInput: ElementRef;
|
|
48
|
+
constructor(dateAdapter: MomentDateAdapter, translate: TranslateService, formBuilder: UntypedFormBuilder, cd: ChangeDetectorRef, formGroupDir: FormGroupDirective);
|
|
48
49
|
ngOnInit(): void;
|
|
49
|
-
|
|
50
|
+
ngAfterViewInit(): void;
|
|
51
|
+
ngOnDestroy(): void;
|
|
52
|
+
writeValue(value: any): void;
|
|
50
53
|
registerOnChange(fn: any): void;
|
|
51
54
|
registerOnTouched(fn: any): void;
|
|
52
55
|
setDisabledState(isDisabled: boolean): void;
|
|
53
|
-
|
|
56
|
+
openDatePicker(): void;
|
|
57
|
+
focus(): void;
|
|
58
|
+
clear(): void;
|
|
59
|
+
protected _onDatePickerChange(event: MatDatepickerInputEvent<Moment>): void;
|
|
60
|
+
protected _checkIfTouched(opts?: {
|
|
61
|
+
emitEvent?: boolean;
|
|
62
|
+
}): void;
|
|
63
|
+
protected _openDatePickerIfMobile(event: Event): Promise<void>;
|
|
64
|
+
protected _closeDatePicker(eventData: any): void;
|
|
65
|
+
protected _preventEvent(event: Event): void;
|
|
54
66
|
private updatePattern;
|
|
55
67
|
private onFormChange;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
focus(): void;
|
|
62
|
-
protected waitKeyboardHide(waitKeyboardDelay: boolean): Promise<void>;
|
|
63
|
-
protected updateTabIndex(): void;
|
|
64
|
-
protected markForCheck(): void;
|
|
68
|
+
private waitKeyboardHide;
|
|
69
|
+
private updateTabIndex;
|
|
70
|
+
private markAsTouched;
|
|
71
|
+
private markAsDirty;
|
|
72
|
+
private markForCheck;
|
|
65
73
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatDateShort, [null, null, null, null, { optional: true; }]>;
|
|
66
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatDateShort, "mat-date-short-field", never, { "mobile": "mobile"; "
|
|
74
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatDateShort, "mat-date-short-field", never, { "mobile": "mobile"; "formControl": "formControl"; "formControlName": "formControlName"; "placeholder": "placeholder"; "floatLabel": "floatLabel"; "appearance": "appearance"; "required": "required"; "compact": "compact"; "placeholderChar": "placeholderChar"; "autofocus": "autofocus"; "startDate": "startDate"; "clearable": "clearable"; "datePickerFilter": "datePickerFilter"; "readonly": "readonly"; "tabindex": "tabindex"; }, {}, never, ["mat-error", "mat-hint", "[matPrefix]", "[matSuffix]"], false>;
|
|
67
75
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ChangeDetectorRef, OnInit } from '@angular/core';
|
|
2
|
+
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
|
3
|
+
import 'moment-timezone';
|
|
4
|
+
import { Subscription } from 'rxjs';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class DateShortTestPage implements OnInit {
|
|
7
|
+
protected formBuilder: UntypedFormBuilder;
|
|
8
|
+
protected cd: ChangeDetectorRef;
|
|
9
|
+
showLogPanel: boolean;
|
|
10
|
+
logContent: string;
|
|
11
|
+
memoryHide: boolean;
|
|
12
|
+
memoryMobile: boolean;
|
|
13
|
+
memoryTimer: Subscription;
|
|
14
|
+
form: UntypedFormGroup;
|
|
15
|
+
constructor(formBuilder: UntypedFormBuilder, cd: ChangeDetectorRef);
|
|
16
|
+
ngOnInit(): void;
|
|
17
|
+
loadData(): Promise<void>;
|
|
18
|
+
doSubmit(event: any): void;
|
|
19
|
+
log(message: string): void;
|
|
20
|
+
clearLogPanel(): void;
|
|
21
|
+
startMemoryTimer(): void;
|
|
22
|
+
stopMemoryTimer(): void;
|
|
23
|
+
stringify: {
|
|
24
|
+
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
25
|
+
(value: any, replacer?: (string | number)[], space?: string | number): string;
|
|
26
|
+
};
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateShortTestPage, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateShortTestPage, "app-data-short-test", never, {}, {}, never, never, false>;
|
|
29
|
+
}
|
|
@@ -2,23 +2,24 @@ import { TestingPage } from '../testing/tests.page';
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import * as i1 from "./datetime/testing/mat-date-time.test";
|
|
4
4
|
import * as i2 from "./datetime/testing/mat-date.test";
|
|
5
|
-
import * as i3 from "./
|
|
6
|
-
import * as i4 from "./
|
|
7
|
-
import * as i5 from "./
|
|
8
|
-
import * as i6 from "./
|
|
9
|
-
import * as i7 from "./
|
|
10
|
-
import * as i8 from "./
|
|
11
|
-
import * as i9 from "
|
|
12
|
-
import * as i10 from "
|
|
13
|
-
import * as i11 from "@
|
|
14
|
-
import * as i12 from "@angular
|
|
15
|
-
import * as i13 from "
|
|
16
|
-
import * as i14 from "
|
|
17
|
-
import * as i15 from "@
|
|
18
|
-
import * as i16 from "
|
|
5
|
+
import * as i3 from "./datetime/testing/mat-dateshort.test";
|
|
6
|
+
import * as i4 from "./autocomplete/testing/autocomplete.test";
|
|
7
|
+
import * as i5 from "./latlong/testing/latlong.test";
|
|
8
|
+
import * as i6 from "./numpad/testing/numpad.test";
|
|
9
|
+
import * as i7 from "./swipe/testing/swipe.test";
|
|
10
|
+
import * as i8 from "./chips/testing/chips.test";
|
|
11
|
+
import * as i9 from "./badge/badge.test";
|
|
12
|
+
import * as i10 from "../testing/observable.test";
|
|
13
|
+
import * as i11 from "@angular/common";
|
|
14
|
+
import * as i12 from "@ionic/angular";
|
|
15
|
+
import * as i13 from "@angular/forms";
|
|
16
|
+
import * as i14 from "./material.module";
|
|
17
|
+
import * as i15 from "@ngx-translate/core";
|
|
18
|
+
import * as i16 from "@angular/router";
|
|
19
|
+
import * as i17 from "../pipes/pipes.module";
|
|
19
20
|
export declare const SHARED_MATERIAL_TESTING_PAGES: TestingPage[];
|
|
20
21
|
export declare class MaterialTestingModule {
|
|
21
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<MaterialTestingModule, never>;
|
|
22
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MaterialTestingModule, [typeof i1.DateTimeTestPage, typeof i2.DateTestPage, typeof i3.
|
|
23
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MaterialTestingModule, [typeof i1.DateTimeTestPage, typeof i2.DateTestPage, typeof i3.DateShortTestPage, typeof i4.AutocompleteTestPage, typeof i5.LatLongTestPage, typeof i6.NumpadTestPage, typeof i7.SwipeTestPage, typeof i8.ChipsTestPage, typeof i9.MatBadgeTestPage, typeof i10.ObservableTestPage], [typeof i11.CommonModule, typeof i12.IonicModule, typeof i13.ReactiveFormsModule, typeof i14.SharedMaterialModule, typeof i15.TranslateModule, typeof i16.RouterModule, typeof i17.SharedPipesModule], [typeof i14.SharedMaterialModule, typeof i16.RouterModule, typeof i1.DateTimeTestPage, typeof i2.DateTestPage, typeof i3.DateShortTestPage, typeof i4.AutocompleteTestPage, typeof i5.LatLongTestPage, typeof i6.NumpadTestPage, typeof i7.SwipeTestPage, typeof i8.ChipsTestPage, typeof i10.ObservableTestPage]>;
|
|
23
24
|
static ɵinj: i0.ɵɵInjectorDeclaration<MaterialTestingModule>;
|
|
24
25
|
}
|
|
@@ -132,6 +132,7 @@ ion-menu.menu-side-left {
|
|
|
132
132
|
.form-container,
|
|
133
133
|
form.form-container {
|
|
134
134
|
color: $app-form-color;
|
|
135
|
+
@include font-size(16px);
|
|
135
136
|
|
|
136
137
|
.mat-form-field-disabled,
|
|
137
138
|
.mat-input-element:disabled {
|
|
@@ -151,19 +152,19 @@ form.form-container {
|
|
|
151
152
|
}
|
|
152
153
|
|
|
153
154
|
mat-form-field {
|
|
154
|
-
|
|
155
|
+
//@include font-size-important(16px);
|
|
155
156
|
|
|
156
157
|
ion-icon[matPrefix],
|
|
157
158
|
mat-icon[matPrefix],
|
|
158
159
|
.mat-form-field-prefix ion-icon,
|
|
159
160
|
.mat-form-field-prefix .mat-icon {
|
|
160
|
-
font-size:
|
|
161
|
-
|
|
161
|
+
$font-size: calculateRem(18px);
|
|
162
|
+
font-size: $font-size;
|
|
163
|
+
line-height: $font-size;
|
|
164
|
+
height: $font-size;
|
|
162
165
|
margin-left: 5px;
|
|
163
166
|
margin-right: 5px;
|
|
164
|
-
|
|
165
|
-
position: relative;
|
|
166
|
-
bottom: -3px;
|
|
167
|
+
margin-bottom: calc(1rem - $font-size);
|
|
167
168
|
}
|
|
168
169
|
|
|
169
170
|
ion-icon[matSuffix],
|
|
@@ -242,6 +243,8 @@ mat-form-field {
|
|
|
242
243
|
|
|
243
244
|
// --- mat-date-time
|
|
244
245
|
mat-date-time-field {
|
|
246
|
+
//@include font-size-important(16px);
|
|
247
|
+
|
|
245
248
|
// Need for errors injected using the <ng-content> tag
|
|
246
249
|
mat-error {
|
|
247
250
|
text-align: end;
|
|
@@ -1310,7 +1313,7 @@ ion-modal.modal-fullscreen {
|
|
|
1310
1313
|
.mat-cell {
|
|
1311
1314
|
/* smaller size, for the comment icon */
|
|
1312
1315
|
mat-icon.comment {
|
|
1313
|
-
font-size
|
|
1316
|
+
@include font-size(16pt);
|
|
1314
1317
|
height: 100%;
|
|
1315
1318
|
vertical-align: center;
|
|
1316
1319
|
color: var(--ion-color-tertiary, grey);
|