@tap-payments/auth-jsconnect 1.0.71 → 1.0.72

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.
@@ -53,7 +53,15 @@ export interface CustomerLocation {
53
53
  }
54
54
  export interface ExpectedCustomer extends CustomerLocation {
55
55
  }
56
- export interface ExpectedSaleRange extends CustomerLocation {
56
+ export interface ExpectedSaleRange {
57
+ id: string;
58
+ name_ar: string;
59
+ name_en: string;
60
+ sub?: Array<{
61
+ id: string;
62
+ name_ar: string;
63
+ name_en: string;
64
+ }>;
57
65
  }
58
66
  export declare enum BusinessType {
59
67
  CR = "company",
@@ -41,7 +41,7 @@ export declare type ActivitiesFormValues = {
41
41
  export declare type CustomersFormValues = {
42
42
  customerLocations: Array<CustomerLocation>;
43
43
  expectedCustomer: ExpectedCustomer | undefined;
44
- expectedSalesRange: ExpectedSaleRange | undefined;
44
+ expectedSale: ExpectedSaleRange | undefined;
45
45
  refundPolicy: boolean;
46
46
  transactionPolicy: boolean;
47
47
  };
@@ -224,16 +224,20 @@
224
224
  "add_other_cr": "Add CR",
225
225
  "cr_number": "CR Number",
226
226
  "fl_number": "FL Number",
227
- "tax_flow_completed": "Tax",
228
- "individual_flow_completed": "Individual",
229
- "bank_flow_completed": "Bank",
227
+ "tax_flow_completed": "Tax {{tax_id}}",
228
+ "individual_flow_completed": "Individual {{individual_name}}",
229
+ "bank_flow_completed": "Bank {{iban}}",
230
230
  "password_flow_completed": "Password",
231
231
  "tax_flow_pending": "Tax",
232
232
  "individual_flow_pending": "Individual",
233
233
  "bank_flow_pending": "Bank",
234
234
  "password_flow_pending": "Password",
235
235
  "business_flow_pending": "Business",
236
- "business_flow_completed": "Business",
236
+ "business_flow_completed": "{{business_type}} {{license_number}}",
237
237
  "continue": "Continue",
238
- "search_placeholder": "البحث..."
238
+ "search_placeholder": "البحث...",
239
+ "individual_success_title": "Your personal details are updated",
240
+ "tax_success_title": "Your tax details are updated",
241
+ "bank_success_title": "Your bank details are updated",
242
+ "password_success_title": "Your password is set"
239
243
  }
@@ -238,16 +238,26 @@
238
238
  "add_other_cr": "Add CR",
239
239
  "cr_number": "CR Number",
240
240
  "fl_number": "FL Number",
241
- "tax_flow_completed": "Tax",
241
+ "tax_flow_completed": "Tax {{tax_id}}",
242
242
  "individual_flow_completed": "Individual {{individual_name}}",
243
- "bank_flow_completed": "Bank",
243
+ "bank_flow_completed": "{{bank_name}} {{iban}}",
244
244
  "password_flow_completed": "Password",
245
245
  "tax_flow_pending": "Tax",
246
246
  "individual_flow_pending": "Individual {{individual_name}}",
247
247
  "bank_flow_pending": "Bank",
248
248
  "password_flow_pending": "Password",
249
249
  "business_flow_pending": "Business",
250
- "business_flow_completed": "Business",
250
+ "business_flow_completed": "{{business_type}} {{license_number}}",
251
251
  "continue": "Continue",
252
- "search_placeholder": "search.."
252
+ "search_placeholder": "search..",
253
+ "connect_completed_title": "Congratulations",
254
+ "connect_completed_description": "You successfully signed up your brand with Tap. Check your email to activate your account.",
255
+ "business_completed_title": "Your account is active",
256
+ "business_completed_description": "That was easy! You’re all set to accept payments. One last thing, add your bank and tax info to start receiving your payouts.",
257
+ "business_completed_button": "Finish setting up my account",
258
+ "individual_success_title": "Your personal details are updated",
259
+ "tax_success_title": "Your tax details are updated",
260
+ "bank_success_title": "Your bank details are updated",
261
+ "password_success_title": "Your password is set",
262
+ "account_details": "Your account details"
253
263
  }
@@ -58,8 +58,8 @@ var ListItemStyled = styled(ListItem)(function (_a) {
58
58
  var theme = _a.theme;
59
59
  return ({
60
60
  display: 'flex',
61
- paddingLeft: theme.spacing(2.5),
62
- paddingRight: theme.spacing(2.5),
61
+ paddingInlineStart: theme.spacing(2.5),
62
+ paddingInlineEnd: theme.spacing(2.5),
63
63
  paddingTop: theme.spacing(1),
64
64
  paddingBottom: theme.spacing(1.875),
65
65
  cursor: 'pointer',
@@ -16,7 +16,7 @@ var CHECK_BRAND = 'lead/profile/profile_name';
16
16
  var CREATE_ACCOUNT_PATH = '/account/create';
17
17
  var CHANNEL_PATH = '/channel';
18
18
  var CUSTOMER_BASES_PATH = '/customerBases';
19
- var SALES_PATH = '/sales';
19
+ var SALES_PATH = '/v2/sales';
20
20
  var EXPECTED_CUSTOMERS_PATH = '/expectedCustomers';
21
21
  var SOURCE_INCOME_PATH = '/v2/sourceOfIncome';
22
22
  var FIREBASE_URL = 'https://goconnect-195cd-default-rtdb.asia-southeast1.firebasedatabase.app/sandbox/local.json';
@@ -36,6 +36,7 @@ export declare const ICONS_NAMES: {
36
36
  EMAIL_ICON: string;
37
37
  MOBILE_ICON: string;
38
38
  SEARCH_ICON: string;
39
+ SUCCESS_GIF: string;
39
40
  GMAIL_Filled_ICON: string;
40
41
  GMAIL_White_ICON: string;
41
42
  outlook_Filled_ICON: string;
@@ -36,6 +36,7 @@ export var ICONS_NAMES = {
36
36
  EMAIL_ICON: 'https://dash.b-cdn.net/icons/menu/email.png',
37
37
  MOBILE_ICON: 'https://dash.b-cdn.net/icons/menu/mobile.svg',
38
38
  SEARCH_ICON: 'https://dash.b-cdn.net/icons/menu/search-icon.svg',
39
+ SUCCESS_GIF: 'https://dash.b-cdn.net/icons/menu/success-icon.gif',
39
40
  GMAIL_Filled_ICON: 'https://dash.b-cdn.net/icons/menu/Gmail-filled.svg',
40
41
  GMAIL_White_ICON: 'https://dash.b-cdn.net/icons/menu/Gmail-white.svg',
41
42
  outlook_Filled_ICON: 'https://dash.b-cdn.net/icons/menu/Outlook-filled.svg',
@@ -334,7 +334,7 @@ export var updateCustomersInfo = createAsyncThunk('updateCustomersInfo', functio
334
334
  customers_base: customerBase,
335
335
  id: id,
336
336
  customers_served_monthly: parseInt(((_c = params.expectedCustomer) === null || _c === void 0 ? void 0 : _c.id) || '0'),
337
- yearly_sales_range: ((_d = params.expectedSalesRange) === null || _d === void 0 ? void 0 : _d.title) || '',
337
+ yearly_sales_range: ((_d = params.expectedSale) === null || _d === void 0 ? void 0 : _d.id) || '',
338
338
  agree_refund: params.refundPolicy,
339
339
  agree_chargeback: params.transactionPolicy,
340
340
  step_name: stepName
@@ -443,7 +443,7 @@ var initialState = {
443
443
  customersData: {
444
444
  customerLocations: [],
445
445
  expectedCustomer: undefined,
446
- expectedSalesRange: undefined,
446
+ expectedSale: undefined,
447
447
  refundPolicy: false,
448
448
  transactionPolicy: false
449
449
  }
@@ -581,11 +581,14 @@ export var businessSlice = createSlice({
581
581
  }
582
582
  licenseList = __spreadArray(__spreadArray([], licenseList, true), [OTHER_CR_LICENSE, OTHER_FL_LICENSE], false);
583
583
  state.data.businessTypeData.responseBody = { licenseList: licenseList };
584
- var selectedLicense = ((_b = licenseList === null || licenseList === void 0 ? void 0 : licenseList.find) === null || _b === void 0 ? void 0 : _b.call(licenseList, function (item) { var _a; return ((_a = item.license) === null || _a === void 0 ? void 0 : _a.number) === licenseNumber; })) || (licenseList === null || licenseList === void 0 ? void 0 : licenseList[0]);
585
- state.data.businessTypeData.selectedLicense = selectedLicense;
584
+ var selectedLicense = (_b = licenseList === null || licenseList === void 0 ? void 0 : licenseList.find) === null || _b === void 0 ? void 0 : _b.call(licenseList, function (_a) {
585
+ var license = _a.license;
586
+ return (license === null || license === void 0 ? void 0 : license.number) === licenseNumber;
587
+ });
588
+ state.data.businessTypeData.selectedLicense = selectedLicense || (licenseList === null || licenseList === void 0 ? void 0 : licenseList[0]);
586
589
  var isOtherLicense = ((_c = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _c === void 0 ? void 0 : _c.number) === 'other_fl' || ((_d = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _d === void 0 ? void 0 : _d.number) === 'other_cr';
587
590
  if (!isOtherLicense)
588
- state.data.businessTypeData.licenseNumber = (_e = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _e === void 0 ? void 0 : _e.number;
591
+ state.data.businessTypeData.licenseNumber = ((_e = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _e === void 0 ? void 0 : _e.number) || '';
589
592
  })
590
593
  .addCase(retrieveEntityList.rejected, function (state, action) {
591
594
  state.error = action.error.message;
@@ -596,10 +599,10 @@ export var businessSlice = createSlice({
596
599
  state.error = null;
597
600
  })
598
601
  .addCase(updateLeadBusinessType.fulfilled, function (state, action) {
599
- var _a, _b, _c, _d;
602
+ var _a, _b;
600
603
  state.loading = false;
601
604
  state.error = null;
602
- var _e = action.payload, data = _e.data, formData = _e.formData;
605
+ var _c = action.payload, data = _c.data, formData = _c.formData;
603
606
  var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
604
607
  if (description) {
605
608
  state.error = description;
@@ -607,8 +610,10 @@ export var businessSlice = createSlice({
607
610
  }
608
611
  state.data.businessTypeData = __assign(__assign({}, state.data.businessTypeData), formData);
609
612
  var entity = data.entity, entity_activities = data.entity_activities;
610
- if (!!((_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date)) {
611
- state.data.activitiesData.operationStartDate = convertNumbers2English(moment((_d = (_c = data === null || data === void 0 ? void 0 : data.entity) === null || _c === void 0 ? void 0 : _c.license) === null || _d === void 0 ? void 0 : _d.issuing_date).format('YYYY-MM-DD'));
613
+ var issuingDate = (_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date;
614
+ if (!!issuingDate) {
615
+ var formattedDate = moment(issuingDate).format('YYYY-MM-DD');
616
+ state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
612
617
  }
613
618
  var activities = entity_activities || [];
614
619
  var selectedActivity = activities === null || activities === void 0 ? void 0 : activities[0];
@@ -676,18 +681,20 @@ export var businessSlice = createSlice({
676
681
  .addCase(retrieveDataList.fulfilled, function (state, action) {
677
682
  state.loading = false;
678
683
  state.error = null;
679
- var _a = action.payload, customerBases = _a.customerBases, expectedSales = _a.expectedSales, expectedCustomerSales = _a.expectedCustomerSales;
680
- var data = state.data.activitiesData.responseBody;
681
- state.data.activitiesData.responseBody = __assign(__assign({}, data), { customerBases: customerBases || [], expectedSales: expectedSales || [], expectedCustomerSales: expectedCustomerSales || [] });
682
- var selectedCustomerBase = customerBases === null || customerBases === void 0 ? void 0 : customerBases[0];
683
- if (!!selectedCustomerBase)
684
- state.data.customersData.customerLocations = [selectedCustomerBase];
685
- var selectedExpectedSale = expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales[(expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales.length) - 1];
686
- if (!!selectedExpectedSale)
687
- state.data.customersData.expectedSalesRange = selectedExpectedSale;
688
- var selectedExpectedCustomerSale = expectedCustomerSales === null || expectedCustomerSales === void 0 ? void 0 : expectedCustomerSales[(expectedCustomerSales === null || expectedCustomerSales === void 0 ? void 0 : expectedCustomerSales.length) - 1];
689
- if (!!selectedExpectedCustomerSale)
690
- state.data.customersData.expectedCustomer = selectedExpectedCustomerSale;
684
+ var payload = action.payload;
685
+ var customerBases = payload.customerBases || [];
686
+ var customerBase = customerBases === null || customerBases === void 0 ? void 0 : customerBases[0];
687
+ var expectedSales = payload.expectedSales || [];
688
+ var expectedSale = expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales[expectedSales.length - 1];
689
+ var expectedCustomerSales = payload.expectedCustomerSales || [];
690
+ var expectedCustomerSale = expectedCustomerSales === null || expectedCustomerSales === void 0 ? void 0 : expectedCustomerSales[expectedCustomerSales.length - 1];
691
+ state.data.activitiesData.responseBody = __assign(__assign({}, state.data.activitiesData.responseBody), { customerBases: customerBases, expectedSales: expectedSales, expectedCustomerSales: expectedCustomerSales });
692
+ if (!!customerBase)
693
+ state.data.customersData.customerLocations = [customerBase];
694
+ if (!!expectedSale)
695
+ state.data.customersData.expectedSale = expectedSale;
696
+ if (!!expectedCustomerSale)
697
+ state.data.customersData.expectedCustomer = expectedCustomerSale;
691
698
  })
692
699
  .addCase(retrieveDataList.rejected, function (state, action) {
693
700
  state.loading = false;
@@ -11,6 +11,6 @@ var Success = function (_a) {
11
11
  dispatch(updateLeadSuccess());
12
12
  }, []);
13
13
  var onSuccess = function () { };
14
- return _jsx(SuccessScreen, { title: t('ide_successfully_updated_message'), onSuccess: onSuccess, successTitle: 'continue' });
14
+ return _jsx(SuccessScreen, { title: t('bank_success_title'), onSuccess: onSuccess, successTitle: t('continue') });
15
15
  };
16
16
  export default React.memo(Success);
@@ -30,7 +30,7 @@ export declare const NameContainer: import("@emotion/styled").StyledComponent<im
30
30
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
31
31
  ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
32
32
  }, 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> & {
33
- isSelected: boolean;
33
+ isSelected?: boolean | undefined;
34
34
  }, {}, {}>;
35
35
  export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
36
36
  children?: React.ReactNode;
@@ -51,7 +51,7 @@ var Customers = function (_a) {
51
51
  mode: 'onChange'
52
52
  });
53
53
  var onSubmit = function (data) {
54
- dispatch(updateCustomersInfo(__assign({}, data)));
54
+ dispatch(updateCustomersInfo(data));
55
55
  };
56
56
  var onBack = function () {
57
57
  dispatch(handlePrevScreenStep());
@@ -66,11 +66,11 @@ var Customers = function (_a) {
66
66
  dispatch(clearError());
67
67
  }, [methods.formState.isValid]);
68
68
  React.useEffect(function () {
69
- var customerLocations = customerData.customerLocations, expectedCustomer = customerData.expectedCustomer, expectedSalesRange = customerData.expectedSalesRange;
69
+ var customerLocations = customerData.customerLocations, expectedCustomer = customerData.expectedCustomer, expectedSale = customerData.expectedSale;
70
70
  methods.setValue('customerLocations', customerLocations);
71
71
  methods.setValue('expectedCustomer', expectedCustomer);
72
- methods.setValue('expectedSalesRange', expectedSalesRange);
73
- }, [customerData.customerLocations, customerData.expectedCustomer, customerData.expectedSalesRange]);
72
+ methods.setValue('expectedSale', expectedSale);
73
+ }, [customerData.customerLocations, customerData.expectedCustomer, customerData.expectedSale]);
74
74
  var isCustomerLocationsListActive = listActive === ListType.CustomerLocationsList;
75
75
  var isExpectedCustomersListActive = listActive === ListType.ExpectedCustomersList;
76
76
  var isExpectedSalesListActive = listActive === ListType.ExpectedSalesList;
@@ -4,5 +4,5 @@ interface ExpectedSalesRangeProps {
4
4
  onListOpen?: () => void;
5
5
  onListClose?: () => void;
6
6
  }
7
- declare const ExpectedSalesRange: ({ ...rest }: ExpectedSalesRangeProps) => JSX.Element;
7
+ declare const ExpectedSalesRange: ({ show, onListClose, onListOpen }: ExpectedSalesRangeProps) => JSX.Element;
8
8
  export default ExpectedSalesRange;
@@ -9,18 +9,7 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
13
  import * as React from 'react';
25
14
  import Box from '@mui/material/Box';
26
15
  import { styled } from '@mui/material/styles';
@@ -33,47 +22,67 @@ import ExpandIcon from '../../../../components/ExpandIcon';
33
22
  import { ScreenContainer } from '../../../shared/Containers';
34
23
  import { InputLabelStyled, CheckIconStyled, InputStyled, NameContainer } from './CustomerLocations';
35
24
  import { businessSelector } from '../../../../features/app/business/businessStore';
25
+ var ListItem = styled(Box)(function () { return ({
26
+ display: 'flex',
27
+ justifyContent: 'space-between',
28
+ width: '100%'
29
+ }); });
36
30
  var ListItemContainer = styled(Box)(function () { return ({
37
- display: 'flex'
31
+ display: 'flex',
32
+ flexDirection: 'column',
33
+ width: '100%'
38
34
  }); });
39
35
  var SimpleListStyled = styled((SimpleList))(function () { return ({
40
36
  height: 'fit-content'
41
37
  }); });
42
38
  var ExpectedSalesRange = function (_a) {
43
- var rest = __rest(_a, []);
39
+ var show = _a.show, onListClose = _a.onListClose, onListOpen = _a.onListOpen;
44
40
  var _b = React.useState([]), expectedSalesRangeList = _b[0], setExpectedSalesRangeList = _b[1];
45
41
  var _c = React.useState(null), anchorEl = _c[0], setAnchorEl = _c[1];
42
+ var _d = React.useState(''), subIndex = _d[0], setSubIndex = _d[1];
46
43
  var t = useTranslation().t;
47
44
  var isAr = useLanguage().isAr;
48
45
  var control = useFormContext().control;
49
- var expectedSalesRangeControl = useController({ name: 'expectedSalesRange', control: control });
46
+ var expectedSaleControl = useController({ name: 'expectedSale', control: control });
50
47
  var data = useAppSelector(businessSelector).data;
51
48
  var activitiesData = data.activitiesData;
52
- var response = activitiesData.responseBody;
53
- var onOpenList = function (event) {
54
- var _a;
49
+ var expectedSales = (activitiesData.responseBody || {}).expectedSales;
50
+ var handleOpenMainMenu = function (event) {
55
51
  setAnchorEl(event.currentTarget);
56
- (_a = rest.onListOpen) === null || _a === void 0 ? void 0 : _a.call(rest);
52
+ onListOpen === null || onListOpen === void 0 ? void 0 : onListOpen();
57
53
  };
58
- var onCloseList = function () {
59
- var _a;
54
+ var handleCloseMainMenu = function () {
60
55
  setAnchorEl(null);
61
- (_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
56
+ onListClose === null || onListClose === void 0 ? void 0 : onListClose();
57
+ handleCloseSubMenu();
58
+ };
59
+ var handleOpenSubMenu = function (index) {
60
+ if (subIndex === index)
61
+ setSubIndex('');
62
+ else
63
+ setSubIndex(index);
64
+ };
65
+ var handleCloseSubMenu = function () {
66
+ setSubIndex('');
62
67
  };
63
68
  React.useEffect(function () {
64
- var _a;
65
- if (((_a = response === null || response === void 0 ? void 0 : response.expectedSales) === null || _a === void 0 ? void 0 : _a.length) > 0) {
66
- setExpectedSalesRangeList(response === null || response === void 0 ? void 0 : response.expectedSales);
69
+ console.log(expectedSales);
70
+ if ((expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales.length) > 0) {
71
+ setExpectedSalesRangeList(expectedSales);
67
72
  }
68
- }, [response === null || response === void 0 ? void 0 : response.expectedSales]);
73
+ }, [expectedSales]);
69
74
  var onSelectItem = function (expectedSalesRange) {
70
- onCloseList();
71
- expectedSalesRangeControl.field.onChange(expectedSalesRange);
75
+ handleCloseMainMenu();
76
+ expectedSaleControl.field.onChange(expectedSalesRange);
72
77
  };
73
- var expectedSalesRangeValue = expectedSalesRangeControl.field.value || expectedSalesRangeList;
74
- var expectedSalesRangeSelected = expectedSalesRangeValue;
75
- 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.titleAr : expectedSalesRangeSelected === null || expectedSalesRangeSelected === void 0 ? void 0 : expectedSalesRangeSelected.title, 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) {
76
- 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, {})] }));
78
+ var expectedSalesRangeValue = expectedSaleControl.field.value;
79
+ 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 }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { list: expectedSalesRangeList, onSelectItem: function (_a) {
80
+ var id = _a.id;
81
+ return handleOpenSubMenu(id);
82
+ }, renderItem: function (item) {
83
+ return (_jsxs(ListItemContainer, { children: [_jsxs(ListItem, { children: [_jsx(NameContainer, { children: isAr ? item.name_ar : item.name_en }), _jsx(ExpandIcon, { anchorEl: item.id === subIndex })] }), _jsx(Collapse, __assign({ in: item.id === subIndex, timeout: 300 }, { children: _jsx(SimpleListStyled, { list: item.sub || [], onSelectItem: onSelectItem, listItemProps: { sx: { paddingInlineEnd: 0 } }, renderItem: function (item, idx) {
84
+ 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, {})] })));
85
+ } }) }))] }));
77
86
  } }) }))] }) })));
