@tap-payments/os-micro-frontend-shared 0.1.99 → 0.1.101-test.5

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.
Files changed (27) hide show
  1. package/build/components/StatusChip/StatusChip.d.ts +1 -1
  2. package/build/components/StatusChip/StatusChip.js +8 -11
  3. package/build/components/StatusChip/style.d.ts +0 -1
  4. package/build/components/StatusChip/type.d.ts +0 -1
  5. package/build/components/TableCells/CustomCells/ApplicationStatusCell/ApplicationStatusCell.js +4 -4
  6. package/build/components/VirtualTables/SheetViewVirtualTable/components/LoadingMainTable.js +3 -0
  7. package/build/components/VirtualTables/SheetViewVirtualTable/components/MainTable.js +8 -1
  8. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.js +13 -4
  9. package/build/components/index.d.ts +0 -1
  10. package/build/components/index.js +0 -1
  11. package/build/constants/table/cell/authorizationTableCellWidth.d.ts +2 -2
  12. package/build/constants/table/cell/authorizationTableCellWidth.js +2 -2
  13. package/build/constants/table/cell/chargeTableCellWidth.d.ts +2 -2
  14. package/build/constants/table/cell/chargeTableCellWidth.js +2 -2
  15. package/build/constants/table/cell/destinationsTableCellWidth.d.ts +2 -2
  16. package/build/constants/table/cell/destinationsTableCellWidth.js +2 -2
  17. package/build/constants/table/cell/refundTableCellWidth.d.ts +2 -2
  18. package/build/constants/table/cell/refundTableCellWidth.js +2 -2
  19. package/build/utils/object.js +2 -2
  20. package/build/utils/style.js +4 -0
  21. package/package.json +139 -139
  22. package/build/components/AmountStatusChip/AmountStatusChip.d.ts +0 -9
  23. package/build/components/AmountStatusChip/AmountStatusChip.js +0 -20
  24. package/build/components/AmountStatusChip/index.d.ts +0 -3
  25. package/build/components/AmountStatusChip/index.js +0 -2
  26. package/build/components/AmountStatusChip/style.d.ts +0 -4
  27. package/build/components/AmountStatusChip/style.js +0 -27
@@ -1,3 +1,3 @@
1
1
  import { ChipProps } from './type';
2
- declare const StatusChip: ({ children, unknownText, copyText, expandDirection, ...props }: ChipProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const StatusChip: ({ children, unknownText, copyText, ...props }: ChipProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default StatusChip;
@@ -18,7 +18,7 @@ import { copyIcon, greenCheckIcon } from '../../constants/index.js';
18
18
  import { unknownGeographyColors } from './constants';
19
19
  import { ChipStyled, Wrapper, CopyWrapper } from './style';
20
20
  const StatusChip = (_a) => {
21
- var { children, unknownText, copyText, expandDirection = 'right' } = _a, props = __rest(_a, ["children", "unknownText", "copyText", "expandDirection"]);
21
+ var { children, unknownText, copyText } = _a, props = __rest(_a, ["children", "unknownText", "copyText"]);
22
22
  const [showCopy, setShowCopy] = useState(false);
23
23
  const { t } = useTranslation();
24
24
  const isSelected = props.isSelected;
@@ -38,15 +38,12 @@ const StatusChip = (_a) => {
38
38
  };
39
39
  }
40
40
  };
41
- const isCopyActive = isSelected && copyText;
42
- return (_jsxs(motion.div, Object.assign({ style: { position: 'relative' }, animate: { zIndex: isSelected ? 3 : 0 } }, { children: [_jsx(ChipStyled, Object.assign({}, props, { sx: { visibility: 'hidden', pointerEvents: 'none' } }, { children: _jsx(Wrapper, { children: children }) })), _jsx(motion.div, Object.assign({ style: { position: 'absolute', top: 0, zIndex: isSelected ? 3 : 0 }, animate: {
43
- left: isCopyActive && expandDirection === 'left' ? -12 : 0,
44
- }, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: _jsx(ChipStyled, Object.assign({}, props, { isSelected: isSelected }, { children: _jsxs(motion.div, Object.assign({ layout: "size", style: { display: 'flex', gap: '4px' }, animate: {
45
- paddingRight: isCopyActive ? 12 : 0,
46
- }, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: [_jsx(Wrapper, { children: children }), _jsx(AnimatePresence, { children: isCopyActive && (_jsx(CopyWrapper, { children: _jsx(motion.img, { initial: { opacity: 0, x: -5 }, animate: { opacity: 1, x: 0 }, exit: { opacity: 0, x: -2 }, transition: { delay: 0.2, duration: 0.1 }, onClick: handleCopy, src: showCopy ? greenCheckIcon : copyIcon, style: {
47
- height: 12,
48
- width: 12,
49
- objectFit: 'contain',
50
- } }) })) })] })) })) }))] })));
41
+ return (_jsxs(motion.div, Object.assign({ style: { position: 'relative' }, animate: { zIndex: isSelected ? 3 : 0 } }, { children: [_jsx(ChipStyled, Object.assign({}, props, { sx: { visibility: 'hidden', pointerEvents: 'none' } }, { children: _jsx(Wrapper, { children: children }) })), _jsx(ChipStyled, Object.assign({}, props, { isSelected: isSelected, style: { position: 'absolute', top: 0, left: 0, zIndex: isSelected ? 3 : 0 } }, { children: _jsxs(motion.div, Object.assign({ layout: "size", style: { display: 'flex', gap: '4px' }, animate: {
42
+ paddingRight: isSelected && copyText ? 12 : 0,
43
+ }, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: [_jsx(Wrapper, { children: children }), _jsx(AnimatePresence, { children: isSelected && copyText && (_jsx(CopyWrapper, { children: _jsx(motion.img, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { delay: isSelected ? 0.2 : 0, duration: 0.1 }, onClick: handleCopy, src: showCopy ? greenCheckIcon : copyIcon, style: {
44
+ height: 12,
45
+ width: 12,
46
+ objectFit: 'contain',
47
+ } }) })) })] })) }))] })));
51
48
  };
