@tap-payments/os-micro-frontend-shared 0.1.348 → 0.1.352-test.2
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/ChargeStatusIcon.js +11 -11
- package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
- package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
- 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/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/components/RefundStateIcon.js +3 -5
- 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 +24 -76
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumberSource/PaymentCardNumberSource.d.ts +10 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumberSource/PaymentCardNumberSource.js +13 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumberSource/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumberSource/index.js +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumberSource/style.d.ts +2 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumberSource/style.js +6 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethodSource/PaymentMethodSource.d.ts +3 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethodSource/PaymentMethodSource.js +11 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethodSource/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethodSource/index.js +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentSchemeSource/PaymentSchemeSource.d.ts +5 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentSchemeSource/PaymentSchemeSource.js +11 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentSchemeSource/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentSchemeSource/index.js +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentTypeSource/PaymentTypeSource.d.ts +3 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentTypeSource/PaymentTypeSource.js +11 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentTypeSource/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/PaymentTypeSource/index.js +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/index.d.ts +4 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/index.js +4 -0
- package/build/components/TableCells/CustomCells/SourceCell/constant.d.ts +4 -0
- package/build/components/TableCells/CustomCells/SourceCell/constant.js +15 -0
- package/build/components/TableCells/CustomCells/SourceCell/index.d.ts +1 -1
- package/build/components/TableCells/CustomCells/SourceCell/index.js +1 -1
- package/build/components/TableCells/CustomCells/SourceCell/style.d.ts +6 -269
- package/build/components/TableCells/CustomCells/SourceCell/style.js +8 -38
- 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/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/utils.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SourceCell/utils.js +0 -8
package/build/components/TableCells/CustomCells/RefundStatusCell/components/RefundStateIcon.js
CHANGED
|
@@ -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(
|
|
15
|
-
|
|
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
|
}
|
|
@@ -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,26 @@
|
|
|
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 { RightLeftExpandingCenterChip } from '../../../index.js';
|
|
4
|
+
import { CENTER_ICON_KEY } from './type';
|
|
5
|
+
import { CENTER_ICON_PRIORITY, LEFT_ICON_PRIORITY, RIGHT_ICON_PRIORITY } from './constant';
|
|
6
|
+
import { ExpandableCenterRight, ExpandableCenterLeft } from './style';
|
|
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
|
-
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 === null || components === void 0 ? void 0 : components[key]), expandableCenterRight: (isPaymentSchemeVisible || isPaymentCardNumberVisible) && (_jsxs(ExpandableCenterRight, { children: [isPaymentSchemeVisible && components.paymentScheme, isPaymentCardNumberVisible && components.paymentCardNumber] })), expandableCenterLeft: isPaymentTypeVisible && _jsx(ExpandableCenterLeft, { children: components.paymentType }) }));
|
|
77
25
|
}
|
|
78
|
-
export default SourceCell;
|
|
26
|
+
export default memo(SourceCell);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface PaymentCardNumberSourceProps {
|
|
2
|
+
card: {
|
|
3
|
+
last_four: string;
|
|
4
|
+
};
|
|
5
|
+
paymentMethod?: string;
|
|
6
|
+
paymentScheme?: string;
|
|
7
|
+
paymentType?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function PaymentCardNumberSource({ card, paymentMethod, paymentType, paymentScheme }: PaymentCardNumberSourceProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
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 { isSamePaymentSource } from '../../../../../../utils/index.js';
|
|
6
|
+
import { Number } from './style';
|
|
7
|
+
export function PaymentCardNumberSource({ card, paymentMethod, paymentType, paymentScheme }) {
|
|
8
|
+
const { t } = useTranslation();
|
|
9
|
+
if (!card.last_four)
|
|
10
|
+
return null;
|
|
11
|
+
const title = `${t(camelCase(isSamePaymentSource(paymentMethod, paymentScheme) ? paymentType : paymentScheme))} - ${card === null || card === void 0 ? void 0 : card.last_four}`;
|
|
12
|
+
return (_jsx(Tooltip, Object.assign({ title: title }, { children: _jsxs(Number, { children: ["\u00B7\u00B7\u00B7 ", card === null || card === void 0 ? void 0 : card.last_four] }) })));
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentCardNumberSource';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentCardNumberSource';
|
|
@@ -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,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 PaymentMethodSource({ 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/PaymentMethodSource/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentMethodSource';
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethodSource/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentMethodSource';
|
|
@@ -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 PaymentSchemeSource({ scheme }) {
|
|
6
|
+
var _a;
|
|
7
|
+
const { t } = useTranslation();
|
|
8
|
+
if (!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/PaymentSchemeSource/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentSchemeSource';
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentSchemeSource/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentSchemeSource';
|
|
@@ -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 PaymentTypeSource({ 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
|
+
}
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentTypeSource/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentTypeSource';
|
package/build/components/TableCells/CustomCells/SourceCell/components/PaymentTypeSource/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PaymentTypeSource';
|
|
@@ -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,15 @@
|
|
|
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 = [
|
|
4
|
+
CENTER_ICON_KEY.PAYMENT_ISSUER,
|
|
5
|
+
CENTER_ICON_KEY.PAYMENT_INITIATED,
|
|
6
|
+
CENTER_ICON_KEY.PAYMENT_DEVICE
|
|
7
|
+
];
|
|
8
|
+
export const CENTER_ICON_PRIORITY = [
|
|
9
|
+
CENTER_ICON_KEY.PAYMENT_METHOD,
|
|
10
|
+
CENTER_ICON_KEY.PAYMENT_TYPE,
|
|
11
|
+
CENTER_ICON_KEY.PAYMENT_SCHEME,
|
|
12
|
+
CENTER_ICON_KEY.PAYMENT_CARD_NUMBER,
|
|
13
|
+
...LEFT_ICON_PRIORITY,
|
|
14
|
+
...RIGHT_ICON_PRIORITY
|
|
15
|
+
];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as SourceCell } from './SourceCell';
|
|
2
|
-
export
|
|
2
|
+
export * from './components';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as SourceCell } from './SourceCell';
|
|
2
|
-
export
|
|
2
|
+
export * from './components';
|