@tap-payments/os-micro-frontend-shared 0.1.362-test.1 → 0.1.362-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.
@@ -8,6 +8,7 @@ import { changeDateTimezone } from '../../../../../utils/index.js';
8
8
  import { RefundStateIcon } from './RefundStateIcon';
9
9
  import { refundStatusLabels } from '../constant';
10
10
  import { RefundCellContainer, PartialIcon, PercentageContainer, DateContainer } from '../style';
11
+ import { useMemo } from 'react';
11
12
  export default function RefundStatus({ status, refundIcon, refundTooltip, refundTooltipLabel, date, gatewayTooltip, unCapturedTooltip, acquirerTooltip, errorCode, acquirerCode, gatewayCode, timezone, }) {
12
13
  const theme = useTheme();
13
14
  const { t } = useTranslation();
@@ -15,6 +16,11 @@ export default function RefundStatus({ status, refundIcon, refundTooltip, refund
15
16
  currentTimezone: ACCEPTANCE_TIMEZONE,
16
17
  targetTimezone: timezone === null || timezone === void 0 ? void 0 : timezone.offset,
17
18
  });
19
+ const refundIconSrc = useMemo(() => {
20
+ if (refundIcon)
21
+ return refundIcon;
22
+ return status === 'REFUNDED' ? refundedIcon : refundSettledIcon;
23
+ }, [status, refundIcon]);
18
24
  if (!['REFUNDED', 'PAID_OUT'].includes(status !== null && status !== void 0 ? status : '')) {
19
25
  return (_jsx(RefundStateIcon, { status: status, refundTooltip: refundTooltip, gatewayTooltip: gatewayTooltip, unCapturedTooltip: unCapturedTooltip, acquirerTooltip: acquirerTooltip, errorCode: errorCode, acquirerCode: acquirerCode, gatewayCode: gatewayCode }));
20
26
  }
@@ -27,7 +33,7 @@ export default function RefundStatus({ status, refundIcon, refundTooltip, refund
27
33
  })) }, { children: [_jsx(PartialIcon, { sx: Object.assign({}, (!date && {
28
34
  width: '16px',
29
35
  height: '16px',
30
- })), src: refundIcon || status === 'REFUNDED' ? refundedIcon : refundSettledIcon, alt: "refunded" }), _jsx(motion.div, Object.assign({ style: {
36
+ })), src: refundIconSrc, alt: "refunded" }), _jsx(motion.div, Object.assign({ style: {
31
37
  display: 'none',
32
38
  alignItems: 'center',
33
39
  justifyContent: 'center',
@@ -558,6 +558,7 @@ export declare const blackMobileBatteryIcon: string;
558
558
  export declare const blackMobileSignalIcon: string;
559
559
  export declare const emptyMobileWifiIcon: string;
560
560
  export declare const deemaWithLabel: string;
561
+ export declare const chargeBackWhiteIcon: string;
561
562
  export declare const blackUnLinkIcon: string;
562
563
  export declare const sortDescArrowIcon: string;
563
564
  export declare const sortAscArrowIcon: string;
@@ -566,6 +566,7 @@ export const blackMobileBatteryIcon = `${lightUrl}/blackMobileBatteryIcon.svg`;
566
566
  export const blackMobileSignalIcon = `${lightUrl}/blackMobileSignalIcon.svg`;
567
567
  export const emptyMobileWifiIcon = `${lightUrl}/emptyMobileWifiIcon.svg`;
568
568
  export const deemaWithLabel = `${lightUrl}/deemaWithLabel.svg`;
569
+ export const chargeBackWhiteIcon = `${lightUrl}/chargeBackWhiteIcon.svg`;
569
570
  export const blackUnLinkIcon = `${lightUrl}/blackUnLinkIcon.svg`;
570
571
  export const sortDescArrowIcon = `${lightUrl}/sortDescArrowIcon.svg`;
571
572
  export const sortAscArrowIcon = `${lightUrl}/sortAscArrowIcon.svg`;
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.362-test.1",
5
- "testVersion": 1,
4
+ "version": "0.1.362-test.3",
5
+ "testVersion": 3,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",