@tap-payments/os-micro-frontend-shared 0.1.318 → 0.1.319-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.
Files changed (103) hide show
  1. package/build/components/AnimatedSpinnerIcon/style.d.ts +0 -1
  2. package/build/components/Chip/style.d.ts +0 -1
  3. package/build/components/CountBadge/style.d.ts +0 -1
  4. package/build/components/Dialog/style.d.ts +0 -1
  5. package/build/components/FlippingCard/style.d.ts +0 -1
  6. package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
  7. package/build/components/JSONViewer/style.d.ts +0 -1
  8. package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
  9. package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
  10. package/build/components/SearchButton/styles.d.ts +0 -1
  11. package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
  12. package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
  13. package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
  14. package/build/components/StatusIcons/IssuerIcon/IssuerIcon.js +2 -1
  15. package/build/components/StatusIcons/SourceIcons/components/SourceIcon.d.ts +4 -5
  16. package/build/components/StatusIcons/SourceIcons/components/SourceIcon.js +19 -3
  17. package/build/components/StatusIcons/SourceIcons/style.d.ts +3 -3
  18. package/build/components/StatusIcons/SourceIcons/style.js +2 -6
  19. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
  20. package/build/components/TableCells/CustomCells/AgreementCell/AgreementCell.js +1 -2
  21. package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +266 -0
  22. package/build/components/TableCells/CustomCells/AgreementCell/style.js +22 -0
  23. package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
  24. package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
  25. package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
  26. package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
  27. package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
  28. package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
  29. package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
  30. package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
  31. package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
  32. package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
  33. package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
  34. package/build/components/TableCells/CustomCells/InvoiceStatusCell/InvoiceStatusCell.js +4 -4
  35. package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
  36. package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +0 -1
  37. package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
  38. package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
  39. package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
  40. package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
  41. package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
  42. package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
  43. package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
  44. package/build/components/TableCells/CustomCells/SourceCell/SourceCell.d.ts +5 -3
  45. package/build/components/TableCells/CustomCells/SourceCell/SourceCell.js +30 -76
  46. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAgreement/PaymentAgreement.d.ts +2 -0
  47. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAgreement/PaymentAgreement.js +7 -0
  48. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAgreement/index.d.ts +1 -0
  49. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAgreement/index.js +1 -0
  50. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAuth/PaymentAuth.d.ts +18 -0
  51. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAuth/PaymentAuth.js +9 -0
  52. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAuth/index.d.ts +1 -0
  53. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAuth/index.js +1 -0
  54. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/PaymentCardNumber.d.ts +10 -0
  55. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/PaymentCardNumber.js +12 -0
  56. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/index.d.ts +1 -0
  57. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/index.js +1 -0
  58. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/style.d.ts +2 -0
  59. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/style.js +6 -0
  60. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentDevice/PaymentDevice.d.ts +7 -0
  61. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentDevice/PaymentDevice.js +7 -0
  62. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentDevice/index.d.ts +1 -0
  63. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentDevice/index.js +1 -0
  64. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentInitiated/PaymentInitiated.d.ts +5 -0
  65. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentInitiated/PaymentInitiated.js +5 -0
  66. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentInitiated/index.d.ts +1 -0
  67. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentInitiated/index.js +1 -0
  68. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentIssuer/PaymentIssuer.d.ts +7 -0
  69. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentIssuer/PaymentIssuer.js +7 -0
  70. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentIssuer/index.d.ts +1 -0
  71. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentIssuer/index.js +1 -0
  72. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethod/PaymentMethod.d.ts +3 -0
  73. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethod/PaymentMethod.js +11 -0
  74. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethod/index.d.ts +1 -0
  75. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethod/index.js +1 -0
  76. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentScheme/PaymentScheme.d.ts +6 -0
  77. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentScheme/PaymentScheme.js +11 -0
  78. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentScheme/index.d.ts +1 -0
  79. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentScheme/index.js +1 -0
  80. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentType/PaymentType.d.ts +3 -0
  81. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentType/PaymentType.js +11 -0
  82. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentType/index.d.ts +1 -0
  83. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentType/index.js +1 -0
  84. package/build/components/TableCells/CustomCells/SourceCell/components/index.d.ts +9 -0
  85. package/build/components/TableCells/CustomCells/SourceCell/components/index.js +9 -0
  86. package/build/components/TableCells/CustomCells/SourceCell/constant.d.ts +4 -0
  87. package/build/components/TableCells/CustomCells/SourceCell/constant.js +11 -0
  88. package/build/components/TableCells/CustomCells/SourceCell/index.d.ts +3 -2
  89. package/build/components/TableCells/CustomCells/SourceCell/index.js +3 -2
  90. package/build/components/TableCells/CustomCells/SourceCell/type.d.ts +17 -0
  91. package/build/components/TableCells/CustomCells/SourceCell/type.js +12 -0
  92. package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
  93. package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
  94. package/build/components/TableCells/CustomCells/style.d.ts +0 -1
  95. package/build/components/TableCells/CustomCells/type.d.ts +1 -1
  96. package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -1
  97. package/build/components/TableReports/style.d.ts +0 -1
  98. package/build/components/VirtualTables/components/style.d.ts +0 -1
  99. package/package.json +3 -3
  100. package/build/components/TableCells/CustomCells/SourceCell/style.d.ts +0 -270
  101. package/build/components/TableCells/CustomCells/SourceCell/style.js +0 -42
  102. package/build/components/TableCells/CustomCells/SourceCell/utils.d.ts +0 -1
  103. package/build/components/TableCells/CustomCells/SourceCell/utils.js +0 -8
