@tap-payments/os-micro-frontend-shared 0.1.243-test.2 → 0.1.243-test.3
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/components/ActionMenu/ActionMenuDropDown.js +1 -1
- package/build/components/ActionMenu/ActionMenuItem.js +1 -1
- package/build/components/StatusIcons/GeographyIcon/GeographyIcon.d.ts +1 -1
- package/build/components/StatusIcons/GeographyIcon/GeographyIcon.js +3 -5
- package/build/components/TableCells/CustomCells/WalletCell/WalletCell.js +1 -1
- package/package.json +2 -2
|
@@ -11,7 +11,7 @@ const Menu = ({ selectedCurrency, option, closeDropdown, handleSelectOption }) =
|
|
|
11
11
|
handleSelectOption(option.value, option === null || option === void 0 ? void 0 : option.currency);
|
|
12
12
|
}
|
|
13
13
|
closeDropdown();
|
|
14
|
-
} }, { children: [_jsx(EnglishAmount, Object.assign({ showBottomPadding: true, showWarning: false }, { children: t(option.name) })), _jsxs(DropDownChargeGapColumn, { children: [_jsxs(StyledIconRowContainer, Object.assign({ marginRightAuto: true }, { children: [_jsx(CurrencyCountryFlag, { code: (_a = option === null || option === void 0 ? void 0 : option.currency) !== null && _a !== void 0 ? _a : selectedCurrency }), _jsx(StyledCurrency, { children: (_b = option === null || option === void 0 ? void 0 : option.currency) !== null && _b !== void 0 ? _b : selectedCurrency })] })), _jsx(StyledTextAmount, Object.assign({ showWarning: false }, { children: intlCurrency(option.value || 0, (_c = option === null || option === void 0 ? void 0 : option.currency) !== null && _c !== void 0 ? _c : selectedCurrency) }))] })] })));
|
|
14
|
+
} }, { children: [_jsx(EnglishAmount, Object.assign({ showBottomPadding: true, showWarning: false }, { children: t(option.name) })), _jsxs(DropDownChargeGapColumn, { children: [_jsxs(StyledIconRowContainer, Object.assign({ marginRightAuto: true }, { children: [_jsx(CurrencyCountryFlag, { code: (_a = option === null || option === void 0 ? void 0 : option.currency) !== null && _a !== void 0 ? _a : selectedCurrency, width: "0.76rem" }), _jsx(StyledCurrency, { children: (_b = option === null || option === void 0 ? void 0 : option.currency) !== null && _b !== void 0 ? _b : selectedCurrency })] })), _jsx(StyledTextAmount, Object.assign({ showWarning: false }, { children: intlCurrency(option.value || 0, (_c = option === null || option === void 0 ? void 0 : option.currency) !== null && _c !== void 0 ? _c : selectedCurrency) }))] })] })));
|
|
15
15
|
};
|
|
16
16
|
function ActionMenuDropDown({ menuAnchor, showDropDown, selectedCurrency, options, closeDropdown, handleSelectOption }) {
|
|
17
17
|
if (options.length <= 1)
|
|
@@ -15,6 +15,6 @@ function ActionMenuItem({ showWarning, selectedCurrency, onAmountChange, amount,
|
|
|
15
15
|
iconRef.current.click();
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
return (_jsxs(_Fragment, { children: [_jsxs(Charge, { children: [_jsx(EnglishAmount, Object.assign({ showBottomPadding: true, showWarning: showWarning }, { children: t('amount') })), _jsxs(StyledIconRowContainer, Object.assign({ limited: true, paddingTop: true, onClick: onClickMissingDiv }, { children: [_jsx(CurrencyCountryFlag, { code: selectedCurrency }), _jsx(StyledCurrency, { children: _jsx(CurrencyIcon, { currency: selectedCurrency }) }), !showWarning && showDropdownIcon && (_jsx(StyledDropDownIcon, { src: !showDropDown ? blueDropdownArrowIcon : greyDropdownIcon, alt: "drop-down icon", currencyPadding: true }))] }))] }), _jsx(StyledMissingDiv, { ref: iconRef, onClick: toggleDropDown }), isLoading ? (_jsx(Skeleton, { variant: "text", width: "100%", height: "100%" })) : (_jsx(StyledAmount, { disabled: disabled, placeholder: currencyConfig[selectedCurrency] ? '0.000' : '0.00', onValueChange: onAmountChange, value: amount, decimalsLimit: (_a = currencyConfig[selectedCurrency]) !== null && _a !== void 0 ? _a : 2, showWarning: showWarning || false, decimalScale: (_b = currencyConfig[selectedCurrency]) !== null && _b !== void 0 ? _b : 2, autoFocus: true }))] }));
|
|
18
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Charge, { children: [_jsx(EnglishAmount, Object.assign({ showBottomPadding: true, showWarning: showWarning }, { children: t('amount') })), _jsxs(StyledIconRowContainer, Object.assign({ limited: true, paddingTop: true, onClick: onClickMissingDiv }, { children: [_jsx(CurrencyCountryFlag, { code: selectedCurrency, width: "0.76rem" }), _jsx(StyledCurrency, { children: _jsx(CurrencyIcon, { currency: selectedCurrency }) }), !showWarning && showDropdownIcon && (_jsx(StyledDropDownIcon, { src: !showDropDown ? blueDropdownArrowIcon : greyDropdownIcon, alt: "drop-down icon", currencyPadding: true }))] }))] }), _jsx(StyledMissingDiv, { ref: iconRef, onClick: toggleDropDown }), isLoading ? (_jsx(Skeleton, { variant: "text", width: "100%", height: "100%" })) : (_jsx(StyledAmount, { disabled: disabled, placeholder: currencyConfig[selectedCurrency] ? '0.000' : '0.00', onValueChange: onAmountChange, value: amount, decimalsLimit: (_a = currencyConfig[selectedCurrency]) !== null && _a !== void 0 ? _a : 2, showWarning: showWarning || false, decimalScale: (_b = currencyConfig[selectedCurrency]) !== null && _b !== void 0 ? _b : 2, autoFocus: true }))] }));
|
|
19
19
|
}
|
|
20
20
|
export default ActionMenuItem;
|
|
@@ -2,4 +2,4 @@ export declare const GeographyIcon: ({ geographyVariant, countryCode, isTextShow
|
|
|
2
2
|
geographyVariant?: "G" | "L" | "R" | undefined;
|
|
3
3
|
countryCode?: string | undefined;
|
|
4
4
|
isTextShown?: boolean | undefined;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import CountryFlag from '../../CountryFlag';
|
|
3
3
|
import Tooltip from '../../Tooltip';
|
|
4
|
-
import { GeographyBox } from './style';
|
|
5
4
|
const geographyMap = {
|
|
6
5
|
G: 'Global',
|
|
7
6
|
R: 'Regional',
|
|
@@ -12,8 +11,7 @@ export const GeographyIcon = ({ geographyVariant, countryCode, isTextShown, }) =
|
|
|
12
11
|
const tooltip = geographyTooltip || countryCode
|
|
13
12
|
? `${geographyTooltip || ''} ${geographyTooltip && countryCode ? `-` : ''} ${countryCode ? `${countryCode}` : ''}`
|
|
14
13
|
: undefined;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} }, { children: isTextShown ? null : icon })) })));
|
|
14
|
+
if (isTextShown || !countryCode)
|
|
15
|
+
return null;
|
|
16
|
+
return (_jsx(Tooltip, Object.assign({ title: tooltip }, { children: _jsx(CountryFlag, { code: countryCode }) })));
|
|
19
17
|
};
|
|
@@ -21,6 +21,6 @@ function WalletCell(_a) {
|
|
|
21
21
|
return (_jsx(TableCell, Object.assign({ style: {
|
|
22
22
|
textAlign: 'center',
|
|
23
23
|
overflow: 'visible',
|
|
24
|
-
} }, props, { children: _jsxs(WalletCellContainer, { children: [showCountry && country && (_jsx(Tooltip, Object.assign({ title: getCountryNameByISO(country) }, { children: _jsx(CountryFlag, { code: country
|
|
24
|
+
} }, props, { children: _jsxs(WalletCellContainer, { children: [showCountry && country && (_jsx(Tooltip, Object.assign({ title: getCountryNameByISO(country) }, { children: _jsx(CountryFlag, { code: country }) }))), _jsxs(WalletWrapper, { children: [_jsx(WalletIcon, { src: walletIcon, alt: "wallet-icon" }), walletId && _jsxs(WalletIdContainer, { children: ["\u00B7\u00B7\u00B7\u00B7 ", walletId === null || walletId === void 0 ? void 0 : walletId.substring(((walletId === null || walletId === void 0 ? void 0 : walletId.length) || 0) - 4)] })] })] }) })));
|
|
25
25
|
}
|
|
26
26
|
export default WalletCell;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
3
|
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.1.243-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.243-test.3",
|
|
5
|
+
"testVersion": 3,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|