@tap-payments/os-micro-frontend-shared 0.0.251-test.2 → 0.0.252
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/Icon/type.d.ts +2 -1
- package/build/components/RangeCalender/RangeCalender.d.ts +1 -1
- 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/TableCells/CustomCells/style.js +1 -1
- package/build/components/VirtualTable/SheetView/SheetViewTableHeader.js +1 -1
- package/build/components/VirtualTable/SheetView/style.d.ts +1 -3
- package/build/components/VirtualTable/SheetView/style.js +1 -1
- package/build/components/VirtualTable/components/TableRow.js +3 -3
- package/build/components/VirtualTable/style.js +1 -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/constants/table/cell/chargeTableCellWidth.d.ts +2 -2
- package/build/constants/table/cell/chargeTableCellWidth.js +2 -2
- package/package.json +134 -143
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Tap Payments
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Tap Payments
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# os-micro-frontend-shared
|
|
2
|
-
|
|
3
|
-
## Publishing Workflow
|
|
4
|
-
|
|
5
|
-
1. Update version in package.json
|
|
6
|
-
2. Commit changes
|
|
7
|
-
3. Create and push a tag:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm version patch # or minor, major
|
|
11
|
-
git push origin main --tags
|
|
12
|
-
```
|
|
1
|
+
# os-micro-frontend-shared
|
|
2
|
+
|
|
3
|
+
## Publishing Workflow
|
|
4
|
+
|
|
5
|
+
1. Update version in package.json
|
|
6
|
+
2. Commit changes
|
|
7
|
+
3. Create and push a tag:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm version patch # or minor, major
|
|
11
|
+
git push origin main --tags
|
|
12
|
+
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MouseEvent } from 'react';
|
|
2
2
|
import { PopperProps } from '@mui/material/Popper';
|
|
3
3
|
import type { CalenderMode, Timezone } from '../../types/index.js';
|
|
4
|
-
import
|
|
4
|
+
import { SxProps } from '@mui/system';
|
|
5
5
|
interface RangeCalendarProps {
|
|
6
6
|
defaultDate: [Date, Date];
|
|
7
7
|
onDateChange: (date: [Date, Date], timezoneOffset?: number) => void;
|
|
@@ -8,6 +8,7 @@ export declare const ChipStyled: import("@emotion/styled").StyledComponent<impor
|
|
|
8
8
|
disabled?: boolean | undefined;
|
|
9
9
|
padding?: string | undefined;
|
|
10
10
|
unknownText?: string | undefined;
|
|
11
|
+
maxWidth?: string | undefined;
|
|
11
12
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
12
13
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
13
14
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
|
|
@@ -10,15 +10,17 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { Box, styled } from '@mui/material';
|
|
13
|
-
export const ChipStyled = styled(Box
|
|
13
|
+
export const ChipStyled = styled(Box, {
|
|
14
|
+
shouldForwardProp: (prop) => !['textColor', 'bgColor', 'borderColor', 'disabled', 'padding', 'maxWidth'].includes(prop),
|
|
15
|
+
})((_a) => {
|
|
14
16
|
var { theme } = _a, props = __rest(_a, ["theme"]);
|
|
15
|
-
const { textColor = theme.palette.text.primary, bgColor = '#EFF1F2', borderColor = '#EFF1F2', disabled = false, padding } = props;
|
|
17
|
+
const { textColor = theme.palette.text.primary, bgColor = '#EFF1F2', borderColor = '#EFF1F2', disabled = false, padding, maxWidth } = props;
|
|
16
18
|
return {
|
|
17
|
-
display: '
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
display: 'block',
|
|
20
|
+
textAlign: 'center',
|
|
21
|
+
verticalAlign: 'middle',
|
|
20
22
|
height: '18px',
|
|
21
|
-
padding: padding ||
|
|
23
|
+
padding: padding || '0px 9.5px',
|
|
22
24
|
borderRadius: '30px',
|
|
23
25
|
border: `1px solid ${borderColor}`,
|
|
24
26
|
backgroundColor: bgColor,
|
|
@@ -28,5 +30,9 @@ export const ChipStyled = styled(Box)((_a) => {
|
|
|
28
30
|
whiteSpace: 'nowrap',
|
|
29
31
|
fontSize: '11px',
|
|
30
32
|
minWidth: '67px',
|
|
33
|
+
maxWidth: maxWidth || 'none',
|
|
34
|
+
overflow: 'hidden',
|
|
35
|
+
textOverflow: maxWidth ? 'ellipsis' : 'unset',
|
|
36
|
+
boxSizing: 'border-box',
|
|
31
37
|
};
|
|
32
38
|
});
|
|
@@ -9,6 +9,7 @@ export declare const StyledStatusChip: import("@emotion/styled").StyledComponent
|
|
|
9
9
|
disabled?: boolean | undefined;
|
|
10
10
|
padding?: string | undefined;
|
|
11
11
|
unknownText?: string | undefined;
|
|
12
|
+
maxWidth?: string | undefined;
|
|
12
13
|
} & import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
13
14
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
14
15
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
|
|
@@ -63,7 +63,7 @@ export const CountBadge = styled('span')(({ theme }) => ({
|
|
|
63
63
|
fontSize: '9.782px',
|
|
64
64
|
fontWeight: 600,
|
|
65
65
|
}));
|
|
66
|
-
export const IdButtonContainer = styled('div')((
|
|
66
|
+
export const IdButtonContainer = styled('div')(() => ({
|
|
67
67
|
display: 'flex',
|
|
68
68
|
width: '24px',
|
|
69
69
|
height: '24px',
|
|
@@ -45,7 +45,7 @@ function SheetViewTableHeader({ columns, headerProps, showBackDrop, onColumnSort
|
|
|
45
45
|
const isPinned = pinnedColumns.includes(id);
|
|
46
46
|
const isDefaultPinned = !!column.isDefaultPinned;
|
|
47
47
|
const isSelected = selectedColumn === id;
|
|
48
|
-
return (_jsxs(StyledCell, Object.assign({ "data-id": id, component: "div", "data-testid": "SheetViewVirtualTable_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, "data-column-pinned": isPinned, isFirst: isFirst, isLast: isLast, isSheetView: true, onClick: (event) => onColumnClick === null || onColumnClick === void 0 ? void 0 : onColumnClick(id, event), sx: Object.assign({ display: 'flex', gap: theme.spacing(0.5), alignItems: 'center', justifyContent: align === 'right' ? 'flex-end' : 'flex-start', width: column.width, textAlign: align, overflow: 'unset', cursor: 'pointer', boxSizing: 'border-box', border: isSelected ? '
|
|
48
|
+
return (_jsxs(StyledCell, Object.assign({ "data-id": id, component: "div", "data-testid": "SheetViewVirtualTable_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, "data-column-pinned": isPinned, isFirst: isFirst, isLast: isLast, isSheetView: true, onClick: (event) => onColumnClick === null || onColumnClick === void 0 ? void 0 : onColumnClick(id, event), sx: Object.assign({ display: 'flex', gap: theme.spacing(0.5), alignItems: 'center', justifyContent: align === 'right' ? 'flex-end' : 'flex-start', width: column.width, textAlign: align, overflow: 'unset', cursor: 'pointer', boxSizing: 'border-box', border: isSelected ? '2px solid #1F88D0' : '1px solid #F2F2F2', backgroundColor: isSelected ? '#F2F2F2' : '#FCFCFC', height: isSelected ? '100%' : 'auto', minHeight: isSelected ? '28px' : 'auto' }, headerStyle) }, { children: [typeof header === 'function' ? (header()) : (_jsx(Box, Object.assign({ "data-testid": "SheetViewTableHeader_columns_header", sx: { maxWidth: '100%', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, { children: header && _jsx(HeaderText, Object.assign({ "data-testid": "SheetViewVirtualTable_TableHeader_StyledCell_header_text" }, { children: header })) }))), filter && _jsx(ColumnFilter, Object.assign({}, filter)), sortable && _jsx(ColumnIcon, { onClick: sortable ? handleClick : undefined, src: columnIcon, alt: "column-icon", "data-id": id }), isPinnable && pinnable && !isDefaultPinned && !isLast && (_jsx(PinIconContainer, Object.assign({ onClick: (event) => {
|
|
49
49
|
event.stopPropagation();
|
|
50
50
|
handlePinClick(id);
|
|
51
51
|
}, title: isPinned ? 'Unpin column' : 'Pin column' }, { children: _jsx("img", { src: isPinned ? unpinIcon : pinIcon, alt: "pin-icon" }) })))] }), `${id}-${colIndex}`));
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
export declare const ActionIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
3
3
|
export declare const ColumnIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
4
|
export declare const HeaderText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
5
|
-
export declare const PinIconContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme
|
|
6
|
-
isPinned: boolean;
|
|
7
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
+
export declare const PinIconContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
8
6
|
interface StyledHeaderProps {
|
|
9
7
|
showBackDrop: boolean;
|
|
10
8
|
}
|
|
@@ -18,7 +18,7 @@ export const HeaderText = styled('span')(({ theme }) => ({
|
|
|
18
18
|
fontSize: '12px',
|
|
19
19
|
fontWeight: 600,
|
|
20
20
|
}));
|
|
21
|
-
export const PinIconContainer = styled('div')((
|
|
21
|
+
export const PinIconContainer = styled('div')(() => ({
|
|
22
22
|
width: '16px',
|
|
23
23
|
height: 'auto',
|
|
24
24
|
cursor: 'pointer',
|
|
@@ -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 }, { 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
|
}
|
|
@@ -30,7 +30,7 @@ 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 }) => (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',
|
|
@@ -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',
|
|
@@ -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',
|
package/package.json
CHANGED
|
@@ -1,143 +1,134 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
|
-
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"testVersion":
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "build/index.js",
|
|
8
|
-
"module": "build/index.js",
|
|
9
|
-
"types": "build/index.d.ts",
|
|
10
|
-
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"types": "./build/index.d.ts",
|
|
13
|
-
"import": "./build/index.js",
|
|
14
|
-
"require": "./build/index.js"
|
|
15
|
-
},
|
|
16
|
-
"./constants": {
|
|
17
|
-
"types": "./build/constants/index.d.ts",
|
|
18
|
-
"import": "./build/constants/index.js",
|
|
19
|
-
"require": "./build/constants/index.js"
|
|
20
|
-
},
|
|
21
|
-
"./components": {
|
|
22
|
-
"types": "./build/components/index.d.ts",
|
|
23
|
-
"import": "./build/components/index.js",
|
|
24
|
-
"require": "./build/components/index.js"
|
|
25
|
-
},
|
|
26
|
-
"./components/*": {
|
|
27
|
-
"types": "./build/components/*/index.d.ts",
|
|
28
|
-
"import": "./build/components/*/index.js",
|
|
29
|
-
"require": "./build/components/*/index.js"
|
|
30
|
-
},
|
|
31
|
-
"./hooks": {
|
|
32
|
-
"types": "./build/hooks/index.d.ts",
|
|
33
|
-
"import": "./build/hooks/index.js",
|
|
34
|
-
"require": "./build/hooks/index.js"
|
|
35
|
-
},
|
|
36
|
-
"./utils": {
|
|
37
|
-
"types": "./build/utils/index.d.ts",
|
|
38
|
-
"import": "./build/utils/index.js",
|
|
39
|
-
"require": "./build/utils/index.js"
|
|
40
|
-
},
|
|
41
|
-
"./theme": {
|
|
42
|
-
"types": "./build/theme/index.d.ts",
|
|
43
|
-
"import": "./build/theme/index.js",
|
|
44
|
-
"require": "./build/theme/index.js"
|
|
45
|
-
},
|
|
46
|
-
"./types": {
|
|
47
|
-
"types": "./build/types/index.d.ts",
|
|
48
|
-
"import": "./build/types/index.js",
|
|
49
|
-
"require": "./build/types/index.js"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"license": "MIT",
|
|
53
|
-
"author": {
|
|
54
|
-
"name": "Ahmed Sharkawy",
|
|
55
|
-
"email": "a.elsharkawy@tap.company"
|
|
56
|
-
},
|
|
57
|
-
"files": [
|
|
58
|
-
"build",
|
|
59
|
-
"readme.md"
|
|
60
|
-
],
|
|
61
|
-
"scripts": {
|
|
62
|
-
"ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
|
|
63
|
-
"push": "npm version patch --no-git-tag-version && npm run ts:build && npm publish --access public",
|
|
64
|
-
"push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
|
|
65
|
-
"dev": "vite",
|
|
66
|
-
"build": "tsc -b && vite build ",
|
|
67
|
-
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
|
|
68
|
-
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
|
|
69
|
-
"lint": "eslint . --color",
|
|
70
|
-
"lint:fix": "eslint src --fix --color",
|
|
71
|
-
"preview": "vite preview",
|
|
72
|
-
"prepare": "husky"
|
|
73
|
-
},
|
|
74
|
-
"dependencies": {
|
|
75
|
-
"@
|
|
76
|
-
"@
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"react
|
|
87
|
-
"react-
|
|
88
|
-
"react-
|
|
89
|
-
"react-
|
|
90
|
-
"react-
|
|
91
|
-
"react-
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"@
|
|
104
|
-
"@
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
},
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
"
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
136
|
-
"yarn run prettier:fix",
|
|
137
|
-
"yarn run lint"
|
|
138
|
-
]
|
|
139
|
-
},
|
|
140
|
-
"publishConfig": {
|
|
141
|
-
"registry": "https://registry.npmjs.org/"
|
|
142
|
-
}
|
|
143
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
|
+
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
+
"version": "0.0.252",
|
|
5
|
+
"testVersion": 3,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "build/index.js",
|
|
8
|
+
"module": "build/index.js",
|
|
9
|
+
"types": "build/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./build/index.d.ts",
|
|
13
|
+
"import": "./build/index.js",
|
|
14
|
+
"require": "./build/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./constants": {
|
|
17
|
+
"types": "./build/constants/index.d.ts",
|
|
18
|
+
"import": "./build/constants/index.js",
|
|
19
|
+
"require": "./build/constants/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./components": {
|
|
22
|
+
"types": "./build/components/index.d.ts",
|
|
23
|
+
"import": "./build/components/index.js",
|
|
24
|
+
"require": "./build/components/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./components/*": {
|
|
27
|
+
"types": "./build/components/*/index.d.ts",
|
|
28
|
+
"import": "./build/components/*/index.js",
|
|
29
|
+
"require": "./build/components/*/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./hooks": {
|
|
32
|
+
"types": "./build/hooks/index.d.ts",
|
|
33
|
+
"import": "./build/hooks/index.js",
|
|
34
|
+
"require": "./build/hooks/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./utils": {
|
|
37
|
+
"types": "./build/utils/index.d.ts",
|
|
38
|
+
"import": "./build/utils/index.js",
|
|
39
|
+
"require": "./build/utils/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./theme": {
|
|
42
|
+
"types": "./build/theme/index.d.ts",
|
|
43
|
+
"import": "./build/theme/index.js",
|
|
44
|
+
"require": "./build/theme/index.js"
|
|
45
|
+
},
|
|
46
|
+
"./types": {
|
|
47
|
+
"types": "./build/types/index.d.ts",
|
|
48
|
+
"import": "./build/types/index.js",
|
|
49
|
+
"require": "./build/types/index.js"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"author": {
|
|
54
|
+
"name": "Ahmed Sharkawy",
|
|
55
|
+
"email": "a.elsharkawy@tap.company"
|
|
56
|
+
},
|
|
57
|
+
"files": [
|
|
58
|
+
"build",
|
|
59
|
+
"readme.md"
|
|
60
|
+
],
|
|
61
|
+
"scripts": {
|
|
62
|
+
"ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
|
|
63
|
+
"push": "npm version patch --no-git-tag-version && npm run ts:build && npm publish --access public",
|
|
64
|
+
"push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
|
|
65
|
+
"dev": "vite",
|
|
66
|
+
"build": "tsc -b && vite build ",
|
|
67
|
+
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
|
|
68
|
+
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
|
|
69
|
+
"lint": "eslint . --color",
|
|
70
|
+
"lint:fix": "eslint src --fix --color",
|
|
71
|
+
"preview": "vite preview",
|
|
72
|
+
"prepare": "husky"
|
|
73
|
+
},
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"@emotion/react": "^11.11.0",
|
|
76
|
+
"@emotion/styled": "^11.11.0",
|
|
77
|
+
"@hookform/resolvers": "^3.3.1",
|
|
78
|
+
"@mui/material": "^5.12.3",
|
|
79
|
+
"@uiw/react-json-view": "^2.0.0-alpha.16",
|
|
80
|
+
"axios": "^1.4.0",
|
|
81
|
+
"dayjs": "^1.11.8",
|
|
82
|
+
"framer-motion": "10.11.0",
|
|
83
|
+
"i18next": "^22.4.15",
|
|
84
|
+
"memoize-one": "^6.0.0",
|
|
85
|
+
"re-resizable": "^6.9.9",
|
|
86
|
+
"react": "^18.2.0",
|
|
87
|
+
"react-currency-input-field": "^3.6.11",
|
|
88
|
+
"react-dom": "^18.2.0",
|
|
89
|
+
"react-draggable": "^4.4.6",
|
|
90
|
+
"react-dropzone": "^14.2.3",
|
|
91
|
+
"react-hook-form": "^7.45.4",
|
|
92
|
+
"react-hot-toast": "^2.4.1",
|
|
93
|
+
"react-i18next": "^12.2.2",
|
|
94
|
+
"react-multi-date-picker": "^4.1.2",
|
|
95
|
+
"react-router-dom": "^7.7.0",
|
|
96
|
+
"react-virtualized-auto-sizer": "^1.0.20",
|
|
97
|
+
"react-window": "^1.8.9",
|
|
98
|
+
"react-window-infinite-loader": "^1.0.9",
|
|
99
|
+
"react18-input-otp": "^1.1.4",
|
|
100
|
+
"recharts": "^2.15.1"
|
|
101
|
+
},
|
|
102
|
+
"devDependencies": {
|
|
103
|
+
"@eslint/js": "^9.17.0",
|
|
104
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
105
|
+
"@types/lodash": "^4.17.15",
|
|
106
|
+
"@types/react": "^18.2.6",
|
|
107
|
+
"@types/react-dom": "^18.3.5",
|
|
108
|
+
"@types/react-virtualized-auto-sizer": "^1.0.8",
|
|
109
|
+
"@types/react-window": "^1.8.5",
|
|
110
|
+
"@types/react-window-infinite-loader": "^1.0.6",
|
|
111
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
112
|
+
"eslint": "^9.17.0",
|
|
113
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
114
|
+
"eslint-plugin-react-refresh": "^0.4.16",
|
|
115
|
+
"globals": "^15.14.0",
|
|
116
|
+
"husky": "^8.0.3",
|
|
117
|
+
"lint-staged": "^13.2.2",
|
|
118
|
+
"prettier": "^2.8.8",
|
|
119
|
+
"tsc-alias": "^1.8.16",
|
|
120
|
+
"typescript": "5.0.2",
|
|
121
|
+
"typescript-eslint": "^8.18.2",
|
|
122
|
+
"vite": "6.0.5",
|
|
123
|
+
"vite-tsconfig-paths": "^4.2.0"
|
|
124
|
+
},
|
|
125
|
+
"lint-staged": {
|
|
126
|
+
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
127
|
+
"yarn run prettier:fix",
|
|
128
|
+
"yarn run lint"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"publishConfig": {
|
|
132
|
+
"registry": "https://registry.npmjs.org/"
|
|
133
|
+
}
|
|
134
|
+
}
|