@tap-payments/os-micro-frontend-shared 0.0.129-sheetview-component-ui-v1 → 0.0.129

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 (25) hide show
  1. package/build/components/TableCells/CustomCells/AmountCell/AmountCell.d.ts +1 -1
  2. package/build/components/TableCells/CustomCells/AmountCell/AmountCell.js +2 -2
  3. package/build/components/TableCells/CustomCells/AmountCell/style.d.ts +2 -7
  4. package/build/components/TableCells/CustomCells/AmountCell/style.js +4 -4
  5. package/build/components/TableCells/CustomCells/CustomerCell/CustomerCell.d.ts +1 -1
  6. package/build/components/TableCells/CustomCells/CustomerCell/CustomerCell.js +2 -2
  7. package/build/components/TableCells/CustomCells/CustomerCell/style.d.ts +1 -4
  8. package/build/components/TableCells/CustomCells/CustomerCell/style.js +7 -3
  9. package/build/components/TableCells/CustomCells/DateCell/DateCell.d.ts +1 -1
  10. package/build/components/TableCells/CustomCells/DateCell/DateCell.js +2 -3
  11. package/build/components/TableCells/CustomCells/OrderCell/OrderCell.d.ts +1 -1
  12. package/build/components/TableCells/CustomCells/OrderCell/OrderCell.js +1 -4
  13. package/build/components/TableCells/CustomCells/ReceiptCell/ReceiptCell.js +2 -2
  14. package/build/components/TableCells/CustomCells/ReferenceCell/ReferenceCell.js +2 -7
  15. package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -2
  16. package/build/components/TableCells/CustomCells/ReferenceCell/style.js +0 -7
  17. package/build/components/TableCells/CustomCells/SheetViewIDButton/SheetViewIDButton.js +1 -1
  18. package/build/components/TableCells/CustomCells/SourceMergedCell/SourceMergedCell.js +18 -2
  19. package/build/components/TableCells/CustomCells/SourceMergedCell/style.d.ts +0 -3
  20. package/build/components/TableCells/CustomCells/SourceMergedCell/style.js +0 -19
  21. package/build/components/TableCells/CustomCells/type.d.ts +0 -4
  22. package/build/components/VirtualTable/components/TableRowLoading.js +0 -1
  23. package/build/constants/table/cell/chargeTableCellWidth.d.ts +3 -3
  24. package/build/constants/table/cell/chargeTableCellWidth.js +3 -3
  25. package/package.json +1 -1
@@ -1,3 +1,3 @@
1
1
  import { AmountCellProps } from '../type';
2
- declare function AmountCell({ conversionType, amount, currency, tooltipLabel, amountTooltipLabel, isTextShown, tableMode, ...props }: AmountCellProps): import("react/jsx-runtime").JSX.Element;
2
+ declare function AmountCell({ conversionType, amount, currency, tooltipLabel, amountTooltipLabel, isTextShown, ...props }: AmountCellProps): import("react/jsx-runtime").JSX.Element;
3
3
  export default AmountCell;
@@ -18,9 +18,9 @@ import { formatAmountWithCurrency } from '../../../../utils/index.js';
18
18
  import { AmountCellContainer, ConversionBadge, CurrencySpan, DecimalSpan, FlagContainer } from './style';
19
19
  import { FlagIcon } from '../style';
