@tap-payments/auth-jsconnect 1.0.40 → 1.0.44

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 (40) hide show
  1. package/build/@types/app.d.ts +10 -33
  2. package/build/api/data.d.ts +1 -0
  3. package/build/api/data.js +5 -1
  4. package/build/api/entity.d.ts +5 -6
  5. package/build/api/index.d.ts +2 -2
  6. package/build/api/lead.d.ts +1 -2
  7. package/build/api/lead.js +3 -7
  8. package/build/components/AnimationFlow/BottomSheet.js +5 -23
  9. package/build/components/Footer/Footer.d.ts +3 -1
  10. package/build/components/Footer/Footer.js +11 -47
  11. package/build/constants/api.d.ts +2 -2
  12. package/build/constants/api.js +5 -5
  13. package/build/constants/dummy.d.ts +14 -36
  14. package/build/constants/dummy.js +29 -53
  15. package/build/features/app/business/businessStore.d.ts +9 -7
  16. package/build/features/app/business/businessStore.js +98 -60
  17. package/build/features/app/connect/connectStore.js +1 -1
  18. package/build/features/business/screens/Activities/Activities.js +6 -1
  19. package/build/features/business/screens/Activities/ActivitiesList.d.ts +1 -1
  20. package/build/features/business/screens/BusinessType/BusinessType.js +2 -3
  21. package/build/features/business/screens/BusinessType/CompanyLicense.d.ts +2 -2
  22. package/build/features/business/screens/BusinessType/CompanyLicense.js +9 -6
  23. package/build/features/business/screens/BusinessType/FreelanceLicense.d.ts +2 -2
  24. package/build/features/business/screens/BusinessType/FreelanceLicense.js +9 -9
  25. package/build/features/business/screens/Customers/CustomerLocations.d.ts +1 -1
  26. package/build/features/business/screens/Customers/CustomerLocations.js +14 -4
  27. package/build/features/business/screens/Customers/Customers.js +17 -10
  28. package/build/features/business/screens/Customers/ExpectedCustomers.js +14 -4
  29. package/build/features/business/screens/Customers/ExpectedSalesRange.js +14 -4
  30. package/build/features/connect/screens/Individual/Email.js +1 -1
  31. package/build/features/connect/screens/Merchant/BrandName.js +1 -1
  32. package/build/features/connect/screens/Mobile/Mobile.js +1 -2
  33. package/build/features/connect/screens/NID/NID.js +1 -2
  34. package/build/features/shared/Containers/FeatureContainer.js +1 -1
  35. package/build/features/shared/Containers/ScreenContainer.js +1 -1
  36. package/build/features/shared/Footer/Footer.js +7 -1
  37. package/build/features/shared/Input/Input.d.ts +1 -1
  38. package/build/hooks/useElementSizeById.d.ts +6 -0
  39. package/build/hooks/useElementSizeById.js +12 -0
  40. package/package.json +126 -126
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import Box from '@mui/material/Box/Box';
14
+ import { useSelector } from 'react-redux';
14
15
  import { styled } from '@mui/material/styles';
15
16
  import * as React from 'react';
16
17
  import { useTranslation } from 'react-i18next';
@@ -25,12 +26,11 @@ import { useLanguage } from '../../../../hooks';
25
26
  import CustomerLocations from './CustomerLocations';
26
27
  import ExpectedCustomers from './ExpectedCustomers';
27
28
  import ExpectedSales from './ExpectedSalesRange';
28
- import { CUSTOMER_LOCATIONS, EXPECTED_CUSTOMERS, EXPECTED_SALES_RANGE } from '../../../../constants';
29
29
  import RefundPolicy from './RefundPolicy';
30
30
  import TransactionPolicy from './TransactionPolicy';
31
31
  import { ScreenContainer } from '../../../shared/Containers';
32
32
  import Collapse from '../../../../components/Collapse';
