@ahmadmubarak98/namozaj 1.4.7 → 1.5.1

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 +19 -5
  2. package/dist/namozaj.js +21637 -19211
  3. package/package.json +3 -2
package/dist/main.d.ts CHANGED
@@ -1,4 +1,7 @@
1
1
  import { default as default_2 } from 'react';
2
+ import { FieldValues } from 'react-hook-form';
3
+ import { PickersTimezone } from '@mui/x-date-pickers';
4
+ import { UseFormReturn } from 'react-hook-form';
2
5
 
3
6
  export declare type AutoPlacement = "auto" | "auto-start" | "auto-end";
4
7
 
@@ -22,6 +25,7 @@ export declare type BaseFieldConfig = {
22
25
  visibilityRules?: VisibilityRule[];
23
26
  dependencies?: FieldDependency[];
24
27
  onValueChange?: (value: FieldValueType, formMethods: any) => void;
28
+ compute?: (data: any, formMethods: UseFormReturn<FieldValues, any, FieldValues>) => FieldValueType;
25
29
  };
26
30
  };
27
31
 
@@ -71,13 +75,22 @@ export declare type DateFieldConfig = BaseFieldConfig & {
71
75
  type: "date" | "time" | "datetime";
72
76
  meta: BaseFieldConfig["meta"] & {
73
77
  format?: string;
74
- minDate?: Date;
75
- maxDate?: Date;
76
- minTime?: Date;
77
- maxTime?: Date;
78
+ timezone?: PickersTimezone;
79
+ minDate?: DateMinMaxValue;
80
+ maxDate?: DateMinMaxValue;
81
+ minTime?: DateMinMaxValue;
82
+ maxTime?: DateMinMaxValue;
78
83
  };
79
84
  };
80
85
 
86
+ export declare type DateMinMaxValue = {
87
+ date: Date | null;
88
+ errorMessage?: string;
89
+ } | ((data: any, formMethods: UseFormReturn<FieldValues, any, FieldValues>) => {
90
+ date: Date | null;
91
+ errorMessage?: string;
92
+ } | null);
93
+
81
94
  export declare interface DefaultSubmitButtonProps {
82
95
  label?: string;
83
96
  size?: "default" | "xs" | "sm" | "md" | "lg" | "xl";
@@ -189,8 +202,9 @@ export declare type FileFieldConfig = BaseFieldConfig & {
189
202
  maxFiles?: number;
190
203
  fileSizeErrorMessage?: string;
191
204
  fileTypeErrorMessage?: string;
192
- uploadErrorMessage?: string;
205
+ uploadErrorMessage?: string | ((error: any) => string);
193
206
  uploadBtnText?: string;
207
+ loadingText?: string;
194
208
  dragText?: string;
195
209
  dropText?: string;
196
210
  enablePreview?: boolean;