52
49
  export default StatusChip;
@@ -11,7 +11,6 @@ export declare const ChipStyled: import("@emotion/styled").StyledComponent<impor
11
11
  maxWidth?: string | undefined;
12
12
  isSelected?: boolean | undefined;
13
13
  copyText?: string | undefined;
14
- expandDirection?: "left" | "right" | undefined;
15
14
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
16
15
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
17
16
  }, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & {
@@ -10,5 +10,4 @@ export type ChipProps = PropsWithChildren<{
10
10
  maxWidth?: string;
11
11
  isSelected?: boolean;
12
12
  copyText?: string;
13
- expandDirection?: 'left' | 'right';
14
13
  } & BoxProps>;
@@ -30,11 +30,10 @@ export default function ApplicationStatusCell(_a) {
30
30
  tooltip: 'Acceptance',
31
31
  enabled: isAcceptanceEnabled,
32
32
  shown: !hideAcceptance,
33
+ zIndex: isAcceptanceEnabled && !isPayoutEnabled ? 3 : 1,
33
34
  },
34
- { icon: isPayoutEnabled ? payoutsGreenIcon : payoutWindowIcon, tooltip: 'Payout', enabled: isPayoutEnabled, shown: !hidePayout },
35
- ]
36
- .filter((app) => app.shown)
37
- .sort((a, b) => (a.enabled !== b.enabled && b.enabled ? -1 : 0)), [isAcceptanceEnabled, isPayoutEnabled, hideAcceptance, hidePayout]);
35
+ { icon: isPayoutEnabled ? payoutsGreenIcon : payoutWindowIcon, tooltip: 'Payout', enabled: isPayoutEnabled, shown: !hidePayout, zIndex: 2 },
36
+ ].filter((app) => app.shown), [isAcceptanceEnabled, isPayoutEnabled, hideAcceptance, hidePayout]);
38
37
  const appsStatus = useMemo(() => apps.map((app, index) => {
39
38
  const sourceTooltip = app.tooltip;
40
39
  return (_jsx(Tooltip, Object.assign({ onOpen: () => {
@@ -43,6 +42,7 @@ export default function ApplicationStatusCell(_a) {
43
42
  setIsTooltipOpen(false);
44
43
  }, title: sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ order: index, variants: appStatusAnimation(index, theme.shadows[4], 40), sx: {
45
44
  width: '36px',
45
+ zIndex: app.zIndex + 6,
46
46
  } }, { children: _jsx(IconWithBadge, { mainIcon: app.icon, mainIconSize: 16, containerSize: 16, sx: { borderRadius: '40px' }, onError: (e) => {
47
47
  e.currentTarget.src = app.icon;
48
48
  e.currentTarget.style.borderRadius = '0px';
@@ -10,10 +10,13 @@ function LoadingMainTable({ hasPinnedStart, hasPinnedEnd, unpinnedColumnsData, s
10
10
  return (_jsx(MainTableWrapper, Object.assign({ hasPinnedStart: hasPinnedStart, hasPinnedEnd: hasPinnedEnd }, { children: _jsx(StyledTableBox, Object.assign({ as: "main", id: "sheet-table-box-container", "aria-labelledby": "sheet-table-box-container", "data-testid": "SheetViewVirtualTable_StyledTableBox_Loading", "data-title": tableTitle, "data-direction": theme.direction, "data-are-all-rows-loaded": !!areAllRowsLoaded, "data-is-fetching-next-page": !!isFetchingNextPage, "data-scroll-to-index": scrollToIndex, "data-is-loading": !!isLoading, "data-is-error": !!isError, "data-is-error-timeout": !!hasTimeoutError, "data-table-mode": tableMode, height: "100%", dir: theme.direction, showNoDataView: showNoDataView, scrollable: true }, { children: _jsxs(TableWrapper, Object.assign({ "data-testid": "SheetViewVirtualTable_LoadingTableWrapper", showNoDataView: showNoDataView, sx: Object.assign(Object.assign({}, tableBodyStyles), { display: 'flex', flexDirection: 'column', height: '100%' }) }, { children: [showHeader && (_jsx(UnpinnedTableHeaderWrapper, { children: _jsx(SheetViewTableHeader, { "data-testid": "SheetViewVirtualTable_LoadingTableHeader", columnsSorting: columnsSorting, onColumnSort: onColumnSort, columns: unpinnedColumnsData, headerProps: headerProps, showBackDrop: showBackDrop, pinnedColumns: [...pinnedStartColumns, ...pinnedEndColumns], onColumnPin: onColumnPin, isPinnable: isPinnable, lastColumnId: lastColumnId, selectedColumn: selectedColumn, onColumnClick: onColumnClick, tablePosition: "scrollable", hasPinnedStart: hasPinnedStart, hasPinnedEnd: hasPinnedEnd }) })), _jsx(TableWrapper, Object.assign({ "data-testid": "VirtualTable_LoadingTableWrapper", sx: {
11
11
  width: '100%',
12
12
  minWidth: 'fit-content',
13
+ flex: '1 1 auto',
14
+ height: '100%',
13
15
  } }, { children: _jsx(StyledBox, Object.assign({ "data-testid": "SheetViewVirtualTable_LoadingStyledBox", hidePadding: true, className: "list-wrapper", sx: {
14
16
  height: '100%',
15
17
  display: 'flex',
16
18
  flexDirection: 'column',
19
+ flex: '1 1 auto',
17
20
  } }, { children: _jsx(SheetViewTableLoading, { "data-testid": "SheetViewVirtualTable_TableLoading", columns: unpinnedColumnsData, isLoading: true, isPinned: false }) })) }))] })) })) })));
18
21
  }
19
22
  export default memo(LoadingMainTable);
@@ -10,6 +10,13 @@ function MainTable({ hasPinnedStart, hasPinnedEnd, unpinnedColumnsData, showHead
10
10
  return (_jsx(MainTableWrapper, Object.assign({ hasPinnedStart: hasPinnedStart, hasPinnedEnd: hasPinnedEnd }, { children: _jsx(StyledTableBox, Object.assign({ as: "main", id: "sheet-table-box-container", "aria-labelledby": "sheet-table-box-container", "data-testid": "SheetViewVirtualTable_StyledTableBox", "data-title": tableTitle, "data-direction": theme.direction, "data-are-all-rows-loaded": !!areAllRowsLoaded, "data-is-fetching-next-page": !!isFetchingNextPage, "data-scroll-to-index": scrollToIndex, "data-is-loading": !!isLoading, "data-is-error": !!isError, "data-is-error-timeout": !!hasTimeoutError, "data-table-mode": tableMode, height: "100%", dir: theme.direction, showNoDataView: showNoDataView, scrollable: true }, { children: _jsxs(TableWrapper, Object.assign({ "data-testid": "SheetViewVirtualTable_TableWrapper", showNoDataView: showNoDataView, sx: Object.assign(Object.assign({}, tableBodyStyles), { display: 'flex', flexDirection: 'column', height: '100%' }) }, { children: [showHeader && (_jsx(UnpinnedTableHeaderWrapper, { children: _jsx(SheetViewTableHeader, { "data-testid": "SheetViewVirtualTable_UnpinnedTableHeader", columnsSorting: columnsSorting, onColumnSort: onColumnSort, columns: unpinnedColumnsData, headerProps: headerProps, showBackDrop: showBackDrop, pinnedColumns: [...pinnedStartColumns, ...pinnedEndColumns], onColumnPin: onColumnPin, isPinnable: isPinnable, lastColumnId: lastColumnId, selectedColumn: selectedColumn, onColumnClick: onColumnClick, tablePosition: "scrollable", hasPinnedStart: hasPinnedStart, hasPinnedEnd: hasPinnedEnd }) })), _jsx(TableWrapper, Object.assign({ "data-testid": "VirtualTable_TableWrapper", sx: {
11
11
  width: '100%',
12
12
  minWidth: 'fit-content',
13
- } }, { children: _jsx(StyledBox, Object.assign({ "data-testid": "SheetViewVirtualTable_ScrollableStyledBox", hidePadding: true, className: "list-wrapper" }, { children: tableLoading ? (_jsx(SheetViewTableLoading, { "data-testid": "SheetViewVirtualTable_TableLoading", columns: unpinnedColumnsData, isLoading: true, isPinned: false })) : (createVirtualTableContainer(unpinnedColumnsData, 'scrollable', false)) })) }))] })) })) })));
13
+ flex: '1 1 auto',
14
+ height: '100%',
15
+ } }, { children: _jsx(StyledBox, Object.assign({ "data-testid": "SheetViewVirtualTable_ScrollableStyledBox", hidePadding: true, className: "list-wrapper", sx: {
16
+ height: '100%',
17
+ display: 'flex',
18
+ flexDirection: 'column',
19
+ flex: '1 1 auto',
20
+ } }, { children: tableLoading ? (_jsx(SheetViewTableLoading, { "data-testid": "SheetViewVirtualTable_TableLoading", columns: unpinnedColumnsData, isLoading: true, isPinned: false })) : (createVirtualTableContainer(unpinnedColumnsData, 'scrollable', false)) })) }))] })) })) })));
14
21
  }
