@tap-payments/os-micro-frontend-shared 0.0.228-test.17 → 0.0.228-test.18
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.
|
@@ -37,7 +37,7 @@ function Dropdown(_a) {
|
|
|
37
37
|
} }, (idx === selected && {
|
|
38
38
|
backgroundColor: 'transparent',
|
|
39
39
|
boxShadow: allowShadows ? theme.shadows[10] : 'none',
|
|
40
|
-
})), item.sx) }, { children: [
|
|
40
|
+
})), item.sx) }, { children: [multiple && _jsx(CheckboxStyled, { size: "small", checked: item.selected }), item.icon && _jsx(StyledListItemIcon, { children: item.icon }), _jsx(StyledListItemText, { children: item.label }), _jsx(Box, Object.assign({ className: item.alwaysShowRightAction ? '' : 'menu-right-action' }, { children: item.rightAction && item.rightAction }))] }))) }, `${item.label}-${idx}`));
|
|
41
41
|
}), footer] })));
|
|
42
42
|
}
|
|
43
43
|
export default Dropdown;
|
|
@@ -19,7 +19,7 @@ import { ChevronContainer, Label, LabelWrapper, StyledStatusIcon, StyledDropdown
|
|
|
19
19
|
import { statusButtonIcons } from './constant';
|
|
20
20
|
const StatusButton = memo((props) => {
|
|
21
21
|
var _a;
|
|
22
|
-
const { variant = 'inActive', badgeCount, icon, label, dropdownOptions, multiple, onButtonBodyClick,
|
|
22
|
+
const { variant = 'inActive', badgeCount, icon, label, dropdownOptions, multiple, onButtonBodyClick, onClose } = props, restProps = __rest(props, ["variant", "badgeCount", "icon", "label", "dropdownOptions", "multiple", "onButtonBodyClick", "onClose"]);
|
|
23
23
|
const [buttonClicks, setButtonClicks] = useState(0);
|
|
24
24
|
const { t } = useTranslation();
|
|
25
25
|
const buttonRef = useRef(null);
|
|
@@ -44,7 +44,8 @@ const StatusButton = memo((props) => {
|
|
|
44
44
|
}, [isActiveVariant]);
|
|
45
45
|
const handleDropdownClose = useCallback(() => {
|
|
46
46
|
setAnchorEl(null);
|
|
47
|
-
|
|
47
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
48
|
+
}, [onClose]);
|
|
48
49
|
const handleDropdownToggle = useCallback(() => {
|
|
49
50
|
if (!hasDropdown)
|
|
50
51
|
return;
|
|
@@ -66,14 +67,6 @@ const StatusButton = memo((props) => {
|
|
|
66
67
|
setSelectedStatus(item.status);
|
|
67
68
|
handleDropdownClose();
|
|
68
69
|
}, [handleDropdownClose, multiple]);
|
|
69
|
-
const handleConfirm = useCallback(() => {
|
|
70
|
-
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm();
|
|
71
|
-
handleDropdownClose();
|
|
72
|
-
}, [onConfirm, handleDropdownClose]);
|
|
73
|
-
const handleCancel = useCallback(() => {
|
|
74
|
-
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
75
|
-
handleDropdownClose();
|
|
76
|
-
}, [onCancel, handleDropdownClose]);
|
|
77
70
|
const menuItems = useMemo(() => (dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.map((item) => (Object.assign(Object.assign({}, item), { onClick: handleMenuItemClick(item) })))) || [], [dropdownOptions, handleMenuItemClick]);
|
|
78
71
|
const ButtonComponent = statusButtonVariants[variant];
|
|
79
72
|
const displayLabel = selectedStatus ? t(selectedStatus) : label;
|
|
@@ -17,8 +17,7 @@ export interface StatusButtonProps extends Omit<ButtonProps, 'variant' | 'childr
|
|
|
17
17
|
status: TableHeaderStatus;
|
|
18
18
|
}>;
|
|
19
19
|
multiple?: boolean;
|
|
20
|
-
|
|
21
|
-
onCancel?: () => void;
|
|
20
|
+
onClose?: () => void;
|
|
22
21
|
}
|
|
23
22
|
export interface ChevronIconProps {
|
|
24
23
|
isActive?: boolean;
|
|
@@ -76,7 +76,7 @@ export { default as CountryFlag } from './CountryFlag';
|
|
|
76
76
|
export { default as CurrencyIcon } from './CurrencyIcon';
|
|
77
77
|
export { default as CustomBackdrop } from './CustomBackdrop';
|
|
78
78
|
export { default as DeviceIcon } from './DeviceIcon';
|
|
79
|
-
export { default as CountBadge,
|
|
79
|
+
export { default as CountBadge, BadgeVariants, CountAnimatedBadge, type StyledBadgeProps, paymentSourceAnimation } from './CountBadge';
|
|
80
80
|
export { default as CircularProgressWithLabel } from './CircularProgressWithLabel';
|
|
81
81
|
export { default as Collapse, type CollapseProps } from './Collapse';
|
|
82
82
|
export { default as ConfirmDialog, type ConfirmDialogFunction, type ConfirmDialogProps, useConfirmDialog, ConfirmDialogContext, ConfirmDialogProvider, } from './ConfirmDialog';
|
|
@@ -76,7 +76,7 @@ export { default as CountryFlag } from './CountryFlag';
|
|
|
76
76
|
export { default as CurrencyIcon } from './CurrencyIcon';
|
|
77
77
|
export { default as CustomBackdrop } from './CustomBackdrop';
|
|
78
78
|
export { default as DeviceIcon } from './DeviceIcon';
|
|
79
|
-
export { default as CountBadge, CountAnimatedBadge, paymentSourceAnimation } from './CountBadge';
|
|
79
|
+
export { default as CountBadge, BadgeVariants, CountAnimatedBadge, paymentSourceAnimation } from './CountBadge';
|
|
80
80
|
export { default as CircularProgressWithLabel } from './CircularProgressWithLabel';
|
|
81
81
|
export { default as Collapse } from './Collapse';
|
|
82
82
|
export { default as ConfirmDialog, useConfirmDialog, ConfirmDialogContext, ConfirmDialogProvider, } from './ConfirmDialog';
|
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.0.228-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.0.228-test.18",
|
|
5
|
+
"testVersion": 18,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|