@tap-payments/os-micro-frontend-shared 0.1.128-test.2 → 0.1.128-test.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -17,6 +17,7 @@ export const useTableState = () => {
|
|
|
17
17
|
}
|
|
18
18
|
setSelectedChip(chipKey);
|
|
19
19
|
setSelectedCell(cellKey);
|
|
20
|
+
setSelectedColumn(null);
|
|
20
21
|
setSelectedRow(null);
|
|
21
22
|
}, [selectedChip, setSelectedChip, setSelectedCell, setSelectedRow]);
|
|
22
23
|
const handleCellClick = useCallback((rowIndex, columnIndex, event, pinnedType) => {
|
|
@@ -46,9 +46,9 @@ function TableRow({ row, columns, index, rowProps, isSheetView, selectedCell = n
|
|
|
46
46
|
const effectiveLast = isLastColumn && column.pinned !== 'end';
|
|
47
47
|
const rowSelectionBorderStyles = isRowSelected
|
|
48
48
|
? getRowSelectionBorderStyles({
|
|
49
|
-
effectiveFirst,
|
|
50
49
|
isPinnedStart: column.pinned === 'start',
|
|
51
50
|
isPinnedEnd: column.pinned === 'end',
|
|
51
|
+
isFirstColumn,
|
|
52
52
|
})
|
|
53
53
|
: {};
|
|
54
54
|
const isIndexColumn = column.pinned === 'start' && effectiveFirst;
|
package/build/utils/style.d.ts
CHANGED
|
@@ -14,9 +14,9 @@ interface GetSelectionStylesParams {
|
|
|
14
14
|
type SelectionStyles = Record<string, string | Record<string, string>>;
|
|
15
15
|
export declare const getSelectionStyles: ({ isSelected, isCellSelected, isColumnSelected, isRowSelected, isLastRow, }: GetSelectionStylesParams) => SelectionStyles;
|
|
16
16
|
interface GetRowSelectionBorderStylesParams {
|
|
17
|
-
effectiveFirst: boolean;
|
|
18
17
|
isPinnedStart: boolean;
|
|
19
18
|
isPinnedEnd: boolean;
|
|
19
|
+
isFirstColumn: boolean;
|
|
20
20
|
}
|
|
21
|
-
export declare const getRowSelectionBorderStyles: ({
|
|
21
|
+
export declare const getRowSelectionBorderStyles: ({ isPinnedStart, isPinnedEnd, isFirstColumn }: GetRowSelectionBorderStylesParams) => SelectionStyles;
|
|
22
22
|
export {};
|
package/build/utils/style.js
CHANGED
|
@@ -59,9 +59,9 @@ const getBorderWidthForColumn = () => {
|
|
|
59
59
|
const getBorderBottomForColumn = (isLastRow) => {
|
|
60
60
|
return isLastRow ? `${BORDER_STYLES.thick} solid ${SELECTION_COLORS.primary}` : `${BORDER_STYLES.thin} solid ${SELECTION_COLORS.border}`;
|
|
61
61
|
};
|
|
62
|
-
export const getRowSelectionBorderStyles = ({
|
|
62
|
+
export const getRowSelectionBorderStyles = ({ isPinnedStart, isPinnedEnd, isFirstColumn }) => ({
|
|
63
63
|
borderTop: `${BORDER_STYLES.thin} solid ${SELECTION_COLORS.primary}`,
|
|
64
64
|
borderBottom: `${BORDER_STYLES.thin} solid ${SELECTION_COLORS.primary}`,
|
|
65
65
|
borderRight: `${BORDER_STYLES.thin} solid ${isPinnedEnd ? SELECTION_COLORS.primary : 'none'}`,
|
|
66
|
-
borderLeft: `${BORDER_STYLES.thin} solid ${isPinnedStart &&
|
|
66
|
+
borderLeft: `${BORDER_STYLES.thin} solid ${isPinnedStart && isFirstColumn ? SELECTION_COLORS.primary : 'transparent'}`,
|
|
67
67
|
});
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
3
|
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.1.128-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.128-test.3",
|
|
5
|
+
"testVersion": 3,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|