@ahmadmubarak98/namozaj 1.7.2 → 1.8.0
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 +23 -1
- package/dist/namozaj.js +7778 -6256
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare type BaseFieldConfig = {
|
|
|
16
16
|
type: FieldType;
|
|
17
17
|
meta: {
|
|
18
18
|
label: string;
|
|
19
|
+
step?: number | string;
|
|
19
20
|
defaultValue?: FieldValueType;
|
|
20
21
|
style?: React.CSSProperties;
|
|
21
22
|
placeholder?: string;
|
|
@@ -295,6 +296,7 @@ export declare interface NamozajProps {
|
|
|
295
296
|
fields: NamozajField[];
|
|
296
297
|
dirtyLock?: boolean;
|
|
297
298
|
localization?: NamozajLocalizationOptions;
|
|
299
|
+
stepper?: NamozajStepperConfig;
|
|
298
300
|
emptyFormMessage?: string;
|
|
299
301
|
defaultValues?: Record<string, FieldValueType>;
|
|
300
302
|
submitButtonProps?: SubmitButtonProps;
|
|
@@ -315,10 +317,30 @@ export declare interface NamozajProps {
|
|
|
315
317
|
renderActions?: ((submitBtnNode: React.ReactNode, resetBtnNode: React.ReactNode, formMethods: RHFFormMethods, isDirtyLocked: boolean) => React.ReactNode);
|
|
316
318
|
};
|
|
317
319
|
};
|
|
318
|
-
onSubmit?: (data: any) => void
|
|
320
|
+
onSubmit?: (data: any) => void | Promise<void>;
|
|
319
321
|
onChange?: (data: any) => void;
|
|
320
322
|
}
|
|
321
323
|
|
|
324
|
+
export declare type NamozajStepItem = {
|
|
325
|
+
label: string;
|
|
326
|
+
description?: React.ReactNode;
|
|
327
|
+
optionalLabel?: React.ReactNode;
|
|
328
|
+
disableNext?: boolean;
|
|
329
|
+
disableBack?: boolean;
|
|
330
|
+
disableReset?: boolean;
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
export declare type NamozajStepperConfig = {
|
|
334
|
+
steps: NamozajStepItem[];
|
|
335
|
+
orientation?: NamozajStepperOrientation;
|
|
336
|
+
advanceOnValidation?: boolean;
|
|
337
|
+
backButtonLabel?: string;
|
|
338
|
+
nextButtonLabel?: string;
|
|
339
|
+
finishContent?: React.ReactNode;
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
export declare type NamozajStepperOrientation = "vertical" | "horizontal";
|
|
343
|
+
|
|
322
344
|
export declare type NumberFieldConfig = BaseFieldConfig & {
|
|
323
345
|
type: "number";
|
|
324
346
|
meta: BaseFieldConfig["meta"] & {
|