@tap-payments/os-micro-frontend-shared 0.1.348 → 0.1.352

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.
@@ -16,7 +16,7 @@ export function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip
16
16
  const chargeTooltipTitle = chargeTooltip && (_jsx(_Fragment, { children: _jsx("div", { children: chargeTooltip }) }));
17
17
  const acquirerTooltipTitle = acquirerTooltip && (_jsxs(_Fragment, { children: [_jsx("div", { children: "Acquirer" }), _jsx("div", { children: acquirerTooltip })] }));
18
18
  const gatewayTooltipTitle = gatewayTooltip && (_jsxs(_Fragment, { children: [_jsx("div", { children: "Gateway" }), _jsx("div", { children: gatewayTooltip })] }));
19
- const chargeIcon = chargeStatus && statusIcons[chargeStatus] && (_jsx("div", Object.assign({ "data-testid": "ChargeStatusIcon_ChargeIcon", style: Object.assign({ display: 'flex', alignItems: 'center', justifyContent: 'center', width: '16px', height: '16px', borderRadius: unCapturedStatusStyle ? '50%' : '' }, iconWrapperStyles) }, { children: _jsx(StatusIcon, { src: statusIcons[chargeStatus], alt: "charge-icon", "data-testid": "ChargeStatusIcon_StatusIcon", style: Object.assign({ borderRadius: unCapturedStatusStyle ? '50%' : '', width: '16px', height: '16px' }, iconStyles) }) })));
19
+ const chargeIcon = chargeStatus && statusIcons[chargeStatus] && (_jsx(Tooltip, Object.assign({ title: t(camelCase(chargeStatus)) }, { children: _jsx("div", Object.assign({ "data-testid": "ChargeStatusIcon_ChargeIcon", style: Object.assign({ display: 'flex', alignItems: 'center', justifyContent: 'center', width: '16px', height: '16px', borderRadius: unCapturedStatusStyle ? '50%' : '' }, iconWrapperStyles) }, { children: _jsx(StatusIcon, { src: statusIcons[chargeStatus], alt: "charge-icon", "data-testid": "ChargeStatusIcon_StatusIcon", style: Object.assign({ borderRadius: unCapturedStatusStyle ? '50%' : '', width: '16px', height: '16px' }, iconStyles) }) })) })));
20
20
  if (isSheetViewShown) {
21
21
  return (_jsxs(TextViewWrapper, { children: [_jsxs(StatusChipWithCopy, Object.assign({ copyText: t(camelCase(chargeStatus)), chipIndex: chipIndex, selectionProps: selectionProps }, { children: [t(camelCase(chargeStatus)), " ", errorCode] })), unCapturedStatusStyle && (_jsxs(_Fragment, { children: [gatewayCode && (_jsxs(StatusChipWithCopy, Object.assign({ copyText: "Gateway", chipIndex: 1, selectionProps: selectionProps }, { children: ["Gateway ", gatewayCode] }))), acquirerCode && (_jsxs(StatusChipWithCopy, Object.assign({ copyText: "Acquirer", chipIndex: 2, selectionProps: selectionProps }, { children: ["Acquirer ", acquirerCode] })))] }))] }));
22
22
  }
@@ -38,15 +38,15 @@ export function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip
38
38
  border: '1px solid #F2F2F2',
39
39
  borderRadius: '12px',
40
40
  backgroundColor: '#fff',
