@tap-payments/auth-jsconnect 2.1.24-test → 2.1.26-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 (94) hide show
  1. package/build/@types/app.d.ts +17 -1
  2. package/build/@types/app.js +1 -0
  3. package/build/@types/form.d.ts +13 -2
  4. package/build/api/data.d.ts +8 -0
  5. package/build/api/data.js +16 -0
  6. package/build/api/entity.d.ts +2 -2
  7. package/build/api/index.d.ts +6 -0
  8. package/build/api/individual.d.ts +4 -0
  9. package/build/app/rootReducer.d.ts +1 -0
  10. package/build/app/rootReducer.js +3 -1
  11. package/build/app/store.d.ts +2 -0
  12. package/build/constants/api.d.ts +2 -0
  13. package/build/constants/api.js +5 -1
  14. package/build/constants/app.d.ts +7 -0
  15. package/build/constants/app.js +44 -0
  16. package/build/features/app/brand/brandStore.d.ts +97 -0
  17. package/build/features/app/brand/brandStore.js +618 -0
  18. package/build/features/app/entity/entityStore.js +52 -30
  19. package/build/features/brand/Brand.d.ts +7 -0
  20. package/build/features/brand/Brand.js +69 -0
  21. package/build/features/brand/index.d.ts +1 -0
  22. package/build/features/brand/index.js +1 -0
  23. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +91 -0
  24. package/build/features/brand/screens/BrandActivities/ActivitiesList.js +168 -0
  25. package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +5 -0
  26. package/build/features/brand/screens/BrandActivities/BrandActivities.js +72 -0
  27. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +82 -0
  28. package/build/features/brand/screens/BrandActivities/CustomerBase.js +144 -0
  29. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +8 -0
  30. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +98 -0
  31. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +8 -0
  32. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +127 -0
  33. package/build/features/brand/screens/BrandActivities/OperationStartDate.d.ts +20 -0
  34. package/build/features/brand/screens/BrandActivities/OperationStartDate.js +45 -0
  35. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +36 -0
  36. package/build/features/brand/screens/BrandActivities/RefundPolicy.js +84 -0
  37. package/build/features/brand/screens/BrandActivities/TAC.d.ts +6 -0
  38. package/build/features/brand/screens/BrandActivities/TAC.js +87 -0
  39. package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +3 -0
  40. package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +44 -0
  41. package/build/features/brand/screens/BrandActivities/index.d.ts +2 -0
  42. package/build/features/brand/screens/BrandActivities/index.js +2 -0
  43. package/build/features/brand/screens/BrandActivities/validation.d.ts +71 -0
  44. package/build/features/brand/screens/BrandActivities/validation.js +21 -0
  45. package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +5 -0
  46. package/build/features/brand/screens/BrandInfo/BrandInfo.js +72 -0
  47. package/build/features/brand/screens/BrandInfo/BrandName.d.ts +8 -0
  48. package/build/features/brand/screens/BrandInfo/BrandName.js +142 -0
  49. package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +5 -0
  50. package/build/features/brand/screens/BrandInfo/SalesChannels.js +30 -0
  51. package/build/features/brand/screens/BrandInfo/Segments.d.ts +8 -0
  52. package/build/features/brand/screens/BrandInfo/Segments.js +83 -0
  53. package/build/features/brand/screens/BrandInfo/TeamSize.d.ts +8 -0
  54. package/build/features/brand/screens/BrandInfo/TeamSize.js +83 -0
  55. package/build/features/brand/screens/BrandInfo/index.d.ts +2 -0
  56. package/build/features/brand/screens/BrandInfo/index.js +2 -0
  57. package/build/features/brand/screens/BrandInfo/validation.d.ts +41 -0
  58. package/build/features/brand/screens/BrandInfo/validation.js +106 -0
  59. package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  60. package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
  61. package/build/features/brand/screens/ResetPasswordSuccess/index.d.ts +3 -0
  62. package/build/features/brand/screens/ResetPasswordSuccess/index.js +2 -0
  63. package/build/features/brand/screens/Success/Success.d.ts +5 -0
  64. package/build/features/brand/screens/Success/Success.js +20 -0
  65. package/build/features/brand/screens/Success/index.d.ts +3 -0
  66. package/build/features/brand/screens/Success/index.js +2 -0
  67. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  68. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +117 -0
  69. package/build/features/brand/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  70. package/build/features/brand/screens/SuccessWithFlowButtons/index.js +2 -0
  71. package/build/features/brand/screens/Verify/OTPInput.d.ts +7 -0
  72. package/build/features/brand/screens/Verify/OTPInput.js +47 -0
  73. package/build/features/brand/screens/Verify/Verify.d.ts +5 -0
  74. package/build/features/brand/screens/Verify/Verify.js +91 -0
  75. package/build/features/brand/screens/Verify/index.d.ts +2 -0
  76. package/build/features/brand/screens/Verify/index.js +2 -0
  77. package/build/features/brand/screens/Verify/validation.d.ts +8 -0
  78. package/build/features/brand/screens/Verify/validation.js +4 -0
  79. package/build/features/business/screens/Activities/ActivitiesList.d.ts +1 -1
  80. package/build/features/business/screens/Customers/CustomerLocations.d.ts +1 -1
  81. package/build/features/connect/screens/Merchant/validation.js +2 -2
  82. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +1 -1
  83. package/build/features/entity/screens/EntityCapital/ActivityList.js +4 -1
  84. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +1 -1
  85. package/build/features/entity/screens/EntityName/EntityTypeList.js +3 -3
  86. package/build/features/featuresScreens.d.ts +1 -0
  87. package/build/features/featuresScreens.js +29 -0
  88. package/build/features/shared/Address/CountryList.d.ts +1 -1
  89. package/build/features/shared/Address/InputSelect.d.ts +1 -1
  90. package/build/features/shared/Input/Input.d.ts +1 -1
  91. package/build/hooks/useAppDispatch.d.ts +1 -0
  92. package/build/index.d.ts +3 -2
  93. package/build/index.js +4 -1
  94. package/package.json +1 -1