78
87
  };
79
88
  export default ExpectedSalesRange;
@@ -15,6 +15,6 @@ var Success = function (_a) {
15
15
  var onSuccess = function () {
16
16
  dispatch(handleNextScreenStep());
17
17
  };
18
- return (_jsx(SuccessScreen, { title: t('ide_successfully_verified_message'), onSuccess: onSuccess, successTitle: 'continue', disabledSuccessButton: loading }));
18
+ return (_jsx(SuccessScreen, { title: t('business_completed_title'), description: t('business_completed_description'), onSuccess: onSuccess, successTitle: t('business_completed_button'), disabledSuccessButton: loading }));
19
19
  };
20
20
  export default React.memo(Success);
@@ -20,20 +20,9 @@ import { FlowsButtons } from '../../../shared/Button';
20
20
  import { ICONS_NAMES } from '../../../../constants';
21
21
  import { useAppSelector, useLanguage } from '../../../../hooks';
22
22
  import { businessSelector } from '../../../app/business/businessStore';
23
- var TextContainerStyled = styled(Box)(function (_a) {
24
- var theme = _a.theme;
25
- return ({
26
- background: theme.palette.common.white,
27
- border: '1px solid',
28
- width: '100%',
29
- borderColor: theme.palette.divider,
30
- borderRadius: theme.spacing(0, 0, 1.25, 1.25),
31
- marginBottom: theme.spacing(7.5)
32
- });
33
- });
34
23
  var TitleStyled = styled(Text)(function (_a) {
35
24
  var theme = _a.theme;
36
- return (__assign({ fontWeight: theme.typography.fontWeightRegular, color: theme.palette.text.primary, marginBlock: theme.spacing(1.75), lineHeight: 1.75, padding: '0px 20px' }, theme.typography.subtitle2));
25
+ return (__assign(__assign({}, theme.typography.body1), { fontWeight: theme.typography.fontWeightBold, color: theme.palette.text.primary, marginBlockEnd: theme.spacing(2.375), marginBlockStart: theme.spacing(2.875), lineHeight: 1.75, padding: '0px 20px' }));
37
26
  });