33
- import { updateCustomersInfo } from '../../../app/business/businessStore';
33
+ import { businessSelector, clearError, updateCustomersInfo } from '../../../app/business/businessStore';
34
34
  var FormStyled = styled(Form)(function () { return ({
35
35
  display: 'flex',
36
36
  flexDirection: 'column'
@@ -44,15 +44,11 @@ var ListType;
44
44
  var Customers = function (_a) {
45
45
  var _b = React.useState(), listActive = _b[0], setListActive = _b[1];
46
46
  var dispatch = useAppDispatch();
47
+ var _c = useSelector(businessSelector), data = _c.data, loading = _c.loading, error = _c.error;
48
+ var customerData = data.customersData;
47
49
  var methods = useForm({
48
50
  resolver: yupResolver(CustomerInfoValidation),
49
- defaultValues: {
50
- customerLocations: CUSTOMER_LOCATIONS,
51
- expectedCustomers: EXPECTED_CUSTOMERS[EXPECTED_CUSTOMERS.length - 1],
52
- expectedSalesRange: EXPECTED_SALES_RANGE[EXPECTED_SALES_RANGE.length - 1],
53
- refundPolicy: false,
54
- transactionPolicy: false
55
- },
51
+ defaultValues: data.customersData,
56
52
  mode: 'onChange'
57
53
  });
58
54
  var onSubmit = function (data) {
@@ -67,6 +63,16 @@ var Customers = function (_a) {
67
63
  var handleMenuClick = function (flag) {
68
64
  setListActive(flag);
69
65
  };
66
+ React.useEffect(function () {
67
+ if (error)
68
+ dispatch(clearError());
69
+ }, [methods.formState.isValid]);
70
+ React.useEffect(function () {
71
+ var customerLocations = customerData.customerLocations, expectedCustomers = customerData.expectedCustomers, expectedSalesRange = customerData.expectedSalesRange;
72
+ methods.setValue('customerLocations', customerLocations);
73
+ methods.setValue('expectedCustomers', expectedCustomers);
74
+ methods.setValue('expectedSalesRange', expectedSalesRange);
75
+ }, [customerData.customerLocations, customerData.expectedCustomers, customerData.expectedSalesRange]);
70
76
  var isCustomerLocationsListActive = listActive === ListType.CustomerLocationsList;
71
77
  var isExpectedCustomersListActive = listActive === ListType.ExpectedCustomersList;
72
78
  var isExpectedSalesListActive = listActive === ListType.ExpectedSalesList;
@@ -74,6 +80,7 @@ var Customers = function (_a) {
74
80
  var whenNotSelectExpectedCustomers = !isCustomerLocationsListActive && !isExpectedSalesListActive;
75
81
  var whenNotSelectExpectedSales = !isCustomerLocationsListActive && !isExpectedCustomersListActive;
76
82
  var isAnyListSelected = !isExpectedCustomersListActive && !isCustomerLocationsListActive && !isExpectedSalesListActive;
77
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(CustomerLocations, { show: whenNotSelectCustomersLocation, onListOpen: function () { return handleMenuClick(ListType.CustomerLocationsList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(ExpectedCustomers, { show: whenNotSelectExpectedCustomers, onListOpen: function () { return handleMenuClick(ListType.ExpectedCustomersList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(ExpectedSales, { show: whenNotSelectExpectedSales, onListOpen: function () { return handleMenuClick(ListType.ExpectedSalesList); }, onListClose: function () { return handleMenuClick(); } }), _jsxs(Collapse, __assign({ in: isAnyListSelected }, { children: [_jsx(RefundPolicy, {}), _jsx(TransactionPolicy, {}), _jsx(Box, __assign({ sx: { mt: 2 } }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: !methods.formState.isValid, isAr: isAr }, { children: t('next') })) }))] }))] })) })) }));
83
+ var disabled = !methods.formState.isValid || !!error;
84
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(CustomerLocations, { show: whenNotSelectCustomersLocation, onListOpen: function () { return handleMenuClick(ListType.CustomerLocationsList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(ExpectedCustomers, { show: whenNotSelectExpectedCustomers, onListOpen: function () { return handleMenuClick(ListType.ExpectedCustomersList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(ExpectedSales, { show: whenNotSelectExpectedSales, onListOpen: function () { return handleMenuClick(ListType.ExpectedSalesList); }, onListClose: function () { return handleMenuClick(); } }), _jsxs(Collapse, __assign({ in: isAnyListSelected }, { children: [_jsx(RefundPolicy, {}), _jsx(TransactionPolicy, {}), _jsx(Box, __assign({ sx: { mt: 2 } }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] }))] })) })) }));
78
85
  };
79
86
  export default React.memo(Customers);
@@ -22,17 +22,18 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
24
24
  import * as React from 'react';
25
+ import { useSelector } from 'react-redux';
25
26
  import Box from '@mui/material/Box';
26
27
  import { styled } from '@mui/material/styles';
27
28
  import { useTranslation } from 'react-i18next';
28
29
  import { useController, useFormContext } from 'react-hook-form';
29
30
  import { useLanguage } from '../../../../hooks';
30
31
  import SimpleList from '../../../../components/SimpleList';
31
- import { EXPECTED_CUSTOMERS } from '../../../../constants';
32
32
  import Collapse from '../../../../components/Collapse';
33
33
  import ExpandIcon from '../../../../components/ExpandIcon';
34
34
  import { ScreenContainer } from '../../../shared/Containers';
35
35
  import { CheckIconStyled, InputLabelStyled, InputStyled, NameContainer } from './CustomerLocations';
36
+ import { businessSelector } from '../../../app/business/businessStore';
36
37
  var ListItemContainer = styled(Box)(function (_a) {
37
38
  var theme = _a.theme;
38
39
  return ({
@@ -45,12 +46,15 @@ var SimpleListStyled = styled((SimpleList))(function () { return ({
45
46
  }); });
46
47
  var ExpectedCustomers = function (_a) {
47
48
  var rest = __rest(_a, []);
48
- var expectedCustomersList = React.useState(EXPECTED_CUSTOMERS)[0];
49
- var _b = React.useState(null), anchorEl = _b[0], setAnchorEl = _b[1];
49
+ var _b = React.useState([]), expectedCustomersList = _b[0], setExpectedCustomersList = _b[1];
50
+ var _c = React.useState(null), anchorEl = _c[0], setAnchorEl = _c[1];
50
51
  var t = useTranslation().t;
51
52
  var isAr = useLanguage().isAr;
52
53
  var control = useFormContext().control;
53
54
  var expectedCustomersControl = useController({ name: 'expectedCustomers', control: control });
55
+ var data = useSelector(businessSelector).data;
56
+ var activitiesData = data.activitiesData;
57
+ var response = activitiesData.responseBody;
54
58
  var onOpenList = function (event) {
55
59
  var _a;
56
60
  setAnchorEl(event.currentTarget);
@@ -61,6 +65,12 @@ var ExpectedCustomers = function (_a) {
61
65
  setAnchorEl(null);
62
66
  (_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
63
67
  };
68
+ React.useEffect(function () {
69
+ var _a;
70
+ if (((_a = response === null || response === void 0 ? void 0 : response.expectedCustomerSales) === null || _a === void 0 ? void 0 : _a.length) > 0) {
71
+ setExpectedCustomersList(response === null || response === void 0 ? void 0 : response.expectedCustomerSales);
72
+ }
73
+ }, [response === null || response === void 0 ? void 0 : response.expectedCustomerSales]);
64
74
  var onSelectItem = function (expectedCustomers) {
65
75
  onCloseList();
66
76
  expectedCustomersControl.field.onChange(expectedCustomers);
@@ -68,7 +78,7 @@ var ExpectedCustomers = function (_a) {
68
78
  var expectedCustomersValue = expectedCustomersControl.field.value;
69
79
  var expectedCustomersSelected = expectedCustomersValue;
70
80
  return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('expected_customers_to_serve') }), _jsx(InputStyled, { readOnly: true, value: isAr ? expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.nameAR : expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.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: expectedCustomersList, onSelectItem: onSelectItem, renderItem: function (item) {
71
- return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedCustomersValue === null || expectedCustomersValue === void 0 ? void 0 : expectedCustomersValue.id) }, { children: isAr ? item.nameAR : item.name })) }), item.id === (expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.id) && _jsx(CheckIconStyled, {})] }));
81
+ return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedCustomersValue === null || expectedCustomersValue === void 0 ? void 0 : expectedCustomersValue.id) }, { children: isAr ? item.titleAr : item.title })) }), item.id === (expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.id) && _jsx(CheckIconStyled, {})] }));
72
82
  } }) }))] }) })));
