@webilix/ngx-form-m3 0.0.34 → 0.0.39
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 +269 -6
- package/fesm2022/webilix-ngx-form-m3.mjs.map +1 -1
- package/index.d.ts +58 -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,17 @@ 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
|
+
readonly placeholder?: string;
|
|
175
|
+
}
|
|
176
|
+
|
|
147
177
|
interface IInputMobile extends Omit<IInput, 'english'> {
|
|
148
178
|
readonly type: 'MOBILE';
|
|
149
179
|
readonly showIcon?: boolean;
|
|
@@ -160,14 +190,8 @@ interface IInputMultiSelect extends Omit<IInput, 'value' | 'optional' | 'autoFoc
|
|
|
160
190
|
readonly type: 'MULTI-SELECT';
|
|
161
191
|
readonly title: string;
|
|
162
192
|
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
|
-
}[];
|
|
193
|
+
readonly options: INgxFormOption[];
|
|
194
|
+
readonly groups?: INgxFormOptionGroup[];
|
|
171
195
|
readonly minCount?: number;
|
|
172
196
|
readonly maxCount?: number;
|
|
173
197
|
readonly listMaxHeight?: number;
|
|
@@ -175,13 +199,9 @@ interface IInputMultiSelect extends Omit<IInput, 'value' | 'optional' | 'autoFoc
|
|
|
175
199
|
readonly view?: 'SELECT';
|
|
176
200
|
}
|
|
177
201
|
|
|
178
|
-
interface IName {
|
|
179
|
-
readonly first: string;
|
|
180
|
-
readonly last: string;
|
|
181
|
-
}
|
|
182
202
|
interface IInputName extends Omit<IInput, 'value' | 'hint' | 'english' | 'description' | 'button'> {
|
|
183
203
|
readonly type: 'NAME';
|
|
184
|
-
readonly value?:
|
|
204
|
+
readonly value?: INgxFormName | null;
|
|
185
205
|
}
|
|
186
206
|
|
|
187
207
|
interface IInputNumber extends Omit<IInput, 'value' | 'english'> {
|
|
@@ -198,6 +218,17 @@ interface IInputNumber extends Omit<IInput, 'value' | 'english'> {
|
|
|
198
218
|
readonly showText?: boolean;
|
|
199
219
|
}
|
|
200
220
|
|
|
221
|
+
interface IInputOptionList extends Omit<IInput, 'value' | 'optional'> {
|
|
222
|
+
readonly type: 'OPTION-LIST';
|
|
223
|
+
readonly title: string;
|
|
224
|
+
readonly value?: INgxFormOptionList[];
|
|
225
|
+
readonly minCount?: number;
|
|
226
|
+
readonly maxCount?: number;
|
|
227
|
+
readonly disableSort?: boolean;
|
|
228
|
+
readonly allowDuplicates?: boolean;
|
|
229
|
+
readonly placeholder?: string;
|
|
230
|
+
}
|
|
231
|
+
|
|
201
232
|
interface IInputPassword extends Omit<IInput, 'english' | 'value'> {
|
|
202
233
|
readonly type: 'PASSWORD';
|
|
203
234
|
readonly verify?: {
|
|
@@ -219,25 +250,17 @@ interface IInputPrice extends Omit<IInput, 'value' | 'english'> {
|
|
|
219
250
|
readonly hideText?: boolean;
|
|
220
251
|
}
|
|
221
252
|
|
|
222
|
-
interface IRouteCoordinates {
|
|
223
|
-
latitude: number;
|
|
224
|
-
longitude: number;
|
|
225
|
-
}
|
|
226
|
-
type Route = IRouteCoordinates[];
|
|
227
253
|
interface IInputRoute extends Omit<IInput, 'value' | 'english' | 'autoFocus'> {
|
|
228
254
|
readonly type: 'ROUTE';
|
|
229
|
-
readonly value?:
|
|
230
|
-
readonly center?:
|
|
255
|
+
readonly value?: NgxFormRoute | null;
|
|
256
|
+
readonly center?: INgxFormCoordinates;
|
|
231
257
|
readonly zoom?: number;
|
|
232
258
|
}
|
|
233
259
|
|
|
234
260
|
interface IInputSelect extends IInput {
|
|
235
261
|
readonly type: 'SELECT';
|
|
236
262
|
readonly title: string;
|
|
237
|
-
readonly options:
|
|
238
|
-
readonly id: string;
|
|
239
|
-
readonly title: string;
|
|
240
|
-
}[];
|
|
263
|
+
readonly options: INgxFormOption[];
|
|
241
264
|
readonly hideSearch?: boolean;
|
|
242
265
|
}
|
|
243
266
|
|
|
@@ -324,4 +347,4 @@ declare class NgxFormComponent implements OnInit, OnChanges, AfterViewInit {
|
|
|
324
347
|
}
|
|
325
348
|
|
|
326
349
|
export { NGX_FORM_CONFIG, NGX_FORM_CONTROL, NGX_FORM_INPUT, NgxFormComponent, provideNgxFormConfig };
|
|
327
|
-
export type { IInputComponent, INgxForm, INgxFormButton, INgxFormConfig, INgxFormInit, INgxFormValues, NgxFormInputs };
|
|
350
|
+
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.39",
|
|
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": {
|