@tap-payments/auth-jsconnect 2.0.53-test → 2.0.54-test

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 (194) hide show
  1. package/build/@types/app.d.ts +4 -15
  2. package/build/@types/app.js +0 -9
  3. package/build/@types/form.d.ts +0 -11
  4. package/build/api/auth.d.ts +1 -14
  5. package/build/api/auth.js +1 -24
  6. package/build/api/axios.js +2 -2
  7. package/build/api/data.d.ts +1 -4
  8. package/build/api/data.js +2 -6
  9. package/build/api/entity.d.ts +0 -2
  10. package/build/api/index.d.ts +1 -5
  11. package/build/app/rootReducer.d.ts +0 -3
  12. package/build/app/rootReducer.js +1 -7
  13. package/build/app/settings.js +2 -8
  14. package/build/app/store.d.ts +1 -7
  15. package/build/assets/locales/ar.json +4 -14
  16. package/build/assets/locales/en.json +4 -14
  17. package/build/components/AnimationFlow/AnimationFlow.d.ts +1 -4
  18. package/build/components/AnimationFlow/AnimationFlow.js +7 -5
  19. package/build/components/AnimationFlow/BottomSheet.js +1 -2
  20. package/build/components/AnimationFlow/Dialog.d.ts +1 -4
  21. package/build/components/AnimationFlow/Dialog.js +4 -9
  22. package/build/components/FileInput/DragAndDrop.d.ts +1 -9
  23. package/build/components/FileInput/DragAndDrop.js +8 -113
  24. package/build/components/ProgressBar/index.d.ts +0 -2
  25. package/build/components/ProgressBar/index.js +0 -2
  26. package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -2
  27. package/build/components/SocialMediaGroup/SocialMediaGroup.js +34 -27
  28. package/build/constants/api.d.ts +0 -1
  29. package/build/constants/api.js +2 -5
  30. package/build/constants/app.d.ts +0 -15
  31. package/build/constants/app.js +3 -75
  32. package/build/constants/assets.d.ts +1 -17
  33. package/build/constants/assets.js +6 -22
  34. package/build/constants/validation.d.ts +0 -1
  35. package/build/constants/validation.js +0 -1
  36. package/build/features/app/bank/bankStore.d.ts +0 -4
  37. package/build/features/app/bank/bankStore.js +22 -42
  38. package/build/features/app/business/businessStore.js +12 -16
  39. package/build/features/app/connect/connectStore.d.ts +1 -13
  40. package/build/features/app/connect/connectStore.js +4 -164
  41. package/build/features/app/signIn/signInStore.js +2 -2
  42. package/build/features/bank/Bank.js +4 -10
  43. package/build/features/bank/screens/BankDetails/BankDetails.js +2 -2
  44. package/build/features/bank/screens/BankDetails/BankStatement.js +8 -33
  45. package/build/features/business/Business.d.ts +1 -1
  46. package/build/features/business/Business.js +5 -12
  47. package/build/features/business/screens/Activities/ActivitiesList.d.ts +1 -1
  48. package/build/features/business/screens/Activities/SalesChannels.js +1 -1
  49. package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -2
  50. package/build/features/connect/Connect.d.ts +1 -2
  51. package/build/features/connect/Connect.js +10 -40
  52. package/build/features/connect/screens/Individual/Individual.js +2 -6
  53. package/build/features/connect/screens/Merchant/Merchant.js +11 -35
  54. package/build/features/connect/screens/Merchant/SocialMedia.js +11 -56
  55. package/build/features/connect/screens/Merchant/validation.d.ts +0 -87
  56. package/build/features/connect/screens/Merchant/validation.js +2 -68
  57. package/build/features/connect/screens/Mobile/Mobile.js +4 -7
  58. package/build/features/featuresScreens.d.ts +0 -3
  59. package/build/features/featuresScreens.js +0 -48
  60. package/build/features/individual/Individual.d.ts +1 -1
  61. package/build/features/individual/Individual.js +5 -12
  62. package/build/features/password/Password.d.ts +1 -1
  63. package/build/features/password/Password.js +5 -12
  64. package/build/features/shared/Background/Background.d.ts +5 -7
  65. package/build/features/shared/Background/Background.js +5 -16
  66. package/build/features/shared/Input/Input.d.ts +1 -1
  67. package/build/features/shared/Input/Input.js +2 -2
  68. package/build/features/shared/UploadFile/UploadFile.d.ts +3 -8
  69. package/build/features/shared/UploadFile/UploadFile.js +8 -23
  70. package/build/features/signIn/SignIn.d.ts +1 -1
  71. package/build/features/signIn/SignIn.js +4 -12
  72. package/build/features/tax/Tax.d.ts +1 -1
  73. package/build/features/tax/Tax.js +4 -12
  74. package/build/hooks/index.d.ts +0 -1
  75. package/build/hooks/index.js +0 -1
  76. package/build/hooks/useAppConfig.js +0 -2
  77. package/build/hooks/useAppDispatch.d.ts +0 -3
  78. package/build/hooks/useErrorListener.js +2 -3
  79. package/build/index.d.ts +2 -5
  80. package/build/index.js +2 -11
  81. package/build/utils/device.d.ts +0 -1
  82. package/build/utils/device.js +0 -13
  83. package/build/utils/html.d.ts +0 -1
  84. package/build/utils/html.js +0 -6
  85. package/build/utils/locale.js +1 -1
  86. package/build/utils/rsa.d.ts +2 -2
  87. package/build/utils/rsa.js +1 -1
  88. package/build/utils/string.d.ts +20 -22
  89. package/build/utils/string.js +0 -9
  90. package/package.json +129 -129
  91. package/build/components/Lottie/Lottie.d.ts +0 -878
  92. package/build/components/Lottie/Lottie.js +0 -58
  93. package/build/components/Lottie/files/pulsating_circle_waves.json +0 -236
  94. package/build/components/Lottie/files/success.json +0 -425
  95. package/build/components/Lottie/index.d.ts +0 -3
  96. package/build/components/Lottie/index.js +0 -3
  97. package/build/components/ProgressBar/CircularProgressBar.d.ts +0 -14
  98. package/build/components/ProgressBar/CircularProgressBar.js +0 -48
  99. package/build/features/app/auth/authStore.d.ts +0 -35
  100. package/build/features/app/auth/authStore.js +0 -148
  101. package/build/features/app/entity/entityStore.d.ts +0 -53
  102. package/build/features/app/entity/entityStore.js +0 -461
  103. package/build/features/app/otp/otpStore.d.ts +0 -28
  104. package/build/features/app/otp/otpStore.js +0 -153
  105. package/build/features/auth/Auth.d.ts +0 -10
  106. package/build/features/auth/Auth.js +0 -87
  107. package/build/features/auth/index.d.ts +0 -1
  108. package/build/features/auth/index.js +0 -1
  109. package/build/features/auth/screens/OTP/OTP.d.ts +0 -5
  110. package/build/features/auth/screens/OTP/OTP.js +0 -72
  111. package/build/features/auth/screens/OTP/OTPInput.d.ts +0 -5
  112. package/build/features/auth/screens/OTP/OTPInput.js +0 -44
  113. package/build/features/auth/screens/OTP/index.d.ts +0 -3
  114. package/build/features/auth/screens/OTP/index.js +0 -2
  115. package/build/features/auth/screens/OTP/validation.d.ts +0 -8
  116. package/build/features/auth/screens/OTP/validation.js +0 -4
  117. package/build/features/connect/screens/CivilID/CivilID.d.ts +0 -5
  118. package/build/features/connect/screens/CivilID/CivilID.js +0 -85
  119. package/build/features/connect/screens/CivilID/IDNumber.d.ts +0 -7
  120. package/build/features/connect/screens/CivilID/IDNumber.js +0 -59
  121. package/build/features/connect/screens/CivilID/index.d.ts +0 -3
  122. package/build/features/connect/screens/CivilID/index.js +0 -2
  123. package/build/features/connect/screens/CivilID/validation.d.ts +0 -8
  124. package/build/features/connect/screens/CivilID/validation.js +0 -4
  125. package/build/features/connect/screens/Merchant/SalesChannels.d.ts +0 -5
  126. package/build/features/connect/screens/Merchant/SalesChannels.js +0 -114
  127. package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +0 -5
  128. package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +0 -169
  129. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.d.ts +0 -5
  130. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +0 -22
  131. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +0 -5
  132. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +0 -8
  133. package/build/features/connect/screens/VerifyPACI/index.d.ts +0 -3
  134. package/build/features/connect/screens/VerifyPACI/index.js +0 -2
  135. package/build/features/entity/Entity.d.ts +0 -7
  136. package/build/features/entity/Entity.js +0 -70
  137. package/build/features/entity/index.d.ts +0 -1
  138. package/build/features/entity/index.js +0 -1
  139. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +0 -54
  140. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +0 -139
  141. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +0 -5
  142. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +0 -56
  143. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +0 -5
  144. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +0 -17
  145. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +0 -5
  146. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +0 -28
  147. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +0 -6
  148. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +0 -38
  149. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +0 -5
  150. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +0 -112
  151. package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +0 -2
  152. package/build/features/entity/screens/EntityInfoConfirm/index.js +0 -2
  153. package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +0 -107
  154. package/build/features/entity/screens/EntityInfoConfirm/validation.js +0 -17
  155. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +0 -5
  156. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +0 -9
  157. package/build/features/entity/screens/ResetPasswordSuccess/index.d.ts +0 -3
  158. package/build/features/entity/screens/ResetPasswordSuccess/index.js +0 -2
  159. package/build/features/entity/screens/Success/Success.d.ts +0 -5
  160. package/build/features/entity/screens/Success/Success.js +0 -16
  161. package/build/features/entity/screens/Success/index.d.ts +0 -3
  162. package/build/features/entity/screens/Success/index.js +0 -2
  163. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +0 -3
  164. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +0 -109
  165. package/build/features/entity/screens/SuccessWithFlowButtons/index.d.ts +0 -2
  166. package/build/features/entity/screens/SuccessWithFlowButtons/index.js +0 -2
  167. package/build/features/entity/screens/Verify/OTPInput.d.ts +0 -7
  168. package/build/features/entity/screens/Verify/OTPInput.js +0 -47
  169. package/build/features/entity/screens/Verify/Verify.d.ts +0 -5
  170. package/build/features/entity/screens/Verify/Verify.js +0 -78
  171. package/build/features/entity/screens/Verify/index.d.ts +0 -2
  172. package/build/features/entity/screens/Verify/index.js +0 -2
  173. package/build/features/entity/screens/Verify/validation.d.ts +0 -8
  174. package/build/features/entity/screens/Verify/validation.js +0 -4
  175. package/build/features/otp/OTP.d.ts +0 -7
  176. package/build/features/otp/OTP.js +0 -58
  177. package/build/features/otp/index.d.ts +0 -0
  178. package/build/features/otp/index.js +0 -1
  179. package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +0 -6
  180. package/build/features/otp/screens/OTPVerify/OTPInput.js +0 -47
  181. package/build/features/otp/screens/OTPVerify/Verify.d.ts +0 -5
  182. package/build/features/otp/screens/OTPVerify/Verify.js +0 -49
  183. package/build/features/otp/screens/OTPVerify/index.d.ts +0 -2
  184. package/build/features/otp/screens/OTPVerify/index.js +0 -2
  185. package/build/features/otp/screens/OTPVerify/validation.d.ts +0 -8
  186. package/build/features/otp/screens/OTPVerify/validation.js +0 -4
  187. package/build/features/shared/Dialog/CloseDialog.d.ts +0 -11
  188. package/build/features/shared/Dialog/CloseDialog.js +0 -62
  189. package/build/features/shared/Dialog/DialogContainer.d.ts +0 -8
  190. package/build/features/shared/Dialog/DialogContainer.js +0 -56
  191. package/build/features/shared/Dialog/index.d.ts +0 -4
  192. package/build/features/shared/Dialog/index.js +0 -4
  193. package/build/hooks/useScreen.d.ts +0 -3
  194. package/build/hooks/useScreen.js +0 -14