20
20
  function AmountCell(_a) {
21
- var { conversionType, amount, currency, tooltipLabel, amountTooltipLabel, isTextShown, tableMode } = _a, props = __rest(_a, ["conversionType", "amount", "currency", "tooltipLabel", "amountTooltipLabel", "isTextShown", "tableMode"]);
21
+ var { conversionType, amount, currency, tooltipLabel, amountTooltipLabel, isTextShown } = _a, props = __rest(_a, ["conversionType", "amount", "currency", "tooltipLabel", "amountTooltipLabel", "isTextShown"]);
22
22
  const icon = currency && _jsx(FlagIcon, { src: getCurrenciesIcon(currency), alt: "customer icon" });
23
23
  const { integerAmount, decimalAmount } = formatAmountWithCurrency(amount, currency);
24
- return (_jsx(TableCell, Object.assign({}, props, { children: _jsxs(AmountCellContainer, { children: [_jsx(Tooltip, Object.assign({ title: tooltipLabel || '' }, { children: conversionType && (_jsx(ConversionBadge, Object.assign({ tableMode: tableMode, className: "conversion-type" }, { children: conversionType }))) })), _jsx(Tooltip, Object.assign({ title: _jsx(CurrencyIcon, { currency: currency }) }, { children: isTextShown ? _jsx("span", {}) : _jsx(FlagContainer, { children: icon }) })), _jsx(Tooltip, Object.assign({ title: amountTooltipLabel }, { children: _jsx(CurrencySpan, Object.assign({ tableMode: tableMode }, { children: integerAmount && decimalAmount && amount !== undefined ? (_jsxs(_Fragment, { children: [_jsx("span", { children: _jsx(CurrencyIcon, { currency: currency, fontSize: 10 }) }), ' ', integerAmount, ".", _jsx(DecimalSpan, { children: decimalAmount })] })) : (_jsx("span", { children: "-" })) })) }))] }) })));
24
+ return (_jsx(TableCell, Object.assign({}, props, { children: _jsxs(AmountCellContainer, { children: [_jsx(Tooltip, Object.assign({ title: tooltipLabel || '' }, { children: conversionType && _jsx(ConversionBadge, Object.assign({ className: "conversion-type" }, { children: conversionType })) })), _jsx(Tooltip, Object.assign({ title: _jsx(CurrencyIcon, { currency: currency }) }, { children: isTextShown ? _jsx("span", {}) : _jsx(FlagContainer, { children: icon }) })), _jsx(Tooltip, Object.assign({ title: amountTooltipLabel }, { children: _jsx(CurrencySpan, { children: integerAmount && decimalAmount && amount !== undefined ? (_jsxs(_Fragment, { children: [_jsx("span", { children: _jsx(CurrencyIcon, { currency: currency, fontSize: 10 }) }), ' ', integerAmount, ".", _jsx(DecimalSpan, { children: decimalAmount })] })) : (_jsx("span", { children: "-" })) }) }))] }) })));
25
25
  }
26
26
  export default AmountCell;
@@ -1,13 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { TableMode } from '../../../../types/index.js';
3
2
  export declare const AmountCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
- export declare const ConversionBadge: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
5
- tableMode?: TableMode | undefined;
6
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
3
+ export declare const ConversionBadge: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
7
4
  export declare const FlagContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
8
- export declare const CurrencySpan: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
9
- tableMode?: TableMode | undefined;
10
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
5
+ export declare const CurrencySpan: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
11
6
  export declare const DecimalSpan: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
12
7
  export declare const ConversionTooltip: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
13
8
  export declare const ConversionTooltipRow: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
@@ -5,12 +5,12 @@ export const AmountCellContainer = styled('span')(({ theme }) => ({
5
5
  justifyContent: 'flex-end',
6
6
  gap: theme.spacing(1),
7
7
  }));