73
83
  };
74
84
  export default ExpectedCustomers;
@@ -27,12 +27,13 @@ import { styled } from '@mui/material/styles';
27
27
  import { useTranslation } from 'react-i18next';
28
28
  import { useController, useFormContext } from 'react-hook-form';
29
29
  import { useLanguage } from '../../../../hooks';
30
- import { EXPECTED_SALES_RANGE } from '../../../../constants';
31
30
  import SimpleList from '../../../../components/SimpleList';
32
31
  import Collapse from '../../../../components/Collapse';
33
32
  import ExpandIcon from '../../../../components/ExpandIcon';
34
33
  import { ScreenContainer } from '../../../shared/Containers';
35
34
  import { InputLabelStyled, CheckIconStyled, InputStyled, NameContainer } from './CustomerLocations';
35
+ import { useSelector } from 'react-redux';
36
+ import { businessSelector } from '../../../../features/app/business/businessStore';
36
37
  var ListItemContainer = styled(Box)(function () { return ({
37
38
  display: 'flex'
38
39
  }); });
@@ -41,12 +42,15 @@ var SimpleListStyled = styled((SimpleList))(function () { return ({
41
42
  }); });
42
43
  var ExpectedSalesRange = function (_a) {
43
44
  var rest = __rest(_a, []);
44
- var expectedSalesRangeList = React.useState(EXPECTED_SALES_RANGE)[0];
45
- var _b = React.useState(null), anchorEl = _b[0], setAnchorEl = _b[1];
45
+ var _b = React.useState([]), expectedSalesRangeList = _b[0], setExpectedSalesRangeList = _b[1];
46
+ var _c = React.useState(null), anchorEl = _c[0], setAnchorEl = _c[1];
46
47
  var t = useTranslation().t;
47
48
  var isAr = useLanguage().isAr;
48
49
  var control = useFormContext().control;
49
50
  var expectedSalesRangeControl = useController({ name: 'expectedSalesRange', control: control });
51
+ var data = useSelector(businessSelector).data;
52
+ var activitiesData = data.activitiesData;
53
+ var response = activitiesData.responseBody;
50
54
  var onOpenList = function (event) {
51
55
  var _a;
52
56
  setAnchorEl(event.currentTarget);
@@ -57,6 +61,12 @@ var ExpectedSalesRange = function (_a) {
57
61
  setAnchorEl(null);
58
62
  (_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
59
63
  };
64
+ React.useEffect(function () {
65
+ var _a;
66
+ if (((_a = response === null || response === void 0 ? void 0 : response.expectedSales) === null || _a === void 0 ? void 0 : _a.length) > 0) {
67
+ setExpectedSalesRangeList(response === null || response === void 0 ? void 0 : response.expectedSales);
68
+ }
69
+ }, [response === null || response === void 0 ? void 0 : response.expectedSales]);
60
70
  var checkRemainingCondition = function (item) {
61
71
  return !!expectedSalesRangeValue.find(function (expectedSale) {
62
72
  return expectedSale.id === item.id;
@@ -69,7 +79,7 @@ var ExpectedSalesRange = function (_a) {
69
79
  var expectedSalesRangeValue = expectedSalesRangeControl.field.value || expectedSalesRangeList;
70
80
  var expectedSalesRangeSelected = expectedSalesRangeValue;
71
81
  return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('expected_sales_yearly') }), _jsx(InputStyled, { readOnly: true, value: isAr ? expectedSalesRangeSelected === null || expectedSalesRangeSelected === void 0 ? void 0 : expectedSalesRangeSelected.nameAR : expectedSalesRangeSelected === null || expectedSalesRangeSelected === void 0 ? void 0 : expectedSalesRangeSelected.name, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, placeholder: t('choose_expected_sales'), endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: expectedSalesRangeList, onSelectItem: onSelectItem, renderItem: function (item) {
72
- return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id) }, { children: isAr ? item.nameAR : item.name })) }), item.id === (expectedSalesRangeSelected === null || expectedSalesRangeSelected === void 0 ? void 0 : expectedSalesRangeSelected.id) && _jsx(CheckIconStyled, {})] }));
82
+ return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id) }, { children: isAr ? item.titleAr : item.title })) }), item.id === (expectedSalesRangeSelected === null || expectedSalesRangeSelected === void 0 ? void 0 : expectedSalesRangeSelected.id) && _jsx(CheckIconStyled, {})] }));
73
83
  } }) }))] }) })));
