@sumaris-net/ngx-components 18.3.28 → 18.3.30-alpha1
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/esm2022/public_api.mjs +2 -1
- package/esm2022/src/app/core/table/testing/table.testing.mjs +1 -1
- package/esm2022/src/app/shared/forms.mjs +11 -2
- package/esm2022/src/app/shared/material/latlong/latlong.utils.mjs +4 -1
- package/esm2022/src/app/shared/material/latlong/material.latlong-input.mjs +359 -0
- package/esm2022/src/app/shared/material/latlong/material.latlong.mjs +105 -396
- package/esm2022/src/app/shared/material/latlong/material.latlong.module.mjs +6 -5
- package/esm2022/src/app/shared/material/latlong/testing/latlong.test.mjs +1 -1
- package/esm2022/src/app/shared/material/material.module.mjs +2 -2
- package/esm2022/src/app/shared/material/material.testing.module.mjs +25 -3
- package/esm2022/src/app/shared/material/test/test-component.mjs +240 -0
- package/fesm2022/sumaris-net.ngx-components.mjs +970 -649
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/src/app/shared/inputs.d.ts +1 -1
- package/src/app/shared/material/latlong/latlong.utils.d.ts +9 -0
- package/src/app/shared/material/latlong/material.latlong-input.d.ts +80 -0
- package/src/app/shared/material/latlong/material.latlong.d.ts +21 -66
- package/src/app/shared/material/latlong/material.latlong.module.d.ts +15 -14
- package/src/app/shared/material/material.testing.module.d.ts +2 -1
- package/src/app/shared/material/test/test-component.d.ts +75 -0
- package/src/assets/manifest.json +1 -1
- package/src/theme/_material.scss +3 -10
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { MatDateShort } from './src/app/shared/material/datetime/material.datesh
|
|
|
23
23
|
export { MatDateTime } from './src/app/shared/material/datetime/material.datetime';
|
|
24
24
|
export { MatDate } from './src/app/shared/material/datetime/material.date';
|
|
25
25
|
export { MatLatLongField } from './src/app/shared/material/latlong/material.latlong';
|
|
26
|
+
export { MatLatLongFieldInput } from './src/app/shared/material/latlong/material.latlong-input';
|
|
26
27
|
export * from './src/app/shared/material/latlong/material.latlong.module';
|
|
27
28
|
export * from './src/app/shared/material/duration/duration.module';
|
|
28
29
|
export { MatDuration } from './src/app/shared/material/duration/material.duration';
|
|
@@ -17,7 +17,7 @@ export interface InputElement extends FocusableElement {
|
|
|
17
17
|
}
|
|
18
18
|
export declare function isInputElement(object: any): object is InputElement;
|
|
19
19
|
export declare function asInputElement<T = any>(object: ElementRef<T>): InputElement | undefined;
|
|
20
|
-
export declare function tabindexComparator(a: InputElement, b: InputElement):
|
|
20
|
+
export declare function tabindexComparator(a: InputElement, b: InputElement): 0 | 1 | -1;
|
|
21
21
|
export interface CanGainFocusOptions {
|
|
22
22
|
minTabindex?: number;
|
|
23
23
|
maxTabindex?: number;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
export declare type LatLongType = 'latitude' | 'longitude';
|
|
2
2
|
export declare type LatLongPattern = 'DDMMSS' | 'DDMM' | 'DD';
|
|
3
3
|
export declare const LAT_LONG_PATTERNS: LatLongPattern[];
|
|
4
|
+
export declare type LatLongSign = '+' | '-';
|
|
5
|
+
export declare type LatLongSignValue = 1 | -1;
|
|
6
|
+
export interface ILatLongData {
|
|
7
|
+
degrees: number;
|
|
8
|
+
minutes: number;
|
|
9
|
+
seconds: number;
|
|
10
|
+
sign: LatLongSignValue;
|
|
11
|
+
}
|
|
4
12
|
export declare const MASKS: {
|
|
5
13
|
[key: string]: {
|
|
6
14
|
[pattern: string]: Array<string | RegExp>;
|
|
@@ -16,6 +24,7 @@ export declare class LatLongFormatOptions {
|
|
|
16
24
|
}
|
|
17
25
|
export declare const LAT_LONG_PATTERN_MAX_DECIMALS = 3;
|
|
18
26
|
export declare const LAT_LONG_VALUE_MAX_DECIMALS = 7;
|
|
27
|
+
export declare function computeDecimalPart(value: number, nbOfDecimals: number): number;
|
|
19
28
|
export declare function formatLatLong(value: number, type: LatLongType, opts?: Partial<LatLongFormatOptions>): string;
|
|
20
29
|
export declare function formatLatitude(value: number | null, opts?: Partial<LatLongFormatOptions>): string;
|
|
21
30
|
export declare function formatLongitude(value: number | null, opts?: Partial<LatLongFormatOptions>): string;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
3
|
+
import { LatLongPattern, LatLongSign, LatLongType } from './latlong.utils';
|
|
4
|
+
import { MaskitoOptions } from '@maskito/core';
|
|
5
|
+
import { MatFormField, MatFormFieldControl } from '@angular/material/form-field';
|
|
6
|
+
import { Subject } from 'rxjs';
|
|
7
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class MatLatLongFieldInput implements MatFormFieldControl<number>, ControlValueAccessor, OnInit, OnDestroy {
|
|
10
|
+
private _elementRef;
|
|
11
|
+
_formField: MatFormField;
|
|
12
|
+
ngControl: NgControl;
|
|
13
|
+
static nextId: number;
|
|
14
|
+
degreesInput: ElementRef;
|
|
15
|
+
minutesInput: ElementRef;
|
|
16
|
+
secondsInput: ElementRef;
|
|
17
|
+
signInput: ElementRef;
|
|
18
|
+
parts: import("@angular/forms").FormGroup<{
|
|
19
|
+
degrees: import("@angular/forms").FormControl<string>;
|
|
20
|
+
minutes: import("@angular/forms").FormControl<string>;
|
|
21
|
+
seconds: import("@angular/forms").FormControl<string>;
|
|
22
|
+
sign: import("@angular/forms").FormControl<1 | -1>;
|
|
23
|
+
}>;
|
|
24
|
+
stateChanges: Subject<void>;
|
|
25
|
+
focused: boolean;
|
|
26
|
+
touched: boolean;
|
|
27
|
+
controlType: string;
|
|
28
|
+
id: string;
|
|
29
|
+
onChange: (_: any) => void;
|
|
30
|
+
onTouched: () => void;
|
|
31
|
+
get empty(): boolean;
|
|
32
|
+
get shouldLabelFloat(): boolean;
|
|
33
|
+
userAriaDescribedBy: string;
|
|
34
|
+
placeholder: string;
|
|
35
|
+
get required(): boolean;
|
|
36
|
+
set required(value: BooleanInput);
|
|
37
|
+
private _required;
|
|
38
|
+
get disabled(): boolean;
|
|
39
|
+
set disabled(value: BooleanInput);
|
|
40
|
+
private _disabled;
|
|
41
|
+
get value(): number | null;
|
|
42
|
+
set value(value: number | null);
|
|
43
|
+
get errorState(): boolean;
|
|
44
|
+
type: LatLongType;
|
|
45
|
+
pattern: LatLongPattern;
|
|
46
|
+
degreesSymbolUnit: string;
|
|
47
|
+
minutesSymbolUnit: string;
|
|
48
|
+
secondsSymbolUnit: string;
|
|
49
|
+
defaultSign: LatLongSign;
|
|
50
|
+
maxDecimals: number;
|
|
51
|
+
showMinutes: boolean;
|
|
52
|
+
showSeconds: boolean;
|
|
53
|
+
showSign: boolean;
|
|
54
|
+
degreesMask: MaskitoOptions;
|
|
55
|
+
minutesMask: MaskitoOptions;
|
|
56
|
+
secondsMask: MaskitoOptions;
|
|
57
|
+
degreesPlaceholder: string;
|
|
58
|
+
minutesPlaceholder: string;
|
|
59
|
+
secondsPlaceholder: string;
|
|
60
|
+
lastInputMaxDecimals: number;
|
|
61
|
+
private logPrefix;
|
|
62
|
+
constructor(_elementRef: ElementRef<HTMLElement>, _formField: MatFormField, ngControl: NgControl);
|
|
63
|
+
ngOnInit(): void;
|
|
64
|
+
ngOnDestroy(): void;
|
|
65
|
+
onFocusIn(event: FocusEvent): void;
|
|
66
|
+
onFocusOut(event: FocusEvent): void;
|
|
67
|
+
handleInput(controlName: string, nextControlName?: string): void;
|
|
68
|
+
autoFocusNext(controlName: string, nextControlName?: string): void;
|
|
69
|
+
autoFocusPrev(controlName: string, prevControlName: string): void;
|
|
70
|
+
getElementByName(name: string): HTMLElement;
|
|
71
|
+
setDescribedByIds(ids: string[]): void;
|
|
72
|
+
onContainerClick(): void;
|
|
73
|
+
writeValue(value: number | null): void;
|
|
74
|
+
registerOnChange(fn: any): void;
|
|
75
|
+
registerOnTouched(fn: any): void;
|
|
76
|
+
setDisabledState(isDisabled: boolean): void;
|
|
77
|
+
private computeLatLongFormGroupValue;
|
|
78
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatLatLongFieldInput, [null, { optional: true; }, { optional: true; self: true; }]>;
|
|
79
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatLatLongFieldInput, "mat-latlong-input", never, { "userAriaDescribedBy": { "alias": "aria-describedby"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; "type": { "alias": "type"; "required": false; }; "pattern": { "alias": "latLongPattern"; "required": false; }; "degreesSymbolUnit": { "alias": "degreesSymbolUnit"; "required": false; }; "minutesSymbolUnit": { "alias": "minutesSymbolUnit"; "required": false; }; "secondsSymbolUnit": { "alias": "secondsSymbolUnit"; "required": false; }; "defaultSign": { "alias": "defaultSign"; "required": false; }; "maxDecimals": { "alias": "maxDecimals"; "required": false; }; "showMinutes": { "alias": "showMinutes"; "required": false; }; "showSeconds": { "alias": "showSeconds"; "required": false; }; "showSign": { "alias": "showSign"; "required": false; }; "degreesMask": { "alias": "degreesMask"; "required": false; }; "minutesMask": { "alias": "minutesMask"; "required": false; }; "secondsMask": { "alias": "secondsMask"; "required": false; }; "degreesPlaceholder": { "alias": "degreesPlaceholder"; "required": false; }; "minutesPlaceholder": { "alias": "minutesPlaceholder"; "required": false; }; "secondsPlaceholder": { "alias": "secondsPlaceholder"; "required": false; }; "lastInputMaxDecimals": { "alias": "lastInputMaxDecimals"; "required": false; }; }, {}, never, never, false, never>;
|
|
80
|
+
}
|
|
@@ -1,48 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ControlValueAccessor,
|
|
3
|
-
import {
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor, FormGroupDirective, UntypedFormControl } from '@angular/forms';
|
|
3
|
+
import { MatFormFieldAppearance, MatFormFieldDefaultOptions, SubscriptSizing } from '@angular/material/form-field';
|
|
4
4
|
import { AppFloatLabelType } from '../../form/field.model';
|
|
5
|
-
import { LatLongPattern, LatLongType } from './latlong.utils';
|
|
6
|
-
import { MatSelect } from '@angular/material/select';
|
|
5
|
+
import { LatLongPattern, LatLongSign, LatLongType } from './latlong.utils';
|
|
7
6
|
import { MaskitoOptions } from '@maskito/core';
|
|
7
|
+
import { MatLatLongFieldInput } from './material.latlong-input';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
-
declare
|
|
10
|
-
interface ILatLongData {
|
|
11
|
-
degrees: number;
|
|
12
|
-
minutes: number;
|
|
13
|
-
seconds: number;
|
|
14
|
-
sign: LatLongSign;
|
|
15
|
-
}
|
|
16
|
-
export declare class MatLatLongField implements OnInit, OnDestroy, ControlValueAccessor {
|
|
9
|
+
export declare class MatLatLongField implements ControlValueAccessor, OnInit, AfterViewInit, OnDestroy {
|
|
17
10
|
private cd;
|
|
18
11
|
private formGroupDir;
|
|
19
|
-
private _onChangeCallback;
|
|
20
|
-
private _onTouchedCallback;
|
|
21
12
|
private _subscription;
|
|
22
|
-
private _disabling;
|
|
23
|
-
private _writing;
|
|
24
13
|
private _appearance;
|
|
25
14
|
private _subscriptSizing;
|
|
26
15
|
private _readonly;
|
|
27
16
|
private _tabindex;
|
|
28
17
|
private readonly _defaultAppearance;
|
|
29
18
|
private readonly _defaultSubscriptSizing;
|
|
30
|
-
protected _focused: boolean;
|
|
31
|
-
protected _touched: boolean;
|
|
32
|
-
protected degreesControl: FormControl<string>;
|
|
33
|
-
protected minutesControl: FormControl<string>;
|
|
34
|
-
protected secondsControl: FormControl<string>;
|
|
35
|
-
protected signControl: FormControl<LatLongSign>;
|
|
36
19
|
protected showMinutes: boolean;
|
|
37
20
|
protected showSeconds: boolean;
|
|
38
|
-
protected
|
|
21
|
+
protected showSign: boolean;
|
|
39
22
|
protected degreesPlaceholder: string;
|
|
40
23
|
protected minutesPlaceholder: string;
|
|
41
24
|
protected secondsPlaceholder: string;
|
|
42
25
|
protected degreesMask: MaskitoOptions;
|
|
43
26
|
protected minutesMask: MaskitoOptions;
|
|
44
27
|
protected secondsMask: MaskitoOptions;
|
|
45
|
-
protected
|
|
28
|
+
protected lastInputMaxDecimals: number;
|
|
46
29
|
protected i18nErrorKeys: {
|
|
47
30
|
required: string;
|
|
48
31
|
min: string;
|
|
@@ -78,7 +61,7 @@ export declare class MatLatLongField implements OnInit, OnDestroy, ControlValueA
|
|
|
78
61
|
required: boolean;
|
|
79
62
|
floatLabel: AppFloatLabelType;
|
|
80
63
|
placeholder: string;
|
|
81
|
-
defaultSign:
|
|
64
|
+
defaultSign: LatLongSign;
|
|
82
65
|
autofocus: boolean;
|
|
83
66
|
mobile: boolean;
|
|
84
67
|
degreesSymbolUnit: string;
|
|
@@ -94,54 +77,26 @@ export declare class MatLatLongField implements OnInit, OnDestroy, ControlValueA
|
|
|
94
77
|
get readonly(): boolean;
|
|
95
78
|
set subscriptSizing(value: SubscriptSizing);
|
|
96
79
|
get subscriptSizing(): SubscriptSizing;
|
|
97
|
-
get showFields(): boolean;
|
|
98
80
|
get disabled(): any;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
inputMinutes: ElementRef;
|
|
106
|
-
inputSeconds: ElementRef;
|
|
107
|
-
inputSign: ElementRef;
|
|
108
|
-
inputSignSelect: MatSelect;
|
|
81
|
+
input: MatLatLongFieldInput;
|
|
82
|
+
pendingValue: any;
|
|
83
|
+
pendingValueSet: boolean;
|
|
84
|
+
pendingDisabledState: boolean;
|
|
85
|
+
pendingOnChange: (_: any) => unknown;
|
|
86
|
+
pendingOnTouched: () => unknown;
|
|
109
87
|
constructor(cd: ChangeDetectorRef, formGroupDir: FormGroupDirective, defaultOptions?: MatFormFieldDefaultOptions);
|
|
110
|
-
|
|
111
|
-
ngOnDestroy(): void;
|
|
88
|
+
writeValue(value: any): void;
|
|
112
89
|
registerOnChange(fn: any): void;
|
|
113
90
|
registerOnTouched(fn: any): void;
|
|
114
|
-
|
|
115
|
-
|
|
91
|
+
setDisabledState?(isDisabled: boolean): void;
|
|
92
|
+
ngOnInit(): void;
|
|
93
|
+
ngAfterViewInit(): void;
|
|
94
|
+
ngOnDestroy(): void;
|
|
116
95
|
clearValue(event?: Event): void;
|
|
117
|
-
protected get internalElements(): HTMLElement[];
|
|
118
|
-
protected onFocusFakeInput(event: FocusEvent): void;
|
|
119
|
-
protected onBlurFakeInput(event: FocusEvent): void;
|
|
120
|
-
protected _onFocusInput(event: FocusEvent): void;
|
|
121
|
-
protected _onBlurInput(event: FocusEvent): void;
|
|
122
|
-
protected _onClickInput(event: UIEvent): void;
|
|
123
|
-
protected focus(target?: any): boolean;
|
|
124
|
-
protected format(rawValue: number): string;
|
|
125
|
-
protected computeDecimalPart(value: number, nbOfDecimals: number): number;
|
|
126
|
-
protected computeLatLongFormGroupValue(rawValue: number | string): ILatLongData;
|
|
127
|
-
protected markAsTouched(): void;
|
|
128
|
-
private patchValue;
|
|
129
|
-
private onFormChange;
|
|
130
|
-
private emitChange;
|
|
131
|
-
private _checkIfTouched;
|
|
132
96
|
private markForCheck;
|
|
133
|
-
/**
|
|
134
|
-
* Show/Hide the fake input
|
|
135
|
-
*/
|
|
136
|
-
private updateFakeInput;
|
|
137
|
-
/**
|
|
138
|
-
* This is a special case, because, this component has a temporary component displayed before the first focus event
|
|
139
|
-
*/
|
|
140
|
-
private updateTabIndex;
|
|
141
97
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatLatLongField, [null, { optional: true; }, null]>;
|
|
142
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatLatLongField, "mat-latlong-field", never, { "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "type": { "alias": "type"; "required": false; }; "pattern": { "alias": "latLongPattern"; "required": false; }; "maxDecimals": { "alias": "maxDecimals"; "required": false; }; "required": { "alias": "required"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "defaultSign": { "alias": "defaultSign"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "degreesSymbolUnit": { "alias": "degreesSymbolUnit"; "required": false; }; "minutesSymbolUnit": { "alias": "minutesSymbolUnit"; "required": false; }; "secondsSymbolUnit": { "alias": "secondsSymbolUnit"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "classList": { "alias": "class"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; }, {
|
|
98
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatLatLongField, "mat-latlong-field", never, { "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "type": { "alias": "type"; "required": false; }; "pattern": { "alias": "latLongPattern"; "required": false; }; "maxDecimals": { "alias": "maxDecimals"; "required": false; }; "required": { "alias": "required"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "defaultSign": { "alias": "defaultSign"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "degreesSymbolUnit": { "alias": "degreesSymbolUnit"; "required": false; }; "minutesSymbolUnit": { "alias": "minutesSymbolUnit"; "required": false; }; "secondsSymbolUnit": { "alias": "secondsSymbolUnit"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "classList": { "alias": "class"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; }, {}, never, ["[matPrefix]", "[matSuffix]", "mat-error,[matError]", "mat-hint:not([align='end']),[matHint]", "mat-hint[align='end']"], false, never>;
|
|
143
99
|
static ngAcceptInputType_mobile: unknown;
|
|
144
100
|
static ngAcceptInputType_clearable: unknown;
|
|
145
101
|
static ngAcceptInputType_tabindex: unknown;
|
|
146
102
|
}
|
|
147
|
-
export {};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./material.latlong";
|
|
3
|
-
import * as i2 from "
|
|
4
|
-
import * as i3 from "@
|
|
5
|
-
import * as i4 from "@angular
|
|
6
|
-
import * as i5 from "
|
|
7
|
-
import * as i6 from "../../
|
|
8
|
-
import * as i7 from "
|
|
9
|
-
import * as i8 from "@angular/material/
|
|
10
|
-
import * as i9 from "@angular/material/
|
|
11
|
-
import * as i10 from "@angular/material/
|
|
12
|
-
import * as i11 from "@
|
|
13
|
-
import * as i12 from "@angular
|
|
14
|
-
import * as i13 from "@angular/material/
|
|
15
|
-
import * as i14 from "@
|
|
3
|
+
import * as i2 from "./material.latlong-input";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "@ionic/angular";
|
|
6
|
+
import * as i5 from "@angular/forms";
|
|
7
|
+
import * as i6 from "../../directives/directives.module";
|
|
8
|
+
import * as i7 from "../../pipes/pipes.module";
|
|
9
|
+
import * as i8 from "@angular/material/core";
|
|
10
|
+
import * as i9 from "@angular/material/form-field";
|
|
11
|
+
import * as i10 from "@angular/material/input";
|
|
12
|
+
import * as i11 from "@angular/material/button";
|
|
13
|
+
import * as i12 from "@maskito/angular";
|
|
14
|
+
import * as i13 from "@angular/material/icon";
|
|
15
|
+
import * as i14 from "@angular/material/select";
|
|
16
|
+
import * as i15 from "@ngx-translate/core";
|
|
16
17
|
export declare class SharedMatLatLongModule {
|
|
17
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<SharedMatLatLongModule, never>;
|
|
18
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedMatLatLongModule, [typeof i1.MatLatLongField], [typeof
|
|
19
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedMatLatLongModule, [typeof i1.MatLatLongField, typeof i2.MatLatLongFieldInput], [typeof i3.CommonModule, typeof i4.IonicModule, typeof i5.ReactiveFormsModule, typeof i6.SharedDirectivesModule, typeof i7.SharedPipesModule, typeof i8.MatCommonModule, typeof i9.MatFormFieldModule, typeof i10.MatInputModule, typeof i11.MatButtonModule, typeof i12.MaskitoDirective, typeof i13.MatIconModule, typeof i14.MatSelectModule, typeof i15.TranslateModule], [typeof i1.MatLatLongField, typeof i2.MatLatLongFieldInput]>;
|
|
19
20
|
static ɵinj: i0.ɵɵInjectorDeclaration<SharedMatLatLongModule>;
|
|
20
21
|
}
|
|
@@ -23,9 +23,10 @@ import * as i20 from "@angular/router";
|
|
|
23
23
|
import * as i21 from "../pipes/pipes.module";
|
|
24
24
|
import * as i22 from "./badge/badge.module";
|
|
25
25
|
import * as i23 from "@maskito/angular";
|
|
26
|
+
import * as i24 from "./latlong/material.latlong.module";
|
|
26
27
|
export declare const SHARED_MATERIAL_TESTING_PAGES: TestingPage[];
|
|
27
28
|
export declare class MaterialTestingModule {
|
|
28
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<MaterialTestingModule, never>;
|
|
29
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MaterialTestingModule, [typeof i1.MatCommonTestPage, typeof i2.DateTimeTestPage, typeof i3.DateTestPage, typeof i4.DateShortTestPage, typeof i5.DurationTestPage, typeof i6.AutocompleteTestPage, typeof i7.BooleanTestPage, typeof i8.LatLongTestPage, typeof i9.TextFormTestingPage, typeof i10.SwipeTestPage, typeof i11.ChipsTestPage, typeof i12.MatBadgeTestPage, typeof i13.ObservableTestPage, typeof i14.MaskitoTestPage], [typeof i15.CommonModule, typeof i16.IonicModule, typeof i17.ReactiveFormsModule, typeof i18.SharedMaterialModule, typeof i19.TranslateModule, typeof i20.RouterModule, typeof i21.SharedPipesModule, typeof i22.SharedBadgeModule, typeof i17.FormsModule, typeof i23.MaskitoDirective], [typeof i18.SharedMaterialModule, typeof i20.RouterModule, typeof i1.MatCommonTestPage, typeof i2.DateTimeTestPage, typeof i3.DateTestPage, typeof i4.DateShortTestPage, typeof i5.DurationTestPage, typeof i6.AutocompleteTestPage, typeof i7.BooleanTestPage, typeof i8.LatLongTestPage, typeof i9.TextFormTestingPage, typeof i10.SwipeTestPage, typeof i11.ChipsTestPage, typeof i12.MatBadgeTestPage, typeof i13.ObservableTestPage, typeof i14.MaskitoTestPage]>;
|
|
30
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MaterialTestingModule, [typeof i1.MatCommonTestPage, typeof i2.DateTimeTestPage, typeof i3.DateTestPage, typeof i4.DateShortTestPage, typeof i5.DurationTestPage, typeof i6.AutocompleteTestPage, typeof i7.BooleanTestPage, typeof i8.LatLongTestPage, typeof i9.TextFormTestingPage, typeof i10.SwipeTestPage, typeof i11.ChipsTestPage, typeof i12.MatBadgeTestPage, typeof i13.ObservableTestPage, typeof i14.MaskitoTestPage], [typeof i15.CommonModule, typeof i16.IonicModule, typeof i17.ReactiveFormsModule, typeof i18.SharedMaterialModule, typeof i19.TranslateModule, typeof i20.RouterModule, typeof i21.SharedPipesModule, typeof i22.SharedBadgeModule, typeof i17.FormsModule, typeof i23.MaskitoDirective, typeof i24.SharedMatLatLongModule], [typeof i18.SharedMaterialModule, typeof i20.RouterModule, typeof i1.MatCommonTestPage, typeof i2.DateTimeTestPage, typeof i3.DateTestPage, typeof i4.DateShortTestPage, typeof i5.DurationTestPage, typeof i6.AutocompleteTestPage, typeof i7.BooleanTestPage, typeof i8.LatLongTestPage, typeof i9.TextFormTestingPage, typeof i10.SwipeTestPage, typeof i11.ChipsTestPage, typeof i12.MatBadgeTestPage, typeof i13.ObservableTestPage, typeof i14.MaskitoTestPage]>;
|
|
30
31
|
static ɵinj: i0.ɵɵInjectorDeclaration<MaterialTestingModule>;
|
|
31
32
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { AbstractControl, ControlValueAccessor, FormControl, FormGroup, NgControl } from '@angular/forms';
|
|
3
|
+
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/** @title Form field with custom telephone number input control. */
|
|
7
|
+
export declare class FormFieldCustomControlExample {
|
|
8
|
+
readonly form: FormGroup<{
|
|
9
|
+
tel: FormControl<any>;
|
|
10
|
+
}>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldCustomControlExample, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldCustomControlExample, "form-field-custom-control-example", never, {}, {}, never, never, true, never>;
|
|
13
|
+
}
|
|
14
|
+
/** Data structure for holding telephone number. */
|
|
15
|
+
export declare class MyTel {
|
|
16
|
+
area: string;
|
|
17
|
+
exchange: string;
|
|
18
|
+
subscriber: string;
|
|
19
|
+
constructor(area: string, exchange: string, subscriber: string);
|
|
20
|
+
}
|
|
21
|
+
/** Custom `MatFormFieldControl` for telephone number input. */
|
|
22
|
+
export declare class MyTelInput implements ControlValueAccessor, MatFormFieldControl<MyTel>, OnDestroy {
|
|
23
|
+
static nextId: number;
|
|
24
|
+
readonly areaInput: import("@angular/core").Signal<HTMLInputElement>;
|
|
25
|
+
readonly exchangeInput: import("@angular/core").Signal<HTMLInputElement>;
|
|
26
|
+
readonly subscriberInput: import("@angular/core").Signal<HTMLInputElement>;
|
|
27
|
+
ngControl: NgControl;
|
|
28
|
+
readonly parts: FormGroup<{
|
|
29
|
+
area: FormControl<string | null>;
|
|
30
|
+
exchange: FormControl<string | null>;
|
|
31
|
+
subscriber: FormControl<string | null>;
|
|
32
|
+
}>;
|
|
33
|
+
readonly stateChanges: Subject<void>;
|
|
34
|
+
readonly touched: import("@angular/core").WritableSignal<boolean>;
|
|
35
|
+
readonly controlType = "example-tel-input";
|
|
36
|
+
readonly id: string;
|
|
37
|
+
readonly _userAriaDescribedBy: import("@angular/core").InputSignal<string>;
|
|
38
|
+
readonly _placeholder: import("@angular/core").InputSignal<string>;
|
|
39
|
+
readonly _required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
40
|
+
readonly _disabledByInput: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
41
|
+
readonly _value: import("@angular/core").ModelSignal<MyTel>;
|
|
42
|
+
onChange: (_: any) => void;
|
|
43
|
+
onTouched: () => void;
|
|
44
|
+
protected readonly _formField: import("@angular/material/form-field").MatFormField;
|
|
45
|
+
private readonly _focused;
|
|
46
|
+
private readonly _disabledByCva;
|
|
47
|
+
private readonly _disabled;
|
|
48
|
+
private readonly _focusMonitor;
|
|
49
|
+
private readonly _elementRef;
|
|
50
|
+
get focused(): boolean;
|
|
51
|
+
get empty(): boolean;
|
|
52
|
+
get shouldLabelFloat(): boolean;
|
|
53
|
+
get userAriaDescribedBy(): string;
|
|
54
|
+
get placeholder(): string;
|
|
55
|
+
get required(): boolean;
|
|
56
|
+
get disabled(): boolean;
|
|
57
|
+
get value(): MyTel | null;
|
|
58
|
+
get errorState(): boolean;
|
|
59
|
+
constructor();
|
|
60
|
+
ngOnDestroy(): void;
|
|
61
|
+
onFocusIn(): void;
|
|
62
|
+
onFocusOut(event: FocusEvent): void;
|
|
63
|
+
autoFocusNext(control: AbstractControl, nextElement?: HTMLInputElement): void;
|
|
64
|
+
autoFocusPrev(control: AbstractControl, prevElement: HTMLInputElement): void;
|
|
65
|
+
setDescribedByIds(ids: string[]): void;
|
|
66
|
+
onContainerClick(): void;
|
|
67
|
+
writeValue(tel: MyTel | null): void;
|
|
68
|
+
registerOnChange(fn: any): void;
|
|
69
|
+
registerOnTouched(fn: any): void;
|
|
70
|
+
setDisabledState(isDisabled: boolean): void;
|
|
71
|
+
_handleInput(control: AbstractControl, nextElement?: HTMLInputElement): void;
|
|
72
|
+
private _updateValue;
|
|
73
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MyTelInput, never>;
|
|
74
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MyTelInput, "example-tel-input", never, { "_userAriaDescribedBy": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "_placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "_required": { "alias": "required"; "required": false; "isSignal": true; }; "_disabledByInput": { "alias": "disabled"; "required": false; "isSignal": true; }; "_value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "_value": "valueChange"; }, never, never, true, never>;
|
|
75
|
+
}
|
package/src/assets/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "ngx-sumaris-components",
|
|
3
3
|
"short_name": "ngx-sumaris-components",
|
|
4
4
|
"manifest_version": 1,
|
|
5
|
-
"version": "18.3.
|
|
5
|
+
"version": "18.3.29",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|
package/src/theme/_material.scss
CHANGED
|
@@ -197,16 +197,9 @@ mat-icon[slot] {
|
|
|
197
197
|
// Latitude/Longitude component
|
|
198
198
|
.mat-latlong-field {
|
|
199
199
|
|
|
200
|
-
.mat-mdc-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
.mat-mdc-select.sign {
|
|
204
|
-
max-width: 1.7em;
|
|
205
|
-
|
|
206
|
-
.mat-mdc-select-trigger {
|
|
207
|
-
align-items: baseline;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
200
|
+
.mat-mdc-select-value {
|
|
201
|
+
text-align: right;
|
|
202
|
+
padding-right: 0.25em;
|
|
210
203
|
}
|
|
211
204
|
|
|
212
205
|
}
|