@webilix/ngx-form-m3 0.0.19 → 0.0.21
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/fesm2022/webilix-ngx-form-m3.mjs +68 -10
- package/fesm2022/webilix-ngx-form-m3.mjs.map +1 -1
- package/lib/inputs/coordinates/input-coordinates.component.d.ts +20 -0
- package/lib/inputs/coordinates/input-coordinates.interface.d.ts +16 -0
- package/lib/inputs/index.d.ts +2 -0
- package/lib/inputs/input.component.d.ts +5 -0
- package/lib/inputs/multi-select/input-multi-select.interface.d.ts +1 -1
- package/lib/inputs/select/input-select.component.d.ts +1 -0
- package/lib/inputs/select/input-select.interface.d.ts +1 -0
- package/lib/ngx-form.interface.d.ts +2 -2
- package/ngx-form-m3.css +36 -0
- package/package.json +2 -2
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FormControl } from '@angular/forms';
|
|
2
|
+
import { INgxHelperCoordinates, NgxHelperCoordinatesService } from '@webilix/ngx-helper-m3';
|
|
3
|
+
import { INgxFormValues } from '../../ngx-form.interface';
|
|
4
|
+
import { IInputConfig } from '../input.interface';
|
|
5
|
+
import { IInputCoordinates } from './input-coordinates.interface';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class InputCoordinatesComponent {
|
|
8
|
+
private readonly ngxHelperCoordinatesService;
|
|
9
|
+
formControl: FormControl;
|
|
10
|
+
input: IInputCoordinates;
|
|
11
|
+
config: IInputConfig;
|
|
12
|
+
values: INgxFormValues;
|
|
13
|
+
isButtonDisabled: boolean;
|
|
14
|
+
coordinates?: INgxHelperCoordinates;
|
|
15
|
+
constructor(ngxHelperCoordinatesService: NgxHelperCoordinatesService);
|
|
16
|
+
setCoordinates(): void;
|
|
17
|
+
resetCoordinates(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputCoordinatesComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputCoordinatesComponent, "ng-component", never, { "values": { "alias": "values"; "required": true; }; "isButtonDisabled": { "alias": "isButtonDisabled"; "required": true; }; }, {}, never, never, true, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ValidatorFn, FormControl } from '@angular/forms';
|
|
2
|
+
import { InputMethods, IInput } from '../input.interface';
|
|
3
|
+
export interface ICoordinates {
|
|
4
|
+
latitude: number;
|
|
5
|
+
longitude: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IInputCoordinates extends Omit<IInput, 'value' | 'english' | 'autoFocus'> {
|
|
8
|
+
readonly type: 'COORDINATES';
|
|
9
|
+
readonly value?: ICoordinates | null;
|
|
10
|
+
readonly center?: ICoordinates;
|
|
11
|
+
readonly zoom?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class InputCoordinatesMethods extends InputMethods<IInputCoordinates, ICoordinates | null> {
|
|
14
|
+
control(input: IInputCoordinates, validators: ValidatorFn[]): FormControl<ICoordinates | null>;
|
|
15
|
+
value(value: any, input: IInputCoordinates): ICoordinates | null;
|
|
16
|
+
}
|
package/lib/inputs/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export * from './color/input-color.component';
|
|
|
6
6
|
export * from './color/input-color.interface';
|
|
7
7
|
export * from './component/input-component.component';
|
|
8
8
|
export * from './component/input-component.interface';
|
|
9
|
+
export * from './coordinates/input-coordinates.component';
|
|
10
|
+
export * from './coordinates/input-coordinates.interface';
|
|
9
11
|
export * from './date/input-date.component';
|
|
10
12
|
export * from './date/input-date.interface';
|
|
11
13
|
export * from './email/input-email.component';
|
|
@@ -49,6 +49,11 @@ export declare class InputComponent implements OnInit, OnChanges {
|
|
|
49
49
|
readonly methods: import("./input.interface").InputMethods<any, any>;
|
|
50
50
|
readonly component: import("@angular/cdk/portal").ComponentType<any>;
|
|
51
51
|
};
|
|
52
|
+
COORDINATES: {
|
|
53
|
+
readonly title: string;
|
|
54
|
+
readonly methods: import("./input.interface").InputMethods<any, any>;
|
|
55
|
+
readonly component: import("@angular/cdk/portal").ComponentType<any>;
|
|
56
|
+
};
|
|
52
57
|
DATE: {
|
|
53
58
|
readonly title: string;
|
|
54
59
|
readonly methods: import("./input.interface").InputMethods<any, any>;
|
|
@@ -3,7 +3,7 @@ import { InputMethods, IInput } from '../input.interface';
|
|
|
3
3
|
export interface IInputMultiSelect extends Omit<IInput, 'value' | 'optional' | 'autoFocus'> {
|
|
4
4
|
readonly type: 'MULTI-SELECT';
|
|
5
5
|
readonly title: string;
|
|
6
|
-
readonly value?: string[];
|
|
6
|
+
readonly value?: string[] | null;
|
|
7
7
|
readonly options: {
|
|
8
8
|
readonly id: string;
|
|
9
9
|
readonly title: string;
|
|
@@ -9,6 +9,7 @@ export declare class InputSelectComponent {
|
|
|
9
9
|
config: IInputConfig;
|
|
10
10
|
values: INgxFormValues;
|
|
11
11
|
isButtonDisabled: boolean;
|
|
12
|
+
searchQuery: string;
|
|
12
13
|
getTitle(): string;
|
|
13
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputSelectComponent, never>;
|
|
14
15
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputSelectComponent, "ng-component", never, { "values": { "alias": "values"; "required": true; }; "isButtonDisabled": { "alias": "isButtonDisabled"; "required": true; }; }, {}, never, never, true, never>;
|
|
@@ -7,6 +7,7 @@ export interface IInputSelect extends IInput {
|
|
|
7
7
|
readonly id: string;
|
|
8
8
|
readonly title: string;
|
|
9
9
|
}[];
|
|
10
|
+
readonly hideSearch?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export declare class InputSelectMethods extends InputMethods<IInputSelect, string | null> {
|
|
12
13
|
control(input: IInputSelect, validators: ValidatorFn[]): FormControl<string | null>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
2
|
import { FormControl, FormGroup, NgForm } from '@angular/forms';
|
|
3
3
|
import { MatFormFieldAppearance } from '@angular/material/form-field';
|
|
4
|
-
import { IInputAutoComplete, IInputCheckbox, IInputColor, IInputComponent, IInputDate, IInputEmail, IInputFile, IInputIcon, IInputIp, IInputMobile, IInputMoment, IInputMultiSelect, IInputName, IInputNumber, IInputPassword, IInputSelect, IInputText, IInputTextarea, IInputUrl } from './inputs';
|
|
5
|
-
export type NgxFormInputs = IInputAutoComplete | IInputCheckbox | IInputColor | IInputComponent | IInputDate | IInputEmail | IInputFile | IInputIcon | IInputIp | IInputMobile | IInputMoment | IInputMultiSelect | IInputName | IInputNumber | IInputPassword | IInputSelect | IInputText | IInputTextarea | IInputUrl;
|
|
4
|
+
import { IInputAutoComplete, IInputCheckbox, IInputColor, IInputComponent, IInputCoordinates, IInputDate, IInputEmail, IInputFile, IInputIcon, IInputIp, IInputMobile, IInputMoment, IInputMultiSelect, IInputName, IInputNumber, IInputPassword, IInputSelect, IInputText, IInputTextarea, IInputUrl } from './inputs';
|
|
5
|
+
export type NgxFormInputs = IInputAutoComplete | IInputCheckbox | IInputColor | IInputComponent | IInputCoordinates | IInputDate | IInputEmail | IInputFile | IInputIcon | IInputIp | IInputMobile | IInputMoment | IInputMultiSelect | IInputName | IInputNumber | IInputPassword | IInputSelect | IInputText | IInputTextarea | IInputUrl;
|
|
6
6
|
type Inputs = NgxFormInputs | {
|
|
7
7
|
readonly header: string;
|
|
8
8
|
readonly input: NgxFormInputs;
|
package/ngx-form-m3.css
CHANGED
|
@@ -107,6 +107,11 @@
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
/* INPUTS: COORDINATES */
|
|
111
|
+
.ngx-helper-form-m3-coordinates-input {
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
}
|
|
114
|
+
|
|
110
115
|
/* INPUTS: ICON */
|
|
111
116
|
.ngx-helper-form-m3-icon-input {
|
|
112
117
|
display: flex;
|
|
@@ -213,3 +218,34 @@
|
|
|
213
218
|
flex: 1;
|
|
214
219
|
}
|
|
215
220
|
}
|
|
221
|
+
|
|
222
|
+
/* INPUTS: SELECT */
|
|
223
|
+
.ngx-helper-form-m3-select-input {
|
|
224
|
+
position: sticky;
|
|
225
|
+
top: 0;
|
|
226
|
+
z-index: 1;
|
|
227
|
+
|
|
228
|
+
input {
|
|
229
|
+
padding: 0.75rem 0.5rem;
|
|
230
|
+
border-radius: 0;
|
|
231
|
+
border-width: 0;
|
|
232
|
+
border-bottom: 1px solid var(--outline-variant);
|
|
233
|
+
outline: none;
|
|
234
|
+
width: 100%;
|
|
235
|
+
direction: rtl;
|
|
236
|
+
|
|
237
|
+
box-sizing: border-box;
|
|
238
|
+
color: var(--on-surface);
|
|
239
|
+
background-color: var(--surface-container-highest);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
input.ngx-form-m3-en {
|
|
243
|
+
direction: ltr;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
input::placeholder {
|
|
247
|
+
font-family: Yekan;
|
|
248
|
+
text-align: right;
|
|
249
|
+
direction: rtl;
|
|
250
|
+
}
|
|
251
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webilix/ngx-form-m3",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"author": "Ali Amirnezhad",
|
|
5
5
|
"description": "Persian form library for Angular and Material 3",
|
|
6
6
|
"repository": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@webilix/helper-library": ">=6.0.2",
|
|
28
28
|
"@webilix/jalali-date-time": ">=2.0.5",
|
|
29
29
|
"@webilix/ngx-calendar-m3": ">=0.0.9",
|
|
30
|
-
"@webilix/ngx-helper-m3": ">=0.0.
|
|
30
|
+
"@webilix/ngx-helper-m3": ">=0.0.19",
|
|
31
31
|
"ngx-mask": ">=19.0.6"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|