@tap-payments/auth-jsconnect 2.1.9-test → 2.1.11-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.
- package/build/@types/form.d.ts +4 -3
- package/build/api/board.d.ts +1 -0
- package/build/api/board.js +8 -1
- package/build/api/entity.d.ts +1 -1
- package/build/api/index.d.ts +1 -0
- package/build/assets/locales/ar.json +7 -0
- package/build/assets/locales/en.json +7 -0
- package/build/components/FileInput/DragAndDrop.d.ts +3 -2
- package/build/components/FileInput/DragAndDrop.js +4 -4
- package/build/components/Lottie/Lottie.d.ts +2924 -127
- package/build/components/Lottie/Lottie.js +8 -4
- package/build/components/Lottie/files/error.json +692 -0
- package/build/components/Lottie/files/start_loading.json +1140 -0
- package/build/components/Lottie/files/still_loading.json +1140 -0
- package/build/constants/validation.d.ts +1 -0
- package/build/constants/validation.js +1 -0
- package/build/features/app/bank/bankStore.js +13 -10
- package/build/features/app/business/businessStore.d.ts +8 -1
- package/build/features/app/business/businessStore.js +123 -66
- package/build/features/app/connect/connectStore.d.ts +1 -1
- package/build/features/app/connect/connectStore.js +47 -38
- package/build/features/app/entity/entityStore.js +37 -42
- package/build/features/app/individual/individualStore.js +47 -38
- package/build/features/app/password/passwordStore.js +19 -20
- package/build/features/app/tax/taxStore.js +13 -10
- package/build/features/bank/screens/BankDetails/BankDetails.js +13 -6
- package/build/features/bank/screens/BankDetails/BankStatement.js +14 -11
- package/build/features/bank/screens/BankDetails/validation.d.ts +22 -0
- package/build/features/bank/screens/BankDetails/validation.js +29 -2
- package/build/features/business/screens/BusinessType/Article.d.ts +6 -0
- package/build/features/business/screens/BusinessType/Article.js +89 -0
- package/build/features/business/screens/BusinessType/BusinessType.js +16 -10
- package/build/features/business/screens/BusinessType/EntityName.js +1 -1
- package/build/features/business/screens/BusinessType/LicenseCertificate.js +14 -9
- package/build/features/business/screens/BusinessType/LicenseList.js +3 -2
- package/build/features/business/screens/BusinessType/LicenseType.js +3 -3
- package/build/features/business/screens/BusinessType/validation.js +17 -8
- package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/business/screens/VerifyPACI/VerifyPACI.js +9 -134
- package/build/features/connect/screens/Merchant/Merchant.js +4 -24
- package/build/features/connect/screens/Merchant/SalesChannels.d.ts +2 -5
- package/build/features/connect/screens/Merchant/SalesChannels.js +29 -99
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +9 -73
- package/build/features/entity/screens/EntityInfoConfirm/Article.js +14 -11
- package/build/features/shared/PaciVerification/PaciVerification.d.ts +12 -0
- package/build/features/shared/PaciVerification/PaciVerification.js +91 -0
- package/build/features/{business/screens/VerifyPACI → shared/PaciVerification}/VerifyPACILoading.d.ts +1 -0
- package/build/features/shared/PaciVerification/VerifyPACILoading.js +13 -0
- package/build/features/{business/screens/VerifyPACI → shared/PaciVerification}/VerifyPACISuccess.d.ts +0 -0
- package/build/features/{business/screens/VerifyPACI → shared/PaciVerification}/VerifyPACISuccess.js +1 -1
- package/build/features/shared/PaciVerification/index.d.ts +2 -0
- package/build/features/shared/PaciVerification/index.js +2 -0
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +11 -0
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +100 -0
- package/build/features/shared/SalesChannels/SalesChannel.d.ts +10 -0
- package/build/features/shared/SalesChannels/SalesChannel.js +132 -0
- package/build/features/shared/SalesChannels/index.d.ts +2 -0
- package/build/features/shared/SalesChannels/index.js +2 -0
- package/build/features/shared/UploadFile/UploadFile.d.ts +3 -2
- package/build/features/shared/UploadFile/UploadFile.js +13 -13
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useCountUp.d.ts +9 -0
- package/build/hooks/useCountUp.js +17 -0
- package/package.json +1 -1
- package/build/components/Lottie/files/pulsating_circle_waves.json +0 -236
- package/build/features/business/screens/VerifyPACI/VerifyPACILoading.js +0 -23
- package/build/features/connect/screens/Merchant/SocialMedia.d.ts +0 -8
- package/build/features/connect/screens/Merchant/SocialMedia.js +0 -156
- package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.d.ts +0 -6
- package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +0 -23
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +0 -5
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +0 -8
|
@@ -1,156 +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 { useTranslation } from 'react-i18next';
|
|
24
|
-
import { useFormContext } from 'react-hook-form';
|
|
25
|
-
import { styled, alpha } from '@mui/material/styles';
|
|
26
|
-
import Box from '@mui/material/Box';
|
|
27
|
-
import Input from '../../../../components/Input';
|
|
28
|
-
import Warning from '../../../../components/Warning';
|
|
29
|
-
import Text from '../../../../components/Text';
|
|
30
|
-
import Collapse from '../../../../components/Collapse';
|
|
31
|
-
import SocialMediaGroup from '../../../../components/SocialMediaGroup';
|
|
32
|
-
import ToggleButton from '../../../../components/ToggleButton';
|
|
33
|
-
import Icon from '../../../../components/Icon';
|
|
34
|
-
import { useLanguage } from '../../../../hooks';
|
|
35
|
-
import { isWebsite, isTwitter } from '../../../../utils';
|
|
36
|
-
var SocialMediaGroupStyled = styled(SocialMediaGroup)(function (_a) {
|
|
37
|
-
var theme = _a.theme, defaultValue = _a.defaultValue;
|
|
38
|
-
return ({
|
|
39
|
-
borderTop: "1px solid ".concat(alpha(theme.palette.divider, 0.8)),
|
|
40
|
-
borderBottom: !defaultValue ? "1px solid ".concat(alpha(theme.palette.divider, 0.8)) : '',
|
|
41
|
-
width: '100%'
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
var InputStyled = styled(Input)(function (_a) {
|
|
45
|
-
var theme = _a.theme;
|
|
46
|
-
return ({
|
|
47
|
-
padding: theme.spacing(0, 2, 0, 0),
|
|
48
|
-
paddingInlineEnd: theme.spacing(2),
|
|
49
|
-
input: {
|
|
50
|
-
paddingInlineStart: theme.spacing(0)
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
var TextStyled = styled(Text)(function (_a) {
|
|
55
|
-
var theme = _a.theme;
|
|
56
|
-
return ({
|
|
57
|
-
padding: theme.spacing(0, 0, 0, 1.5)
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
var ToggleIconStyled = styled(Icon, {
|
|
61
|
-
shouldForwardProp: function (prop) { return prop !== 'isActive'; }
|
|
62
|
-
})(function (_a) {
|
|
63
|
-
var theme = _a.theme, isActive = _a.isActive;
|
|
64
|
-
return ({
|
|
65
|
-
width: theme.spacing(3),
|
|
66
|
-
height: theme.spacing(3),
|
|
67
|
-
filter: isActive ? 'invert(1) sepia(1) saturate(5) hue-rotate(175deg)' : ''
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
var SocialMediaButtonStyled = styled(ToggleButton, {
|
|
71
|
-
shouldForwardProp: function (prop) { return prop !== 'isActive' && prop !== 'isShow'; }
|
|
72
|
-
})(function (_a) {
|
|
73
|
-
var theme = _a.theme, isActive = _a.isActive, isShow = _a.isShow;
|
|
74
|
-
return ({
|
|
75
|
-
borderBottom: isActive ? "".concat(theme.spacing(0.1875), " solid #3478F6") : 'none',
|
|
76
|
-
display: isShow ? 'inherit' : 'none',
|
|
77
|
-
transition: 'display 0.3s'
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
var SocialMedia = function (_a) {
|
|
81
|
-
var _b;
|
|
82
|
-
var show = _a.show, activeIconId = _a.activeIconId, onSaleIconChange = _a.onSaleIconChange;
|
|
83
|
-
var t = useTranslation().t;
|
|
84
|
-
var isAr = useLanguage().isAr;
|
|
85
|
-
var _c = useFormContext(), setValue = _c.setValue, watch = _c.watch, getFieldState = _c.getFieldState;
|
|
86
|
-
var selectedChannels = watch('salesChannels');
|
|
87
|
-
var salesChannelsState = getFieldState('salesChannels');
|
|
88
|
-
var onChangeInput = function (value, id) {
|
|
89
|
-
if (selectedChannels.length <= 0)
|
|
90
|
-
return;
|
|
91
|
-
var updatedChannels = selectedChannels.map(function (channel) {
|
|
92
|
-
var _a;
|
|
93
|
-
if (channel.id === id) {
|
|
94
|
-
return {
|
|
95
|
-
code: channel.code,
|
|
96
|
-
address: value,
|
|
97
|
-
logo: channel.logo,
|
|
98
|
-
id: channel.id,
|
|
99
|
-
name: channel.name,
|
|
100
|
-
sub: channel.sub
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
if ((_a = channel.sub) === null || _a === void 0 ? void 0 : _a.length) {
|
|
104
|
-
var updatedSub = channel.sub.map(function (subChannel) {
|
|
105
|
-
if (subChannel.id === id) {
|
|
106
|
-
return {
|
|
107
|
-
code: subChannel.code,
|
|
108
|
-
address: value,
|
|
109
|
-
logo: subChannel.logo,
|
|
110
|
-
id: subChannel.id,
|
|
111
|
-
name: subChannel.name
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
return subChannel;
|
|
115
|
-
});
|
|
116
|
-
return __assign(__assign({}, channel), { sub: updatedSub });
|
|
117
|
-
}
|
|
118
|
-
return channel;
|
|
119
|
-
});
|
|
120
|
-
setValue('salesChannels', __spreadArray([], updatedChannels, true), { shouldValidate: true });
|
|
121
|
-
};
|
|
122
|
-
var getPlaceHolder = function (item) {
|
|
123
|
-
var _a, _b;
|
|
124
|
-
if (isAr)
|
|
125
|
-
return ((_a = item.name) === null || _a === void 0 ? void 0 : _a.ar) || '';
|
|
126
|
-
return ((_b = item.name) === null || _b === void 0 ? void 0 : _b.en) || '';
|
|
127
|
-
};
|
|
128
|
-
var hasError = React.useMemo(function () {
|
|
129
|
-
var _a;
|
|
130
|
-
var error = salesChannelsState.error;
|
|
131
|
-
return (error === null || error === void 0 ? void 0 : error.message) && 'choose_atleast_one_channel' !== ((_a = salesChannelsState.error) === null || _a === void 0 ? void 0 : _a.message);
|
|
132
|
-
}, [salesChannelsState]);
|
|
133
|
-
var linksErrorMsg = (_b = salesChannelsState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
134
|
-
return (_jsx(Box, { children: _jsx(Collapse, __assign({ in: show && selectedChannels.length > 0 }, { children: _jsxs(Box, __assign({ sx: { mb: 3, direction: 'ltr' } }, { children: [_jsx(SocialMediaGroupStyled, __assign({ exclusive: true, onChange: function (e, value) {
|
|
135
|
-
onSaleIconChange(value);
|
|
136
|
-
} }, { children: selectedChannels.map(function (channel, index) {
|
|
137
|
-
var _a;
|
|
138
|
-
var isActive = activeIconId === channel.id;
|
|
139
|
-
return ((_a = channel.sub) === null || _a === void 0 ? void 0 : _a.length) ? (channel.sub.map(function (sub, subIndex) {
|
|
140
|
-
var isSubActive = activeIconId === sub.id;
|
|
141
|
-
return (_jsx(SocialMediaButtonStyled, __assign({ isShow: true, isActive: isSubActive, value: sub.id }, { children: _jsx(ToggleIconStyled, { isActive: isSubActive, src: (sub === null || sub === void 0 ? void 0 : sub.logo) || '' }) }), "sub_".concat(subIndex)));
|
|
142
|
-
})) : (_jsx(SocialMediaButtonStyled, __assign({ isShow: true, isActive: isActive, value: channel.id || '' }, { children: _jsx(ToggleIconStyled, { isActive: isActive, src: (channel === null || channel === void 0 ? void 0 : channel.logo) || '' }) }), index));
|
|
143
|
-
}) })), selectedChannels.map(function (channel, index) {
|
|
144
|
-
var _a;
|
|
145
|
-
var isActive = activeIconId === channel.id;
|
|
146
|
-
return ((_a = channel.sub) === null || _a === void 0 ? void 0 : _a.length) ? (channel.sub.map(function (sub, subIndex) {
|
|
147
|
-
var isSubActive = activeIconId === sub.id;
|
|
148
|
-
return (_jsx(Collapse, __assign({ in: isSubActive, timeout: 300 }, { children: _jsx(InputStyled, { onChange: function (e) {
|
|
149
|
-
onChangeInput(e.target.value, sub.id);
|
|
150
|
-
}, value: sub.address || '', startAdornment: _jsx(TextStyled, __assign({ sx: __assign({}, (isTwitter(sub.code) && { fontSize: '20px' })) }, { children: isWebsite(sub.code) ? "https://" : isTwitter(sub.code) ? "@" : '' })), placeholder: t(getPlaceHolder(sub)) }) }), "sub_".concat(subIndex)));
|
|
151
|
-
})) : (_jsx(Collapse, __assign({ in: isActive, timeout: 300 }, { children: _jsx(InputStyled, { onChange: function (e) {
|
|
152
|
-
onChangeInput(e.target.value, channel.id);
|
|
153
|
-
}, value: channel.address || '', startAdornment: _jsx(TextStyled, __assign({ sx: __assign({}, (isTwitter(channel.code) && { fontSize: '20px' })) }, { children: isWebsite(channel.code) ? "https://" : isTwitter(channel.code) ? "@" : '' })), placeholder: t(getPlaceHolder(channel)) }) }), index));
|
|
154
|
-
}), _jsx(Collapse, __assign({ in: !!hasError }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: t(linksErrorMsg) })) }))] })) })) }));
|
|
155
|
-
};
|
|
156
|
-
export default React.memo(SocialMedia);
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
import { styled } from '@mui/material/styles';
|
|
4
|
-
import LottieFile, { LottieAnimationFiles } from '../../../../components/Lottie';
|
|
5
|
-
import { ICONS_NAMES } from '../../../../constants';
|
|
6
|
-
import Icon from '../../../../components/Icon';
|
|
7
|
-
var IconStyled = styled(Icon)(function (_a) {
|
|
8
|
-
var theme = _a.theme;
|
|
9
|
-
return ({
|
|
10
|
-
position: 'absolute',
|
|
11
|
-
top: '50%',
|
|
12
|
-
left: '50%',
|
|
13
|
-
transform: 'translate(-50%, -50%)',
|
|
14
|
-
width: 64,
|
|
15
|
-
height: 64
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
var VerifyPACILoading = function (_a) {
|
|
19
|
-
var _b = _a.loop, loop = _b === void 0 ? true : _b;
|
|
20
|
-
return (_jsxs(_Fragment, { children: [_jsx(LottieFile, { file: LottieAnimationFiles.pulsating_circle_waves, loop: loop, width: '90%' }), _jsx(IconStyled, { src: ICONS_NAMES.PACI_VERIFY_ICON })] }));
|
|
21
|
-
};
|
|
22
|
-
VerifyPACILoading.defaultProps = {};
|
|
23
|
-
export default memo(VerifyPACILoading);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
import LottieFile, { LottieAnimationFiles } from '../../../../components/Lottie';
|
|
4
|
-
var VerifyPACISuccess = function () {
|
|
5
|
-
return (_jsx(_Fragment, { children: _jsx(LottieFile, { loop: false, file: LottieAnimationFiles.success, width: '90%' }) }));
|
|
6
|
-
};
|
|
7
|
-
VerifyPACISuccess.defaultProps = {};
|
|
8
|
-
export default memo(VerifyPACISuccess);
|