@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.
- package/build/components/AnimatedSpinnerIcon/style.d.ts +0 -1
- package/build/components/Chip/style.d.ts +0 -1
- package/build/components/CountBadge/style.d.ts +0 -1
- package/build/components/Dialog/style.d.ts +0 -1
- package/build/components/FlippingCard/style.d.ts +0 -1
- package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
- package/build/components/JSONViewer/style.d.ts +0 -1
- package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
- package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
- package/build/components/SearchButton/styles.d.ts +0 -1
- package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
- package/build/components/StatusIcons/IssuerIcon/IssuerIcon.js +2 -1
- package/build/components/StatusIcons/SourceIcons/components/SourceIcon.d.ts +4 -5
- package/build/components/StatusIcons/SourceIcons/components/SourceIcon.js +19 -3
- package/build/components/StatusIcons/SourceIcons/style.d.ts +3 -3
- package/build/components/StatusIcons/SourceIcons/style.js +2 -6
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AgreementCell/AgreementCell.js +1 -2
- package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +266 -0
- package/build/components/TableCells/CustomCells/AgreementCell/style.js +22 -0
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/InvoiceStatusCell.js +4 -4
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SourceCell/SourceCell.d.ts +5 -3
- package/build/components/TableCells/CustomCells/SourceCell/SourceCell.js +30 -76
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAgreement/PaymentAgreement.d.ts +2 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAgreement/PaymentAgreement.js +7 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAgreement/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAgreement/index.js +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAuth/PaymentAuth.d.ts +18 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAuth/PaymentAuth.js +9 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAuth/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAuth/index.js +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/PaymentCardNumber.d.ts +10 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/PaymentCardNumber.js +12 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/index.js +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/style.d.ts +2 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/style.js +6 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentDevice/PaymentDevice.d.ts +7 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentDevice/PaymentDevice.js +7 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentDevice/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentDevice/index.js +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentInitiated/PaymentInitiated.d.ts +5 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentInitiated/PaymentInitiated.js +5 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentInitiated/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentInitiated/index.js +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentIssuer/PaymentIssuer.d.ts +7 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentIssuer/PaymentIssuer.js +7 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentIssuer/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentIssuer/index.js +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethod/PaymentMethod.d.ts +3 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethod/PaymentMethod.js +11 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethod/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethod/index.js +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentScheme/PaymentScheme.d.ts +6 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentScheme/PaymentScheme.js +11 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentScheme/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentScheme/index.js +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentType/PaymentType.d.ts +3 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentType/PaymentType.js +11 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentType/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentType/index.js +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/index.d.ts +9 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/index.js +9 -0
- package/build/components/TableCells/CustomCells/SourceCell/constant.d.ts +4 -0
- package/build/components/TableCells/CustomCells/SourceCell/constant.js +11 -0
- package/build/components/TableCells/CustomCells/SourceCell/index.d.ts +3 -2
- package/build/components/TableCells/CustomCells/SourceCell/index.js +3 -2
- package/build/components/TableCells/CustomCells/SourceCell/type.d.ts +17 -0
- package/build/components/TableCells/CustomCells/SourceCell/type.js +12 -0
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/type.d.ts +1 -1
- package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -1
- package/build/components/TableReports/style.d.ts +0 -1
- package/build/components/VirtualTables/components/style.d.ts +0 -1
- package/package.json +3 -3
- package/build/components/TableCells/CustomCells/SourceCell/style.d.ts +0 -270
- package/build/components/TableCells/CustomCells/SourceCell/style.js +0 -42
- package/build/components/TableCells/CustomCells/SourceCell/utils.d.ts +0 -1
- 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:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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 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 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 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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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,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
|
+
}
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAgreement/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentAgreement';
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAgreement/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentAgreement';
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAuth/PaymentAuth.d.ts
ADDED
|
@@ -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 {};
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAuth/PaymentAuth.js
ADDED
|
@@ -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 @@
|
|
|
1
|
+
export * from './PaymentAuth';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentAuth';
|
|
@@ -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
|
+
}
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentCardNumber';
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentCardNumber';
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/style.d.ts
ADDED
|
@@ -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,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 {};
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentDevice/PaymentDevice.js
ADDED
|
@@ -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
|
+
}
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentDevice/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentDevice';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentDevice';
|
|
@@ -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
|
+
}
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentInitiated/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentInitiated';
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentInitiated/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentInitiated';
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentIssuer/PaymentIssuer.js
ADDED
|
@@ -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
|
+
}
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentIssuer/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentIssuer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentIssuer';
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethod/PaymentMethod.js
ADDED
|
@@ -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
|
+
}
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethod/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentMethod';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentMethod';
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentScheme/PaymentScheme.js
ADDED
|
@@ -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
|
+
}
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentScheme/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentScheme';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentScheme';
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentType/PaymentType.js
ADDED
|
@@ -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 @@
|
|
|
1
|
+
export * from './PaymentType';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentType';
|
|
@@ -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
|
-
|
|
2
|
-
export
|
|
1
|
+
import SourceCell from './SourceCell';
|
|
2
|
+
export * from './components';
|
|
3
|
+
export default SourceCell;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
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 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
|
|
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;
|