15
22
  export default memo(MainTable);
@@ -1,19 +1,28 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { memo } from 'react';
3
+ import AutoSizer from 'react-virtualized-auto-sizer';
3
4
  import { styled } from '@mui/material/styles';
4
5
  import uniqueId from 'lodash/uniqueId';
5
- import { calculateMaxAllowedRows } from '../../../../utils/index.js';
6
6
  import SheetViewTableRowLoading from './SheetViewTableRowLoading';
7
7
  const Wrapper = styled('section')(({ isLoaded = false, isPinned = false }) => ({
8
+ height: '100%',
8
9
  overflow: 'hidden',
9
10
  paddingInline: isLoaded && !isPinned ? '32px' : '0px',
10
11
  backgroundColor: isLoaded && !isPinned ? 'rgba(255, 255, 255, 0.60)' : 'none',
11
12
  filter: isLoaded && !isPinned ? 'blur(8px)' : 'none',
12
13
  marginTop: isLoaded && !isPinned ? '1rem' : '0',
13
14
  }));
15
+ const LoadingContentWrapper = styled('div')({
16
+ height: '100%',
17
+ display: 'flex',
18
+ flexDirection: 'column',
19
+ });
14
20
  function SheetViewTableLoading({ columns, isLoaded = false, animationType, isLoading = false, rowsCount, isPinned = false, }) {
15
- let maxAllowedRows = rowsCount || calculateMaxAllowedRows(isLoaded, isLoading);
16
- maxAllowedRows = rowsCount || Math.max(maxAllowedRows, 25);
17
- return (_jsx(Wrapper, Object.assign({ isLoaded: isLoaded, isPinned: isPinned, "data-testid": "SheetViewTableLoading" }, { children: [...Array(maxAllowedRows)].map((_, index) => (_jsx(SheetViewTableRowLoading, { columns: columns, animationType: animationType, rowIndex: index, useTableBackground: !isPinned }, `i-${uniqueId('SheetViewTableLoadingRow_')}`))) })));
21
+ const ROW_HEIGHT = 28;
22
+ return (_jsx(Wrapper, Object.assign({ isLoaded: isLoaded, isPinned: isPinned, "data-testid": "SheetViewTableLoading" }, { children: _jsx(AutoSizer, { children: ({ height }) => {
23
+ const calculatedRows = Math.floor(height / ROW_HEIGHT);
24
+ const maxAllowedRows = rowsCount || Math.max(calculatedRows, 1);
25
+ return (_jsx(LoadingContentWrapper, { children: [...Array(maxAllowedRows)].map((_, index) => (_jsx(SheetViewTableRowLoading, { columns: columns, animationType: animationType, rowIndex: index, useTableBackground: !isPinned }, `i-${uniqueId('SheetViewTableLoadingRow_')}`))) }));
26
+ } }) })));
18
27
  }
