@ahmadmubarak98/namozaj 1.6.2 → 1.6.4

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 CHANGED
@@ -1,3 +1,4 @@
1
+ import { CountryIso2 } from 'react-international-phone';
1
2
  import { default as default_2 } from 'react';
2
3
  import { FieldValues } from 'react-hook-form';
3
4
  import { PickersTimezone } from '@mui/x-date-pickers';
@@ -92,15 +93,6 @@ export declare type DateMinMaxValue = {
92
93
  errorMessage?: string;
93
94
  } | null);
94
95
 
95
- export declare interface DefaultSubmitButtonProps {
96
- label?: string;
97
- size?: "default" | "xs" | "sm" | "md" | "lg" | "xl";
98
- className?: string;
99
- buttonType?: "button" | "submit" | "reset";
100
- disabled?: boolean;
101
- hidden?: boolean;
102
- }
103
-
104
96
  export declare type DynamicFormField = TextFieldConfig | NumberFieldConfig | SliderFieldConfig | PhoneFieldConfig | GroupFieldConfig | SelectFieldConfig | MultiSelectFieldConfig | CheckBoxGroupFieldConfig | RadioGroupFieldConfig | SwitchFieldConfig | CheckboxFieldConfig | DateFieldConfig | FileFieldConfig | ComputedFieldConfig | SectionFieldConfig | ButtonFieldConfig | RepeaterFieldConfig | FieldArrayFieldConfig;
105
97
 
106
98
  export declare interface DynamicFormProps {
@@ -108,12 +100,24 @@ export declare interface DynamicFormProps {
108
100
  localization?: NamozajLocalizationOptions;
109
101
  emptyFormMessage?: string;
110
102
  defaultValues?: Record<string, FieldValueType>;
111
- defaultSubmitButtonProps?: DefaultSubmitButtonProps;
103
+ submitButtonProps?: SubmitButtonProps;
104
+ scrollableWithFixedFooter?: boolean;
112
105
  loading?: boolean;
113
106
  isNested?: boolean;
114
107
  validationMode?: ValidationMode;
115
108
  enableRtl?: boolean;
116
109
  error?: any;
110
+ slots?: {
111
+ formBody?: {
112
+ className?: string;
113
+ style?: React.CSSProperties;
114
+ };
115
+ formFooter?: {
116
+ className?: string;
117
+ style?: React.CSSProperties;
118
+ renderActions?: ((submitBtnNode: React.ReactNode, resetBtnNode: React.ReactNode, formMethods: UseFormReturn<FieldValues, any, FieldValues>) => React.ReactNode);
119
+ };
120
+ };
117
121
  onSubmit?: (data: any) => void;
118
122
  onChange?: (data: any) => void;
119
123
  }
@@ -296,6 +300,8 @@ export declare interface NamozajLocalizationOptions {
296
300
  };
297
301
  }
298
302
 
303
+ export declare type NamozajPhoneFieldCountry = CountryIso2;
304
+
299
305
  export declare type NumberFieldConfig = BaseFieldConfig & {
300
306
  type: "number";
301
307
  meta: BaseFieldConfig["meta"] & {
@@ -318,7 +324,7 @@ export declare type PhoneFieldConfig = BaseFieldConfig & {
318
324
  meta: BaseFieldConfig["meta"] & {
319
325
  variant?: FieldVariant;
320
326
  size?: FieldSize;
321
- defaultCountry?: string;
327
+ defaultCountry?: NamozajPhoneFieldCountry;
322
328
  hideDropdown?: boolean;
323
329
  maxLength?: number;
324
330
  minLength?: number;
@@ -402,6 +408,15 @@ export declare type SliderFieldConfig = BaseFieldConfig & {
402
408
  };
403
409
  };
404
410
 
411
+ export declare interface SubmitButtonProps {
412
+ label?: string;
413
+ size?: "default" | "xs" | "sm" | "md" | "lg" | "xl";
414
+ className?: string;
415
+ buttonType?: "button" | "submit" | "reset";
416
+ disabled?: boolean;
417
+ hidden?: boolean;
418
+ }
419
+
405
420
  export declare type SwitchFieldConfig = BaseFieldConfig & {
406
421
  type: "switch";
407
422
  meta: BaseFieldConfig["meta"] & {