38
27
  var ContainerStyled = styled(Container)(function (_a) {
39
28
  var theme = _a.theme;
@@ -62,7 +51,14 @@ var SuccessWithFlowButtons = function () {
62
51
  var mappedFlows = flows.map(function (_a) {
63
52
  var name = _a.name, url = _a.url, status = _a.status;
64
53
  var type = status === 'initiated' ? 'pending' : 'completed';
65
- var title = t("".concat(name, "_flow_").concat(type), { individual_name: username });
54
+ var title = t("".concat(name, "_flow_").concat(type), {
55
+ individual_name: username,
56
+ business_type: 'placeholder',
57
+ license_number: 'xxxxxx0000',
58
+ bank_name: 'placeholder',
59
+ iban: 'xxxxxx0000',
60
+ tax_id: 'xxxxxx0000'
61
+ });
66
62
  var isCompleted = status === 'completed' && name !== 'password';
67
63
  var src = isCompleted ? "".concat(name, "_green_icon") : "".concat(name, "_filled_icon");
68
64
  var hoverSrc = "".concat(name, "_white_icon");
@@ -80,6 +76,6 @@ var SuccessWithFlowButtons = function () {
80
76
  if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0)
81
77
  reMapFlowData(flows);
82
78
  }, [flows, isAr]);
83
- return (_jsxs(ContainerStyled, { children: [_jsx(TextContainerStyled, { children: _jsxs(TitleStyled, { children: [t('ide_successfully_verified_message'), " "] }) }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons }) })] }));
79
+ return (_jsxs(ContainerStyled, { children: [_jsxs(TitleStyled, { children: [t('account_details'), " "] }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons }) })] }));
84
80
  };