8
- export const ConversionBadge = styled('span')(({ theme, tableMode }) => ({
8
+ export const ConversionBadge = styled('span')(({ theme }) => ({
9
9
  backgroundColor: theme.palette.grey[100],
10
10
  display: 'block',
11
11
  borderRadius: '4px',
12
12
  padding: '1.5px 3px',
13
- fontSize: tableMode === 'sheet' ? '11px' : '10px',
13
+ fontSize: '10px',
14
14
  lineHeight: '13px',
15
15
  textTransform: 'uppercase',
16
16
  fontWeight: theme.typography.fontWeightBold,
@@ -21,8 +21,8 @@ export const FlagContainer = styled('span')(() => ({
21
21
  height: '12px',
22
22
  flexShrink: 0,
23
23
  }));
24
- export const CurrencySpan = styled('span')(({ theme, tableMode }) => ({
25
- fontSize: tableMode === 'sheet' ? '11px' : theme.typography.body2.fontSize,
24
+ export const CurrencySpan = styled('span')(({ theme }) => ({
25
+ fontSize: theme.typography.body2.fontSize,
26
26
  lineHeight: '17px',
27
27
  fontWeight: '700',
28
28
  }));
@@ -1,3 +1,3 @@
1
1
  import type { CustomerCellProps } from '../type';
2
- declare function CustomerCell({ customerInitiated, children, isTimezoneIconShown, hasCustomerIcon, customerIcon, customerName, hideCustomerInitiatedIcon, hideTimezoneIcon, phone, email, id, tableMode, ...props }: Readonly<CustomerCellProps>): import("react/jsx-runtime").JSX.Element;
2
+ declare function CustomerCell({ customerInitiated, children, isTimezoneIconShown, hasCustomerIcon, customerIcon, customerName, hideCustomerInitiatedIcon, hideTimezoneIcon, phone, email, id, ...props }: Readonly<CustomerCellProps>): import("react/jsx-runtime").JSX.Element;
3
3
  export default CustomerCell;
@@ -20,7 +20,7 @@ import { TableCell } from '../../../TableCells';
20
20
  import { AvatarStyled, StarBadgeWrapper } from '../style';
21
21
  function CustomerCell(_a) {
22
22
  var _b;
23
- var { customerInitiated, children, isTimezoneIconShown, hasCustomerIcon, customerIcon, customerName, hideCustomerInitiatedIcon, hideTimezoneIcon, phone, email, id, tableMode } = _a, props = __rest(_a, ["customerInitiated", "children", "isTimezoneIconShown", "hasCustomerIcon", "customerIcon", "customerName", "hideCustomerInitiatedIcon", "hideTimezoneIcon", "phone", "email", "id", "tableMode"]);
23
+ var { customerInitiated, children, isTimezoneIconShown, hasCustomerIcon, customerIcon, customerName, hideCustomerInitiatedIcon, hideTimezoneIcon, phone, email, id } = _a, props = __rest(_a, ["customerInitiated", "children", "isTimezoneIconShown", "hasCustomerIcon", "customerIcon", "customerName", "hideCustomerInitiatedIcon", "hideTimezoneIcon", "phone", "email", "id"]);
24
24
  const { t } = useTranslation();
25
25
  const customerInitiatedTooltip = customerInitiated === false ? t('merchantInitiated') : '';
26
26
  const isArabicCustomerName = isArabic(customerName);
@@ -38,7 +38,7 @@ function CustomerCell(_a) {
38
38
  return null;
39
39
  return (_jsx("div", Object.assign({ "data-testid": "CustomerCell_customerTooltip" }, { children: tooltipOptions.map(({ name, value }) => value && (_jsx("div", Object.assign({ "data-testid": `CustomerCell_customerTooltip_${name}` }, { children: name === 'Name' ? value : `${name}: ${value}` }), value))) })));
40
40
  }, [tooltipOptions]);
41
- return (_jsx(TableCell, Object.assign({}, props, { "data-testid": "CustomerCell_TableCell" }, { children: _jsxs(StyledCustomerCell, Object.assign({ "data-testid": "CustomerCell_StyledCustomerCell" }, { children: [customerShownIcon, _jsx(Tooltip, Object.assign({ title: customerTooltip }, { children: _jsx(StyledCustomerName, Object.assign({ tableMode: tableMode, "data-testid": "CustomerCell_StyledCustomerName", "data-is-arabic": isArabicCustomerName }, { children: children })) })), !hideTimezoneIcon && (_jsx(StyledCustomerIconContainer, Object.assign({ "data-testid": "CustomerCell_StyledCustomerIconContainer" }, { children: isTimezoneIconShown && _jsx(StyledCustomerIcon, { src: timezoneIcon, "data-testid": "CustomerCell_StyledCustomerIcon" }) }))), !hideCustomerInitiatedIcon && (_jsx(Tooltip, Object.assign({ title: customerInitiatedTooltip }, { children: _jsx(StarBadgeWrapper, Object.assign({ "data-testid": "CustomerCell_StarBadgeWrapper", className: "geography-box", isShown: !!customerInitiatedTooltip }, { children: customerInitiatedTooltip && (_jsx("img", { "data-testid": "CustomerCell_merchantInitiatedIcon", src: merchantInitiatedIcon, alt: "merchant", style: {
41
+ return (_jsx(TableCell, Object.assign({}, props, { "data-testid": "CustomerCell_TableCell" }, { children: _jsxs(StyledCustomerCell, Object.assign({ "data-testid": "CustomerCell_StyledCustomerCell" }, { children: [customerShownIcon, _jsx(Tooltip, Object.assign({ title: customerTooltip }, { children: _jsx(StyledCustomerName, Object.assign({ "data-testid": "CustomerCell_StyledCustomerName", "data-is-arabic": isArabicCustomerName }, { children: children })) })), !hideTimezoneIcon && (_jsx(StyledCustomerIconContainer, Object.assign({ "data-testid": "CustomerCell_StyledCustomerIconContainer" }, { children: isTimezoneIconShown && _jsx(StyledCustomerIcon, { src: timezoneIcon, "data-testid": "CustomerCell_StyledCustomerIcon" }) }))), !hideCustomerInitiatedIcon && (_jsx(Tooltip, Object.assign({ title: customerInitiatedTooltip }, { children: _jsx(StarBadgeWrapper, Object.assign({ "data-testid": "CustomerCell_StarBadgeWrapper", className: "geography-box", isShown: !!customerInitiatedTooltip }, { children: customerInitiatedTooltip && (_jsx("img", { "data-testid": "CustomerCell_merchantInitiatedIcon", src: merchantInitiatedIcon, alt: "merchant", style: {
42
42
  width: '16px',
43
43
  height: '16px',
44
44
  } })) })) })))] })) })));
@@ -1,8 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { TableMode } from '../../../../types/index.js';
3
2
  export declare const StyledCustomerCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
- export declare const StyledCustomerName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
5
- tableMode?: TableMode | undefined;
6
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
3
+ export declare const StyledCustomerName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
7
4
  export declare const StyledCustomerIconContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
8
5
  export declare const StyledCustomerIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
@@ -5,9 +5,13 @@ export const StyledCustomerCell = styled('span')(({ theme }) => ({
5
5
  justifyContent: 'flex-start',
6
6
  gap: theme.spacing(1),
7
7
  }));
8
- export const StyledCustomerName = styled('span', {
9
- shouldForwardProp: (prop) => prop !== 'tableMode',
10
- })(({ tableMode }) => (Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', maxWidth: '25ch', flex: 1 }, (tableMode === 'sheet' && { fontSize: '11px' }))));
8
+ export const StyledCustomerName = styled('span')({
9
+ overflow: 'hidden',
10
+ textOverflow: 'ellipsis',
11
+ whiteSpace: 'nowrap',
12
+ maxWidth: '25ch',
13
+ flex: 1,
14
+ });
11
15
  export const StyledCustomerIconContainer = styled('span')({
12
16
  width: '11.6px',
13
17
  height: '11.6px',
@@ -1,3 +1,3 @@
1
1
  import { DateCellProps } from '../type';
2
- declare function DateCell({ value, format: dateFormat, flagIcon, hasFlag, tableMode, ...props }: DateCellProps): import("react/jsx-runtime").JSX.Element;
2
+ declare function DateCell({ value, format: dateFormat, flagIcon, hasFlag, ...props }: DateCellProps): import("react/jsx-runtime").JSX.Element;
3
3
  export default DateCell;
@@ -17,13 +17,12 @@ import CountryFlag from '../../../CountryFlag';
17
17
  import { formatCellDate, getCountryName } from '../../../../utils/index.js';
18
18
  import { DateCellContainer } from './style';
19
19
  import { GeographyBox } from '../style';
20
- import { Box } from '@mui/material';
21
20
  function DateCell(_a) {
22
- var { value, format: dateFormat, flagIcon, hasFlag, tableMode } = _a, props = __rest(_a, ["value", "format", "flagIcon", "hasFlag", "tableMode"]);
21
+ var { value, format: dateFormat, flagIcon, hasFlag } = _a, props = __rest(_a, ["value", "format", "flagIcon", "hasFlag"]);
23
22
  const icon = flagIcon && (_jsx(Tooltip, Object.assign({ title: getCountryName(flagIcon || '') }, { children: _jsx(CountryFlag, { code: flagIcon }) })));
24
23
  const renderedValue = useMemo(() => formatCellDate(value, dateFormat), [value]);
25
24
  return (_jsx(TableCell, Object.assign({}, props, { children: _jsxs(DateCellContainer, { children: [hasFlag && (_jsx(GeographyBox, Object.assign({ sx: {
26
25
  visibility: 'visible',
27
- }, className: "geography-box" }, { children: icon }))), _jsx(Box, Object.assign({ sx: Object.assign({}, (tableMode === 'sheet' && { fontSize: '11px' })) }, { children: renderedValue }))] }) })));
26
+ }, className: "geography-box" }, { children: icon }))), renderedValue] }) })));
28
27
  }
29
28
  export default DateCell;
@@ -1,3 +1,3 @@
1
1
  import { OrderCellProps } from '../type';
2
- declare function OrderCell({ value, label, items, tableMode, ...props }: OrderCellProps): import("react/jsx-runtime").JSX.Element;
2
+ declare function OrderCell({ value, label, items, ...props }: OrderCellProps): import("react/jsx-runtime").JSX.Element;
3
3
  export default OrderCell;
@@ -14,7 +14,7 @@ import { TableCell } from '../../../TableCells';
14
14
  import Tooltip from '../../../Tooltip';
15
15
  import { MAX_TOOLTIP_ITEM_LENGTH } from './constant';
16
16
  function OrderCell(_a) {
17
- var { value, label, items, tableMode } = _a, props = __rest(_a, ["value", "label", "items", "tableMode"]);
17
+ var { value, label, items } = _a, props = __rest(_a, ["value", "label", "items"]);
18
18
  const orderDiscriminator = Number.isInteger(value) && Number(value) > 1 && label.charAt(label.length - 1) !== 's' ? `${label}s` : label;
19
19
  const orderLabel = `${value} ${orderDiscriminator}`;
20
20
  const orderTooltip = (_jsx(_Fragment, { children: items === null || items === void 0 ? void 0 : items.map((item) => {
@@ -22,9 +22,6 @@ function OrderCell(_a) {
22
22
  const truncatedItemContent = ((itemContent === null || itemContent === void 0 ? void 0 : itemContent.length) || 0) > MAX_TOOLTIP_ITEM_LENGTH ? `${itemContent === null || itemContent === void 0 ? void 0 : itemContent.slice(0, MAX_TOOLTIP_ITEM_LENGTH)}...` : itemContent;
23
23
  return _jsx("div", { children: truncatedItemContent }, item.id);
24
24
  }) }));
25
- if (tableMode === 'sheet') {
26
- return (_jsx(TableCell, Object.assign({}, props, { children: _jsx("span", { children: orderLabel }) })));
27
- }
28
25
  return (_jsx(Tooltip, Object.assign({ title: (items || []).length > 1 ? orderTooltip : undefined }, { children: _jsx(TableCell, Object.assign({}, props, { children: _jsx("span", { children: orderLabel }) })) })));
29
26
  }
30
27
  export default OrderCell;
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { TableCell } from '@mui/material';
3
3
  import { TextTableCell } from '..';
4
- import { StyledTextTableCell, TextLabel } from '../style';
4
+ import { TextLabel } from '../style';
5
5
  import Tooltip from '../../../Tooltip';
6
6
  import { receiptBillIcon } from '../../../../constants/index.js';
7
7
  export const ReceiptCell = ({ receiptId, isTextShown, tableMode, }) => {
8
8
  if (tableMode === 'sheet') {
9
- return (_jsx(StyledTextTableCell, { children: _jsx("span", { children: receiptId }) }));
9
+ return (_jsx(TextTableCell, { children: _jsx("span", { children: receiptId }) }));
10
10
  }
11
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: {
12
12
  padding: '3px 8px',
@@ -18,8 +18,7 @@ import { ImageWrapper } from '../../../index.js';
18
18
  import { TableCell } from '../../../TableCells';
19
19
  import StatusChip from '../../../StatusChip';
20
20
  import { referenceIcons } from './constant';
21
- import { ReferenceTextLabel, ReferenceTextWrapper, ReferenceSourcesContainer, StyledSourceCell, StyledSourceImage, ReferenceSheetContainer, ReferenceEmptyPlaceholder, referenceSourceAnimation, } from './style';
22
- const REFERENCE_ORDER = ['order', 'payment', 'acquirer', 'generic', 'merchant', 'customer'];
21
+ import { ReferenceTextLabel, ReferenceTextWrapper, ReferenceSourcesContainer, StyledSourceCell, StyledSourceImage, referenceSourceAnimation, } from './style';
23
22
  function ReferenceCell(_a) {
24
23
  var { isTextShown, tableMode } = _a, props = __rest(_a, ["isTextShown", "tableMode"]);
25
24
  const [isTooltipOpen, setIsTooltipOpen] = useState(false);
@@ -37,11 +36,7 @@ function ReferenceCell(_a) {
37
36
  }), [props, references, isTextShown, theme]);
38
37
  const referenceSourcesCount = (ReferenceSources === null || ReferenceSources === void 0 ? void 0 : ReferenceSources.length) || 0;
39
38
  if (tableMode === 'sheet') {
40
- return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(StyledSourceCell, { children: REFERENCE_ORDER.map((referenceKey) => {
41
- const referenceValue = props[referenceKey];
42
- const hasValue = !!referenceValue;
43
- return (_jsx(ReferenceSheetContainer, { children: hasValue ? _jsx(StatusChip, Object.assign({ width: '100%' }, { children: `${startCase(referenceKey)}: ${referenceValue}` })) : _jsx(ReferenceEmptyPlaceholder, {}) }, referenceKey));
44
- }) }) })));
39
+ return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(StyledSourceCell, { children: references.map((reference) => (_jsx(StatusChip, { children: `${startCase(reference)}: ${props[reference]}` }, reference))) }) })));
45
40
  }
46
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: {
47
42
  zIndex: 29,
@@ -267,8 +267,6 @@ export declare const ReferenceSourcesContainer: import("@emotion/styled").Styled
267
267
  }, {}, {}>;
268
268
  export declare const ReferenceTextLabel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
269
269
  export declare const ReferenceTextWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
270
- export declare const ReferenceSheetContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
271
- export declare const ReferenceEmptyPlaceholder: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
272
270
  export declare const referenceSourceAnimation: (index: number, shadow: string, xDelta?: number) => {
273
271
  start: {
274
272
  x: number;
@@ -34,13 +34,6 @@ export const ReferenceTextWrapper = styled('div')(() => ({
34
34
  justifyContent: 'center',
35
35
  paddingInline: '4px',
36
36
  }));
37
- export const ReferenceSheetContainer = styled('div')(() => ({
38
- minWidth: '200px',
39
- maxWidth: '250px',
40
- }));
41
- export const ReferenceEmptyPlaceholder = styled('div')(() => ({
42
- height: '18px',
43
- }));
44
37
  export const referenceSourceAnimation = (index, shadow, xDelta) => ({
45
38
  start: {
46
39
  x: index * 6,
@@ -21,7 +21,7 @@ function SheetViewIDButton({ rowId }) {
21
21
  };
22
22
  }
23
23
  };
24
- return (_jsx(Tooltip, Object.assign({ title: t('copy') }, { children: _jsxs(Button, Object.assign({ sx: { minWidth: '213px' }, onClick: handleCopyRowId }, { children: [_jsx(RowId, Object.assign({ style: { visibility: showCopy ? 'hidden' : 'visible' } }, { children: rowId })), showCopy && (_jsx(Box, Object.assign({ sx: {
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
25
  position: 'absolute',
26
26
  top: 0,
27
27
  left: 0,
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { useRef, useEffect, useState, useMemo } from 'react';
14
14
  import { TableCell } from '../../../TableCells';
15
- import { StatusContainer, StatusWrapper, StatusIcon, SheetModeContainer, SheetModeStatusWrapper, SheetModeIconContainer } from './style';
15
+ import { StatusContainer, StatusWrapper, StatusIcon } from './style';
16
16
  import { getIconXTranslation } from './utils';
17
17
  import CollapsedViewIcon from './CollapsedViewIcon';
18
18
  function SourceMergedCell(_a) {
@@ -46,7 +46,23 @@ function SourceMergedCell(_a) {
46
46
  position: 'relative',
47
47
  overflow: 'visible',
48
48
  zIndex: 101,
49
- } }, { children: _jsx(SheetModeContainer, { children: iconsList === null || iconsList === void 0 ? void 0 : iconsList.map((icon, index) => (_jsx(SheetModeStatusWrapper, Object.assign({ "data-testid": `StatusWrapper-${icon.key}` }, { children: _jsx(SheetModeIconContainer, { children: icon.icon }) }), `StatusWrapper-${icon.key}-${index}`))) }) })));
49
+ } }, { children: _jsx("div", Object.assign({ style: {
50
+ display: 'flex',
51
+ alignItems: 'center',
52
+ gap: '4px',
53
+ height: '18px',
54
+ } }, { children: iconsList === null || iconsList === void 0 ? void 0 : iconsList.map((icon, index) => (_jsx("div", Object.assign({ "data-testid": `StatusWrapper-${icon.key}`, style: {
55
+ display: 'flex',
56
+ alignItems: 'center',
57
+ opacity: 1,
58
+ border: '1px solid #F2F2F2',
59
+ borderRadius: '24px',
60
+ padding: '0px 8px',
61
+ } }, { children: _jsx("div", Object.assign({ style: {
62
+ display: 'flex',
63
+ alignItems: 'center',
64
+ opacity: 1,
65
+ } }, { children: icon.icon })) }), `StatusWrapper-${icon.key}-${index}`))) })) })));
50
66
  }
51
67
  return (_jsx(TableCell, Object.assign({}, props, { "data-testid": "StatusCell", sx: {
52
68
  position: 'relative',
@@ -1617,6 +1617,3 @@ export declare const StatusContainer: import("@emotion/styled").StyledComponent<
1617
1617
  } & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLDivElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
1618
1618
  isReversed?: boolean | undefined;
1619
1619
  }, {}, {}>;
1620
- export declare const SheetModeContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
1621
- export declare const SheetModeStatusWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
1622
- export declare const SheetModeIconContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -74,22 +74,3 @@ export const StatusContainer = styled(motion.div)(({ isReversed }) => ({
74
74
  position: 'relative',
75
75
  overflow: 'visible',
76
76
  }));
77
- export const SheetModeContainer = styled('div')(() => ({
78
- display: 'flex',
79
- alignItems: 'center',
80
- gap: '4px',
81
- height: '18px',
82
- }));
83
- export const SheetModeStatusWrapper = styled('div')(() => ({
84
- display: 'flex',
85
- alignItems: 'center',
86
- opacity: 1,
87
- border: '1px solid #F2F2F2',
88
- borderRadius: '24px',
89
- padding: '0px 8px',
90
- }));
91
- export const SheetModeIconContainer = styled('div')(() => ({
92
- display: 'flex',
93
- alignItems: 'center',
94
- opacity: 1,
95
- }));
@@ -10,7 +10,6 @@ export interface DateCellProps extends TableCellProps {
10
10
  format?: object;
11
11
  flagIcon?: string;
12
12
  hasFlag?: boolean;
13
- tableMode?: TableMode;
14
13
  }
15
14
  export interface OrderCellProps extends TableCellProps {
16
15
  label: string;
@@ -20,7 +19,6 @@ export interface OrderCellProps extends TableCellProps {
20
19
  description?: string;
21
20
  name?: string;
22
21
  }>;
23
- tableMode?: TableMode;
24
22
  }
25
23
  export interface CustomerCellProps extends TableCellProps {
26
24
  customerInitiated?: boolean;
@@ -34,7 +32,6 @@ export interface CustomerCellProps extends TableCellProps {
34
32
  email?: string;
35
33
  phone?: string;
36
34
  id?: string;
37
- tableMode?: TableMode;
38
35
  }
39
36
  export interface SourceCellProps extends TableCellProps {
40
37
  geographyVariant?: 'G' | 'L' | 'R';
@@ -54,7 +51,6 @@ export interface AmountCellProps extends TableCellProps {
54
51
  tooltipLabel?: React.ReactNode;
55
52
  amountTooltipLabel?: React.ReactNode;
56
53
  isTextShown?: boolean;
57
- tableMode?: TableMode;
58
54
  }
59
55
  export interface DestinationCellProps extends TableCellProps {
60
56
  destinationsCount?: number;
@@ -8,7 +8,6 @@ import { areEqual } from 'react-window';
8
8
  const StyledSkeleton = styled(Skeleton)(({ theme }) => ({
9
9
  backgroundColor: theme.palette.grey[100],
10
10
  borderRadius: '64px',
11
- minWidth: '20px',
12
11
  }));
13
12
  function TableRowLoading({ columns, style, index, animationType }) {
14
13
  return (_jsx(MUITableRow, Object.assign({ sx: Object.assign(Object.assign({}, style), { display: 'flex', borderBottom: '1px solid #e3e8ee', '&:hover': {
@@ -22,7 +22,7 @@ export declare const chargeTableCellWidth: {
22
22
  readonly date: {
23
23
  readonly default: "170px";
24
24
  readonly text: "170px";
25
- readonly sheet: "129px";
25
+ readonly sheet: "170px";
26
26
  };
27
27
  readonly reference: {
28
28
  readonly default: "95px";
@@ -42,7 +42,7 @@ export declare const chargeTableCellWidth: {
42
42
  readonly source: {
43
43
  readonly default: "114px";
44
44
  readonly text: "125px";
45
- readonly sheet: "450px";
45
+ readonly sheet: "410px";
46
46
  };
47
47
  readonly authenticate: {
48
48
  readonly default: "55px";
@@ -72,7 +72,7 @@ export declare const chargeTableCellWidth: {
72
72
  readonly status: {
73
73
  readonly default: "70px";
74
74
  readonly text: "300px";
75
- readonly sheet: "400px";
75
+ readonly sheet: "185px";
76
76
  };
77
77
  readonly merchant: {
78
78
  readonly default: "100px";
@@ -22,7 +22,7 @@ export const chargeTableCellWidth = {
22
22
  date: {
23
23
  default: '170px',
24
24
  text: '170px',
25
- sheet: '129px',
25
+ sheet: '170px',
26
26
  },
27
27
  reference: {
28
28
  default: '95px',
@@ -42,7 +42,7 @@ export const chargeTableCellWidth = {
42
42
  source: {
43
43
  default: '114px',
44
44
  text: '125px',
45
- sheet: '450px',
45
+ sheet: '410px',
46
46
  },
47
47
  authenticate: {
48
48
  default: '55px',
@@ -72,7 +72,7 @@ export const chargeTableCellWidth = {
72
72
  status: {
73
73
  default: '70px',
74
74
  text: '300px',
75
- sheet: '400px',
75
+ sheet: '185px',
76
76
  },
77
77
  merchant: {
78
78
  default: '100px',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.0.129-sheetview-component-ui-v1",
4
+ "version": "0.0.129",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
7
7
  "module": "build/index.js",