@tap-payments/os-micro-frontend-shared 0.0.258-test.2 → 0.0.259-test.2

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.
@@ -5,6 +5,6 @@ interface MenuProps extends PopperProps {
5
5
  children: ReactNode;
6
6
  popperSx?: SxProps<Theme>;
7
7
  }
8
- declare function Menu({ open, anchorEl, children, sx, placement, popperSx }: MenuProps): import("react/jsx-runtime").JSX.Element;
8
+ declare function Menu({ open, anchorEl, children, sx, placement, popperSx, ...props }: MenuProps): import("react/jsx-runtime").JSX.Element;
9
9
  declare const _default: import("react").MemoExoticComponent<typeof Menu>;
10
10
  export default _default;
@@ -1,8 +1,20 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { jsx as _jsx } from "react/jsx-runtime";
2
13
  import { memo } from 'react';
3
14
  import Popper from '@mui/material/Popper';
4
15
  import { Dropdown } from './style';
5
- function Menu({ open, anchorEl, children, sx, placement, popperSx }) {
6
- return (_jsx(Popper, Object.assign({ open: open, anchorEl: anchorEl, placement: placement || 'bottom-start', sx: popperSx }, { children: _jsx(Dropdown, Object.assign({ sx: sx }, { children: children })) }), "menu"));
16
+ function Menu(_a) {
17
+ var { open, anchorEl, children, sx, placement, popperSx } = _a, props = __rest(_a, ["open", "anchorEl", "children", "sx", "placement", "popperSx"]);
18
+ return (_jsx(Popper, Object.assign({ open: open, anchorEl: anchorEl, placement: placement || 'bottom-start', sx: popperSx }, props, { children: _jsx(Dropdown, Object.assign({ className: "MuiPopper-dropdown", sx: sx }, { children: children })) }), "menu"));
7
19
  }
8
20
  export default memo(Menu);
@@ -27,6 +27,6 @@ function CustomTimezone({ onChange, selectedTimezone, defaultTimezone, browserTi
27
27
  return entityTimezoneIcon;
28
28
  return savedTimezoneIcon;
29
29
  }, [browserTimezone, defaultTimezone.timezone, selectedTimezone === null || selectedTimezone === void 0 ? void 0 : selectedTimezone.timezone]);
30
- return (_jsx(ClickAwayListener, Object.assign({ onClickAway: onClose }, { children: _jsxs(TimezoneWrapper, Object.assign({ "data-testid": "CustomTimezone" }, { children: [_jsxs(SelectedTimezone, Object.assign({ open: open, onClick: onOpen }, { children: [_jsx("img", { src: selectedTimezoneIcon, alt: "timezone-icon" }), _jsx(CountryFlag, { code: selectedTimezone === null || selectedTimezone === void 0 ? void 0 : selectedTimezone.countryCode }), _jsx("span", { children: selectedTimezone === null || selectedTimezone === void 0 ? void 0 : selectedTimezone.label })] })), _jsx(Popper, Object.assign({ open: open, anchorEl: anchorEl, placement: "top-start", sx: { zIndex: 3 } }, { children: _jsxs(TimezoneDropdown, Object.assign({ "data-testid": "CustomTimezone_dropdown" }, { children: [_jsx(EntitiesTimezone, { onChange: updateTimezone, selectedTimezone: selectedTimezone, defaultTimezone: defaultTimezone }), _jsx(UserTimezone, { onChange: updateTimezone, selectedTimezone: selectedTimezone, browserTimezone: browserTimezone })] })) }))] })) })));
30
+ return (_jsx(ClickAwayListener, Object.assign({ onClickAway: onClose }, { children: _jsxs(TimezoneWrapper, Object.assign({ "data-testid": "CustomTimezone" }, { children: [_jsxs(SelectedTimezone, Object.assign({ open: open, onClick: onOpen }, { children: [_jsx("img", { src: selectedTimezoneIcon, alt: "timezone-icon" }), _jsx(CountryFlag, { code: selectedTimezone === null || selectedTimezone === void 0 ? void 0 : selectedTimezone.countryCode }), _jsx("span", { children: selectedTimezone === null || selectedTimezone === void 0 ? void 0 : selectedTimezone.label })] })), _jsx(Popper, Object.assign({ open: open, anchorEl: anchorEl, placement: "top-start", sx: { zIndex: 1400 } }, { children: _jsxs(TimezoneDropdown, Object.assign({ "data-testid": "CustomTimezone_dropdown" }, { children: [_jsx(EntitiesTimezone, { onChange: updateTimezone, selectedTimezone: selectedTimezone, defaultTimezone: defaultTimezone }), _jsx(UserTimezone, { onChange: updateTimezone, selectedTimezone: selectedTimezone, browserTimezone: browserTimezone })] })) }))] })) })));
31
31
  }
32
32
  export default memo(CustomTimezone);
@@ -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)((_a) => {
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: 'inline-flex',
18
- alignItems: 'center',
19
- justifyContent: 'center',
19
+ display: 'block',
20
+ textAlign: 'center',
21
+ verticalAlign: 'middle',
20
22
  height: '18px',
21
- padding: padding || `${theme.spacing(0.5)} ${theme.spacing(1.5)}`,
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
  });
@@ -7,4 +7,5 @@ export type ChipProps = PropsWithChildren<{
7
7
  disabled?: boolean;
8
8
  padding?: string;
9
9
  unknownText?: string;
10
+ maxWidth?: string;
10
11
  } & BoxProps>;
@@ -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')(({ theme }) => ({
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 ? '1px solid #1F88D0' : '1px solid #F2F2F2', backgroundColor: isSelected ? '#e3f2fd' : '#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({ isPinned: isPinned, onClick: (event) => {
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')(({ theme, isPinned }) => ({
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 { getBorderStyle } from '../utils/getBorderStyle';
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 borderStyle = getBorderStyle({
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' }, borderStyle), column.cellStyle), isSheetView: isSheetView }, { children: renderCell(column) }), `${column.id}-${colIndex}`));
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 GetBorderStyleParams {
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 getBorderStyle: ({ isSelected, isCellSelected, isColumnSelected, isLastRow }: GetBorderStyleParams) => {
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 getBorderStyle = ({ isSelected, isCellSelected, isColumnSelected, isLastRow }) => {
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: '0.5px solid #1F88D0',
7
- backgroundColor: '#F4F9FC',
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 0.5px 1px 0.5px' : '0px 0.5px 0px 0.5px',
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' : '0.5px solid #1F88D0',
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',
@@ -10,3 +10,4 @@ export * from './timezones';
10
10
  export * from './currency';
11
11
  export * from './table';
12
12
  export * from './toggleOptions';
13
+ export * from './payment';
@@ -10,3 +10,4 @@ export * from './timezones';
10
10
  export * from './currency';
11
11
  export * from './table';
12
12
  export * from './toggleOptions';
13
+ export * from './payment';
@@ -0,0 +1,5 @@
1
+ export declare const PAYMENT_TYPES: {
2
+ name: string;
3
+ label: string;
4
+ icon: string;
5
+ }[];
@@ -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: "115px";
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: "315px";
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: '115px',
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: '315px',
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
  }
@@ -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,7 +1,7 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.0.258-test.2",
4
+ "version": "0.0.259-test.2",
5
5
  "testVersion": 2,
6
6
  "type": "module",
7
7
  "main": "build/index.js",