@tap-payments/os-micro-frontend-shared 0.1.48 → 0.1.50
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/build/components/VirtualTables/components/TableRow.js +1 -1
- package/build/constants/table/cell/authorizationTableCellWidth.d.ts +5 -0
- package/build/constants/table/cell/authorizationTableCellWidth.js +5 -0
- package/build/constants/table/cell/chargeTableCellWidth.d.ts +5 -0
- package/build/constants/table/cell/chargeTableCellWidth.js +5 -0
- package/build/constants/table/cell/destinationsTableCellWidth.d.ts +5 -0
- package/build/constants/table/cell/destinationsTableCellWidth.js +5 -0
- package/build/constants/table/cell/refundTableCellWidth.d.ts +5 -0
- package/build/constants/table/cell/refundTableCellWidth.js +5 -0
- package/build/utils/columns.d.ts +2 -2
- package/build/utils/columns.js +3 -4
- package/package.json +1 -1
|
@@ -46,7 +46,7 @@ function TableRow({ row, columns, index, rowProps, isSheetView, selectedCell = n
|
|
|
46
46
|
}
|
|
47
47
|
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: effectiveFirst, isLast: effectiveLast, onClick: (event) => {
|
|
48
48
|
onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(index, colIndex, event, column.pinned);
|
|
49
|
-
}, 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 }, { children: _jsx(Box, Object.assign({ sx:
|
|
49
|
+
}, 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 }, { children: isSheetView ? (_jsx(Box, Object.assign({ sx: { position: 'relative', zIndex: 1 } }, { children: renderCell(column, index, colIndex) }))) : (_jsx(_Fragment, { children: renderCell(column, index, colIndex) })) }), `${column.id}-${colIndex}`));
|
|
50
50
|
}) })), [columns, row, index, selectedCell, selectedColumn, onCellClick, isLastRow, selectedChip, isSheetView]);
|
|
51
51
|
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));
|
|
52
52
|
}
|
package/build/utils/columns.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ export declare function filterShownColumns<T>(columns: Array<IColumnProps<T & {
|
|
|
9
9
|
export declare function isParameterSelected(columns: ColumnViewProps[], columnId: string, parameter: string): boolean;
|
|
10
10
|
export declare function mapDataToViews(columnData?: ColumnsView[], language?: string): ColumnViewProps[];
|
|
11
11
|
export declare function mapViewsToData(columns: ColumnViewProps[]): ColumnsView[];
|
|
12
|
-
export declare const updateColumnSelection: ({ columnsViewData,
|
|
12
|
+
export declare const updateColumnSelection: ({ columnsViewData, columnsName, selected, }: {
|
|
13
13
|
columnsViewData: ColumnsView[];
|
|
14
|
-
|
|
14
|
+
columnsName: string[];
|
|
15
15
|
selected: boolean;
|
|
16
16
|
}) => ColumnsView[];
|
package/build/utils/columns.js
CHANGED
|
@@ -65,11 +65,10 @@ export function mapViewsToData(columns) {
|
|
|
65
65
|
};
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
export const updateColumnSelection = ({ columnsViewData,
|
|
68
|
+
export const updateColumnSelection = ({ columnsViewData, columnsName, selected, }) => {
|
|
69
69
|
return columnsViewData.map((column) => {
|
|
70
|
-
var _a
|
|
71
|
-
|
|
72
|
-
if (columnText === columnName.toLowerCase()) {
|
|
70
|
+
var _a;
|
|
71
|
+
if (columnsName.includes((_a = column.name[0]) === null || _a === void 0 ? void 0 : _a.text)) {
|
|
73
72
|
return Object.assign(Object.assign({}, column), { selected });
|
|
74
73
|
}
|
|
75
74
|
return column;
|
package/package.json
CHANGED