@tap-payments/os-micro-frontend-shared 0.0.131 → 0.0.133

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 (71) hide show
  1. package/build/components/DeviceIcon/DeviceIcon.d.ts +3 -1
  2. package/build/components/DeviceIcon/DeviceIcon.js +3 -3
  3. package/build/components/DeviceIcon/style.d.ts +4 -1
  4. package/build/components/DeviceIcon/style.js +4 -1
  5. package/build/components/MaskedText/MaskedText.d.ts +3 -0
  6. package/build/components/MaskedText/MaskedText.js +11 -0
  7. package/build/components/MaskedText/index.d.ts +3 -0
  8. package/build/components/MaskedText/index.js +2 -0
  9. package/build/components/MaskedText/type.d.ts +7 -0
  10. package/build/components/MaskedText/type.js +1 -0
  11. package/build/components/StatusButton/StatusButton.js +2 -2
  12. package/build/components/StatusChip/StatusChip.d.ts +4 -0
  13. package/build/components/StatusChip/StatusChip.js +19 -0
  14. package/build/components/StatusChip/index.d.ts +3 -0
  15. package/build/components/StatusChip/index.js +2 -0
  16. package/build/components/StatusChip/style.d.ts +14 -0
  17. package/build/components/StatusChip/style.js +32 -0
  18. package/build/components/StatusChip/type.d.ts +9 -0
  19. package/build/components/StatusChip/type.js +1 -0
  20. package/build/components/StatusIcons/AuthorizedIcon/AuthorizedIcon.d.ts +3 -1
  21. package/build/components/StatusIcons/AuthorizedIcon/AuthorizedIcon.js +4 -4
  22. package/build/components/StatusIcons/DeviceIcon/DeviceIcon.d.ts +3 -1
  23. package/build/components/StatusIcons/DeviceIcon/DeviceIcon.js +2 -2
  24. package/build/components/StatusIcons/IssuerIcon/IssuerIcon.d.ts +1 -1
  25. package/build/components/StatusIcons/IssuerIcon/IssuerIcon.js +2 -2
  26. package/build/components/StatusIcons/IssuerIcon/style.d.ts +4 -1
  27. package/build/components/StatusIcons/IssuerIcon/style.js +3 -4
  28. package/build/components/StatusIcons/IssuerIcon/type.d.ts +2 -0
  29. package/build/components/TableCells/CustomCells/ActionCell/ActionCell.d.ts +3 -1
  30. package/build/components/TableCells/CustomCells/ActionCell/ActionCell.js +5 -4
  31. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +4 -1
  32. package/build/components/TableCells/CustomCells/ActionCell/style.js +4 -2
  33. package/build/components/TableCells/CustomCells/DestinationCell/DestinationCell.d.ts +1 -1
  34. package/build/components/TableCells/CustomCells/DestinationCell/DestinationCell.js +3 -2
  35. package/build/components/TableCells/CustomCells/DestinationCell/styled.d.ts +4 -1
  36. package/build/components/TableCells/CustomCells/DestinationCell/styled.js +4 -2
  37. package/build/components/TableCells/CustomCells/ReceiptCell/ReceiptCell.d.ts +2 -1
  38. package/build/components/TableCells/CustomCells/ReceiptCell/ReceiptCell.js +4 -1
  39. package/build/components/TableCells/CustomCells/ReferenceCell/ReferenceCell.d.ts +1 -1
  40. package/build/components/TableCells/CustomCells/ReferenceCell/ReferenceCell.js +5 -1
  41. package/build/components/TableCells/CustomCells/ReferenceCell/type.d.ts +5 -2
  42. package/build/components/TableCells/CustomCells/SheetViewIDButton/SheetViewIDButton.d.ts +7 -0
  43. package/build/components/TableCells/CustomCells/SheetViewIDButton/SheetViewIDButton.js +35 -0
  44. package/build/components/TableCells/CustomCells/SheetViewIDButton/index.d.ts +1 -0
  45. package/build/components/TableCells/CustomCells/SheetViewIDButton/index.js +1 -0
  46. package/build/components/TableCells/CustomCells/SheetViewIDButton/style.d.ts +3 -0
  47. package/build/components/TableCells/CustomCells/SheetViewIDButton/style.js +22 -0
  48. package/build/components/TableCells/CustomCells/SourceMergedCell/SourceMergedCell.d.ts +1 -1
  49. package/build/components/TableCells/CustomCells/SourceMergedCell/SourceMergedCell.js +28 -2
  50. package/build/components/TableCells/CustomCells/SourceMergedCell/type.d.ts +2 -1
  51. package/build/components/TableCells/CustomCells/StatusCell/StatusCell.d.ts +1 -1
  52. package/build/components/TableCells/CustomCells/StatusCell/StatusCell.js +6 -2
  53. package/build/components/TableCells/CustomCells/StatusCell/style.js +1 -0
  54. package/build/components/TableCells/CustomCells/StatusCell/type.d.ts +1 -0
  55. package/build/components/TableCells/CustomCells/index.d.ts +1 -0
  56. package/build/components/TableCells/CustomCells/index.js +1 -0
  57. package/build/components/TableCells/CustomCells/style.d.ts +4 -1
  58. package/build/components/TableCells/CustomCells/style.js +6 -9
  59. package/build/components/TableCells/CustomCells/type.d.ts +2 -1
  60. package/build/components/TableHeader_V2/components/StatusButtons/StatusButton.js +6 -10
  61. package/build/components/VirtualTable/SheetView/SheetViewVirtualTable.d.ts +1 -1
  62. package/build/components/VirtualTable/SheetView/SheetViewVirtualTable.js +1 -1
  63. package/build/components/VirtualTable/style.js +3 -3
  64. package/build/components/index.d.ts +2 -0
  65. package/build/components/index.js +2 -0
  66. package/build/constants/assets.d.ts +1 -0
  67. package/build/constants/assets.js +1 -0
  68. package/build/constants/table/cell/chargeTableCellWidth.d.ts +13 -13
  69. package/build/constants/table/cell/chargeTableCellWidth.js +13 -13
  70. package/build/types/table.d.ts +2 -1
  71. package/package.json +1 -1
