@tap-payments/auth-jsconnect 2.4.63-test → 2.4.66-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/features/brand/screens/BrandInfo/BrandInfo.js +0 -2
- package/build/features/brand/screens/BrandInfo/Segments.js +0 -2
- package/build/features/brand/screens/BrandInfo/TeamSize.js +0 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +6 -5
- package/build/features/shared/InputSelect/InputSelect.js +8 -2
- package/package.json +1 -1
|
@@ -68,8 +68,6 @@ var BrandInfo = function (_a) {
|
|
|
68
68
|
var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
|
|
69
69
|
var dataVerified = useDataVerified(data_verification, ['logo', 'name.en', 'name.ar', 'segment.teams', 'segment.type']);
|
|
70
70
|
var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
|
|
71
|
-
console.log('brand kit noneEditable', noneEditable);
|
|
72
|
-
console.log('brand kit readOnly', readOnly);
|
|
73
71
|
var isBrandNameVerified = dataVerified['name.en'] && dataVerified['name.ar'] && ((name === null || name === void 0 ? void 0 : name.en) === watch('brandName') || (name === null || name === void 0 ? void 0 : name.ar) === watch('brandName'));
|
|
74
72
|
var isSegmentVerified = dataVerified['segment.type'] && ((_b = resSegment === null || resSegment === void 0 ? void 0 : resSegment.type) === null || _b === void 0 ? void 0 : _b.id) === ((_c = watch('segment')) === null || _c === void 0 ? void 0 : _c.id);
|
|
75
73
|
var isTeamSizeVerified = dataVerified['segment.teams'] && ((_d = resSegment === null || resSegment === void 0 ? void 0 : resSegment.team) === null || _d === void 0 ? void 0 : _d.id) === ((_e = watch('teamSize')) === null || _e === void 0 ? void 0 : _e.id);
|
|
@@ -48,7 +48,6 @@ var Segments = function (_a) {
|
|
|
48
48
|
}
|
|
49
49
|
}, [segmentsList]);
|
|
50
50
|
var onOpenList = function (event) {
|
|
51
|
-
console.log('readOnly', readOnly);
|
|
52
51
|
if (readOnly)
|
|
53
52
|
return;
|
|
54
53
|
console.log('onOpenList segments');
|
|
@@ -60,7 +59,6 @@ var Segments = function (_a) {
|
|
|
60
59
|
onListClose === null || onListClose === void 0 ? void 0 : onListClose();
|
|
61
60
|
};
|
|
62
61
|
var onSelectItem = function (segment) {
|
|
63
|
-
console.log('onSelectItem segments', segment);
|
|
64
62
|
onCloseList();
|
|
65
63
|
segmentControl.field.onChange(segment);
|
|
66
64
|
};
|
|
@@ -48,7 +48,6 @@ var TeamSize = function (_a) {
|
|
|
48
48
|
}
|
|
49
49
|
}, [teamSizesList]);
|
|
50
50
|
var onOpenList = function (event) {
|
|
51
|
-
console.log('readOnly', readOnly);
|
|
52
51
|
if (readOnly)
|
|
53
52
|
return;
|
|
54
53
|
console.log('onOpenList teamSize');
|
|
@@ -60,7 +59,6 @@ var TeamSize = function (_a) {
|
|
|
60
59
|
onListClose === null || onListClose === void 0 ? void 0 : onListClose();
|
|
61
60
|
};
|
|
62
61
|
var onSelectItem = function (teamSize) {
|
|
63
|
-
console.log('onSelectItem teamSize', teamSize);
|
|
64
62
|
onCloseList();
|
|
65
63
|
teamSizeControl.field.onChange(teamSize);
|
|
66
64
|
};
|
|
@@ -114,15 +114,16 @@ var Occupation = function (props) {
|
|
|
114
114
|
}, [anchorEl, occupationValue]);
|
|
115
115
|
return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(InputSelect, { required: true, label: t('occupation_title'), value: (isAr ? (_a = occupationValue === null || occupationValue === void 0 ? void 0 : occupationValue.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = occupationValue === null || occupationValue === void 0 ? void 0 : occupationValue.name) === null || _b === void 0 ? void 0 : _b.en) || '', readOnly: props.readOnly, onClick: !!anchorEl ? handleCloseMainMenu : handleOpenMainMenu, placeholder: t('choose_any_occupation'), endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { sx: { maxHeight: '350px', paddingTop: 0 }, list: occupation, listItemProps: { sx: { padding: 0 } }, onSelectItem: function (item) {
|
|
116
116
|
var _a;
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
var isSubEmpty = !item.sub || !((_a = item.sub) === null || _a === void 0 ? void 0 : _a.length);
|
|
118
|
+
if (isSubEmpty)
|
|
119
|
+
onSelectItem(item);
|
|
119
120
|
else
|
|
120
121
|
handleOpenSubMenu(item.code);
|
|
121
122
|
}, renderItem: function (item) {
|
|
122
123
|
var _a;
|
|
123
|
-
var
|
|
124
|
-
var showCheck = item.code === (occupationValue === null || occupationValue === void 0 ? void 0 : occupationValue.section_code) &&
|
|
125
|
-
return (_jsxs(ListItemContainer, { children: [_jsxs(ListItem, __assign({ sx: __assign({ bgcolor: 'rgb(196 184 184 / 8%)', borderBottom: '1px solid rgba(227, 232, 238, 0.8)' }, (
|
|
124
|
+
var isSubEmpty = !item.sub || !((_a = item.sub) === null || _a === void 0 ? void 0 : _a.length);
|
|
125
|
+
var showCheck = item.code === (occupationValue === null || occupationValue === void 0 ? void 0 : occupationValue.section_code) && isSubEmpty;
|
|
126
|
+
return (_jsxs(ListItemContainer, { children: [_jsxs(ListItem, __assign({ sx: __assign({ bgcolor: 'rgb(196 184 184 / 8%)', borderBottom: '1px solid rgba(227, 232, 238, 0.8)' }, (isSubEmpty && { bgcolor: 'inherit', borderBottom: 'none' })) }, { children: [_jsx(NameContainer, __assign({ isSelected: item.code === (occupationValue === null || occupationValue === void 0 ? void 0 : occupationValue.section_code), sx: __assign({}, (isSubEmpty && { paddingInlineStart: '5px' })) }, { children: isAr ? item.name.ar : item.name.en })), showCheck ? _jsx(CheckIcon, {}) : !isSubEmpty && _jsx(ExpandIcon, { anchorEl: subIndex === item.code })] })), _jsx(Collapse, __assign({ in: item.code === subIndex && !isSubEmpty }, { children: _jsx(SimpleListStyled, { sx: { pt: 0, pb: 0 }, list: (!isSubEmpty && item.sub) || [], onSelectItem: onSelectItem, listItemProps: { sx: { padding: 0, '&:last-child': { paddingBottom: 0 } } }, renderItem: function (item, idx) {
|
|
126
127
|
return (_jsxs(ListItem, __assign({ sx: { mt: idx === 0 ? 1 : 0 } }, { children: [_jsx(NameContainer, __assign({ isSelected: item.code === (occupationValue === null || occupationValue === void 0 ? void 0 : occupationValue.code) }, { children: isAr ? item.name.ar : item.name.en })), item.code === (occupationValue === null || occupationValue === void 0 ? void 0 : occupationValue.code) && _jsx(CheckIcon, {})] })));
|
|
127
128
|
} }) }))] }));
|
|
128
129
|
} })] }))] })) })));
|
|
@@ -18,10 +18,16 @@ export var InputStyled = styled(Input)(function (_a) {
|
|
|
18
18
|
return ({
|
|
19
19
|
'& .MuiInputBase-input': {
|
|
20
20
|
cursor: readOnly ? 'default' : 'pointer',
|
|
21
|
-
WebkitTextFillColor: 'inherit'
|
|
21
|
+
WebkitTextFillColor: 'inherit',
|
|
22
|
+
caretColor: 'transparent'
|
|
22
23
|
}
|
|
23
24
|
});
|
|
24
25
|
});
|
|
25
26
|
export default function InputSelect(props) {
|
|
26
|
-
|
|
27
|
+
var handleFocus = function (event) {
|
|
28
|
+
event.target.blur();
|
|
29
|
+
if (props.onFocus)
|
|
30
|
+
props.onFocus(event);
|
|
31
|
+
};
|
|
32
|
+
return _jsx(InputStyled, __assign({}, props, { inputMode: 'none', onFocus: handleFocus }));
|
|
27
33
|
}
|