@tap-payments/os-micro-frontend-shared 0.0.150-dropdown-flag-v1 → 0.0.150-dropdown-flag-v2
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.
|
@@ -6,7 +6,7 @@ import { ChevronIcon } from '../TableHeader_V2/components/StatusButtons/ChevronI
|
|
|
6
6
|
import StyledBadge, { BadgeVariants } from '../CountBadge';
|
|
7
7
|
import CountryFlag from '../CountryFlag';
|
|
8
8
|
import { formatNumber } from '../../utils/index.js';
|
|
9
|
-
import { closeXIcon } from '../../constants/index.js';
|
|
9
|
+
import { closeXIcon, SUPPORTED_CURRENCY_DETAILS } from '../../constants/index.js';
|
|
10
10
|
import { ChevronContainer, Label, LabelWrapper, StyledDropdown, MenuItemContainer, CheckboxStyles, StyledStatusButton, ClearIcon, ChevronIconWrapper, } from './style';
|
|
11
11
|
function MultiSelectStatusButton({ options = [], selectedValues, onSelectionChange, label, variant = 'inActive' }) {
|
|
12
12
|
const { t } = useTranslation();
|
|
@@ -80,18 +80,21 @@ function MultiSelectStatusButton({ options = [], selectedValues, onSelectionChan
|
|
|
80
80
|
'&:hover': {
|
|
81
81
|
boxShadow: 'none !important',
|
|
82
82
|
},
|
|
83
|
-
}, menuItems: options.map((option) =>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
e
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
83
|
+
}, menuItems: options.map((option) => {
|
|
84
|
+
var _a;
|
|
85
|
+
return ({
|
|
86
|
+
label: (_jsxs(MenuItemContainer, { children: [_jsx(Checkbox, { checked: internalSelectedValues.includes(option.status), size: "small", sx: CheckboxStyles, onClick: (e) => {
|
|
87
|
+
var _a;
|
|
88
|
+
e.stopPropagation();
|
|
89
|
+
handleOptionToggle((_a = option.status) !== null && _a !== void 0 ? _a : '', e);
|
|
90
|
+
} }), _jsx(CountryFlag, { code: ((_a = SUPPORTED_CURRENCY_DETAILS[option.code]) === null || _a === void 0 ? void 0 : _a.country) || '', sx: { border: '1px solid white', borderRadius: '3px' } }), _jsx(Typography, Object.assign({ variant: "body2" }, { children: option.name }))] })),
|
|
91
|
+
onClick: (e) => {
|
|
92
|
+
var _a;
|
|
93
|
+
e.preventDefault();
|
|
94
|
+
e.stopPropagation();
|
|
95
|
+
handleOptionToggle((_a = option.status) !== null && _a !== void 0 ? _a : '', e);
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
}) }))] }));
|
|
96
99
|
}
|
|
97
100
|
export default memo(MultiSelectStatusButton);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.0.150-dropdown-flag-
|
|
4
|
+
"version": "0.0.150-dropdown-flag-v2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
7
7
|
"module": "build/index.js",
|