@tap-payments/os-micro-frontend-shared 0.0.299 → 0.0.301-test.6
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/MaskedText/MaskedText.js +1 -3
- package/build/components/StatusIcons/ChargeStatusIcon/ChargeStatusIcon.d.ts +1 -3
- package/build/components/StatusIcons/ChargeStatusIcon/ChargeStatusIcon.js +2 -8
- package/build/components/StatusIcons/PayoutIcon/PayoutIcon.d.ts +1 -3
- package/build/components/StatusIcons/PayoutIcon/PayoutIcon.js +2 -8
- package/build/components/StatusIcons/RefundIcon/RefundIcon.d.ts +1 -3
- package/build/components/StatusIcons/RefundIcon/RefundIcon.js +1 -6
- package/build/components/TableCells/CustomCells/SegmentsCell/SegmentsCell.js +1 -1
- package/build/components/TableCells/CustomCells/StatusCell/constant.d.ts +0 -34
- package/build/components/TableCells/CustomCells/StatusCell/constant.js +0 -30
- package/build/components/VirtualTable/SheetView/components/SheetViewTableRowLoading.d.ts +2 -1
- package/build/components/VirtualTable/SheetView/components/SheetViewTableRowLoading.js +6 -4
- package/build/components/VirtualTable/components/virtualScroll/ListItemWrapper.d.ts +5 -2
- package/build/components/VirtualTable/components/virtualScroll/ListItemWrapper.js +37 -6
- package/build/components/index.d.ts +0 -1
- package/build/components/index.js +0 -1
- package/build/constants/table/cell/chargeTableCellWidth.d.ts +12 -12
- package/build/constants/table/cell/chargeTableCellWidth.js +12 -12
- package/package.json +3 -3
- package/build/components/SourceChips/AuthenticationChip/AuthenticationChip.d.ts +0 -7
- package/build/components/SourceChips/AuthenticationChip/AuthenticationChip.js +0 -31
- package/build/components/SourceChips/AuthenticationChip/constants.d.ts +0 -30
- package/build/components/SourceChips/AuthenticationChip/constants.js +0 -25
- package/build/components/SourceChips/AuthenticationChip/index.d.ts +0 -3
- package/build/components/SourceChips/AuthenticationChip/index.js +0 -2
- package/build/components/SourceChips/GeographyChip/GeographyChip.d.ts +0 -7
- package/build/components/SourceChips/GeographyChip/GeographyChip.js +0 -22
- package/build/components/SourceChips/GeographyChip/constants.d.ts +0 -16
- package/build/components/SourceChips/GeographyChip/constants.js +0 -11
- package/build/components/SourceChips/GeographyChip/index.d.ts +0 -2
- package/build/components/SourceChips/GeographyChip/index.js +0 -2
- package/build/components/SourceChips/PaymentAgreementChip/PaymentAgreementChip.d.ts +0 -7
- package/build/components/SourceChips/PaymentAgreementChip/PaymentAgreementChip.js +0 -21
- package/build/components/SourceChips/PaymentAgreementChip/constants.d.ts +0 -21
- package/build/components/SourceChips/PaymentAgreementChip/constants.js +0 -16
- package/build/components/SourceChips/PaymentAgreementChip/index.d.ts +0 -3
- package/build/components/SourceChips/PaymentAgreementChip/index.js +0 -2
- package/build/components/SourceChips/index.d.ts +0 -3
- package/build/components/SourceChips/index.js +0 -3
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import StatusChip from '../StatusChip';
|
|
3
|
-
import { Box, useTheme } from '@mui/material';
|
|
4
3
|
import { passwordDotsIcon } from '../../constants/index.js';
|
|
5
4
|
const MaskedText = ({ text, startLength = 8, endLength = 4 }) => {
|
|
6
|
-
const theme = useTheme();
|
|
7
5
|
const startText = text.slice(0, startLength);
|
|
8
6
|
const endText = text.slice(text.length - endLength);
|
|
9
|
-
return (_jsxs(
|
|
7
|
+
return (_jsxs(StatusChip, Object.assign({ sx: { display: 'flex', alignItems: 'center', gap: '4px' } }, { children: [startText, _jsx("img", { src: passwordDotsIcon, alt: "passwordDots" }), endText] })));
|
|
10
8
|
};
|
|
11
9
|
export default MaskedText;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { type ChargeStatus } from '../../TableCells';
|
|
3
|
-
|
|
4
|
-
export declare function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip, chargeTooltip, errorCode, isTextShown, gatewayCode, acquirerCode, unCapturedStyles, iconStyles, iconWrapperStyles, gatewayIconWrapperStyles, gatewayContainerStyles, gateWayIconStyles, tableMode, showBadge, }: Readonly<{
|
|
3
|
+
export declare function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip, chargeTooltip, errorCode, isTextShown, gatewayCode, acquirerCode, unCapturedStyles, iconStyles, iconWrapperStyles, gatewayIconWrapperStyles, gatewayContainerStyles, gateWayIconStyles, showBadge, }: Readonly<{
|
|
5
4
|
chargeStatus?: ChargeStatus;
|
|
6
5
|
gatewayTooltip?: string;
|
|
7
6
|
showAuthorizedStatus?: boolean;
|
|
@@ -18,5 +17,4 @@ export declare function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquire
|
|
|
18
17
|
gatewayContainerStyles?: CSSProperties;
|
|
19
18
|
gateWayIconStyles?: CSSProperties;
|
|
20
19
|
showBadge?: boolean;
|
|
21
|
-
tableMode?: TableMode;
|
|
22
20
|
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,23 +5,17 @@ import { useTranslation } from 'react-i18next';
|
|
|
5
5
|
import Tooltip from '../../Tooltip';
|
|
6
6
|
import { unCapturedStatuses } from '../../../constants/index.js';
|
|
7
7
|
import { AcquirerContainerAnimationVariants, ErrorCodeLabel, ErrorCodeLabelAnimationVariants, ErrorCodeVariants, ErrorCodeWrapper, GateWayIcon, GatewayIconWrapper, GatewayIconWrapperAnimationTransition, GatewaysContainer, GatewaysContainerAnimationVariants, StatusTextLabel, UnCapturedBadge, UnCapturedContainer, errorCodeLabelAnimation, TextViewWrapper, } from './style';
|
|
8
|
-
import { capturedStatusesStyles, unCapturedStatusesStyles, statusIcons
|
|
8
|
+
import { capturedStatusesStyles, unCapturedStatusesStyles, statusIcons } from '../../TableCells/CustomCells/StatusCell/constant';
|
|
9
9
|
import { StatusIcon, StatusIconWrapper, TextLabel } from '../../TableCells/CustomCells/style';
|
|
10
|
-
|
|
11
|
-
export function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip, chargeTooltip, errorCode, isTextShown, gatewayCode, acquirerCode, unCapturedStyles, iconStyles, iconWrapperStyles, gatewayIconWrapperStyles, gatewayContainerStyles, gateWayIconStyles, tableMode, showBadge = true, }) {
|
|
10
|
+
export function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip, chargeTooltip, errorCode, isTextShown, gatewayCode, acquirerCode, unCapturedStyles, iconStyles, iconWrapperStyles, gatewayIconWrapperStyles, gatewayContainerStyles, gateWayIconStyles, showBadge = true, }) {
|
|
12
11
|
const unCapturedStatusStyle = chargeStatus ? unCapturedStatusesStyles[chargeStatus] : null;
|
|
13
12
|
const captureStatusStyle = chargeStatus ? capturedStatusesStyles[chargeStatus] : null;
|
|
14
|
-
const sheetViewStatusStyle = chargeStatus ? chargeSheetViewChipStyles[chargeStatus] : {};
|
|
15
13
|
const theme = useTheme();
|
|
16
14
|
const { t } = useTranslation();
|
|
17
15
|
const chargeTooltipTitle = chargeTooltip && (_jsx(_Fragment, { children: _jsx("div", { children: chargeTooltip }) }));
|
|
18
16
|
const acquirerTooltipTitle = acquirerTooltip && (_jsxs(_Fragment, { children: [_jsx("div", { children: "Acquirer" }), _jsx("div", { children: acquirerTooltip })] }));
|
|
19
17
|
const gatewayTooltipTitle = gatewayTooltip && (_jsxs(_Fragment, { children: [_jsx("div", { children: "Gateway" }), _jsx("div", { children: gatewayTooltip })] }));
|
|
20
18
|
const chargeIcon = chargeStatus && statusIcons[chargeStatus] && (_jsx("div", Object.assign({ "data-testid": "ChargeStatusIcon_ChargeIcon", style: Object.assign({ display: 'flex', alignItems: 'center', justifyContent: 'center', width: '16px', height: '16px', borderRadius: unCapturedStatusStyle ? '50%' : '' }, iconWrapperStyles) }, { children: _jsx(StatusIcon, { src: statusIcons[chargeStatus], alt: "charge-icon", "data-testid": "ChargeStatusIcon_StatusIcon", style: Object.assign({ borderRadius: unCapturedStatusStyle ? '50%' : '', width: '16px', height: '16px' }, iconStyles) }) })));
|
|
21
|
-
if (tableMode === 'sheet') {
|
|
22
|
-
const { background, color, border } = sheetViewStatusStyle;
|
|
23
|
-
return _jsx(StatusChip, Object.assign({ sx: { background, color, border } }, { children: t(camelCase(chargeStatus)) }));
|
|
24
|
-
}
|
|
25
19
|
if (isTextShown) {
|
|
26
20
|
return (_jsxs(TextViewWrapper, { children: [_jsx(Tooltip, Object.assign({ title: chargeTooltipTitle }, { children: _jsxs(StatusTextLabel, Object.assign({ "data-testid": "ChargeStatusIcon_isTextShown", "data-status": camelCase(chargeStatus), sx: {
|
|
27
21
|
background: (unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.background) || (captureStatusStyle === null || captureStatusStyle === void 0 ? void 0 : captureStatusStyle.background) || 'transparent',
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { PayoutStatusType } from '../../TableCells';
|
|
3
|
-
import { TableMode } from '../../../types/index.js';
|
|
4
3
|
type PayoutIconProps = {
|
|
5
4
|
iconStyles?: React.CSSProperties;
|
|
6
5
|
payoutStatus?: PayoutStatusType;
|
|
7
6
|
payoutTooltip?: React.ReactNode;
|
|
8
7
|
isTextShown?: boolean;
|
|
9
|
-
tableMode?: TableMode;
|
|
10
8
|
};
|
|
11
|
-
export declare const PayoutIcon: ({ payoutStatus,
|
|
9
|
+
export declare const PayoutIcon: ({ payoutStatus, isTextShown, payoutTooltip, iconStyles }: PayoutIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
10
|
export {};
|
|
@@ -4,15 +4,9 @@ import { useTranslation } from 'react-i18next';
|
|
|
4
4
|
import Tooltip from '../../Tooltip';
|
|
5
5
|
import { StatusIcon } from '../../TableCells/CustomCells/style';
|
|
6
6
|
import { StatusTextLabel } from '../../TableCells/CustomCells/InvoiceStatusCell/style';
|
|
7
|
-
import { payoutStatusIcons
|
|
8
|
-
|
|
9
|
-
export const PayoutIcon = ({ payoutStatus = 'PENDING', tableMode, isTextShown, payoutTooltip, iconStyles }) => {
|
|
7
|
+
import { payoutStatusIcons } from '../../TableCells/CustomCells/StatusCell/constant';
|
|
8
|
+
export const PayoutIcon = ({ payoutStatus = 'PENDING', isTextShown, payoutTooltip, iconStyles }) => {
|
|
10
9
|
const { t } = useTranslation();
|
|
11
|
-
const payoutStatusStyle = payoutStatusStyles[payoutStatus];
|
|
12
|
-
if (tableMode === 'sheet') {
|
|
13
|
-
const chipText = payoutStatus === 'PENDING' ? t('scheduledPayout') : t(camelCase(payoutStatus));
|
|
14
|
-
return _jsx(StatusChip, Object.assign({ sx: Object.assign({}, payoutStatusStyle) }, { children: chipText }));
|
|
15
|
-
}
|
|
16
10
|
const title = payoutTooltip ? payoutTooltip : t(camelCase(payoutStatus));
|
|
17
11
|
return (_jsx(Tooltip, Object.assign({ title: title }, { children: isTextShown ? (_jsx(StatusTextLabel, Object.assign({ "data-testid": "StatusCell_PayoutStatusLabel" }, { children: t(camelCase(payoutStatus)) }))) : (_jsx(StatusIcon, { src: payoutStatusIcons[payoutStatus], alt: "settled-icon", "data-testid": "StatusCell_PayoutStatusIcon", style: iconStyles })) })));
|
|
18
12
|
};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type RefundStatusType } from '../../TableCells';
|
|
3
|
-
import { TableMode } from '../../../types/index.js';
|
|
4
3
|
type RefundIconProps = {
|
|
5
4
|
iconStyles?: React.CSSProperties;
|
|
6
5
|
refundStatus?: RefundStatusType;
|
|
7
6
|
refundTooltip?: React.ReactNode;
|
|
8
7
|
refundCount?: number;
|
|
9
8
|
isTextShown?: boolean;
|
|
10
|
-
tableMode?: TableMode;
|
|
11
9
|
};
|
|
12
|
-
declare const RefundIcon: ({ isTextShown, refundStatus, refundTooltip, refundCount, iconStyles
|
|
10
|
+
declare const RefundIcon: ({ isTextShown, refundStatus, refundTooltip, refundCount, iconStyles }: RefundIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
11
|
export default RefundIcon;
|
|
@@ -8,8 +8,7 @@ import { MultiRefundContainer, MultiRefundIcon, RefundsCountBadge } from '../../
|
|
|
8
8
|
import { StatusIcon } from '../../TableCells/CustomCells/style';
|
|
9
9
|
import { StatusTextLabel } from '../../TableCells/CustomCells/InvoiceStatusCell/style';
|
|
10
10
|
import { refundStatusIcons, refundStyles } from '../../TableCells/CustomCells/StatusCell/constant';
|
|
11
|
-
|
|
12
|
-
const RefundIcon = ({ isTextShown, refundStatus = 'PENDING', refundTooltip = '', refundCount, iconStyles, tableMode }) => {
|
|
11
|
+
const RefundIcon = ({ isTextShown, refundStatus = 'PENDING', refundTooltip = '', refundCount, iconStyles }) => {
|
|
13
12
|
const { t } = useTranslation();
|
|
14
13
|
const theme = useTheme();
|
|
15
14
|
const refundCountBadge = (_jsxs(RefundsCountBadge, Object.assign({ "data-testid": "StatusCell_RefundsCountBadge", initial: { width: 0, opacity: 0, padding: '0px' }, transition: {
|
|
@@ -33,10 +32,6 @@ const RefundIcon = ({ isTextShown, refundStatus = 'PENDING', refundTooltip = '',
|
|
|
33
32
|
},
|
|
34
33
|
} }, { children: [refundCount, "x"] })));
|
|
35
34
|
const refundCountShown = (refundCount || 0) > 1;
|
|
36
|
-
if (tableMode === 'sheet') {
|
|
37
|
-
const { color, backgroundColor } = refundStyles[refundStatus];
|
|
38
|
-
return (_jsx(StatusChip, Object.assign({ textColor: color, bgColor: backgroundColor }, { children: t(camelCase(refundStatus)) })));
|
|
39
|
-
}
|
|
40
35
|
return (_jsx(_Fragment, { children: isTextShown ? (_jsx(Tooltip, Object.assign({ title: _jsx("div", { children: _jsx("div", { children: refundTooltip }) }) }, { children: _jsx(StatusTextLabel, Object.assign({ "data-testid": "StatusCell_RefundStatusLabel", sx: {
|
|
41
36
|
color: refundStyles[refundStatus].color,
|
|
42
37
|
backgroundColor: refundStyles[refundStatus].backgroundColor,
|
|
@@ -34,7 +34,7 @@ function SegmentsCell(_a) {
|
|
|
34
34
|
setIsTooltipOpen(false);
|
|
35
35
|
}, title: sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ order: index, variants: referenceSourceAnimation(index, theme.shadows[4], isTextShown ? 83 : 0), sx: {
|
|
36
36
|
width: isTextShown ? '79px' : '36px',
|
|
37
|
-
} }, { children: isTextShown ? (_jsx(ReferenceTextWrapper, { children: _jsx(ReferenceTextLabel, { children: startCase(segment) }) })) : (_jsx(IconWithBadge, { mainIcon: (segmentData === null || segmentData === void 0 ? void 0 : segmentData.icon) || segmentsIcons[segment], mainIconSize: segment === 'order' ? 11.82 : 16, containerSize: segment === 'order' ? 11.82 : 16, sx: Object.assign({}, ((segmentData === null || segmentData === void 0 ? void 0 : segmentData.icon)
|
|
37
|
+
} }, { children: isTextShown ? (_jsx(ReferenceTextWrapper, { children: _jsx(ReferenceTextLabel, { children: startCase(segment) }) })) : (_jsx(IconWithBadge, { mainIcon: (segmentData === null || segmentData === void 0 ? void 0 : segmentData.icon) || segmentsIcons[segment], mainIconSize: segment === 'order' ? 11.82 : 16, containerSize: segment === 'order' ? 11.82 : 16, sx: Object.assign({}, ((segmentData === null || segmentData === void 0 ? void 0 : segmentData.icon) ? { borderRadius: '40px' } : { borderRadius: '0px' })), onError: (e) => {
|
|
38
38
|
e.currentTarget.src = segmentsIcons[segment];
|
|
39
39
|
e.currentTarget.style.borderRadius = '0px';
|
|
40
40
|
}, borderColor: "transparent" })) })) }), `${segment}-${index}`));
|
|
@@ -38,23 +38,6 @@ export declare const payoutStatusIcons: {
|
|
|
38
38
|
SETTLED: string;
|
|
39
39
|
PENDING: string;
|
|
40
40
|
};
|
|
41
|
-
export declare const payoutStatusStyles: {
|
|
42
|
-
PAID_OUT: {
|
|
43
|
-
color: string;
|
|
44
|
-
background: string;
|
|
45
|
-
border: string;
|
|
46
|
-
};
|
|
47
|
-
SETTLED: {
|
|
48
|
-
color: string;
|
|
49
|
-
background: string;
|
|
50
|
-
border: string;
|
|
51
|
-
};
|
|
52
|
-
PENDING: {
|
|
53
|
-
color: string;
|
|
54
|
-
background: string;
|
|
55
|
-
border: string;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
41
|
export declare const authorizedStatusIcons: {
|
|
59
42
|
AUTHORIZED: string;
|
|
60
43
|
};
|
|
@@ -62,20 +45,3 @@ export declare const capturedStatusesStyles: Record<(typeof unCapturedStatuses)[
|
|
|
62
45
|
color: string;
|
|
63
46
|
background: string;
|
|
64
47
|
}>;
|
|
65
|
-
export declare const chargeSheetViewChipStyles: {
|
|
66
|
-
ABANDONED: {
|
|
67
|
-
color: string;
|
|
68
|
-
background: string;
|
|
69
|
-
border: string;
|
|
70
|
-
};
|
|
71
|
-
CANCELLED: {
|
|
72
|
-
color: string;
|
|
73
|
-
background: string;
|
|
74
|
-
border: string;
|
|
75
|
-
};
|
|
76
|
-
INITIATED: {
|
|
77
|
-
color: string;
|
|
78
|
-
background: string;
|
|
79
|
-
border: string;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
@@ -82,23 +82,6 @@ export const payoutStatusIcons = {
|
|
|
82
82
|
SETTLED: settledIcon,
|
|
83
83
|
PENDING: settlementInitiatedIcon,
|
|
84
84
|
};
|
|
85
|
-
export const payoutStatusStyles = {
|
|
86
|
-
PAID_OUT: {
|
|
87
|
-
color: '#2ACE00',
|
|
88
|
-
background: '#2ACE001A',
|
|
89
|
-
border: 'none',
|
|
90
|
-
},
|
|
91
|
-
SETTLED: {
|
|
92
|
-
color: '#2ACE00',
|
|
93
|
-
background: 'transparent',
|
|
94
|
-
border: '1px solid #2ACE0066',
|
|
95
|
-
},
|
|
96
|
-
PENDING: {
|
|
97
|
-
color: '#FF7A00',
|
|
98
|
-
background: '#FF7A000D',
|
|
99
|
-
border: 'none',
|
|
100
|
-
},
|
|
101
|
-
};
|
|
102
85
|
export const authorizedStatusIcons = {
|
|
103
86
|
AUTHORIZED: authorizedIcon,
|
|
104
87
|
};
|
|
@@ -108,16 +91,3 @@ export const capturedStatusesStyles = {
|
|
|
108
91
|
background: '#1F88D00D',
|
|
109
92
|
},
|
|
110
93
|
};
|
|
111
|
-
export const chargeSheetViewChipStyles = Object.assign(Object.assign(Object.assign({}, unCapturedStatusesStyles), capturedStatusesStyles), { ABANDONED: {
|
|
112
|
-
color: '#FFD600',
|
|
113
|
-
background: 'white',
|
|
114
|
-
border: '1px solid #FFD60080',
|
|
115
|
-
}, CANCELLED: {
|
|
116
|
-
color: '#EDC806',
|
|
117
|
-
background: '#FFD6001A',
|
|
118
|
-
border: 'none',
|
|
119
|
-
}, INITIATED: {
|
|
120
|
-
color: '#8D8D94',
|
|
121
|
-
background: 'white',
|
|
122
|
-
border: '1px solid #8D8D941A',
|
|
123
|
-
} });
|
|
@@ -6,7 +6,8 @@ interface ISheetViewTableRowLoadingProps {
|
|
|
6
6
|
animationType?: AnimationType;
|
|
7
7
|
style?: CSSProperties;
|
|
8
8
|
rowIndex?: number;
|
|
9
|
+
useTableBackground?: boolean;
|
|
9
10
|
}
|
|
10
|
-
declare function SheetViewTableRowLoading({ columns, style, index, animationType, rowIndex }: ISheetViewTableRowLoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function SheetViewTableRowLoading({ columns, style, index, animationType, rowIndex, useTableBackground, }: ISheetViewTableRowLoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
declare const _default: import("react").MemoExoticComponent<typeof SheetViewTableRowLoading>;
|
|
12
13
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
import Skeleton from '@mui/material/Skeleton';
|
|
4
|
-
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { styled, useTheme } from '@mui/material/styles';
|
|
5
5
|
import TableCell from '@mui/material/TableCell';
|
|
6
6
|
import MUITableRow from '@mui/material/TableRow';
|
|
7
7
|
import { areEqual } from 'react-window';
|
|
@@ -11,14 +11,16 @@ const StyledSkeleton = styled(Skeleton)(() => ({
|
|
|
11
11
|
width: '100%',
|
|
12
12
|
minWidth: '20px',
|
|
13
13
|
}));
|
|
14
|
-
function SheetViewTableRowLoading({ columns, style, index, animationType, rowIndex = 0 }) {
|
|
15
|
-
|
|
14
|
+
function SheetViewTableRowLoading({ columns, style, index, animationType, rowIndex = 0, useTableBackground = false, }) {
|
|
15
|
+
const theme = useTheme();
|
|
16
|
+
return (_jsx(MUITableRow, Object.assign({ sx: Object.assign(Object.assign({}, style), { display: 'flex', borderBottom: '1px solid #F2F2F2', minHeight: '28px', height: '28px', alignItems: 'center', backgroundColor: useTableBackground ? theme.palette.background.default : 'transparent', '&:hover': {
|
|
16
17
|
backgroundColor: 'transparent !important',
|
|
17
18
|
} }), component: "div", hover: true }, { children: columns.map((column, colIndex) => {
|
|
18
19
|
var _a;
|
|
19
20
|
const isLastColumn = colIndex === columns.length - 1;
|
|
20
21
|
const isFirstColumn = colIndex === 0;
|
|
21
|
-
const
|
|
22
|
+
const isPinnedStart = column.pinned === 'start';
|
|
23
|
+
const shouldShowActualData = isFirstColumn && isPinnedStart;
|
|
22
24
|
return (_jsx(TableCell, Object.assign({ sx: {
|
|
23
25
|
width: column.width || `${100 / columns.length}%` || '20%',
|
|
24
26
|
paddingBlock: '0',
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ListChildComponentProps } from 'react-window';
|
|
3
|
-
|
|
3
|
+
import type { IColumnProps } from '../../../../types/index.js';
|
|
4
|
+
export declare const LastRowContent: React.MemoExoticComponent<({ isLoadingRow, isSheetView, columns, currentRowCount, }: {
|
|
4
5
|
isLoadingRow: boolean;
|
|
5
6
|
isSheetView?: boolean | undefined;
|
|
7
|
+
columns?: IColumnProps<any>[] | undefined;
|
|
8
|
+
currentRowCount?: number | undefined;
|
|
6
9
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
7
10
|
export declare const StyledItemWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
8
11
|
showShadowHighlight?: boolean | undefined;
|
|
9
12
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
-
declare function ListItemWrapper({ index, style, data: { renderedScrollTopRef, rows, rowProps, columns, isLoading, scrollToIndex,
|
|
13
|
+
declare function ListItemWrapper({ index, style, data: { renderedScrollTopRef, rows, rowProps, columns, isLoading, scrollToIndex, newLoadedRowsEndIndex, isError, areAllRowsLoaded, isSheetView, isPinned, ...restData }, }: Readonly<ListChildComponentProps>): import("react/jsx-runtime").JSX.Element;
|
|
11
14
|
export default ListItemWrapper;
|
|
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { Box } from '@mui/material';
|
|
15
15
|
import { styled } from '@mui/material/styles';
|
|
@@ -19,9 +19,13 @@ import { ActionIcon } from '../../style';
|
|
|
19
19
|
import { RowErrorState } from '../RowErrorState';
|
|
20
20
|
import { StyledParagraph } from '../TableLastItem';
|
|
21
21
|
import TableRow from '../TableRow';
|
|
22
|
-
|
|
22
|
+
import SheetViewTableRowLoading from '../../SheetView/components/SheetViewTableRowLoading';
|
|
23
|
+
export const LastRowContent = React.memo(({ isLoadingRow, isSheetView, columns, currentRowCount, }) => {
|
|
23
24
|
const { t } = useTranslation();
|
|
24
25
|
if (isLoadingRow) {
|
|
26
|
+
if (isSheetView && (columns === null || columns === void 0 ? void 0 : columns.length)) {
|
|
27
|
+
return (_jsx(_Fragment, { children: Array.from({ length: 3 }, (_, i) => (_jsx(SheetViewTableRowLoading, { columns: columns, animationType: "wave", rowIndex: (currentRowCount || 0) + i + 1, useTableBackground: true }, `loading-row-${i}`))) }));
|
|
28
|
+
}
|
|
25
29
|
return (_jsxs(Box, Object.assign({ "data-testid": "ListItemWrapper_lastRowContent_isLoadingRow", sx: {
|
|
26
30
|
height: isSheetView ? '100%' : '24px',
|
|
27
31
|
width: '24px',
|
|
@@ -48,20 +52,33 @@ export const StyledItemWrapper = styled('div', {
|
|
|
48
52
|
}));
|
|
49
53
|
function ListItemWrapper(_a) {
|
|
50
54
|
var _b;
|
|
51
|
-
var { index, style } = _a, _c = _a.data, { renderedScrollTopRef, rows, rowProps, columns, isLoading, scrollToIndex,
|
|
55
|
+
var { index, style } = _a, _c = _a.data, { renderedScrollTopRef, rows, rowProps, columns, isLoading, scrollToIndex, newLoadedRowsEndIndex, isError, areAllRowsLoaded, isSheetView, isPinned = false } = _c, restData = __rest(_c, ["renderedScrollTopRef", "rows", "rowProps", "columns", "isLoading", "scrollToIndex", "newLoadedRowsEndIndex", "isError", "areAllRowsLoaded", "isSheetView", "isPinned"]);
|
|
52
56
|
const lastItemIndex = rows.length - 1;
|
|
53
57
|
const row = rows[index];
|
|
54
58
|
const isLoadingRow = isLoading && index === lastItemIndex + 1;
|
|
55
59
|
const isLoadedRow = index <= newLoadedRowsEndIndex;
|
|
56
60
|
const rowClickHandler = React.useCallback(createRowClickHandler(row, rowProps === null || rowProps === void 0 ? void 0 : rowProps.onRowClick), [row, rowProps === null || rowProps === void 0 ? void 0 : rowProps.onRowClick]);
|
|
57
|
-
const memoizedRowProps = React.useMemo(() => (Object.assign(Object.assign({ showShadowHighlight: scrollToIndex === index, showLoadedStyle: isLoadedRow }, rowProps), { onClick: rowClickHandler })), [scrollToIndex, index, isLoadedRow, rowProps, rowClickHandler
|
|
61
|
+
const memoizedRowProps = React.useMemo(() => (Object.assign(Object.assign({ showShadowHighlight: scrollToIndex === index, showLoadedStyle: isLoadedRow }, rowProps), { onClick: rowClickHandler })), [scrollToIndex, index, isLoadedRow, rowProps, rowClickHandler]);
|
|
62
|
+
const renderSheetViewLoadingRow = React.useCallback((lastRowContent) => {
|
|
63
|
+
return (_jsx(Box, Object.assign({ sx: {
|
|
64
|
+
minHeight: SHEET_VIEW_TABLE_ROW_HEIGHT,
|
|
65
|
+
height: '100%',
|
|
66
|
+
width: '100%',
|
|
67
|
+
} }, { children: isError ? _jsx(RowErrorState, {}) : lastRowContent })));
|
|
68
|
+
}, [isError]);
|
|
58
69
|
const memoizedListItemComponent = React.useMemo(() => {
|
|
59
|
-
const lastRowContent = _jsx(LastRowContent, { isSheetView: isSheetView, isLoadingRow: isLoadingRow });
|
|
70
|
+
const lastRowContent = _jsx(LastRowContent, { isSheetView: isSheetView, isLoadingRow: isLoadingRow, columns: columns, currentRowCount: rows.length });
|
|
60
71
|
const isLastRow = isLoadingRow || (areAllRowsLoaded && index === lastItemIndex + 1);
|
|
61
72
|
if (isPinned && isLastRow) {
|
|
73
|
+
if (isSheetView && isLoadingRow && columns && columns.length > 0) {
|
|
74
|
+
return renderSheetViewLoadingRow(lastRowContent);
|
|
75
|
+
}
|
|
62
76
|
return (_jsx(Box, { sx: Object.assign(Object.assign({}, (isSheetView ? { minHeight: SHEET_VIEW_TABLE_ROW_HEIGHT, height: '100%' } : { height: TABLE_ROW_HEIGHT })), { backgroundColor: '#F6F8FACC' }) }));
|
|
63
77
|
}
|
|
64
78
|
if (isLastRow) {
|
|
79
|
+
if (isSheetView && isLoadingRow && columns && columns.length > 0) {
|
|
80
|
+
return renderSheetViewLoadingRow(lastRowContent);
|
|
81
|
+
}
|
|
65
82
|
return (_jsx(Box, Object.assign({ sx: Object.assign(Object.assign({}, (isSheetView ? { minHeight: SHEET_VIEW_TABLE_ROW_HEIGHT, height: '100%' } : { height: TABLE_ROW_HEIGHT })), { display: 'flex', justifyContent: 'center', alignItems: 'center' }) }, { children: _jsx(Box, Object.assign({ sx: {
|
|
66
83
|
backgroundColor: '#F6F8FACC',
|
|
67
84
|
display: 'flex',
|
|
@@ -72,7 +89,21 @@ function ListItemWrapper(_a) {
|
|
|
72
89
|
} }, { children: isError ? _jsx(RowErrorState, {}) : lastRowContent })) })));
|
|
73
90
|
}
|
|
74
91
|
return (_jsx(TableRow, { index: index, row: row, columns: columns, rowProps: memoizedRowProps, isSheetView: isSheetView, selectedCell: restData.selectedCell, selectedColumn: restData.selectedColumn, onCellClick: restData.onCellClick, isLastRow: index === rows.length - 1 }, `row-${index}`));
|
|
75
|
-
}, [
|
|
92
|
+
}, [
|
|
93
|
+
restData,
|
|
94
|
+
index,
|
|
95
|
+
row,
|
|
96
|
+
columns,
|
|
97
|
+
memoizedRowProps,
|
|
98
|
+
isSheetView,
|
|
99
|
+
isLoadingRow,
|
|
100
|
+
isError,
|
|
101
|
+
areAllRowsLoaded,
|
|
102
|
+
lastItemIndex,
|
|
103
|
+
isPinned,
|
|
104
|
+
rows.length,
|
|
105
|
+
renderSheetViewLoadingRow,
|
|
106
|
+
]);
|
|
76
107
|
return (_jsx("div", Object.assign({ "data-testid": "ListItemWrapper", style: Object.assign(Object.assign({}, style), { top: Number(style.top) - ((_b = renderedScrollTopRef === null || renderedScrollTopRef === void 0 ? void 0 : renderedScrollTopRef.current) !== null && _b !== void 0 ? _b : 0), willChange: 'top' }) }, { children: _jsx(StyledItemWrapper, Object.assign({ "data-testid": "ListItemWrapper_StyledItemWrapper" }, { children: memoizedListItemComponent })) })));
|
|
77
108
|
}
|
|
78
109
|
export default ListItemWrapper;
|
|
@@ -94,6 +94,5 @@ export * from './StatusGroupChips';
|
|
|
94
94
|
export * from './TableHeader';
|
|
95
95
|
export { default as RangeCalender } from './RangeCalender';
|
|
96
96
|
export { default as AppServices } from './AppServices';
|
|
97
|
-
export * from './SourceChips';
|
|
98
97
|
export { default as ScrollLoader } from './ScrollLoader';
|
|
99
98
|
export * from './ScrollLoader';
|
|
@@ -94,6 +94,5 @@ export * from './StatusGroupChips';
|
|
|
94
94
|
export * from './TableHeader';
|
|
95
95
|
export { default as RangeCalender } from './RangeCalender';
|
|
96
96
|
export { default as AppServices } from './AppServices';
|
|
97
|
-
export * from './SourceChips';
|
|
98
97
|
export { default as ScrollLoader } from './ScrollLoader';
|
|
99
98
|
export * from './ScrollLoader';
|
|
@@ -12,7 +12,7 @@ export declare const chargeTableCellWidth: {
|
|
|
12
12
|
readonly id: {
|
|
13
13
|
readonly default: "225px";
|
|
14
14
|
readonly text: "225px";
|
|
15
|
-
readonly sheet: "
|
|
15
|
+
readonly sheet: "235px";
|
|
16
16
|
};
|
|
17
17
|
readonly product: {
|
|
18
18
|
readonly default: "85px";
|
|
@@ -37,7 +37,7 @@ export declare const chargeTableCellWidth: {
|
|
|
37
37
|
readonly customer: {
|
|
38
38
|
readonly default: "180px";
|
|
39
39
|
readonly text: "180px";
|
|
40
|
-
readonly sheet: "
|
|
40
|
+
readonly sheet: "145px";
|
|
41
41
|
};
|
|
42
42
|
readonly source: {
|
|
43
43
|
readonly default: "114px";
|
|
@@ -62,7 +62,7 @@ export declare const chargeTableCellWidth: {
|
|
|
62
62
|
readonly destinations: {
|
|
63
63
|
readonly default: "70px";
|
|
64
64
|
readonly text: "240px";
|
|
65
|
-
readonly sheet: "
|
|
65
|
+
readonly sheet: "340px";
|
|
66
66
|
};
|
|
67
67
|
readonly topup: {
|
|
68
68
|
readonly default: "20px";
|
|
@@ -97,17 +97,17 @@ export declare const chargeTableCellWidth: {
|
|
|
97
97
|
readonly receipt: {
|
|
98
98
|
readonly default: "85px";
|
|
99
99
|
readonly text: "150px";
|
|
100
|
-
readonly sheet: "
|
|
100
|
+
readonly sheet: "155px";
|
|
101
101
|
};
|
|
102
102
|
readonly fees: {
|
|
103
103
|
readonly default: "150px";
|
|
104
104
|
readonly text: "150px";
|
|
105
|
-
readonly sheet: "
|
|
105
|
+
readonly sheet: "170px";
|
|
106
106
|
};
|
|
107
107
|
readonly metadata: {
|
|
108
108
|
readonly default: "180px";
|
|
109
109
|
readonly text: "180px";
|
|
110
|
-
readonly sheet: "
|
|
110
|
+
readonly sheet: "265px";
|
|
111
111
|
};
|
|
112
112
|
readonly settlement: {
|
|
113
113
|
readonly default: "200px";
|
|
@@ -137,12 +137,12 @@ export declare const chargeTableCellWidth: {
|
|
|
137
137
|
readonly auth_code: {
|
|
138
138
|
readonly default: "80px";
|
|
139
139
|
readonly text: "80px";
|
|
140
|
-
readonly sheet: "
|
|
140
|
+
readonly sheet: "100px";
|
|
141
141
|
};
|
|
142
142
|
readonly rrn: {
|
|
143
143
|
readonly default: "100px";
|
|
144
144
|
readonly text: "100px";
|
|
145
|
-
readonly sheet: "
|
|
145
|
+
readonly sheet: "105px";
|
|
146
146
|
};
|
|
147
147
|
readonly device: {
|
|
148
148
|
readonly default: "70px";
|
|
@@ -182,21 +182,21 @@ export declare const chargeTableCellWidth: {
|
|
|
182
182
|
readonly acquirer_ref: {
|
|
183
183
|
readonly default: "125px";
|
|
184
184
|
readonly text: "125px";
|
|
185
|
-
readonly sheet: "
|
|
185
|
+
readonly sheet: "145px";
|
|
186
186
|
};
|
|
187
187
|
readonly order_ref: {
|
|
188
188
|
readonly default: "200px";
|
|
189
189
|
readonly text: "200px";
|
|
190
|
-
readonly sheet: "
|
|
190
|
+
readonly sheet: "220px";
|
|
191
191
|
};
|
|
192
192
|
readonly payment_ref: {
|
|
193
193
|
readonly default: "150px";
|
|
194
194
|
readonly text: "150px";
|
|
195
|
-
readonly sheet: "
|
|
195
|
+
readonly sheet: "170px";
|
|
196
196
|
};
|
|
197
197
|
readonly generic_ref: {
|
|
198
198
|
readonly default: "125px";
|
|
199
199
|
readonly text: "125px";
|
|
200
|
-
readonly sheet: "
|
|
200
|
+
readonly sheet: "145px";
|
|
201
201
|
};
|
|
202
202
|
};
|
|
@@ -12,7 +12,7 @@ export const chargeTableCellWidth = {
|
|
|
12
12
|
id: {
|
|
13
13
|
default: '225px',
|
|
14
14
|
text: '225px',
|
|
15
|
-
sheet: '
|
|
15
|
+
sheet: '235px',
|
|
16
16
|
},
|
|
17
17
|
product: {
|
|
18
18
|
default: '85px',
|
|
@@ -37,7 +37,7 @@ export const chargeTableCellWidth = {
|
|
|
37
37
|
customer: {
|
|
38
38
|
default: '180px',
|
|
39
39
|
text: '180px',
|
|
40
|
-
sheet: '
|
|
40
|
+
sheet: '145px',
|
|
41
41
|
},
|
|
42
42
|
source: {
|
|
43
43
|
default: '114px',
|
|
@@ -62,7 +62,7 @@ export const chargeTableCellWidth = {
|
|
|
62
62
|
destinations: {
|
|
63
63
|
default: '70px',
|
|
64
64
|
text: '240px',
|
|
65
|
-
sheet: '
|
|
65
|
+
sheet: '340px',
|
|
66
66
|
},
|
|
67
67
|
topup: {
|
|
68
68
|
default: '20px',
|
|
@@ -97,17 +97,17 @@ export const chargeTableCellWidth = {
|
|
|
97
97
|
receipt: {
|
|
98
98
|
default: '85px',
|
|
99
99
|
text: '150px',
|
|
100
|
-
sheet: '
|
|
100
|
+
sheet: '155px',
|
|
101
101
|
},
|
|
102
102
|
fees: {
|
|
103
103
|
default: '150px',
|
|
104
104
|
text: '150px',
|
|
105
|
-
sheet: '
|
|
105
|
+
sheet: '170px',
|
|
106
106
|
},
|
|
107
107
|
metadata: {
|
|
108
108
|
default: '180px',
|
|
109
109
|
text: '180px',
|
|
110
|
-
sheet: '
|
|
110
|
+
sheet: '265px',
|
|
111
111
|
},
|
|
112
112
|
settlement: {
|
|
113
113
|
default: '200px',
|
|
@@ -137,12 +137,12 @@ export const chargeTableCellWidth = {
|
|
|
137
137
|
auth_code: {
|
|
138
138
|
default: '80px',
|
|
139
139
|
text: '80px',
|
|
140
|
-
sheet: '
|
|
140
|
+
sheet: '100px',
|
|
141
141
|
},
|
|
142
142
|
rrn: {
|
|
143
143
|
default: '100px',
|
|
144
144
|
text: '100px',
|
|
145
|
-
sheet: '
|
|
145
|
+
sheet: '105px',
|
|
146
146
|
},
|
|
147
147
|
device: {
|
|
148
148
|
default: '70px',
|
|
@@ -182,21 +182,21 @@ export const chargeTableCellWidth = {
|
|
|
182
182
|
acquirer_ref: {
|
|
183
183
|
default: '125px',
|
|
184
184
|
text: '125px',
|
|
185
|
-
sheet: '
|
|
185
|
+
sheet: '145px',
|
|
186
186
|
},
|
|
187
187
|
order_ref: {
|
|
188
188
|
default: '200px',
|
|
189
189
|
text: '200px',
|
|
190
|
-
sheet: '
|
|
190
|
+
sheet: '220px',
|
|
191
191
|
},
|
|
192
192
|
payment_ref: {
|
|
193
193
|
default: '150px',
|
|
194
194
|
text: '150px',
|
|
195
|
-
sheet: '
|
|
195
|
+
sheet: '170px',
|
|
196
196
|
},
|
|
197
197
|
generic_ref: {
|
|
198
198
|
default: '125px',
|
|
199
199
|
text: '125px',
|
|
200
|
-
sheet: '
|
|
200
|
+
sheet: '145px',
|
|
201
201
|
},
|
|
202
202
|
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
3
|
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.0.301-test.6",
|
|
5
|
+
"testVersion": 6,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|
|
@@ -131,4 +131,4 @@
|
|
|
131
131
|
"publishConfig": {
|
|
132
132
|
"registry": "https://registry.npmjs.org/"
|
|
133
133
|
}
|
|
134
|
-
}
|
|
134
|
+
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { StatusChipProps } from '../../StatusChip';
|
|
2
|
-
export type AuthenticationChipType = 'issuer' | 'scheme' | 'device' | 'app' | 'wallet' | '3DS' | 'Device Biometric' | 'Non-3DS';
|
|
3
|
-
interface AuthenticationChipProps extends Omit<StatusChipProps, 'children'> {
|
|
4
|
-
authenticationType?: AuthenticationChipType;
|
|
5
|
-
}
|
|
6
|
-
declare const AuthenticationChip: ({ authenticationType, unknownText, ...props }: AuthenticationChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default AuthenticationChip;
|
|
@@ -1,31 +0,0 @@
|
|
|
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]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import StatusChip from '../../StatusChip';
|
|
14
|
-
import { authenticationColors } from './constants';
|
|
15
|
-
const authenticationTypeMap = {
|
|
16
|
-
issuer: 'Issuer',
|
|
17
|
-
scheme: 'Scheme',
|
|
18
|
-
device: 'Device',
|
|
19
|
-
app: 'App',
|
|
20
|
-
wallet: 'Wallet',
|
|
21
|
-
'Device Biometric': 'Biometric',
|
|
22
|
-
'3DS': '3DS',
|
|
23
|
-
'Non-3DS': 'Non-3DS',
|
|
24
|
-
};
|
|
25
|
-
const AuthenticationChip = (_a) => {
|
|
26
|
-
var { authenticationType, unknownText = 'noAuth' } = _a, props = __rest(_a, ["authenticationType", "unknownText"]);
|
|
27
|
-
const statusText = authenticationType && authenticationTypeMap[authenticationType];
|
|
28
|
-
const chipColors = authenticationType && authenticationColors[authenticationType];
|
|
29
|
-
return (_jsx(StatusChip, Object.assign({}, chipColors, { unknownText: unknownText }, props, { children: statusText })));
|
|
30
|
-
};
|
|
31
|
-
export default AuthenticationChip;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export interface AuthenticationColors {
|
|
2
|
-
bgColor: string;
|
|
3
|
-
borderColor?: string;
|
|
4
|
-
textColor?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const authenticationColors: {
|
|
7
|
-
issuer: {
|
|
8
|
-
bgColor: string;
|
|
9
|
-
textColor: string;
|
|
10
|
-
};
|
|
11
|
-
scheme: {
|
|
12
|
-
bgColor: string;
|
|
13
|
-
textColor: string;
|
|
14
|
-
};
|
|
15
|
-
app: {
|
|
16
|
-
bgColor: string;
|
|
17
|
-
textColor: string;
|
|
18
|
-
};
|
|
19
|
-
wallet: {
|
|
20
|
-
bgColor: string;
|
|
21
|
-
textColor: string;
|
|
22
|
-
};
|
|
23
|
-
device: {};
|
|
24
|
-
'Device Biometric': {
|
|
25
|
-
bgColor: string;
|
|
26
|
-
textColor: string;
|
|
27
|
-
};
|
|
28
|
-
'3DS': {};
|
|
29
|
-
'Non-3DS': {};
|
|
30
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export const authenticationColors = {
|
|
2
|
-
issuer: {
|
|
3
|
-
bgColor: '#1F88D033',
|
|
4
|
-
textColor: '#1F88D0',
|
|
5
|
-
},
|
|
6
|
-
scheme: {
|
|
7
|
-
bgColor: '#5E30EB33',
|
|
8
|
-
textColor: '#5E30EB',
|
|
9
|
-
},
|
|
10
|
-
app: {
|
|
11
|
-
bgColor: '#AF2D6F33',
|
|
12
|
-
textColor: '#AF2D6F',
|
|
13
|
-
},
|
|
14
|
-
wallet: {
|
|
15
|
-
bgColor: '#18AA3333',
|
|
16
|
-
textColor: '#18AA33',
|
|
17
|
-
},
|
|
18
|
-
device: {},
|
|
19
|
-
'Device Biometric': {
|
|
20
|
-
bgColor: '#F0820033',
|
|
21
|
-
textColor: '#F08200',
|
|
22
|
-
},
|
|
23
|
-
'3DS': {},
|
|
24
|
-
'Non-3DS': {},
|
|
25
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { StatusChipProps } from '../../StatusChip';
|
|
2
|
-
import { GeographyVariant } from '../../../types/index.js';
|
|
3
|
-
interface GeographyChipProps extends Omit<StatusChipProps, 'children'> {
|
|
4
|
-
geographyVariant?: GeographyVariant;
|
|
5
|
-
}
|
|
6
|
-
declare const GeographyChip: ({ geographyVariant, ...props }: GeographyChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default GeographyChip;
|
|
@@ -1,22 +0,0 @@
|
|
|
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]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import StatusChip from '../../StatusChip';
|
|
14
|
-
import { geographyMap } from '../../../utils/index.js';
|
|
15
|
-
import { geographyColors } from './constants';
|
|
16
|
-
const GeographyChip = (_a) => {
|
|
17
|
-
var { geographyVariant } = _a, props = __rest(_a, ["geographyVariant"]);
|
|
18
|
-
const statusText = geographyVariant && geographyMap[geographyVariant];
|
|
19
|
-
const chipColors = geographyVariant && geographyColors[geographyVariant];
|
|
20
|
-
return (_jsx(StatusChip, Object.assign({}, chipColors, props, { children: statusText })));
|
|
21
|
-
};
|
|
22
|
-
export default GeographyChip;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { StatusChipProps } from '../../StatusChip';
|
|
2
|
-
export type PaymentAgreementType = 'ORDER' | 'SAVED_CARD' | 'SUBSCRIPTION' | 'INSTALLMENT' | undefined;
|
|
3
|
-
interface PaymentAgreementChipProps extends Omit<StatusChipProps, 'children'> {
|
|
4
|
-
agreementType?: PaymentAgreementType;
|
|
5
|
-
}
|
|
6
|
-
declare const PaymentAgreementChip: ({ agreementType, unknownText, ...props }: PaymentAgreementChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default PaymentAgreementChip;
|
|
@@ -1,21 +0,0 @@
|
|
|
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]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import StatusChip from '../../StatusChip';
|
|
14
|
-
import { agreementTypeMap, paymentAgreementColors } from './constants';
|
|
15
|
-
const PaymentAgreementChip = (_a) => {
|
|
16
|
-
var { agreementType, unknownText = 'noAgreement' } = _a, props = __rest(_a, ["agreementType", "unknownText"]);
|
|
17
|
-
const statusText = agreementType && agreementTypeMap[agreementType];
|
|
18
|
-
const chipColors = agreementType && paymentAgreementColors[agreementType];
|
|
19
|
-
return (_jsx(StatusChip, Object.assign({}, chipColors, { unknownText: unknownText }, props, { children: statusText })));
|
|
20
|
-
};
|
|
21
|
-
export default PaymentAgreementChip;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface PaymentAgreementColors {
|
|
2
|
-
bgColor: string;
|
|
3
|
-
borderColor?: string;
|
|
4
|
-
textColor?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const paymentAgreementColors: {
|
|
7
|
-
ORDER: {
|
|
8
|
-
bgColor: string;
|
|
9
|
-
textColor: string;
|
|
10
|
-
};
|
|
11
|
-
SAVED_CARD: {
|
|
12
|
-
bgColor: string;
|
|
13
|
-
textColor: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export declare const agreementTypeMap: {
|
|
17
|
-
ORDER: string;
|
|
18
|
-
SAVED_CARD: string;
|
|
19
|
-
SUBSCRIPTION: string;
|
|
20
|
-
INSTALLMENT: string;
|
|
21
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export const paymentAgreementColors = {
|
|
2
|
-
ORDER: {
|
|
3
|
-
bgColor: '#5E30EB33',
|
|
4
|
-
textColor: '#5E30EB',
|
|
5
|
-
},
|
|
6
|
-
SAVED_CARD: {
|
|
7
|
-
bgColor: '#76BB4033',
|
|
8
|
-
textColor: '#76BB40',
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
export const agreementTypeMap = {
|
|
12
|
-
ORDER: 'Order',
|
|
13
|
-
SAVED_CARD: 'Saved card',
|
|
14
|
-
SUBSCRIPTION: 'Subscription',
|
|
15
|
-
INSTALLMENT: 'Installment',
|
|
16
|
-
};
|