41
- })), unCapturedStyles) }, { children: [_jsx(Tooltip, Object.assign({ title: chargeTooltipTitle !== null && chargeTooltipTitle !== void 0 ? chargeTooltipTitle : t(camelCase(chargeStatus)) }, { children: _jsxs(UnCapturedBadge, Object.assign({ "data-testid": "ChargeStatusIcon_UnCapturedBadge", sx: {
42
- borderRadius: '56px',
43
- }, initial: {
44
- background: 'transparent',
45
- }, variants: {
46
- animate: {
47
- background: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.background,
48
- },
49
- } }, { children: [chargeIcon, _jsx(ErrorCodeWrapper, Object.assign({ "data-testid": "ChargeStatusIcon_ErrorCodeWrapper", transition: {
41
+ })), unCapturedStyles) }, { children: [_jsxs(UnCapturedBadge, Object.assign({ "data-testid": "ChargeStatusIcon_UnCapturedBadge", sx: {
42
+ borderRadius: '56px',
43
+ }, initial: {
44
+ background: 'transparent',
45
+ }, variants: {
46
+ animate: {
47
+ background: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.background,
48
+ },
49
+ } }, { children: [chargeIcon, _jsx(Tooltip, Object.assign({ title: chargeTooltipTitle !== null && chargeTooltipTitle !== void 0 ? chargeTooltipTitle : t(camelCase(chargeStatus)) }, { children: _jsx(ErrorCodeWrapper, Object.assign({ "data-testid": "ChargeStatusIcon_ErrorCodeWrapper", transition: {
50
50
  animate: {
51
51
  duration: 0.05,
52
52
  },
@@ -54,5 +54,5 @@ export function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip
54
54
  padding: '0 !important',
55
55
  })) }, { children: _jsx(ErrorCodeLabel, Object.assign({ "data-testid": "ChargeStatusIcon_ErrorCodeLabel", sx: {
56
56
  background: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.color,
57
- }, transition: errorCodeLabelAnimation, variants: ErrorCodeVariants, initial: { opacity: 0 } }, { children: errorCode })) }))] })) })), _jsx(GatewaysContainer, Object.assign({ "data-testid": "ChargeStatusIcon_GatewaysContainer", transition: GatewayIconWrapperAnimationTransition, variants: GatewaysContainerAnimationVariants, style: gatewayContainerStyles, isVisible: !!gatewayTooltipTitle }, { children: gatewayTooltipTitle && (_jsx(Tooltip, Object.assign({ title: gatewayTooltipTitle }, { children: _jsx(GatewayIconWrapper, Object.assign({ "data-testid": "ChargeStatusIcon_GatewayIconWrapper", style: Object.assign({ background: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.background }, gatewayIconWrapperStyles) }, { children: _jsx(GateWayIcon, { src: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.gatewayIcon, alt: "gateway-icon", "data-testid": "ChargeStatusIcon_GatewayIcon", style: gateWayIconStyles }) })) }))) })), _jsx(GatewaysContainer, Object.assign({ "data-testid": "ChargeStatusIcon_GatewaysContainer", transition: GatewayIconWrapperAnimationTransition, variants: AcquirerContainerAnimationVariants, style: gatewayContainerStyles, isVisible: !!acquirerTooltipTitle }, { children: acquirerTooltipTitle && (_jsx(Tooltip, Object.assign({ title: acquirerTooltipTitle }, { children: _jsx(GatewayIconWrapper, Object.assign({ "data-testid": "ChargeStatusIcon_AcquirerIconWrapper", style: Object.assign({ background: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.background }, gatewayIconWrapperStyles) }, { children: _jsx(GateWayIcon, { src: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.acquirerIcon, alt: "acquirer-icon", "data-testid": "ChargeStatusIcon_AcquirerIcon", style: gateWayIconStyles }) })) }))) }))] }))) : (_jsx(Tooltip, Object.assign({ title: chargeTooltipTitle !== null && chargeTooltipTitle !== void 0 ? chargeTooltipTitle : t(camelCase(chargeStatus)) }, { children: _jsx(StatusIconWrapper, { children: chargeIcon }) }))) })));
57
+ }, transition: errorCodeLabelAnimation, variants: ErrorCodeVariants, initial: { opacity: 0 } }, { children: errorCode })) })) }))] })), _jsx(GatewaysContainer, Object.assign({ "data-testid": "ChargeStatusIcon_GatewaysContainer", transition: GatewayIconWrapperAnimationTransition, variants: GatewaysContainerAnimationVariants, style: gatewayContainerStyles, isVisible: !!gatewayTooltipTitle }, { children: gatewayTooltipTitle && (_jsx(Tooltip, Object.assign({ title: gatewayTooltipTitle }, { children: _jsx(GatewayIconWrapper, Object.assign({ "data-testid": "ChargeStatusIcon_GatewayIconWrapper", style: Object.assign({ background: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.background }, gatewayIconWrapperStyles) }, { children: _jsx(GateWayIcon, { src: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.gatewayIcon, alt: "gateway-icon", "data-testid": "ChargeStatusIcon_GatewayIcon", style: gateWayIconStyles }) })) }))) })), _jsx(GatewaysContainer, Object.assign({ "data-testid": "ChargeStatusIcon_GatewaysContainer", transition: GatewayIconWrapperAnimationTransition, variants: AcquirerContainerAnimationVariants, style: gatewayContainerStyles, isVisible: !!acquirerTooltipTitle }, { children: acquirerTooltipTitle && (_jsx(Tooltip, Object.assign({ title: acquirerTooltipTitle }, { children: _jsx(GatewayIconWrapper, Object.assign({ "data-testid": "ChargeStatusIcon_AcquirerIconWrapper", style: Object.assign({ background: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.background }, gatewayIconWrapperStyles) }, { children: _jsx(GateWayIcon, { src: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.acquirerIcon, alt: "acquirer-icon", "data-testid": "ChargeStatusIcon_AcquirerIcon", style: gateWayIconStyles }) })) }))) }))] }))) : (_jsx(Tooltip, Object.assign({ title: chargeTooltipTitle !== null && chargeTooltipTitle !== void 0 ? chargeTooltipTitle : t(camelCase(chargeStatus)) }, { children: _jsx(StatusIconWrapper, { children: chargeIcon }) }))) })));
58
58
  }
@@ -1,7 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useTranslation } from 'react-i18next';
3
- import camelCase from 'lodash/camelCase';
4
- import Tooltip from '../../../../Tooltip';
5
3
  import { unCapturedStatuses } from '../../../../../constants/index.js';
6
4
  import { ChargeStatusIcon } from '../../../../StatusIcons';
7
5
  import { RefundStatusIcon } from './RefundStatusIcon';
@@ -11,7 +9,7 @@ export function RefundStateIcon({ status, gatewayTooltip, unCapturedTooltip, acq
11
9
  // eslint-disable-next-line
12
10
  return _jsx(RefundStatusIcon, { status: status, refundTooltip: refundTooltip });
13
11
  }
14
- return (_jsx(Tooltip, Object.assign({ title: t(camelCase(status)) }, { children: _jsx(ChargeStatusIcon, { chargeStatus: status, gatewayTooltip: gatewayTooltip, chargeTooltip: unCapturedTooltip, acquirerTooltip: acquirerTooltip, errorCode: errorCode, acquirerCode: acquirerCode, gatewayCode: gatewayCode, iconWrapperStyles: {
15
- height: 17,
16
- } }) })));
12
+ return (_jsx(ChargeStatusIcon, { chargeStatus: status, gatewayTooltip: gatewayTooltip, chargeTooltip: unCapturedTooltip, acquirerTooltip: acquirerTooltip, errorCode: errorCode, acquirerCode: acquirerCode, gatewayCode: gatewayCode, iconWrapperStyles: {
13
+ height: 17,
14
+ } }));
17
15
  }
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.1.348",
4
+ "version": "0.1.352",
5
5
  "testVersion": 0,
6
6
  "type": "module",
7
7
  "main": "build/index.js",