@@ -1,139 +0,0 @@
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
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
24
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
25
- if (ar || !(i in from)) {
26
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
27
- ar[i] = from[i];
28
- }
29
- }
30
- return to.concat(ar || Array.prototype.slice.call(from));
31
- };
32
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
33
- import * as React from 'react';
34
- import Box from '@mui/material/Box';
35
- import { alpha, styled } from '@mui/material/styles';
36
- import Text from '../../../../components/Text';
37
- import Input from '../../../../components/Input';
38
- import { useTranslation } from 'react-i18next';
39
- import { useController, useFormContext } from 'react-hook-form';
40
- import { useLanguage, useAppSelector } from '../../../../hooks';
41
- import { BusinessType } from '../../../../@types';
42
- import Collapse from '../../../../components/Collapse';
43
- import SimpleList from '../../../../components/SimpleList';
44
- import ExpandIcon from '../../../../components/ExpandIcon';
45
- import { ScreenContainer } from '../../../shared/Containers';
46
- import { entitySelector } from '../../../app/entity/entityStore';
47
- import CheckIcon from '@mui/icons-material/Check';
48
- export var InputLabelStyled = styled(Text)(function (_a) {
49
- var theme = _a.theme;
50
- return (__assign({ margin: theme.spacing(2.5, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
51
- });
52
- export var InputStyled = styled(Input)(function (_a) {
53
- var theme = _a.theme;
54
- return ({
55
- paddingInlineEnd: theme.spacing(2.5),
56
- '& .MuiInputBase-input': {
57
- cursor: 'pointer'
58
- }
59
- });
60
- });
61
- var SimpleListStyled = styled((SimpleList))(function () { return ({
62
- height: 'fit-content'
63
- }); });
64
- export var CheckIconStyled = styled(CheckIcon)(function (_a) {
65
- var theme = _a.theme;
66
- return ({
67
- color: theme.palette.primary.main,
68
- display: 'flex',
69
- alignItems: 'flex-end'
70
- });
71
- });
72
- export var NameContainer = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
73
- var theme = _a.theme, isSelected = _a.isSelected;
74
- return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
75
- });
76
- var ActivitiesList = function (_a) {
77
- var _b, _c, _d, _e;
78
- var rest = __rest(_a, []);
79
- var _f = React.useState([]), activitiesMenuList = _f[0], setActivitiesMenuList = _f[1];
80
- var _g = React.useState([]), storedActivities = _g[0], setStoredActivities = _g[1];
81
- var _h = React.useState(null), anchorEl = _h[0], setAnchorEl = _h[1];
82
- var t = useTranslation().t;
83
- var isAr = useLanguage().isAr;
84
- var control = useFormContext().control;
85
- var data = useAppSelector(entitySelector).data;
86
- var activitiesControl = useController({ name: 'activities', control: control });
87
- var controlValue = activitiesControl.field.value;
88
- var verify = data.verify, entityData = data.entityData;
89
- var activities = (((_b = verify.responseBody) === null || _b === void 0 ? void 0 : _b.entity) || {}).activities;
90
- var selectedActivities = (entityData.responseBody || {}).selectedActivities;
91
- var businessType = (_e = (_d = (_c = verify.responseBody) === null || _c === void 0 ? void 0 : _c.entity) === null || _d === void 0 ? void 0 : _d.license) === null || _e === void 0 ? void 0 : _e.type;
92
- var isCR = businessType === BusinessType.CR;
93
- React.useEffect(function () {
94
- if ((activities === null || activities === void 0 ? void 0 : activities.length) > 0) {
95
- setActivitiesMenuList(activities);
96
- }
97
- }, [activities]);
98
- React.useEffect(function () {
99
- if ((selectedActivities === null || selectedActivities === void 0 ? void 0 : selectedActivities.length) > 0) {
100
- setStoredActivities(selectedActivities);
101
- }
102
- }, []);
103
- var onOpenList = function (event) {
104
- var _a;
105
- setAnchorEl(event.currentTarget);
106
- (_a = rest.onListOpen) === null || _a === void 0 ? void 0 : _a.call(rest);
107
- };
108
- var onCloseList = function () {
109
- var _a;
110
- setAnchorEl(null);
111
- (_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
112
- };
113
- var onSelectItem = function (item) {
114
- var isActivityExists = controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (activity) { return activity.en === (item === null || item === void 0 ? void 0 : item.en); });
115
- var storedActivity = storedActivities === null || storedActivities === void 0 ? void 0 : storedActivities.find(function (activity) { return activity.en === (item === null || item === void 0 ? void 0 : item.en); });
116
- if (isActivityExists && !storedActivity) {
117
- var updatedIdList = controlValue === null || controlValue === void 0 ? void 0 : controlValue.filter(function (activity) { return activity.en !== (item === null || item === void 0 ? void 0 : item.en); });
118
- if (updatedIdList.length >= 1)
119
- activitiesControl.field.onChange(updatedIdList);
120
- return;
121
- }
122
- if (!storedActivity)
123
- activitiesControl.field.onChange(__spreadArray(__spreadArray([], controlValue, true), [item], false));
124
- };
125
- var getSelectedActivities = function () {
126
- var _a, _b;
127
- if ((controlValue === null || controlValue === void 0 ? void 0 : controlValue.length) > 1) {
128
- return (controlValue === null || controlValue === void 0 ? void 0 : controlValue.length) + ' ' + t('activities_selected');
129
- }
130
- return isAr ? (_a = controlValue[0]) === null || _a === void 0 ? void 0 : _a.ar : (_b = controlValue[0]) === null || _b === void 0 ? void 0 : _b.en;
131
- };
132
- var getSelectedActivityFlag = function (item) {
133
- return controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (activity) { return activity.en === (item === null || item === void 0 ? void 0 : item.en); });
134
- };
135
- return (_jsx(Collapse, __assign({ in: (activitiesMenuList === null || activitiesMenuList === void 0 ? void 0 : activitiesMenuList.length) > 0 }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t(isCR ? 'activities' : 'category') }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: true, value: getSelectedActivities(), placeholder: isCR ? t('choose_activities') : t('category_name'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: activitiesMenuList, onSelectItem: onSelectItem, renderItem: function (item) {
136
- return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.en) === getSelectedActivityFlag(item) }, { children: isAr ? item === null || item === void 0 ? void 0 : item.ar : item === null || item === void 0 ? void 0 : item.en })) })), getSelectedActivityFlag(item) && _jsx(CheckIconStyled, {})] }));
137
- } }) }))] })] }) })));
138
- };
139
- export default ActivitiesList;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- export interface EntityProps {
3
- }
4
- declare const EntityInfo: ({}: EntityProps) => JSX.Element;
5
- export default EntityInfo;
@@ -1,56 +0,0 @@
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, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { ScreenContainer } from '../../../shared/Containers';
14
- import LicenseName from './LicenseName';
15
- import * as React from 'react';
16
- import LicenseNumber from './LicenseNumber';
17
- import ActivitiesList from './ActivitiesList';
18
- import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
19
- import { entitySelector, updateEntityInfo } from '../../../app/entity/entityStore';
20
- import { FormProvider, useForm } from 'react-hook-form';
21
- import { yupResolver } from '@hookform/resolvers/yup';
22
- import { handlePrevScreenStep } from '../../../../app/settings';
23
- import { styled } from '@mui/system';
24
- import { EntityInfoValidationSchema } from './validation';
25
- import Form from '../../../../components/Form';
26
- import Collapse from '../../../../components/Collapse';
27
- import Button from '../../../shared/Button';
28
- import { useTranslation } from 'react-i18next';
29
- import OperationStartDate from './OperationStartDate';
30
- var FormStyled = styled(Form)(function () { return ({
31
- display: 'flex',
32
- flexDirection: 'column'
33
- }); });
34
- var EntityInfo = function (_a) {
35
- var _b = React.useState(false), anchorEl = _b[0], setAnchorEl = _b[1];
36
- var _c = useAppSelector(entitySelector), data = _c.data, loading = _c.loading, error = _c.error;
37
- var isAr = useLanguage().isAr;
38
- var t = useTranslation().t;
39
- var dispatch = useAppDispatch();
40
- var methods = useForm({
41
- resolver: yupResolver(EntityInfoValidationSchema),
42
- defaultValues: data.entityData,
43
- mode: 'onChange'
44
- });
45
- var onSubmit = function (data) {
46
- dispatch(updateEntityInfo(__assign({}, data)));
47
- };
48
- var onBack = function () {
49
- dispatch(handlePrevScreenStep());
50
- };
51
- var handleMenuClick = function () {
52
- anchorEl ? setAnchorEl(false) : setAnchorEl(true);
53
- };
54
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Collapse, __assign({ in: !anchorEl }, { children: [_jsx(LicenseName, {}), _jsx(LicenseNumber, {})] })), _jsx(ActivitiesList, { onListOpen: function () { return handleMenuClick(); }, onListClose: function () { return handleMenuClick(); } }), _jsxs(Collapse, __assign({ in: !anchorEl }, { children: [_jsx(OperationStartDate, {}), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] }))] })) })) }));
55
- };
56
- export default EntityInfo;
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- interface LicenseNameProps {
3
- }
4
- declare const _default: React.MemoExoticComponent<({}: LicenseNameProps) => JSX.Element>;
5
- export default _default;
@@ -1,17 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import { useTranslation } from 'react-i18next';
4
- import { ScreenContainer } from '../../../shared/Containers';
5
- import Input from '../../../shared/Input';
6
- import { useAppSelector, useLanguage } from '../../../../hooks';
7
- import { entitySelector } from '../../../app/entity/entityStore';
8
- var LicenseName = function (_a) {
9
- var _b, _c, _d;
10
- var t = useTranslation().t;
11
- var isAr = useLanguage().isAr;
12
- var data = useAppSelector(entitySelector).data;
13
- var entity = (((_b = data.verify) === null || _b === void 0 ? void 0 : _b.responseBody) || {}).entity;
14
- var name = isAr ? (_c = entity === null || entity === void 0 ? void 0 : entity.legal_name) === null || _c === void 0 ? void 0 : _c.ar : (_d = entity === null || entity === void 0 ? void 0 : entity.legal_name) === null || _d === void 0 ? void 0 : _d.en;
15
- return (_jsx(ScreenContainer, { children: _jsx(Input, { label: t('license_name_label'), readOnly: !!name, placeholder: t('license_name_label'), value: name, sx: { '& .MuiInputBase-input': { cursor: 'auto' } } }) }));
16
- };
17
- export default React.memo(LicenseName);
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- interface LicenseNumberProps {
3
- }
4
- declare const _default: React.MemoExoticComponent<({}: LicenseNumberProps) => JSX.Element>;
5
- export default _default;
@@ -1,28 +0,0 @@
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 } from "react/jsx-runtime";
13
- import * as React from 'react';
14
- import { useTranslation } from 'react-i18next';
15
- import { ScreenContainer } from '../../../shared/Containers';
16
- import Input from '../../../shared/Input';
17
- import Collapse from '../../../../components/Collapse';
18
- import { useAppSelector } from '../../../../hooks';
19
- import { entitySelector } from '../../../app/entity/entityStore';
20
- var LicenseNumber = function (_a) {
21
- var _b, _c;
22
- var t = useTranslation().t;
23
- var data = useAppSelector(entitySelector).data;
24
- var entity = (((_b = data.verify) === null || _b === void 0 ? void 0 : _b.responseBody) || {}).entity;
25
- var number = (_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.number;
26
- return (_jsx(Collapse, __assign({ in: !!number }, { children: _jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { label: t('license_number_label'), readOnly: true, value: number, sx: { '& .MuiInputBase-input': { cursor: 'auto' } } }) })) })));
27
- };
28
- export default React.memo(LicenseNumber);
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- export interface OperationStartDateProps {
3
- onDateClicked?: (flag: boolean) => void;
4
- }
5
- declare const OperationStartDate: ({ onDateClicked }: OperationStartDateProps) => JSX.Element;
6
- export default OperationStartDate;
@@ -1,38 +0,0 @@
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 { useTranslation } from 'react-i18next';
14
- import { useController, useFormContext } from 'react-hook-form';
15
- import Input from '../../../shared/Input';
16
- import { ScreenContainer } from '../../../shared/Containers';
17
- import { useAppDispatch, useAppSelector } from '../../../../hooks';
18
- import { entitySelector, clearError } from '../../../app/entity/entityStore';
19
- import DatePicker from '../../../../components/DatePicker';
20
- import { InputLabelStyled } from './ActivitiesList';
21
- var OperationStartDate = function (_a) {
22
- var _b, _c, _d;
23
- var onDateClicked = _a.onDateClicked;
24
- var t = useTranslation().t;
25
- var dispatch = useAppDispatch();
26
- var control = useFormContext().control;
27
- var _e = useAppSelector(entitySelector), data = _e.data, error = _e.error;
28
- var oDateControl = useController({ control: control, name: 'operationStartDate' });
29
- var handleOperationStartDateChange = function (data) {
30
- if (error)
31
- dispatch(clearError());
32
- oDateControl.field.onChange(data);
33
- };
34
- var dateValue = (_b = oDateControl === null || oDateControl === void 0 ? void 0 : oDateControl.field) === null || _b === void 0 ? void 0 : _b.value;
35
- var storedDate = (_d = (_c = data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.brand) === null || _d === void 0 ? void 0 : _d.business_operation_start_at;
36
- return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: !!storedDate ? (_jsx(Input, { label: t('business_start_date'), readOnly: true, value: dateValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } } })) : (_jsxs(_Fragment, { children: [_jsx(InputLabelStyled, { children: t('business_start_date') }), _jsx(DatePicker, { readOnly: true, defaultValue: dateValue ? new Date(dateValue) : new Date(), dir: 'ltr', locale: 'en', onClick: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(true); }, onDatePicked: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(false); }, onDateChange: handleOperationStartDateChange })] })) })));
37
- };
38
- export default OperationStartDate;
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export declare const MandatoryStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
3
- export declare const CollapseStyled: import("@emotion/styled").StyledComponent<import("../../../../components/Collapse").CollapseProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
4
- declare const SalesChannels: () => JSX.Element;
5
- export default SalesChannels;
@@ -1,112 +0,0 @@
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
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
13
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
14
- if (ar || !(i in from)) {
15
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
16
- ar[i] = from[i];
17
- }
18
- }
19
- return to.concat(ar || Array.prototype.slice.call(from));
20
- };
21
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
- import * as React from 'react';
23
- import Box from '@mui/material/Box';
24
- import { alpha, styled } from '@mui/material/styles';
25
- import { useTranslation } from 'react-i18next';
26
- import { useController, useFormContext } from 'react-hook-form';
27
- import { useLanguage, useAppSelector, useAppDispatch } from '../../../../hooks';
28
- import Text from '../../../../components/Text';
29
- import { entitySelector, clearError } from '../../../app/entity/entityStore';
30
- import CheckBox from '../../../../components/CheckBox';
31
- import Warning from '../../../../components/Warning';
32
- import Collapse from '../../../../components/Collapse';
33
- import { ScreenContainer } from '../../../shared/Containers';
34
- var InputLabelStyled = styled(Text)(function (_a) {
35
- var theme = _a.theme;
36
- return (__assign({ margin: theme.spacing(2.5, 2.5, 0.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
37
- });
38
- var ContainerStyled = styled(Box)(function (_a) {
39
- var theme = _a.theme;
40
- return ({
41
- display: 'flex',
42
- flexDirection: 'row',
43
- alignItems: 'center',
44
- padding: theme.spacing(0, 0.5, 0, 0.5),
45
- height: theme.spacing(3.625),
46
- marginBlockEnd: theme.spacing(0.2)
47
- });
48
- });
49
- var TextStyled = styled(Text)(function (_a) {
50
- var theme = _a.theme;
51
- return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.4), fontWeight: theme.typography.fontWeightLight, whiteSpace: 'pre' }, theme.typography.body2), { marginBlockStart: theme.spacing(1.75) }));
52
- });
53
- var CheckBoxStyled = styled(CheckBox)(function (_a) {
54
- var theme = _a.theme;
55
- return ({
56
- marginInlineEnd: theme.spacing(-1),
57
- '& .MuiSvgIcon-root': {
58
- fontSize: 30
59
- },
60
- '&.Mui-checked': {
61
- color: theme.palette.text.primary,
62
- borderRadius: theme.spacing(2.5)
63
- }
64
- });
65
- });
66
- export var MandatoryStyled = styled('span')(function (_a) {
67
- var theme = _a.theme;
68
- return (__assign(__assign({ color: alpha(theme.palette.error.light, 0.4) }, theme.typography.h6), { fontWeight: theme.typography.fontWeightLight, verticalAlign: 'sub' }));
69
- });
70
- export var CollapseStyled = styled(Collapse)(function (_a) {
71
- var theme = _a.theme;
72
- return ({
73
- marginBlockStart: theme.spacing(2)
74
- });
75
- });
76
- var SalesChannels = function () {
77
- var _a;
78
- var _b = React.useState([]), channelsMenuList = _b[0], setChannelsMenuList = _b[1];
79
- var t = useTranslation().t;
80
- var isAr = useLanguage().isAr;
81
- var control = useFormContext().control;
82
- var dispatch = useAppDispatch();
83
- var channelsControl = useController({ name: 'salesChannels', control: control });
84
- var channelsChecked = channelsControl.field.value;
85
- var warningMessage = (_a = channelsControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
86
- var _c = useAppSelector(entitySelector), data = _c.data, error = _c.error;
87
- var channelList = (data.verify.responseBody || {}).channelList;
88
- var salesChannels = (data.entityData || {}).salesChannels;
89
- React.useEffect(function () {
90
- if ((channelList === null || channelList === void 0 ? void 0 : channelList.length) > 0) {
91
- setChannelsMenuList(channelList);
92
- }
93
- }, [channelList]);
94
- var handleSalesChannelChange = function (event, checked) {
95
- var selected = channelsMenuList.find(function (channel) { return channel.id === event.target.id; });
96
- var isExists = channelsChecked === null || channelsChecked === void 0 ? void 0 : channelsChecked.find(function (channel) { return channel.id === (selected === null || selected === void 0 ? void 0 : selected.id); });
97
- if (isExists) {
98
- var updatedIdList = channelsChecked === null || channelsChecked === void 0 ? void 0 : channelsChecked.filter(function (channel) { return channel.id !== (selected === null || selected === void 0 ? void 0 : selected.id); });
99
- channelsControl.field.onChange(updatedIdList);
100
- return;
101
- }
102
- channelsControl.field.onChange(__spreadArray(__spreadArray([], channelsChecked, true), [selected], false));
103
- if (error)
104
- dispatch(clearError());
105
- };
106
- var getSelectedChannelsFlag = function (item) {
107
- if (channelsChecked)
108
- return !!(channelsChecked === null || channelsChecked === void 0 ? void 0 : channelsChecked.find(function (channel) { return channel.id === (item === null || item === void 0 ? void 0 : item.id); }));
109
- };
110
- return (_jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('channel_of_service') }), channelsMenuList.map(function (channel) { return (_jsxs(ContainerStyled, { children: [_jsx(CheckBoxStyled, { id: channel.id, disableRipple: true, disableFocusRipple: true, focusRipple: false, disabled: (salesChannels === null || salesChannels === void 0 ? void 0 : salesChannels.find(function (c) { return c.id === (channel === null || channel === void 0 ? void 0 : channel.id); })) ? true : false, checked: getSelectedChannelsFlag(channel), onChange: handleSalesChannelChange }), _jsxs(TextStyled, { children: [isAr ? channel.name.ar : channel.name.en, " "] })] }, channel.id)); }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: t(warningMessage) })) }))] }));
111
- };
112
- export default SalesChannels;
@@ -1,2 +0,0 @@
1
- import EntityInfo from './EntityInfo';
2
- export default EntityInfo;
@@ -1,2 +0,0 @@
1
- import EntityInfo from './EntityInfo';
2
- export default EntityInfo;
@@ -1,107 +0,0 @@
1
- import * as yup from 'yup';
2
- export declare const EntityInfoValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
- activities: yup.ArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
4
- ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
5
- en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
6
- }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
7
- ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
8
- en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
9
- }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
10
- ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
11
- en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
12
- }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
13
- ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
14
- en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
15
- }>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
16
- ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
17
- en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
18
- }>>[] | undefined>;
19
- salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
20
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
21
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
22
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
23
- }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
24
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
25
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
26
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
27
- }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
28
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
29
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
30
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
31
- }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
32
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
33
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
34
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
35
- }>>[] | undefined>;
36
- operationStartDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
37
- }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
38
- activities: yup.ArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
39
- ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
40
- en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
41
- }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<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>;
44
- }>>, import("yup/lib/object").AssertsShape<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>;
47
- }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<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>;
50
- }>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
51
- ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
52
- en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
53
- }>>[] | undefined>;
54
- salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
55
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
56
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
57
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
58
- }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
59
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
60
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
61
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
62
- }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
63
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
64
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
65
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
66
- }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
67
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
68
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
69
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
70
- }>>[] | undefined>;
71
- operationStartDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
72
- }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
73
- activities: yup.ArraySchema<yup.ObjectSchema<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>;
76
- }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<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>;
79
- }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
80
- ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
81
- en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
82
- }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<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>;
85
- }>>[] | undefined, import("yup/lib/object").AssertsShape<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>;
88
- }>>[] | undefined>;
89
- salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
90
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
91
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
92
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
93
- }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
94
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
95
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
96
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
97
- }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
98
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
99
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
100
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
101
- }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
102
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
103
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
104
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
105
- }>>[] | undefined>;
106
- operationStartDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
107
- }>>>;
@@ -1,17 +0,0 @@
1
- import * as yup from 'yup';
2
- export var EntityInfoValidationSchema = yup.object().shape({
3
- activities: yup.array().of(yup.object().shape({
4
- ar: yup.string(),
5
- en: yup.string()
6
- })),
7
- salesChannels: yup
8
- .array()
9
- .min(1, 'choose_atleast_one_channel')
10
- .of(yup.object().shape({
11
- id: yup.string(),
12
- name_en: yup.string(),
13
- name_ar: yup.string()
14
- }))
15
- .required('choose_atleast_one_channel'),
16
- operationStartDate: yup.string().required('choose_any_business_date')
17
- });
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export interface ResetPasswordSuccessProps {
3
- }
4
- declare const _default: React.MemoExoticComponent<({}: ResetPasswordSuccessProps) => JSX.Element>;
5
- export default _default;
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import { useTranslation } from 'react-i18next';
4
- import SuccessScreen from '../../../shared/SuccessScreen';
5
- var ResetPasswordSuccess = function (_a) {
6
- var t = useTranslation().t;
7
- return (_jsx(SuccessScreen, { title: t("reset_password_success_title"), description: t("reset_password_success_description"), showEmailProviders: true }));
8
- };
9
- export default React.memo(ResetPasswordSuccess);
@@ -1,3 +0,0 @@
1
- import ResetPasswordSuccess, { ResetPasswordSuccessProps } from './ResetPasswordSuccess';
2
- export type { ResetPasswordSuccessProps };
3
- export default ResetPasswordSuccess;
@@ -1,2 +0,0 @@
1
- import ResetPasswordSuccess from './ResetPasswordSuccess';
2
- export default ResetPasswordSuccess;
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export interface SuccessProps {
3
- }
4
- declare const _default: React.MemoExoticComponent<({}: SuccessProps) => JSX.Element>;
5
- export default _default;
@@ -1,16 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import { useTranslation } from 'react-i18next';
4
- import { useAppDispatch, useAppSelector } from '../../../../hooks';
5
- import { updateBoardSuccess, entitySelector } from '../../../app/entity/entityStore';
6
- import SuccessScreen from '../../../shared/SuccessScreen';
7
- var Success = function (_a) {
8
- var t = useTranslation().t;
9
- var dispatch = useAppDispatch();
10
- var _b = useAppSelector(entitySelector), loading = _b.loading, error = _b.error;
11
- var onSuccess = function () {
12
- dispatch(updateBoardSuccess());
13
- };
14
- return (_jsx(SuccessScreen, { title: t('entity_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: loading, error: error || '' }));
15
- };
16
- export default React.memo(Success);