@tap-payments/os-micro-frontend-shared 0.0.128 → 0.0.129-sheetview-component-ui-v2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +12 -12
- package/build/components/DeviceIcon/DeviceIcon.d.ts +3 -1
- package/build/components/DeviceIcon/DeviceIcon.js +3 -3
- package/build/components/DeviceIcon/style.d.ts +4 -1
- package/build/components/DeviceIcon/style.js +4 -1
- package/build/components/MaskedText/MaskedText.d.ts +3 -0
- package/build/components/MaskedText/MaskedText.js +11 -0
- package/build/components/MaskedText/index.d.ts +3 -0
- package/build/components/MaskedText/index.js +2 -0
- package/build/components/MaskedText/type.d.ts +7 -0
- package/build/components/MaskedText/type.js +1 -0
- package/build/components/StatusButton/StatusButton.js +10 -9
- package/build/components/StatusChip/StatusChip.d.ts +4 -0
- package/build/components/StatusChip/StatusChip.js +19 -0
- package/build/components/StatusChip/index.d.ts +3 -0
- package/build/components/StatusChip/index.js +2 -0
- package/build/components/StatusChip/style.d.ts +14 -0
- package/build/components/StatusChip/style.js +32 -0
- package/build/components/StatusChip/type.d.ts +9 -0
- package/build/components/StatusChip/type.js +1 -0
- package/build/components/StatusIcons/AuthorizedIcon/AuthorizedIcon.d.ts +3 -1
- package/build/components/StatusIcons/AuthorizedIcon/AuthorizedIcon.js +4 -4
- package/build/components/StatusIcons/DeviceIcon/DeviceIcon.d.ts +3 -1
- package/build/components/StatusIcons/DeviceIcon/DeviceIcon.js +2 -2
- package/build/components/StatusIcons/IssuerIcon/IssuerIcon.d.ts +1 -1
- package/build/components/StatusIcons/IssuerIcon/IssuerIcon.js +2 -2
- package/build/components/StatusIcons/IssuerIcon/style.d.ts +4 -1
- package/build/components/StatusIcons/IssuerIcon/style.js +3 -4
- package/build/components/StatusIcons/IssuerIcon/type.d.ts +2 -0
- package/build/components/StatusIcons/PayoutIcon/PayoutIcon.d.ts +3 -1
- package/build/components/StatusIcons/PayoutIcon/PayoutIcon.js +7 -2
- package/build/components/TableCells/CustomCells/ActionCell/ActionCell.d.ts +3 -1
- package/build/components/TableCells/CustomCells/ActionCell/ActionCell.js +5 -4
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +4 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.js +4 -2
- package/build/components/TableCells/CustomCells/AmountCell/AmountCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/AmountCell/AmountCell.js +2 -2
- package/build/components/TableCells/CustomCells/AmountCell/style.d.ts +7 -2
- package/build/components/TableCells/CustomCells/AmountCell/style.js +4 -4
- package/build/components/TableCells/CustomCells/CustomerCell/CustomerCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/CustomerCell/CustomerCell.js +4 -1
- package/build/components/TableCells/CustomCells/CustomerCell/style.d.ts +4 -1
- package/build/components/TableCells/CustomCells/CustomerCell/style.js +3 -7
- package/build/components/TableCells/CustomCells/DateCell/DateCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/DateCell/DateCell.js +3 -2
- package/build/components/TableCells/CustomCells/DestinationCell/DestinationCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/DestinationCell/DestinationCell.js +3 -2
- package/build/components/TableCells/CustomCells/DestinationCell/styled.d.ts +4 -1
- package/build/components/TableCells/CustomCells/DestinationCell/styled.js +4 -2
- package/build/components/TableCells/CustomCells/OrderCell/OrderCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/OrderCell/OrderCell.js +4 -1
- package/build/components/TableCells/CustomCells/ReceiptCell/ReceiptCell.d.ts +2 -1
- package/build/components/TableCells/CustomCells/ReceiptCell/ReceiptCell.js +5 -2
- package/build/components/TableCells/CustomCells/ReferenceCell/ReferenceCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ReferenceCell/ReferenceCell.js +25 -2
- package/build/components/TableCells/CustomCells/ReferenceCell/constant.d.ts +5 -0
- package/build/components/TableCells/CustomCells/ReferenceCell/constant.js +9 -0
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ReferenceCell/style.js +3 -0
- package/build/components/TableCells/CustomCells/ReferenceCell/type.d.ts +5 -2
- package/build/components/TableCells/CustomCells/SheetViewIDButton/SheetViewIDButton.d.ts +7 -0
- package/build/components/TableCells/CustomCells/SheetViewIDButton/SheetViewIDButton.js +35 -0
- package/build/components/TableCells/CustomCells/SheetViewIDButton/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SheetViewIDButton/index.js +1 -0
- package/build/components/TableCells/CustomCells/SheetViewIDButton/style.d.ts +3 -0
- package/build/components/TableCells/CustomCells/SheetViewIDButton/style.js +22 -0
- package/build/components/TableCells/CustomCells/SourceMergedCell/SourceMergedCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/SourceMergedCell/SourceMergedCell.js +13 -3
- package/build/components/TableCells/CustomCells/SourceMergedCell/style.d.ts +3 -0
- package/build/components/TableCells/CustomCells/SourceMergedCell/style.js +19 -0
- package/build/components/TableCells/CustomCells/SourceMergedCell/type.d.ts +2 -1
- package/build/components/TableCells/CustomCells/StatusCell/StatusCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/StatusCell/StatusCell.js +6 -2
- package/build/components/TableCells/CustomCells/StatusCell/constant.d.ts +17 -0
- package/build/components/TableCells/CustomCells/StatusCell/constant.js +17 -0
- package/build/components/TableCells/CustomCells/StatusCell/style.js +1 -0
- package/build/components/TableCells/CustomCells/StatusCell/type.d.ts +1 -0
- package/build/components/TableCells/CustomCells/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/index.js +1 -0
- package/build/components/TableCells/CustomCells/style.d.ts +4 -1
- package/build/components/TableCells/CustomCells/style.js +6 -9
- package/build/components/TableCells/CustomCells/type.d.ts +6 -1
- package/build/components/VirtualTable/SheetView/SheetViewVirtualTable.d.ts +1 -1
- package/build/components/VirtualTable/SheetView/SheetViewVirtualTable.js +1 -1
- package/build/components/VirtualTable/components/TableRowLoading.js +1 -0
- package/build/components/VirtualTable/style.js +3 -3
- package/build/components/index.d.ts +2 -0
- package/build/components/index.js +2 -0
- package/build/constants/assets.d.ts +1 -0
- package/build/constants/assets.js +1 -0
- package/build/constants/table/cell/chargeTableCellWidth.d.ts +14 -14
- package/build/constants/table/cell/chargeTableCellWidth.js +14 -14
- package/build/types/table.d.ts +2 -1
- package/package.json +132 -132
|
@@ -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, ...props }: Readonly<CustomerCellProps>): import("react/jsx-runtime").JSX.Element;
|
|
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;
|
|
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 } = _a, props = __rest(_a, ["customerInitiated", "children", "isTimezoneIconShown", "hasCustomerIcon", "customerIcon", "customerName", "hideCustomerInitiatedIcon", "hideTimezoneIcon", "phone", "email", "id"]);
|
|
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"]);
|
|
24
24
|
const { t } = useTranslation();
|
|
25
25
|
const customerInitiatedTooltip = customerInitiated === false ? t('merchantInitiated') : '';
|
|
26
26
|
const isArabicCustomerName = isArabic(customerName);
|
|
@@ -38,6 +38,9 @@ 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
|
+
if (tableMode === 'sheet') {
|
|
42
|
+
return (_jsx(StyledCustomerName, Object.assign({ tableMode: tableMode, "data-testid": "CustomerCell_StyledCustomerName", "data-is-arabic": isArabicCustomerName }, { children: children })));
|
|
43
|
+
}
|
|
41
44
|
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
45
|
width: '16px',
|
|
43
46
|
height: '16px',
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { TableMode } from '../../../../types/index.js';
|
|
2
3
|
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>, {}>;
|
|
3
|
-
export declare const StyledCustomerName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme
|
|
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>, {}>;
|
|
4
7
|
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>, {}>;
|
|
5
8
|
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,13 +5,9 @@ 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
|
-
|
|
10
|
-
|
|
11
|
-
whiteSpace: 'nowrap',
|
|
12
|
-
maxWidth: '25ch',
|
|
13
|
-
flex: 1,
|
|
14
|
-
});
|
|
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' }))));
|
|
15
11
|
export const StyledCustomerIconContainer = styled('span')({
|
|
16
12
|
width: '11.6px',
|
|
17
13
|
height: '11.6px',
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DateCellProps } from '../type';
|
|
2
|
-
declare function DateCell({ value, format: dateFormat, flagIcon, hasFlag, ...props }: DateCellProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare function DateCell({ value, format: dateFormat, flagIcon, hasFlag, tableMode, ...props }: DateCellProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DateCell;
|
|
@@ -17,12 +17,13 @@ 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';
|
|
20
21
|
function DateCell(_a) {
|
|
21
|
-
var { value, format: dateFormat, flagIcon, hasFlag } = _a, props = __rest(_a, ["value", "format", "flagIcon", "hasFlag"]);
|
|
22
|
+
var { value, format: dateFormat, flagIcon, hasFlag, tableMode } = _a, props = __rest(_a, ["value", "format", "flagIcon", "hasFlag", "tableMode"]);
|
|
22
23
|
const icon = flagIcon && (_jsx(Tooltip, Object.assign({ title: getCountryName(flagIcon || '') }, { children: _jsx(CountryFlag, { code: flagIcon }) })));
|
|
23
24
|
const renderedValue = useMemo(() => formatCellDate(value, dateFormat), [value]);
|
|
24
25
|
return (_jsx(TableCell, Object.assign({}, props, { children: _jsxs(DateCellContainer, { children: [hasFlag && (_jsx(GeographyBox, Object.assign({ sx: {
|
|
25
26
|
visibility: 'visible',
|
|
26
|
-
}, className: "geography-box" }, { children: icon }))), renderedValue] }) })));
|
|
27
|
+
}, className: "geography-box" }, { children: icon }))), _jsx(Box, Object.assign({ sx: Object.assign({}, (tableMode === 'sheet' && { fontSize: '11px' })) }, { children: renderedValue }))] }) })));
|
|
27
28
|
}
|
|
28
29
|
export default DateCell;
|
|
@@ -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
|
|
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'
|
|
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,3 +1,3 @@
|
|
|
1
1
|
import { OrderCellProps } from '../type';
|
|
2
|
-
declare function OrderCell({ value, label, items, ...props }: OrderCellProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare function OrderCell({ value, label, items, tableMode, ...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 } = _a, props = __rest(_a, ["value", "label", "items"]);
|
|
17
|
+
var { value, label, items, tableMode } = _a, props = __rest(_a, ["value", "label", "items", "tableMode"]);
|
|
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,6 +22,9 @@ 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({ sx: { fontSize: '11px' } }, props, { children: orderLabel })));
|
|
27
|
+
}
|
|
25
28
|
return (_jsx(Tooltip, Object.assign({ title: (items || []).length > 1 ? orderTooltip : undefined }, { children: _jsx(TableCell, Object.assign({}, props, { children: _jsx("span", { children: orderLabel }) })) })));
|
|
26
29
|
}
|
|
27
30
|
export default OrderCell;
|
|
@@ -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;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { TableCell } from '@mui/material';
|
|
3
3
|
import { TextTableCell } from '..';
|
|
4
|
-
import { TextLabel } from '../style';
|
|
4
|
+
import { StyledTextTableCell, 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(StyledTextTableCell, { 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,12 @@ 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
|
|
19
|
+
import StatusChip from '../../../StatusChip';
|
|
20
|
+
import { referenceIcons, REFERENCE_ORDER, REFERENCE_WIDTH_MAP } from './constant';
|
|
20
21
|
import { ReferenceTextLabel, ReferenceTextWrapper, ReferenceSourcesContainer, StyledSourceCell, StyledSourceImage, referenceSourceAnimation, } from './style';
|
|
22
|
+
import { Box } from '@mui/material';
|
|
21
23
|
function ReferenceCell(_a) {
|
|
22
|
-
var { isTextShown } = _a, props = __rest(_a, ["isTextShown"]);
|
|
24
|
+
var { isTextShown, tableMode } = _a, props = __rest(_a, ["isTextShown", "tableMode"]);
|
|
23
25
|
const [isTooltipOpen, setIsTooltipOpen] = useState(false);
|
|
24
26
|
const theme = useTheme();
|
|
25
27
|
const references = useMemo(() => Object.keys(referenceIcons).filter((key) => !!props[key]), [props]);
|
|
@@ -34,6 +36,27 @@ function ReferenceCell(_a) {
|
|
|
34
36
|
} }, { 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
37
|
}), [props, references, isTextShown, theme]);
|
|
36
38
|
const referenceSourcesCount = (ReferenceSources === null || ReferenceSources === void 0 ? void 0 : ReferenceSources.length) || 0;
|
|
39
|
+
if (tableMode === 'sheet') {
|
|
40
|
+
return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(StyledSourceCell, Object.assign({ sx: { gap: '4px', display: 'flex', flexWrap: 'nowrap' } }, { children: REFERENCE_ORDER.map((referenceKey) => {
|
|
41
|
+
const referenceValue = props[referenceKey];
|
|
42
|
+
const hasValue = !!referenceValue;
|
|
43
|
+
const widthConfig = REFERENCE_WIDTH_MAP[referenceKey];
|
|
44
|
+
return (_jsx(Box, Object.assign({ sx: {
|
|
45
|
+
width: widthConfig.width,
|
|
46
|
+
minWidth: widthConfig.width,
|
|
47
|
+
maxWidth: widthConfig.width,
|
|
48
|
+
flexShrink: 0,
|
|
49
|
+
} }, { children: hasValue ? (_jsx(StatusChip, Object.assign({ sx: {
|
|
50
|
+
maxWidth: '100%',
|
|
51
|
+
overflow: 'hidden',
|
|
52
|
+
textOverflow: 'ellipsis',
|
|
53
|
+
whiteSpace: 'nowrap',
|
|
54
|
+
boxSizing: 'border-box',
|
|
55
|
+
display: 'inline-block',
|
|
56
|
+
padding: '0.75px 12px',
|
|
57
|
+
} }, { children: `${startCase(referenceKey)}: ${referenceValue}` }))) : null }), referenceKey));
|
|
58
|
+
}) })) })));
|
|
59
|
+
}
|
|
37
60
|
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
61
|
zIndex: 29,
|
|
39
62
|
} }, { children: ReferenceSources }))) : null }) })));
|
|
@@ -4,3 +4,8 @@ export declare const referenceIcons: {
|
|
|
4
4
|
payment: string;
|
|
5
5
|
order: string;
|
|
6
6
|
};
|
|
7
|
+
export type ReferenceFields = 'order' | 'payment' | 'acquirer' | 'generic' | 'merchant' | 'customer';
|
|
8
|
+
export declare const REFERENCE_ORDER: ReferenceFields[];
|
|
9
|
+
export declare const REFERENCE_WIDTH_MAP: Record<ReferenceFields, {
|
|
10
|
+
width: string;
|
|
11
|
+
}>;
|
|
@@ -5,3 +5,12 @@ export const referenceIcons = {
|
|
|
5
5
|
payment: transactionIcon,
|
|
6
6
|
order: orderIcon,
|
|
7
7
|
};
|
|
8
|
+
export const REFERENCE_ORDER = ['order', 'payment', 'acquirer', 'generic', 'merchant', 'customer'];
|
|
9
|
+
export const REFERENCE_WIDTH_MAP = {
|
|
10
|
+
order: { width: '185px' },
|
|
11
|
+
payment: { width: '190px' },
|
|
12
|
+
acquirer: { width: '146px' },
|
|
13
|
+
generic: { width: '130px' },
|
|
14
|
+
merchant: { width: '140px' },
|
|
15
|
+
customer: { width: '140px' },
|
|
16
|
+
};
|
|
@@ -267,6 +267,7 @@ 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 ReferenceEmptyPlaceholder: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
270
271
|
export declare const referenceSourceAnimation: (index: number, shadow: string, xDelta?: number) => {
|
|
271
272
|
start: {
|
|
272
273
|
x: number;
|
|
@@ -34,6 +34,9 @@ export const ReferenceTextWrapper = styled('div')(() => ({
|
|
|
34
34
|
justifyContent: 'center',
|
|
35
35
|
paddingInline: '4px',
|
|
36
36
|
}));
|
|
37
|
+
export const ReferenceEmptyPlaceholder = styled('div')(() => ({
|
|
38
|
+
height: '18px',
|
|
39
|
+
}));
|
|
37
40
|
export const referenceSourceAnimation = (index, shadow, xDelta) => ({
|
|
38
41
|
start: {
|
|
39
42
|
x: index * 6,
|
|
@@ -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({ sx: { minWidth: '213px' }, 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);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SheetViewIDButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SheetViewIDButton';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Button: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3
|
+
export declare const RowId: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { styled } from '@mui/material/styles';
|
|
2
|
+
export const Button = styled('div')(({ theme }) => ({
|
|
3
|
+
position: 'relative',
|
|
4
|
+
display: 'flex',
|
|
5
|
+
alignItems: 'center',
|
|
6
|
+
gap: theme.spacing(1),
|
|
7
|
+
cursor: 'pointer',
|
|
8
|
+
justifyContent: 'center',
|
|
9
|
+
paddingInline: '8px',
|
|
10
|
+
borderRadius: '24px',
|
|
11
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
12
|
+
}));
|
|
13
|
+
export const RowId = styled('div')(({ theme }) => ({
|
|
14
|
+
fontSize: '11px',
|
|
15
|
+
height: '18px',
|
|
16
|
+
display: 'flex',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
fontWeight: 400,
|
|
19
|
+
whiteSpace: 'nowrap',
|
|
20
|
+
overflow: 'hidden',
|
|
21
|
+
textOverflow: 'ellipsis',
|
|
22
|
+
}));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SourceMergedCellProps } from './type';
|
|
2
|
-
declare function SourceMergedCell({ icons, isTextShown, centerIconKey, collapsedViewIcon, isReversed, ...props }: Readonly<SourceMergedCellProps>): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare function SourceMergedCell({ icons, isTextShown, centerIconKey, collapsedViewIcon, isReversed, tableMode, ...props }: Readonly<SourceMergedCellProps>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default SourceMergedCell;
|
|
@@ -12,17 +12,20 @@ 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 } from './style';
|
|
15
|
+
import { StatusContainer, StatusWrapper, StatusIcon, SheetModeContainer, SheetModeStatusWrapper, SheetModeIconContainer } from './style';
|
|
16
16
|
import { getIconXTranslation } from './utils';
|
|
17
17
|
import CollapsedViewIcon from './CollapsedViewIcon';
|
|
18
18
|
function SourceMergedCell(_a) {
|
|
19
|
-
var { icons, isTextShown, centerIconKey, collapsedViewIcon, isReversed = false } = _a, props = __rest(_a, ["icons", "isTextShown", "centerIconKey", "collapsedViewIcon", "isReversed"]);
|
|
19
|
+
var { icons, isTextShown, centerIconKey, collapsedViewIcon, isReversed = false, tableMode } = _a, props = __rest(_a, ["icons", "isTextShown", "centerIconKey", "collapsedViewIcon", "isReversed", "tableMode"]);
|
|
20
20
|
const iconsList = useMemo(() => icons.filter((icon) => Boolean(icon.icon)), [icons]);
|
|
21
21
|
const [isHovering, setIsHovering] = useState(false);
|
|
22
22
|
const centerIconIndex = Math.max(centerIconKey ? iconsList.findIndex((icon) => icon.key === centerIconKey) : 0, 0);
|
|
23
23
|
const iconRefs = useRef([]);
|
|
24
24
|
const [iconMeasurements, setIconMeasurements] = useState(new Map());
|
|
25
|
+
const isSheetMode = tableMode === 'sheet';
|
|
25
26
|
useEffect(() => {
|
|
27
|
+
if (isSheetMode)
|
|
28
|
+
return;
|
|
26
29
|
setTimeout(() => {
|
|
27
30
|
const tableMode = isTextShown ? 'text' : 'default';
|
|
28
31
|
const newMeasurements = new Map();
|
|
@@ -35,9 +38,16 @@ function SourceMergedCell(_a) {
|
|
|
35
38
|
});
|
|
36
39
|
setIconMeasurements(new Map([...iconMeasurements, ...newMeasurements]));
|
|
37
40
|
}, 50);
|
|
38
|
-
}, [iconsList, isTextShown, isHovering]);
|
|
41
|
+
}, [iconsList, isTextShown, isHovering, isSheetMode]);
|
|
39
42
|
const hasPreviousIcon = (isReversed && iconsList.length > 1) || centerIconIndex > 0;
|
|
40
43
|
const hasNextIcon = !isReversed && centerIconIndex < iconsList.length - 1;
|
|
44
|
+
if (isSheetMode) {
|
|
45
|
+
return (_jsx(TableCell, Object.assign({}, props, { "data-testid": "StatusCell", sx: {
|
|
46
|
+
position: 'relative',
|
|
47
|
+
overflow: 'visible',
|
|
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}`))) }) })));
|
|
50
|
+
}
|
|
41
51
|
return (_jsx(TableCell, Object.assign({}, props, { "data-testid": "StatusCell", sx: {
|
|
42
52
|
position: 'relative',
|
|
43
53
|
overflow: 'visible',
|
|
@@ -1617,3 +1617,6 @@ 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,3 +74,22 @@ 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
|
+
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { TableCellProps } from '@mui/material/TableCell';
|
|
3
|
-
import { SourceMergedCellIcons } from '../../../../types/index.js';
|
|
3
|
+
import { SourceMergedCellIcons, TableMode } from '../../../../types/index.js';
|
|
4
4
|
import type { SxProps } from '@mui/material';
|
|
5
5
|
export interface SourceMergedCellProps extends TableCellProps {
|
|
6
6
|
icons: {
|
|
@@ -15,4 +15,5 @@ export interface SourceMergedCellProps extends TableCellProps {
|
|
|
15
15
|
};
|
|
16
16
|
isReversed?: boolean;
|
|
17
17
|
sx?: SxProps;
|
|
18
|
+
tableMode?: TableMode;
|
|
18
19
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StatusCellProps } from './type';
|
|
2
|
-
declare function StatusCell({ statuses, isTextShown, centerIconKey, xGap, ...props }: Readonly<StatusCellProps & {
|
|
2
|
+
declare function StatusCell({ statuses, isTextShown, centerIconKey, xGap, tableMode, ...props }: Readonly<StatusCellProps & {
|
|
3
3
|
isChargesService?: boolean;
|
|
4
4
|
isAuthorizationsService?: boolean;
|
|
5
5
|
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,12 +11,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { TableCell } from '../../../TableCells';
|
|
14
|
+
import StatusChip from '../../../StatusChip';
|
|
14
15
|
import { StatusIcon, StatusContainer, StatusWrapper } from './style';
|
|
15
16
|
import { getStatusesFilteredObject } from './utils';
|
|
16
17
|
function StatusCell(_a) {
|
|
17
|
-
var { statuses, isTextShown, centerIconKey, xGap } = _a, props = __rest(_a, ["statuses", "isTextShown", "centerIconKey", "xGap"]);
|
|
18
|
-
const statusesFilteredObject = getStatusesFilteredObject(statuses);
|
|
18
|
+
var { statuses, isTextShown, centerIconKey, xGap, tableMode } = _a, props = __rest(_a, ["statuses", "isTextShown", "centerIconKey", "xGap", "tableMode"]);
|
|
19
|
+
const statusesFilteredObject = statuses ? getStatusesFilteredObject(statuses) : {};
|
|
19
20
|
const statusesList = Object.values(statusesFilteredObject).filter(Boolean);
|
|
21
|
+
if (tableMode === 'sheet') {
|
|
22
|
+
return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(StatusContainer, { children: statusesList.map((status, index) => (_jsx(StatusChip, Object.assign({ borderColor: "transparent", padding: '0px' }, { children: status }), index))) }) })));
|
|
23
|
+
}
|
|
20
24
|
const xGapValue = isTextShown ? xGap || 120 : 40;
|
|
21
25
|
const centerIconIndex = centerIconKey ? Object.entries(statusesFilteredObject).findIndex(([key]) => key === centerIconKey) : 0;
|
|
22
26
|
return (_jsx(TableCell, Object.assign({}, props, { "data-testid": "StatusCell", sx: {
|
|
@@ -38,6 +38,23 @@ export declare const payoutStatusIcons: {
|
|
|
38
38
|
SETTLED: string;
|
|
39
39
|
PENDING: string;
|
|
40
40
|
};
|
|
41
|
+
export declare const payoutStatusStyles: {
|
|
42
|
+
PAID_OUT: {
|
|
43
|
+
color: string;
|
|
44
|
+
background: string;
|
|
45
|
+
border: string;
|
|
46
|
+
};
|
|
47
|
+
SETTLED: {
|
|
48
|
+
color: string;
|
|
49
|
+
background: string;
|
|
50
|
+
border: string;
|
|
51
|
+
};
|
|
52
|
+
PENDING: {
|
|
53
|
+
color: string;
|
|
54
|
+
background: string;
|
|
55
|
+
border: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
41
58
|
export declare const authorizedStatusIcons: {
|
|
42
59
|
AUTHORIZED: string;
|
|
43
60
|
};
|
|
@@ -82,6 +82,23 @@ export const payoutStatusIcons = {
|
|
|
82
82
|
SETTLED: settledIcon,
|
|
83
83
|
PENDING: settlementInitiatedIcon,
|
|
84
84
|
};
|
|
85
|
+
export const payoutStatusStyles = {
|
|
86
|
+
PAID_OUT: {
|
|
87
|
+
color: '#2ACE00',
|
|
88
|
+
background: '#2ACE001A',
|
|
89
|
+
border: 'none',
|
|
90
|
+
},
|
|
91
|
+
SETTLED: {
|
|
92
|
+
color: '#2ACE00',
|
|
93
|
+
background: 'transparent',
|
|
94
|
+
border: '1px solid #2ACE0066',
|
|
95
|
+
},
|
|
96
|
+
PENDING: {
|
|
97
|
+
color: '#FF7A00',
|
|
98
|
+
background: '#FF7A000D',
|
|
99
|
+
border: 'none',
|
|
100
|
+
},
|
|
101
|
+
};
|
|
85
102
|
export const authorizedStatusIcons = {
|
|
86
103
|
AUTHORIZED: authorizedIcon,
|
|
87
104
|
};
|
|
@@ -42,6 +42,7 @@ export * from './ApplicationStatusCell';
|
|
|
42
42
|
export * from './SegmentsCell';
|
|
43
43
|
export * from './MarketPlaceCell';
|
|
44
44
|
export * from './IndividualsCell';
|
|
45
|
+
export * from './SheetViewIDButton';
|
|
45
46
|
export * from './BrandsCell';
|
|
46
47
|
export * from './type';
|
|
47
48
|
export * from './style';
|
|
@@ -42,6 +42,7 @@ export * from './ApplicationStatusCell';
|
|
|
42
42
|
export * from './SegmentsCell';
|
|
43
43
|
export * from './MarketPlaceCell';
|
|
44
44
|
export * from './IndividualsCell';
|
|
45
|
+
export * from './SheetViewIDButton';
|
|
45
46
|
export * from './BrandsCell';
|
|
46
47
|
export * from './type';
|
|
47
48
|
export * from './style';
|