@tap-payments/os-micro-frontend-shared 0.1.97-test.102 → 0.1.97-test.105
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/SheetViewVirtualTable.js +1 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/PinnedColumn.js +2 -2
- package/build/components/VirtualTables/optimization/AnimationOptimizations.d.ts +2 -3
- package/build/components/VirtualTables/optimization/AnimationOptimizations.js +1 -1
- package/package.json +2 -2
|
@@ -70,6 +70,7 @@ function SheetViewVirtualTable({ columns, rows, threshold = SHEET_VIEW_TABLE_THR
|
|
|
70
70
|
const createPinnedStartTable = useCallback((columnsData, fixedWidth) => (_jsx(VirtualTable, Object.assign({ columnsData: columnsData }, stableTableProps, dynamicTableProps, { isPinned: true, fixedWidth: fixedWidth, onScroll: scrollHandlers.start, listRef: pinnedStartVirtualListRef }), "pinned-start")), [stableTableProps, dynamicTableProps, scrollHandlers.start, pinnedStartVirtualListRef]);
|
|
71
71
|
const createPinnedEndTable = useCallback((columnsData, fixedWidth) => (_jsx(VirtualTable, Object.assign({ columnsData: columnsData }, stableTableProps, dynamicTableProps, { isPinned: true, fixedWidth: fixedWidth, onScroll: scrollHandlers.end, listRef: pinnedEndVirtualListRef }), "pinned-end")), [stableTableProps, dynamicTableProps, scrollHandlers.end, pinnedEndVirtualListRef]);
|
|
72
72
|
const createScrollableTable = useCallback((columnsData) => (_jsx(VirtualTable, Object.assign({ columnsData: columnsData }, stableTableProps, dynamicTableProps, { isPinned: false, onScroll: scrollHandlers.scrollable, listRef: scrollableVirtualListRef }), "scrollable")), [stableTableProps, dynamicTableProps, scrollHandlers.scrollable, scrollableVirtualListRef]);
|
|
73
|
+
console.log({ selectedCell, selectedColumn, selectedRow, selectedChip });
|
|
73
74
|
const createVirtualTableContainer = useCallback((columnsData, containerKey, isPinned = false, fixedWidth) => {
|
|
74
75
|
switch (containerKey) {
|
|
75
76
|
case 'pinnedStart':
|
|
@@ -7,8 +7,6 @@ import SheetViewTableHeader from './SheetViewTableHeader';
|
|
|
7
7
|
import SheetViewTableLoading from './SheetViewTableLoading';
|
|
8
8
|
function PinnedColumn({ position, columnsData, columnsWidth, pinnedColumnsList, showHeader, columnsSorting, onColumnSort, headerProps, showBackDrop, onColumnPin, isPinnable, lastColumnId, selectedColumn, onColumnClick, hasPinnedStart, hasPinnedEnd, tableTitle, areAllRowsLoaded, isFetchingNextPage, scrollToIndex, isLoading, isError, hasTimeoutError, tableMode, showNoDataView, tableLoading, createVirtualTableContainer, }) {
|
|
9
9
|
const theme = useTheme();
|
|
10
|
-
if (columnsData.length === 0)
|
|
11
|
-
return null;
|
|
12
10
|
const { Wrapper, containerKey } = useMemo(() => {
|
|
13
11
|
const key = position === 'start' ? 'pinnedStart' : 'pinnedEnd';
|
|
14
12
|
return {
|
|
@@ -16,6 +14,8 @@ function PinnedColumn({ position, columnsData, columnsWidth, pinnedColumnsList,
|
|
|
16
14
|
containerKey: key,
|
|
17
15
|
};
|
|
18
16
|
}, [position]);
|
|
17
|
+
if (columnsData.length === 0)
|
|
18
|
+
return null;
|
|
19
19
|
return (_jsx(Wrapper, { children: _jsxs(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 }, { children: [showHeader && (_jsx(SheetViewTableHeader, { "data-testid": "SheetViewVirtualTable_PinnedTableHeader", columnsSorting: columnsSorting, onColumnSort: onColumnSort, columns: columnsData, headerProps: headerProps, showBackDrop: showBackDrop, pinnedColumns: pinnedColumnsList, onColumnPin: onColumnPin, isPinnable: isPinnable, lastColumnId: lastColumnId, selectedColumn: selectedColumn, onColumnClick: onColumnClick, tablePosition: position === 'start' ? 'pinnedStart' : 'pinnedEnd', hasPinnedStart: hasPinnedStart, hasPinnedEnd: hasPinnedEnd })), _jsx(TableWrapper, Object.assign({ "data-testid": "VirtualTable_TableWrapper", sx: {
|
|
20
20
|
width: '100%',
|
|
21
21
|
minWidth: 'fit-content',
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const useAnimationOptimization: (isAnimating: boolean) => ((callback: () => void) => void) | null;
|
|
3
|
-
export declare const OptimizedAnimatedCell: import("react").MemoExoticComponent<({ children,
|
|
4
|
-
[key: string]:
|
|
3
|
+
export declare const OptimizedAnimatedCell: import("react").MemoExoticComponent<({ children, ...props }: {
|
|
4
|
+
[key: string]: unknown;
|
|
5
5
|
children: React.ReactNode;
|
|
6
|
-
isAnimating: boolean;
|
|
7
6
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
8
7
|
export declare const animationStyles: {
|
|
9
8
|
slideIn: {
|
|
@@ -38,7 +38,7 @@ export const useAnimationOptimization = (isAnimating) => {
|
|
|
38
38
|
return throttledUpdate;
|
|
39
39
|
};
|
|
40
40
|
export const OptimizedAnimatedCell = memo((_a) => {
|
|
41
|
-
var { children
|
|
41
|
+
var { children } = _a, props = __rest(_a, ["children"]);
|
|
42
42
|
return (_jsx("div", Object.assign({ style: optimizedCellStyles }, props, { children: children })));
|
|
43
43
|
}, (prevProps, nextProps) => {
|
|
44
44
|
return prevProps.isAnimating === nextProps.isAnimating && prevProps.children === nextProps.children;
|
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.97-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.97-test.105",
|
|
5
|
+
"testVersion": 105,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|