@tap-payments/os-micro-frontend-shared 0.1.96-test.2 → 0.1.96-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.
package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.d.ts
CHANGED
|
@@ -11,6 +11,6 @@ interface ISheetViewTableLoadingProps {
|
|
|
11
11
|
containerHeight?: number;
|
|
12
12
|
isCompact?: boolean;
|
|
13
13
|
}
|
|
14
|
-
declare function SheetViewTableLoading({ columns, isLoaded, animationType,
|
|
14
|
+
declare function SheetViewTableLoading({ columns, isLoaded, animationType, isPinned, containerHeight }: ISheetViewTableLoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
declare const _default: import("react").MemoExoticComponent<typeof SheetViewTableLoading>;
|
|
16
16
|
export default _default;
|
package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.js
CHANGED
|
@@ -11,11 +11,11 @@ const Wrapper = styled('section')(({ isLoaded = false, isPinned = false }) => ({
|
|
|
11
11
|
filter: isLoaded && !isPinned ? 'blur(8px)' : 'none',
|
|
12
12
|
marginTop: isLoaded && !isPinned ? '1rem' : '0',
|
|
13
13
|
}));
|
|
14
|
-
function SheetViewTableLoading({ columns, isLoaded = false, animationType,
|
|
14
|
+
function SheetViewTableLoading({ columns, isLoaded = false, animationType, isPinned = false, containerHeight }) {
|
|
15
15
|
const availableHeight = containerHeight || window.innerHeight * 0.8;
|
|
16
16
|
const rowHeight = getSheetViewRowHeight();
|
|
17
17
|
const maxAllowedRows = calculateSheetViewMaxRows(availableHeight, rowHeight);
|
|
18
|
-
console.log({ maxAllowedRows, availableHeight, rowHeight,
|
|
18
|
+
console.log({ maxAllowedRows, availableHeight, rowHeight, containerHeight });
|
|
19
19
|
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_')}`))) })));
|
|
20
20
|
}
|
|
21
21
|
export default memo(SheetViewTableLoading);
|
package/build/utils/table.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { walletDetailsTableCellWidth, authenticationsTableCellWidth, authorizationTableCellWidth, chargeTableCellWidth, destinationsTableCellWidth, intentsTableCellWidth, invoicesTableCellWidth, leadsTableCellWidth, ordersTableCellWidth, payoutsTableCellWidth, protectChargesTableCellWidth, protectAuthorizationsTableCellWidth, refundTableCellWidth, tokensTableCellWidth, walletStatementTableCellWidth, topupsTableCellWidth, walletTableCellWidth, TABLE_CONTENT_ROW_HEIGHT, TABLE_LOADING_ROW_HEIGHT, TABLE_ROW_HEIGHT, merchantsTableCellWidth, terminalsTableCellWidth, } from '../constants/index.js';
|
|
1
|
+
import { walletDetailsTableCellWidth, authenticationsTableCellWidth, authorizationTableCellWidth, chargeTableCellWidth, destinationsTableCellWidth, intentsTableCellWidth, invoicesTableCellWidth, leadsTableCellWidth, ordersTableCellWidth, payoutsTableCellWidth, protectChargesTableCellWidth, protectAuthorizationsTableCellWidth, refundTableCellWidth, tokensTableCellWidth, walletStatementTableCellWidth, topupsTableCellWidth, walletTableCellWidth, TABLE_CONTENT_ROW_HEIGHT, TABLE_LOADING_ROW_HEIGHT, TABLE_ROW_HEIGHT, merchantsTableCellWidth, terminalsTableCellWidth, SHEET_VIEW_TABLE_ROW_HEIGHT, } from '../constants/index.js';
|
|
2
2
|
export const getColumnWidthPercentage = (widthInPx, options) => {
|
|
3
3
|
const { isFirst, isLast } = options || {};
|
|
4
4
|
const paddingInPx = isFirst || isLast ? 0 : 0;
|
|
@@ -94,7 +94,7 @@ export const isSheetViewScrollable = (totalRows, containerHeight, rowHeight = TA
|
|
|
94
94
|
return contentHeight > containerHeight;
|
|
95
95
|
};
|
|
96
96
|
export const getSheetViewRowHeight = () => {
|
|
97
|
-
const baseRowHeight =
|
|
97
|
+
const baseRowHeight = SHEET_VIEW_TABLE_ROW_HEIGHT;
|
|
98
98
|
return baseRowHeight * 0.8;
|
|
99
99
|
};
|
|
100
100
|
export const calculateSheetViewOptimalHeight = (totalRows, tableType, maxHeightPercentage = 0.8) => {
|
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.96-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.96-test.3",
|
|
5
|
+
"testVersion": 3,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|