@tap-payments/os-micro-frontend-shared 0.1.389-test.1 → 0.1.389-test.2

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.
@@ -2,13 +2,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import Box from '@mui/material/Box';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import Tooltip from '../../../Tooltip';
5
- import { statusIcons } from '../../../TableCells/CustomCells/StatusCell/constant';
5
+ import { statusIcons, unCapturedStatusesStyles } from '../../../TableCells/CustomCells/StatusCell/constant';
6
6
  import { StatusIcon } from '../../../TableCells/CustomCells/style';
7
7
  import { ErrorChip, StatusIconWrapper } from './style';
8
8
  export function ChargeStatusIcon({ chargeStatus, chargeTooltip, errorCode, iconStyles, iconWrapperStyles }) {
9
9
  const { t } = useTranslation();
10
+ const unCapturedStatusStyle = chargeStatus ? unCapturedStatusesStyles[chargeStatus] : null;
11
+ const chargeIcon = chargeStatus && statusIcons[chargeStatus] && (_jsx(StatusIconWrapper, Object.assign({ style: iconWrapperStyles }, { children: _jsx(StatusIcon, { src: statusIcons[chargeStatus], alt: "charge-icon", style: Object.assign({ width: '16px', height: '16px' }, iconStyles) }) })));
10
12
  if (!chargeStatus)
11
13
  return null;
12
- const chargeIcon = statusIcons[chargeStatus] && (_jsx(StatusIconWrapper, Object.assign({ style: iconWrapperStyles }, { children: _jsx(StatusIcon, { src: statusIcons[chargeStatus], alt: "charge-icon", style: Object.assign({ width: '16px', height: '16px' }, iconStyles) }) })));
13
- return (_jsx(Tooltip, Object.assign({ title: chargeTooltip !== null && chargeTooltip !== void 0 ? chargeTooltip : t(chargeStatus) }, { children: _jsxs(Box, Object.assign({ sx: { display: 'flex', gap: '6px', alignItems: 'center' } }, { children: [chargeIcon, errorCode && _jsx(ErrorChip, { children: errorCode })] })) })));
14
+ return (_jsx(Tooltip, Object.assign({ title: chargeTooltip !== null && chargeTooltip !== void 0 ? chargeTooltip : t(chargeStatus) }, { children: _jsxs(Box, Object.assign({ sx: { display: 'flex', gap: '6px', alignItems: 'center' } }, { children: [chargeIcon, errorCode && _jsx(ErrorChip, Object.assign({ style: { background: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.color } }, { children: errorCode }))] })) })));
14
15
  }
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.389-test.1",
5
- "testVersion": 1,
4
+ "version": "0.1.389-test.2",
5
+ "testVersion": 2,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",