@tap-payments/os-micro-frontend-shared 0.0.128 → 0.0.129-sheetview-component-ui-v1
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/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 +2 -2
- 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 +11 -2
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +2 -0
- package/build/components/TableCells/CustomCells/ReferenceCell/style.js +7 -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/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,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({}, props, { children: _jsx("span", { 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 StatusChip from '../../../StatusChip';
|
|
19
20
|
import { referenceIcons } from './constant';
|
|
20
|
-
import { ReferenceTextLabel, ReferenceTextWrapper, ReferenceSourcesContainer, StyledSourceCell, StyledSourceImage, referenceSourceAnimation, } from './style';
|
|
21
|
+
import { ReferenceTextLabel, ReferenceTextWrapper, ReferenceSourcesContainer, StyledSourceCell, StyledSourceImage, ReferenceSheetContainer, ReferenceEmptyPlaceholder, referenceSourceAnimation, } from './style';
|
|
22
|
+
const REFERENCE_ORDER = ['order', 'payment', 'acquirer', 'generic', 'merchant', 'customer'];
|
|
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,13 @@ 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, { 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
|
+
}) }) })));
|
|
45
|
+
}
|
|
37
46
|
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
47
|
zIndex: 29,
|
|
39
48
|
} }, { children: ReferenceSources }))) : null }) })));
|
|
@@ -267,6 +267,8 @@ 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>, {}>;
|
|
270
272
|
export declare const referenceSourceAnimation: (index: number, shadow: string, xDelta?: number) => {
|
|
271
273
|
start: {
|
|
272
274
|
x: number;
|
|
@@ -34,6 +34,13 @@ 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
|
+
}));
|
|
37
44
|
export const referenceSourceAnimation = (index, shadow, xDelta) => ({
|
|
38
45
|
start: {
|
|
39
46
|
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: {
|
|
@@ -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';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { TableMode } from '../../../types/index.js';
|
|
2
3
|
export declare const GeographyBox: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
3
4
|
variant?: "Local" | "Global" | "Regional" | undefined;
|
|
4
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -271,7 +272,9 @@ export declare const StarBadgeWrapper: import("@emotion/styled").StyledComponent
|
|
|
271
272
|
isShown?: boolean | undefined;
|
|
272
273
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
273
274
|
export declare const CountBadge: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
274
|
-
export declare const IdButtonContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme
|
|
275
|
+
export declare const IdButtonContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
276
|
+
tableMode?: TableMode | undefined;
|
|
277
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
275
278
|
export declare const AvatarStyled: import("@emotion/styled").StyledComponent<import("@mui/material").AvatarOwnProps & import("@mui/material").AvatarSlotsAndSlotProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
276
279
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
277
280
|
}, "className" | "style" | "classes" | "children" | "sx" | "src" | "alt" | "variant" | "slots" | "slotProps" | "sizes" | "srcSet" | "imgProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -63,15 +63,12 @@ export const CountBadge = styled('span')(({ theme }) => ({
|
|
|
63
63
|
fontSize: '9.782px',
|
|
64
64
|
fontWeight: 600,
|
|
65
65
|
}));
|
|
66
|
-
export const IdButtonContainer = styled('div'
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
borderRadius: '64px;',
|
|
73
|
-
border: '1px solid #F2F2F2;',
|
|
74
|
-
});
|
|
66
|
+
export const IdButtonContainer = styled('div', {
|
|
67
|
+
shouldForwardProp: (props) => props !== 'tableMode',
|
|
68
|
+
})(({ tableMode }) => (Object.assign({ display: 'flex', width: '24px', height: tableMode === 'sheet' ? '18px' : '24px', alignItems: 'center', justifyContent: 'center', borderRadius: '64px;', border: '1px solid #F2F2F2;' }, (tableMode === 'sheet' && {
|
|
69
|
+
width: '100%',
|
|
70
|
+
padding: '5px 8px',
|
|
71
|
+
}))));
|
|
75
72
|
export const AvatarStyled = styled(Avatar)(({ theme }) => ({
|
|
76
73
|
width: 24,
|
|
77
74
|
height: 24,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { TableCellProps } from '@mui/material';
|
|
3
|
-
import type { Charge } from '../../../types/index.js';
|
|
3
|
+
import type { Charge, TableMode } from '../../../types/index.js';
|
|
4
4
|
import type { ActionType, FlagType } from './ActionCell';
|
|
5
5
|
import { getGeographyBoxColor } from '../../../utils/index.js';
|
|
6
6
|
export type GeographyBoxVariant = keyof ReturnType<typeof getGeographyBoxColor>;
|
|
@@ -10,6 +10,7 @@ export interface DateCellProps extends TableCellProps {
|
|
|
10
10
|
format?: object;
|
|
11
11
|
flagIcon?: string;
|
|
12
12
|
hasFlag?: boolean;
|
|
13
|
+
tableMode?: TableMode;
|
|
13
14
|
}
|
|
14
15
|
export interface OrderCellProps extends TableCellProps {
|
|
15
16
|
label: string;
|
|
@@ -19,6 +20,7 @@ export interface OrderCellProps extends TableCellProps {
|
|
|
19
20
|
description?: string;
|
|
20
21
|
name?: string;
|
|
21
22
|
}>;
|
|
23
|
+
tableMode?: TableMode;
|
|
22
24
|
}
|
|
23
25
|
export interface CustomerCellProps extends TableCellProps {
|
|
24
26
|
customerInitiated?: boolean;
|
|
@@ -32,6 +34,7 @@ export interface CustomerCellProps extends TableCellProps {
|
|
|
32
34
|
email?: string;
|
|
33
35
|
phone?: string;
|
|
34
36
|
id?: string;
|
|
37
|
+
tableMode?: TableMode;
|
|
35
38
|
}
|
|
36
39
|
export interface SourceCellProps extends TableCellProps {
|
|
37
40
|
geographyVariant?: 'G' | 'L' | 'R';
|
|
@@ -51,6 +54,7 @@ export interface AmountCellProps extends TableCellProps {
|
|
|
51
54
|
tooltipLabel?: React.ReactNode;
|
|
52
55
|
amountTooltipLabel?: React.ReactNode;
|
|
53
56
|
isTextShown?: boolean;
|
|
57
|
+
tableMode?: TableMode;
|
|
54
58
|
}
|
|
55
59
|
export interface DestinationCellProps extends TableCellProps {
|
|
56
60
|
destinationsCount?: number;
|
|
@@ -80,6 +84,7 @@ export interface DestinationCellProps extends TableCellProps {
|
|
|
80
84
|
}>;
|
|
81
85
|
};
|
|
82
86
|
iconDirection?: 'left' | 'right';
|
|
87
|
+
tableMode?: TableMode;
|
|
83
88
|
}
|
|
84
89
|
export interface ActionCellProps extends TableCellProps {
|
|
85
90
|
row?: unknown;
|
|
@@ -5,6 +5,6 @@ interface ISheetViewVirtualTable extends Omit<IVirtualTable, 'isSheetView'> {
|
|
|
5
5
|
isPinnable?: boolean;
|
|
6
6
|
clearBackdropVisibilityTimeout?: number;
|
|
7
7
|
}
|
|
8
|
-
declare function SheetViewVirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, rowHeight, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, showBackgroundColor, areAllRowsLoaded, tableBodyStyles,
|
|
8
|
+
declare function SheetViewVirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, rowHeight, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, showBackgroundColor, areAllRowsLoaded, tableBodyStyles, tableTitle, dragControls, onColumnPin, clearBackdropVisibilityTimeout, isPinnable, tableMode, }: Readonly<ISheetViewVirtualTable>): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
declare const _default: import("react").MemoExoticComponent<typeof SheetViewVirtualTable>;
|
|
10
10
|
export default _default;
|
|
@@ -40,7 +40,7 @@ const createItemData = memoize((columns, isLoading, rows, rowProps, scrollToInde
|
|
|
40
40
|
isSheetView: true,
|
|
41
41
|
isPinned,
|
|
42
42
|
}));
|
|
43
|
-
function SheetViewVirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, rowHeight = 28, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, showBackgroundColor, areAllRowsLoaded = false, tableBodyStyles,
|
|
43
|
+
function SheetViewVirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, rowHeight = 28, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, showBackgroundColor, areAllRowsLoaded = false, tableBodyStyles, tableTitle, dragControls, onColumnPin, clearBackdropVisibilityTimeout = 100, isPinnable = false, tableMode, }) {
|
|
44
44
|
var _a, _b, _c;
|
|
45
45
|
const theme = useTheme();
|
|
46
46
|
const { pinnedStartColumns, pinnedEndColumns, handleColumnPin, pinnedStartColumnsData, pinnedEndColumnsData, unpinnedColumnsData, orderedColumns, lastColumnId, } = usePinnedColumns(columns, isPinnable, onColumnPin);
|