@tap-payments/os-micro-frontend-shared 0.1.319-test.1 → 0.1.319-test.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/build/components/StatusIcons/IssuerIcon/IssuerIcon.js +2 -1
  2. package/build/components/StatusIcons/SourceIcons/components/SourceIcon.d.ts +4 -5
  3. package/build/components/StatusIcons/SourceIcons/components/SourceIcon.js +19 -3
  4. package/build/components/StatusIcons/SourceIcons/style.d.ts +3 -2
  5. package/build/components/StatusIcons/SourceIcons/style.js +2 -6
  6. package/build/components/TableCells/CustomCells/AgreementCell/AgreementCell.js +1 -2
  7. package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +266 -0
  8. package/build/components/TableCells/CustomCells/AgreementCell/style.js +22 -0
  9. package/build/components/TableCells/CustomCells/SourceCell/SourceCell.d.ts +5 -3
  10. package/build/components/TableCells/CustomCells/SourceCell/SourceCell.js +30 -76
  11. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAgreement/PaymentAgreement.d.ts +2 -0
  12. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAgreement/PaymentAgreement.js +7 -0
  13. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAgreement/index.d.ts +1 -0
  14. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAgreement/index.js +1 -0
  15. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAuth/PaymentAuth.d.ts +18 -0
  16. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAuth/PaymentAuth.js +9 -0
  17. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAuth/index.d.ts +1 -0
  18. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentAuth/index.js +1 -0
  19. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/PaymentCardNumber.d.ts +10 -0
  20. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/PaymentCardNumber.js +12 -0
  21. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/index.d.ts +1 -0
  22. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/index.js +1 -0
  23. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/style.d.ts +2 -0
  24. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentCardNumber/style.js +6 -0
  25. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentDevice/PaymentDevice.d.ts +7 -0
  26. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentDevice/PaymentDevice.js +7 -0
  27. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentDevice/index.d.ts +1 -0
  28. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentDevice/index.js +1 -0
  29. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentInitiated/PaymentInitiated.d.ts +5 -0
  30. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentInitiated/PaymentInitiated.js +5 -0
  31. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentInitiated/index.d.ts +1 -0
  32. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentInitiated/index.js +1 -0
  33. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentIssuer/PaymentIssuer.d.ts +7 -0
  34. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentIssuer/PaymentIssuer.js +7 -0
  35. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentIssuer/index.d.ts +1 -0
  36. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentIssuer/index.js +1 -0
  37. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethod/PaymentMethod.d.ts +3 -0
  38. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethod/PaymentMethod.js +11 -0
  39. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethod/index.d.ts +1 -0
  40. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentMethod/index.js +1 -0
  41. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentScheme/PaymentScheme.d.ts +6 -0
  42. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentScheme/PaymentScheme.js +11 -0
  43. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentScheme/index.d.ts +1 -0
  44. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentScheme/index.js +1 -0
  45. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentType/PaymentType.d.ts +3 -0
  46. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentType/PaymentType.js +11 -0
  47. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentType/index.d.ts +1 -0
  48. package/build/components/TableCells/CustomCells/SourceCell/components/PaymentType/index.js +1 -0
  49. package/build/components/TableCells/CustomCells/SourceCell/components/index.d.ts +9 -0
  50. package/build/components/TableCells/CustomCells/SourceCell/components/index.js +9 -0
  51. package/build/components/TableCells/CustomCells/SourceCell/constant.d.ts +4 -0
  52. package/build/components/TableCells/CustomCells/SourceCell/constant.js +11 -0
  53. package/build/components/TableCells/CustomCells/SourceCell/index.d.ts +3 -2
  54. package/build/components/TableCells/CustomCells/SourceCell/index.js +3 -2
  55. package/build/components/TableCells/CustomCells/SourceCell/type.d.ts +17 -0
  56. package/build/components/TableCells/CustomCells/SourceCell/type.js +12 -0
  57. package/build/components/TableCells/CustomCells/type.d.ts +1 -1
  58. package/build/constants/apps.d.ts +0 -1
  59. package/build/constants/apps.js +0 -1
  60. package/build/constants/index.d.ts +0 -1
  61. package/build/constants/index.js +0 -1
  62. package/package.json +2 -2
  63. package/build/components/TableCells/CustomCells/SourceCell/style.d.ts +0 -269
  64. package/build/components/TableCells/CustomCells/SourceCell/style.js +0 -42
  65. package/build/components/TableCells/CustomCells/SourceCell/utils.d.ts +0 -1
  66. package/build/components/TableCells/CustomCells/SourceCell/utils.js +0 -8
  67. package/build/constants/country.d.ts +0 -1
  68. package/build/constants/country.js +0 -1