85
81
  export default memo(SuccessWithFlowButtons);
@@ -10,6 +10,6 @@ var ThankYou = function (_a) {
10
10
  React.useEffect(function () {
11
11
  dispatch(updateLeadSuccess());
12
12
  }, []);
13
- return _jsx(SuccessScreen, { title: t('ide_successfully_verified_message'), showEmailProviders: true });
13
+ return (_jsx(SuccessScreen, { title: t("connect_completed_title"), description: t("connect_completed_description"), showEmailProviders: true }));
14
14
  };
15
15
  export default React.memo(ThankYou);
@@ -11,6 +11,6 @@ var Success = function (_a) {
11
11
  dispatch(updateLeadSuccess());
12
12
  }, []);
13
13
  var onSuccess = function () { };
14
- return _jsx(SuccessScreen, { title: t('ide_successfully_updated_message'), onSuccess: onSuccess, successTitle: 'continue' });
14
+ return _jsx(SuccessScreen, { title: t('individual_success_title'), onSuccess: onSuccess, successTitle: t('continue') });
15
15
  };
16
16
  export default React.memo(Success);
@@ -5,6 +5,6 @@ import SuccessScreen from '../../../shared/SuccessScreen';
5
5
  var Success = function (_a) {
6
6
  var t = useTranslation().t;
7
7
  var onSuccess = function () { };
8
- return _jsx(SuccessScreen, { title: t('ide_successfully_updated_message'), onSuccess: onSuccess, successTitle: 'continue' });
8
+ return _jsx(SuccessScreen, { title: t('password_success_title'), onSuccess: onSuccess, successTitle: t('continue') });
9
9
  };
