@tap-payments/os-micro-frontend-shared 0.1.65-test.1-test.2 → 0.1.65-test.1

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.
@@ -11,7 +11,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
11
  import { memo } from 'react';
12
12
  import InfiniteLoader from 'react-window-infinite-loader';
13
13
  import AutoSizer from 'react-virtualized-auto-sizer';
14
- import { TABLE_LIST_OVER_SCAN } from '../../../../constants/index.js';
14
+ import { SHEET_VIEW_TABLE_LIST_OVER_SCAN } from '../../../../constants/index.js';
15
15
  import ListItemWrapper from '../../components/virtualScroll/ListItemWrapper';
16
16
  import { StyledVirtualList } from '../../components/style';
17
17
  function VirtualTable({ columnsData, itemCount, lastItemIndex, areAllRowsLoaded, loadMoreItems, threshold, getItemSize, getItemData, isPinned, fixedWidth, scrollToIndex, areTotalRowsNotFillingHeight, clearBackdropVisibilityTimeout, onScroll, setBackdropVisibility, listRef, }) {
@@ -23,7 +23,7 @@ function VirtualTable({ columnsData, itemCount, lastItemIndex, areAllRowsLoaded,
23
23
  return (_jsx(InfiniteLoader, Object.assign({ isItemLoaded: (index) => index !== lastItemIndex, itemCount: itemCount, loadMoreItems: handleOnLoadMoreItems, threshold: threshold }, { children: ({ onItemsRendered, ref }) => (_jsx(AutoSizer, Object.assign({ ref: ref }, { children: ({ height, width }) => {
24
24
  const itemSize = (index) => getItemSize(index, height);
25
25
  const itemData = getItemData(columnsData, isPinned, height);
26
- return (_jsx(StyledVirtualList, Object.assign({ listRef: listRef, height: height, width: fixedWidth || width, itemCount: itemCount, itemSize: itemSize, itemData: itemData, onItemsRendered: onItemsRendered, overscanCount: TABLE_LIST_OVER_SCAN, setBackdropVisibility: setBackdropVisibility, scrollToIndex: scrollToIndex, areTotalRowsNotFillingHeight: areTotalRowsNotFillingHeight, useIsScrolling: true, onScroll: onScroll, clearBackdropVisibilityTimeout: clearBackdropVisibilityTimeout, style: {
26
+ return (_jsx(StyledVirtualList, Object.assign({ listRef: listRef, height: height, width: fixedWidth || width, itemCount: itemCount, itemSize: itemSize, itemData: itemData, onItemsRendered: onItemsRendered, overscanCount: SHEET_VIEW_TABLE_LIST_OVER_SCAN, setBackdropVisibility: setBackdropVisibility, scrollToIndex: scrollToIndex, areTotalRowsNotFillingHeight: areTotalRowsNotFillingHeight, useIsScrolling: true, onScroll: onScroll, clearBackdropVisibilityTimeout: clearBackdropVisibilityTimeout, style: {
27
27
  overflowX: isPinned ? 'hidden' : 'auto',
28
28
  paddingBottom: isPinned ? '25px' : '13px',
29
29
  backgroundColor: isPinned ? 'transparent' : '#F6F8FACC',
@@ -5,6 +5,8 @@ export const useSynchronizedScroll = () => {
5
5
  const pinnedEndVirtualListRef = useRef(null);
6
6
  const isScrollingSyncRef = useRef(false);
7
7
  const handleScroll = useCallback(({ scrollOffset }, source) => {
8
+ if (isScrollingSyncRef.current)
9
+ return;
8
10
  isScrollingSyncRef.current = true;
9
11
  if (source !== 'start' && pinnedStartVirtualListRef.current) {
10
12
  pinnedStartVirtualListRef.current.scrollTo(scrollOffset);
@@ -3,4 +3,5 @@ export declare const TABLE_CONTENT_ROW_HEIGHT = 70;
3
3
  export declare const TABLE_ROW_HEIGHT = 57;
4
4
  export declare const TABLE_THRESHOLD = 200;
5
5
  export declare const TABLE_LIST_OVER_SCAN = 5;
6
+ export declare const SHEET_VIEW_TABLE_LIST_OVER_SCAN = 100;
6
7
  export declare const SHEET_VIEW_TABLE_ROW_HEIGHT = 28;
@@ -3,4 +3,5 @@ export const TABLE_CONTENT_ROW_HEIGHT = 70;
3
3
  export const TABLE_ROW_HEIGHT = 57;
4
4
  export const TABLE_THRESHOLD = 200;
5
5
  export const TABLE_LIST_OVER_SCAN = 5;
6
+ export const SHEET_VIEW_TABLE_LIST_OVER_SCAN = 100;
6
7
  export const SHEET_VIEW_TABLE_ROW_HEIGHT = 28;
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.65-test.1-test.2",
5
- "testVersion": 2,
4
+ "version": "0.1.65-test.1",
5
+ "testVersion": 1,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",