@@ -5,5 +5,6 @@ import Tooltip from '../../Tooltip';
5
5
  export default function IssuerIcon({ countryCode, isTextShown, cardNumber, bankName, tableMode }) {
6
6
  const firstFourDigits = cardNumber === null || cardNumber === void 0 ? void 0 : cardNumber.slice(0, 4);
7
7
  const lastFourDigits = cardNumber === null || cardNumber === void 0 ? void 0 : cardNumber.slice(-4);
8
- return (_jsxs(IssuerIconContainer, Object.assign({ tableMode: tableMode }, { children: [countryCode && _jsx(GeographyIcon, { countryCode: countryCode, isTextShown: isTextShown }), _jsx(Tooltip, Object.assign({ title: `${bankName ? `Issuer - ${bankName}` : ''}` }, { children: _jsx(CardNumber, { children: `${firstFourDigits || ''} ${lastFourDigits || ''}` }) }))] })));
8
+ return (_jsxs(IssuerIconContainer, Object.assign({ tableMode: tableMode }, { children: [countryCode && _jsx(GeographyIcon, { countryCode: countryCode, isTextShown: isTextShown }), firstFourDigits ||
9
+ (lastFourDigits && (_jsx(Tooltip, Object.assign({ title: `${bankName ? `Issuer - ${bankName}` : ''}` }, { children: _jsx(CardNumber, { children: `${firstFourDigits || ''} ${lastFourDigits || ''}` }) }))))] })));
9
10
  }
@@ -1,9 +1,8 @@
1
- type SourceIconProps = {
1
+ import { BoxProps } from '@mui/material/Box';
2
+ interface SourceIconProps extends BoxProps {
2
3
  source: string;
3
4
  isTextShown?: boolean;
4
5
  title?: string;
5
- width?: number | string;
6
- height?: number | string;
7
- };
8
- export declare function SourceIcon({ source, isTextShown, title, width, height }: SourceIconProps): import("react/jsx-runtime").JSX.Element;
6
+ }
7
+ export declare function SourceIcon({ source, isTextShown, title, ...props }: SourceIconProps): import("react/jsx-runtime").JSX.Element;
9
8
  export {};
@@ -1,13 +1,29 @@
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
+ };
1
12
  import { jsx as _jsx } from "react/jsx-runtime";
2
13
  import camelCase from 'lodash/camelCase';
3
14
  import { useTranslation } from 'react-i18next';
15
+ import Box from '@mui/material/Box';
4
16
  import Tooltip from '../../../Tooltip';
5
17
  import { getPaymentMethodsIcon } from '../../../../constants/index.js';