74
84
  };
75
85
  export default ExpectedSalesRange;
@@ -54,6 +54,6 @@ var Email = function (_a) {
54
54
  var clearNumber = function () {
55
55
  emailControl.field.onChange('');
56
56
  };
57
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(InputStyled, { label: t('signup_email_lable'), value: emailValue, onChange: handleEmailChange, type: 'email', placeholder: t('signup_email_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: !error && emailValue ? _jsx(CheckIcon, {}) : emailValue && _jsx(ClearIcon, { onClick: clearNumber }) }) }) })));
57
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(InputStyled, { label: t('signup_email_lable'), value: emailValue, onEnterPressed: function (e) { return e.preventDefault(); }, onChange: handleEmailChange, type: 'email', placeholder: t('signup_email_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: !error && emailValue ? _jsx(CheckIcon, {}) : emailValue && _jsx(ClearIcon, { onClick: clearNumber }) }) }) })));
58
58
  };
59
59
  export default React.memo(Email);
@@ -86,6 +86,6 @@ var BrandName = function (_a) {
86
86
  var clearBrandName = function () {
87
87
  brandControl.field.onChange('');
88
88
  };
89
- return (_jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 3 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_brand_name_label') }), _jsx(Tooltip, __assign({ title: t('brand_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { onChange: handleBrandNameChange, value: brandNameValue, placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: !error && brandNameValue ? _jsx(CheckIcon, {}) : brandNameValue && _jsx(ClearIcon, { onClick: clearBrandName }) })] })));
89
+ return (_jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 3 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_brand_name_label') }), _jsx(Tooltip, __assign({ title: t('brand_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { onChange: handleBrandNameChange, value: brandNameValue, placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: !error && brandNameValue ? _jsx(CheckIcon, {}) : brandNameValue && _jsx(ClearIcon, { onClick: clearBrandName }) })] })));
90
90
  };