@@ -82,8 +82,8 @@ export default function InvoiceStatusCell(_a) {
82
82
  position: 'absolute',
83
83
  left: isTextShown ? '88px' : '32px',
84
84
  width: isTextShown ? '65px' : '24px',
85
- } }, { children: chargeStatus && chargeStatusIcons[chargeStatus] && (_jsx(Tooltip, Object.assign({ title: t(camelCase(chargeStatus)) }, { children: isTextShown ? (_jsx(StatusTextLabel, Object.assign({ sx: {
86
- color: invoiceStatusStyles('VIEWED').color,
87
- backgroundColor: `${invoiceStatusStyles('VIEWED').color}0d`,
88
- } }, { children: capitalize(chargeStatus) }))) : (_jsx(ChargeStatusIcon, { chargeStatus: chargeStatus, errorCode: errorCode, chargeTooltip: chargeTooltip })) }))) }))] })) })));
85
+ } }, { children: chargeStatus && chargeStatusIcons[chargeStatus] && (_jsx(_Fragment, { children: isTextShown ? (_jsx(Tooltip, Object.assign({ title: t(camelCase(chargeStatus)) }, { children: _jsx(StatusTextLabel, Object.assign({ sx: {
86
+ color: invoiceStatusStyles('VIEWED').color,
87
+ backgroundColor: `${invoiceStatusStyles('VIEWED').color}0d`,
88
+ } }, { children: capitalize(chargeStatus) })) }))) : (_jsx(ChargeStatusIcon, { chargeStatus: chargeStatus, errorCode: errorCode, chargeTooltip: chargeTooltip })) })) }))] })) })));
89
89
  }
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const DueDateCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledDownloadFileImageWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
4
3
  isTextShown?: boolean | undefined;
5
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const ProductCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const RefundChargeCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const RefundCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const SalesChannelsContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
5
4
  hidden?: boolean | undefined;
