@ahmadmubarak98/namozaj 1.7.1 → 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.
Files changed (3) hide show
  1. package/dist/main.d.ts +24 -1
  2. package/dist/namozaj.js +7799 -6259
  3. 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;
@@ -280,6 +281,7 @@ export declare interface NamozajLocalizationOptions {
280
281
  translatedLabel?: (label: string, locale: string) => string;
281
282
  translatedFieldNameSuffix?: (locale: string) => string;
282
283
  translatedFieldGrid?: (field: NamozajField, locale: string, selectedLocales: string[]) => GridColumnConfig;
284
+ translatedFieldMeta?: (field: NamozajField, locale: string, selectedLocales: string[]) => NamozajField["meta"];
283
285
  localePicker?: {
284
286
  label?: string;
285
287
  getLocaleLabel: (locale: string) => string;
@@ -294,6 +296,7 @@ export declare interface NamozajProps {
294
296
  fields: NamozajField[];
295
297
  dirtyLock?: boolean;
296
298
  localization?: NamozajLocalizationOptions;
299
+ stepper?: NamozajStepperConfig;
297
300
  emptyFormMessage?: string;
298
301
  defaultValues?: Record<string, FieldValueType>;
299
302
  submitButtonProps?: SubmitButtonProps;
@@ -314,10 +317,30 @@ export declare interface NamozajProps {
314
317
  renderActions?: ((submitBtnNode: React.ReactNode, resetBtnNode: React.ReactNode, formMethods: RHFFormMethods, isDirtyLocked: boolean) => React.ReactNode);
315
318
  };
316
319
  };
317
- onSubmit?: (data: any) => void;
320
+ onSubmit?: (data: any) => void | Promise<void>;
318
321
  onChange?: (data: any) => void;
319
322
  }
320
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
+
321
344
  export declare type NumberFieldConfig = BaseFieldConfig & {
322
345
  type: "number";
323
346
  meta: BaseFieldConfig["meta"] & {