@webilix/ngx-form-m3 0.0.34 → 0.0.38
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 +265 -6
- package/fesm2022/webilix-ngx-form-m3.mjs.map +1 -1
- package/index.d.ts +56 -35
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { Router } from '@angular/router';
|
|
|
5
5
|
import { MatFormFieldAppearance } from '@angular/material/form-field';
|
|
6
6
|
import { ComponentType } from '@angular/cdk/portal';
|
|
7
7
|
|
|
8
|
-
type NgxFormInputs = IInputAutoComplete | IInputBankCard | IInputBankSheba | IInputCheckbox | IInputColor | IInputComponent | IInputCoordinates | IInputDate | IInputEmail | IInputFile | IInputIcon | IInputIp | IInputMobile | IInputMoment | IInputMultiSelect | IInputName | IInputNumber | IInputPassword | IInputPrice | IInputRoute | IInputSelect | IInputText | IInputTextarea | IInputUrl;
|
|
8
|
+
type NgxFormInputs = IInputAutoComplete | IInputBankCard | IInputBankSheba | IInputCheckbox | IInputColor | IInputComponent | IInputCoordinates | IInputDate | IInputEmail | IInputFile | IInputIcon | IInputIp | IInputItemList | IInputMobile | IInputMoment | IInputMultiSelect | IInputName | IInputNumber | IInputOptionList | IInputPassword | IInputPrice | IInputRoute | IInputSelect | IInputText | IInputTextarea | IInputUrl;
|
|
9
9
|
type Inputs = NgxFormInputs | {
|
|
10
10
|
readonly header: string;
|
|
11
11
|
readonly input: NgxFormInputs;
|
|
@@ -97,24 +97,43 @@ interface IInputColor extends Omit<IInput, 'english' | 'autoFocus'> {
|
|
|
97
97
|
readonly type: 'COLOR';
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
type NgxFormComponentInputs = {
|
|
101
|
+
[key: string]: any;
|
|
102
|
+
};
|
|
103
|
+
interface INgxFormCoordinates {
|
|
104
|
+
readonly latitude: number;
|
|
105
|
+
readonly longitude: number;
|
|
106
|
+
}
|
|
107
|
+
interface INgxFormOption {
|
|
108
|
+
readonly id: string;
|
|
109
|
+
readonly title: string;
|
|
110
|
+
}
|
|
111
|
+
interface INgxFormOptionGroup {
|
|
112
|
+
readonly title: string;
|
|
113
|
+
readonly ids: string[];
|
|
114
|
+
}
|
|
115
|
+
interface INgxFormName {
|
|
116
|
+
readonly first: string;
|
|
117
|
+
readonly last: string;
|
|
118
|
+
}
|
|
119
|
+
interface INgxFormOptionList {
|
|
120
|
+
readonly id: string | null;
|
|
121
|
+
readonly title: string;
|
|
122
|
+
}
|
|
123
|
+
type NgxFormRoute = INgxFormCoordinates[];
|
|
124
|
+
|
|
100
125
|
interface IInputComponent extends Omit<IInput, 'value' | 'english' | 'autoFocus'> {
|
|
101
126
|
readonly type: 'COMPONENT';
|
|
102
127
|
readonly value?: any;
|
|
103
128
|
readonly component: ComponentType<any>;
|
|
104
|
-
readonly componentInputs?:
|
|
105
|
-
[key: string]: any;
|
|
106
|
-
};
|
|
129
|
+
readonly componentInputs?: NgxFormComponentInputs;
|
|
107
130
|
readonly zeroPadding?: boolean;
|
|
108
131
|
}
|
|
109
132
|
|
|
110
|
-
interface ICoordinates {
|
|
111
|
-
latitude: number;
|
|
112
|
-
longitude: number;
|
|
113
|
-
}
|
|
114
133
|
interface IInputCoordinates extends Omit<IInput, 'value' | 'english' | 'autoFocus'> {
|
|
115
134
|
readonly type: 'COORDINATES';
|
|
116
|
-
readonly value?:
|
|
117
|
-
readonly center?:
|
|
135
|
+
readonly value?: INgxFormCoordinates | null;
|
|
136
|
+
readonly center?: INgxFormCoordinates;
|
|
118
137
|
readonly zoom?: number;
|
|
119
138
|
}
|
|
120
139
|
|
|
@@ -144,6 +163,16 @@ interface IInputIp extends Omit<IInput, 'english'> {
|
|
|
144
163
|
readonly showIcon?: boolean;
|
|
145
164
|
}
|
|
146
165
|
|
|
166
|
+
interface IInputItemList extends Omit<IInput, 'value' | 'optional'> {
|
|
167
|
+
readonly type: 'ITEM-LIST';
|
|
168
|
+
readonly title: string;
|
|
169
|
+
readonly value?: string[];
|
|
170
|
+
readonly minCount?: number;
|
|
171
|
+
readonly maxCount?: number;
|
|
172
|
+
readonly disableSort?: boolean;
|
|
173
|
+
readonly allowDuplicates?: boolean;
|
|
174
|
+
}
|
|
175
|
+
|
|
147
176
|
interface IInputMobile extends Omit<IInput, 'english'> {
|
|
148
177
|
readonly type: 'MOBILE';
|
|
149
178
|
readonly showIcon?: boolean;
|
|
@@ -160,14 +189,8 @@ interface IInputMultiSelect extends Omit<IInput, 'value' | 'optional' | 'autoFoc
|
|
|
160
189
|
readonly type: 'MULTI-SELECT';
|
|
161
190
|
readonly title: string;
|
|
162
191
|
readonly value?: string[] | null;
|
|
163
|
-
readonly options:
|
|
164
|
-
|
|
165
|
-
readonly title: string;
|
|
166
|
-
}[];
|
|
167
|
-
readonly groups?: {
|
|
168
|
-
readonly title: string;
|
|
169
|
-
readonly ids: string[];
|
|
170
|
-
}[];
|
|
192
|
+
readonly options: INgxFormOption[];
|
|
193
|
+
readonly groups?: INgxFormOptionGroup[];
|
|
171
194
|
readonly minCount?: number;
|
|
172
195
|
readonly maxCount?: number;
|
|
173
196
|
readonly listMaxHeight?: number;
|
|
@@ -175,13 +198,9 @@ interface IInputMultiSelect extends Omit<IInput, 'value' | 'optional' | 'autoFoc
|
|
|
175
198
|
readonly view?: 'SELECT';
|
|
176
199
|
}
|
|
177
200
|
|
|
178
|
-
interface IName {
|
|
179
|
-
readonly first: string;
|
|
180
|
-
readonly last: string;
|
|
181
|
-
}
|
|
182
201
|
interface IInputName extends Omit<IInput, 'value' | 'hint' | 'english' | 'description' | 'button'> {
|
|
183
202
|
readonly type: 'NAME';
|
|
184
|
-
readonly value?:
|
|
203
|
+
readonly value?: INgxFormName | null;
|
|
185
204
|
}
|
|
186
205
|
|
|
187
206
|
interface IInputNumber extends Omit<IInput, 'value' | 'english'> {
|
|
@@ -198,6 +217,16 @@ interface IInputNumber extends Omit<IInput, 'value' | 'english'> {
|
|
|
198
217
|
readonly showText?: boolean;
|
|
199
218
|
}
|
|
200
219
|
|
|
220
|
+
interface IInputOptionList extends Omit<IInput, 'value' | 'optional'> {
|
|
221
|
+
readonly type: 'OPTION-LIST';
|
|
222
|
+
readonly title: string;
|
|
223
|
+
readonly value?: INgxFormOptionList[];
|
|
224
|
+
readonly minCount?: number;
|
|
225
|
+
readonly maxCount?: number;
|
|
226
|
+
readonly disableSort?: boolean;
|
|
227
|
+
readonly allowDuplicates?: boolean;
|
|
228
|
+
}
|
|
229
|
+
|
|
201
230
|
interface IInputPassword extends Omit<IInput, 'english' | 'value'> {
|
|
202
231
|
readonly type: 'PASSWORD';
|
|
203
232
|
readonly verify?: {
|
|
@@ -219,25 +248,17 @@ interface IInputPrice extends Omit<IInput, 'value' | 'english'> {
|
|
|
219
248
|
readonly hideText?: boolean;
|
|
220
249
|
}
|
|
221
250
|
|
|
222
|
-
interface IRouteCoordinates {
|
|
223
|
-
latitude: number;
|
|
224
|
-
longitude: number;
|
|
225
|
-
}
|
|
226
|
-
type Route = IRouteCoordinates[];
|
|
227
251
|
interface IInputRoute extends Omit<IInput, 'value' | 'english' | 'autoFocus'> {
|
|
228
252
|
readonly type: 'ROUTE';
|
|
229
|
-
readonly value?:
|
|
230
|
-
readonly center?:
|
|
253
|
+
readonly value?: NgxFormRoute | null;
|
|
254
|
+
readonly center?: INgxFormCoordinates;
|
|
231
255
|
readonly zoom?: number;
|
|
232
256
|
}
|
|
233
257
|
|
|
234
258
|
interface IInputSelect extends IInput {
|
|
235
259
|
readonly type: 'SELECT';
|
|
236
260
|
readonly title: string;
|
|
237
|
-
readonly options:
|
|
238
|
-
readonly id: string;
|
|
239
|
-
readonly title: string;
|
|
240
|
-
}[];
|
|
261
|
+
readonly options: INgxFormOption[];
|
|
241
262
|
readonly hideSearch?: boolean;
|
|
242
263
|
}
|
|
243
264
|
|
|
@@ -324,4 +345,4 @@ declare class NgxFormComponent implements OnInit, OnChanges, AfterViewInit {
|
|
|
324
345
|
}
|
|
325
346
|
|
|
326
347
|
export { NGX_FORM_CONFIG, NGX_FORM_CONTROL, NGX_FORM_INPUT, NgxFormComponent, provideNgxFormConfig };
|
|
327
|
-
export type { IInputComponent, INgxForm, INgxFormButton, INgxFormConfig, INgxFormInit, INgxFormValues, NgxFormInputs };
|
|
348
|
+
export type { IInputComponent, INgxForm, INgxFormButton, INgxFormConfig, INgxFormCoordinates, INgxFormInit, INgxFormName, INgxFormOption, INgxFormOptionGroup, INgxFormOptionList, INgxFormValues, NgxFormComponentInputs, NgxFormInputs, NgxFormRoute };
|
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.38",
|
|
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.1.5",
|
|
28
28
|
"@webilix/jalali-date-time": ">=2.0.7",
|
|
29
29
|
"@webilix/ngx-calendar-m3": ">=0.0.15",
|
|
30
|
-
"@webilix/ngx-helper-m3": ">=0.0.
|
|
30
|
+
"@webilix/ngx-helper-m3": ">=0.0.32",
|
|
31
31
|
"ngx-mask": ">=19.0.7"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|