91
91
  export default React.memo(BrandName);
@@ -29,7 +29,6 @@ import Divider from '@mui/material/Divider';
29
29
  import Text from '../../../../components/Text';
30
30
  import MIDTitle from './Title';
31
31
  import MobileNumber from './MobileNumber';
32
- import BusinessCountry from './BusinessCountry';
33
32
  import { PhoneValidationSchema } from './validation';
34
33
  var FormStyled = styled(Form)(function () { return ({
35
34
  display: 'flex',
@@ -108,6 +107,6 @@ var Mobile = function (_a) {
108
107
  var isCountryListActive = listType === ListType.CountryCodeList;
109
108
  var listActive = isBusinessListActive || isCountryListActive;
110
109
  var disabled = !methods.formState.isValid || !!error;
111
- return (_jsxs(ScreenContainer, { children: [_jsx(MIDTitle, { show: !listActive, title: t('join_our_community'), description: t('ide_terms_and_conditions_description') }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(InputsContainerStyled, { children: [_jsx(BusinessCountry, { country: data.businessCountry, show: !isCountryListActive }), _jsx(MobileNumber, { show: !isBusinessListActive, setMobileLength: setMobileLength, countries: data.countries, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } })] }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(AbsherButton, __assign({ disabled: settingsStore.loading || loading, onClick: function () { return onBack(); }, isAr: isAr }, { children: t('absher_button_label') }))] }))] })) }))] }));
110
+ return (_jsxs(ScreenContainer, { children: [_jsx(MIDTitle, { show: !listActive, title: t('join_our_community'), description: t('ide_terms_and_conditions_description') }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(MobileNumber, { show: !isBusinessListActive, setMobileLength: setMobileLength, countries: data.countries, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } }) }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(AbsherButton, __assign({ disabled: settingsStore.loading || loading, onClick: function () { return onBack(); }, isAr: isAr }, { children: t('absher_button_label') }))] }))] })) }))] }));
112
111
  };
113
112
  export default React.memo(Mobile);
@@ -29,7 +29,6 @@ import Divider from '@mui/material/Divider';
29
29
  import Text from '../../../../components/Text';
30
30
  import IDNumber from './IDNumber';
31
31
  import DOB from './DOB';
32
- import BusinessCountry from '../Mobile/BusinessCountry';
33
32
  var FormStyled = styled(Form)(function () { return ({
34
33
  display: 'flex',
35
34
  flexDirection: 'column'
@@ -87,6 +86,6 @@ var NID = function (_a) {
87
86
  dispatch(handlePrevScreenStep('CONNECT_MOBILE_STEP'));
88
87
  };
89
88
  var disabled = !methods.formState.isValid || !!error;
90
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BusinessCountry, { show: !collapse, country: data.businessCountry }), _jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(IDNumber, { show: !collapse }) })), _jsx(DOB, { onDateClicked: handleCollapseOpenClose }), _jsxs(Collapse, __assign({ in: !collapse }, { children: [_jsx(Button, __assign({ loading: loading, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, error: t(error || '') }, { children: t('next') })), _jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(AbsherButton, __assign({ onClick: function () { return onBack(); }, disabled: loading || settingsStore.loading, hideIcon: true, isAr: isAr }, { children: t('mobile_button_label') }))] }))] })) })) }));
89
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(IDNumber, { show: !collapse }) })), _jsx(DOB, { onDateClicked: handleCollapseOpenClose }), _jsxs(Collapse, __assign({ in: !collapse }, { children: [_jsx(Button, __assign({ loading: loading, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, error: t(error || '') }, { children: t('next') })), _jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(AbsherButton, __assign({ onClick: function () { return onBack(); }, disabled: loading || settingsStore.loading, hideIcon: true, isAr: isAr }, { children: t('mobile_button_label') }))] }))] })) })) }));
91
90
  };
92
91
  export default React.memo(NID);
@@ -28,6 +28,6 @@ var Container = styled(Box)(function (_a) {
28
28
  _b);
29
29
  });
30
30
  var FeatureContainer = React.forwardRef(function (props, ref) {
31
- return _jsx(Container, __assign({}, props, { ref: ref, id: 'feature-container' }));
31
+ return _jsx(Container, __assign({}, props, { ref: ref, id: 'main-feature-container' }));
32
32
  });
33
33
  export default FeatureContainer;
@@ -24,6 +24,6 @@ var BoxStyled = styled(Box)(function (_a) {
24
24
  });
25
25
  });
26
26
  var ScreenContainer = React.forwardRef(function (props, ref) {
27
- return _jsx(BoxStyled, __assign({}, props, { ref: ref }));
27
+ return _jsx(BoxStyled, __assign({}, props, { ref: ref, id: 'main-screen-containers' }));
28
28
  });
