@tap-payments/auth-jsconnect 2.3.0 → 2.3.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.
- package/build/app/settings.d.ts +3 -1
- package/build/app/settings.js +10 -5
- package/build/assets/locales/ar.json +3 -1
- package/build/assets/locales/en.json +3 -1
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +5 -2
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +36 -19
- package/build/components/ArabicDatePicker/style.css +44 -5
- package/build/components/DatePicker/DatePicker.d.ts +2 -1
- package/build/components/DatePicker/DatePicker.js +12 -7
- package/build/constants/assets.d.ts +2 -0
- package/build/constants/assets.js +2 -0
- package/build/features/app/connect/connectStore.d.ts +13 -0
- package/build/features/app/connect/connectStore.js +114 -39
- package/build/features/app/connectExpress/connectExpressStore.js +1 -2
- package/build/features/app/entity/entityStore.js +1 -1
- package/build/features/brand/screens/BrandActivities/validation.d.ts +30 -30
- package/build/features/brand/screens/BrandActivities/validation.js +2 -2
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/Activities/validation.d.ts +90 -90
- package/build/features/business/screens/Activities/validation.js +2 -2
- package/build/features/business/screens/IDBOD/DOB.js +2 -2
- package/build/features/connect/Connect.js +55 -4
- package/build/features/connect/screens/NID/DOB.js +3 -3
- package/build/features/connectExpress/ConnectExpress.js +2 -5
- package/build/features/connectExpress/screens/NID/DOB.js +2 -2
- package/build/features/connectExpress/screens/NIDMissed/DOB.js +2 -2
- package/build/features/entity/screens/EntityCapital/validation.d.ts +90 -90
- package/build/features/entity/screens/EntityCapital/validation.js +2 -2
- package/build/features/entity/screens/EntityName/ExpiryDate.js +2 -2
- package/build/features/entity/screens/EntityName/IssuingDate.js +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +2 -2
- package/build/features/shared/Calender/Calender.d.ts +13 -0
- package/build/features/shared/Calender/Calender.js +56 -0
- package/build/features/shared/Calender/index.d.ts +2 -0
- package/build/features/shared/Calender/index.js +2 -0
- package/package.json +1 -1
|
@@ -3,62 +3,62 @@ export declare const EntityCapitalValidationSchema: () => yup.ObjectSchema<impor
|
|
|
3
3
|
activities: yup.ArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
4
4
|
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
5
5
|
name: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
6
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
7
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
6
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
7
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
8
8
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
9
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
10
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
9
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
10
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
11
11
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
12
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
13
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
12
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
13
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
14
14
|
}>>>;
|
|
15
15
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
16
16
|
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
17
17
|
name: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
18
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
19
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
18
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
19
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
20
20
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
21
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
22
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
21
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
22
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
23
23
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
24
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
25
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
24
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
25
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
26
26
|
}>>>;
|
|
27
27
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
28
28
|
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
29
29
|
name: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
30
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
31
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
30
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
31
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
32
32
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
33
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
34
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
33
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
34
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
35
35
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
36
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
37
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
36
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
37
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
38
38
|
}>>>;
|
|
39
39
|
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
40
40
|
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
41
41
|
name: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
42
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
43
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
42
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
43
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
44
44
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
45
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
46
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
45
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
46
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
47
47
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
48
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
49
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
48
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
49
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
50
50
|
}>>>;
|
|
51
51
|
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
52
52
|
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
53
53
|
name: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
54
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
55
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
54
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
55
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
56
56
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
57
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
58
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
57
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
58
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
59
59
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
60
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
61
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
60
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
61
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
62
62
|
}>>>;
|
|
63
63
|
}>>[] | undefined>;
|
|
64
64
|
capitalPaid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
@@ -68,62 +68,62 @@ export declare const EntityCapitalValidationSchema: () => yup.ObjectSchema<impor
|
|
|
68
68
|
activities: yup.ArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
69
69
|
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
70
70
|
name: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
71
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
72
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
71
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
72
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
73
73
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
74
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
75
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
74
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
75
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
76
76
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
77
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
78
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
77
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
78
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
79
79
|
}>>>;
|
|
80
80
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
81
81
|
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
82
82
|
name: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
83
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
84
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
83
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
84
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
85
85
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
86
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
87
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
86
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
87
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
88
88
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
89
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
90
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
89
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
90
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
91
91
|
}>>>;
|
|
92
92
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
93
93
|
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
94
94
|
name: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
95
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
96
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
95
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
96
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
97
97
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
98
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
99
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
98
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
99
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
100
100
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
101
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
102
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
101
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
102
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
103
103
|
}>>>;
|
|
104
104
|
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
105
105
|
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
106
106
|
name: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
107
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
108
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
107
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
108
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
109
109
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
110
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
111
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
110
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
111
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
112
112
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
113
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
114
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
113
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
114
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
115
115
|
}>>>;
|
|
116
116
|
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
117
117
|
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
118
118
|
name: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
119
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
120
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
119
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
120
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
121
121
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
122
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
123
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
122
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
123
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
124
124
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
125
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
126
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
125
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
126
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
127
127
|
}>>>;
|
|
128
128
|
}>>[] | undefined>;
|
|
129
129
|
capitalPaid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
@@ -133,62 +133,62 @@ export declare const EntityCapitalValidationSchema: () => yup.ObjectSchema<impor
|
|
|
133
133
|
activities: yup.ArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
134
134
|
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
135
135
|
name: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
136
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
137
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
136
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
137
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
138
138
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
139
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
140
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
139
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
140
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
141
141
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
142
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
143
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
142
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
143
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
144
144
|
}>>>;
|
|
145
145
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
146
146
|
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
147
147
|
name: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
148
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
149
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
148
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
149
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
150
150
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
151
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
152
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
151
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
152
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
153
153
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
154
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
155
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
154
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
155
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
156
156
|
}>>>;
|
|
157
157
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
158
158
|
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
159
159
|
name: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
160
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
161
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
160
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
161
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
162
162
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
163
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
164
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
163
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
164
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
165
165
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
166
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
167
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
166
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
167
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
168
168
|
}>>>;
|
|
169
169
|
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
170
170
|
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
171
171
|
name: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
172
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
173
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
172
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
173
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
174
174
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
175
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
176
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
175
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
176
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
177
177
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
178
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
179
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
178
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
179
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
180
180
|
}>>>;
|
|
181
181
|
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
182
182
|
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
183
183
|
name: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
184
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
185
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
184
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
185
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
186
186
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
187
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
188
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
187
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
188
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
189
189
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
190
|
-
ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
191
|
-
en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
190
|
+
ar: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
191
|
+
en: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
192
192
|
}>>>;
|
|
193
193
|
}>>[] | undefined>;
|
|
194
194
|
capitalPaid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
@@ -7,8 +7,8 @@ export var EntityCapitalValidationSchema = function () {
|
|
|
7
7
|
.of(yup.object().shape({
|
|
8
8
|
id: yup.string(),
|
|
9
9
|
name: yup.object().shape({
|
|
10
|
-
ar: yup.string(),
|
|
11
|
-
en: yup.string()
|
|
10
|
+
ar: yup.string().nullable(),
|
|
11
|
+
en: yup.string().nullable()
|
|
12
12
|
})
|
|
13
13
|
})),
|
|
14
14
|
capitalPaid: yup.string().required('capital_paid_required'),
|
|
@@ -18,7 +18,7 @@ import { getFutureDate } from '../../../../utils';
|
|
|
18
18
|
import Text from '../../../../components/Text';
|
|
19
19
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
20
20
|
import { entitySelector, clearError } from '../../../app/entity/entityStore';
|
|
21
|
-
import
|
|
21
|
+
import Calender from '../../../shared/Calender';
|
|
22
22
|
export var InputLabelStyled = styled(Text)(function (_a) {
|
|
23
23
|
var theme = _a.theme;
|
|
24
24
|
return (__assign({ margin: theme.spacing(0, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.6) }, theme.typography.caption));
|
|
@@ -39,6 +39,6 @@ var ExpiryDate = function (_a) {
|
|
|
39
39
|
dispatch(clearError());
|
|
40
40
|
oDateControl.field.onChange(data);
|
|
41
41
|
};
|
|
42
|
-
return (_jsx(Collapse, __assign({ in: !!expiryDate }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsx(InputLabelStyled, { children: t('business_expiry_date') }), _jsx(
|
|
42
|
+
return (_jsx(Collapse, __assign({ in: !!expiryDate }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsx(InputLabelStyled, { children: t('business_expiry_date') }), _jsx(Calender, { isVerified: isVerified, disabled: readOnly, maxDate: getFutureDate(), defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleExpiryDateChange })] })) })));
|
|
43
43
|
};
|
|
44
44
|
export default ExpiryDate;
|
|
@@ -15,7 +15,7 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
15
15
|
import { alpha, Collapse, styled } from '@mui/material';
|
|
16
16
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
17
17
|
import Text from '../../../../components/Text';
|
|
18
|
-
import
|
|
18
|
+
import Calender from '../../../shared/Calender';
|
|
19
19
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
20
20
|
import { entitySelector, clearError } from '../../../app/entity/entityStore';
|
|
21
21
|
export var InputLabelStyled = styled(Text)(function (_a) {
|
|
@@ -38,6 +38,6 @@ var IssuingDate = function (_a) {
|
|
|
38
38
|
dispatch(clearError());
|
|
39
39
|
oDateControl.field.onChange(data);
|
|
40
40
|
};
|
|
41
|
-
return (_jsx(Collapse, __assign({ in: !!issueDate }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsx(InputLabelStyled, { children: t('issue_date') }), _jsx(
|
|
41
|
+
return (_jsx(Collapse, __assign({ in: !!issueDate }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsx(InputLabelStyled, { children: t('issue_date') }), _jsx(Calender, { disabled: readOnly, isVerified: isVerified, defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleIssuingDateChange })] })) })));
|
|
42
42
|
};
|
|
43
43
|
export default IssuingDate;
|
|
@@ -17,7 +17,7 @@ import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
|
17
17
|
import { styled, alpha } from '@mui/material/styles';
|
|
18
18
|
import Text from '../../../../components/Text';
|
|
19
19
|
import Collapse from '../../../../components/Collapse';
|
|
20
|
-
import
|
|
20
|
+
import Calender from '../../../shared/Calender';
|
|
21
21
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
22
22
|
import { individualSelector, clearError } from '../../../app/individual/individualStore';
|
|
23
23
|
var InputLabelStyled = styled(Text)(function (_a) {
|
|
@@ -41,6 +41,6 @@ var BOD = function (_a) {
|
|
|
41
41
|
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, __assign({ sx: { p: function (_a) {
|
|
42
42
|
var spacing = _a.spacing;
|
|
43
43
|
return spacing(2.5, 2.5, 2.5, 2.5);
|
|
44
|
-
} } }, { children: t('enter_birth_date') })), _jsx(
|
|
44
|
+
} } }, { children: t('enter_birth_date') })), _jsx(Calender, { isDob: true, disabled: readOnly, isVerified: isVerified, defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleBirthDateChange })] }) })));
|
|
45
45
|
};
|
|
46
46
|
export default React.memo(BOD);
|
|
@@ -18,7 +18,7 @@ import { getFutureDate } from '../../../../utils';
|
|
|
18
18
|
import { styled, alpha } from '@mui/material/styles';
|
|
19
19
|
import Text from '../../../../components/Text';
|
|
20
20
|
import Collapse from '../../../../components/Collapse';
|
|
21
|
-
import
|
|
21
|
+
import Calender from '../../../shared/Calender';
|
|
22
22
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
23
23
|
import { individualSelector, clearError } from '../../../app/individual/individualStore';
|
|
24
24
|
var InputLabelStyled = styled(Text)(function (_a) {
|
|
@@ -42,6 +42,6 @@ var ExpiryDate = function (_a) {
|
|
|
42
42
|
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, __assign({ sx: { p: function (_a) {
|
|
43
43
|
var spacing = _a.spacing;
|
|
44
44
|
return spacing(2.5, 2.5, 2.5, 2.5);
|
|
45
|
-
} } }, { children: t('enter_expiry_date') })), _jsx(
|
|
45
|
+
} } }, { children: t('enter_expiry_date') })), _jsx(Calender, { disabled: readOnly, isVerified: isVerified, maxDate: getFutureDate(), defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleBirthDateChange })] }) })));
|
|
46
46
|
};
|
|
47
47
|
export default React.memo(ExpiryDate);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CalendarProps } from 'react-multi-date-picker';
|
|
3
|
+
interface CustomCalenderProps extends CalendarProps {
|
|
4
|
+
defaultValue?: Date | Date[];
|
|
5
|
+
onDateClicked?: (flag: boolean) => void;
|
|
6
|
+
onDateChange?: (date: string) => void;
|
|
7
|
+
isDob?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
isVerified?: boolean;
|
|
10
|
+
maxDate?: Date;
|
|
11
|
+
}
|
|
12
|
+
declare const CustomCalender: ({ onDateClicked, onDateChange, defaultValue, isDob, disabled, isVerified, maxDate }: CustomCalenderProps) => JSX.Element;
|
|
13
|
+
export default CustomCalender;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { useAppDispatch, useAppSelector } from '../../../hooks';
|
|
16
|
+
import Box from '@mui/material/Box';
|
|
17
|
+
import { styled, useTheme } from '@mui/material/styles';
|
|
18
|
+
import { settingsSelector, handleSwitchCalender } from '../../../app/settings';
|
|
19
|
+
import { ICONS_NAMES } from '../../../constants';
|
|
20
|
+
import DatePicker from '../../../components/DatePicker';
|
|
21
|
+
import ArabicDatePicker from '../../../components/ArabicDatePicker';
|
|
22
|
+
import Collapse from '../../../components/Collapse';
|
|
23
|
+
import Icon from '../../../components/Icon';
|
|
24
|
+
import { ScreenContainer } from '../../shared/Containers';
|
|
25
|
+
var SwitchBoxStyled = styled(Box)(function (_a) {
|
|
26
|
+
var theme = _a.theme;
|
|
27
|
+
return (__assign(__assign({ backgroundColor: 'rgba(117, 122, 135, 0.1)' }, theme.typography.caption), { borderBottomLeftRadius: '12px', borderBottomRightRadius: '12px', display: 'flex', alignItems: 'center', justifyContent: 'center', height: '47px', color: '#757A87', '&:hover': {
|
|
28
|
+
cursor: 'pointer'
|
|
29
|
+
} }));
|
|
30
|
+
});
|
|
31
|
+
var CustomCalender = function (_a) {
|
|
32
|
+
var onDateClicked = _a.onDateClicked, onDateChange = _a.onDateChange, defaultValue = _a.defaultValue, isDob = _a.isDob, disabled = _a.disabled, isVerified = _a.isVerified, maxDate = _a.maxDate;
|
|
33
|
+
var t = useTranslation().t;
|
|
34
|
+
var theme = useTheme();
|
|
35
|
+
var data = useAppSelector(settingsSelector).data;
|
|
36
|
+
var dispatch = useAppDispatch();
|
|
37
|
+
var _b = React.useState(false), open = _b[0], setOpen = _b[1];
|
|
38
|
+
var isHijriCalender = data.isHijri;
|
|
39
|
+
var onSwitchCalender = function () {
|
|
40
|
+
dispatch(handleSwitchCalender(!isHijriCalender));
|
|
41
|
+
};
|
|
42
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(Collapse, __assign({ in: !isHijriCalender }, { children: _jsx(DatePicker, { open: open, defaultValue: defaultValue, readOnly: true, disabled: disabled, isVerified: isVerified, dir: 'ltr', locale: 'en', isDob: isDob, maxDate: maxDate, onDateChange: onDateChange, onClick: function () {
|
|
43
|
+
onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(true);
|
|
44
|
+
setOpen(true);
|
|
45
|
+
}, onDatePicked: function () {
|
|
46
|
+
onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(false);
|
|
47
|
+
setOpen(false);
|
|
48
|
+
} }) })), _jsx(Collapse, __assign({ in: isHijriCalender }, { children: _jsx(ArabicDatePicker, { open: open, readOnly: true, disabled: disabled, isVerified: isVerified, dir: theme.direction, isDob: isDob, maxDate: maxDate, onClick: function () {
|
|
49
|
+
onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(true);
|
|
50
|
+
setOpen(true);
|
|
51
|
+
}, onDatePicked: function () {
|
|
52
|
+
onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(false);
|
|
53
|
+
setOpen(false);
|
|
54
|
+
}, onDateChange: onDateChange, value: defaultValue }) })), _jsx(Collapse, __assign({ in: false }, { children: _jsx(SwitchBoxStyled, __assign({ onClick: onSwitchCalender }, { children: _jsxs(_Fragment, { children: [_jsx(Icon, { src: !isHijriCalender ? ICONS_NAMES.SWITCH_HIJRI_CALENDER : ICONS_NAMES.SWITCH_CALENDER }), !isHijriCalender ? t('switch_to_islamic_calendar') : t('switch_to_gregorian_calendar')] }) })) }))] }));
|
|
55
|
+
};
|
|
56
|
+
export default CustomCalender;
|