@@ -1,3 +1,5 @@
1
- import type { SourceCellProps } from '../type';
2
- declare function SourceCell({ geographyVariant, flagIcon, payment, card, isTextShown, showGeographyBox, customerInitiated, ...props }: SourceCellProps): import("react/jsx-runtime").JSX.Element;
3
- export default SourceCell;
1
+ /// <reference types="react" />
2
+ import { StatusCellProps } from './type';
3
+ declare function SourceCell(components: StatusCellProps): import("react/jsx-runtime").JSX.Element | null;
4
+ declare const _default: import("react").MemoExoticComponent<typeof SourceCell>;
5
+ export default _default;
@@ -1,78 +1,32 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { memo, useMemo } from 'react';
3
+ import Box from '@mui/material/Box';
4
+ import { RightLeftExpandingCenterChip } from '../../../RightLeftExpandingCenterChip';
5
+ import { CENTER_ICON_KEY } from './type';
6
+ import { CENTER_ICON_PRIORITY, LEFT_ICON_PRIORITY, RIGHT_ICON_PRIORITY } from './constant';
7
+ function SourceCell(components) {
8
+ const { centerIcon, centerIconId } = useMemo(() => {
9
+ for (const key of CENTER_ICON_PRIORITY) {
10
+ if (components === null || components === void 0 ? void 0 : components[key]) {
11
+ return {
12
+ centerIcon: components === null || components === void 0 ? void 0 : components[key],
13
+ centerIconId: key,
14
+ };
15
+ }
9
16
  }
10
- return t;
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { useEffect, useRef, useState } from 'react';
14
- import camelCase from 'lodash/camelCase';
15
- import { useTranslation } from 'react-i18next';
16
- import CountryFlag from '../../../CountryFlag';
17
- import { paymentSourceAnimation } from '../../../CountBadge/style';
18
- import { ImageWrapper } from '../../../index.js';
19
- import Tooltip from '../../../Tooltip';
20
- import { TableCell } from '../../../TableCells';
21
- import { getPaymentMethodsIcon, merchantInitiatedIcon } from '../../../../constants/index.js';
22
- import { geographyMap } from '../../../../utils/index.js';
23
- import { BadgeTextWrapper, PaymentSourcesContainer, StyledSourceCell, StyledSourceImage, TextLabel } from './style';
24
- import { getPaymentMethodKey } from './utils';
25
- import { GeographyBox } from '../style';
26
- function SourceCell(_a) {
27
- var _b, _c, _d, _e;
28
- var { geographyVariant, flagIcon, payment, card, isTextShown, showGeographyBox = true, customerInitiated } = _a, props = __rest(_a, ["geographyVariant", "flagIcon", "payment", "card", "isTextShown", "showGeographyBox", "customerInitiated"]);
29
- const paymentResourcesContainer = useRef(null);
30
- const [leftOffset, setLeftOffset] = useState(0);
31
- const { t } = useTranslation();
32
- useEffect(() => {
33
- const timer = setTimeout(() => {
34
- var _a;
35
- setLeftOffset((_a = paymentResourcesContainer === null || paymentResourcesContainer === void 0 ? void 0 : paymentResourcesContainer.current) === null || _a === void 0 ? void 0 : _a.offsetLeft);
36
- }, 100);
37
- return () => {
38
- clearTimeout(timer);
39
- };
40
- }, [(_b = paymentResourcesContainer === null || paymentResourcesContainer === void 0 ? void 0 : paymentResourcesContainer.current) === null || _b === void 0 ? void 0 : _b.offsetLeft, isTextShown]);
41
- const customerInitiatedTooltip = customerInitiated === false ? t('merchantInitiated') : '';
42
- const geographyTooltip = geographyVariant ? geographyMap[geographyVariant] : undefined;
43
- const tooltip = geographyTooltip || flagIcon ? `${geographyTooltip || ''} ${geographyTooltip && flagIcon ? `-` : ''} ${flagIcon ? `${flagIcon}` : ''}` : undefined;
44
- const icon = flagIcon && _jsx(CountryFlag, { countryCode: flagIcon });
45
- const sources = [];
46
- const walletTypeIcon = (payment === null || payment === void 0 ? void 0 : payment.wallet) === 'SV Wallet' ? 'walletStoredValue' : 'walletPassThru';
47
- const type = (payment === null || payment === void 0 ? void 0 : payment.type) === 'Wallet' ? walletTypeIcon : payment === null || payment === void 0 ? void 0 : payment.type;
48
- const method = payment === null || payment === void 0 ? void 0 : payment.method;
49
- const scheme = payment === null || payment === void 0 ? void 0 : payment.scheme;
50
- if (((_c = getPaymentMethodKey(method)) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === ((_d = getPaymentMethodKey(scheme)) === null || _d === void 0 ? void 0 : _d.toLowerCase())) {
51
- sources.push(...[getPaymentMethodKey(type), getPaymentMethodKey(method)]);
52
- }
53
- else {
54
- sources.push(...[getPaymentMethodKey(type), getPaymentMethodKey(scheme), getPaymentMethodKey(method)]);
55
- }
56
- const paymentSources = (_e = sources === null || sources === void 0 ? void 0 : sources.filter((s) => !!s)) === null || _e === void 0 ? void 0 : _e.map((source, index, sourcesList) => {
57
- if (!source)
58
- return null;
59
- const ImageSrc = getPaymentMethodsIcon(source);
60
- const walletTooltip = (payment === null || payment === void 0 ? void 0 : payment.wallet) === t('sv_wallet') ? t('storedValueWallet') : t('passThruWallet');
61
- const sourceTooltip = index === sourcesList.length - 1 && !!(card === null || card === void 0 ? void 0 : card.last_four) ? `${t(camelCase(source))} - ${card === null || card === void 0 ? void 0 : card.last_four}` : t(camelCase(source));
62
- return (_jsx(Tooltip, Object.assign({ title: index === 0 && source === 'Wallet' ? walletTooltip : sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ "data-testid": "SourceCell_ImageWrapper", order: index, variants: paymentSourceAnimation(index, isTextShown ? 89 : 0), sx: Object.assign({ width: isTextShown ? '85px' : '36px' }, (isTextShown && { overflow: 'hidden', justifyContent: 'flex-start' })) }, { children: isTextShown ? (_jsx(BadgeTextWrapper, Object.assign({ "data-testid": "SourceCell_BadgeTextWrapper" }, { children: _jsx(TextLabel, Object.assign({ "data-testid": "SourceCell_TextLabel", "data-source": source }, { children: t(camelCase(source)) })) }))) : (_jsx(StyledSourceImage, { src: ImageSrc, alt: source, onError: (e) => {
63
- e.currentTarget.src = getPaymentMethodsIcon('card');
64
- } })) })) }), `${source}-${index}`));
65
- });
66
- const paymentSourcesCount = (paymentSources === null || paymentSources === void 0 ? void 0 : paymentSources.length) || 0;
67
- const geographyOffset = showGeographyBox ? 23 : 0;
68
- const customerInitiatedOffset = customerInitiatedTooltip ? 24 : 0;
69
- return (_jsx(TableCell, Object.assign({}, props, { ref: paymentResourcesContainer }, { children: _jsxs(StyledSourceCell, Object.assign({ "data-testid": "SourceCell" }, { children: [customerInitiatedTooltip && (_jsx(Tooltip, Object.assign({ title: customerInitiatedTooltip }, { children: _jsx("img", { "data-testid": "CustomerCell_merchantInitiatedIcon", src: merchantInitiatedIcon, alt: "merchant", style: {
70
- width: '16px',
71
- height: '16px',
72
- } }) }))), showGeographyBox && (_jsx(Tooltip, Object.assign({ title: tooltip }, { children: _jsx(GeographyBox, Object.assign({ variant: geographyVariant ? geographyMap[geographyVariant] : undefined, className: "geography-box", "data-testid": "SourceCell_GeographyBox", sx: {
73
- visibility: 'visible',
74
- } }, { children: isTextShown ? null : icon })) }))), leftOffset && (paymentSources === null || paymentSources === void 0 ? void 0 : paymentSources.length) > 0 ? (_jsx(PaymentSourcesContainer, Object.assign({ layout: true, className: "payment-sources-container", "data-testid": "SourceCell_PaymentSourcesContainer", whileHover: "animate", animate: "start", sourcesCount: paymentSourcesCount || 0, variants: { animate: { width: (paymentSourcesCount || 0) * (6 + 32) } }, style: Object.assign(Object.assign({}, (leftOffset && {
75
- left: (leftOffset || 0) + (isTextShown ? geographyOffset * 1.05 : geographyOffset) + customerInitiatedOffset,
76
- })), { zIndex: 30 }) }, { children: paymentSources }))) : null] })) })));
17
+ return { centerIcon: null, centerIconId: null };
18
+ }, [components]);
19
+ if (!centerIconId)
20
+ return null;
21
+ const isPaymentSchemeVisible = centerIconId !== CENTER_ICON_KEY.PAYMENT_SCHEME && components.paymentScheme;
22
+ const isPaymentCardNumberVisible = centerIconId !== CENTER_ICON_KEY.PAYMENT_CARD_NUMBER && components.paymentCardNumber;
23
+ const isPaymentTypeVisible = centerIconId !== CENTER_ICON_KEY.PAYMENT_TYPE && components.paymentType;
24
+ return (_jsx(RightLeftExpandingCenterChip, { expandedZIndex: 0, centerIcon: centerIcon, leftIcons: LEFT_ICON_PRIORITY.filter((key) => key !== centerIconId && (components === null || components === void 0 ? void 0 : components[key])).map((key) => components === null || components === void 0 ? void 0 : components[key]), rightIcons: RIGHT_ICON_PRIORITY.filter((key) => key !== centerIconId && (components === null || components === void 0 ? void 0 : components[key])).map((key) => components[key]), expandableCenterRight: (isPaymentSchemeVisible || isPaymentCardNumberVisible) && (_jsxs(Box, Object.assign({ sx: {
25
+ marginRight: '8px',
26
+ display: 'flex',
27
+ alignItems: 'center',
28
+ gap: '4px',
29
+ // minWidth: isPaymentSchemeVisible && isPaymentCardNumberVisible ? 45 : 20
30
+ } }, { children: [isPaymentSchemeVisible && components.paymentScheme, isPaymentCardNumberVisible && components.paymentCardNumber] }))), expandableCenterLeft: isPaymentTypeVisible && _jsx(Box, Object.assign({ sx: { marginLeft: '8px', width: 20 } }, { children: components.paymentType })) }));
77
31
  }