29
29
  export default ScreenContainer;
@@ -4,13 +4,19 @@ import { useAppDispatch, useLanguage } from '../../../hooks';
4
4
  import { handleLanguage } from '../../../app/settings';
5
5
  import Footer from '../../../components/Footer';
6
6
  import { useTranslation } from 'react-i18next';
7
+ import { useSelector } from 'react-redux';
8
+ import { connectSelector } from '../../app/connect/connectStore';
7
9
  export default function CustomFooter() {
8
10
  var isEn = useLanguage().isEn;
9
11
  var t = useTranslation().t;
10
12
  var dispatch = useAppDispatch();
13
+ var _a = useSelector(connectSelector), data = _a.data, loading = _a.loading, error = _a.error;
11
14
  var handleChangeLanguage = function () {
12
15
  var language = isEn ? LanguageMode.AR : LanguageMode.EN;
13
16
  dispatch(handleLanguage(language));
14
17
  };
15
- return _jsx(Footer, { onSwitchLanguage: handleChangeLanguage, language: t('language') });
18
+ var country = data.businessCountry;
19
+ var countryName = isEn ? country.name.english : country.name.arabic;
20
+ var countryFlag = country.logo;
21
+ return (_jsx(Footer, { onSwitchLanguage: handleChangeLanguage, language: t('language'), countryName: countryName, countryFlag: countryFlag }));
16
22
  }
@@ -13,7 +13,7 @@ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent
13
13
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
14
14
  ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
15
15
  }, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
16
- export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick<InputProps, "name" | "type" | "className" | "style" | "classes" | "color" | "margin" | "translate" | "slot" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "size" | "disabled" | "error" | "components" | "componentsProps" | "value" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
16
+ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick<InputProps, "name" | "type" | "className" | "style" | "classes" | "color" | "margin" | "translate" | "slot" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "size" | "disabled" | "error" | "value" | "components" | "componentsProps" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
17
17
  placeholder?: string | undefined;
18
18
  hide?: boolean | undefined;
19
19
  warningType?: "alert" | "error" | "hint" | undefined;
