@tap-payments/auth-jsconnect 2.7.9-test → 2.7.11-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/constants/validation.d.ts +1 -0
- package/build/constants/validation.js +1 -0
- package/build/features/brand/screens/BrandInfo/BrandName.js +5 -2
- package/build/features/brand/screens/BrandInfo/validation.js +2 -2
- package/build/features/connect/screens/Merchant/BrandName.js +5 -2
- package/build/features/connect/screens/Merchant/validation.js +2 -2
- package/build/features/connectExpress/ConnectExpress.js +3 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +2 -2
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ export declare const LICENSE_NUMBER_MIN_LENGTH = 5;
|
|
|
10
10
|
export declare const FL_NUMBER_ENTITY_LENGTH = 50;
|
|
11
11
|
export declare const FL_MIN_LICENSE_LENGTH = 5;
|
|
12
12
|
export declare const CR_MIN_LICENSE_LENGTH = 5;
|
|
13
|
+
export declare const BRAND_NAME_MAX_LENGTH = 99;
|
|
13
14
|
export declare const KW_MIN_LICENSE_LENGTH = 3;
|
|
14
15
|
export declare const KW_MAX_LICENSE_LENGTH = 50;
|
|
15
16
|
export declare const SAUDI_NUMBER_LENGTH = 9;
|
|
@@ -10,6 +10,7 @@ export var LICENSE_NUMBER_MIN_LENGTH = 5;
|
|
|
10
10
|
export var FL_NUMBER_ENTITY_LENGTH = 50;
|
|
11
11
|
export var FL_MIN_LICENSE_LENGTH = 5;
|
|
12
12
|
export var CR_MIN_LICENSE_LENGTH = 5;
|
|
13
|
+
export var BRAND_NAME_MAX_LENGTH = 99;
|
|
13
14
|
export var KW_MIN_LICENSE_LENGTH = 3;
|
|
14
15
|
export var KW_MAX_LICENSE_LENGTH = 50;
|
|
15
16
|
export var SAUDI_NUMBER_LENGTH = 9;
|
|
@@ -63,6 +63,8 @@ import Input from '../../../shared/Input';
|
|
|
63
63
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
64
64
|
import { checkBrandNameAvailability, brandSelector } from '../../../app/brand/brandStore';
|
|
65
65
|
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
66
|
+
import { removeAllOtherThanCharsNumbersAndSpace } from '../../../../utils';
|
|
67
|
+
import { BRAND_NAME_MAX_LENGTH } from '../../../../constants';
|
|
66
68
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
67
69
|
var theme = _a.theme;
|
|
68
70
|
return ({
|
|
@@ -121,7 +123,8 @@ var BrandName = function (_a) {
|
|
|
121
123
|
}); }, 500);
|
|
122
124
|
var handleBrandNameChange = function (_a) {
|
|
123
125
|
var target = _a.target;
|
|
124
|
-
|
|
126
|
+
var value = removeAllOtherThanCharsNumbersAndSpace(target.value);
|
|
127
|
+
brandControl.field.onChange(value);
|
|
125
128
|
};
|
|
126
129
|
React.useEffect(function () {
|
|
127
130
|
var _a, _b, _c;
|
|
@@ -135,6 +138,6 @@ var BrandName = function (_a) {
|
|
|
135
138
|
var clearBrandName = function () {
|
|
136
139
|
brandControl.field.onChange('');
|
|
137
140
|
};
|
|
138
|
-
return (_jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { 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, { readOnly: readOnly, onChange: handleBrandNameChange, value: brandNameValue || '', disabled: isNonEditable, placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: brandNameValue, loading: brandNameChecking, isVerified: isVerified, error: error, onClear: clearBrandName }) })] })));
|
|
141
|
+
return (_jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { 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, { readOnly: readOnly, onChange: handleBrandNameChange, value: brandNameValue || '', disabled: isNonEditable, inputProps: { maxLength: BRAND_NAME_MAX_LENGTH }, placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: brandNameValue, loading: brandNameChecking, isVerified: isVerified, error: error, onClear: clearBrandName }) })] })));
|
|
139
142
|
};
|
|
140
143
|
export default React.memo(BrandName);
|
|
@@ -7,7 +7,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7
7
|
}
|
|
8
8
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
9
|
};
|
|
10
|
-
import { REGEX_WEBSITE, DIGITS_ONLY, REGEX_ALPHANUMERIC } from '../../../../constants';
|
|
10
|
+
import { REGEX_WEBSITE, DIGITS_ONLY, REGEX_ALPHANUMERIC, BRAND_NAME_MAX_LENGTH } from '../../../../constants';
|
|
11
11
|
import * as yup from 'yup';
|
|
12
12
|
var validationSalesChannels = function (channels) {
|
|
13
13
|
if (channels === void 0) { channels = []; }
|
|
@@ -77,7 +77,7 @@ export var BrandValidationSchema = function () {
|
|
|
77
77
|
test: function (value) {
|
|
78
78
|
if ((value === null || value === void 0 ? void 0 : value.length) === 0)
|
|
79
79
|
return true;
|
|
80
|
-
if (value && value.length >= 3)
|
|
80
|
+
if (value && value.length >= 3 && value.length <= BRAND_NAME_MAX_LENGTH)
|
|
81
81
|
return true;
|
|
82
82
|
return this.createError({ message: 'enter_brand_name_english_chars_numbers_space' });
|
|
83
83
|
}
|
|
@@ -63,6 +63,8 @@ import { checkBrandNameAvailability, connectSelector } from '../../../app/connec
|
|
|
63
63
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
64
64
|
import { debounce } from 'lodash-es';
|
|
65
65
|
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
66
|
+
import { removeAllOtherThanCharsNumbersAndSpace } from '../../../../utils';
|
|
67
|
+
import { BRAND_NAME_MAX_LENGTH } from '../../../../constants';
|
|
66
68
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
67
69
|
var theme = _a.theme;
|
|
68
70
|
return ({
|
|
@@ -119,7 +121,8 @@ var BrandName = function (_a) {
|
|
|
119
121
|
}); }, 500);
|
|
120
122
|
var handleBrandNameChange = function (_a) {
|
|
121
123
|
var target = _a.target;
|
|
122
|
-
|
|
124
|
+
var value = removeAllOtherThanCharsNumbersAndSpace(target.value);
|
|
125
|
+
brandControl.field.onChange(value);
|
|
123
126
|
};
|
|
124
127
|
React.useEffect(function () {
|
|
125
128
|
var brandList = (data.brandData.responseBody || {}).brand_list;
|
|
@@ -135,6 +138,6 @@ var BrandName = function (_a) {
|
|
|
135
138
|
var clearBrandName = function () {
|
|
136
139
|
brandControl.field.onChange('');
|
|
137
140
|
};
|
|
138
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { 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: _jsx(EndAdornment, { value: brandNameValue, loading: brandNameChecking, error: error, onClear: clearBrandName }) })] })) })));
|
|
141
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { 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'), inputProps: { maxLength: BRAND_NAME_MAX_LENGTH }, warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: brandNameValue, loading: brandNameChecking, error: error, onClear: clearBrandName }) })] })) })));
|
|
139
142
|
};
|
|
140
143
|
export default React.memo(BrandName);
|
|
@@ -7,7 +7,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7
7
|
}
|
|
8
8
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
9
|
};
|
|
10
|
-
import { REGEX_WEBSITE, DIGITS_ONLY, REGEX_ALPHANUMERIC } from '../../../../constants';
|
|
10
|
+
import { REGEX_WEBSITE, DIGITS_ONLY, REGEX_ALPHANUMERIC, BRAND_NAME_MAX_LENGTH } from '../../../../constants';
|
|
11
11
|
import * as yup from 'yup';
|
|
12
12
|
var validationSalesChannels = function (channels) {
|
|
13
13
|
if (channels === void 0) { channels = []; }
|
|
@@ -79,7 +79,7 @@ export var MerchantValidationSchema = function (isNewBrand) {
|
|
|
79
79
|
test: function (value) {
|
|
80
80
|
if ((value === null || value === void 0 ? void 0 : value.length) === 0)
|
|
81
81
|
return true;
|
|
82
|
-
if (value && value.length >= 3)
|
|
82
|
+
if (value && value.length >= 3 && value.length <= BRAND_NAME_MAX_LENGTH)
|
|
83
83
|
return true;
|
|
84
84
|
return this.createError({ message: 'enter_brand_name_english_chars_numbers_space' });
|
|
85
85
|
}
|
|
@@ -85,8 +85,8 @@ var ConnectExpress = memo(function (_a) {
|
|
|
85
85
|
dispatch(setIsLeadIdPassed(true));
|
|
86
86
|
dispatch(setLeadId(lead.id));
|
|
87
87
|
}
|
|
88
|
-
if (
|
|
89
|
-
dispatch(setShowBoard(
|
|
88
|
+
if (showBoard === false || (board === null || board === void 0 ? void 0 : board.display) === false)
|
|
89
|
+
dispatch(setShowBoard(false));
|
|
90
90
|
return [2];
|
|
91
91
|
});
|
|
92
92
|
}); };
|
|
@@ -95,7 +95,7 @@ var ConnectExpress = memo(function (_a) {
|
|
|
95
95
|
useStepStartedListener();
|
|
96
96
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, merchant = data.merchant;
|
|
97
97
|
React.useEffect(function () {
|
|
98
|
-
if (typeof showBoard === 'boolean')
|
|
98
|
+
if (typeof showBoard === 'boolean' && !configToken)
|
|
99
99
|
dispatch(setShowBoard(showBoard));
|
|
100
100
|
sendPageView({
|
|
101
101
|
title: 'Connect Express'
|
|
@@ -63,6 +63,8 @@ import Input from '../../../shared/Input';
|
|
|
63
63
|
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
64
64
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
65
65
|
import { checkBrandNameAvailabilityAsync, connectExpressSelector } from '../../../app/connectExpress/connectExpressStore';
|
|
66
|
+
import { removeAllOtherThanCharsNumbersAndSpace } from '../../../../utils';
|
|
67
|
+
import { BRAND_NAME_MAX_LENGTH } from '../../../../constants';
|
|
66
68
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
67
69
|
var theme = _a.theme;
|
|
68
70
|
return ({
|
|
@@ -119,7 +121,8 @@ var BrandName = function (_a) {
|
|
|
119
121
|
}); }, 500);
|
|
120
122
|
var handleBrandNameChange = function (_a) {
|
|
121
123
|
var target = _a.target;
|
|
122
|
-
|
|
124
|
+
var value = removeAllOtherThanCharsNumbersAndSpace(target.value);
|
|
125
|
+
brandControl.field.onChange(value);
|
|
123
126
|
};
|
|
124
127
|
React.useEffect(function () {
|
|
125
128
|
var _a, _b, _c, _d;
|
|
@@ -133,6 +136,6 @@ var BrandName = function (_a) {
|
|
|
133
136
|
var clearBrandName = function () {
|
|
134
137
|
brandControl.field.onChange('');
|
|
135
138
|
};
|
|
136
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 2.5 } }, { 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, readOnly: readOnly, value: brandNameValue || '', placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: brandNameValue, loading: brandNameChecking, error: error, onClear: clearBrandName }) })] })) })));
|
|
139
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 2.5 } }, { 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, readOnly: readOnly, value: brandNameValue || '', inputProps: { maxLength: BRAND_NAME_MAX_LENGTH }, placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: brandNameValue, loading: brandNameChecking, error: error, onClear: clearBrandName }) })] })) })));
|
|
137
140
|
};
|
|
138
141
|
export default React.memo(BrandName);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
|
-
import { KW_MIN_LICENSE_LENGTH, FL_MIN_LICENSE_LENGTH, CR_MIN_LICENSE_LENGTH } from '../../../../constants';
|
|
2
|
+
import { KW_MIN_LICENSE_LENGTH, FL_MIN_LICENSE_LENGTH, CR_MIN_LICENSE_LENGTH, BRAND_NAME_MAX_LENGTH } from '../../../../constants';
|
|
3
3
|
import { BusinessType } from '../../../../@types';
|
|
4
4
|
var objectElements = {
|
|
5
5
|
legal_name: yup.object().shape({
|
|
@@ -20,7 +20,7 @@ export var OtherThanKWOrSABusinessDataSchema = function (isLeadIdPassed) {
|
|
|
20
20
|
test: function (value) {
|
|
21
21
|
if ((value === null || value === void 0 ? void 0 : value.length) === 0)
|
|
22
22
|
return true;
|
|
23
|
-
if (value && value.length >= 3)
|
|
23
|
+
if (value && value.length >= 3 && value.length <= BRAND_NAME_MAX_LENGTH)
|
|
24
24
|
return true;
|
|
25
25
|
return this.createError({ message: 'enter_brand_name_english_chars_numbers_space' });
|
|
26
26
|
}
|