10
10
  export default React.memo(Success);
@@ -5,6 +5,7 @@ export interface ThankYouProps {
5
5
  showEmailProviders?: boolean;
6
6
  successTitle?: string;
7
7
  disabledSuccessButton?: boolean;
8
+ description?: string;
8
9
  }
9
- declare const _default: React.MemoExoticComponent<({ title, showEmailProviders, onSuccess, successTitle, disabledSuccessButton }: ThankYouProps) => JSX.Element>;
10
+ declare const _default: React.MemoExoticComponent<({ title, description, showEmailProviders, onSuccess, successTitle, disabledSuccessButton }: ThankYouProps) => JSX.Element>;
10
11
  export default _default;
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import Box from '@mui/material/Box/Box';
14
14
  import { styled } from '@mui/material/styles';
15
15
  import * as React from 'react';
@@ -23,24 +23,13 @@ import { useLanguage } from '../../../hooks';
23
23
  var MailBoxStyled = styled(Box)(function () { return ({
24
24
  width: '100%'
25
25
  }); });
26
- var TextContainerStyled = styled(Box)(function (_a) {
27
- var _b;
26
+ var TitleStyled = styled(Text)(function (_a) {
28
27
  var theme = _a.theme;
29
- return (_b = {
30
- background: theme.palette.common.white,
31
- border: '1px solid',
32
- width: '100%',
33
- borderColor: theme.palette.divider,
34
- borderRadius: theme.spacing(0, 0, 1.25, 1.25)
35
- },
36
- _b[theme.breakpoints.up('sm')] = {
37
- marginBottom: theme.spacing(7.5)
38
- },
39
- _b);
28
+ return (__assign(__assign({}, theme.typography.body1), { fontWeight: theme.typography.fontWeightBold, color: theme.palette.text.primary, marginBlockEnd: theme.spacing(2.375), lineHeight: 1.75, padding: '0px 20px' }));
40
29
  });
41
- var TitleStyled = styled(Text)(function (_a) {
30
+ var DescriptionStyled = styled(Text)(function (_a) {
42
31
  var theme = _a.theme;
43
- return (__assign({ fontWeight: theme.typography.fontWeightRegular, color: theme.palette.text.primary, marginBlock: theme.spacing(1.75), lineHeight: 1.75, padding: '0px 20px' }, theme.typography.subtitle2));
32
+ return (__assign(__assign({}, theme.typography.subtitle2), { fontWeight: theme.typography.fontWeightMedium, textAlign: 'center', color: theme.palette.text.primary, marginBlockEnd: theme.spacing(3.75), lineHeight: theme.spacing(2.125), padding: theme.spacing(0, 3.75) }));
44
33
  });
45
34
  var ContainerStyled = styled(Container)(function (_a) {
46
35
  var theme = _a.theme;
@@ -56,17 +45,17 @@ var IconStyled = styled(Icon)(function (_a) {
56
45
  return (_b = {
57
46
  width: theme.spacing(10),
58
47
  height: theme.spacing(10),
59
- marginBlockEnd: theme.spacing(7.5)
48
+ marginBlockEnd: theme.spacing(3.25)
60
49
  },
61
50
  _b[theme.breakpoints.down('sm')] = {
62
- marginBlock: theme.spacing(7.5)
51
+ marginBlock: theme.spacing(3.25)
63
52
  },
64
53
  _b);
65
54
  });
66
55
  var ThankYou = function (_a) {
67
- var title = _a.title, showEmailProviders = _a.showEmailProviders, onSuccess = _a.onSuccess, successTitle = _a.successTitle, disabledSuccessButton = _a.disabledSuccessButton;
56
+ var title = _a.title, description = _a.description, showEmailProviders = _a.showEmailProviders, onSuccess = _a.onSuccess, successTitle = _a.successTitle, disabledSuccessButton = _a.disabledSuccessButton;
68
57
  var t = useTranslation().t;
69
58
  var isAr = useLanguage().isAr;
70
- return (_jsxs(ContainerStyled, { children: [title && (_jsx(TextContainerStyled, { children: _jsxs(TitleStyled, { children: [title, " "] }) })), _jsx(IconStyled, { src: ICONS_NAMES.EMAIL_ICON, alt: 'loading...' }), showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(EmailProvidersButton, { gmail: { title: t('gmail_btn_open_title'), href: 'https://mail.google.com/mail/u/0/#inbox' }, outlook: { title: t('outlook_btn_open_title'), href: 'https://outlook.live.com/mail/0/' }, apple: { title: t('apple_btn_open_title'), href: 'https://www.icloud.com/mail/' } }) })), onSuccess && !showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(SuccessButton, __assign({ disabled: disabledSuccessButton, hideIcon: true, isAr: isAr, onClick: onSuccess }, { children: t(successTitle || 'open_mail_box') })) }))] }));
59
+ return (_jsxs(ContainerStyled, { children: [_jsx(IconStyled, { src: ICONS_NAMES.SUCCESS_GIF, alt: 'loading...' }), _jsxs(TitleStyled, { children: [title, " "] }), _jsx(DescriptionStyled, { children: description }), showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(EmailProvidersButton, { gmail: { title: t('gmail_btn_open_title'), href: 'https://mail.google.com/mail/u/0/#inbox' }, outlook: { title: t('outlook_btn_open_title'), href: 'https://outlook.live.com/mail/0/' }, apple: { title: t('apple_btn_open_title'), href: 'https://www.icloud.com/mail/' } }) })), onSuccess && !showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(SuccessButton, __assign({ disabled: disabledSuccessButton, hideIcon: true, isAr: isAr, onClick: onSuccess }, { children: t(successTitle || 'open_mail_box') })) }))] }));
71
60
  };
72
61
  export default React.memo(ThankYou);
@@ -11,6 +11,6 @@ var Success = function (_a) {
11
11
  dispatch(updateLeadSuccess());
12
12
  }, []);
13
13
  var onSuccess = function () { };
14
- return _jsx(SuccessScreen, { title: t('ide_successfully_updated_message'), onSuccess: onSuccess, successTitle: 'continue' });
14
+ return _jsx(SuccessScreen, { title: t('tax_success_title'), onSuccess: onSuccess, successTitle: t('continue') });
15
15
  };
16
16
  export default React.memo(Success);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "1.0.71",
3
+ "version": "1.0.72",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",