@tap-payments/os-micro-frontend-shared 0.1.402 → 0.1.404
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/IconWithHoverOverlays/IconWithHoverOverlays.js +1 -1
- package/build/components/StatusIcons/DestinationIcon/DestinationIcon.js +1 -1
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/ChargeStatusIcon.js +5 -2
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/constant.js +4 -4
- package/build/utils/string.js +2 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { useState, memo } from 'react';
|
|
|
3
3
|
import Box from '@mui/material/Box';
|
|
4
4
|
import { HoverContainer, IconWrapper, PlusBadgeWrapper } from './style';
|
|
5
5
|
import Tooltip from '../Tooltip';
|
|
6
|
-
import
|
|
6
|
+
import startCase from 'lodash/startCase';
|
|
7
7
|
function IconWithHoverOverlays({ mainIcon, overlayIcons }) {
|
|
8
8
|
const [isHovering, setIsHovering] = useState(false);
|
|
9
9
|
const handleMouseEnter = () => {
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { destinationStatusIcons } from './constant';
|
|
3
3
|
import { StatusIcon, StatusIconWrapper, TextLabel } from './style';
|
|
4
4
|
import Tooltip from '../../Tooltip';
|
|
5
|
-
import
|
|
5
|
+
import camelCase from 'lodash/camelCase';
|
|
6
6
|
import { useTheme } from '@mui/material';
|
|
7
7
|
import { t } from 'i18next';
|
|
8
8
|
import StatusChipWithCopy from '../../StatusChipWithCopy';
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Box from '@mui/material/Box';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import camelCase from 'lodash/camelCase';
|
|
4
5
|
import Tooltip from '../../../Tooltip';
|
|
5
6
|
import { statusIcons, unCapturedStatusesStyles } from '../../../TableCells/CustomCells/StatusCell/constant';
|
|
6
7
|
import { StatusIcon } from '../../../TableCells/CustomCells/style';
|
|
8
|
+
import { unCapturedStatuses } from '../../../../constants/index.js';
|
|
7
9
|
import { ErrorChip, StatusIconWrapper } from './style';
|
|
8
10
|
export function ChargeStatusIcon({ chargeStatus, chargeTooltip, errorCode, iconStyles, iconWrapperStyles }) {
|
|
9
11
|
const { t } = useTranslation();
|
|
10
12
|
const unCapturedStatusStyle = chargeStatus ? unCapturedStatusesStyles[chargeStatus] : null;
|
|
11
13
|
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) }) })));
|
|
14
|
+
const chargeTooltipTitle = chargeTooltip && (_jsx(_Fragment, { children: _jsx("div", { children: chargeTooltip }) }));
|
|
12
15
|
if (!chargeStatus)
|
|
13
16
|
return null;
|
|
14
|
-
return (_jsx(Tooltip, Object.assign({ title:
|
|
17
|
+
return (_jsx(Tooltip, Object.assign({ title: chargeTooltipTitle !== null && chargeTooltipTitle !== void 0 ? chargeTooltipTitle : t(camelCase(chargeStatus)) }, { children: _jsxs(Box, Object.assign({ sx: { display: 'flex', gap: '6px', alignItems: 'center' } }, { children: [chargeIcon, !!(unCapturedStatuses === null || unCapturedStatuses === void 0 ? void 0 : unCapturedStatuses.includes(chargeStatus || '')) && (_jsx(ErrorChip, Object.assign({ style: { background: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.color } }, { children: errorCode })))] })) })));
|
|
15
18
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { deletedStatusIcon, draftStatusIcon, createdStatusIcon,
|
|
1
|
+
import { deletedStatusIcon, draftStatusIcon, createdStatusIcon, paidStatusIcon, refundedStatusIcon, deliveredStatusIcon, viewedStatusIcon, savedStatusIcon, scheduledStatusIcon, pendingStatusIcon, cancelledInvoiceIcon, expiredInvoiceIcon, } from '../../../../constants/index.js';
|
|
2
2
|
export const statusIcons = {
|
|
3
3
|
DELETED: deletedStatusIcon,
|
|
4
4
|
DRAFT: draftStatusIcon,
|
|
5
5
|
CREATED: createdStatusIcon,
|
|
6
|
-
CANCELLED:
|
|
7
|
-
CANCELED:
|
|
8
|
-
EXPIRED:
|
|
6
|
+
CANCELLED: cancelledInvoiceIcon,
|
|
7
|
+
CANCELED: cancelledInvoiceIcon,
|
|
8
|
+
EXPIRED: expiredInvoiceIcon,
|
|
9
9
|
PAID: paidStatusIcon,
|
|
10
10
|
REFUNDED: refundedStatusIcon,
|
|
11
11
|
DELIVERED: deliveredStatusIcon,
|
package/build/utils/string.js
CHANGED
package/package.json
CHANGED