@ahmadmubarak98/namozaj 1.4.5 → 1.4.7
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/dist/main.d.ts +18 -13
- package/dist/namozaj.js +13771 -13676
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -56,9 +56,7 @@ export declare type CheckBoxGroupFieldConfig = BaseFieldConfig & {
|
|
|
56
56
|
min?: number;
|
|
57
57
|
max?: number;
|
|
58
58
|
horizontal?: boolean;
|
|
59
|
-
options
|
|
60
|
-
optionsFetch?: FieldOptionFetch;
|
|
61
|
-
optionsFetchFnc?: FieldOptionFetchFunction;
|
|
59
|
+
options: FieldOption[] | FieldOptionFetchFunction;
|
|
62
60
|
};
|
|
63
61
|
};
|
|
64
62
|
|
|
@@ -89,7 +87,7 @@ export declare interface DefaultSubmitButtonProps {
|
|
|
89
87
|
hidden?: boolean;
|
|
90
88
|
}
|
|
91
89
|
|
|
92
|
-
export declare type DynamicFormField = TextFieldConfig | NumberFieldConfig | SliderFieldConfig | PhoneFieldConfig | SelectFieldConfig | CheckBoxGroupFieldConfig | RadioGroupFieldConfig | SwitchFieldConfig | CheckboxFieldConfig | DateFieldConfig | FileFieldConfig | ComputedFieldConfig | SectionFieldConfig | ButtonFieldConfig | RepeaterFieldConfig | FieldArrayFieldConfig;
|
|
90
|
+
export declare type DynamicFormField = TextFieldConfig | NumberFieldConfig | SliderFieldConfig | PhoneFieldConfig | SelectFieldConfig | MultiSelectFieldConfig | CheckBoxGroupFieldConfig | RadioGroupFieldConfig | SwitchFieldConfig | CheckboxFieldConfig | DateFieldConfig | FileFieldConfig | ComputedFieldConfig | SectionFieldConfig | ButtonFieldConfig | RepeaterFieldConfig | FieldArrayFieldConfig;
|
|
93
91
|
|
|
94
92
|
export declare interface DynamicFormProps {
|
|
95
93
|
fields: DynamicFormField[];
|
|
@@ -167,11 +165,11 @@ export declare type FieldOptionFetch = {
|
|
|
167
165
|
transform?: (data: any) => FieldOption[];
|
|
168
166
|
};
|
|
169
167
|
|
|
170
|
-
export declare type FieldOptionFetchFunction = () => Promise<FieldOption[]
|
|
168
|
+
export declare type FieldOptionFetchFunction = (() => Promise<FieldOption[]>) | (() => FieldOption[]);
|
|
171
169
|
|
|
172
170
|
export declare type FieldSize = 'small' | 'medium';
|
|
173
171
|
|
|
174
|
-
export declare type FieldType = "text" | "phone" | "number" | "slider" | "select" | "checkbox-group" | "radio-group" | "checkbox" | "switch" | "date" | "time" | "datetime" | "file" | "repeater" | "field-array";
|
|
172
|
+
export declare type FieldType = "text" | "phone" | "number" | "slider" | "select" | "multi-select" | "checkbox-group" | "radio-group" | "checkbox" | "switch" | "date" | "time" | "datetime" | "file" | "repeater" | "field-array";
|
|
175
173
|
|
|
176
174
|
export declare type FieldValueType = string | number | boolean | Date | File | (string | undefined)[] | ({
|
|
177
175
|
[x: string]: any;
|
|
@@ -231,6 +229,18 @@ export declare type InputRestriction = "alpha" | "alphanumeric" | "numeric" | "a
|
|
|
231
229
|
|
|
232
230
|
export declare type ModalSize = "small" | "medium" | "large" | "full";
|
|
233
231
|
|
|
232
|
+
export declare type MultiSelectFieldConfig = BaseFieldConfig & {
|
|
233
|
+
type: "multi-select";
|
|
234
|
+
meta: BaseFieldConfig["meta"] & {
|
|
235
|
+
min?: number;
|
|
236
|
+
max?: number;
|
|
237
|
+
options: FieldOption[] | FieldOptionFetchFunction;
|
|
238
|
+
searchable?: boolean;
|
|
239
|
+
creatable?: boolean;
|
|
240
|
+
clearable?: boolean;
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
|
|
234
244
|
export declare const Namozaj: default_2.ForwardRefExoticComponent<DynamicFormProps & default_2.RefAttributes<any>>;
|
|
235
245
|
|
|
236
246
|
export declare interface NamozajLocalizationOptions {
|
|
@@ -281,9 +291,7 @@ export declare type RadioGroupFieldConfig = BaseFieldConfig & {
|
|
|
281
291
|
type: "radio-group";
|
|
282
292
|
meta: BaseFieldConfig["meta"] & {
|
|
283
293
|
horizontal?: boolean;
|
|
284
|
-
options
|
|
285
|
-
optionsFetch?: FieldOptionFetch;
|
|
286
|
-
optionsFetchFnc?: FieldOptionFetchFunction;
|
|
294
|
+
options: FieldOption[] | FieldOptionFetchFunction;
|
|
287
295
|
};
|
|
288
296
|
};
|
|
289
297
|
|
|
@@ -329,10 +337,7 @@ export declare type SelectFieldConfig = BaseFieldConfig & {
|
|
|
329
337
|
meta: BaseFieldConfig["meta"] & {
|
|
330
338
|
min?: number;
|
|
331
339
|
max?: number;
|
|
332
|
-
options
|
|
333
|
-
optionsFetch?: FieldOptionFetch;
|
|
334
|
-
optionsFetchFnc?: FieldOptionFetchFunction;
|
|
335
|
-
multiple?: boolean;
|
|
340
|
+
options: FieldOption[] | FieldOptionFetchFunction;
|
|
336
341
|
searchable?: boolean;
|
|
337
342
|
creatable?: boolean;
|
|
338
343
|
clearable?: boolean;
|