@@ -0,0 +1,127 @@
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 * as React from 'react';
14
+ import Box from '@mui/material/Box';
15
+ import { styled } from '@mui/material/styles';
16
+ import { useTranslation } from 'react-i18next';
17
+ import { useController, useFormContext } from 'react-hook-form';
18
+ import { useLanguage, useAppSelector, useAppDispatch } from '../../../../hooks';
19
+ import SimpleList from '../../../../components/SimpleList';
20
+ import Collapse from '../../../../components/Collapse';
21
+ import ExpandIcon from '../../../../components/ExpandIcon';
22
+ import { brandSelector, clearError } from '../../../app/brand/brandStore';
23
+ import { isExist } from '../../../../utils';
24
+ import { ScreenContainer } from '../../../shared/Containers';
25
+ import { InputLabelStyled, CheckIconStyled, InputStyled, NameContainer } from './CustomerBase';
26
+ import Search from '../../../../features/shared/Search';
27
+ var ListItem = styled(Box)(function (_a) {
28
+ var theme = _a.theme;
29
+ return ({
30
+ display: 'flex',
31
+ justifyContent: 'space-between',
32
+ width: '100%',
33
+ paddingInlineStart: theme.spacing(2.5),
34
+ paddingInlineEnd: theme.spacing(2.5),
35
+ paddingTop: theme.spacing(1.5),
36
+ paddingBottom: theme.spacing(1.5)
37
+ });
38
+ });
39
+ var ListItemContainer = styled(Box)(function () { return ({
40
+ display: 'flex',
41
+ flexDirection: 'column',
42
+ width: '100%'
43
+ }); });
44
+ var SimpleListStyled = styled((SimpleList))(function () { return ({
45
+ height: 'fit-content'
46
+ }); });
47
+ var ExpectedSalesRange = function (_a) {
48
+ var show = _a.show, onListClose = _a.onListClose, onListOpen = _a.onListOpen;
49
+ var _b = React.useState([]), expectedSalesRangeList = _b[0], setExpectedSalesRangeList = _b[1];
50
+ var _c = React.useState(null), anchorEl = _c[0], setAnchorEl = _c[1];
51
+ var _d = React.useState(''), subIndex = _d[0], setSubIndex = _d[1];
52
+ var t = useTranslation().t;
53
+ var isAr = useLanguage().isAr;
54
+ var control = useFormContext().control;
55
+ var dispatch = useAppDispatch();
56
+ var expectedSaleControl = useController({ name: 'expectedSale', control: control });
57
+ var _e = useAppSelector(brandSelector), data = _e.data, error = _e.error;
58
+ var brandActivities = data.brandActivities;
59
+ var expectedSales = (brandActivities.responseBody || {}).expectedSales;
60
+ var expectedSalesRangeValue = expectedSaleControl.field.value;
61
+ var handleOpenMainMenu = function (event) {
62
+ setAnchorEl(event.currentTarget);
63
+ onListOpen === null || onListOpen === void 0 ? void 0 : onListOpen();
64
+ };
65
+ var handleCloseMainMenu = function () {
66
+ setAnchorEl(null);
67
+ onListClose === null || onListClose === void 0 ? void 0 : onListClose();
68
+ handleCloseSubMenu();
69
+ if ((expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales.length) > 0) {
70
+ setExpectedSalesRangeList(expectedSales);
71
+ }
72
+ };
73
+ var handleOpenSubMenu = function (index) {
74
+ if (subIndex === index)
75
+ setSubIndex('');
76
+ else
77
+ setSubIndex(index);
78
+ };
79
+ var handleCloseSubMenu = function () {
80
+ setSubIndex('');
81
+ };
82
+ React.useEffect(function () {
83
+ if ((expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales.length) > 0) {
84
+ setExpectedSalesRangeList(expectedSales);
85
+ }
86
+ }, [expectedSales]);
87
+ var onSelectItem = function (expectedSalesRange) {
88
+ handleCloseMainMenu();
89
+ if (error)
90
+ dispatch(clearError());
91
+ expectedSaleControl.field.onChange(expectedSalesRange);
92
+ };
93
+ var handleSearch = function (value) {
94
+ var filteredList = expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales.filter(function (salesRange) {
95
+ var _a, _b, _c;
96
+ return salesRange.name.en.toLowerCase().includes(value.toLowerCase()) ||
97
+ salesRange.name.en.toLowerCase().replace(',', '').includes(value.toLowerCase()) ||
98
+ salesRange.name.ar.toLowerCase().includes(value.toLowerCase()) ||
99
+ ((_a = salesRange.sub) === null || _a === void 0 ? void 0 : _a.find(function (obj) { return obj.name.en.toLowerCase().includes(value.toLowerCase()); })) ||
100
+ ((_b = salesRange.sub) === null || _b === void 0 ? void 0 : _b.find(function (obj) {
101
+ return obj.name.en.toLowerCase().replace(',', '').includes(value.toLowerCase());
102
+ })) ||
103
+ ((_c = salesRange.sub) === null || _c === void 0 ? void 0 : _c.find(function (obj) { return obj.name.ar.toLowerCase().includes(value.toLowerCase()); }));
104
+ });
105
+ setExpectedSalesRangeList(filteredList);
106
+ };
107
+ React.useEffect(function () {
108
+ var item = isExist(expectedSales || [], expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id);
109
+ if (item)
110
+ setSubIndex(item.id);
111
+ }, [anchorEl, expectedSalesRangeValue]);
112
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('expected_sales_yearly') }), _jsx(InputStyled, { readOnly: true, value: (isAr ? expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.name.ar : expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.name.en) || '', onClick: !!anchorEl ? handleCloseMainMenu : handleOpenMainMenu, placeholder: t('choose_expected_sales'), endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { sx: { maxHeight: '350px', paddingTop: 0 }, list: expectedSalesRangeList, listItemProps: { sx: { padding: 0 } }, onSelectItem: function (item) {
113
+ var isOnlyOneItem = !item.sub || item.sub.length === 1;
114
+ if (isOnlyOneItem)
115
+ onSelectItem(item);
116
+ else
117
+ handleOpenSubMenu(item.id);
118
+ }, renderItem: function (item) {
119
+ var _a;
120
+ var isOnlyOneItem = !item.sub || ((_a = item.sub) === null || _a === void 0 ? void 0 : _a.length) === 1;
121
+ var showCheck = item.id === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id) && isOnlyOneItem;
122
+ return (_jsxs(ListItemContainer, { children: [_jsxs(ListItem, __assign({ sx: __assign({ bgcolor: 'rgb(196 184 184 / 8%)', borderBottom: '1px solid rgba(227, 232, 238, 0.8)' }, (isOnlyOneItem && { bgcolor: 'inherit', borderBottom: 'none' })) }, { children: [_jsx(NameContainer, __assign({ isSelected: item.id === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id), sx: __assign({}, (isOnlyOneItem && { paddingInlineStart: '5px' })) }, { children: isAr ? item.name.ar : item.name.en })), showCheck ? _jsx(CheckIconStyled, {}) : !isOnlyOneItem && _jsx(ExpandIcon, { anchorEl: subIndex === item.id })] })), _jsx(Collapse, __assign({ in: item.id === subIndex && !isOnlyOneItem }, { children: _jsx(SimpleListStyled, { sx: { pt: 0, pb: 0 }, list: (!isOnlyOneItem && item.sub) || [], onSelectItem: onSelectItem, listItemProps: { sx: { padding: 0, '&:last-child': { paddingBottom: 0 } } }, renderItem: function (item, idx) {
123
+ return (_jsxs(ListItem, __assign({ sx: { mt: idx === 0 ? 1 : 0 } }, { children: [_jsx(NameContainer, __assign({ isSelected: item.id === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id) }, { children: isAr ? item.name.ar : item.name.en })), item.id === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id) && _jsx(CheckIconStyled, {})] })));
124
+ } }) }))] }));
125
+ } })] }))] }) })));
126
+ };
127
+ export default ExpectedSalesRange;
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
3
+ align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
4
+ children?: React.ReactNode;
5
+ classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
6
+ gutterBottom?: boolean | undefined;
7
+ noWrap?: boolean | undefined;
8
+ paragraph?: boolean | undefined;
9
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
10
+ variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | undefined;
11
+ variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2", string>> | undefined;
12
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
13
+ ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
14
+ }, 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>, {}, {}>;
15
+ export declare const MandatoryStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
16
+ export interface OperationStartDateProps {
17
+ onDateClicked?: (flag: boolean) => void;
18
+ }
19
+ declare const OperationStartDate: ({ onDateClicked }: OperationStartDateProps) => JSX.Element;
20
+ export default OperationStartDate;
@@ -0,0 +1,45 @@
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 { useTranslation } from 'react-i18next';
14
+ import { useController, useFormContext } from 'react-hook-form';
15
+ import DatePicker from '../../../../components/DatePicker';
16
+ import Text from '../../../../components/Text';
17
+ import { ScreenContainer } from '../../../shared/Containers';
18
+ import { useAppDispatch, useAppSelector } from '../../../../hooks';
19
+ import { brandSelector, clearError } from '../../../app/brand/brandStore';
20
+ import { alpha, styled } from '@mui/material/styles';
21
+ export var InputLabelStyled = styled(Text)(function (_a) {
22
+ var theme = _a.theme;
23
+ return (__assign({ margin: theme.spacing(2.5, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
24
+ });
25
+ export var MandatoryStyled = styled('span')(function (_a) {
26
+ var theme = _a.theme;
27
+ return (__assign(__assign({ color: alpha(theme.palette.error.light, 0.4) }, theme.typography.h6), { fontWeight: theme.typography.fontWeightLight, verticalAlign: 'sub' }));
28
+ });
29
+ var OperationStartDate = function (_a) {
30
+ var _b;
31
+ var onDateClicked = _a.onDateClicked;
32
+ var t = useTranslation().t;
33
+ var dispatch = useAppDispatch();
34
+ var control = useFormContext().control;
35
+ var error = useAppSelector(brandSelector).error;
36
+ var oDateControl = useController({ control: control, name: 'operationStartDate' });
37
+ var handleOperationStartDateChange = function (data) {
38
+ if (error)
39
+ dispatch(clearError());
40
+ oDateControl.field.onChange(data);
41
+ };
42
+ var dateValue = (_b = oDateControl === null || oDateControl === void 0 ? void 0 : oDateControl.field) === null || _b === void 0 ? void 0 : _b.value;
43
+ return (_jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t('business_start_date'), _jsx(MandatoryStyled, { children: "*" })] }), _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 })] }));
44
+ };
45
+ export default OperationStartDate;
@@ -0,0 +1,36 @@
1
+ import * as React from 'react';
2
+ export declare const ContainerStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
3
+ children?: React.ReactNode;
4
+ component?: React.ElementType<any> | undefined;
5
+ ref?: React.Ref<unknown> | undefined;
6
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
7
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
8
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
9
+ }, 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") | "ref" | "children" | "component" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
10
+ export declare const CheckboxStyled: import("@emotion/styled").StyledComponent<import("../../../../components/CheckBox").CheckboxProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
11
+ export declare const TextStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
12
+ align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
13
+ children?: React.ReactNode;
14
+ classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
15
+ gutterBottom?: boolean | undefined;
16
+ noWrap?: boolean | undefined;
17
+ paragraph?: boolean | undefined;
18
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
19
+ variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | undefined;
20
+ variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2", string>> | undefined;
21
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
22
+ ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
23
+ }, 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>, {}, {}>;
24
+ export declare const LinkStyled: import("@emotion/styled").StyledComponent<Omit<import("@mui/material/Link").LinkBaseProps, "classes"> & {
25
+ children?: React.ReactNode;
26
+ classes?: Partial<import("@mui/material/Link").LinkClasses> | undefined;
27
+ color?: import("@mui/system/styleFunctionSx").ResponsiveStyleValue<string[] | import("csstype").Property.Color | undefined> | ((theme: import("@mui/material/styles").Theme) => import("@mui/system/styleFunctionSx").ResponsiveStyleValue<string[] | import("csstype").Property.Color | undefined>);
28
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
29
+ TypographyClasses?: (Partial<import("@mui/material").TypographyClasses> & Partial<import("@mui/material/styles").ClassNameMap<never>>) | undefined;
30
+ underline?: "none" | "always" | "hover" | undefined;
31
+ variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | undefined;
32
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "key" | keyof React.AnchorHTMLAttributes<HTMLAnchorElement>> & {
33
+ ref?: ((instance: HTMLAnchorElement | null) => void) | React.RefObject<HTMLAnchorElement> | null | undefined;
34
+ }, "type" | 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" | "translate" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "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" | "children" | "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" | "underline" | "variant" | "href" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping" | "download" | "hrefLang" | "media" | "ping" | "rel" | "target" | "referrerPolicy" | "TypographyClasses"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
35
+ declare const RefundPolicy: () => JSX.Element;
36
+ export default RefundPolicy;
@@ -0,0 +1,84 @@
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 Box from '@mui/material/Box';
14
+ import { styled, alpha } from '@mui/material/styles';
15
+ import CheckBox from '../../../../components/CheckBox';
16
+ import Collapse from '../../../../components/Collapse';
17
+ import { useTranslation } from 'react-i18next';
18
+ import { useLanguage } from '../../../../hooks';
19
+ import { useController, useFormContext } from 'react-hook-form';
20
+ import Text from '../../../../components/Text';
21
+ import Link from '@mui/material/Link';
22
+ import Warning from '../../../../components/Warning';
23
+ import { EXTERNAL_LINKS, TAP_WEBSITE } from '../../../../constants';
24
+ import { ScreenContainer } from '../../../shared/Containers';
25
+ import { settingsSelector } from '../../../../app/settings';
26
+ import { useAppSelector } from '../../../../hooks';
27
+ export var ContainerStyled = styled(Box)(function (_a) {
28
+ var theme = _a.theme;
29
+ return ({
30
+ display: 'flex',
31
+ flexDirection: 'row',
32
+ alignItems: 'center',
33
+ padding: theme.spacing(0, 2.5, 1.5, 2.5)
34
+ });
35
+ });
36
+ export var CheckboxStyled = styled(CheckBox)(function (_a) {
37
+ var theme = _a.theme;
38
+ return ({
39
+ margin: theme.spacing(0),
40
+ padding: theme.spacing(0),
41
+ marginInlineEnd: theme.spacing(1),
42
+ color: theme.palette.primary.main,
43
+ '& .MuiSvgIcon-root': {
44
+ fontSize: 30
45
+ },
46
+ '&.Mui-checked': {
47
+ color: theme.palette.text.primary,
48
+ borderRadius: theme.spacing(2.5)
49
+ }
50
+ });
51
+ });
52
+ var CollapseStyled = styled(Collapse)(function () { return ({
53
+ width: '100%'
54
+ }); });
55
+ export var TextStyled = styled(Text)(function (_a) {
56
+ var theme = _a.theme;
57
+ return (__assign({ color: alpha(theme.palette.text.primary, 0.4), fontWeight: theme.typography.fontWeightLight, whiteSpace: 'pre' }, theme.typography.body2));
58
+ });
59
+ export var LinkStyled = styled(Link)(function (_a) {
60
+ var theme = _a.theme;
61
+ return ({
62
+ color: theme.palette.primary.main,
63
+ fontWeight: theme.typography.fontWeightMedium,
64
+ letterSpacing: theme.spacing(0)
65
+ });
66
+ });
67
+ var RefundPolicy = function () {
68
+ var _a;
69
+ var t = useTranslation().t;
70
+ var isAr = useLanguage().isAr;
71
+ var control = useFormContext().control;
72
+ var settingsData = useAppSelector(settingsSelector).data;
73
+ var refundControl = useController({ control: control, name: 'refundPolicy' });
74
+ var refundChecked = refundControl.field.value;
75
+ var warningMessage = (_a = refundControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
76
+ var countryCode = settingsData.businessCountry.iso2.toLowerCase();
77
+ var handleRefundCheckedChange = function (event, checked) {
78
+ refundControl.field.onChange(checked);
79
+ };
80
+ return (_jsxs(ScreenContainer, { children: [_jsxs(ContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: refundChecked, onChange: handleRefundCheckedChange }), _jsxs(TextStyled, { children: [t('agree_on_refund_policy'), _jsx(LinkStyled, __assign({ href: isAr
81
+ ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.REFUND_AR
82
+ : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.REFUND_EN, target: '_blank', underline: 'always' }, { children: t('refund_policy_compliance') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] }));
83
+ };
84
+ export default RefundPolicy;
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ interface TACProps {
3
+ show: boolean;
4
+ }
5
+ declare const _default: React.MemoExoticComponent<({ show }: TACProps) => JSX.Element>;
6
+ export default _default;
@@ -0,0 +1,87 @@
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 * as React from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { useController, useFormContext } from 'react-hook-form';
16
+ import Box from '@mui/material/Box';
17
+ import { styled, alpha } from '@mui/material/styles';
18
+ import Link from '@mui/material/Link';
19
+ import CheckBox from '../../../../components/CheckBox';
20
+ import { ScreenContainer } from '../../../shared/Containers';
21
+ import Text from '../../../../components/Text';
22
+ import Warning from '../../../../components/Warning';
23
+ import { useLanguage } from '../../../../hooks';
24
+ import Collapse from '../../../../components/Collapse';
25
+ import { EXTERNAL_LINKS, TAP_WEBSITE } from '../../../../constants';
26
+ import { settingsSelector } from '../../../../app/settings';
27
+ import { useAppSelector } from '../../../../hooks';
28
+ var TACContainerStyled = styled(Box)(function (_a) {
29
+ var theme = _a.theme;
30
+ return ({
31
+ display: 'flex',
32
+ flexDirection: 'row',
33
+ alignItems: 'center',
34
+ paddingInlineStart: theme.spacing(2.5),
35
+ paddingBlockEnd: theme.spacing(1.5)
36
+ });
37
+ });
38
+ var TextStyled = styled(Text)(function (_a) {
39
+ var theme = _a.theme;
40
+ return (__assign({ color: alpha(theme.palette.text.primary, 0.4), fontWeight: theme.typography.fontWeightLight, whiteSpace: 'pre-line', height: 'fit-content' }, theme.typography.body2));
41
+ });
42
+ var LinkStyled = styled(Link)(function (_a) {
43
+ var theme = _a.theme;
44
+ return ({
45
+ color: theme.palette.primary.main,
46
+ fontWeight: theme.typography.fontWeightMedium,
47
+ letterSpacing: theme.spacing(0)
48
+ });
49
+ });
50
+ var CheckboxStyled = styled(CheckBox)(function (_a) {
51
+ var theme = _a.theme;
52
+ return ({
53
+ margin: theme.spacing(0),
54
+ padding: theme.spacing(0),
55
+ marginInlineEnd: theme.spacing(1.5),
56
+ color: theme.palette.primary.main,
57
+ '& .MuiSvgIcon-root': {
58
+ fontSize: theme.spacing(3.75)
59
+ },
60
+ '&.Mui-checked': {
61
+ color: theme.palette.text.primary,
62
+ borderRadius: theme.spacing(2.5)
63
+ }
64
+ });
65
+ });
66
+ var CollapseStyled = styled(Collapse)(function () { return ({
67
+ width: '100%'
68
+ }); });
69
+ var TAC = function (_a) {
70
+ var _b;
71
+ var show = _a.show;
72
+ var t = useTranslation().t;
73
+ var isAr = useLanguage().isAr;
74
+ var control = useFormContext().control;
75
+ var settingsData = useAppSelector(settingsSelector).data;
76
+ var tacControl = useController({ control: control, name: 'termAndConditionChecked' });
77
+ var tacChecked = tacControl.field.value;
78
+ var warningMessage = (_b = tacControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
79
+ var countryCode = settingsData.businessCountry.iso2.toLowerCase();
80
+ var handleTACCheckedChange = function (event, checked) {
81
+ tacControl.field.onChange(checked);
82
+ };
83
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.75 } }, { children: [_jsxs(TACContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: tacChecked, onChange: handleTACCheckedChange }), _jsxs(TextStyled, { children: [t('read_agree_terms_and_conditions_message'), _jsx(LinkStyled, __assign({ href: isAr
84
+ ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_AR
85
+ : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_EN, target: '_blank', underline: 'always' }, { children: t('terms_and_conditions_link_title') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] })) })));
86
+ };
87
+ export default React.memo(TAC);
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const TransactionPolicy: () => JSX.Element;
3
+ export default TransactionPolicy;
@@ -0,0 +1,44 @@
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 { styled } from '@mui/material/styles';
14
+ import Collapse from '../../../../components/Collapse';
15
+ import { useTranslation } from 'react-i18next';
16
+ import { useLanguage } from '../../../../hooks';
17
+ import { useController, useFormContext } from 'react-hook-form';
18
+ import Warning from '../../../../components/Warning';
19
+ import { EXTERNAL_LINKS, TAP_WEBSITE } from '../../../../constants';
20
+ import { ContainerStyled, CheckboxStyled, TextStyled, LinkStyled } from './RefundPolicy';
21
+ import { ScreenContainer } from '../../../shared/Containers';
22
+ import { settingsSelector } from '../../../../app/settings';
23
+ import { useAppSelector } from '../../../../hooks';
24
+ var CollapseStyled = styled(Collapse)(function () { return ({
25
+ width: '100%'
26
+ }); });
27
+ var TransactionPolicy = function () {
28
+ var _a;
29
+ var t = useTranslation().t;
30
+ var isAr = useLanguage().isAr;
31
+ var control = useFormContext().control;
32
+ var settingsData = useAppSelector(settingsSelector).data;
33
+ var transactionControl = useController({ control: control, name: 'transactionPolicy' });
34
+ var transactionChecked = transactionControl.field.value;
35
+ var warningMessage = (_a = transactionControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
36
+ var countryCode = settingsData.businessCountry.iso2.toLowerCase();
37
+ var handleTransactionCheckedChange = function (event, checked) {
38
+ transactionControl.field.onChange(checked);
39
+ };
40
+ return (_jsxs(ScreenContainer, { children: [_jsxs(ContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: transactionChecked, onChange: handleTransactionCheckedChange }), _jsxs(TextStyled, { children: [t('agree_on_chargeback_policy'), _jsx(LinkStyled, __assign({ href: isAr
41
+ ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TRANSACTION_AR
42
+ : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TRANSACTION_EN, target: '_blank', underline: 'always' }, { children: t('chargeback_policy') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] }));
43
+ };
44
+ export default TransactionPolicy;
@@ -0,0 +1,2 @@
1
+ import BrandActivities from './BrandActivities';
2
+ export default BrandActivities;
@@ -0,0 +1,2 @@
1
+ import BrandActivities from './BrandActivities';
2
+ export default BrandActivities;
@@ -0,0 +1,71 @@
1
+ import * as yup from 'yup';
2
+ export declare const BrandActivitiesValidationSchema: 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
+ customerLocations: import("yup/lib/array").RequiredArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined>;
20
+ expectedCustomers: any;
21
+ expectedSalesRange: any;
22
+ termAndConditionChecked: import("yup/lib/boolean").RequiredBooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject>;
23
+ refundPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
24
+ transactionPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
25
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
26
+ activities: yup.ArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
27
+ ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
28
+ en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
29
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
30
+ ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
31
+ en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
32
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
33
+ ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
34
+ en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
35
+ }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
36
+ ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
37
+ en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
38
+ }>>[] | undefined, import("yup/lib/object").AssertsShape<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
+ }>>[] | undefined>;
42
+ customerLocations: import("yup/lib/array").RequiredArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined>;
43
+ expectedCustomers: any;
44
+ expectedSalesRange: any;
45
+ termAndConditionChecked: import("yup/lib/boolean").RequiredBooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject>;
46
+ refundPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
47
+ transactionPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
48
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
49
+ activities: yup.ArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
50
+ ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
51
+ en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
52
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
53
+ ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
54
+ en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
55
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
56
+ ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
57
+ en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
58
+ }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
59
+ ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
60
+ en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
61
+ }>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
62
+ ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
63
+ en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
64
+ }>>[] | undefined>;
65
+ customerLocations: import("yup/lib/array").RequiredArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined>;
66
+ expectedCustomers: any;
67
+ expectedSalesRange: any;
68
+ termAndConditionChecked: import("yup/lib/boolean").RequiredBooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject>;
69
+ refundPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
70
+ transactionPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
71
+ }>>>;
@@ -0,0 +1,21 @@
1
+ import * as yup from 'yup';
2
+ var objectElements = {
3
+ id: yup.number(),
4
+ name_ar: yup.string(),
5
+ name_en: yup.string()
6
+ };
7
+ export var BrandActivitiesValidationSchema = yup.object().shape({
8
+ activities: yup
9
+ .array()
10
+ .min(1, 'activities_list_alert')
11
+ .of(yup.object().shape({
12
+ ar: yup.string(),
13
+ en: yup.string()
14
+ })),
15
+ customerLocations: yup.array().required('please_choose_base'),
16
+ expectedCustomers: yup.object().shape(objectElements).required('select_expected_customers_serve'),
17
+ expectedSalesRange: yup.object().shape(objectElements).required('select_expected_sales'),
18
+ termAndConditionChecked: yup.boolean().isTrue('check_terms_cond').required('check_terms_cond'),
19
+ refundPolicy: yup.boolean().required().isTrue('refund_policy_error'),
20
+ transactionPolicy: yup.boolean().required().isTrue('transaction_policy_error')
21
+ });
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export interface BrandProps {
3
+ }
4
+ declare const BrandInfo: ({}: BrandProps) => JSX.Element;
5
+ export default BrandInfo;