@tap-payments/auth-jsconnect 2.3.91-test → 2.3.92-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.
|
@@ -239,7 +239,7 @@ var ActivityList = function (_a) {
|
|
|
239
239
|
}, [anchorEl, controlValue]);
|
|
240
240
|
return (_jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('expected_sales_monthly', {
|
|
241
241
|
currency: t(findCurrencyByIso2(countryCode.iso2))
|
|
242
|
-
}) }), _jsx(InputStyled, { readOnly: readOnly, value: getSelectedActivities() || '', onClick: !!anchorEl ? handleCloseMainMenu : handleOpenMainMenu, placeholder: t('choose_expected_sales'), endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { sx: { maxHeight: '350px', paddingTop: 0 }, list: activities, listItemProps: { sx: { padding: 0 } }, onSelectItem: function (section) {
|
|
242
|
+
}) }), _jsx(InputStyled, { readOnly: readOnly, value: getSelectedActivities() || '', onClick: !!anchorEl ? handleCloseMainMenu : handleOpenMainMenu, placeholder: t('choose_expected_sales'), endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsx(Search, { onSearchValue: handleSearch, placeholder: 'search_activities_placeholder' }), _jsx(SimpleListStyled, { sx: { maxHeight: '350px', paddingTop: 0 }, list: activities, listItemProps: { sx: { padding: 0 } }, onSelectItem: function (section) {
|
|
243
243
|
var isDivisionNotAvailable = !section.divisions || section.divisions.length === 0;
|
|
244
244
|
if (isDivisionNotAvailable)
|
|
245
245
|
onSelectItem(section);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
interface SearchProps {
|
|
3
3
|
showSearch?: boolean;
|
|
4
|
+
placeholder?: string;
|
|
4
5
|
onSearchValue?: (value: string) => void;
|
|
5
6
|
}
|
|
6
|
-
declare const Search: ({ onSearchValue }: SearchProps) => JSX.Element;
|
|
7
|
+
declare const Search: ({ onSearchValue, placeholder }: SearchProps) => JSX.Element;
|
|
7
8
|
export default Search;
|
|
@@ -3,11 +3,11 @@ import * as React from 'react';
|
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import Input from '../../shared/Input';
|
|
5
5
|
var Search = function (_a) {
|
|
6
|
-
var onSearchValue = _a.onSearchValue;
|
|
6
|
+
var onSearchValue = _a.onSearchValue, placeholder = _a.placeholder;
|
|
7
7
|
var t = useTranslation().t;
|
|
8
8
|
var handleOnChange = function (event) {
|
|
9
9
|
onSearchValue === null || onSearchValue === void 0 ? void 0 : onSearchValue(event.target.value);
|
|
10
10
|
};
|
|
11
|
-
return (_jsx(React.Fragment, { children: _jsx(Input, { placeholder: t('search_placeholder'), onChange: handleOnChange }) }));
|
|
11
|
+
return (_jsx(React.Fragment, { children: _jsx(Input, { placeholder: t(placeholder || 'search_placeholder'), onChange: handleOnChange }) }));
|
|
12
12
|
};
|
|
13
13
|
export default Search;
|