@@ -1,10 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import { BoxProps } from '@mui/material/Box';
3
3
  import { DEVICE_ICON } from './constants';
4
+ import { TableMode } from '../../types/index.js';
4
5
  interface DeviceIconProps extends BoxProps {
5
6
  type?: keyof typeof DEVICE_ICON;
6
7
  isTextShown?: boolean;
8
+ tableMode?: TableMode;
7
9
  }
8
- declare function DeviceIcon({ type, isTextShown, ...props }: DeviceIconProps): import("react/jsx-runtime").JSX.Element;
10
+ declare function DeviceIcon({ type, isTextShown, tableMode, ...props }: DeviceIconProps): import("react/jsx-runtime").JSX.Element;
9
11
  declare const _default: import("react").MemoExoticComponent<typeof DeviceIcon>;
10
12
  export default _default;
@@ -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 } from "react/jsx-runtime";
12
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
13
13
  import { memo } from 'react';
14
14
  import Box from '@mui/material/Box';
15
15
  import capitalize from 'lodash/capitalize';
@@ -21,9 +21,9 @@ import Tooltip from '../Tooltip';
21
21
  import { DEVICE_ICON } from './constants';
22
22
  import { isDeviceIconShown } from './utils';
23
23
  function DeviceIcon(_a) {
24
- var { type, isTextShown } = _a, props = __rest(_a, ["type", "isTextShown"]);
24
+ var { type, isTextShown, tableMode } = _a, props = __rest(_a, ["type", "isTextShown", "tableMode"]);
25
25
  const { t } = useTranslation();
26
26
  const icon = isDeviceIconShown(type) ? DEVICE_ICON[type] : null;
27
- return (_jsx(Tooltip, Object.assign({ title: icon ? capitalizeFirstLetter((type !== null && type !== void 0 ? type : '').toLowerCase()) : t('unKnown') }, { children: isTextShown ? (_jsx(TextLabel, { children: type ? capitalize(type) : 'Unknown' })) : (_jsx(Box, Object.assign({}, props, { component: "img", src: type ? icon || defaultDeviceIcon : defaultDeviceIcon, alt: type }))) })));
27
+ return (_jsx(Tooltip, Object.assign({ title: icon ? capitalizeFirstLetter((type !== null && type !== void 0 ? type : '').toLowerCase()) : t('unKnown') }, { children: isTextShown ? (_jsxs(TextLabel, Object.assign({ tableMode: tableMode }, { children: [" ", type ? capitalize(type) : 'Unknown'] }))) : (_jsx(Box, Object.assign({}, props, { component: "img", src: type ? icon || defaultDeviceIcon : defaultDeviceIcon, alt: type }))) })));
28
28
  }
29
29
  export default memo(DeviceIcon);
@@ -1,4 +1,7 @@
1
1
  /// <reference types="react" />
2
+ import { TableMode } from '../../types/index.js';
2
3
  export declare const TextLabel: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
4
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
- }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
5
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
6
+ tableMode?: TableMode | undefined;
7
+ }, {}, {}>;
@@ -1,6 +1,8 @@
1
1
  import Box from '@mui/material/Box';
2
2
  import { styled } from '@mui/material/styles';