78
- export default SourceCell;
32
+ export default memo(SourceCell);
@@ -0,0 +1,2 @@
1
+ import { AgreementIconProps } from '../../../../../index.js';
2
+ export declare function PaymentAgreement({ type, hasSavedCard, totalPaymentsCount }: AgreementIconProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { AgreementIcon } from '../../../../../index.js';
3
+ export function PaymentAgreement({ type, hasSavedCard, totalPaymentsCount }) {
4
+ if (!type)
5
+ return null;
6
+ return _jsx(AgreementIcon, { type: type, hasSavedCard: hasSavedCard, totalPaymentsCount: totalPaymentsCount });
7
+ }
@@ -0,0 +1 @@
1
+ export * from './PaymentAgreement';
@@ -0,0 +1,18 @@
1
+ import { AuthenticationStatus } from '../../../../../../types/index.js';
2
+ import { AuthenticationType } from '../../../../../index.js';
3
+ interface PaymentAuthProps {
4
+ authType?: AuthenticationType;
5
+ isECIShown?: boolean;
6
+ isAuthenticationTypeShown?: boolean;
7
+ authentication?: {
8
+ acsEci: string;
9
+ transaction_status: 'Y' | 'A' | 'N' | 'R' | 'U';
10
+ id: string;
11
+ status: AuthenticationStatus;
12
+ threeDSecure?: {
13
+ status: AuthenticationStatus;
14
+ };
15
+ };
16
+ }
17
+ export declare function PaymentAuth({ authType, authentication, isECIShown, isAuthenticationTypeShown }: PaymentAuthProps): import("react/jsx-runtime").JSX.Element | null;
18
+ export {};
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { AuthIcons } from '../../../../../index.js';
3
+ export function PaymentAuth({ authType, authentication, isECIShown, isAuthenticationTypeShown }) {
4
+ var _a;
5
+ const eci = authentication === null || authentication === void 0 ? void 0 : authentication.acsEci;
6
+ if (!eci && !authType)
7
+ return null;
8
+ return (_jsx(AuthIcons, { transactionStatus: (authentication === null || authentication === void 0 ? void 0 : authentication.status) || ((_a = authentication === null || authentication === void 0 ? void 0 : authentication.threeDSecure) === null || _a === void 0 ? void 0 : _a.status), eci: isECIShown ? eci : undefined, authType: isAuthenticationTypeShown ? authType : undefined }));
9
+ }
@@ -0,0 +1,10 @@
1
+ interface PaymentCardNumberProps {
2
+ card: {
3
+ last_four: string;
4
+ };
5
+ paymentMethod?: string;
6
+ paymentScheme?: string;
7
+ paymentType?: string;
8
+ }
9
+ export declare function PaymentCardNumber({ card, paymentMethod, paymentType, paymentScheme }: PaymentCardNumberProps): import("react/jsx-runtime").JSX.Element | null;
10
+ export {};
@@ -0,0 +1,12 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { useTranslation } from 'react-i18next';
3
+ import camelCase from 'lodash/camelCase';
4
+ import { Tooltip } from '../../../../../index.js';
5
+ import { Number } from './style';
6
+ export function PaymentCardNumber({ card, paymentMethod, paymentType, paymentScheme }) {
7
+ const { t } = useTranslation();
8
+ if (!card.last_four)
9
+ return null;
10
+ const title = `${t(camelCase(paymentMethod !== paymentScheme ? paymentScheme : paymentType))} - ${card === null || card === void 0 ? void 0 : card.last_four}`;
11
+ return (_jsx(Tooltip, Object.assign({ title: title }, { children: _jsxs(Number, { children: ["\u00B7\u00B7\u00B7 ", card === null || card === void 0 ? void 0 : card.last_four] }) })));
12
+ }
@@ -0,0 +1 @@
1
+ export * from './PaymentCardNumber';
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const Number: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -0,0 +1,6 @@
1
+ import { styled } from '@mui/material/styles';
2
+ export const Number = styled('span')(({ theme }) => ({
3
+ fontSize: '10px',
4
+ fontWeight: 500,
5
+ color: theme.palette.text.primary
6
+ }));
@@ -0,0 +1,7 @@
1
+ interface PaymentDeviceProps {
2
+ deviceType?: 'DESKTOP' | 'PHONE' | 'TABLET';
3
+ deviceCountry?: string;
4
+ regionCode?: string;
5
+ }
6
+ export declare function PaymentDevice({ deviceType, deviceCountry, regionCode }: PaymentDeviceProps): import("react/jsx-runtime").JSX.Element | null;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DeviceIconChip, isDeviceIconShown } from '../../../../../index.js';
3
+ export function PaymentDevice({ deviceType, deviceCountry, regionCode }) {
4
+ if (!isDeviceIconShown(deviceType) && !regionCode)
5
+ return null;
6
+ return _jsx(DeviceIconChip, { deviceType: deviceType, deviceCountry: deviceCountry });
7
+ }
@@ -0,0 +1,5 @@
1
+ interface PaymentInitiatedProps {
2
+ isCustomerInitiated: boolean;
3
+ }
4
+ export declare function PaymentInitiated({ isCustomerInitiated }: PaymentInitiatedProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { CustomerInitiatedIcon } from '../../../../../index.js';
3
+ export function PaymentInitiated({ isCustomerInitiated }) {
4
+ return _jsx(_Fragment, { children: isCustomerInitiated === false && _jsx(CustomerInitiatedIcon, {}) });
5
+ }
@@ -0,0 +1 @@
1
+ export * from './PaymentInitiated';
@@ -0,0 +1,7 @@
1
+ interface PaymentIssuerProps {
2
+ countryCode?: string;
3
+ cardNumber?: string;
4
+ bankName?: string;
5
+ }
6
+ export declare function PaymentIssuer({ countryCode, cardNumber, bankName }: PaymentIssuerProps): import("react/jsx-runtime").JSX.Element | null;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { IssuerIcon } from '../../../../../index.js';
3
+ export function PaymentIssuer({ countryCode, cardNumber, bankName }) {
4
+ if (!countryCode && !cardNumber && !bankName)
5
+ return null;
6
+ return _jsx(IssuerIcon, { countryCode: countryCode, cardNumber: cardNumber, bankName: bankName });
7
+ }
@@ -0,0 +1,3 @@
1
+ export declare function PaymentMethod({ method }: {
2
+ method?: string;
3
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import camelCase from 'lodash/camelCase';
3
+ import { useTranslation } from 'react-i18next';
4
+ import { getPaymentMethodKey, SourceIcon } from '../../../../../index.js';
5
+ export function PaymentMethod({ method }) {
6
+ var _a;
7
+ const { t } = useTranslation();
8
+ if (!method)
9
+ return null;
10
+ return _jsx(SourceIcon, { source: (_a = getPaymentMethodKey(method)) !== null && _a !== void 0 ? _a : method, title: `Payment Method - ${t(camelCase(method))}` });
11
+ }
@@ -0,0 +1,6 @@
1
+ interface PaymentSchemeProps {
2
+ scheme: string;
3
+ method: string;
4
+ }
5
+ export declare function PaymentScheme({ scheme, method }: PaymentSchemeProps): import("react/jsx-runtime").JSX.Element | null;
6
+ export {};
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useTranslation } from 'react-i18next';
3
+ import camelCase from 'lodash/camelCase';
4
+ import { SourceIcon, getPaymentMethodKey } from '../../../../../index.js';
5
+ export function PaymentScheme({ scheme, method }) {
6
+ var _a;
7
+ const { t } = useTranslation();
8
+ if (!scheme || method === scheme)
9
+ return null;
10
+ return _jsx(SourceIcon, { source: (_a = getPaymentMethodKey(scheme)) !== null && _a !== void 0 ? _a : scheme, title: `Payment Scheme - ${t(camelCase(scheme))}` });
11
+ }
@@ -0,0 +1,3 @@
1
+ export declare function PaymentType({ type }: {
2
+ type?: string;
3
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import camelCase from 'lodash/camelCase';
3
+ import { useTranslation } from 'react-i18next';
4
+ import { getPaymentMethodKey, SourceIcon } from '../../../../../index.js';
5
+ export function PaymentType({ type }) {
6
+ var _a, _b;
7
+ const { t } = useTranslation();
8
+ if (!type)
9
+ return null;
10
+ return _jsx(SourceIcon, { source: (_b = (_a = getPaymentMethodKey(type)) !== null && _a !== void 0 ? _a : type) !== null && _b !== void 0 ? _b : '', title: `Payment Type - ${t(camelCase(type))}` });
11
+ }
@@ -0,0 +1,9 @@
1
+ export * from './PaymentCardNumber';
2
+ export * from './PaymentMethod';
3
+ export * from './PaymentType';
4
+ export * from './PaymentScheme';
5
+ export * from './PaymentAgreement';
6
+ export * from './PaymentAuth';
7
+ export * from './PaymentDevice';
8
+ export * from './PaymentIssuer';
9
+ export * from './PaymentInitiated';
@@ -0,0 +1,9 @@
1
+ export * from './PaymentCardNumber';
2
+ export * from './PaymentMethod';
3
+ export * from './PaymentType';
4
+ export * from './PaymentScheme';
5
+ export * from './PaymentAgreement';
6
+ export * from './PaymentAuth';
7
+ export * from './PaymentDevice';
8
+ export * from './PaymentIssuer';
9
+ export * from './PaymentInitiated';
@@ -0,0 +1,4 @@
1
+ import { CENTER_ICON_KEY } from './type';
2
+ export declare const RIGHT_ICON_PRIORITY: readonly [CENTER_ICON_KEY.PAYMENT_AUTH, CENTER_ICON_KEY.PAYMENT_AGREEMENT];
3
+ export declare const LEFT_ICON_PRIORITY: readonly [CENTER_ICON_KEY.PAYMENT_ISSUER, CENTER_ICON_KEY.PAYMENT_INITIATED, CENTER_ICON_KEY.PAYMENT_DEVICE];
4
+ export declare const CENTER_ICON_PRIORITY: readonly [CENTER_ICON_KEY.PAYMENT_METHOD, CENTER_ICON_KEY.PAYMENT_TYPE, CENTER_ICON_KEY.PAYMENT_SCHEME, CENTER_ICON_KEY.PAYMENT_CARD_NUMBER, CENTER_ICON_KEY.PAYMENT_ISSUER, CENTER_ICON_KEY.PAYMENT_INITIATED, CENTER_ICON_KEY.PAYMENT_DEVICE, CENTER_ICON_KEY.PAYMENT_AUTH, CENTER_ICON_KEY.PAYMENT_AGREEMENT];
@@ -0,0 +1,11 @@
1
+ import { CENTER_ICON_KEY } from './type';
2
+ export const RIGHT_ICON_PRIORITY = [CENTER_ICON_KEY.PAYMENT_AUTH, CENTER_ICON_KEY.PAYMENT_AGREEMENT];
3
+ export const LEFT_ICON_PRIORITY = [CENTER_ICON_KEY.PAYMENT_ISSUER, CENTER_ICON_KEY.PAYMENT_INITIATED, CENTER_ICON_KEY.PAYMENT_DEVICE];
4
+ export const CENTER_ICON_PRIORITY = [
5
+ CENTER_ICON_KEY.PAYMENT_METHOD,
6
+ CENTER_ICON_KEY.PAYMENT_TYPE,
7
+ CENTER_ICON_KEY.PAYMENT_SCHEME,
8
+ CENTER_ICON_KEY.PAYMENT_CARD_NUMBER,
9
+ ...LEFT_ICON_PRIORITY,
10
+ ...RIGHT_ICON_PRIORITY,
11
+ ];
@@ -1,2 +1,3 @@
1
- export { default as SourceCell } from './SourceCell';
2
- export { StyledSourceImage } from './style';
1
+ import SourceCell from './SourceCell';
2
+ export * from './components';
3
+ export default SourceCell;
@@ -1,2 +1,3 @@
1
- export { default as SourceCell } from './SourceCell';
2
- export { StyledSourceImage } from './style';
1
+ import SourceCell from './SourceCell';
2
+ export * from './components';
3
+ export default SourceCell;
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import { CENTER_ICON_PRIORITY } from './constant';
3
+ export declare enum CENTER_ICON_KEY {
4
+ PAYMENT_METHOD = "paymentMethod",
5
+ PAYMENT_TYPE = "paymentType",
6
+ PAYMENT_SCHEME = "paymentScheme",
7
+ PAYMENT_CARD_NUMBER = "paymentCardNumber",
8
+ PAYMENT_ISSUER = "paymentIssuer",
9
+ PAYMENT_INITIATED = "paymentInitiated",
10
+ PAYMENT_DEVICE = "paymentDevice",
11
+ PAYMENT_AUTH = "paymentAuth",
12
+ PAYMENT_AGREEMENT = "paymentAgreement"
13
+ }
14
+ export type CenterIconPropName = (typeof CENTER_ICON_PRIORITY)[number];
15
+ export type StatusCellProps = {
16
+ [K in CenterIconPropName]?: React.ReactNode;
17
+ };
@@ -0,0 +1,12 @@
1
+ export var CENTER_ICON_KEY;
2
+ (function (CENTER_ICON_KEY) {
3
+ CENTER_ICON_KEY["PAYMENT_METHOD"] = "paymentMethod";
4
+ CENTER_ICON_KEY["PAYMENT_TYPE"] = "paymentType";
5
+ CENTER_ICON_KEY["PAYMENT_SCHEME"] = "paymentScheme";
6
+ CENTER_ICON_KEY["PAYMENT_CARD_NUMBER"] = "paymentCardNumber";
7
+ CENTER_ICON_KEY["PAYMENT_ISSUER"] = "paymentIssuer";
8
+ CENTER_ICON_KEY["PAYMENT_INITIATED"] = "paymentInitiated";
9
+ CENTER_ICON_KEY["PAYMENT_DEVICE"] = "paymentDevice";
10
+ CENTER_ICON_KEY["PAYMENT_AUTH"] = "paymentAuth";
11
+ CENTER_ICON_KEY["PAYMENT_AGREEMENT"] = "paymentAgreement";
12
+ })(CENTER_ICON_KEY || (CENTER_ICON_KEY = {}));
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<{
4
3
  width?: string | number | undefined;
5
4
  height?: string | number | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const GeographyBox: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
4
3
  variant?: "Global" | "Regional" | "Local" | undefined;
5
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -4,7 +4,7 @@ import type { Charge, TableMode } from '../../../types/index.js';
4
4
  import { getGeographyBoxColor } from '../../../utils/index.js';
5
5
  import type { ActionType, FlagType } from './ActionCell';
6
6
  export type GeographyBoxVariant = keyof ReturnType<typeof getGeographyBoxColor>;
7
- export type PaymentMethod = 'VISA' | 'card' | 'MASTERCARD' | 'APPLE_PAY' | 'KNET' | 'MADA';
7
+ export type PaymentMethods = 'VISA' | 'card' | 'MASTERCARD' | 'APPLE_PAY' | 'KNET' | 'MADA';
8
8
  export interface DateCellBaseProps extends TableCellProps {
9
9
  value: string | Date;
10
10
  format?: object;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const Button: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  type ExportButtonProps = {
4
3
  notificationState?: {
5
4
  success: boolean;