@tap-payments/os-micro-frontend-shared 0.0.258-test.2 → 0.0.258-test.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +12 -12
- package/build/components/AccountDropdown/style.d.ts +3 -1
- package/build/components/AppServices/style.d.ts +3 -1
- package/build/components/DockButton/style.d.ts +3 -1
- package/build/components/FileUpload/style.d.ts +6 -2
- package/build/components/FileUploader/style.d.ts +3 -1
- package/build/components/Icon/type.d.ts +2 -1
- package/build/components/Menu/Menu.d.ts +1 -1
- package/build/components/Menu/Menu.js +14 -2
- package/build/components/MultiSelectWithSearch/style.d.ts +9 -3
- package/build/components/NestedDropdown/styles.d.ts +3 -1
- package/build/components/RFH/Inputs/SelectWithAccordion/style.d.ts +9 -3
- package/build/components/RangeCalender/RangeCalender.d.ts +1 -1
- package/build/components/RangeCalender/components/Timezone/Timezone.js +1 -1
- package/build/components/SelectDropdown/style.d.ts +3 -1
- package/build/components/SelectWithSearch/style.d.ts +9 -3
- package/build/components/StatusChip/style.d.ts +1 -0
- package/build/components/StatusChip/style.js +12 -6
- package/build/components/StatusChip/type.d.ts +1 -0
- package/build/components/StatusGroupChips/style.d.ts +1 -0
- package/build/components/StatusLabel/style.d.ts +3 -1
- package/build/components/TableCells/CustomCells/style.js +1 -1
- package/build/components/TableHeader/style.d.ts +3 -1
- package/build/components/Text/Text.d.ts +3 -4
- package/build/components/Timepicker/style.d.ts +6 -2
- package/build/components/VirtualTable/SheetView/SheetViewTableHeader.d.ts +5 -1
- package/build/components/VirtualTable/SheetView/SheetViewTableHeader.js +41 -14
- package/build/components/VirtualTable/SheetView/SheetViewVirtualTable.js +16 -5
- package/build/components/VirtualTable/SheetView/style.d.ts +1 -3
- package/build/components/VirtualTable/SheetView/style.js +1 -1
- package/build/components/VirtualTable/components/ColumnFilter/ColumnFilter.d.ts +8 -2
- package/build/components/VirtualTable/components/ColumnFilter/ColumnFilter.js +36 -24
- package/build/components/VirtualTable/components/TableFooter/style.d.ts +6 -2
- package/build/components/VirtualTable/components/TableHeader.js +38 -13
- package/build/components/VirtualTable/components/TableRow.js +3 -3
- package/build/components/VirtualTable/style.d.ts +1 -0
- package/build/components/VirtualTable/style.js +6 -1
- package/build/components/VirtualTable/utils/{getBorderStyle.d.ts → getSelectionStyles.d.ts} +6 -3
- package/build/components/VirtualTable/utils/{getBorderStyle.js → getSelectionStyles.js} +6 -6
- package/build/components/Widget/style.d.ts +3 -1
- package/build/components/WindowAppIcon/style.d.ts +3 -1
- package/build/constants/index.d.ts +1 -0
- package/build/constants/index.js +1 -0
- package/build/constants/payment.d.ts +5 -0
- package/build/constants/payment.js +38 -0
- package/build/constants/table/cell/chargeTableCellWidth.d.ts +2 -2
- package/build/constants/table/cell/chargeTableCellWidth.js +2 -2
- package/build/types/analytics.d.ts +2 -1
- package/build/types/analytics.js +1 -0
- package/package.json +10 -19
|
@@ -41,45 +41,70 @@ const StyledMUITableRow = styled(MUITableRow, {
|
|
|
41
41
|
paddingBlock: 0,
|
|
42
42
|
}))));
|
|
43
43
|
function TableHeader({ columns, headerProps, showBackDrop, onColumnSort, columnsSorting, isSheetView }) {
|
|
44
|
-
const [
|
|
45
|
-
const
|
|
44
|
+
const [sortAnchorEl, setSortAnchorEl] = useState(null);
|
|
45
|
+
const sortOpen = Boolean(sortAnchorEl);
|
|
46
|
+
const [openFilterColumnId, setOpenFilterColumnId] = useState(null);
|
|
47
|
+
const [filterAnchorEl, setFilterAnchorEl] = useState(null);
|
|
46
48
|
const theme = useTheme();
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
+
const handleSortClick = (event) => {
|
|
50
|
+
setSortAnchorEl(event.currentTarget);
|
|
49
51
|
};
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
+
const handleColumnHeaderClick = (event, column) => {
|
|
53
|
+
if (column.filter) {
|
|
54
|
+
setOpenFilterColumnId(column.id);
|
|
55
|
+
setFilterAnchorEl(event.currentTarget);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (column.sortable) {
|
|
59
|
+
setSortAnchorEl(event.currentTarget);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
const handleFilterOpen = (columnId) => (event) => {
|
|
63
|
+
setOpenFilterColumnId(columnId);
|
|
64
|
+
setFilterAnchorEl(event.currentTarget);
|
|
65
|
+
};
|
|
66
|
+
const handleFilterClose = () => {
|
|
67
|
+
setOpenFilterColumnId(null);
|
|
68
|
+
setFilterAnchorEl(null);
|
|
69
|
+
};
|
|
70
|
+
const handleSortClose = () => {
|
|
71
|
+
setSortAnchorEl(null);
|
|
52
72
|
};
|
|
53
73
|
const handleSortingOption = (columnId, order) => {
|
|
54
74
|
if (columnId) {
|
|
55
75
|
onColumnSort === null || onColumnSort === void 0 ? void 0 : onColumnSort({
|
|
56
76
|
[columnId]: order,
|
|
57
77
|
});
|
|
58
|
-
|
|
78
|
+
handleSortClose();
|
|
59
79
|
}
|
|
60
80
|
};
|
|
61
81
|
return (_jsxs(StyledHeader, Object.assign({ component: "nav", "data-testid": "VirtualTable_TableHeader_StyledHeader", showBackDrop: showBackDrop }, headerProps, { sx: Object.assign({ width: '100%', minWidth: 'auto', overflowX: 'scroll' }, headerProps === null || headerProps === void 0 ? void 0 : headerProps.sx) }, { children: [_jsx(StyledMUITableRow, Object.assign({ component: "section", "data-testid": "VirtualTable_TableHeader_StyledMUITableRow", isSheetView: isSheetView }, { children: columns.map((column, colIndex) => {
|
|
62
82
|
const { header, id, align, headerStyle, sortable, filter } = column;
|
|
63
83
|
const isFirst = id === columns[0].id;
|
|
64
84
|
const isLast = id === columns[columns.length - 1].id;
|
|
65
|
-
return (_jsxs(StyledCell, Object.assign({ "data-id": id, component: "div", "data-testid": "VirtualTable_TableHeader_StyledCell", "data-column-id": column.id, "data-column-width": column.width, "data-column-width-used": column.width, "data-column-align": column.align, "data-column-order": column.order, "data-column-header": typeof column.header === 'string' ? column.header : 'component', "data-column-sortable": !!column.sortable, "data-column-filterable": !!column.filter, isFirst: isFirst, isLast: isLast, sx: Object.assign({ paddingInline: '0.6875rem', paddingLeft: isFirst ? '0' : '0.6875rem', paddingRight: isLast ? '0' : '0.6875rem', display: 'flex', gap: theme.spacing(0.5), alignItems: 'center', justifyContent: align === 'right' ? 'flex-end' : 'flex-start', width: column.width, textAlign: align, overflow: 'unset', fontWeight: 600 }, headerStyle), isSheetView: isSheetView }, { children: [typeof header === 'function' ? (header()) : (_jsx(Box, Object.assign({ "data-testid": "TableHeader_columns_header", sx: { maxWidth: '100%', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, { children: header && (_jsx("span", Object.assign({ style: { textOverflow: 'ellipsis', width: '80%', overflow: 'hidden' }, "data-testid": "VirtualTable_TableHeader_StyledCell_header_text" }, { children: header }))) }))), filter && _jsx(ColumnFilter, Object.assign({}, filter
|
|
66
|
-
|
|
85
|
+
return (_jsxs(StyledCell, Object.assign({ "data-id": id, component: "div", "data-testid": "VirtualTable_TableHeader_StyledCell", "data-column-id": column.id, "data-column-width": column.width, "data-column-width-used": column.width, "data-column-align": column.align, "data-column-order": column.order, "data-column-header": typeof column.header === 'string' ? column.header : 'component', "data-column-sortable": !!column.sortable, "data-column-filterable": !!column.filter, isFirst: isFirst, isLast: isLast, onClick: (event) => handleColumnHeaderClick(event, column), sx: Object.assign({ paddingInline: '0.6875rem', paddingLeft: isFirst ? '0' : '0.6875rem', paddingRight: isLast ? '0' : '0.6875rem', display: 'flex', gap: theme.spacing(0.5), alignItems: 'center', justifyContent: align === 'right' ? 'flex-end' : 'flex-start', width: column.width, textAlign: align, overflow: 'unset', fontWeight: 600, cursor: column.filter || column.sortable ? 'pointer' : 'default' }, headerStyle), isSheetView: isSheetView }, { children: [typeof header === 'function' ? (header()) : (_jsx(Box, Object.assign({ "data-testid": "TableHeader_columns_header", sx: { maxWidth: '100%', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, { children: header && (_jsx("span", Object.assign({ style: { textOverflow: 'ellipsis', width: '80%', overflow: 'hidden' }, "data-testid": "VirtualTable_TableHeader_StyledCell_header_text" }, { children: header }))) }))), filter && (_jsx(ColumnFilter, Object.assign({}, filter, { externalAnchorEl: openFilterColumnId === id ? filterAnchorEl : null, externalOpen: openFilterColumnId === id, onExternalOpen: handleFilterOpen(id), onExternalClose: handleFilterClose }))), sortable && (_jsx(ColumnIcon, { onClick: sortable
|
|
86
|
+
? (event) => {
|
|
87
|
+
event.stopPropagation();
|
|
88
|
+
handleSortClick(event);
|
|
89
|
+
}
|
|
90
|
+
: undefined, src: columnIcon, alt: "column-icon", "data-id": id }))] }), `${id}-${colIndex}`));
|
|
91
|
+
}) })), _jsx(Dropdown, { open: sortOpen, onClose: handleSortClose, anchorEl: sortAnchorEl, menuItems: [
|
|
67
92
|
{
|
|
68
93
|
label: 'Sort A-Z',
|
|
69
94
|
name: 'asc',
|
|
70
95
|
icon: _jsx(ActionIcon, { src: sortAzIcon, alt: "sort-icon" }),
|
|
71
|
-
selected: (columnsSorting === null || columnsSorting === void 0 ? void 0 : columnsSorting[(
|
|
96
|
+
selected: (columnsSorting === null || columnsSorting === void 0 ? void 0 : columnsSorting[(sortAnchorEl === null || sortAnchorEl === void 0 ? void 0 : sortAnchorEl.dataset.id) || '']) === 'asc',
|
|
72
97
|
onClick: () => {
|
|
73
|
-
handleSortingOption(
|
|
98
|
+
handleSortingOption(sortAnchorEl === null || sortAnchorEl === void 0 ? void 0 : sortAnchorEl.dataset.id, 'asc');
|
|
74
99
|
},
|
|
75
100
|
},
|
|
76
101
|
{
|
|
77
102
|
label: 'Sort Z-A',
|
|
78
103
|
name: 'desc',
|
|
79
104
|
icon: _jsx(ActionIcon, { src: sortZaIcon, alt: "sort-icon" }),
|
|
80
|
-
selected: (columnsSorting === null || columnsSorting === void 0 ? void 0 : columnsSorting[(
|
|
105
|
+
selected: (columnsSorting === null || columnsSorting === void 0 ? void 0 : columnsSorting[(sortAnchorEl === null || sortAnchorEl === void 0 ? void 0 : sortAnchorEl.dataset.id) || '']) === 'desc',
|
|
81
106
|
onClick: () => {
|
|
82
|
-
handleSortingOption(
|
|
107
|
+
handleSortingOption(sortAnchorEl === null || sortAnchorEl === void 0 ? void 0 : sortAnchorEl.dataset.id, 'desc');
|
|
83
108
|
},
|
|
84
109
|
},
|
|
85
110
|
] })] })));
|
|
@@ -3,7 +3,7 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { memo, useMemo } from 'react';
|
|
4
4
|
import { areEqual } from 'react-window';
|
|
5
5
|
import { StyledCell, StyledTableRow } from '../style';
|
|
6
|
-
import {
|
|
6
|
+
import { getSelectionStyles } from '../utils/getSelectionStyles';
|
|
7
7
|
function TableRow({ row, columns, index, rowProps, isSheetView, selectedCell = null, selectedColumn = null, onCellClick, isLastRow = false, }) {
|
|
8
8
|
const renderCell = (column) => {
|
|
9
9
|
const { render, format, selector } = column;
|
|
@@ -19,13 +19,13 @@ function TableRow({ row, columns, index, rowProps, isSheetView, selectedCell = n
|
|
|
19
19
|
const isCellSelected = selectedCell === cellKey;
|
|
20
20
|
const isColumnSelected = selectedColumn === columnIdStr;
|
|
21
21
|
const isSelected = isCellSelected || isColumnSelected;
|
|
22
|
-
const
|
|
22
|
+
const selectionStyles = getSelectionStyles({
|
|
23
23
|
isSelected,
|
|
24
24
|
isCellSelected,
|
|
25
25
|
isColumnSelected,
|
|
26
26
|
isLastRow,
|
|
27
27
|
});
|
|
28
|
-
return (_jsx(StyledCell, Object.assign({ component: "div", "data-testid": "TableRow_TableCell", "data-column-id": column.id, "data-column-width": column.width, "data-column-width-used": column.width, "data-column-align": column.align, "data-column-order": column.order, "data-column-header": typeof column.header === 'string' ? column.header : 'component', "data-column-sortable": !!column.sortable, "data-column-filterable": !!column.filter, isFirst: column.id === columns[0].id, isLast: column.id === columns[columns.length - 1].id, onClick: (event) => onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(index, columnIdStr, event), sx: Object.assign(Object.assign({ width: column.width, minWidth: column.width, textAlign: column.align, justifyContent: column.align === 'right' ? 'flex-end' : 'flex-start', cursor: onCellClick ? 'pointer' : 'default' },
|
|
28
|
+
return (_jsx(StyledCell, Object.assign({ component: "div", "data-testid": "TableRow_TableCell", "data-column-id": column.id, "data-column-width": column.width, "data-column-width-used": column.width, "data-column-align": column.align, "data-column-order": column.order, "data-column-header": typeof column.header === 'string' ? column.header : 'component', "data-column-sortable": !!column.sortable, "data-column-filterable": !!column.filter, isFirst: column.id === columns[0].id, isLast: column.id === columns[columns.length - 1].id, onClick: (event) => onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(index, columnIdStr, event), sx: Object.assign(Object.assign({ width: column.width, minWidth: column.width, textAlign: column.align, justifyContent: column.align === 'right' ? 'flex-end' : 'flex-start', cursor: onCellClick ? 'pointer' : 'default' }, selectionStyles), column.cellStyle), isSheetView: isSheetView, isSelected: isCellSelected && (column === null || column === void 0 ? void 0 : column.isDefaultPinned) }, { children: renderCell(column) }), `${column.id}-${colIndex}`));
|
|
29
29
|
}) })), [columns, row, index, selectedCell, selectedColumn, onCellClick, isLastRow]);
|
|
30
30
|
return (_createElement(StyledTableRow, Object.assign({ "data-testid": "TableRow", onClick: rowProps === null || rowProps === void 0 ? void 0 : rowProps.onRowClick, showShadowHighlight: rowProps === null || rowProps === void 0 ? void 0 : rowProps.showShadowHighlight, showLoadedStyle: rowProps === null || rowProps === void 0 ? void 0 : rowProps.showLoadedStyle, component: "article" }, rowProps, { key: index, isSheetView: isSheetView }), content));
|
|
31
31
|
}
|
|
@@ -18,6 +18,7 @@ export declare const StyledCell: import("@emotion/styled").StyledComponent<impor
|
|
|
18
18
|
isLast: boolean;
|
|
19
19
|
isFirst: boolean;
|
|
20
20
|
isSheetView?: boolean | undefined;
|
|
21
|
+
isSelected?: boolean | undefined;
|
|
21
22
|
}, {}, {}>;
|
|
22
23
|
interface StyledVirtualListProps {
|
|
23
24
|
areTotalRowsNotFillingHeight: boolean;
|
|
@@ -30,11 +30,16 @@ export const StyledSolidBackground = styled(Box)(({ theme }) => ({
|
|
|
30
30
|
}));
|
|
31
31
|
export const StyledCell = styled(TableCell, {
|
|
32
32
|
shouldForwardProp: (prop) => !['isLast', 'isFirst', 'isSheetView'].includes(prop),
|
|
33
|
-
})(({ theme, isLast, isFirst, isSheetView }) => (Object.assign({ paddingBlock: '0', paddingInline: '0.3875rem !important', paddingLeft: isFirst ? '0 !important' : '0.3875rem !important', paddingRight: isLast ? '0 !important' : '0.3875rem !important', color: theme.palette.grey[700], fontSize: theme.typography.caption.fontSize, height: '100%', fontWeight: theme.typography.fontWeightRegular, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', display: 'flex', alignItems: 'center' }, (isSheetView && {
|
|
33
|
+
})(({ theme, isLast, isFirst, isSheetView, isSelected }) => (Object.assign(Object.assign({ paddingBlock: '0', paddingInline: '0.3875rem !important', paddingLeft: isFirst ? '0 !important' : '0.3875rem !important', paddingRight: isLast ? '0 !important' : '0.3875rem !important', color: isSheetView ? theme.palette.text.primary : theme.palette.grey[700], fontSize: isSheetView ? theme.typography.subtitle1.fontSize : theme.typography.caption.fontSize, height: '100%', fontWeight: isSheetView ? 400 : theme.typography.fontWeightRegular, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', display: 'flex', alignItems: 'center' }, (isSheetView && {
|
|
34
34
|
borderRight: isLast ? 'none' : `1px solid ${theme.palette.divider}`,
|
|
35
35
|
paddingInline: '8px !important',
|
|
36
36
|
paddingLeft: '8px !important',
|
|
37
37
|
paddingRight: '8px !important',
|
|
38
|
+
})), (isSelected && {
|
|
39
|
+
color: '#1F88D0 !important',
|
|
40
|
+
'& *': {
|
|
41
|
+
color: '#1F88D0 !important',
|
|
42
|
+
},
|
|
38
43
|
}))));
|
|
39
44
|
export const StyledVirtualList = styled(VirtualScrollList, {
|
|
40
45
|
shouldForwardProp: (prop) => !['areTotalRowsNotFillingHeight', 'isSheetView'].includes(prop),
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
interface
|
|
1
|
+
interface GetSelectionStylesParams {
|
|
2
2
|
isSelected: boolean;
|
|
3
3
|
isCellSelected: boolean;
|
|
4
4
|
isColumnSelected: boolean;
|
|
5
5
|
isLastRow: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const getSelectionStyles: ({ isSelected, isCellSelected, isColumnSelected, isLastRow }: GetSelectionStylesParams) => {
|
|
8
8
|
border?: undefined;
|
|
9
9
|
backgroundColor?: undefined;
|
|
10
|
+
color?: undefined;
|
|
10
11
|
borderWidth?: undefined;
|
|
11
12
|
borderStyle?: undefined;
|
|
12
13
|
borderColor?: undefined;
|
|
@@ -18,6 +19,7 @@ export declare const getBorderStyle: ({ isSelected, isCellSelected, isColumnSele
|
|
|
18
19
|
} | {
|
|
19
20
|
border: string;
|
|
20
21
|
backgroundColor: string;
|
|
22
|
+
color: string;
|
|
21
23
|
borderWidth?: undefined;
|
|
22
24
|
borderStyle?: undefined;
|
|
23
25
|
borderColor?: undefined;
|
|
@@ -31,11 +33,12 @@ export declare const getBorderStyle: ({ isSelected, isCellSelected, isColumnSele
|
|
|
31
33
|
borderStyle: string;
|
|
32
34
|
borderColor: string;
|
|
33
35
|
borderBottom: string;
|
|
34
|
-
backgroundColor: string;
|
|
35
36
|
height: string;
|
|
36
37
|
minHeight: string;
|
|
37
38
|
display: string;
|
|
38
39
|
alignItems: string;
|
|
39
40
|
border?: undefined;
|
|
41
|
+
backgroundColor?: undefined;
|
|
42
|
+
color?: undefined;
|
|
40
43
|
};
|
|
41
44
|
export {};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const getSelectionStyles = ({ isSelected, isCellSelected, isColumnSelected, isLastRow }) => {
|
|
2
2
|
if (!isSelected)
|
|
3
3
|
return {};
|
|
4
4
|
if (isCellSelected && !isColumnSelected) {
|
|
5
5
|
return {
|
|
6
|
-
border: '
|
|
7
|
-
backgroundColor: '
|
|
6
|
+
border: '2px solid #1F88D0',
|
|
7
|
+
backgroundColor: 'white',
|
|
8
|
+
color: '#1F88D0',
|
|
8
9
|
};
|
|
9
10
|
}
|
|
10
11
|
if (isColumnSelected) {
|
|
11
12
|
return {
|
|
12
|
-
borderWidth: isLastRow ? '0px
|
|
13
|
+
borderWidth: isLastRow ? '0px 1.5px 1px 1.5px' : '0px 1.5px 0px 1.5px',
|
|
13
14
|
borderStyle: 'solid',
|
|
14
15
|
borderColor: '#1F88D0',
|
|
15
|
-
borderBottom: !isLastRow ? '1px solid #F2F2F2' : '
|
|
16
|
-
backgroundColor: '#F4F9FC',
|
|
16
|
+
borderBottom: !isLastRow ? '1px solid #F2F2F2' : '1.5px solid #1F88D0',
|
|
17
17
|
height: '100%',
|
|
18
18
|
minHeight: '28px',
|
|
19
19
|
display: 'flex',
|
|
@@ -11,7 +11,9 @@ export declare const Header: import("@emotion/styled").StyledComponent<import("@
|
|
|
11
11
|
export declare const ListItemStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
12
12
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
13
13
|
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
14
|
-
export declare const ItemText: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<
|
|
14
|
+
export declare const ItemText: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
15
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
16
|
+
}, "width" | "minHeight" | "height" | "bottom" | "left" | "right" | "top" | "textAlign" | "className" | "style" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "boxShadow" | "maxWidth" | "minWidth" | "maxHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textTransform" | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & {
|
|
15
17
|
component?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
16
18
|
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
17
19
|
export declare const ItemTextWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const TitleStyled: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<
|
|
2
|
+
export declare const TitleStyled: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
4
|
+
}, "width" | "minHeight" | "height" | "bottom" | "left" | "right" | "top" | "textAlign" | "className" | "style" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "boxShadow" | "maxWidth" | "minWidth" | "maxHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textTransform" | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & {
|
|
3
5
|
component?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
4
6
|
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
5
7
|
export declare const StyledWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
package/build/constants/index.js
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { lightUrl } from './assets';
|
|
2
|
+
export const PAYMENT_TYPES = [
|
|
3
|
+
{
|
|
4
|
+
name: 'CARD',
|
|
5
|
+
label: 'Card',
|
|
6
|
+
icon: `${lightUrl}/payment-method/card.svg`,
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
name: 'EXPRESS',
|
|
10
|
+
label: 'Express Checkout',
|
|
11
|
+
icon: `${lightUrl}/express_checkout.svg`,
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: 'DEVICE',
|
|
15
|
+
label: 'Device',
|
|
16
|
+
icon: `${lightUrl}/device.svg`,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'PT_WALLET',
|
|
20
|
+
label: 'Pass-Thru Wallet',
|
|
21
|
+
icon: `${lightUrl}/passThruWallet.svg`,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'SV_WALLET',
|
|
25
|
+
label: 'Stored Value Wallet',
|
|
26
|
+
icon: `${lightUrl}/storedValueWallet.svg`,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'BNPL',
|
|
30
|
+
label: 'Buy Now Pay Later',
|
|
31
|
+
icon: `${lightUrl}/buyNowPayLater.svg`,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'CASH',
|
|
35
|
+
label: 'Cash Wallet',
|
|
36
|
+
icon: `${lightUrl}/cash.svg`,
|
|
37
|
+
},
|
|
38
|
+
];
|
|
@@ -77,7 +77,7 @@ export declare const chargeTableCellWidth: {
|
|
|
77
77
|
readonly merchant: {
|
|
78
78
|
readonly default: "100px";
|
|
79
79
|
readonly text: "150px";
|
|
80
|
-
readonly sheet: "
|
|
80
|
+
readonly sheet: "190px";
|
|
81
81
|
};
|
|
82
82
|
readonly charge: {
|
|
83
83
|
readonly default: "150px";
|
|
@@ -122,7 +122,7 @@ export declare const chargeTableCellWidth: {
|
|
|
122
122
|
readonly actions: {
|
|
123
123
|
readonly default: "100px";
|
|
124
124
|
readonly text: "100px";
|
|
125
|
-
readonly sheet: "
|
|
125
|
+
readonly sheet: "85px";
|
|
126
126
|
};
|
|
127
127
|
readonly payment_id: {
|
|
128
128
|
readonly default: "150px";
|
|
@@ -77,7 +77,7 @@ export const chargeTableCellWidth = {
|
|
|
77
77
|
merchant: {
|
|
78
78
|
default: '100px',
|
|
79
79
|
text: '150px',
|
|
80
|
-
sheet: '
|
|
80
|
+
sheet: '190px',
|
|
81
81
|
},
|
|
82
82
|
charge: {
|
|
83
83
|
default: '150px',
|
|
@@ -122,7 +122,7 @@ export const chargeTableCellWidth = {
|
|
|
122
122
|
actions: {
|
|
123
123
|
default: '100px',
|
|
124
124
|
text: '100px',
|
|
125
|
-
sheet: '
|
|
125
|
+
sheet: '85px',
|
|
126
126
|
},
|
|
127
127
|
payment_id: {
|
|
128
128
|
default: '150px',
|
|
@@ -27,5 +27,6 @@ export interface AnalyticsDetails {
|
|
|
27
27
|
export declare enum ChargeBreakDownType {
|
|
28
28
|
PaymentMethod = "PAYMENT_METHOD",
|
|
29
29
|
PaymentCurrency = "PAYMENT_CURRENCY",
|
|
30
|
-
PaymentScheme = "PAYMENT_SCHEME"
|
|
30
|
+
PaymentScheme = "PAYMENT_SCHEME",
|
|
31
|
+
PaymentType = "PAYMENT_TYPE"
|
|
31
32
|
}
|
package/build/types/analytics.js
CHANGED
|
@@ -3,4 +3,5 @@ export var ChargeBreakDownType;
|
|
|
3
3
|
ChargeBreakDownType["PaymentMethod"] = "PAYMENT_METHOD";
|
|
4
4
|
ChargeBreakDownType["PaymentCurrency"] = "PAYMENT_CURRENCY";
|
|
5
5
|
ChargeBreakDownType["PaymentScheme"] = "PAYMENT_SCHEME";
|
|
6
|
+
ChargeBreakDownType["PaymentType"] = "PAYMENT_TYPE";
|
|
6
7
|
})(ChargeBreakDownType || (ChargeBreakDownType = {}));
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
3
|
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.0.258-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.0.258-test.3",
|
|
5
|
+
"testVersion": 3,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|
|
@@ -72,7 +72,10 @@
|
|
|
72
72
|
"prepare": "husky"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
+
"@emotion/react": "^11.11.0",
|
|
76
|
+
"@emotion/styled": "^11.11.0",
|
|
75
77
|
"@hookform/resolvers": "^3.3.1",
|
|
78
|
+
"@mui/material": "^5.12.3",
|
|
76
79
|
"@uiw/react-json-view": "^2.0.0-alpha.16",
|
|
77
80
|
"axios": "^1.4.0",
|
|
78
81
|
"dayjs": "^1.11.8",
|
|
@@ -80,12 +83,16 @@
|
|
|
80
83
|
"i18next": "^22.4.15",
|
|
81
84
|
"memoize-one": "^6.0.0",
|
|
82
85
|
"re-resizable": "^6.9.9",
|
|
86
|
+
"react": "^18.2.0",
|
|
83
87
|
"react-currency-input-field": "^3.6.11",
|
|
88
|
+
"react-dom": "^18.2.0",
|
|
84
89
|
"react-draggable": "^4.4.6",
|
|
85
90
|
"react-dropzone": "^14.2.3",
|
|
86
91
|
"react-hook-form": "^7.45.4",
|
|
87
92
|
"react-hot-toast": "^2.4.1",
|
|
88
93
|
"react-i18next": "^12.2.2",
|
|
94
|
+
"react-multi-date-picker": "^4.1.2",
|
|
95
|
+
"react-router-dom": "^7.7.0",
|
|
89
96
|
"react-virtualized-auto-sizer": "^1.0.20",
|
|
90
97
|
"react-window": "^1.8.9",
|
|
91
98
|
"react-window-infinite-loader": "^1.0.9",
|
|
@@ -113,23 +120,7 @@
|
|
|
113
120
|
"typescript": "5.0.2",
|
|
114
121
|
"typescript-eslint": "^8.18.2",
|
|
115
122
|
"vite": "6.0.5",
|
|
116
|
-
"vite-tsconfig-paths": "^4.2.0"
|
|
117
|
-
"react": "^18.2.0",
|
|
118
|
-
"react-dom": "^18.2.0",
|
|
119
|
-
"react-router": "^7.7.0",
|
|
120
|
-
"@emotion/react": "^11.11.0",
|
|
121
|
-
"@emotion/styled": "^11.11.0",
|
|
122
|
-
"@mui/material": "^5.12.3",
|
|
123
|
-
"react-multi-date-picker": "^4.1.2"
|
|
124
|
-
},
|
|
125
|
-
"peerDependencies": {
|
|
126
|
-
"react": "18.2.0",
|
|
127
|
-
"react-dom": "18.2.0",
|
|
128
|
-
"react-router": "7.7.0",
|
|
129
|
-
"@emotion/react": "11.11.0",
|
|
130
|
-
"@emotion/styled": "11.11.0",
|
|
131
|
-
"@mui/material": "5.12.3",
|
|
132
|
-
"react-multi-date-picker": "4.1.2"
|
|
123
|
+
"vite-tsconfig-paths": "^4.2.0"
|
|
133
124
|
},
|
|
134
125
|
"lint-staged": {
|
|
135
126
|
"src/**/*.{ts,tsx,json,js,jsx}": [
|