@tap-payments/os-micro-frontend-shared 0.0.312 → 0.1.1-test.54
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/JSONViewer/JSONViewer.js +1 -1
- package/build/components/MultiSelectDropdownButton/MultiSelectDropdownButton.js +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.js +87 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/LoadingState.d.ts +34 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/LoadingState.js +37 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/NoDataState.d.ts +34 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/NoDataState.js +21 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/PinnedColumnSection.d.ts +32 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/PinnedColumnSection.js +16 -0
- package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/components/SheetViewTableHeader/SheetViewTableHeader.d.ts +2 -1
- package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/components/SheetViewTableHeader/SheetViewTableHeader.js +2 -2
- package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/components/SheetViewTableHeader/TableCell.d.ts +2 -2
- package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/components/SheetViewTableHeader/TableCell.js +7 -15
- package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/components/SheetViewTableHeader/type.d.ts +2 -1
- package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/components/SheetViewTableNoData.js +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/components/VirtualListContainer.d.ts +31 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/VirtualListContainer.js +71 -0
- package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/hooks/usePinnedColumns.d.ts +4 -0
- package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/hooks/usePinnedColumns.js +18 -8
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useSelection.d.ts +6 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useSelection.js +17 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useTableDisplayState.d.ts +9 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useTableDisplayState.js +20 -0
- package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/style.js +0 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/utils.d.ts +2 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/utils.js +6 -0
- package/build/components/{VirtualTable → VirtualTables/VirtualTable}/VirtualTable.d.ts +1 -1
- package/build/components/{VirtualTable → VirtualTables/VirtualTable}/VirtualTable.js +9 -9
- package/build/components/{VirtualTable → VirtualTables/VirtualTableWithCard}/VirtualTableWithCard.d.ts +1 -1
- package/build/components/{VirtualTable → VirtualTables/VirtualTableWithCard}/VirtualTableWithCard.js +7 -7
- package/build/components/{VirtualTable → VirtualTables}/components/ColumnSort/ColumnSort.js +1 -1
- package/build/components/{VirtualTable → VirtualTables}/components/TableHeader/components/TableCell/TableCell.d.ts +1 -1
- package/build/components/{VirtualTable → VirtualTables}/components/TableHeader/components/TableCell/TableCell.js +3 -3
- package/build/components/{VirtualTable → VirtualTables}/components/TableLoadingWithCard.d.ts +2 -3
- package/build/components/{VirtualTable → VirtualTables}/components/TableNoData.js +1 -1
- package/build/components/{VirtualTable → VirtualTables}/components/TableNoDataWithCard.d.ts +3 -4
- package/build/components/{VirtualTable → VirtualTables}/components/TableNoDataWithCard.js +1 -1
- package/build/components/{VirtualTable → VirtualTables}/components/TableRow.js +3 -3
- package/build/components/{VirtualTable → VirtualTables}/components/TableRowLoadingWithCard.d.ts +2 -3
- package/build/components/{VirtualTable → VirtualTables}/components/TableRowWithCard.d.ts +2 -3
- package/build/components/{VirtualTable → VirtualTables}/components/TableRowWithCard.js +1 -1
- package/build/components/{VirtualTable → VirtualTables/components}/style.js +9 -12
- package/build/components/{VirtualTable/utils/getSelectionStyles.d.ts → VirtualTables/components/utils.d.ts} +0 -11
- package/build/components/{VirtualTable/utils/getSelectionStyles.js → VirtualTables/components/utils.js} +1 -8
- package/build/components/{VirtualTable → VirtualTables}/components/virtualScroll/ListItemWrapper.js +2 -2
- package/build/components/VirtualTables/index.d.ts +6 -0
- package/build/components/VirtualTables/index.js +6 -0
- package/build/components/index.d.ts +2 -2
- package/build/components/index.js +2 -2
- package/build/types/table.d.ts +1 -1
- package/package.json +3 -3
- package/build/components/VirtualTable/SheetView/SheetViewVirtualTable.js +0 -194
- package/build/components/VirtualTable/index.d.ts +0 -6
- package/build/components/VirtualTable/index.js +0 -6
- package/build/playground/VTDemo.d.ts +0 -1
- package/build/playground/VTDemo.js +0 -58
- package/build/playground/index.d.ts +0 -1
- package/build/playground/index.js +0 -1
- /package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/SheetViewVirtualTable.d.ts +0 -0
- /package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/components/SheetViewTableHeader/index.d.ts +0 -0
- /package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/components/SheetViewTableHeader/index.js +0 -0
- /package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/components/SheetViewTableHeader/type.js +0 -0
- /package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/components/SheetViewTableLoading.d.ts +0 -0
- /package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/components/SheetViewTableLoading.js +0 -0
- /package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/components/SheetViewTableNoData.d.ts +0 -0
- /package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/components/SheetViewTableRowLoading.d.ts +0 -0
- /package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/components/SheetViewTableRowLoading.js +0 -0
- /package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/components/index.d.ts +0 -0
- /package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/components/index.js +0 -0
- /package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/hooks/useSynchronizedScroll.d.ts +0 -0
- /package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/hooks/useSynchronizedScroll.js +0 -0
- /package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/index.d.ts +0 -0
- /package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/index.js +0 -0
- /package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/style.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/ColumnFilter.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/ColumnFilter.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/Inputs/Inputs.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/Inputs/Inputs.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/Inputs/index.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/Inputs/index.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/Inputs/style.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/Inputs/style.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/List/List.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/List/List.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/List/index.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/List/index.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/index.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/index.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/style.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/style.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/type.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnFilter/type.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnSort/ColumnSort.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnSort/index.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnSort/index.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnSort/style.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ColumnSort/style.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/EmptyList/EmptyList.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/EmptyList/EmptyList.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/EmptyList/index.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/EmptyList/index.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/EmptyList/styles.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/EmptyList/styles.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ErrorList/ErrorList.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ErrorList/ErrorList.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ErrorList/index.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ErrorList/index.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ErrorList/styles.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/ErrorList/styles.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/RowErrorState.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/RowErrorState.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableError.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableError.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableFooter/TableFooter.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableFooter/TableFooter.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableFooter/index.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableFooter/index.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableFooter/style.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableFooter/style.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableHeader/TableHeader.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableHeader/TableHeader.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableHeader/components/TableCell/index.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableHeader/components/TableCell/index.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableHeader/components/index.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableHeader/components/index.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableHeader/constant.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableHeader/constant.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableHeader/index.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableHeader/index.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableHeader/style.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableHeader/style.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableHeader/type.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableHeader/type.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableLastItem.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableLastItem.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableLoading.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableLoading.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableLoadingWithCard.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableNoData.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableRow.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableRowLoading.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableRowLoading.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/TableRowLoadingWithCard.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/index.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/index.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables/components}/style.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/virtualScroll/ListItemWrapper.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/virtualScroll/ListItemWrapperWithCard.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/virtualScroll/ListItemWrapperWithCard.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/virtualScroll/VirtualScrollInner.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/virtualScroll/VirtualScrollInner.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/virtualScroll/VirtualScrollList.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/virtualScroll/VirtualScrollList.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/virtualScroll/VirtualScrollOuter.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/virtualScroll/VirtualScrollOuter.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/virtualScroll/index.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/components/virtualScroll/index.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/context/Provider.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/context/Provider.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/context/context.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/context/context.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/context/index.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/context/index.js +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/hooks/useScrollBackShadow.d.ts +0 -0
- /package/build/components/{VirtualTable → VirtualTables}/hooks/useScrollBackShadow.js +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useCallback, useState } from 'react';
|
|
2
|
+
export function useSelection() {
|
|
3
|
+
const [selectedCell, setSelectedCell] = useState(null);
|
|
4
|
+
const [selectedColumn, setSelectedColumn] = useState(null);
|
|
5
|
+
const handleCellClick = useCallback((rowIndex, columnId, event) => {
|
|
6
|
+
event.stopPropagation();
|
|
7
|
+
const cellKey = `${rowIndex}-${columnId}`;
|
|
8
|
+
setSelectedCell((prev) => (prev === cellKey ? null : cellKey));
|
|
9
|
+
setSelectedColumn(null);
|
|
10
|
+
}, []);
|
|
11
|
+
const handleColumnClick = useCallback((columnId, event) => {
|
|
12
|
+
event.stopPropagation();
|
|
13
|
+
setSelectedColumn((prev) => (prev === columnId ? null : columnId));
|
|
14
|
+
setSelectedCell(null);
|
|
15
|
+
}, []);
|
|
16
|
+
return { selectedCell, selectedColumn, handleCellClick, handleColumnClick };
|
|
17
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function useTableDisplayState(rowsLength: number, isLoading?: boolean, error?: unknown): {
|
|
2
|
+
isError: boolean;
|
|
3
|
+
tableLoading: boolean;
|
|
4
|
+
tableError: boolean;
|
|
5
|
+
tableEmpty: boolean;
|
|
6
|
+
hasTimeoutError: boolean;
|
|
7
|
+
areTotalRowsNotFillingHeight: boolean;
|
|
8
|
+
showNoDataView: boolean;
|
|
9
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { isHeightNotFullyFilledByRows, isNotFoundError, isTimeoutError, hasError } from '../../../../utils/index.js';
|
|
2
|
+
export function useTableDisplayState(rowsLength, isLoading, error) {
|
|
3
|
+
var _a;
|
|
4
|
+
const isError = hasError((_a = error) !== null && _a !== void 0 ? _a : null);
|
|
5
|
+
const tableLoading = isLoading !== null && isLoading !== void 0 ? isLoading : true;
|
|
6
|
+
const tableError = !isLoading && rowsLength === 0 && isError && !isNotFoundError(error);
|
|
7
|
+
const tableEmpty = !isLoading && rowsLength === 0;
|
|
8
|
+
const hasTimeoutError = isTimeoutError(error);
|
|
9
|
+
const areTotalRowsNotFillingHeight = isHeightNotFullyFilledByRows(rowsLength) && !tableLoading;
|
|
10
|
+
const showNoDataView = tableLoading || tableError || tableEmpty || hasTimeoutError;
|
|
11
|
+
return {
|
|
12
|
+
isError,
|
|
13
|
+
tableLoading,
|
|
14
|
+
tableError,
|
|
15
|
+
tableEmpty,
|
|
16
|
+
hasTimeoutError,
|
|
17
|
+
areTotalRowsNotFillingHeight,
|
|
18
|
+
showNoDataView,
|
|
19
|
+
};
|
|
20
|
+
}
|
package/build/components/{VirtualTable/SheetView → VirtualTables/SheetViewVirtualTable}/style.js
RENAMED
|
@@ -44,7 +44,6 @@ export const StyledHeader = styled(TableHead, {
|
|
|
44
44
|
export const StyledMUITableRow = styled(MUITableRow)(({ theme }) => ({
|
|
45
45
|
display: 'flex',
|
|
46
46
|
justifyContent: 'flex-start',
|
|
47
|
-
alignItems: 'center',
|
|
48
47
|
width: '100%',
|
|
49
48
|
minWidth: 'fit-content',
|
|
50
49
|
height: '28px',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { IVirtualTable } from '
|
|
2
|
+
import type { IVirtualTable } from '../../../types/index.js';
|
|
3
3
|
declare function VirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, showBackgroundColor, areAllRowsLoaded, tableBodyStyles, tableMode, tableTitle, dragControls, isSheetView, }: Readonly<IVirtualTable>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const _default: import("react").MemoExoticComponent<typeof VirtualTable>;
|
|
5
5
|
export default _default;
|
|
@@ -13,15 +13,15 @@ import { useTheme } from '@mui/material/styles';
|
|
|
13
13
|
import memoize from 'memoize-one';
|
|
14
14
|
import AutoSizer from 'react-virtualized-auto-sizer';
|
|
15
15
|
import InfiniteLoader from 'react-window-infinite-loader';
|
|
16
|
-
import { TABLE_ROW_HEIGHT, TABLE_THRESHOLD, TABLE_LIST_OVER_SCAN, SHEET_VIEW_TABLE_ROW_HEIGHT } from '
|
|
17
|
-
import { useDelayToSetValue } from '
|
|
18
|
-
import { isHeightNotFullyFilledByRows, isNotFoundError, isTimeoutError, hasError } from '
|
|
19
|
-
import TableFooter from '
|
|
20
|
-
import TableHeader from '
|
|
21
|
-
import TableLastItem from '
|
|
22
|
-
import TableNoData from '
|
|
23
|
-
import ListItemWrapper from '
|
|
24
|
-
import { StyledBox, StyledTableBox, StyledVirtualList, TableContainer, TableWrapper } from '
|
|
16
|
+
import { TABLE_ROW_HEIGHT, TABLE_THRESHOLD, TABLE_LIST_OVER_SCAN, SHEET_VIEW_TABLE_ROW_HEIGHT } from '../../../constants/index.js';
|
|
17
|
+
import { useDelayToSetValue } from '../../../hooks/index.js';
|
|
18
|
+
import { isHeightNotFullyFilledByRows, isNotFoundError, isTimeoutError, hasError } from '../../../utils/index.js';
|
|
19
|
+
import TableFooter from '../components/TableFooter/TableFooter';
|
|
20
|
+
import TableHeader from '../components/TableHeader';
|
|
21
|
+
import TableLastItem from '../components/TableLastItem';
|
|
22
|
+
import TableNoData from '../components/TableNoData';
|
|
23
|
+
import ListItemWrapper from '../components/virtualScroll/ListItemWrapper';
|
|
24
|
+
import { StyledBox, StyledTableBox, StyledVirtualList, TableContainer, TableWrapper } from '../components/style';
|
|
25
25
|
const createItemData = memoize((columns, isLoading, rows, rowProps, scrollToIndex, lastItemIndex, totalCount, isError, areAllRowsLoaded, isSheetView) => ({
|
|
26
26
|
columns,
|
|
27
27
|
isLoading,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, ReactElement } from 'react';
|
|
2
|
-
import type { IVirtualTable } from '
|
|
2
|
+
import type { IVirtualTable } from '../../../types/index.js';
|
|
3
3
|
export interface VirtualTableWithCardProps extends Omit<IVirtualTable, 'showHeader' | 'dimensions' | ' showBackgroundColor' | 'columns'> {
|
|
4
4
|
tableHeader?: ReactNode;
|
|
5
5
|
renderCardComponent: (rows: any) => ReactElement | null;
|
package/build/components/{VirtualTable → VirtualTables/VirtualTableWithCard}/VirtualTableWithCard.js
RENAMED
|
@@ -14,13 +14,13 @@ import { useTheme } from '@mui/material/styles';
|
|
|
14
14
|
import memoize from 'memoize-one';
|
|
15
15
|
import AutoSizer from 'react-virtualized-auto-sizer';
|
|
16
16
|
import InfiniteLoader from 'react-window-infinite-loader';
|
|
17
|
-
import { useDelayToSetValue } from '
|
|
18
|
-
import { isHeightNotFullyFilledByRows, isNotFoundError, isTimeoutError, hasError } from '
|
|
19
|
-
import { TABLE_ROW_HEIGHT, TABLE_THRESHOLD, TABLE_LIST_OVER_SCAN } from '
|
|
20
|
-
import TableFooter from '
|
|
21
|
-
import TableNoDataWithCard from '
|
|
22
|
-
import ListItemWrapperWithCard from '
|
|
23
|
-
import { StyledCardsBox, StyledVirtualList, TableContainer, TableWrapper } from '
|
|
17
|
+
import { useDelayToSetValue } from '../../../hooks/index.js';
|
|
18
|
+
import { isHeightNotFullyFilledByRows, isNotFoundError, isTimeoutError, hasError } from '../../../utils/index.js';
|
|
19
|
+
import { TABLE_ROW_HEIGHT, TABLE_THRESHOLD, TABLE_LIST_OVER_SCAN } from '../../../constants/index.js';
|
|
20
|
+
import TableFooter from '../components/TableFooter';
|
|
21
|
+
import TableNoDataWithCard from '../components/TableNoDataWithCard';
|
|
22
|
+
import ListItemWrapperWithCard from '../components/virtualScroll/ListItemWrapperWithCard';
|
|
23
|
+
import { StyledCardsBox, StyledVirtualList, TableContainer, TableWrapper } from '../components/style';
|
|
24
24
|
const createItemData = memoize((isLoading, rows, rowProps, scrollToIndex, lastItemIndex, totalCount, isError, areAllRowsLoaded, renderCardComponent) => ({
|
|
25
25
|
isLoading,
|
|
26
26
|
rows,
|
|
@@ -27,7 +27,7 @@ function ColumnSort({ onColumnSort, columnsSorting, columnId, onClick }) {
|
|
|
27
27
|
handleClose(event);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
return (_jsxs(_Fragment, { children: [_jsx(ColumnIcon, { onClick: handleClick, src: columnIcon, alt: "column-icon", "data-id": columnId, sx: { userSelect: 'none'
|
|
30
|
+
return (_jsxs(_Fragment, { children: [_jsx(ColumnIcon, { onClick: handleClick, src: columnIcon, alt: "column-icon", "data-id": columnId, sx: { userSelect: 'none' } }), open && _jsx(CustomBackdrop, { onClick: handleClose }), _jsxs(Menu, Object.assign({ anchorEl: anchorEl, open: open }, { children: [_jsxs(MenuItem, Object.assign({ onClick: (e) => {
|
|
31
31
|
handleSortingOption(anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.dataset.id, 'asc', e);
|
|
32
32
|
}, sx: (theme) => (Object.assign({}, ((columnsSorting === null || columnsSorting === void 0 ? void 0 : columnsSorting[(anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.dataset.id) || '']) === 'asc' && { boxShadow: theme.shadows[10] }))) }, { children: [_jsx(ActionIcon, { src: sortAzIcon, alt: "sort-icon" }), _jsx(Text, Object.assign({ sx: { fontSize: '0.6875rem' } }, { children: "Sort Z-A" }))] })), _jsxs(MenuItem, Object.assign({ onClick: (e) => {
|
|
33
33
|
handleSortingOption(anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.dataset.id, 'desc', e);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IColumnProps } from '../../../../../../types/index.js';
|
|
2
|
-
import { TableHeaderProps } from '../../../../../
|
|
2
|
+
import { TableHeaderProps } from '../../../../../VirtualTables/components/TableHeader';
|
|
3
3
|
interface TableCellProps extends Pick<TableHeaderProps, 'onColumnSort' | 'isSheetView' | 'columnsSorting'> {
|
|
4
4
|
column: IColumnProps;
|
|
5
5
|
isFirst: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import Box from '@mui/material/Box';
|
|
4
|
-
import ColumnFilter from '../../../../../
|
|
5
|
-
import ColumnSort from '../../../../../
|
|
6
|
-
import { StyledCell } from '../../../../../
|
|
4
|
+
import ColumnFilter from '../../../../../VirtualTables/components/ColumnFilter';
|
|
5
|
+
import ColumnSort from '../../../../../VirtualTables/components/ColumnSort';
|
|
6
|
+
import { StyledCell } from '../../../../../VirtualTables/components/style';
|
|
7
7
|
export function TableCell({ column: { header, id, align, headerStyle, sortable, filter, width, order }, isFirst, isLast, isSheetView, onColumnSort, columnsSorting, }) {
|
|
8
8
|
const [columnFilterEl, setColumnFilterEl] = useState(null);
|
|
9
9
|
return (_jsxs(StyledCell, Object.assign({ "data-id": id, component: "div", "data-testid": "VirtualTable_TableHeader_StyledCell", "data-column-id": id, "data-column-width": width, "data-column-width-used": width, "data-column-align": align, "data-column-order": order, "data-column-header": typeof header === 'string' ? header : 'component', "data-column-sortable": !!sortable, "data-column-filterable": !!filter, isFirst: isFirst, isLast: isLast, onClick: (event) => {
|
package/build/components/{VirtualTable → VirtualTables}/components/TableLoadingWithCard.d.ts
RENAMED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import { VirtualTableWithCardProps } from '../VirtualTableWithCard';
|
|
1
|
+
import { ReactNode } from 'react';
|
|
3
2
|
interface ITableLoadingProps {
|
|
4
3
|
isLoaded?: boolean;
|
|
5
4
|
isLoading?: boolean;
|
|
6
5
|
rowsCount?: number;
|
|
7
|
-
cardLoadingComponent:
|
|
6
|
+
cardLoadingComponent: ReactNode;
|
|
8
7
|
}
|
|
9
8
|
declare function TableLoadingWithCard({ isLoaded, isLoading, rowsCount, cardLoadingComponent }: ITableLoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
declare const _default: import("react").MemoExoticComponent<typeof TableLoadingWithCard>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
import TableLoading from './TableLoading';
|
|
4
|
-
import { StyledSolidBackground } from '
|
|
4
|
+
import { StyledSolidBackground } from './style';
|
|
5
5
|
import TableError from './TableError';
|
|
6
6
|
function TableNoData({ error, tableEmpty, isTimeoutError, tableError, tableLoading, orderedColumns, triggerDataRefetch, footerProps, }) {
|
|
7
7
|
if (tableLoading) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import type { IVirtualTable } from '../../../types/index.js';
|
|
3
|
-
import { VirtualTableWithCardProps } from '../VirtualTableWithCard';
|
|
4
3
|
interface TableNoDataWithCardProps {
|
|
5
4
|
tableEmpty: boolean;
|
|
6
5
|
tableLoading: boolean;
|
|
@@ -9,8 +8,8 @@ interface TableNoDataWithCardProps {
|
|
|
9
8
|
tableError: boolean;
|
|
10
9
|
triggerDataRefetch: () => Promise<unknown>;
|
|
11
10
|
footerProps: IVirtualTable['footerProps'];
|
|
12
|
-
cardLoadingComponent:
|
|
13
|
-
noDataComponent:
|
|
11
|
+
cardLoadingComponent: ReactNode;
|
|
12
|
+
noDataComponent: ReactElement;
|
|
14
13
|
}
|
|
15
14
|
declare function TableNoDataWithCard({ error, tableEmpty, isTimeoutError, tableError, tableLoading, triggerDataRefetch, footerProps, cardLoadingComponent, noDataComponent: NoDataComponent, }: TableNoDataWithCardProps): JSX.Element;
|
|
16
15
|
declare namespace TableNoDataWithCard {
|
|
@@ -3,7 +3,7 @@ import { memo } from 'react';
|
|
|
3
3
|
import { backendErrorHandler } from '../../../utils/index.js';
|
|
4
4
|
import ErrorList from './ErrorList/ErrorList';
|
|
5
5
|
import TableLoadingWithCard from './TableLoadingWithCard';
|
|
6
|
-
import { StyledSolidBackground } from '
|
|
6
|
+
import { StyledSolidBackground } from './style';
|
|
7
7
|
function TableNoDataWithCard({ error, tableEmpty, isTimeoutError, tableError, tableLoading, triggerDataRefetch, footerProps, cardLoadingComponent, noDataComponent: NoDataComponent, }) {
|
|
8
8
|
let content;
|
|
9
9
|
if (tableLoading) {
|
|
@@ -2,8 +2,8 @@ import { createElement as _createElement } from "react";
|
|
|
2
2
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { memo, useMemo } from 'react';
|
|
4
4
|
import { areEqual } from 'react-window';
|
|
5
|
-
import { StyledCell, StyledTableRow } from '
|
|
6
|
-
import { getSelectionStyles } from '
|
|
5
|
+
import { StyledCell, StyledTableRow } from './style';
|
|
6
|
+
import { getSelectionStyles } from './utils';
|
|
7
7
|
function TableRow({ row, columns, index, rowProps, isSheetView, selectedCell = null, selectedColumn = null, onCellClick, isLastRow = false, }) {
|
|
8
8
|
const renderCell = (column) => {
|
|
9
9
|
const { render, format, selector } = column;
|
|
@@ -25,7 +25,7 @@ function TableRow({ row, columns, index, rowProps, isSheetView, selectedCell = n
|
|
|
25
25
|
isColumnSelected,
|
|
26
26
|
isLastRow,
|
|
27
27
|
});
|
|
28
|
-
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: column.id === columns[0].id, isLast: column.id === columns[columns.length - 1].id, onClick: (event) => onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(index, columnIdStr, event), 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: renderCell(column) }), `${column.id}-${colIndex}`));
|
|
28
|
+
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: column.id === columns[0].id, isLast: column.id === columns[columns.length - 1].id, onClick: (event) => onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(index, columnIdStr, event), 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 && (column === null || column === void 0 ? void 0 : column.isDefaultPinned) }, { children: renderCell(column) }), `${column.id}-${colIndex}`));
|
|
29
29
|
}) })), [columns, row, index, selectedCell, selectedColumn, onCellClick, isLastRow]);
|
|
30
30
|
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));
|
|
31
31
|
}
|
package/build/components/{VirtualTable → VirtualTables}/components/TableRowLoadingWithCard.d.ts
RENAMED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import { VirtualTableWithCardProps } from '../VirtualTableWithCard';
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
3
2
|
interface ITableRowLoadingProps {
|
|
4
3
|
index?: number;
|
|
5
4
|
style?: CSSProperties;
|
|
6
|
-
cardLoadingComponent:
|
|
5
|
+
cardLoadingComponent: ReactNode;
|
|
7
6
|
}
|
|
8
7
|
declare function TableRowLoadingWithCard({ style, index, cardLoadingComponent: CardLoadingComponent }: ITableRowLoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
declare const _default: import("react").MemoExoticComponent<typeof TableRowLoadingWithCard>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
2
|
import type { TableRowProps } from '@mui/material';
|
|
3
|
-
import { VirtualTableWithCardProps } from '../VirtualTableWithCard';
|
|
4
3
|
interface ITableRowProps<R = any> {
|
|
5
4
|
row: R;
|
|
6
5
|
index: number;
|
|
@@ -9,7 +8,7 @@ interface ITableRowProps<R = any> {
|
|
|
9
8
|
onRowClick?: (row: R) => void;
|
|
10
9
|
showLoadedStyle?: boolean;
|
|
11
10
|
};
|
|
12
|
-
renderCardComponent:
|
|
11
|
+
renderCardComponent: (rows: any) => ReactElement | null;
|
|
13
12
|
}
|
|
14
13
|
declare function TableRowWithCard({ row, index, rowProps, renderCardComponent: RenderCardComponent }: Readonly<ITableRowProps>): import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
declare const _default: import("react").MemoExoticComponent<typeof TableRowWithCard>;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { createElement as _createElement } from "react";
|
|
3
3
|
import { memo } from 'react';
|
|
4
4
|
import { areEqual } from 'react-window';
|
|
5
|
-
import { StyledTableRow } from '
|
|
5
|
+
import { StyledTableRow } from './style';
|
|
6
6
|
function TableRowWithCard({ row, index, rowProps, renderCardComponent: RenderCardComponent }) {
|
|
7
7
|
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 }), RenderCardComponent && _jsx(RenderCardComponent, Object.assign({}, row))));
|
|
8
8
|
}
|
|
@@ -3,8 +3,8 @@ import Box from '@mui/material/Box';
|
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
4
|
import MUITableRow from '@mui/material/TableRow';
|
|
5
5
|
import { motion } from 'framer-motion';
|
|
6
|
-
import { TABLE_FOOTER_HEIGHT } from './
|
|
7
|
-
import VirtualScrollList from './
|
|
6
|
+
import { TABLE_FOOTER_HEIGHT } from './TableFooter/style';
|
|
7
|
+
import VirtualScrollList from './virtualScroll/VirtualScrollList';
|
|
8
8
|
export const TableWrapper = styled(Box, {
|
|
9
9
|
shouldForwardProp: (prop) => prop !== 'showNoDataView' && prop !== 'isSheetView',
|
|
10
10
|
})(({ showNoDataView, isSheetView }) => ({
|
|
@@ -30,20 +30,17 @@ export const StyledSolidBackground = styled(Box)(({ theme }) => ({
|
|
|
30
30
|
}));
|
|
31
31
|
export const StyledCell = styled(TableCell, {
|
|
32
32
|
shouldForwardProp: (prop) => !['isLast', 'isFirst', 'isSheetView', 'isSelected'].includes(prop),
|
|
33
|
-
})(({ theme, isLast, isFirst, isSheetView, isSelected }) => (Object.assign({ paddingBlock: '0', paddingInline: '0.3875rem !important', paddingLeft: isFirst ? '0 !important' : '0.3875rem !important', paddingRight: isLast ? '0 !important' : '0.3875rem !important', color: isSheetView ? theme.palette.text.primary : theme.palette.grey[700], fontSize: isSheetView ? theme.typography.subtitle1.fontSize : theme.typography.caption.fontSize, height: '100%', fontWeight: isSheetView ? 400 : theme.typography.fontWeightRegular, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', display: 'flex', alignItems: 'center', cursor: 'pointer' }, (isSheetView &&
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
left: 0,
|
|
40
|
-
bottom: 0,
|
|
41
|
-
} }, (isSelected && {
|
|
33
|
+
})(({ theme, isLast, isFirst, isSheetView, isSelected }) => (Object.assign(Object.assign({ paddingBlock: '0', paddingInline: '0.3875rem !important', paddingLeft: isFirst ? '0 !important' : '0.3875rem !important', paddingRight: isLast ? '0 !important' : '0.3875rem !important', color: isSheetView ? theme.palette.text.primary : theme.palette.grey[700], fontSize: isSheetView ? theme.typography.subtitle1.fontSize : theme.typography.caption.fontSize, height: '100%', fontWeight: isSheetView ? 400 : theme.typography.fontWeightRegular, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', display: 'flex', alignItems: 'center', cursor: 'pointer' }, (isSheetView && {
|
|
34
|
+
borderRight: isLast ? 'none' : `1px solid ${theme.palette.divider}`,
|
|
35
|
+
paddingInline: '8px !important',
|
|
36
|
+
paddingLeft: '8px !important',
|
|
37
|
+
paddingRight: '8px !important',
|
|
38
|
+
})), (isSelected && {
|
|
42
39
|
color: '#1F88D0 !important',
|
|
43
40
|
'& *': {
|
|
44
41
|
color: '#1F88D0 !important',
|
|
45
42
|
},
|
|
46
|
-
}))))
|
|
43
|
+
}))));
|
|
47
44
|
export const StyledVirtualList = styled(VirtualScrollList, {
|
|
48
45
|
shouldForwardProp: (prop) => !['areTotalRowsNotFillingHeight', 'isSheetView'].includes(prop),
|
|
49
46
|
})(({ theme, areTotalRowsNotFillingHeight, isSheetView }) => (Object.assign({ backgroundColor: areTotalRowsNotFillingHeight ? 'transparent' : theme.palette.background.default }, (isSheetView && {
|
|
@@ -8,7 +8,6 @@ export declare const getSelectionStyles: ({ isSelected, isCellSelected, isColumn
|
|
|
8
8
|
border?: undefined;
|
|
9
9
|
backgroundColor?: undefined;
|
|
10
10
|
color?: undefined;
|
|
11
|
-
'&:before'?: undefined;
|
|
12
11
|
borderWidth?: undefined;
|
|
13
12
|
borderStyle?: undefined;
|
|
14
13
|
borderColor?: undefined;
|
|
@@ -21,11 +20,6 @@ export declare const getSelectionStyles: ({ isSelected, isCellSelected, isColumn
|
|
|
21
20
|
border: string;
|
|
22
21
|
backgroundColor: string;
|
|
23
22
|
color: string;
|
|
24
|
-
'&:before': {
|
|
25
|
-
border: string;
|
|
26
|
-
borderWidth?: undefined;
|
|
27
|
-
borderBottom?: undefined;
|
|
28
|
-
};
|
|
29
23
|
borderWidth?: undefined;
|
|
30
24
|
borderStyle?: undefined;
|
|
31
25
|
borderColor?: undefined;
|
|
@@ -43,11 +37,6 @@ export declare const getSelectionStyles: ({ isSelected, isCellSelected, isColumn
|
|
|
43
37
|
minHeight: string;
|
|
44
38
|
display: string;
|
|
45
39
|
alignItems: string;
|
|
46
|
-
'&:before': {
|
|
47
|
-
borderWidth: string;
|
|
48
|
-
borderBottom: string;
|
|
49
|
-
border?: undefined;
|
|
50
|
-
};
|
|
51
40
|
border?: undefined;
|
|
52
41
|
backgroundColor?: undefined;
|
|
53
42
|
color?: undefined;
|
|
@@ -3,12 +3,9 @@ export const getSelectionStyles = ({ isSelected, isCellSelected, isColumnSelecte
|
|
|
3
3
|
return {};
|
|
4
4
|
if (isCellSelected && !isColumnSelected) {
|
|
5
5
|
return {
|
|
6
|
-
border: '
|
|
6
|
+
border: '2px solid #1F88D0',
|
|
7
7
|
backgroundColor: 'white',
|
|
8
8
|
color: '#1F88D0',
|
|
9
|
-
'&:before': {
|
|
10
|
-
border: '1px solid #1F88D0',
|
|
11
|
-
},
|
|
12
9
|
};
|
|
13
10
|
}
|
|
14
11
|
if (isColumnSelected) {
|
|
@@ -21,10 +18,6 @@ export const getSelectionStyles = ({ isSelected, isCellSelected, isColumnSelecte
|
|
|
21
18
|
minHeight: '28px',
|
|
22
19
|
display: 'flex',
|
|
23
20
|
alignItems: 'center',
|
|
24
|
-
'&:before': {
|
|
25
|
-
borderWidth: isLastRow ? '0px 1.5px 1px 1.5px' : '0px 1.5px 0px 1.5px',
|
|
26
|
-
borderBottom: !isLastRow ? '1px solid transparent' : '1.5px solid #1F88D0',
|
|
27
|
-
},
|
|
28
21
|
};
|
|
29
22
|
}
|
|
30
23
|
return {};
|
package/build/components/{VirtualTable → VirtualTables}/components/virtualScroll/ListItemWrapper.js
RENAMED
|
@@ -15,11 +15,11 @@ import { Box } from '@mui/material';
|
|
|
15
15
|
import { styled } from '@mui/material/styles';
|
|
16
16
|
import { useTranslation } from 'react-i18next';
|
|
17
17
|
import { blueCircleLoaderIcon, tableBackgroundLoader, TABLE_ROW_HEIGHT, SHEET_VIEW_TABLE_ROW_HEIGHT } from '../../../../constants/index.js';
|
|
18
|
-
import { ActionIcon } from '
|
|
18
|
+
import { ActionIcon } from '../style';
|
|
19
19
|
import { RowErrorState } from '../RowErrorState';
|
|
20
20
|
import { StyledParagraph } from '../TableLastItem';
|
|
21
21
|
import TableRow from '../TableRow';
|
|
22
|
-
import SheetViewTableRowLoading from '../../
|
|
22
|
+
import SheetViewTableRowLoading from '../../SheetViewVirtualTable/components/SheetViewTableRowLoading';
|
|
23
23
|
export const LastRowContent = React.memo(({ isLoadingRow, isSheetView, columns, currentRowCount, }) => {
|
|
24
24
|
const { t } = useTranslation();
|
|
25
25
|
if (isLoadingRow) {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import VirtualTable from './VirtualTable/VirtualTable';
|
|
2
|
+
import VirtualTableWithCard from './VirtualTableWithCard/VirtualTableWithCard';
|
|
3
|
+
export * from './components';
|
|
4
|
+
export * from './SheetViewVirtualTable';
|
|
5
|
+
export { StyledCell } from './components/style';
|
|
6
|
+
export { VirtualTable, VirtualTableWithCard };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import VirtualTable from './VirtualTable/VirtualTable';
|
|
2
|
+
import VirtualTableWithCard from './VirtualTableWithCard/VirtualTableWithCard';
|
|
3
|
+
export * from './components';
|
|
4
|
+
export * from './SheetViewVirtualTable';
|
|
5
|
+
export { StyledCell } from './components/style';
|
|
6
|
+
export { VirtualTable, VirtualTableWithCard };
|
|
@@ -12,8 +12,8 @@ export { default as Checkbox } from './Checkbox';
|
|
|
12
12
|
export { default as Dialog, DialogToolbar } from './Dialog';
|
|
13
13
|
export { default as Tooltip } from './Tooltip';
|
|
14
14
|
export * from './RFH';
|
|
15
|
-
export {
|
|
16
|
-
export { default as SheetViewVirtualTable } from './
|
|
15
|
+
export { VirtualTable, TableRowLoading, TableHeader as VirtualTableHeader, TableLastItem, TableLoading, TableLoadingWithCard, TableNoData, TableNoDataWithCard, LastRowContent, ListItemWrapperWithCard, RowErrorState, StyledItemWrapper, TableRow, TableRowLoadingWithCard, TableRowWithCard, VirtualScrollInner, VirtualScrollList, VirtualScrollOuter, VirtualTableWithCard, Inputs, List, ColumnFilter, StyledCell, TableFooter, TableError, } from './VirtualTables';
|
|
16
|
+
export { default as SheetViewVirtualTable } from './VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable';
|
|
17
17
|
export { default as Widget, ListItem, WidgetHeader, WidgetList } from './Widget';
|
|
18
18
|
export { default as TapLogo } from './TapLogo';
|
|
19
19
|
export { default as StatusButton, ChevronIcon, type ChevronIconProps, type StatusButtonIcon, type StatusButtonProps } from './StatusButton';
|
|
@@ -12,8 +12,8 @@ export { default as Checkbox } from './Checkbox';
|
|
|
12
12
|
export { default as Dialog, DialogToolbar } from './Dialog';
|
|
13
13
|
export { default as Tooltip } from './Tooltip';
|
|
14
14
|
export * from './RFH';
|
|
15
|
-
export {
|
|
16
|
-
export { default as SheetViewVirtualTable } from './
|
|
15
|
+
export { VirtualTable, TableRowLoading, TableHeader as VirtualTableHeader, TableLastItem, TableLoading, TableLoadingWithCard, TableNoData, TableNoDataWithCard, LastRowContent, ListItemWrapperWithCard, RowErrorState, StyledItemWrapper, TableRow, TableRowLoadingWithCard, TableRowWithCard, VirtualScrollInner, VirtualScrollList, VirtualScrollOuter, VirtualTableWithCard, Inputs, List, ColumnFilter, StyledCell, TableFooter, TableError, } from './VirtualTables';
|
|
16
|
+
export { default as SheetViewVirtualTable } from './VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable';
|
|
17
17
|
export { default as Widget, ListItem, WidgetHeader, WidgetList } from './Widget';
|
|
18
18
|
export { default as TapLogo } from './TapLogo';
|
|
19
19
|
export { default as StatusButton, ChevronIcon } from './StatusButton';
|
package/build/types/table.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { BoxProps } from '@mui/material/Box';
|
|
|
4
4
|
import { TableHeadProps } from '@mui/material/TableHead';
|
|
5
5
|
import { TableRowProps } from '@mui/material/TableRow';
|
|
6
6
|
import { DragControls } from 'framer-motion';
|
|
7
|
-
import { CustomColumnFilterProps } from '../components/
|
|
7
|
+
import { CustomColumnFilterProps } from '../components/VirtualTables';
|
|
8
8
|
import { Country } from './appConfig';
|
|
9
9
|
import { SortingOrder } from './sort';
|
|
10
10
|
export interface TableFilters<T> {
|
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.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.1-test.54",
|
|
5
|
+
"testVersion": 54,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|
|
@@ -131,4 +131,4 @@
|
|
|
131
131
|
"publishConfig": {
|
|
132
132
|
"registry": "https://registry.npmjs.org/"
|
|
133
133
|
}
|
|
134
|
-
}
|
|
134
|
+
}
|