6
- import { StyledBadgeTextWrapper, StyledSourceImage, TextLabel } from '../style';
7
- export function SourceIcon({ source, isTextShown, title, width, height }) {
18
+ import { StyledBadgeTextWrapper, TextLabel } from '../style';
19
+ export function SourceIcon(_a) {
20
+ var { source, isTextShown, title } = _a, props = __rest(_a, ["source", "isTextShown", "title"]);
8
21
  const { t } = useTranslation();
9
22
  const ImageSrc = getPaymentMethodsIcon(source);
10
- return (_jsx(Tooltip, Object.assign({ title: title }, { children: isTextShown ? (_jsx(StyledBadgeTextWrapper, 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, width: width, height: height, onError: (e) => {
23
+ if (isTextShown) {
24
+ return (_jsx(Tooltip, Object.assign({ title: title }, { children: _jsx(StyledBadgeTextWrapper, Object.assign({ "data-testid": "SourceCell_BadgeTextWrapper" }, props, { children: _jsx(TextLabel, Object.assign({ "data-testid": "SourceCell_TextLabel", "data-source": source }, { children: t(camelCase(source)) })) })) })));
25
+ }
26
+ return (_jsx(Tooltip, Object.assign({ title: title }, { children: _jsx(Box, Object.assign({}, props, { component: "img", src: ImageSrc, alt: source, onError: (e) => {
11
27
  e.currentTarget.src = getPaymentMethodsIcon('card');
12
28
  } })) })));
13
29
  }
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
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>, {}>;
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>, {}>;
4
3
  export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
5
4
  hidden?: boolean | undefined;
6
5
  color?: string | undefined;
@@ -266,6 +265,8 @@ export declare const PaymentSourcesContainer: import("@emotion/styled").StyledCo
266
265
  sourcesCount: number;
267
266
  }, {}, {}>;
268
267
  export declare const TextLabel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
269
- export declare const StyledBadgeTextWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
268
+ export declare const StyledBadgeTextWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
269
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
270
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
270
271
  export declare const SourceIconWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
271
272
  export declare const CardNumber: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -1,4 +1,4 @@
1
- import { styled } from '@mui/material';
1
+ import { Box, styled } from '@mui/material';
2
2
  import { motion } from 'framer-motion';
3
3
  export const StyledSourceCell = styled('span')(({ theme }) => ({
4
4
  display: 'flex',
@@ -6,10 +6,6 @@ export const StyledSourceCell = styled('span')(({ theme }) => ({
6
6
  justifyContent: 'flex-start',
7
7
  gap: theme.spacing(1),
8
8
  }));
9
- export const StyledSourceImage = styled('img')(() => ({
10
- maxWidth: '24px',
11
- maxHeight: '16px',
12
- }));
13
9
  export const PaymentSourcesContainer = styled(motion.span)(({ theme, sourcesCount }) => ({
14
10
  display: 'flex',
15
11
  alignItems: 'center',
@@ -29,7 +25,7 @@ export const TextLabel = styled('span')(({ theme }) => ({
29
25
  padding: '2px 0',
30
26
  color: theme.palette.text.primary,
31
27
  }));
32
- export const StyledBadgeTextWrapper = styled('div')(() => ({
28
+ export const StyledBadgeTextWrapper = styled(Box)(() => ({
33
29
  display: 'flex',
34
30
  alignItems: 'center',
35
31
  justifyContent: 'center',
@@ -16,12 +16,11 @@ import { useTheme } from '@mui/material/styles';
16
16
  import { CountAnimatedBadge } from '../../../CountBadge';
17
17
  import { AgreementImageWrapper, paymentSourceAnimation } from '../../../CountBadge/style';
18
18
  import { TableCell } from '../../../TableCells';
19
- import { PaymentSourcesContainer, StyledSourceCell, StyledSourceImage } from '../../../TableCells/CustomCells/SourceCell/style';
20
19
  import Tooltip from '../../../Tooltip';
21
20
  import { noAgreementIcon } from '../../../../constants/index.js';
22
21
  import { formatOrdinal } from '../../../../utils/index.js';
23
22
  import { agreementTypes, badgesTypes } from './constant';
24
- import { BadgeTextWrapper, TextLabel } from './style';
23
+ import { BadgeTextWrapper, TextLabel, PaymentSourcesContainer, StyledSourceCell, StyledSourceImage } from './style';
25
24
  function AgreementCell(_a) {
26
25
  var { type, hasSavedCard, totalPaymentsCount, isTextShown } = _a, props = __rest(_a, ["type", "hasSavedCard", "totalPaymentsCount", "isTextShown"]);
27
26
  const theme = useTheme();
@@ -5,3 +5,269 @@ export declare const CardContainer: import("@emotion/styled").StyledComponent<im
5
5
  export declare const CardImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
6
6
  export declare const TextLabel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
7
7
  export declare const BadgeTextWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
8
+ export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
9
+ export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
10
+ export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
11
+ hidden?: boolean | undefined;
12
+ color?: string | undefined;
13
+ content?: string | undefined;
14
+ translate?: "yes" | "no" | undefined;
15
+ id?: string | undefined;
16
+ defaultChecked?: boolean | undefined;
17
+ defaultValue?: string | number | readonly string[] | undefined;
18
+ suppressContentEditableWarning?: boolean | undefined;
19
+ suppressHydrationWarning?: boolean | undefined;
20
+ accessKey?: string | undefined;
21
+ autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
22
+ autoFocus?: boolean | undefined;
23
+ className?: string | undefined;
24
+ contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
25
+ contextMenu?: string | undefined;
26
+ dir?: string | undefined;
27
+ draggable?: (boolean | "false" | "true") | undefined;
28
+ enterKeyHint?: "search" | "enter" | "done" | "go" | "next" | "previous" | "send" | undefined;
29
+ lang?: string | undefined;
30
+ nonce?: string | undefined;
31
+ slot?: string | undefined;
32
+ spellCheck?: (boolean | "false" | "true") | undefined;
33
+ tabIndex?: number | undefined;
34
+ title?: string | undefined;
35
+ radioGroup?: string | undefined;
36
+ role?: import("react").AriaRole | undefined;
37
+ about?: string | undefined;
38
+ datatype?: string | undefined;
39
+ inlist?: any;
40
+ prefix?: string | undefined;
41
+ property?: string | undefined;
42
+ rel?: string | undefined;
43
+ resource?: string | undefined;
44
+ rev?: string | undefined;
45
+ typeof?: string | undefined;
46
+ vocab?: string | undefined;
47
+ autoCorrect?: string | undefined;
48
+ autoSave?: string | undefined;
49
+ itemProp?: string | undefined;
50
+ itemScope?: boolean | undefined;
51
+ itemType?: string | undefined;
52
+ itemID?: string | undefined;
53
+ itemRef?: string | undefined;
54
+ results?: number | undefined;
55
+ security?: string | undefined;
56
+ unselectable?: "off" | "on" | undefined;
57
+ inputMode?: "none" | "text" | "email" | "search" | "numeric" | "url" | "tel" | "decimal" | undefined;
58
+ is?: string | undefined;
59
+ exportparts?: string | undefined;
60
+ part?: string | undefined;
61
+ "aria-activedescendant"?: string | undefined;
62
+ "aria-atomic"?: (boolean | "false" | "true") | undefined;
63
+ "aria-autocomplete"?: "none" | "list" | "both" | "inline" | undefined;
64
+ "aria-braillelabel"?: string | undefined;
65
+ "aria-brailleroledescription"?: string | undefined;
66
+ "aria-busy"?: (boolean | "false" | "true") | undefined;
67
+ "aria-checked"?: boolean | "false" | "true" | "mixed" | undefined;
68
+ "aria-colcount"?: number | undefined;
69
+ "aria-colindex"?: number | undefined;
70
+ "aria-colindextext"?: string | undefined;
71
+ "aria-colspan"?: number | undefined;
72
+ "aria-controls"?: string | undefined;
73
+ "aria-current"?: boolean | "page" | "date" | "false" | "true" | "time" | "step" | "location" | undefined;
74
+ "aria-describedby"?: string | undefined;
75
+ "aria-description"?: string | undefined;
76
+ "aria-details"?: string | undefined;
77
+ "aria-disabled"?: (boolean | "false" | "true") | undefined;
78
+ "aria-dropeffect"?: "none" | "copy" | "link" | "move" | "execute" | "popup" | undefined;
79
+ "aria-errormessage"?: string | undefined;
80
+ "aria-expanded"?: (boolean | "false" | "true") | undefined;
81
+ "aria-flowto"?: string | undefined;
82
+ "aria-grabbed"?: (boolean | "false" | "true") | undefined;
83
+ "aria-haspopup"?: boolean | "grid" | "false" | "true" | "dialog" | "listbox" | "menu" | "tree" | undefined;
84
+ "aria-hidden"?: (boolean | "false" | "true") | undefined;
85
+ "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
86
+ "aria-keyshortcuts"?: string | undefined;
87
+ "aria-label"?: string | undefined;
88
+ "aria-labelledby"?: string | undefined;
89
+ "aria-level"?: number | undefined;
90
+ "aria-live"?: "off" | "assertive" | "polite" | undefined;
91
+ "aria-modal"?: (boolean | "false" | "true") | undefined;
92
+ "aria-multiline"?: (boolean | "false" | "true") | undefined;
93
+ "aria-multiselectable"?: (boolean | "false" | "true") | undefined;
94
+ "aria-orientation"?: "horizontal" | "vertical" | undefined;
95
+ "aria-owns"?: string | undefined;
96
+ "aria-placeholder"?: string | undefined;
97
+ "aria-posinset"?: number | undefined;
98
+ "aria-pressed"?: boolean | "false" | "true" | "mixed" | undefined;
99
+ "aria-readonly"?: (boolean | "false" | "true") | undefined;
100
+ "aria-relevant"?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
101
+ "aria-required"?: (boolean | "false" | "true") | undefined;
102
+ "aria-roledescription"?: string | undefined;
103
+ "aria-rowcount"?: number | undefined;
104
+ "aria-rowindex"?: number | undefined;
105
+ "aria-rowindextext"?: string | undefined;
106
+ "aria-rowspan"?: number | undefined;
107
+ "aria-selected"?: (boolean | "false" | "true") | undefined;
108
+ "aria-setsize"?: number | undefined;
109
+ "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
110
+ "aria-valuemax"?: number | undefined;
111
+ "aria-valuemin"?: number | undefined;
112
+ "aria-valuenow"?: number | undefined;
113
+ "aria-valuetext"?: string | undefined;
114
+ dangerouslySetInnerHTML?: {
115
+ __html: string | TrustedHTML;
116
+ } | undefined;
117
+ onCopy?: import("react").ClipboardEventHandler<HTMLSpanElement> | undefined;
118
+ onCopyCapture?: import("react").ClipboardEventHandler<HTMLSpanElement> | undefined;
119
+ onCut?: import("react").ClipboardEventHandler<HTMLSpanElement> | undefined;
120
+ onCutCapture?: import("react").ClipboardEventHandler<HTMLSpanElement> | undefined;
121
+ onPaste?: import("react").ClipboardEventHandler<HTMLSpanElement> | undefined;
122
+ onPasteCapture?: import("react").ClipboardEventHandler<HTMLSpanElement> | undefined;
123
+ onCompositionEnd?: import("react").CompositionEventHandler<HTMLSpanElement> | undefined;
124
+ onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLSpanElement> | undefined;
125
+ onCompositionStart?: import("react").CompositionEventHandler<HTMLSpanElement> | undefined;
126
+ onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLSpanElement> | undefined;
127
+ onCompositionUpdate?: import("react").CompositionEventHandler<HTMLSpanElement> | undefined;
128
+ onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLSpanElement> | undefined;
129
+ onFocus?: import("react").FocusEventHandler<HTMLSpanElement> | undefined;
130
+ onFocusCapture?: import("react").FocusEventHandler<HTMLSpanElement> | undefined;
131
+ onBlur?: import("react").FocusEventHandler<HTMLSpanElement> | undefined;
132
+ onBlurCapture?: import("react").FocusEventHandler<HTMLSpanElement> | undefined;
133
+ onChange?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
134
+ onChangeCapture?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
135
+ onBeforeInput?: import("react").InputEventHandler<HTMLSpanElement> | undefined;
136
+ onBeforeInputCapture?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
137
+ onInput?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
138
+ onInputCapture?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
139
+ onReset?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
140
+ onResetCapture?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
141
+ onSubmit?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
142
+ onSubmitCapture?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
143
+ onInvalid?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
144
+ onInvalidCapture?: import("react").FormEventHandler<HTMLSpanElement> | undefined;
145
+ onLoad?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
146
+ onLoadCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
147
+ onError?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
148
+ onErrorCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
149
+ onKeyDown?: import("react").KeyboardEventHandler<HTMLSpanElement> | undefined;
150
+ onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLSpanElement> | undefined;
151
+ onKeyPress?: import("react").KeyboardEventHandler<HTMLSpanElement> | undefined;
152
+ onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLSpanElement> | undefined;
153
+ onKeyUp?: import("react").KeyboardEventHandler<HTMLSpanElement> | undefined;
154
+ onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLSpanElement> | undefined;
155
+ onAbort?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
156
+ onAbortCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
157
+ onCanPlay?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
158
+ onCanPlayCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
159
+ onCanPlayThrough?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
160
+ onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
161
+ onDurationChange?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
162
+ onDurationChangeCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
163
+ onEmptied?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
164
+ onEmptiedCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
165
+ onEncrypted?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
166
+ onEncryptedCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
167
+ onEnded?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
168
+ onEndedCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
169
+ onLoadedData?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
170
+ onLoadedDataCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
171
+ onLoadedMetadata?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
172
+ onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
173
+ onLoadStart?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
174
+ onLoadStartCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
175
+ onPause?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
176
+ onPauseCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
177
+ onPlay?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
178
+ onPlayCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
179
+ onPlaying?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
180
+ onPlayingCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
181
+ onProgress?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
182
+ onProgressCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
183
+ onRateChange?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
184
+ onRateChangeCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
185
+ onSeeked?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
186
+ onSeekedCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
187
+ onSeeking?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
188
+ onSeekingCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
189
+ onStalled?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
190
+ onStalledCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
191
+ onSuspend?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
192
+ onSuspendCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
193
+ onTimeUpdate?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
194
+ onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
195
+ onVolumeChange?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
196
+ onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
197
+ onWaiting?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
198
+ onWaitingCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
199
+ onAuxClick?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
200
+ onAuxClickCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
201
+ onClick?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
202
+ onClickCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
203
+ onContextMenu?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
204
+ onContextMenuCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
205
+ onDoubleClick?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
206
+ onDoubleClickCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
207
+ onDragCapture?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
208
+ onDragEndCapture?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
209
+ onDragEnter?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
210
+ onDragEnterCapture?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
211
+ onDragExit?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
212
+ onDragExitCapture?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
213
+ onDragLeave?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
214
+ onDragLeaveCapture?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
215
+ onDragOver?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
216
+ onDragOverCapture?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
217
+ onDragStartCapture?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
218
+ onDrop?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
219
+ onDropCapture?: import("react").DragEventHandler<HTMLSpanElement> | undefined;
220
+ onMouseDown?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
221
+ onMouseDownCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
222
+ onMouseEnter?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
223
+ onMouseLeave?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
224
+ onMouseMove?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
225
+ onMouseMoveCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
226
+ onMouseOut?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
227
+ onMouseOutCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
228
+ onMouseOver?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
229
+ onMouseOverCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
230
+ onMouseUp?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
231
+ onMouseUpCapture?: import("react").MouseEventHandler<HTMLSpanElement> | undefined;
232
+ onSelect?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
233
+ onSelectCapture?: import("react").ReactEventHandler<HTMLSpanElement> | undefined;
234
+ onTouchCancel?: import("react").TouchEventHandler<HTMLSpanElement> | undefined;
235
+ onTouchCancelCapture?: import("react").TouchEventHandler<HTMLSpanElement> | undefined;
236
+ onTouchEnd?: import("react").TouchEventHandler<HTMLSpanElement> | undefined;
237
+ onTouchEndCapture?: import("react").TouchEventHandler<HTMLSpanElement> | undefined;
238
+ onTouchMove?: import("react").TouchEventHandler<HTMLSpanElement> | undefined;
239
+ onTouchMoveCapture?: import("react").TouchEventHandler<HTMLSpanElement> | undefined;
240
+ onTouchStart?: import("react").TouchEventHandler<HTMLSpanElement> | undefined;
241
+ onTouchStartCapture?: import("react").TouchEventHandler<HTMLSpanElement> | undefined;
242
+ onPointerDown?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
243
+ onPointerDownCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
244
+ onPointerMove?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
245
+ onPointerMoveCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
246
+ onPointerUp?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
247
+ onPointerUpCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
248
+ onPointerCancel?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
249
+ onPointerCancelCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
250
+ onPointerEnter?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
251
+ onPointerLeave?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
252
+ onPointerOver?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
253
+ onPointerOverCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
254
+ onPointerOut?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
255
+ onPointerOutCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
256
+ onGotPointerCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
257
+ onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
258
+ onLostPointerCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
259
+ onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLSpanElement> | undefined;
260
+ onScroll?: import("react").UIEventHandler<HTMLSpanElement> | undefined;
261
+ onScrollCapture?: import("react").UIEventHandler<HTMLSpanElement> | undefined;
262
+ onWheel?: import("react").WheelEventHandler<HTMLSpanElement> | undefined;
263
+ onWheelCapture?: import("react").WheelEventHandler<HTMLSpanElement> | undefined;
264
+ onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLSpanElement> | undefined;
265
+ onAnimationEnd?: import("react").AnimationEventHandler<HTMLSpanElement> | undefined;
266
+ onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLSpanElement> | undefined;
267
+ onAnimationIteration?: import("react").AnimationEventHandler<HTMLSpanElement> | undefined;
268
+ onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLSpanElement> | undefined;
269
+ onTransitionEnd?: import("react").TransitionEventHandler<HTMLSpanElement> | undefined;
270
+ onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLSpanElement> | undefined;
271
+ } & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLSpanElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
272
+ sourcesCount: number;
273
+ }, {}, {}>;
@@ -1,4 +1,5 @@
1
1
  import { styled } from '@mui/material';
2
+ import { motion } from 'framer-motion';
2
3
  export const AgreementCellContainer = styled('span')(({ theme }) => ({
3
4
  display: 'flex',
4
5
  alignItems: 'center',
@@ -35,3 +36,24 @@ export const BadgeTextWrapper = styled('div')(() => ({
35
36
  justifyContent: 'center',
36
37
  paddingInline: '8px',
37
38
  }));
39
+ export const StyledSourceCell = styled('span')(({ theme }) => ({
40
+ display: 'flex',
41
+ alignItems: 'center',
42
+ justifyContent: 'flex-start',
43
+ gap: theme.spacing(1),
44
+ }));
45
+ export const StyledSourceImage = styled('img')(() => ({
46
+ maxWidth: '36px',
47
+ maxHeight: '24px',
48
+ }));
49
+ export const PaymentSourcesContainer = styled(motion.span)(({ theme, sourcesCount }) => ({
50
+ display: 'flex',
51
+ alignItems: 'center',
52
+ justifyContent: 'flex-start',
53
+ position: 'absolute',
54
+ minWidth: `${sourcesCount * 6 + 36}px `,
55
+ minHeight: '24px',
56
+ cursor: 'pointer',
57
+ backgroundColor: theme.palette.background.paper,
58
+ borderRadius: '16px',
59
+ }));
@@ -1,3 +1,5 @@
1
- import type { SourceCellProps } from '../type';
2
- declare function SourceCell({ geographyVariant, flagIcon, payment, card, isTextShown, showGeographyBox, customerInitiated, ...props }: SourceCellProps): import("react/jsx-runtime").JSX.Element;
3
- export default SourceCell;
1
+ /// <reference types="react" />
2
+ import { StatusCellProps } from './type';
3
+ declare function SourceCell(components: StatusCellProps): import("react/jsx-runtime").JSX.Element | null;
4
+ declare const _default: import("react").MemoExoticComponent<typeof SourceCell>;
5
+ export default _default;
@@ -1,78 +1,32 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { memo, useMemo } from 'react';
3
+ import Box from '@mui/material/Box';
4
+ import { RightLeftExpandingCenterChip } from '../../../RightLeftExpandingCenterChip';
5
+ import { CENTER_ICON_KEY } from './type';
6
+ import { CENTER_ICON_PRIORITY, LEFT_ICON_PRIORITY, RIGHT_ICON_PRIORITY } from './constant';
7
+ function SourceCell(components) {
8
+ const { centerIcon, centerIconId } = useMemo(() => {
9
+ for (const key of CENTER_ICON_PRIORITY) {
10
+ if (components === null || components === void 0 ? void 0 : components[key]) {
11
+ return {
12
+ centerIcon: components === null || components === void 0 ? void 0 : components[key],
13
+ centerIconId: key,
14
+ };
15
+ }
9
16
  }
10
- return t;
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { useEffect, useRef, useState } from 'react';
14
- import camelCase from 'lodash/camelCase';
15
- import { useTranslation } from 'react-i18next';
16
- import CountryFlag from '../../../CountryFlag';
17
- import { paymentSourceAnimation } from '../../../CountBadge/style';
18
- import { ImageWrapper } from '../../../index.js';
19
- import Tooltip from '../../../Tooltip';
20
- import { TableCell } from '../../../TableCells';
21
- import { getPaymentMethodsIcon, merchantInitiatedIcon } from '../../../../constants/index.js';
22
- import { geographyMap } from '../../../../utils/index.js';
23
- import { BadgeTextWrapper, PaymentSourcesContainer, StyledSourceCell, StyledSourceImage, TextLabel } from './style';
24
- import { getPaymentMethodKey } from './utils';
25
- import { GeographyBox } from '../style';
26
- function SourceCell(_a) {
27
- var _b, _c, _d, _e;
28
- var { geographyVariant, flagIcon, payment, card, isTextShown, showGeographyBox = true, customerInitiated } = _a, props = __rest(_a, ["geographyVariant", "flagIcon", "payment", "card", "isTextShown", "showGeographyBox", "customerInitiated"]);
29
- const paymentResourcesContainer = useRef(null);
30
- const [leftOffset, setLeftOffset] = useState(0);
31
- const { t } = useTranslation();
32
- useEffect(() => {
33
- const timer = setTimeout(() => {
34
- var _a;
35
- setLeftOffset((_a = paymentResourcesContainer === null || paymentResourcesContainer === void 0 ? void 0 : paymentResourcesContainer.current) === null || _a === void 0 ? void 0 : _a.offsetLeft);
36
- }, 100);
37
- return () => {
38
- clearTimeout(timer);
39
- };
40
- }, [(_b = paymentResourcesContainer === null || paymentResourcesContainer === void 0 ? void 0 : paymentResourcesContainer.current) === null || _b === void 0 ? void 0 : _b.offsetLeft, isTextShown]);
41
- const customerInitiatedTooltip = customerInitiated === false ? t('merchantInitiated') : '';
42
- const geographyTooltip = geographyVariant ? geographyMap[geographyVariant] : undefined;
43
- const tooltip = geographyTooltip || flagIcon ? `${geographyTooltip || ''} ${geographyTooltip && flagIcon ? `-` : ''} ${flagIcon ? `${flagIcon}` : ''}` : undefined;
44
- const icon = flagIcon && _jsx(CountryFlag, { countryCode: flagIcon });
45
- const sources = [];
46
- const walletTypeIcon = (payment === null || payment === void 0 ? void 0 : payment.wallet) === 'SV Wallet' ? 'walletStoredValue' : 'walletPassThru';
47
- const type = (payment === null || payment === void 0 ? void 0 : payment.type) === 'Wallet' ? walletTypeIcon : payment === null || payment === void 0 ? void 0 : payment.type;
48
- const method = payment === null || payment === void 0 ? void 0 : payment.method;
49
- const scheme = payment === null || payment === void 0 ? void 0 : payment.scheme;
50
- if (((_c = getPaymentMethodKey(method)) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === ((_d = getPaymentMethodKey(scheme)) === null || _d === void 0 ? void 0 : _d.toLowerCase())) {
51
- sources.push(...[getPaymentMethodKey(type), getPaymentMethodKey(method)]);
52
- }
53
- else {
54
- sources.push(...[getPaymentMethodKey(type), getPaymentMethodKey(scheme), getPaymentMethodKey(method)]);
55
- }
56
- const paymentSources = (_e = sources === null || sources === void 0 ? void 0 : sources.filter((s) => !!s)) === null || _e === void 0 ? void 0 : _e.map((source, index, sourcesList) => {
57
- if (!source)
58
- return null;
59
- const ImageSrc = getPaymentMethodsIcon(source);
60
- const walletTooltip = (payment === null || payment === void 0 ? void 0 : payment.wallet) === t('sv_wallet') ? t('storedValueWallet') : t('passThruWallet');
61
- const sourceTooltip = index === sourcesList.length - 1 && !!(card === null || card === void 0 ? void 0 : card.last_four) ? `${t(camelCase(source))} - ${card === null || card === void 0 ? void 0 : card.last_four}` : t(camelCase(source));
62
- return (_jsx(Tooltip, Object.assign({ title: index === 0 && source === 'Wallet' ? walletTooltip : sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ "data-testid": "SourceCell_ImageWrapper", order: index, variants: paymentSourceAnimation(index, isTextShown ? 89 : 0), sx: Object.assign({ width: isTextShown ? '85px' : '36px' }, (isTextShown && { overflow: 'hidden', justifyContent: 'flex-start' })) }, { children: isTextShown ? (_jsx(BadgeTextWrapper, Object.assign({ "data-testid": "SourceCell_BadgeTextWrapper" }, { children: _jsx(TextLabel, Object.assign({ "data-testid": "SourceCell_TextLabel", "data-source": source }, { children: t(camelCase(source)) })) }))) : (_jsx(StyledSourceImage, { src: ImageSrc, alt: source, onError: (e) => {
63
- e.currentTarget.src = getPaymentMethodsIcon('card');
64
- } })) })) }), `${source}-${index}`));
65
- });
66
- const paymentSourcesCount = (paymentSources === null || paymentSources === void 0 ? void 0 : paymentSources.length) || 0;
67
- const geographyOffset = showGeographyBox ? 23 : 0;
68
- const customerInitiatedOffset = customerInitiatedTooltip ? 24 : 0;
69
- return (_jsx(TableCell, Object.assign({}, props, { ref: paymentResourcesContainer }, { children: _jsxs(StyledSourceCell, Object.assign({ "data-testid": "SourceCell" }, { children: [customerInitiatedTooltip && (_jsx(Tooltip, Object.assign({ title: customerInitiatedTooltip }, { children: _jsx("img", { "data-testid": "CustomerCell_merchantInitiatedIcon", src: merchantInitiatedIcon, alt: "merchant", style: {
70
- width: '16px',
71
- height: '16px',
72
- } }) }))), showGeographyBox && (_jsx(Tooltip, Object.assign({ title: tooltip }, { children: _jsx(GeographyBox, Object.assign({ variant: geographyVariant ? geographyMap[geographyVariant] : undefined, className: "geography-box", "data-testid": "SourceCell_GeographyBox", sx: {
73
- visibility: 'visible',
74
- } }, { children: isTextShown ? null : icon })) }))), leftOffset && (paymentSources === null || paymentSources === void 0 ? void 0 : paymentSources.length) > 0 ? (_jsx(PaymentSourcesContainer, Object.assign({ layout: true, className: "payment-sources-container", "data-testid": "SourceCell_PaymentSourcesContainer", whileHover: "animate", animate: "start", sourcesCount: paymentSourcesCount || 0, variants: { animate: { width: (paymentSourcesCount || 0) * (6 + 32) } }, style: Object.assign(Object.assign({}, (leftOffset && {
75
- left: (leftOffset || 0) + (isTextShown ? geographyOffset * 1.05 : geographyOffset) + customerInitiatedOffset,
76
- })), { zIndex: 30 }) }, { children: paymentSources }))) : null] })) })));
17
+ return { centerIcon: null, centerIconId: null };
18
+ }, [components]);
19
+ if (!centerIconId)
20
+ return null;
21
+ const isPaymentSchemeVisible = centerIconId !== CENTER_ICON_KEY.PAYMENT_SCHEME && components.paymentScheme;
22
+ const isPaymentCardNumberVisible = centerIconId !== CENTER_ICON_KEY.PAYMENT_CARD_NUMBER && components.paymentCardNumber;
23
+ const isPaymentTypeVisible = centerIconId !== CENTER_ICON_KEY.PAYMENT_TYPE && components.paymentType;
24
+ return (_jsx(RightLeftExpandingCenterChip, { expandedZIndex: 0, centerIcon: centerIcon, leftIcons: LEFT_ICON_PRIORITY.filter((key) => key !== centerIconId && (components === null || components === void 0 ? void 0 : components[key])).map((key) => components === null || components === void 0 ? void 0 : components[key]), rightIcons: RIGHT_ICON_PRIORITY.filter((key) => key !== centerIconId && (components === null || components === void 0 ? void 0 : components[key])).map((key) => components[key]), expandableCenterRight: (isPaymentSchemeVisible || isPaymentCardNumberVisible) && (_jsxs(Box, Object.assign({ sx: {
25
+ marginRight: '8px',
26
+ display: 'flex',
27
+ alignItems: 'center',
28
+ gap: '4px',
29
+ // minWidth: isPaymentSchemeVisible && isPaymentCardNumberVisible ? 45 : 20
30
+ } }, { children: [isPaymentSchemeVisible && components.paymentScheme, isPaymentCardNumberVisible && components.paymentCardNumber] }))), expandableCenterLeft: isPaymentTypeVisible && _jsx(Box, Object.assign({ sx: { marginLeft: '8px', width: 20 } }, { children: components.paymentType })) }));
77
31
  }
78
- export default SourceCell;
32
+ export default memo(SourceCell);
@@ -0,0 +1,2 @@
1
+ import { AgreementIconProps } from '../../../../../index.js';
2
+ export declare function PaymentAgreement({ type, hasSavedCard, totalPaymentsCount }: AgreementIconProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { AgreementIcon } from '../../../../../index.js';
3
+ export function PaymentAgreement({ type, hasSavedCard, totalPaymentsCount }) {
4
+ if (!type)
5
+ return null;
6
+ return _jsx(AgreementIcon, { type: type, hasSavedCard: hasSavedCard, totalPaymentsCount: totalPaymentsCount });
7
+ }
@@ -0,0 +1 @@
1
+ export * from './PaymentAgreement';
@@ -0,0 +1,18 @@
1
+ import { AuthenticationStatus } from '../../../../../../types/index.js';
2
+ import { AuthenticationType } from '../../../../../index.js';
3
+ interface PaymentAuthProps {
4
+ authType?: AuthenticationType;
5
+ isECIShown?: boolean;
6
+ isAuthenticationTypeShown?: boolean;
7
+ authentication?: {
8
+ acsEci: string;
9
+ transaction_status: 'Y' | 'A' | 'N' | 'R' | 'U';
10
+ id: string;
11
+ status: AuthenticationStatus;
12
+ threeDSecure?: {
13
+ status: AuthenticationStatus;
14
+ };
15
+ };
16
+ }
17
+ export declare function PaymentAuth({ authType, authentication, isECIShown, isAuthenticationTypeShown }: PaymentAuthProps): import("react/jsx-runtime").JSX.Element | null;
18
+ export {};
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { AuthIcons } from '../../../../../index.js';
3
+ export function PaymentAuth({ authType, authentication, isECIShown, isAuthenticationTypeShown }) {
4
+ var _a;
5
+ const eci = authentication === null || authentication === void 0 ? void 0 : authentication.acsEci;
6
+ if (!eci && !authType)
7
+ return null;
8
+ return (_jsx(AuthIcons, { transactionStatus: (authentication === null || authentication === void 0 ? void 0 : authentication.status) || ((_a = authentication === null || authentication === void 0 ? void 0 : authentication.threeDSecure) === null || _a === void 0 ? void 0 : _a.status), eci: isECIShown ? eci : undefined, authType: isAuthenticationTypeShown ? authType : undefined }));
9
+ }