19
28
  export default memo(SheetViewTableLoading);
@@ -105,5 +105,4 @@ export * from './LeftPeekRightExpandingChip';
105
105
  export { default as ColorPicker } from './ColorPicker';
106
106
  export { default as WindowBackdrop } from './WindowBackdrop';
107
107
  export { default as LazyImage } from './LazyImage';
108
- export { default as AmountStatusChip, type AmountStatusChipProps } from './AmountStatusChip';
109
108
  export * from './LazyImage';
@@ -105,5 +105,4 @@ export * from './LeftPeekRightExpandingChip';
105
105
  export { default as ColorPicker } from './ColorPicker';
106
106
  export { default as WindowBackdrop } from './WindowBackdrop';
107
107
  export { default as LazyImage } from './LazyImage';
108
- export { default as AmountStatusChip } from './AmountStatusChip';
109
108
  export * from './LazyImage';
@@ -57,12 +57,12 @@ export declare const authorizationTableCellWidth: {
57
57
  readonly payment_agreement: {
58
58
  readonly default: "50px";
59
59
  readonly text: "150px";
60
- readonly sheet: "230px";
60
+ readonly sheet: "170px";
61
61
  };
62
62
  readonly amount: {
63
63
  readonly default: "170px";
64
64
  readonly text: "195px";
65
- readonly sheet: "150px";
65
+ readonly sheet: "195px";
66
66
  };
67
67
  readonly destinations: {
68
68
  readonly default: "70px";
@@ -57,12 +57,12 @@ export const authorizationTableCellWidth = {
57
57
  payment_agreement: {
58
58
  default: '50px',
59
59
  text: '150px',
60
- sheet: '230px',
60
+ sheet: '170px',
61
61
  },
62
62
  amount: {
63
63
  default: '170px',
64
64
  text: '195px',
65
- sheet: '150px',
65
+ sheet: '195px',
66
66
  },
67
67
  destinations: {
68
68
  default: '70px',
@@ -52,7 +52,7 @@ export declare const chargeTableCellWidth: {
52
52
  readonly payment_agreement: {
53
53
  readonly default: "50px";
54
54
  readonly text: "150px";
55
- readonly sheet: "230px";
55
+ readonly sheet: "165px";
56
56
  };
57
57
  readonly payment_initiated: {
58
58
  readonly default: "150px";
@@ -222,7 +222,7 @@ export declare const chargeTableCellWidth: {
222
222
  readonly consolidated_amount: {
223
223
  readonly default: "180px";
224
224
  readonly text: "180px";
225
- readonly sheet: "150px";
225
+ readonly sheet: "180px";
226
226
  };
227
227
  readonly customer_amount: {
228
228
  readonly default: "150px";
@@ -52,7 +52,7 @@ export const chargeTableCellWidth = {
52
52
  payment_agreement: {
53
53
  default: '50px',
54
54
  text: '150px',
55
- sheet: '230px',
55
+ sheet: '165px',
56
56
  },
57
57
  payment_initiated: {
58
58
  default: '150px',
@@ -222,7 +222,7 @@ export const chargeTableCellWidth = {
222
222
  consolidated_amount: {
223
223
  default: '180px',
224
224
  text: '180px',
225
- sheet: '150px',
225
+ sheet: '180px',
226
226
  },
227
227
  customer_amount: {
228
228
  default: '150px',
@@ -62,12 +62,12 @@ export declare const destinationsTableCellWidth: {
62
62
  readonly payment_agreement: {
63
63
  readonly default: "50px";
64
64
  readonly text: "250px";
65
- readonly sheet: "230px";
65
+ readonly sheet: "165px";
66
66
  };
67
67
  readonly amount: {
68
68
  readonly default: "195px";
69
69
  readonly text: "195px";
70
- readonly sheet: "150px";
70
+ readonly sheet: "195px";
71
71
  };
72
72
  readonly status: {
73
73
  readonly default: "50px";
@@ -62,12 +62,12 @@ export const destinationsTableCellWidth = {
62
62
  payment_agreement: {
63
63
  default: '50px',
64
64
  text: '250px',
65
- sheet: '230px',
65
+ sheet: '165px',
66
66
  },
67
67
  amount: {
68
68
  default: '195px',
69
69
  text: '195px',
70
- sheet: '150px',
70
+ sheet: '195px',
71
71
  },
72
72
  status: {
73
73
  default: '50px',
@@ -47,7 +47,7 @@ export declare const refundTableCellWidth: {
47
47
  readonly payment_agreement: {
48
48
  readonly default: "50px";
49
49
  readonly text: "200px";
50
- readonly sheet: "230px";
50
+ readonly sheet: "165px";
51
51
  };
52
52
  readonly payment_initiated: {
53
53
  readonly default: "150px";
@@ -92,7 +92,7 @@ export declare const refundTableCellWidth: {
92
92
  readonly amount: {
93
93
  readonly default: "195px";
94
94
  readonly text: "195px";
95
- readonly sheet: "150px";
95
+ readonly sheet: "180px";
96
96
  };
97
97
  readonly payouts: {
98
98
  readonly default: "195px";
@@ -47,7 +47,7 @@ export const refundTableCellWidth = {
47
47
  payment_agreement: {
48
48
  default: '50px',
49
49
  text: '200px',
50
- sheet: '230px',
50
+ sheet: '165px',
51
51
  },
52
52
  payment_initiated: {
53
53
  default: '150px',
@@ -92,7 +92,7 @@ export const refundTableCellWidth = {
92
92
  amount: {
93
93
  default: '195px',
94
94
  text: '195px',
95
- sheet: '150px',
95
+ sheet: '180px',
96
96
  },
97
97
  payouts: {
98
98
  default: '195px',
@@ -4,10 +4,10 @@ export function removeUndefinedValues(obj) {
4
4
  export function removeUndefinedArrayValues(obj) {
5
5
  return Object.fromEntries(Object.entries(obj).filter(([, value]) => {
6
6
  if (Array.isArray(value)) {
7
- return value.length > 0 && (value === null || value === void 0 ? void 0 : value.some((v) => !!v));
7
+ return value.length > 0 && (value === null || value === void 0 ? void 0 : value.some((v) => v !== undefined && v !== null && v !== ''));
8
8
  }
9
9
  if (typeof value === 'object') {
10
- return Object.values(value || {}).some((v) => !!v);
10
+ return Object.values(value || {}).some((v) => v !== undefined && v !== null && v !== '');
11
11
  }
12
12
  return !!value;
13
13
  }));
@@ -31,6 +31,10 @@ export const getSelectionStyles = ({ isSelected, isCellSelected, isColumnSelecte
31
31
  const getRowSelectionStyles = () => ({
32
32
  backgroundColor: SELECTION_COLORS.background,
33
33
  color: SELECTION_COLORS.primary,
34
+ border: 'none',
35
+ '&:before': {
36
+ border: 'none',
37
+ },
34
38
  });
35
39
  const getSingleCellSelectionStyles = () => ({
36
40
  border: `${BORDER_STYLES.thin} solid ${SELECTION_COLORS.primary}`,
package/package.json CHANGED
@@ -1,139 +1,139 @@
1
- {
2
- "name": "@tap-payments/os-micro-frontend-shared",
3
- "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.1.99",
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:local": "yarn ts:build && yalc publish --push",
64
- "push": "npm run ts:build && npm publish --access public",
65
- "push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
66
- "dev": "vite",
67
- "build": "tsc -b && vite build ",
68
- "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
69
- "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
70
- "lint": "eslint . --color",
71
- "lint:fix": "eslint src --fix --color",
72
- "preview": "vite preview",
73
- "prepare": "husky"
74
- },
75
- "dependencies": {
76
- "@emotion/react": "^11.11.0",
77
- "@emotion/styled": "^11.11.0",
78
- "@hookform/resolvers": "^3.3.1",
79
- "@mui/material": "^5.12.3",
80
- "@uiw/react-json-view": "^2.0.0-alpha.16",
81
- "axios": "^1.4.0",
82
- "color": "^5.0.0",
83
- "dayjs": "^1.11.8",
84
- "framer-motion": "10.11.0",
85
- "i18next": "^22.4.15",
86
- "memoize-one": "^6.0.0",
87
- "re-resizable": "^6.9.9",
88
- "react": "^18.2.0",
89
- "react-colorful": "^5.6.1",
90
- "react-currency-input-field": "^3.6.11",
91
- "react-dom": "^18.2.0",
92
- "react-draggable": "^4.4.6",
93
- "react-dropzone": "^14.2.3",
94
- "react-hook-form": "^7.45.4",
95
- "react-hot-toast": "^2.4.1",
96
- "react-i18next": "^12.2.2",
97
- "react-lazy-load-image-component": "^1.6.3",
98
- "react-multi-date-picker": "^4.1.2",
99
- "react-router-dom": "^7.7.0",
100
- "react-virtualized-auto-sizer": "^1.0.20",
101
- "react-window": "^1.8.9",
102
- "react-window-infinite-loader": "^1.0.9",
103
- "react18-input-otp": "^1.1.4",
104
- "recharts": "^2.15.1"
105
- },
106
- "devDependencies": {
107
- "@eslint/js": "^9.17.0",
108
- "@testing-library/jest-dom": "^5.16.5",
109
- "@types/lodash": "^4.17.15",
110
- "@types/react": "^18.2.6",
111
- "@types/react-dom": "^18.3.5",
112
- "@types/react-lazy-load-image-component": "^1.6.4",
113
- "@types/react-virtualized-auto-sizer": "^1.0.8",
114
- "@types/react-window": "^1.8.5",
115
- "@types/react-window-infinite-loader": "^1.0.6",
116
- "@vitejs/plugin-react": "^4.3.4",
117
- "eslint": "^9.17.0",
118
- "eslint-plugin-react-hooks": "^5.0.0",
119
- "eslint-plugin-react-refresh": "^0.4.16",
120
- "globals": "^15.14.0",
121
- "husky": "^8.0.3",
122
- "lint-staged": "^13.2.2",
123
- "prettier": "^2.8.8",
124
- "tsc-alias": "^1.8.16",
125
- "typescript": "5.0.2",
126
- "typescript-eslint": "^8.18.2",
127
- "vite": "6.0.5",
128
- "vite-tsconfig-paths": "^4.2.0"
129
- },
130
- "lint-staged": {
131
- "src/**/*.{ts,tsx,json,js,jsx}": [
132
- "yarn run prettier:fix",
133
- "yarn run lint"
134
- ]
135
- },
136
- "publishConfig": {
137
- "registry": "https://registry.npmjs.org/"
138
- }
139
- }
1
+ {
2
+ "name": "@tap-payments/os-micro-frontend-shared",
3
+ "description": "Shared components and utilities for Tap Payments micro frontends",
4
+ "version": "0.1.101-test.5",
5
+ "testVersion": 5,
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:local": "yarn ts:build && yalc publish --push",
64
+ "push": "npm run ts:build && npm publish --access public",
65
+ "push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
66
+ "dev": "vite",
67
+ "build": "tsc -b && vite build ",
68
+ "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
69
+ "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
70
+ "lint": "eslint . --color",
71
+ "lint:fix": "eslint src --fix --color",
72
+ "preview": "vite preview",
73
+ "prepare": "husky"
74
+ },
75
+ "dependencies": {
76
+ "@emotion/react": "^11.11.0",
77
+ "@emotion/styled": "^11.11.0",
78
+ "@hookform/resolvers": "^3.3.1",
79
+ "@mui/material": "^5.12.3",
80
+ "@uiw/react-json-view": "^2.0.0-alpha.16",
81
+ "axios": "^1.4.0",
82
+ "color": "^5.0.0",
83
+ "dayjs": "^1.11.8",
84
+ "framer-motion": "10.11.0",
85
+ "i18next": "^22.4.15",
86
+ "memoize-one": "^6.0.0",
87
+ "re-resizable": "^6.9.9",
88
+ "react": "^18.2.0",
89
+ "react-colorful": "^5.6.1",
90
+ "react-currency-input-field": "^3.6.11",
91
+ "react-dom": "^18.2.0",
92
+ "react-draggable": "^4.4.6",
93
+ "react-dropzone": "^14.2.3",
94
+ "react-hook-form": "^7.45.4",
95
+ "react-hot-toast": "^2.4.1",
96
+ "react-i18next": "^12.2.2",
97
+ "react-lazy-load-image-component": "^1.6.3",
98
+ "react-multi-date-picker": "^4.1.2",
99
+ "react-router-dom": "^7.7.0",
100
+ "react-virtualized-auto-sizer": "^1.0.20",
101
+ "react-window": "^1.8.9",
102
+ "react-window-infinite-loader": "^1.0.9",
103
+ "react18-input-otp": "^1.1.4",
104
+ "recharts": "^2.15.1"
105
+ },
106
+ "devDependencies": {
107
+ "@eslint/js": "^9.17.0",
108
+ "@testing-library/jest-dom": "^5.16.5",
109
+ "@types/lodash": "^4.17.15",
110
+ "@types/react": "^18.2.6",
111
+ "@types/react-dom": "^18.3.5",
112
+ "@types/react-lazy-load-image-component": "^1.6.4",
113
+ "@types/react-virtualized-auto-sizer": "^1.0.8",
114
+ "@types/react-window": "^1.8.5",
115
+ "@types/react-window-infinite-loader": "^1.0.6",
116
+ "@vitejs/plugin-react": "^4.3.4",
117
+ "eslint": "^9.17.0",
118
+ "eslint-plugin-react-hooks": "^5.0.0",
119
+ "eslint-plugin-react-refresh": "^0.4.16",
120
+ "globals": "^15.14.0",
121
+ "husky": "^8.0.3",
122
+ "lint-staged": "^13.2.2",
123
+ "prettier": "^2.8.8",
124
+ "tsc-alias": "^1.8.16",
125
+ "typescript": "5.0.2",
126
+ "typescript-eslint": "^8.18.2",
127
+ "vite": "6.0.5",
128
+ "vite-tsconfig-paths": "^4.2.0"
129
+ },
130
+ "lint-staged": {
131
+ "src/**/*.{ts,tsx,json,js,jsx}": [
132
+ "yarn run prettier:fix",
133
+ "yarn run lint"
134
+ ]
135
+ },
136
+ "publishConfig": {
137
+ "registry": "https://registry.npmjs.org/"
138
+ }
139
+ }
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { StatusChipWithCopyProps } from '../StatusChipWithCopy';
3
- export interface AmountStatusChipProps extends StatusChipWithCopyProps {
4
- amount?: string;
5
- currency?: string;
6
- }
7
- declare function AmountStatusChip({ amount, currency, ...rest }: AmountStatusChipProps): import("react/jsx-runtime").JSX.Element;
8
- declare const _default: import("react").MemoExoticComponent<typeof AmountStatusChip>;
9
- export default _default;
@@ -1,20 +0,0 @@
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
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { memo } from 'react';
14
- import CurrencyIcon from '../CurrencyIcon';
15
- import { AmountLabel, CurrencyIconContainer, StyledAmountStatusChip } from './style';
16
- function AmountStatusChip(_a) {
17
- var { amount, currency } = _a, rest = __rest(_a, ["amount", "currency"]);
18
- return (_jsxs(StyledAmountStatusChip, Object.assign({ expandDirection: "left" }, rest, { children: [currency && (_jsx(AmountLabel, { children: _jsx(CurrencyIconContainer, { children: _jsx(CurrencyIcon, { currency: currency, fontSize: 10 }) }) })), amount] })));
19
- }
20
- export default memo(AmountStatusChip);
@@ -1,3 +0,0 @@
1
- import AmountStatusChip from './AmountStatusChip';
2
- export { type AmountStatusChipProps } from './AmountStatusChip';
3
- export default AmountStatusChip;
@@ -1,2 +0,0 @@
1
- import AmountStatusChip from './AmountStatusChip';
2
- export default AmountStatusChip;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const StyledAmountStatusChip: import("@emotion/styled").StyledComponent<import("../StatusChipWithCopy").StatusChipWithCopyProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
3
- export declare const AmountLabel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
- export declare const CurrencyIconContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -1,27 +0,0 @@
1
- import { styled } from '@mui/material/styles';
2
- import StatusChipWithCopy from '../StatusChipWithCopy';
3
- export const StyledAmountStatusChip = styled(StatusChipWithCopy)(() => ({
4
- backgroundColor: '#EFF1F2',
5
- border: 'none',
6
- display: 'flex',
7
- alignItems: 'center',
8
- justifyContent: 'center',
9
- transition: 'none !important',
10
- animation: 'none !important',
11
- transform: 'none !important',
12
- '& *': {
13
- transition: 'none !important',
14
- animation: 'none !important',
15
- transform: 'none !important',
16
- },
17
- }));
18
- export const AmountLabel = styled('span')(() => ({
19
- marginRight: '2px',
20
- display: 'flex',
21
- alignItems: 'center',
22
- }));
23
- export const CurrencyIconContainer = styled('span')(() => ({
24
- marginInline: '1.5px',
25
- display: 'flex',
26
- alignItems: 'center',
27
- }));