@tap-payments/auth-jsconnect 2.4.66-test → 2.4.68-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/app.d.ts +12 -0
- package/build/@types/form.d.ts +3 -0
- package/build/api/data.d.ts +7 -0
- package/build/api/data.js +25 -1
- package/build/api/index.d.ts +12 -0
- package/build/api/individual.d.ts +9 -0
- package/build/assets/locales/ar.json +7 -1
- package/build/assets/locales/en.json +7 -1
- package/build/constants/api.d.ts +3 -0
- package/build/constants/api.js +7 -1
- package/build/features/app/brand/brandStore.d.ts +20 -0
- package/build/features/app/brand/brandStore.js +145 -67
- package/build/features/bank/Bank.js +7 -2
- package/build/features/brand/Brand.js +7 -2
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +33 -14
- package/build/features/brand/screens/BrandInfo/SegmentLocations.d.ts +10 -0
- package/build/features/brand/screens/BrandInfo/{Segments.js → SegmentLocations.js} +5 -6
- package/build/features/brand/screens/BrandInfo/SegmentProfits.d.ts +10 -0
- package/build/features/brand/screens/BrandInfo/SegmentProfits.js +69 -0
- package/build/features/brand/screens/BrandInfo/SegmentTechs.d.ts +10 -0
- package/build/features/brand/screens/BrandInfo/SegmentTechs.js +69 -0
- package/build/features/brand/screens/BrandInfo/TeamSize.js +0 -1
- package/build/features/brand/screens/BrandInfo/validation.d.ts +9 -3
- package/build/features/brand/screens/BrandInfo/validation.js +3 -1
- package/build/features/business/Business.js +4 -1
- package/build/features/connect/Connect.js +4 -1
- package/build/features/connectExpress/ConnectExpress.js +4 -1
- package/build/features/entity/Entity.js +7 -2
- package/build/features/individual/Individual.js +7 -2
- package/build/features/password/Password.js +4 -1
- package/build/features/tax/Tax.js +7 -2
- package/build/utils/gtm.d.ts +4 -3
- package/build/utils/gtm.js +3 -0
- package/package.json +1 -1
- package/build/features/brand/screens/BrandInfo/Segments.d.ts +0 -10
|
@@ -28,7 +28,7 @@ var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop
|
|
|
28
28
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
29
29
|
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25), textAlign: 'start' }));
|
|
30
30
|
});
|
|
31
|
-
var
|
|
31
|
+
var SegmentLocations = function (_a) {
|
|
32
32
|
var _b, _c, _d;
|
|
33
33
|
var show = _a.show, onListOpen = _a.onListOpen, onListClose = _a.onListClose, readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
34
34
|
var _e = React.useState([]), segmentList = _e[0], setSegmentList = _e[1];
|
|
@@ -37,9 +37,9 @@ var Segments = function (_a) {
|
|
|
37
37
|
var isAr = useLanguage().isAr;
|
|
38
38
|
var data = useAppSelector(brandSelector).data;
|
|
39
39
|
var control = useFormContext().control;
|
|
40
|
-
var list = (data.verify.responseBody || {}).
|
|
40
|
+
var list = (data.verify.responseBody || {}).segmentLocationList;
|
|
41
41
|
var segmentsList = list || [];
|
|
42
|
-
var segmentControl = useController({ control: control, name: '
|
|
42
|
+
var segmentControl = useController({ control: control, name: 'segmentLocation' });
|
|
43
43
|
var segment = segmentControl.field.value;
|
|
44
44
|
var error = (_b = segmentControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
45
45
|
React.useEffect(function () {
|
|
@@ -50,7 +50,6 @@ var Segments = function (_a) {
|
|
|
50
50
|
var onOpenList = function (event) {
|
|
51
51
|
if (readOnly)
|
|
52
52
|
return;
|
|
53
|
-
console.log('onOpenList segments');
|
|
54
53
|
setAnchorEl(event.currentTarget);
|
|
55
54
|
onListOpen === null || onListOpen === void 0 ? void 0 : onListOpen();
|
|
56
55
|
};
|
|
@@ -62,9 +61,9 @@ var Segments = function (_a) {
|
|
|
62
61
|
onCloseList();
|
|
63
62
|
segmentControl.field.onChange(segment);
|
|
64
63
|
};
|
|
65
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(InputSelect, { required: true, label: t('
|
|
64
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(InputSelect, { required: true, label: t('segment_location_title'), readOnly: readOnly, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }), placeholder: t('choose_any_segment'), value: (isAr ? (_c = segment === null || segment === void 0 ? void 0 : segment.name) === null || _c === void 0 ? void 0 : _c.ar : (_d = segment === null || segment === void 0 ? void 0 : segment.name) === null || _d === void 0 ? void 0 : _d.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: segmentList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
66
65
|
var _a, _b;
|
|
67
66
|
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (segment === null || segment === void 0 ? void 0 : segment.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) })), item.id === (segment === null || segment === void 0 ? void 0 : segment.id) && _jsx(CheckIcon, { isVerified: isVerified })] }));
|
|
68
67
|
} }) }))] })) })));
|
|
69
68
|
};
|
|
70
|
-
export default
|
|
69
|
+
export default SegmentLocations;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface SegmentProfitsProps {
|
|
3
|
+
show: boolean;
|
|
4
|
+
onListOpen?: () => void;
|
|
5
|
+
onListClose?: () => void;
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
isVerified?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const SegmentProfits: ({ show, onListOpen, onListClose, readOnly, isVerified }: SegmentProfitsProps) => JSX.Element;
|
|
10
|
+
export default SegmentProfits;
|
|
@@ -0,0 +1,69 @@
|
|
|
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, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import 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 } from '@mui/material/styles';
|
|
18
|
+
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
19
|
+
import SimpleList from '../../../../components/SimpleList';
|
|
20
|
+
import Text from '../../../../components/Text';
|
|
21
|
+
import Collapse from '../../../../components/Collapse';
|
|
22
|
+
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
23
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
24
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
25
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
26
|
+
import { brandSelector } from '../../../app/brand/brandStore';
|
|
27
|
+
var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
28
|
+
var theme = _a.theme, isSelected = _a.isSelected;
|
|
29
|
+
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25), textAlign: 'start' }));
|
|
30
|
+
});
|
|
31
|
+
var SegmentProfits = function (_a) {
|
|
32
|
+
var _b, _c, _d;
|
|
33
|
+
var show = _a.show, onListOpen = _a.onListOpen, onListClose = _a.onListClose, readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
34
|
+
var _e = React.useState([]), segmentList = _e[0], setSegmentList = _e[1];
|
|
35
|
+
var _f = React.useState(null), anchorEl = _f[0], setAnchorEl = _f[1];
|
|
36
|
+
var t = useTranslation().t;
|
|
37
|
+
var isAr = useLanguage().isAr;
|
|
38
|
+
var data = useAppSelector(brandSelector).data;
|
|
39
|
+
var control = useFormContext().control;
|
|
40
|
+
var list = (data.verify.responseBody || {}).segmentProfitList;
|
|
41
|
+
var segmentsList = list || [];
|
|
42
|
+
var segmentControl = useController({ control: control, name: 'segmentProfit' });
|
|
43
|
+
var segment = segmentControl.field.value;
|
|
44
|
+
var error = (_b = segmentControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
45
|
+
React.useEffect(function () {
|
|
46
|
+
if ((segmentsList === null || segmentsList === void 0 ? void 0 : segmentsList.length) > 0) {
|
|
47
|
+
setSegmentList(segmentsList);
|
|
48
|
+
}
|
|
49
|
+
}, [segmentsList]);
|
|
50
|
+
var onOpenList = function (event) {
|
|
51
|
+
if (readOnly)
|
|
52
|
+
return;
|
|
53
|
+
setAnchorEl(event.currentTarget);
|
|
54
|
+
onListOpen === null || onListOpen === void 0 ? void 0 : onListOpen();
|
|
55
|
+
};
|
|
56
|
+
var onCloseList = function () {
|
|
57
|
+
setAnchorEl(null);
|
|
58
|
+
onListClose === null || onListClose === void 0 ? void 0 : onListClose();
|
|
59
|
+
};
|
|
60
|
+
var onSelectItem = function (segment) {
|
|
61
|
+
onCloseList();
|
|
62
|
+
segmentControl.field.onChange(segment);
|
|
63
|
+
};
|
|
64
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(InputSelect, { required: true, label: t('segment_profit_title'), readOnly: readOnly, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }), placeholder: t('choose_any_segment'), value: (isAr ? (_c = segment === null || segment === void 0 ? void 0 : segment.name) === null || _c === void 0 ? void 0 : _c.ar : (_d = segment === null || segment === void 0 ? void 0 : segment.name) === null || _d === void 0 ? void 0 : _d.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: segmentList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
65
|
+
var _a, _b;
|
|
66
|
+
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (segment === null || segment === void 0 ? void 0 : segment.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) })), item.id === (segment === null || segment === void 0 ? void 0 : segment.id) && _jsx(CheckIcon, { isVerified: isVerified })] }));
|
|
67
|
+
} }) }))] })) })));
|
|
68
|
+
};
|
|
69
|
+
export default SegmentProfits;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface SegmentTechsProps {
|
|
3
|
+
show: boolean;
|
|
4
|
+
onListOpen?: () => void;
|
|
5
|
+
onListClose?: () => void;
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
isVerified?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const SegmentTechs: ({ show, onListOpen, onListClose, readOnly, isVerified }: SegmentTechsProps) => JSX.Element;
|
|
10
|
+
export default SegmentTechs;
|
|
@@ -0,0 +1,69 @@
|
|
|
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, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import 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 } from '@mui/material/styles';
|
|
18
|
+
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
19
|
+
import SimpleList from '../../../../components/SimpleList';
|
|
20
|
+
import Text from '../../../../components/Text';
|
|
21
|
+
import Collapse from '../../../../components/Collapse';
|
|
22
|
+
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
23
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
24
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
25
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
26
|
+
import { brandSelector } from '../../../app/brand/brandStore';
|
|
27
|
+
var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
28
|
+
var theme = _a.theme, isSelected = _a.isSelected;
|
|
29
|
+
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25), textAlign: 'start' }));
|
|
30
|
+
});
|
|
31
|
+
var SegmentTechs = function (_a) {
|
|
32
|
+
var _b, _c, _d;
|
|
33
|
+
var show = _a.show, onListOpen = _a.onListOpen, onListClose = _a.onListClose, readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
34
|
+
var _e = React.useState([]), segmentList = _e[0], setSegmentList = _e[1];
|
|
35
|
+
var _f = React.useState(null), anchorEl = _f[0], setAnchorEl = _f[1];
|
|
36
|
+
var t = useTranslation().t;
|
|
37
|
+
var isAr = useLanguage().isAr;
|
|
38
|
+
var data = useAppSelector(brandSelector).data;
|
|
39
|
+
var control = useFormContext().control;
|
|
40
|
+
var list = (data.verify.responseBody || {}).segmentTechList;
|
|
41
|
+
var segmentsList = list || [];
|
|
42
|
+
var segmentControl = useController({ control: control, name: 'segmentTech' });
|
|
43
|
+
var segment = segmentControl.field.value;
|
|
44
|
+
var error = (_b = segmentControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
45
|
+
React.useEffect(function () {
|
|
46
|
+
if ((segmentsList === null || segmentsList === void 0 ? void 0 : segmentsList.length) > 0) {
|
|
47
|
+
setSegmentList(segmentsList);
|
|
48
|
+
}
|
|
49
|
+
}, [segmentsList]);
|
|
50
|
+
var onOpenList = function (event) {
|
|
51
|
+
if (readOnly)
|
|
52
|
+
return;
|
|
53
|
+
setAnchorEl(event.currentTarget);
|
|
54
|
+
onListOpen === null || onListOpen === void 0 ? void 0 : onListOpen();
|
|
55
|
+
};
|
|
56
|
+
var onCloseList = function () {
|
|
57
|
+
setAnchorEl(null);
|
|
58
|
+
onListClose === null || onListClose === void 0 ? void 0 : onListClose();
|
|
59
|
+
};
|
|
60
|
+
var onSelectItem = function (segment) {
|
|
61
|
+
onCloseList();
|
|
62
|
+
segmentControl.field.onChange(segment);
|
|
63
|
+
};
|
|
64
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(InputSelect, { required: true, label: t('segment_tech_title'), readOnly: readOnly, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }), placeholder: t('choose_any_segment'), value: (isAr ? (_c = segment === null || segment === void 0 ? void 0 : segment.name) === null || _c === void 0 ? void 0 : _c.ar : (_d = segment === null || segment === void 0 ? void 0 : segment.name) === null || _d === void 0 ? void 0 : _d.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: segmentList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
65
|
+
var _a, _b;
|
|
66
|
+
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (segment === null || segment === void 0 ? void 0 : segment.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) })), item.id === (segment === null || segment === void 0 ? void 0 : segment.id) && _jsx(CheckIcon, { isVerified: isVerified })] }));
|
|
67
|
+
} }) }))] })) })));
|
|
68
|
+
};
|
|
69
|
+
export default SegmentTechs;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
export declare const BrandValidationSchema: () => yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
3
3
|
brandName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
4
|
-
|
|
4
|
+
segmentLocation: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
5
|
+
segmentProfit: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
6
|
+
segmentTech: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
5
7
|
teamSize: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
6
8
|
salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
7
9
|
id: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
@@ -14,7 +16,9 @@ export declare const BrandValidationSchema: () => yup.ObjectSchema<import("yup/l
|
|
|
14
16
|
}>>[] | undefined>;
|
|
15
17
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
16
18
|
brandName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
17
|
-
|
|
19
|
+
segmentLocation: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
20
|
+
segmentProfit: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
21
|
+
segmentTech: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
18
22
|
teamSize: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
19
23
|
salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
20
24
|
id: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
@@ -27,7 +31,9 @@ export declare const BrandValidationSchema: () => yup.ObjectSchema<import("yup/l
|
|
|
27
31
|
}>>[] | undefined>;
|
|
28
32
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
29
33
|
brandName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
30
|
-
|
|
34
|
+
segmentLocation: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
35
|
+
segmentProfit: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
36
|
+
segmentTech: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
31
37
|
teamSize: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
32
38
|
salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
33
39
|
id: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
@@ -83,7 +83,9 @@ export var BrandValidationSchema = function () {
|
|
|
83
83
|
}
|
|
84
84
|
})
|
|
85
85
|
.required('enter_brand_name_english_chars_numbers_space'),
|
|
86
|
-
|
|
86
|
+
segmentLocation: yup.object().required('alert_choose_segment_location'),
|
|
87
|
+
segmentProfit: yup.object().required('alert_choose_segment_profit'),
|
|
88
|
+
segmentTech: yup.object().required('alert_choose_segment_tech'),
|
|
87
89
|
teamSize: yup.object().required('alert_choose_teamSize'),
|
|
88
90
|
salesChannels: yup
|
|
89
91
|
.array()
|
|
@@ -20,7 +20,7 @@ import AnimationFlow from '../../components/AnimationFlow';
|
|
|
20
20
|
import { store } from '../../app/store';
|
|
21
21
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
22
22
|
import Collapse from '../../components/Collapse';
|
|
23
|
-
import { getParameterByName, findOrCreateElementAndInject } from '../../utils';
|
|
23
|
+
import { getParameterByName, findOrCreateElementAndInject, sendPageView } from '../../utils';
|
|
24
24
|
import { BUSINESS_SCREENS_NAVIGATION } from '../../constants';
|
|
25
25
|
import { businessFeatureScreens } from '../featuresScreens';
|
|
26
26
|
import Background from '../shared/Background';
|
|
@@ -41,6 +41,9 @@ var Business = memo(function (props) {
|
|
|
41
41
|
if (!token)
|
|
42
42
|
throw new Error('Auth token is not found!');
|
|
43
43
|
dispatch(verifyLeadToken(token));
|
|
44
|
+
sendPageView({
|
|
45
|
+
title: 'Business'
|
|
46
|
+
});
|
|
44
47
|
};
|
|
45
48
|
useEffect(function () {
|
|
46
49
|
if (!settingLoading && open)
|
|
@@ -20,7 +20,7 @@ import { store } from '../../app/store';
|
|
|
20
20
|
import { connectSelector, setDefaultCountryCode } from '../app/connect/connectStore';
|
|
21
21
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
22
22
|
import Collapse from '../../components/Collapse';
|
|
23
|
-
import { isKW, findOrCreateElementAndInject, initializeGTM, sendCustomEventToGTM, sendCustomDimension } from '../../utils';
|
|
23
|
+
import { isKW, findOrCreateElementAndInject, initializeGTM, sendCustomEventToGTM, sendCustomDimension, sendPageView } from '../../utils';
|
|
24
24
|
import { CONNECT_SCREENS_NAVIGATION } from '../../constants';
|
|
25
25
|
import { connectFeatureScreens } from '../featuresScreens';
|
|
26
26
|
import Background from '../shared/Background';
|
|
@@ -61,6 +61,9 @@ var Connect = memo(function (props) {
|
|
|
61
61
|
event: 'PageView',
|
|
62
62
|
website_country: (_c = data.businessCountry) === null || _c === void 0 ? void 0 : _c.iso2
|
|
63
63
|
});
|
|
64
|
+
sendPageView({
|
|
65
|
+
title: 'Connect'
|
|
66
|
+
});
|
|
64
67
|
}
|
|
65
68
|
}, [data.businessCountry]);
|
|
66
69
|
var handleDialogClose = function () {
|
|
@@ -67,7 +67,7 @@ import { store } from '../../app/store';
|
|
|
67
67
|
import { connectExpressSelector, setIsLeadIdPassed, setPostUrl, setLeadId, retrieveLeadIdentityByIdAsync, setShowBoard } from '../app/connectExpress/connectExpressStore';
|
|
68
68
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
69
69
|
import Collapse from '../../components/Collapse';
|
|
70
|
-
import { isKW, findOrCreateElementAndInject, getParameterByName } from '../../utils';
|
|
70
|
+
import { isKW, findOrCreateElementAndInject, getParameterByName, sendPageView } from '../../utils';
|
|
71
71
|
import { CONNECT_EXPRESS_SCREENS_NAVIGATION } from '../../constants';
|
|
72
72
|
import { connectExpressFeatureScreens } from '../featuresScreens';
|
|
73
73
|
import Background from '../shared/Background';
|
|
@@ -104,6 +104,9 @@ var ConnectExpress = memo(function (_a) {
|
|
|
104
104
|
dispatch(setShowBoard(true));
|
|
105
105
|
if (typeof showBoard === 'boolean')
|
|
106
106
|
dispatch(setShowBoard(showBoard));
|
|
107
|
+
sendPageView({
|
|
108
|
+
title: 'Connect Express'
|
|
109
|
+
});
|
|
107
110
|
}, []);
|
|
108
111
|
React.useEffect(function () {
|
|
109
112
|
if (data.isValidOperator && props.open && !settingLoading) {
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import { memo } from 'react';
|
|
24
|
+
import React, { memo } from 'react';
|
|
25
25
|
import { createRoot } from 'react-dom/client';
|
|
26
26
|
import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useVerifyToken } from '../../hooks';
|
|
27
27
|
import { settingsSelector } from '../../app/settings';
|
|
@@ -29,7 +29,7 @@ import AnimationFlow from '../../components/AnimationFlow';
|
|
|
29
29
|
import { store } from '../../app/store';
|
|
30
30
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
31
31
|
import Collapse from '../../components/Collapse';
|
|
32
|
-
import { findOrCreateElementAndInject } from '../../utils';
|
|
32
|
+
import { findOrCreateElementAndInject, sendPageView } from '../../utils';
|
|
33
33
|
import { FeatureContainer } from '../shared/Containers';
|
|
34
34
|
import { ENTITY_SCREENS_NAVIGATION } from '../../constants';
|
|
35
35
|
import { entityFeatureScreens } from '../featuresScreens';
|
|
@@ -52,6 +52,11 @@ var Entity = memo(function (_a) {
|
|
|
52
52
|
internalToken: verifyToken,
|
|
53
53
|
settingLoading: settingLoading
|
|
54
54
|
});
|
|
55
|
+
React.useEffect(function () {
|
|
56
|
+
sendPageView({
|
|
57
|
+
title: 'Entity'
|
|
58
|
+
});
|
|
59
|
+
}, []);
|
|
55
60
|
var initialLoading = verifyToken ? settingLoading : settingLoading || customLoading;
|
|
56
61
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, open: open, error: error, loading: initialLoading, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: entityFeatureScreens.map(function (_a, index) {
|
|
57
62
|
var Element = _a.element, name = _a.name;
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import { memo } from 'react';
|
|
24
|
+
import React, { memo } from 'react';
|
|
25
25
|
import { createRoot } from 'react-dom/client';
|
|
26
26
|
import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useVerifyToken } from '../../hooks';
|
|
27
27
|
import { settingsSelector } from '../../app/settings';
|
|
@@ -29,7 +29,7 @@ import AnimationFlow from '../../components/AnimationFlow';
|
|
|
29
29
|
import { store } from '../../app/store';
|
|
30
30
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
31
31
|
import Collapse from '../../components/Collapse';
|
|
32
|
-
import { findOrCreateElementAndInject } from '../../utils';
|
|
32
|
+
import { findOrCreateElementAndInject, sendPageView } from '../../utils';
|
|
33
33
|
import { FeatureContainer } from '../shared/Containers';
|
|
34
34
|
import { INDIVIDUAL_SCREENS_NAVIGATION } from '../../constants';
|
|
35
35
|
import { individualFeatureScreens } from '../featuresScreens';
|
|
@@ -52,6 +52,11 @@ var Individual = memo(function (_a) {
|
|
|
52
52
|
internalToken: verifyToken,
|
|
53
53
|
settingLoading: settingLoading
|
|
54
54
|
});
|
|
55
|
+
React.useEffect(function () {
|
|
56
|
+
sendPageView({
|
|
57
|
+
title: 'Individual'
|
|
58
|
+
});
|
|
59
|
+
}, []);
|
|
55
60
|
var initialLoading = verifyToken ? settingLoading : settingLoading || customLoading;
|
|
56
61
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: individualFeatureScreens.map(function (_a, index) {
|
|
57
62
|
var Element = _a.element, name = _a.name;
|
|
@@ -19,7 +19,7 @@ import { store } from '../../app/store';
|
|
|
19
19
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
20
20
|
import Collapse from '../../components/Collapse';
|
|
21
21
|
import { FeatureContainer } from '../shared/Containers';
|
|
22
|
-
import { getParameterByName, findOrCreateElementAndInject } from '../../utils';
|
|
22
|
+
import { getParameterByName, findOrCreateElementAndInject, sendPageView } from '../../utils';
|
|
23
23
|
import { PASSWORD_OPERATION_TYPE, PASSWORD_SCREENS_NAVIGATION } from '../../constants';
|
|
24
24
|
import { passwordFeatureScreens } from '../featuresScreens';
|
|
25
25
|
import { passwordSelector, verifyLeadToken, verifyOperationToken } from '../app/password/passwordStore';
|
|
@@ -43,6 +43,9 @@ var Password = memo(function (props) {
|
|
|
43
43
|
dispatch(handleLanguage(lang));
|
|
44
44
|
if (!token)
|
|
45
45
|
throw new Error('Auth token is not found!');
|
|
46
|
+
sendPageView({
|
|
47
|
+
title: 'Password'
|
|
48
|
+
});
|
|
46
49
|
if (operationType === PASSWORD_OPERATION_TYPE.RESET_PASSWORD) {
|
|
47
50
|
dispatch(verifyOperationToken({ token: token, boardId: boardId, boardInfoId: boardInfoId }));
|
|
48
51
|
return;
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import { memo } from 'react';
|
|
24
|
+
import React, { memo } from 'react';
|
|
25
25
|
import { createRoot } from 'react-dom/client';
|
|
26
26
|
import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useVerifyToken } from '../../hooks';
|
|
27
27
|
import { settingsSelector } from '../../app/settings';
|
|
@@ -29,7 +29,7 @@ import AnimationFlow from '../../components/AnimationFlow';
|
|
|
29
29
|
import { store } from '../../app/store';
|
|
30
30
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
31
31
|
import Collapse from '../../components/Collapse';
|
|
32
|
-
import { findOrCreateElementAndInject } from '../../utils';
|
|
32
|
+
import { findOrCreateElementAndInject, sendPageView } from '../../utils';
|
|
33
33
|
import { FeatureContainer } from '../shared/Containers';
|
|
34
34
|
import { TAX_SCREENS_NAVIGATION } from '../../constants';
|
|
35
35
|
import { taxFeatureScreens } from '../featuresScreens';
|
|
@@ -44,6 +44,11 @@ var Tax = memo(function (_a) {
|
|
|
44
44
|
useErrorListener(taxError || error);
|
|
45
45
|
useStepStartedListener();
|
|
46
46
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress;
|
|
47
|
+
React.useEffect(function () {
|
|
48
|
+
sendPageView({
|
|
49
|
+
title: 'Tax'
|
|
50
|
+
});
|
|
51
|
+
}, []);
|
|
47
52
|
useVerifyToken({
|
|
48
53
|
verify: verifyLeadToken,
|
|
49
54
|
loadingScreenName: 'TAX_LOADING_DATA_STEP',
|
package/build/utils/gtm.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { CountryTrackingData, DataLayer, LeadIdentificationData } from '../@types';
|
|
2
|
-
export declare const pushToDataLayer: (data: DataLayer | CountryTrackingData | LeadIdentificationData) => void;
|
|
1
|
+
import { CountryTrackingData, DataLayer, LeadIdentificationData, PageTrackingData, EventPageTrackingData } from '../@types';
|
|
2
|
+
export declare const pushToDataLayer: (data: DataLayer | CountryTrackingData | LeadIdentificationData | EventPageTrackingData) => void;
|
|
3
3
|
export declare const initializeGTM: () => void;
|
|
4
4
|
export declare const sendCustomEventToGTM: (data: DataLayer) => void;
|
|
5
|
-
export declare const sendCustomDimension: (data: CountryTrackingData | LeadIdentificationData) => void;
|
|
5
|
+
export declare const sendCustomDimension: (data: CountryTrackingData | LeadIdentificationData | EventPageTrackingData) => void;
|
|
6
|
+
export declare const sendPageView: (data: PageTrackingData) => void;
|
package/build/utils/gtm.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface SegmentsProps {
|
|
3
|
-
show: boolean;
|
|
4
|
-
onListOpen?: () => void;
|
|
5
|
-
onListClose?: () => void;
|
|
6
|
-
readOnly?: boolean;
|
|
7
|
-
isVerified?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const Segments: ({ show, onListOpen, onListClose, readOnly, isVerified }: SegmentsProps) => JSX.Element;
|
|
10
|
-
export default Segments;
|