@tap-payments/auth-jsconnect 2.3.61-test → 2.3.64-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 +1 -0
- package/build/features/app/individual/individualStore.js +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +6 -6
- package/build/features/shared/Button/FlowsButtons.js +6 -0
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +2 -2
- package/package.json +1 -1
package/build/@types/app.d.ts
CHANGED
|
@@ -981,7 +981,8 @@ export var individualSlice = createSlice({
|
|
|
981
981
|
}
|
|
982
982
|
if (birth === null || birth === void 0 ? void 0 : birth.city) {
|
|
983
983
|
var selectedCity = cityList === null || cityList === void 0 ? void 0 : cityList.find(function (city) {
|
|
984
|
-
|
|
984
|
+
var _a;
|
|
985
|
+
return city.id === ((_a = birth === null || birth === void 0 ? void 0 : birth.city) === null || _a === void 0 ? void 0 : _a.cityId);
|
|
985
986
|
});
|
|
986
987
|
state.data.individualPersonalData.placeOfBirthCity = selectedCity;
|
|
987
988
|
}
|
|
@@ -26,7 +26,7 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
26
26
|
import { styled } from '@mui/material/styles';
|
|
27
27
|
import CheckIcon from '@mui/icons-material/Check';
|
|
28
28
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
29
|
-
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
29
|
+
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
30
30
|
import Collapse from '../../../../components/Collapse';
|
|
31
31
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
32
32
|
import Text from '../../../../components/Text';
|
|
@@ -64,6 +64,7 @@ var BirthCity = React.forwardRef(function (_a, ref) {
|
|
|
64
64
|
var _d = React.useState(null), anchorEl = _d[0], setAnchorEl = _d[1];
|
|
65
65
|
var t = useTranslation().t;
|
|
66
66
|
var dispatch = useAppDispatch();
|
|
67
|
+
var isAr = useLanguage().isAr;
|
|
67
68
|
var _e = useFormContext(), control = _e.control, getValues = _e.getValues, setValue = _e.setValue;
|
|
68
69
|
var _f = useAppSelector(individualSelector), data = _f.data, cityLoading = _f.cityLoading;
|
|
69
70
|
var _g = data.verify.responseBody || {}, cityList = _g.cityList, user = _g.user;
|
|
@@ -72,11 +73,10 @@ var BirthCity = React.forwardRef(function (_a, ref) {
|
|
|
72
73
|
var cityValue = placeOfBirthCityControl.field.value;
|
|
73
74
|
var error = (_b = placeOfBirthCityControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
74
75
|
React.useEffect(function () {
|
|
75
|
-
var _a;
|
|
76
76
|
if ((cityList === null || cityList === void 0 ? void 0 : cityList.length) > 0) {
|
|
77
|
-
var
|
|
77
|
+
var cityId_1 = cityValue === null || cityValue === void 0 ? void 0 : cityValue.id;
|
|
78
78
|
var selectedCity = cityList.find(function (c) {
|
|
79
|
-
return c.
|
|
79
|
+
return c.id === cityId_1;
|
|
80
80
|
}) || {};
|
|
81
81
|
setValue('placeOfBirthCity', selectedCity, { shouldValidate: true });
|
|
82
82
|
var list = __spreadArray([], cityList, true);
|
|
@@ -109,8 +109,8 @@ var BirthCity = React.forwardRef(function (_a, ref) {
|
|
|
109
109
|
placeOfBirthCityControl.field.onChange(city);
|
|
110
110
|
};
|
|
111
111
|
var getName = function (city) {
|
|
112
|
-
var _a;
|
|
113
|
-
return (_a = city === null || city === void 0 ? void 0 : city.name) === null || _a === void 0 ? void 0 : _a.en;
|
|
112
|
+
var _a, _b;
|
|
113
|
+
return isAr ? (_a = city === null || city === void 0 ? void 0 : city.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = city === null || city === void 0 ? void 0 : city.name) === null || _b === void 0 ? void 0 : _b.en;
|
|
114
114
|
};
|
|
115
115
|
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(InputStyled, { label: t('place_birth_city_label'), readOnly: readOnly, placeholder: t('choose_place_birth_city'), value: getName(cityValue) || '', warningMessage: error && t(error), onClick: cityLoading ? undefined : !!anchorEl ? function () { return onCloseCitySelect(); } : onOpenCitySelect, endAdornment: cityLoading ? _jsx(CircularProgress, { size: 25, thickness: 5, sx: { height: 'auto !important' } }) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.en'], list: locationCities, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
116
116
|
return (_jsxs(_Fragment, { children: [_jsx(CountryItemContainer, { children: _jsx(CountryNameText, __assign({ isSelected: item.id === (cityValue === null || cityValue === void 0 ? void 0 : cityValue.id) }, { children: getName(item) })) }), item.id === (cityValue === null || cityValue === void 0 ? void 0 : cityValue.id) && _jsx(CheckIconStyled, {})] }));
|
|
@@ -93,6 +93,9 @@ var ButtonStyled = styled(Button, {
|
|
|
93
93
|
} }, (hasUrl && {
|
|
94
94
|
svg: {
|
|
95
95
|
filter: 'brightness(3)'
|
|
96
|
+
},
|
|
97
|
+
img: {
|
|
98
|
+
filter: 'brightness(3)'
|
|
96
99
|
}
|
|
97
100
|
})))) }, _b[theme.breakpoints.down('sm')] = {
|
|
98
101
|
'&:hover': __assign({ backgroundColor: theme.palette.common.white, border: "1px solid ".concat(theme.palette.primary.main), img: {
|
|
@@ -102,6 +105,9 @@ var ButtonStyled = styled(Button, {
|
|
|
102
105
|
} }, (hasUrl && {
|
|
103
106
|
svg: {
|
|
104
107
|
filter: 'brightness(3)'
|
|
108
|
+
},
|
|
109
|
+
img: {
|
|
110
|
+
filter: 'brightness(3)'
|
|
105
111
|
}
|
|
106
112
|
}))))
|
|
107
113
|
}, _b['&:disabled'] = {
|
|
@@ -169,10 +169,10 @@ var UploadMultipleFile = function (_a) {
|
|
|
169
169
|
}
|
|
170
170
|
};
|
|
171
171
|
var fileExists = fileInfoArray.length > 0;
|
|
172
|
-
return (_jsxs(FeatureStyled, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: _jsxs(_Fragment, { children: [label, required && _jsx(Mandatory, {})] }) }), _jsx(Collapse, __assign({ in: !!uploadedFileCount, timeout: 100, unmountOnExit: true }, { children: _jsx(UploadCountBox, { children: "".concat(uploadedFileCount, " ").concat(t('uploaded_file')) }) }))] }), _jsx(Collapse, __assign({ in:
|
|
172
|
+
return (_jsxs(FeatureStyled, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: _jsxs(_Fragment, { children: [label, required && _jsx(Mandatory, {})] }) }), _jsx(Collapse, __assign({ in: !!uploadedFileCount, timeout: 100, unmountOnExit: true }, { children: _jsx(UploadCountBox, { children: "".concat(uploadedFileCount, " ").concat(t('uploaded_file')) }) }))] }), _jsx(Collapse, __assign({ in: fileExists, timeout: 300 }, { children: (fileArray || []).map(function (file, index) {
|
|
173
173
|
return (_jsx(UploadFile, { readOnly: readOnly, required: required, purpose: purpose, fileType: fileType, title: fileTitle, isSubmitting: isSubmitting, uploadedFiles: fileInfoArray, index: index, file: file, sx: {
|
|
174
174
|
borderBottom: index === fileArray.length - 1 ? "1px solid ".concat(alpha(theme.palette.divider, 0.8)) : ''
|
|
175
175
|
}, onSuccess: handleSuccess, onDelete: handleDelete, onUpdate: handleUpdate }, index));
|
|
176
|
-
}) }))] }));
|
|
176
|
+
}) })), _jsx(Collapse, __assign({ in: !readOnly }, { children: _jsx(InputContainerStyled, __assign({ sx: { mt: 2.5 } }, { children: _jsx(DragAndDrop, { title: title, subTitle: subTitle, description: dragDescription, fileExists: fileExists, uploadingTitle: uploadingTitle, successTitle: successTitle, onSuccess: handleFileChange, multiple: true, error: error }) })) }))] }));
|
|
177
177
|
};
|
|
178
178
|
export default UploadMultipleFile;
|