@@ -0,0 +1,6 @@
1
+ interface ElementSize {
2
+ width: number;
3
+ height: number;
4
+ }
5
+ export declare const useElementSizeById: (id: string) => ElementSize;
6
+ export {};
@@ -0,0 +1,12 @@
1
+ import { useEffect, useState } from 'react';
2
+ export var useElementSizeById = function (id) {
3
+ var _a = useState({ width: 0, height: 0 }), size = _a[0], setSize = _a[1];
4
+ var element = document.getElementById(id);
5
+ useEffect(function () {
6
+ if (element) {
7
+ var _a = element.getBoundingClientRect(), width = _a.width, height = _a.height;
8
+ setSize({ width: width, height: height });
9
+ }
10
+ }, [element]);
11
+ return size;
12
+ };
package/package.json CHANGED
@@ -1,126 +1,126 @@
1
- {
2
- "name": "@tap-payments/auth-jsconnect",
3
- "version": "1.0.40",
4
- "description": "connect library, auth",
5
- "private": false,
6
- "main": "build/index.js",
7
- "module": "build/index.js",
8
- "types": "build/index.d.ts",
9
- "files": [
10
- "build",
11
- "README.md"
12
- ],
13
- "scripts": {
14
- "husky:setup": "npx husky install",
15
- "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\" *.json *.js",
16
- "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\" *.json *.js",
17
- "lint": "eslint src --color --ext .js,.jsx,.ts,.tsx,.json",
18
- "lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
19
- "start": "cross-env NODE_ENV=development webpack serve",
20
- "build": "cross-env NODE_ENV=production webpack",
21
- "copy:files": "copyfiles -u 1 src/**/*.css build/",
22
- "tsc:alias": "tsc-alias -p tsconfig.json",
23
- "ts:build": "tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
24
- "push": "npm publish --access public"
25
- },
26
- "keywords": [],
27
- "author": {
28
- "name": "Ahmed Elsharkawy",
29
- "email": "a.elsharkawy@tap.company"
30
- },
31
- "license": "ISC",
32
- "devDependencies": {
33
- "@babel/core": "^7.18.6",
34
- "@babel/preset-env": "^7.18.6",
35
- "@babel/preset-react": "^7.18.6",
36
- "@babel/preset-typescript": "^7.18.6",
37
- "@types/lodash-es": "^4.17.6",
38
- "@types/moment-hijri": "^2.1.0",
39
- "@types/react": "^18.0.15",
40
- "@types/react-calendar": "~3.5.1",
41
- "@types/react-dom": "^18.0.6",
42
- "@typescript-eslint/eslint-plugin": "^5.30.5",
43
- "@typescript-eslint/parser": "^5.30.5",
44
- "babel-loader": "^8.2.5",
45
- "copyfiles": "^2.4.1",
46
- "cross-env": "^7.0.3",
47
- "css-loader": "^6.7.1",
48
- "css-minimizer-webpack-plugin": "^4.0.0",
49
- "eslint": "^8.19.0",
50
- "eslint-config-airbnb": "^19.0.4",
51
- "eslint-config-prettier": "^8.5.0",
52
- "eslint-plugin-import": "^2.26.0",
53
- "eslint-plugin-jsx-a11y": "^6.6.0",
54
- "eslint-plugin-node": "^11.1.0",
55
- "eslint-plugin-prettier": "^4.2.1",
56
- "eslint-plugin-react": "^7.30.1",
57
- "eslint-plugin-react-hooks": "^4.6.0",
58
- "file-loader": "^6.2.0",
59
- "fork-ts-checker-webpack-plugin": "^7.2.12",
60
- "html-loader": "^3.1.2",
61
- "html-webpack-plugin": "^5.5.0",
62
- "husky": "^8.0.1",
63
- "lint-staged": "^13.0.3",
64
- "mini-css-extract-plugin": "^2.6.1",
65
- "prettier": "^2.7.1",
66
- "sass": "^1.53.0",
67
- "sass-loader": "^13.0.2",
68
- "style-loader": "^3.3.1",
69
- "terser-webpack-plugin": "^5.3.3",
70
- "tsc-alias": "^1.6.11",
71
- "typescript": "^4.7.4",
72
- "webpack": "^5.73.0",
73
- "webpack-cli": "^4.10.0",
74
- "webpack-dev-server": "^4.9.3",
75
- "webpack-merge": "^5.8.0"
76
- },
77
- "dependencies": {
78
- "@emotion/react": "^11.9.3",
79
- "@emotion/styled": "^11.9.3",
80
- "@fingerprintjs/fingerprintjs": "~3.3.4",
81
- "@hookform/resolvers": "^2.9.6",
82
- "@mui/icons-material": "^5.8.4",
83
- "@mui/material": "^5.8.7",
84
- "@reduxjs/toolkit": "^1.8.3",
85
- "axios": "^0.27.2",
86
- "device-detector-js": "^3.0.3",
87
- "i18next": "^21.8.14",
88
- "i18next-browser-languagedetector": "^6.1.4",
89
- "i18next-http-backend": "^1.4.1",
90
- "jsencrypt": "^3.2.1",
91
- "lodash-es": "^4.17.21",
92
- "moment-hijri": "~2.1.2",
93
- "react": "^18.2.0",
94
- "react-calendar": "~3.7.0",
95
- "react-dom": "^18.2.0",
96
- "react-hook-form": "^7.33.1",
97
- "react-i18next": "^11.18.1",
98
- "react-otp-input": "^2.4.0",
99
- "react-redux": "^8.0.2",
100
- "react-spring-bottom-sheet": "^3.4.1",
101
- "yup": "^0.32.11"
102
- },
103
- "peerDependencies": {
104
- "react": "^18.2.0",
105
- "react-dom": "^18.2.0"
106
- },
107
- "lint-staged": {
108
- "src/**/*.{ts,tsx,json,js,jsx}": [
109
- "yarn run prettier:fix",
110
- "yarn run lint",
111
- "git add ."
112
- ]
113
- },
114
- "browserslist": {
115
- "production": [
116
- ">0.2%",
117
- "not dead",
118
- "not op_mini all"
119
- ],
120
- "development": [
121
- "last 1 chrome version",
122
- "last 1 firefox version",
123
- "last 1 safari version"
124
- ]
125
- }
126
- }
1
+ {
2
+ "name": "@tap-payments/auth-jsconnect",
3
+ "version": "1.0.44",
4
+ "description": "connect library, auth",
5
+ "private": false,
6
+ "main": "build/index.js",
7
+ "module": "build/index.js",
8
+ "types": "build/index.d.ts",
9
+ "files": [
10
+ "build",
11
+ "README.md"
12
+ ],
13
+ "scripts": {
14
+ "husky:setup": "npx husky install",
15
+ "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\" *.json *.js",
16
+ "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\" *.json *.js",
17
+ "lint": "eslint src --color --ext .js,.jsx,.ts,.tsx,.json",
18
+ "lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
19
+ "start": "cross-env NODE_ENV=development webpack serve",
20
+ "build": "cross-env NODE_ENV=production webpack",
21
+ "copy:files": "copyfiles -u 1 src/**/*.css build/",
22
+ "tsc:alias": "tsc-alias -p tsconfig.json",
23
+ "ts:build": "tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
24
+ "push": "npm publish --access public"
25
+ },
26
+ "keywords": [],
27
+ "author": {
28
+ "name": "Ahmed Elsharkawy",
29
+ "email": "a.elsharkawy@tap.company"
30
+ },
31
+ "license": "ISC",
32
+ "devDependencies": {
33
+ "@babel/core": "^7.18.6",
34
+ "@babel/preset-env": "^7.18.6",
35
+ "@babel/preset-react": "^7.18.6",
36
+ "@babel/preset-typescript": "^7.18.6",
37
+ "@types/lodash-es": "^4.17.6",
38
+ "@types/moment-hijri": "^2.1.0",
39
+ "@types/react": "^18.0.15",
40
+ "@types/react-calendar": "~3.5.1",
41
+ "@types/react-dom": "^18.0.6",
42
+ "@typescript-eslint/eslint-plugin": "^5.30.5",
43
+ "@typescript-eslint/parser": "^5.30.5",
44
+ "babel-loader": "^8.2.5",
45
+ "copyfiles": "^2.4.1",
46
+ "cross-env": "^7.0.3",
47
+ "css-loader": "^6.7.1",
48
+ "css-minimizer-webpack-plugin": "^4.0.0",
49
+ "eslint": "^8.19.0",
50
+ "eslint-config-airbnb": "^19.0.4",
51
+ "eslint-config-prettier": "^8.5.0",
52
+ "eslint-plugin-import": "^2.26.0",
53
+ "eslint-plugin-jsx-a11y": "^6.6.0",
54
+ "eslint-plugin-node": "^11.1.0",
55
+ "eslint-plugin-prettier": "^4.2.1",
56
+ "eslint-plugin-react": "^7.30.1",
57
+ "eslint-plugin-react-hooks": "^4.6.0",
58
+ "file-loader": "^6.2.0",
59
+ "fork-ts-checker-webpack-plugin": "^7.2.12",
60
+ "html-loader": "^3.1.2",
61
+ "html-webpack-plugin": "^5.5.0",
62
+ "husky": "^8.0.1",
63
+ "lint-staged": "^13.0.3",
64
+ "mini-css-extract-plugin": "^2.6.1",
65
+ "prettier": "^2.7.1",
66
+ "sass": "^1.53.0",
67
+ "sass-loader": "^13.0.2",
68
+ "style-loader": "^3.3.1",
69
+ "terser-webpack-plugin": "^5.3.3",
70
+ "tsc-alias": "^1.6.11",
71
+ "typescript": "^4.7.4",
72
+ "webpack": "^5.73.0",
73
+ "webpack-cli": "^4.10.0",
74
+ "webpack-dev-server": "^4.9.3",
75
+ "webpack-merge": "^5.8.0"
76
+ },
77
+ "dependencies": {
78
+ "@emotion/react": "^11.9.3",
79
+ "@emotion/styled": "^11.9.3",
80
+ "@fingerprintjs/fingerprintjs": "~3.3.4",
81
+ "@hookform/resolvers": "^2.9.6",
82
+ "@mui/icons-material": "^5.8.4",
83
+ "@mui/material": "^5.8.7",
84
+ "@reduxjs/toolkit": "^1.8.3",
85
+ "axios": "^0.27.2",
86
+ "device-detector-js": "^3.0.3",
87
+ "i18next": "^21.8.14",
88
+ "i18next-browser-languagedetector": "^6.1.4",
89
+ "i18next-http-backend": "^1.4.1",
90
+ "jsencrypt": "^3.2.1",
91
+ "lodash-es": "^4.17.21",
92
+ "moment-hijri": "~2.1.2",
93
+ "react": "^18.2.0",
94
+ "react-calendar": "~3.7.0",
95
+ "react-dom": "^18.2.0",
96
+ "react-hook-form": "^7.33.1",
97
+ "react-i18next": "^11.18.1",
98
+ "react-otp-input": "^2.4.0",
99
+ "react-redux": "^8.0.2",
100
+ "react-spring-bottom-sheet": "^3.4.1",
101
+ "yup": "^0.32.11"
102
+ },
103
+ "peerDependencies": {
104
+ "react": "^18.2.0",
105
+ "react-dom": "^18.2.0"
106
+ },
107
+ "lint-staged": {
108
+ "src/**/*.{ts,tsx,json,js,jsx}": [
109
+ "yarn run prettier:fix",
110
+ "yarn run lint",
111
+ "git add ."
112
+ ]
113
+ },
114
+ "browserslist": {
115
+ "production": [
116
+ ">0.2%",
117
+ "not dead",
118
+ "not op_mini all"
119
+ ],
120
+ "development": [
121
+ "last 1 chrome version",
122
+ "last 1 firefox version",
123
+ "last 1 safari version"
124
+ ]
125
+ }
126
+ }