3
- export const TextLabel = styled(Box)(({ theme }) => ({
3
+ export const TextLabel = styled(Box, {
4
+ shouldForwardProp: (prop) => prop !== 'tableMode',
5
+ })(({ theme, tableMode }) => ({
4
6
  fontSize: '11px',
5
7
  display: 'flex',
6
8
  alignItems: 'center',
@@ -12,4 +14,5 @@ export const TextLabel = styled(Box)(({ theme }) => ({
12
14
  borderRadius: '24px',
13
15
  border: `1px solid ${theme.palette.divider}`,
14
16
  color: theme.palette.text.primary,
17
+ height: tableMode === 'sheet' ? '18px' : '24px',
15
18
  }));
@@ -0,0 +1,3 @@
1
+ import { MaskedTextProps } from './type';
2
+ declare const MaskedText: ({ text, startLength, endLength }: MaskedTextProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default MaskedText;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import StatusChip from '../StatusChip';
3
+ import { Box, useTheme } from '@mui/material';
4
+ import { passwordDotsIcon } from '../../constants/index.js';
5
+ const MaskedText = ({ text, startLength = 8, endLength = 4 }) => {
6
+ const theme = useTheme();
7
+ const startText = text.slice(0, startLength);
8
+ const endText = text.slice(text.length - endLength);
9
+ return (_jsxs(Box, Object.assign({ sx: { display: 'flex', alignItems: 'center', gap: theme.spacing(0.5) } }, { children: [_jsx(StatusChip, Object.assign({ bgColor: "#EFF1F2", borderColor: "transparent", textColor: theme.palette.text.primary }, { children: startText })), _jsx("img", { src: passwordDotsIcon, alt: "passwordDots" }), _jsx(StatusChip, Object.assign({ bgColor: "#EFF1F2", borderColor: "transparent", textColor: theme.palette.text.primary }, { children: endText }))] })));
10
+ };
11
+ export default MaskedText;
@@ -0,0 +1,3 @@
1
+ import MaskedText from './MaskedText';
2
+ export type { MaskedTextProps } from './type';
3
+ export default MaskedText;
@@ -0,0 +1,2 @@
1
+ import MaskedText from './MaskedText';
2
+ export default MaskedText;
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ export interface MaskedTextProps {
3
+ text: string;
4
+ startLength?: number;
5
+ endLength?: number;
6
+ separator?: ReactNode;
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -35,11 +35,11 @@ function StatusButton(_a) {
35
35
  const dropdownIcon = hasDropdown ? _jsx(ChevronIcon, { isActive: variant === 'active' }) : null;
36
36
  return (_jsxs(_Fragment, { children: [_jsx(Button, Object.assign({ "data-testid": "StatusButton" }, props, { ref: buttonRef, onClick: (e) => {
37
37
  var _a, _b;
38
+ (_a = props === null || props === void 0 ? void 0 : props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
39
+ onButtonBodyClick === null || onButtonBodyClick === void 0 ? void 0 : onButtonBodyClick(lastActiveStatus || ((_b = dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions[0]) === null || _b === void 0 ? void 0 : _b.status) || 'all');
38
40
  if (hasDropdown) {
39
41
  setAnchorEl(e.currentTarget);
40
42
  }
41
- (_a = props === null || props === void 0 ? void 0 : props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
42
- onButtonBodyClick === null || onButtonBodyClick === void 0 ? void 0 : onButtonBodyClick(lastActiveStatus || ((_b = dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions[0]) === null || _b === void 0 ? void 0 : _b.status) || 'all');
43
43
  }, sx: Object.assign({}, (hasDropdown && {
44
44
  paddingInlineEnd: '27px',
45
45
  })) }, { children: _jsxs(LabelWrapper, { children: [_jsxs(Label, Object.assign({ variant: variant }, { children: [statusIcon, lastActiveStatus ? t(lastActiveStatus) : label, statusBadge] })), dropdownIcon && _jsx(ChevronContainer, { children: dropdownIcon })] }) })), open && !showDropdownIcon && (_jsx(StyledDropdown, { open: open, onClose: handleClose, anchorEl: anchorEl, menuItems: (_c = (dropdownOptions || [])) === null || _c === void 0 ? void 0 : _c.map((item) => (Object.assign(Object.assign({}, item), { onClick: (e) => {
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { ChipProps } from './type';
3
+ declare const StatusChip: import("react").ForwardRefExoticComponent<Omit<ChipProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
4
+ export default StatusChip;
@@ -0,0 +1,19 @@
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 { forwardRef } from 'react';
14
+ import { ChipStyled } from './style';
15
+ const StatusChip = forwardRef((_a, ref) => {
16
+ var { children } = _a, props = __rest(_a, ["children"]);
17
+ return (_jsx(ChipStyled, Object.assign({ ref: ref }, props, { children: children })));
18
+ });
19
+ export default StatusChip;
@@ -0,0 +1,3 @@
1
+ import StatusChip from './StatusChip';
2
+ export type { ChipProps as StatusChipProps } from './type';
3
+ export default StatusChip;
@@ -0,0 +1,2 @@
1
+ import StatusChip from './StatusChip';
2
+ export default StatusChip;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ export declare const ChipStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
5
+ textColor?: string | undefined;
6
+ bgColor?: string | undefined;
7
+ borderColor?: string | undefined;
8
+ disabled?: boolean | undefined;
9
+ padding?: string | undefined;
10
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
11
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
12
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
13
+ children?: import("react").ReactNode;
14
+ }, {}, {}>;
@@ -0,0 +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]];
9
+ }
10
+ return t;
11
+ };
12
+ import { Box, styled } from '@mui/material';
13
+ export const ChipStyled = styled(Box)((_a) => {
14
+ var { theme } = _a, props = __rest(_a, ["theme"]);
15
+ const { textColor = theme.palette.text.primary, bgColor = theme.palette.background.paper, borderColor = theme.palette.divider, disabled = false, padding, } = props;
16
+ return {
17
+ display: 'inline-flex',
18
+ alignItems: 'center',
19
+ justifyContent: 'center',
20
+ height: '18px',
21
+ padding: padding || `${theme.spacing(0.25)} ${theme.spacing(1.5)}`,
22
+ borderRadius: '30px',
23
+ border: `1px solid ${borderColor}`,
24
+ backgroundColor: bgColor,
25
+ color: textColor,
26
+ cursor: disabled ? 'not-allowed' : 'pointer',
27
+ opacity: disabled ? 0.5 : 1,
28
+ whiteSpace: 'nowrap',
29
+ fontSize: '11px',
30
+ minWidth: '67px',
31
+ };
32
+ });
@@ -0,0 +1,9 @@
1
+ import { BoxProps } from '@mui/material';
2
+ import { PropsWithChildren } from 'react';
3
+ export type ChipProps = PropsWithChildren<{
4
+ textColor?: string;
5
+ bgColor?: string;
6
+ borderColor?: string;
7
+ disabled?: boolean;
8
+ padding?: string;
9
+ } & BoxProps>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,9 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  import { type AuthorizedStatusType } from '../../TableCells';
3
+ import { TableMode } from '../../../types/index.js';
3
4
  type AuthorizedIconProps = {
4
5
  iconStyles?: React.CSSProperties;
5
6
  authorizedStatus?: AuthorizedStatusType;
6
7
  isTextShown?: boolean;
8
+ tableMode?: TableMode;
7
9
  };
8
- export declare const AuthorizedIcon: ({ authorizedStatus, isTextShown, iconStyles }: AuthorizedIconProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const AuthorizedIcon: ({ authorizedStatus, isTextShown, iconStyles, tableMode }: AuthorizedIconProps) => import("react/jsx-runtime").JSX.Element;
9
11
  export {};
@@ -6,10 +6,10 @@ import Tooltip from '../../Tooltip';
6
6
  import { authorizedStatusIcons } from '../../TableCells/CustomCells/StatusCell/constant';
7
7
  import Icon from '../../Icon';
8
8
  import { TextLabel } from '../../TableCells/CustomCells/style';
9
- export const AuthorizedIcon = ({ authorizedStatus, isTextShown, iconStyles }) => {
9
+ export const AuthorizedIcon = ({ authorizedStatus, isTextShown, iconStyles, tableMode }) => {
10
10
  const { t } = useTranslation();
11
11
  const theme = useTheme();
12
- return (_jsx(Tooltip, Object.assign({ title: t(camelCase(authorizedStatus)) }, { children: isTextShown ? (_jsx(TextLabel, Object.assign({ "data-testid": "StatusCell_AuthorizedStatusLabel", sx: {
13
- color: theme.palette.info.dark,
14
- } }, { children: t(camelCase(authorizedStatus)) }))) : (_jsx(Icon, { src: authorizedStatusIcons[authorizedStatus], alt: "authorized-icon", "data-testid": "StatusCell_AuthorizedStatusIcon", sx: iconStyles })) })));
12
+ return (_jsx(Tooltip, Object.assign({ title: t(camelCase(authorizedStatus)) }, { children: isTextShown ? (_jsx(TextLabel, Object.assign({ "data-testid": "StatusCell_AuthorizedStatusLabel", sx: Object.assign({ color: theme.palette.info.dark }, (tableMode === 'sheet' && {
13
+ height: '18px',
14
+ })) }, { children: t(camelCase(authorizedStatus)) }))) : (_jsx(Icon, { src: authorizedStatusIcons[authorizedStatus], alt: "authorized-icon", "data-testid": "StatusCell_AuthorizedStatusIcon", sx: iconStyles })) })));
15
15
  };
@@ -1,8 +1,10 @@
1
+ import { TableMode } from '../../../types/index.js';
1
2
  interface DeviceIconChipProps {
2
3
  geographyVariant?: 'G' | 'L' | 'R';
3
4
  isTextShown?: boolean;
4
5
  deviceCountry?: string;
5
6
  deviceType?: 'DESKTOP' | 'PHONE' | 'TABLET';
7
+ tableMode?: TableMode;
6
8
  }
7
- export declare const DeviceIconChip: ({ geographyVariant, isTextShown, deviceCountry, deviceType }: DeviceIconChipProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const DeviceIconChip: ({ geographyVariant, isTextShown, deviceCountry, deviceType, tableMode }: DeviceIconChipProps) => import("react/jsx-runtime").JSX.Element;
8
10
  export {};
@@ -2,6 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box } from '@mui/material';
3
3
  import DeviceIcon from '../../DeviceIcon';
4
4
  import { GeographyIcon } from '../GeographyIcon/GeographyIcon';
5
- export const DeviceIconChip = ({ geographyVariant, isTextShown, deviceCountry, deviceType }) => {
6
- return (_jsxs(Box, Object.assign({ sx: { display: 'flex', gap: '8px', alignItems: 'center' } }, { children: [_jsx(GeographyIcon, { geographyVariant: geographyVariant, isTextShown: isTextShown, countryCode: deviceCountry }), _jsx(DeviceIcon, { type: deviceType, isTextShown: isTextShown })] })));
5
+ export const DeviceIconChip = ({ geographyVariant, isTextShown, deviceCountry, deviceType, tableMode }) => {
6
+ return (_jsxs(Box, Object.assign({ sx: Object.assign({ display: 'flex', gap: '8px', alignItems: 'center' }, (tableMode === 'sheet' && { height: '18px' })) }, { children: [_jsx(GeographyIcon, { geographyVariant: geographyVariant, isTextShown: isTextShown, countryCode: deviceCountry }), _jsx(DeviceIcon, { type: deviceType, isTextShown: isTextShown, tableMode: tableMode })] })));
7
7
  };
@@ -1,2 +1,2 @@
1
1
  import { IssuerIconProps } from './type';
2
- export default function IssuerIcon({ countryCode, isTextShown, cardNumber, bankName }: IssuerIconProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function IssuerIcon({ countryCode, isTextShown, cardNumber, bankName, tableMode }: IssuerIconProps): import("react/jsx-runtime").JSX.Element;
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { GeographyIcon } from '../GeographyIcon/GeographyIcon';
3
3
  import { IssuerIconContainer, CardNumber } from './style';
4
4
  import Tooltip from '../../Tooltip';
5
- export default function IssuerIcon({ countryCode, isTextShown, cardNumber, bankName }) {
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, { children: [countryCode && _jsx(GeographyIcon, { countryCode: countryCode, isTextShown: isTextShown }), _jsx(Tooltip, Object.assign({ title: bankName }, { children: _jsx(CardNumber, { children: `${firstFourDigits || ''} ${lastFourDigits || ''}` }) }))] }));
8
+ return (_jsxs(IssuerIconContainer, Object.assign({ tableMode: tableMode }, { children: [countryCode && _jsx(GeographyIcon, { countryCode: countryCode, isTextShown: isTextShown }), _jsx(Tooltip, Object.assign({ title: bankName }, { children: _jsx(CardNumber, { children: `${firstFourDigits || ''} ${lastFourDigits || ''}` }) }))] })));
9
9
  }
@@ -1,5 +1,8 @@
1
1
  /// <reference types="react" />
2
+ import { TableMode } from '../../../types/index.js';
2
3
  export declare const IssuerIconContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
4
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
- }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
5
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
6
+ tableMode?: TableMode | undefined;
7
+ }, {}, {}>;
5
8
  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,9 +1,8 @@
1
1
  import { Box } from '@mui/material';
2
2
  import { styled } from '@mui/material/styles';
3
- export const IssuerIconContainer = styled(Box)(({ theme }) => ({
4
- display: 'flex',
5
- gap: theme.spacing(0.5),
6
- }));
3
+ export const IssuerIconContainer = styled(Box, {
4
+ shouldForwardProp: (prop) => prop !== 'tableMode',
5
+ })(({ theme, tableMode }) => (Object.assign(Object.assign({ display: 'flex', gap: theme.spacing(0.5) }, (tableMode === 'sheet' && { height: '18px' })), { alignItems: 'center' })));
7
6
  export const CardNumber = styled('span')(({ theme }) => ({
8
7
  fontSize: '10px',
9
8
  fontWeight: 500,
@@ -1,6 +1,8 @@
1
+ import { TableMode } from '../../../types/index.js';
1
2
  export type IssuerIconProps = {
2
3
  countryCode?: string;
3
4
  isTextShown?: boolean;
4
5
  cardNumber?: string;
5
6
  bankName?: string;
7
+ tableMode?: TableMode;
6
8
  };
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
2
  import type { ActionCellProps } from '../type';
3
+ import { TableMode } from '../../../../types/index.js';
3
4
  type Props = Readonly<ActionCellProps> & {
4
5
  onJsonViewClick?: () => void;
6
+ tableMode?: TableMode;
5
7
  };
6
- declare function ActionCell({ flag, actions, flagTooltip, flagsCount, dropdownAction, onCloseDropdown, isDropdownShown, row, showJsonViewer, isTextShown, showIdButton, rowId, onJsonViewClick, ...props }: Props): import("react/jsx-runtime").JSX.Element;
8
+ declare function ActionCell({ flag, actions, flagTooltip, flagsCount, dropdownAction, onCloseDropdown, isDropdownShown, row, showJsonViewer, isTextShown, showIdButton, rowId, onJsonViewClick, tableMode, ...props }: Props): import("react/jsx-runtime").JSX.Element;
7
9
  declare const _default: React.MemoExoticComponent<typeof ActionCell>;
8
10
  export default _default;
@@ -24,14 +24,15 @@ import { useActionCell } from './hooks/useActionCell';
24
24
  import { ActionCellContainer, ActionIcon, ActionsIconContainer } from './style';
25
25
  import { IDButton } from '../IDButton';
26
26
  import { BadgeWrapper, IdButtonContainer, TextLabel, TransparentButton } from '../style';
27
+ import SheetViewIDButton from '../SheetViewIDButton/SheetViewIDButton';
27
28
  function ActionCell(_a) {
28
29
  var _b, _c;
29
- var { flag, actions, flagTooltip, flagsCount, dropdownAction, onCloseDropdown, isDropdownShown = true, row, showJsonViewer = true, isTextShown, showIdButton = true, rowId, onJsonViewClick } = _a, props = __rest(_a, ["flag", "actions", "flagTooltip", "flagsCount", "dropdownAction", "onCloseDropdown", "isDropdownShown", "row", "showJsonViewer", "isTextShown", "showIdButton", "rowId", "onJsonViewClick"]);
30
+ var { flag, actions, flagTooltip, flagsCount, dropdownAction, onCloseDropdown, isDropdownShown = true, row, showJsonViewer = true, isTextShown, showIdButton = true, rowId, onJsonViewClick, tableMode } = _a, props = __rest(_a, ["flag", "actions", "flagTooltip", "flagsCount", "dropdownAction", "onCloseDropdown", "isDropdownShown", "row", "showJsonViewer", "isTextShown", "showIdButton", "rowId", "onJsonViewClick", "tableMode"]);
30
31
  const { t } = useTranslation();
31
32
  const { open, anchorEl, filteredActions, isAnyActionLoading, isAnyActionHasError, isAnyActionSuccessful, areThereAnyShownActions, handleClick, handleClose, } = useActionCell({ actions, isDropdownShown, onCloseDropdown });
32
33
  return (_jsx(TableCell, Object.assign({}, props, { sx: {
33
34
  overflow: 'visible',
34
- } }, { children: _jsxs(ActionCellContainer, Object.assign({ "data-testid": "ActionCell_ActionCellContainer" }, { children: [flag && (_jsx(_Fragment, { children: isTextShown ? (_jsx(Tooltip, Object.assign({ title: flagTooltip }, { children: _jsx(TextLabel, Object.assign({ "data-testid": "ActionCell_FlagLabel", sx: {
35
+ } }, { children: _jsxs(ActionCellContainer, Object.assign({ "data-testid": "ActionCell_ActionCellContainer", tableMode: tableMode }, { children: [flag && (_jsx(_Fragment, { children: isTextShown ? (_jsx(Tooltip, Object.assign({ title: flagTooltip }, { children: _jsx(TextLabel, Object.assign({ "data-testid": "ActionCell_FlagLabel", sx: {
35
36
  textAlign: 'left',
36
37
  justifyContent: 'flex-start',
37
38
  } }, { children: flagTooltip })) }))) : (_jsx(Tooltip, Object.assign({ title: flagTooltip }, { children: _jsxs(BadgeWrapper, Object.assign({ "data-testid": "ActionCell_FlagBadge", sx: {
@@ -71,12 +72,12 @@ function ActionCell(_a) {
71
72
  },
72
73
  opacity: 1,
73
74
  },
74
- } }, { children: _jsxs(StyledBadge, Object.assign({ compact: true, variant: colorToVariant[(_c = flags[flag]) === null || _c === void 0 ? void 0 : _c.color] || BadgeVariants.ORANGE, "data-testid": "ActionCell_StyledBadge" }, { children: [flagsCount, "x"] })) })))] })) }))) })), showIdButton && _jsx(IDButton, { rowId: rowId || row.id }), _jsxs("div", Object.assign({ "data-testid": "ActionCell_IconsContainer", style: {
75
+ } }, { children: _jsxs(StyledBadge, Object.assign({ compact: true, variant: colorToVariant[(_c = flags[flag]) === null || _c === void 0 ? void 0 : _c.color] || BadgeVariants.ORANGE, "data-testid": "ActionCell_StyledBadge" }, { children: [flagsCount, "x"] })) })))] })) }))) })), showIdButton ? (tableMode === 'sheet' ? (_jsx(SheetViewIDButton, { rowId: rowId || row.id })) : (_jsx(IDButton, { rowId: rowId || row.id }))) : null, _jsxs("div", Object.assign({ "data-testid": "ActionCell_IconsContainer", style: {
75
76
  display: 'flex',
76
77
  alignItems: 'center',
77
78
  justifyContent: 'center',
78
79
  gap: '5px',
79
- } }, { children: [showJsonViewer && (_jsx(_Fragment, { children: _jsx(TransparentButton, Object.assign({ onClick: onJsonViewClick, type: "button", "data-testid": "ActionCell_TransparentButton" }, { children: _jsx(Tooltip, Object.assign({ title: t('jsonViewer') }, { children: _jsx(IdButtonContainer, Object.assign({ "data-testid": "ActionCell_IdButtonContainer" }, { children: _jsx(motion.img, { src: jsonBlackIcon, alt: "icon" }, "id-icon") })) })) })) })), _jsxs(ActionsIconContainer, Object.assign({ id: "styled-popover", selected: !!dropdownAction || open, "data-testid": "ActionCell_ActionsIconContainer", "data-is-active": areThereAnyShownActions, sx: Object.assign({}, (!areThereAnyShownActions && {
80
+ } }, { children: [showJsonViewer && (_jsx(_Fragment, { children: _jsx(TransparentButton, Object.assign({ onClick: onJsonViewClick, type: "button", "data-testid": "ActionCell_TransparentButton" }, { children: _jsx(Tooltip, Object.assign({ title: t('jsonViewer') }, { children: _jsx(IdButtonContainer, Object.assign({ tableMode: tableMode, "data-testid": "ActionCell_IdButtonContainer" }, { children: tableMode === 'sheet' ? (_jsx("span", Object.assign({ style: { fontSize: '11px', fontWeight: 400 } }, { children: "View API" }))) : (_jsx(motion.img, { src: jsonBlackIcon, alt: "icon" }, "id-icon")) })) })) })) })), _jsxs(ActionsIconContainer, Object.assign({ id: "styled-popover", selected: !!dropdownAction || open, "data-testid": "ActionCell_ActionsIconContainer", "data-is-active": areThereAnyShownActions, sx: Object.assign({}, (!areThereAnyShownActions && {
80
81
  pointerEvents: 'none',
81
82
  })) }, { children: [_jsx(TransparentButton, Object.assign({ onClick: handleClick, "data-testid": "ActionCell_ActionsIconContainer_TransparentButton", "data-is-active": areThereAnyShownActions, sx: Object.assign({}, (!areThereAnyShownActions && {
82
83
  pointerEvents: 'none',
@@ -1,5 +1,8 @@
1
1
  /// <reference types="react" />
2
- export declare const ActionCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
2
+ import { TableMode } from '../../../../types/index.js';
3
+ export declare const ActionCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
4
+ tableMode?: TableMode | undefined;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
3
6
  export declare const ActionsIconContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
4
7
  selected: boolean;
5
8
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -1,12 +1,14 @@
1
1
  import { styled } from '@mui/material/styles';
2
2
  import { motion } from 'framer-motion';
3
- export const ActionCellContainer = styled('section')(({ theme }) => ({
3
+ export const ActionCellContainer = styled('section', {
4
+ shouldForwardProp: (props) => props !== 'tableMode',
5
+ })(({ theme, tableMode }) => ({
4
6
  display: 'flex',
5
7
  alignItems: 'center',
6
8
  justifyContent: 'flex-end',
7
9
  textAlign: 'center',
8
10
  borderRadius: '50%',
9
- gap: theme.spacing(1),
11
+ gap: tableMode === 'sheet' ? '4px' : theme.spacing(1),
10
12
  overflow: 'visible',
11
13
  }));
12
14
  export const ActionsIconContainer = styled('span')(({ selected }) => (Object.assign(Object.assign({ overflow: 'visible', borderRadius: '50%', display: 'flex', justifyContent: 'center', alignItems: 'center', '&:hover': {
@@ -1,3 +1,3 @@
1
1
  import { DestinationCellProps } from '../type';
2
- declare function DestinationCell({ destinationsCount, destinationsTooltip, isTextShown, destination, destinationsAmount, hidden, iconDirection, ...props }: DestinationCellProps): import("react/jsx-runtime").JSX.Element | null;
2
+ declare function DestinationCell({ destinationsCount, destinationsTooltip, isTextShown, destination, destinationsAmount, hidden, iconDirection, tableMode, ...props }: DestinationCellProps): import("react/jsx-runtime").JSX.Element | null;
3
3
  export default DestinationCell;
@@ -19,7 +19,7 @@ import { TextLabel } from '../style';
19
19
  import { CurrencyIcon } from '../../../index.js';
20
20
  function DestinationCell(_a) {
21
21
  var _b, _c, _d, _e, _f;
22
- var { destinationsCount, destinationsTooltip, isTextShown, destination, destinationsAmount, hidden, iconDirection } = _a, props = __rest(_a, ["destinationsCount", "destinationsTooltip", "isTextShown", "destination", "destinationsAmount", "hidden", "iconDirection"]);
22
+ var { destinationsCount, destinationsTooltip, isTextShown, destination, destinationsAmount, hidden, iconDirection, tableMode } = _a, props = __rest(_a, ["destinationsCount", "destinationsTooltip", "isTextShown", "destination", "destinationsAmount", "hidden", "iconDirection", "tableMode"]);
23
23
  if (!destinationsCount || hidden) {
24
24
  return null;
25
25
  }
@@ -29,10 +29,11 @@ function DestinationCell(_a) {
29
29
  const textView = (_jsx(TextLabel, Object.assign({ sx: {
30
30
  textAlign: 'left',
31
31
  justifyContent: 'flex-start',
32
+ height: tableMode === 'sheet' ? '18px' : 'auto',
32
33
  } }, { children: destinationsCount > 1 ? (_jsxs("div", { children: ["Destination ", (_c = destinations === null || destinations === void 0 ? void 0 : destinations[0]) === null || _c === void 0 ? void 0 : _c.id, " - ", _jsx(CurrencyIcon, { currency: (_d = destinations === null || destinations === void 0 ? void 0 : destinations[0]) === null || _d === void 0 ? void 0 : _d.currency }), ' ', firstDestinationFormattedAmount.integerAmount, ".", firstDestinationFormattedAmount.decimalAmount, " +", destinationsCount - 1] })) : (_jsxs("div", { children: ["Destination ", (_e = destinations === null || destinations === void 0 ? void 0 : destinations[0]) === null || _e === void 0 ? void 0 : _e.id, " - ", _jsx(CurrencyIcon, { currency: (_f = destinations === null || destinations === void 0 ? void 0 : destinations[0]) === null || _f === void 0 ? void 0 : _f.currency }), " ", formattedAmount.integerAmount, ".", formattedAmount.decimalAmount] })) })));
33
34
  return (_jsx(TableCell, Object.assign({ sx: {
34
35
  width: 'fit-content',
35
36
  overflow: 'visible',
36
- } }, props, { children: _jsx(Tooltip, Object.assign({ title: destinationsTooltip }, { children: !isTextShown ? (_jsxs(StyledDestinationCell, { children: [_jsx(StyledDestinationIcon, { src: destinationSolidIcon, pointLeft: iconDirection === 'left' }), destinationsCount > 1 && (_jsx(DestinationCellContainer, Object.assign({ destinationsCount: 1 }, { children: _jsx(DestinationCount, { children: destinationsCount }) })))] })) : (textView) })) })));
37
+ } }, props, { children: _jsx(Tooltip, Object.assign({ title: destinationsTooltip }, { children: !isTextShown ? (_jsxs(StyledDestinationCell, Object.assign({ tableMode: tableMode }, { children: [_jsx(StyledDestinationIcon, { src: destinationSolidIcon, pointLeft: iconDirection === 'left' }), destinationsCount > 1 && (_jsx(DestinationCellContainer, Object.assign({ destinationsCount: 1 }, { children: _jsx(DestinationCount, { children: destinationsCount }) })))] }))) : (textView) })) })));
37
38
  }
38
39
  export default DestinationCell;
@@ -1,9 +1,12 @@
1
1
  /// <reference types="react" />
2
+ import { TableMode } from '../../../../types/index.js';
2
3
  export declare const DestinationCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
3
4
  destinationsCount: number;
4
5
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
5
6
  export declare const DestinationCount: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
6
- export declare const StyledDestinationCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
7
+ export declare const StyledDestinationCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
8
+ tableMode?: TableMode | undefined;
9
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
7
10
  export declare const StyledDestinationImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
8
11
  order: number;
9
12
  }, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
@@ -19,7 +19,9 @@ export const DestinationCount = styled('span')(({ theme }) => ({
19
19
  justifyContent: 'center',
20
20
  backgroundColor: `${theme.palette.info.dark}1A`,
21
21
  }));
22
- export const StyledDestinationCell = styled('span')(({ theme }) => ({
22
+ export const StyledDestinationCell = styled('span', {
23
+ shouldForwardProp: (prop) => prop !== 'tableMode',
24
+ })(({ theme, tableMode }) => ({
23
25
  display: 'flex',
24
26
  alignItems: 'center',
25
27
  justifyContent: 'flex-start',
@@ -28,7 +30,7 @@ export const StyledDestinationCell = styled('span')(({ theme }) => ({
28
30
  border: `1px solid ${theme.palette.divider}`,
29
31
  paddingInline: theme.spacing(1),
30
32
  borderRadius: '56px',
31
- height: '24px',
33
+ height: tableMode === 'sheet' ? '18px' : '24px',
32
34
  }));
33
35
  export const StyledDestinationImage = styled('img')(({ theme, order }) => ({
34
36
  borderRadius: '50%',
@@ -1,4 +1,5 @@
1
- export declare const ReceiptCell: ({ receiptId, isTextShown }: {
1
+ export declare const ReceiptCell: ({ receiptId, isTextShown, tableMode, }: {
2
2
  receiptId: string;
3
3
  isTextShown?: boolean | undefined;
4
+ tableMode?: "text" | "sheet" | "default" | undefined;
4
5
  }) => import("react/jsx-runtime").JSX.Element;
@@ -4,7 +4,10 @@ import { TextTableCell } from '..';
4
4
  import { TextLabel } from '../style';
5
5
  import Tooltip from '../../../Tooltip';
6
6
  import { receiptBillIcon } from '../../../../constants/index.js';
7
- export const ReceiptCell = ({ receiptId, isTextShown }) => {
7
+ export const ReceiptCell = ({ receiptId, isTextShown, tableMode, }) => {
8
+ if (tableMode === 'sheet') {
9
+ return (_jsx(TextTableCell, { children: _jsx("span", { children: receiptId }) }));
10
+ }
8
11
  return isTextShown ? (_jsx(TextTableCell, { children: _jsx("span", { children: receiptId }) })) : (_jsx(TableCell, Object.assign({ component: "div" }, { children: _jsx(Tooltip, Object.assign({ title: `Receipt - ${receiptId}` }, { children: _jsx(TextLabel, Object.assign({ sx: {
9
12
  padding: '3px 8px',
10
13
  maxWidth: '50px',
@@ -1,3 +1,3 @@
1
1
  import type { ReferenceCellProps } from './type';
2
- declare function ReferenceCell({ isTextShown, ...props }: ReferenceCellProps): import("react/jsx-runtime").JSX.Element;
2
+ declare function ReferenceCell({ isTextShown, tableMode, ...props }: ReferenceCellProps): import("react/jsx-runtime").JSX.Element;
3
3
  export default ReferenceCell;
@@ -16,10 +16,11 @@ import startCase from 'lodash/startCase';
16
16
  import Tooltip from '../../../Tooltip';
17
17
  import { ImageWrapper } from '../../../index.js';
18
18
  import { TableCell } from '../../../TableCells';
19
+ import StatusChip from '../../../StatusChip';
19
20
  import { referenceIcons } from './constant';
20
21
  import { ReferenceTextLabel, ReferenceTextWrapper, ReferenceSourcesContainer, StyledSourceCell, StyledSourceImage, referenceSourceAnimation, } from './style';
21
22
  function ReferenceCell(_a) {
22
- var { isTextShown } = _a, props = __rest(_a, ["isTextShown"]);
23
+ var { isTextShown, tableMode } = _a, props = __rest(_a, ["isTextShown", "tableMode"]);
23
24
  const [isTooltipOpen, setIsTooltipOpen] = useState(false);
24
25
  const theme = useTheme();
25
26
  const references = useMemo(() => Object.keys(referenceIcons).filter((key) => !!props[key]), [props]);
@@ -34,6 +35,9 @@ function ReferenceCell(_a) {
34
35
  } }, { children: isTextShown ? (_jsx(ReferenceTextWrapper, { children: _jsx(ReferenceTextLabel, { children: startCase(reference) }) })) : (_jsx(StyledSourceImage, { src: referenceIcons[reference], alt: reference, sx: Object.assign({}, (reference === 'order' && { width: '11.82px' })) })) })) }), `${reference}-${index}`));
35
36
  }), [props, references, isTextShown, theme]);
36
37
  const referenceSourcesCount = (ReferenceSources === null || ReferenceSources === void 0 ? void 0 : ReferenceSources.length) || 0;
38
+ if (tableMode === 'sheet') {
39
+ return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(StyledSourceCell, { children: references.map((reference) => (_jsx(StatusChip, { children: `${startCase(reference)}: ${props[reference]}` }, reference))) }) })));
40
+ }
37
41
  return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(StyledSourceCell, { children: referenceSourcesCount > 0 ? (_jsx(ReferenceSourcesContainer, Object.assign({ layout: true, className: "reference-sources-container", whileHover: "animate", animate: isTooltipOpen ? 'animate' : 'start', sourcesCount: referenceSourcesCount, variants: { animate: { width: referenceSourcesCount * (6 + 32) } }, style: {
38
42
  zIndex: 29,
39
43
  } }, { children: ReferenceSources }))) : null }) })));
@@ -2,9 +2,12 @@ import { TableCellProps } from '@mui/material/TableCell';
2
2
  import { referenceIcons } from './constant';
3
3
  export type ReferenceType = keyof typeof referenceIcons;
4
4
  export interface ReferenceCellProps extends TableCellProps {
5
- generic?: string;
6
- acquirer?: string;
7
5
  order?: string;
6
+ merchant?: string;
7
+ customer?: string;
8
+ acquirer?: string;
9
+ generic?: string;
8
10
  payment?: string;
9
11
  isTextShown?: boolean;
12
+ tableMode?: 'default' | 'text' | 'sheet';
10
13
  }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface SheetViewIDButtonI {
3
+ rowId?: string;
4
+ }
5
+ declare function SheetViewIDButton({ rowId }: SheetViewIDButtonI): import("react/jsx-runtime").JSX.Element;
6
+ declare const _default: import("react").MemoExoticComponent<typeof SheetViewIDButton>;
7
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { memo, useState } from 'react';
3
+ import Box from '@mui/material/Box';
4
+ import { useTranslation } from 'react-i18next';
5
+ import Tooltip from '../../../Tooltip';
6
+ import { greenCheckIcon } from '../../../../constants/index.js';
7
+ import { copyText } from '../../../../utils/index.js';
8
+ import { RowId, Button } from './style';
9
+ function SheetViewIDButton({ rowId }) {
10
+ const [showCopy, setShowCopy] = useState(false);
11
+ const { t } = useTranslation();
12
+ const handleCopyRowId = () => {
13
+ if (rowId && !showCopy) {
14
+ setShowCopy(true);
15
+ copyText(rowId);
16
+ const timer = setTimeout(() => {
17
+ setShowCopy(false);
18
+ }, 2000);
19
+ return () => {
20
+ clearTimeout(timer);
21
+ };
22
+ }
23
+ };
24
+ return (_jsx(Tooltip, Object.assign({ title: t('copy') }, { children: _jsxs(Button, Object.assign({ onClick: handleCopyRowId }, { children: [_jsx(RowId, Object.assign({ style: { visibility: showCopy ? 'hidden' : 'visible' } }, { children: rowId })), showCopy && (_jsx(Box, Object.assign({ sx: {
25
+ position: 'absolute',
26
+ top: 0,
27
+ left: 0,
28
+ right: 0,
29
+ bottom: 0,
30
+ display: 'flex',
31
+ alignItems: 'center',
32
+ justifyContent: 'center',
33
+ } }, { children: _jsx(Box, { component: "img", src: greenCheckIcon, alt: "copied", sx: { width: 14, height: 14 } }) })))] })) })));
34
+ }
35
+ export default memo(SheetViewIDButton);