@tap-payments/os-micro-frontend-shared 0.1.411 → 0.1.412-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.
- package/build/components/AnimatedSpinnerIcon/style.d.ts +0 -1
- package/build/components/Chip/style.d.ts +0 -1
- package/build/components/CountBadge/style.d.ts +0 -1
- package/build/components/Dialog/style.d.ts +0 -1
- package/build/components/FlippingCard/style.d.ts +0 -1
- package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
- package/build/components/JSONViewer/style.d.ts +0 -1
- package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
- package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
- package/build/components/SearchButton/styles.d.ts +0 -1
- package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
- package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/style.d.ts +0 -1
- package/build/components/TableHeader/FiltersRow.d.ts +1 -1
- package/build/components/TableHeader/FiltersRow.js +4 -2
- package/build/components/TableHeader/TableHeader.d.ts +1 -1
- package/build/components/TableHeader/TableHeader.js +2 -2
- package/build/components/TableHeader/TableView/CreateViewDialog.d.ts +3 -0
- package/build/components/TableHeader/TableView/CreateViewDialog.js +91 -0
- package/build/components/TableHeader/TableView/CustomViews.d.ts +1 -1
- package/build/components/TableHeader/TableView/CustomViews.js +1 -1
- package/build/components/TableHeader/TableView/DefaultViews.js +1 -1
- package/build/components/TableHeader/TableView/TableView.js +1 -2
- package/build/components/TableHeader/TableView/ViewsDropdown.d.ts +5 -0
- package/build/components/TableHeader/TableView/ViewsDropdown.js +153 -0
- package/build/components/TableHeader/TableView/ViewsMenu.d.ts +5 -0
- package/build/components/TableHeader/TableView/ViewsMenu.js +56 -0
- package/build/components/TableHeader/TableView/components/ColumnList.d.ts +3 -0
- package/build/components/TableHeader/TableView/components/ColumnList.js +70 -0
- package/build/components/TableHeader/TableView/components/ViewsSubmenu.d.ts +3 -0
- package/build/components/TableHeader/TableView/components/ViewsSubmenu.js +68 -0
- package/build/components/TableHeader/TableView/components/index.d.ts +2 -0
- package/build/components/TableHeader/TableView/components/index.js +2 -0
- package/build/components/TableHeader/TableView/constants.d.ts +25 -0
- package/build/components/TableHeader/TableView/constants.js +25 -0
- package/build/components/TableHeader/TableView/hooks/index.d.ts +6 -0
- package/build/components/TableHeader/TableView/hooks/index.js +6 -0
- package/build/components/TableHeader/TableView/hooks/useCreateViewDialog.d.ts +22 -0
- package/build/components/TableHeader/TableView/hooks/useCreateViewDialog.js +92 -0
- package/build/components/TableHeader/TableView/hooks/useDialogPosition.d.ts +8 -0
- package/build/components/TableHeader/TableView/hooks/useDialogPosition.js +16 -0
- package/build/components/TableHeader/TableView/hooks/useNestedSubmenu.d.ts +7 -0
- package/build/components/TableHeader/TableView/hooks/useNestedSubmenu.js +27 -0
- package/build/components/TableHeader/TableView/hooks/useOriginalColumns.d.ts +6 -0
- package/build/components/TableHeader/TableView/hooks/useOriginalColumns.js +18 -0
- package/build/components/TableHeader/TableView/hooks/useSubmenuHover.d.ts +8 -0
- package/build/components/TableHeader/TableView/hooks/useSubmenuHover.js +42 -0
- package/build/components/TableHeader/TableView/hooks/useViewsManager.d.ts +12 -0
- package/build/components/TableHeader/TableView/hooks/useViewsManager.js +32 -0
- package/build/components/TableHeader/TableView/hooks/useViewsMenu.d.ts +48 -0
- package/build/components/TableHeader/TableView/hooks/useViewsMenu.js +150 -0
- package/build/components/TableHeader/TableView/index.d.ts +11 -3
- package/build/components/TableHeader/TableView/index.js +10 -3
- package/build/components/TableHeader/TableView/styles.d.ts +127 -0
- package/build/components/TableHeader/TableView/styles.js +427 -0
- package/build/components/TableHeader/TableView/types.d.ts +198 -0
- package/build/components/TableHeader/TableView/utils/columnState.d.ts +20 -0
- package/build/components/TableHeader/TableView/utils/columnState.js +187 -0
- package/build/components/TableHeader/TableView/utils/index.d.ts +4 -0
- package/build/components/TableHeader/TableView/utils/index.js +4 -0
- package/build/components/TableHeader/TableView/utils/layoutTransform.d.ts +10 -0
- package/build/components/TableHeader/TableView/utils/layoutTransform.js +71 -0
- package/build/components/TableHeader/TableView/utils/templateToColumnsView.d.ts +30 -0
- package/build/components/TableHeader/TableView/utils/templateToColumnsView.js +144 -0
- package/build/components/TableHeader/TableView/utils/viewMenu.d.ts +36 -0
- package/build/components/TableHeader/TableView/utils/viewMenu.js +90 -0
- package/build/components/TableHeader/index.d.ts +2 -0
- package/build/components/TableHeader/index.js +1 -0
- package/build/components/TableHeader/type.d.ts +18 -1
- package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -1
- package/build/components/TableReports/style.d.ts +0 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.d.ts +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.js +6 -3
- package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableRowLoading.js +1 -2
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/usePinnedColumns.js +3 -2
- package/build/components/VirtualTables/VirtualTable/VirtualTable.d.ts +1 -1
- package/build/components/VirtualTables/VirtualTable/VirtualTable.js +4 -3
- package/build/components/VirtualTables/components/style.d.ts +0 -1
- package/build/constants/assets.d.ts +1 -0
- package/build/constants/assets.js +1 -0
- package/build/constants/table/cell/authenticationsTableCellWidth.d.ts +10 -0
- package/build/constants/table/cell/authenticationsTableCellWidth.js +10 -0
- package/build/types/table.d.ts +1 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.js +1 -0
- package/build/utils/skeletonColumns.d.ts +4 -0
- package/build/utils/skeletonColumns.js +55 -0
- package/package.json +3 -3
- package/build/components/TableHeader/TableView/style.d.ts +0 -24
- package/build/components/TableHeader/TableView/style.js +0 -102
- package/build/components/TableHeader/TableView/type.d.ts +0 -10
- /package/build/components/TableHeader/TableView/{type.js → types.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ISheetViewVirtualTable } from './types';
|
|
3
|
-
declare function SheetViewVirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, rowHeight, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableTitle, onStartDrag, onColumnPin, clearBackdropVisibilityTimeout, isPinnable, tableMode, overscanCount, windowId, serviceCode, customNoDataComponent, }: Readonly<ISheetViewVirtualTable>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function SheetViewVirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, rowHeight, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableTitle, onStartDrag, onColumnPin, clearBackdropVisibilityTimeout, isPinnable, tableMode, overscanCount, windowId, serviceCode, customNoDataComponent, defaultSkeleton, }: Readonly<ISheetViewVirtualTable>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const _default: import("react").MemoExoticComponent<typeof SheetViewVirtualTable>;
|
|
5
5
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { memo, useCallback, useMemo, useRef, useEffect } from 'react';
|
|
3
3
|
import { SHEET_VIEW_TABLE_THRESHOLD } from '../../../constants/index.js';
|
|
4
|
+
import { getProcessedColumns } from '../../../utils/index.js';
|
|
4
5
|
import TableFooter from '../components/TableFooter/TableFooter';
|
|
5
6
|
import { SheetViewTableContainer } from '../components/style';
|
|
6
7
|
import { SheetViewVirtualTableWrapper } from './style';
|
|
@@ -8,7 +9,9 @@ import { usePinnedColumns, useSynchronizedScroll, useTableState, useTableData, u
|
|
|
8
9
|
import { useColumnResize, useColumnResizeWithPinned, applyColumnWidths } from './features/resize';
|
|
9
10
|
import { ResizeOverlay } from './features/resize/components';
|
|
10
11
|
import { PinnedColumn, MainTable, LoadingMainTable, NoDataView, VirtualTable } from './components';
|
|
11
|
-
function SheetViewVirtualTable({ columns, rows, threshold = SHEET_VIEW_TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, rowHeight = 28, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableTitle, onStartDrag, onColumnPin, clearBackdropVisibilityTimeout = 100, isPinnable = false, tableMode, overscanCount, windowId, serviceCode, customNoDataComponent, }) {
|
|
12
|
+
function SheetViewVirtualTable({ columns, rows, threshold = SHEET_VIEW_TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, rowHeight = 28, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableTitle, onStartDrag, onColumnPin, clearBackdropVisibilityTimeout = 100, isPinnable = false, tableMode, overscanCount, windowId, serviceCode, customNoDataComponent, defaultSkeleton = true, }) {
|
|
13
|
+
// Use skeleton columns (date + action pinned) when loading and defaultSkeleton
|
|
14
|
+
const processedColumns = useMemo(() => getProcessedColumns(columns, isLoading !== null && isLoading !== void 0 ? isLoading : false, defaultSkeleton), [columns, isLoading, defaultSkeleton]);
|
|
12
15
|
// Custom hooks for state management
|
|
13
16
|
const { selectedCell, selectedColumn, selectedRow, showBackDrop, setShowBackdrop, handleCellClick, handleColumnClick, handleChipClick, selectedChip, } = useTableState();
|
|
14
17
|
// Refs and state for resize indicator positioning
|
|
@@ -23,7 +26,7 @@ function SheetViewVirtualTable({ columns, rows, threshold = SHEET_VIEW_TABLE_THR
|
|
|
23
26
|
areAllRowsLoaded,
|
|
24
27
|
});
|
|
25
28
|
// Column management
|
|
26
|
-
const { pinnedStartColumns, pinnedEndColumns, handleColumnPin, pinnedStartColumnsData, pinnedEndColumnsData, unpinnedColumnsData, orderedColumns, lastColumnId, } = usePinnedColumns(
|
|
29
|
+
const { pinnedStartColumns, pinnedEndColumns, handleColumnPin, pinnedStartColumnsData, pinnedEndColumnsData, unpinnedColumnsData, orderedColumns, lastColumnId, } = usePinnedColumns(processedColumns, isPinnable, onColumnPin);
|
|
27
30
|
// Scroll synchronization
|
|
28
31
|
const { pinnedStartVirtualListRef, scrollableVirtualListRef, pinnedEndVirtualListRef, handleScroll } = useSynchronizedScroll();
|
|
29
32
|
// Reset virtual list cache when row count changes
|
|
@@ -36,7 +39,7 @@ function SheetViewVirtualTable({ columns, rows, threshold = SHEET_VIEW_TABLE_THR
|
|
|
36
39
|
}, [rows.length, pinnedStartVirtualListRef, scrollableVirtualListRef, pinnedEndVirtualListRef]);
|
|
37
40
|
// Column resize functionality
|
|
38
41
|
const { columnWidths, isResizing, resizingColumn, resizeIndicatorX, cursorPosition, startResize, handleColumnClick: handleColumnClickWithResize, } = useColumnResize({
|
|
39
|
-
columns,
|
|
42
|
+
columns: processedColumns,
|
|
40
43
|
handleColumnClick,
|
|
41
44
|
windowId,
|
|
42
45
|
serviceCode,
|
package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableRowLoading.js
CHANGED
|
@@ -16,7 +16,6 @@ function SheetViewTableRowLoading({ columns, style, index, animationType, rowInd
|
|
|
16
16
|
return (_jsx(MUITableRow, Object.assign({ sx: Object.assign(Object.assign({}, style), { display: 'flex', borderBottom: '1px solid #F2F2F2', minHeight: '28px', height: '28px', alignItems: 'center', backgroundColor: useTableBackground ? theme.palette.background.default : 'transparent', '&:hover': {
|
|
17
17
|
backgroundColor: 'transparent !important',
|
|
18
18
|
} }), component: "div", hover: true }, { children: columns.map((column, colIndex) => {
|
|
19
|
-
var _a;
|
|
20
19
|
const isLastColumn = colIndex === columns.length - 1;
|
|
21
20
|
const isFirstColumn = colIndex === 0;
|
|
22
21
|
const isPinnedStart = column.pinned === 'start';
|
|
@@ -35,7 +34,7 @@ function SheetViewTableRowLoading({ columns, style, index, animationType, rowInd
|
|
|
35
34
|
boxSizing: 'border-box',
|
|
36
35
|
whiteSpace: 'nowrap',
|
|
37
36
|
overflow: 'hidden',
|
|
38
|
-
}, component: "div" }, { children: shouldShowActualData
|
|
37
|
+
}, component: "div" }, { children: shouldShowActualData && column.render ? (column.render({
|
|
39
38
|
index: rowIndex,
|
|
40
39
|
row: {},
|
|
41
40
|
column,
|
|
@@ -2,12 +2,13 @@ import { useState, useCallback, useMemo } from 'react';
|
|
|
2
2
|
export const usePinnedColumns = (columns, isPinnable, onColumnPin) => {
|
|
3
3
|
const [pinnedStartColumns, setPinnedStartColumns] = useState(() => {
|
|
4
4
|
const userPinned = isPinnable ? columns.filter((c) => c.pinned === 'start').map((c) => c.id) : [];
|
|
5
|
-
const defaultPinned = columns.filter((c) => c.isDefaultPinned).map((c) => c.id);
|
|
5
|
+
const defaultPinned = columns.filter((c) => c.isDefaultPinned && c.pinned !== 'end').map((c) => c.id);
|
|
6
6
|
return Array.from(new Set([...defaultPinned, ...userPinned]));
|
|
7
7
|
});
|
|
8
8
|
const [pinnedEndColumns, setPinnedEndColumns] = useState(() => {
|
|
9
|
+
const defaultPinned = columns.filter((c) => c.isDefaultPinned && c.pinned === 'end').map((c) => c.id);
|
|
9
10
|
if (!isPinnable)
|
|
10
|
-
return
|
|
11
|
+
return defaultPinned;
|
|
11
12
|
const userPinned = columns.filter((c) => c.pinned === 'end').map((c) => c.id);
|
|
12
13
|
// Automatically pin the last column to the end if no end-pinned columns exist
|
|
13
14
|
const visibleColumns = columns.filter((column) => !column.hidden);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { IVirtualTable } from '../../../types/index.js';
|
|
3
|
-
declare function VirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableMode, tableTitle, onStartDrag, isSheetView, isMinimized, footerComponent, customNoDataComponent, }: Readonly<IVirtualTable>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function VirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableMode, tableTitle, onStartDrag, isSheetView, isMinimized, footerComponent, customNoDataComponent, defaultSkeleton, }: Readonly<IVirtualTable>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const _default: import("react").MemoExoticComponent<typeof VirtualTable>;
|
|
5
5
|
export default _default;
|
|
@@ -15,7 +15,7 @@ import AutoSizer from 'react-virtualized-auto-sizer';
|
|
|
15
15
|
import InfiniteLoader from 'react-window-infinite-loader';
|
|
16
16
|
import { TABLE_ROW_HEIGHT, TABLE_THRESHOLD, TABLE_LIST_OVER_SCAN, SHEET_VIEW_TABLE_ROW_HEIGHT } from '../../../constants/index.js';
|
|
17
17
|
import { useDelayToSetValue } from '../../../hooks/index.js';
|
|
18
|
-
import { isHeightNotFullyFilledByRows, isNotFoundError, isTimeoutError, hasError } from '../../../utils/index.js';
|
|
18
|
+
import { isHeightNotFullyFilledByRows, isNotFoundError, isTimeoutError, hasError, getProcessedColumns } from '../../../utils/index.js';
|
|
19
19
|
import TableFooter from '../components/TableFooter/TableFooter';
|
|
20
20
|
import TableHeader from '../components/TableHeader';
|
|
21
21
|
import TableLastItem from '../components/TableLastItem';
|
|
@@ -34,7 +34,7 @@ const createItemData = memoize((columns, isLoading, rows, rowProps, scrollToInde
|
|
|
34
34
|
areAllRowsLoaded,
|
|
35
35
|
isSheetView,
|
|
36
36
|
}));
|
|
37
|
-
function VirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableMode, tableTitle, onStartDrag, isSheetView = false, isMinimized, footerComponent, customNoDataComponent, }) {
|
|
37
|
+
function VirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableMode, tableTitle, onStartDrag, isSheetView = false, isMinimized, footerComponent, customNoDataComponent, defaultSkeleton = false, }) {
|
|
38
38
|
var _a, _b;
|
|
39
39
|
const theme = useTheme();
|
|
40
40
|
const onPointerDown = (e) => {
|
|
@@ -58,7 +58,8 @@ function VirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, showHeader,
|
|
|
58
58
|
const tableEmpty = !isLoading && rows.length === 0;
|
|
59
59
|
const hasTimeoutError = isTimeoutError(error);
|
|
60
60
|
const lastItemIndex = rows.length - 1;
|
|
61
|
-
const
|
|
61
|
+
const processedColumns = useMemo(() => getProcessedColumns(columns, isLoading !== null && isLoading !== void 0 ? isLoading : false, defaultSkeleton), [columns, isLoading, defaultSkeleton]);
|
|
62
|
+
const shownColumns = useMemo(() => processedColumns.filter((column) => !column.hidden), [processedColumns]);
|
|
62
63
|
const orderedColumns = useMemo(() => shownColumns.sort((a, b) => { var _a, _b; return ((_a = a === null || a === void 0 ? void 0 : a.order) !== null && _a !== void 0 ? _a : 1000000) - ((_b = b === null || b === void 0 ? void 0 : b.order) !== null && _b !== void 0 ? _b : 1000000); }), [shownColumns]);
|
|
63
64
|
const areTotalRowsNotFillingHeight = isHeightNotFullyFilledByRows(rows.length) && !tableLoading;
|
|
64
65
|
const itemsCount = isDelayedFetchingNextPage || (areAllRowsLoaded && !areTotalRowsNotFillingHeight) ? rows.length + 1 : rows.length;
|
|
@@ -351,6 +351,7 @@ export declare const TAP3DSPROVIDERIcon: string;
|
|
|
351
351
|
export declare const greyPlusIcon: string;
|
|
352
352
|
export declare const greyMinusIcon: string;
|
|
353
353
|
export declare const noPreviewIcon: string;
|
|
354
|
+
export declare const editIcon: string;
|
|
354
355
|
export declare const viewInvoiceIcon: string;
|
|
355
356
|
export declare const checkoutStatusIcon: string;
|
|
356
357
|
export declare const checkoutStatusBlueIcon: string;
|
|
@@ -357,6 +357,7 @@ export const TAP3DSPROVIDERIcon = `${lightUrl}/provider/TAP3DS.svg`;
|
|
|
357
357
|
export const greyPlusIcon = `${lightUrl}/greyPlusIcon.svg`;
|
|
358
358
|
export const greyMinusIcon = `${lightUrl}/greyMinusIcon.svg`;
|
|
359
359
|
export const noPreviewIcon = `${lightUrl}/noPreviewIcon.svg`;
|
|
360
|
+
export const editIcon = `${lightUrl}/other/editIcon.svg`;
|
|
360
361
|
export const viewInvoiceIcon = `${appBaseUrl}/viewInvoice.svg`;
|
|
361
362
|
export const checkoutStatusIcon = `${appBaseUrl}/checkoutStatus.svg`;
|
|
362
363
|
export const checkoutStatusBlueIcon = `${appBaseUrl}/checkStatusOutBlue.svg`;
|
|
@@ -4,6 +4,16 @@ export declare const authenticationsTableCellWidth: {
|
|
|
4
4
|
readonly text: "180px";
|
|
5
5
|
readonly sheet: "180px";
|
|
6
6
|
};
|
|
7
|
+
readonly merchant: {
|
|
8
|
+
readonly default: "115px";
|
|
9
|
+
readonly text: "150px";
|
|
10
|
+
readonly sheet: "138px";
|
|
11
|
+
};
|
|
12
|
+
readonly brand: {
|
|
13
|
+
readonly default: "125px";
|
|
14
|
+
readonly text: "116px";
|
|
15
|
+
readonly sheet: "116px";
|
|
16
|
+
};
|
|
7
17
|
readonly payouts: {
|
|
8
18
|
readonly default: "150px";
|
|
9
19
|
readonly text: "250px";
|
|
@@ -4,6 +4,16 @@ export const authenticationsTableCellWidth = {
|
|
|
4
4
|
text: '180px',
|
|
5
5
|
sheet: '180px',
|
|
6
6
|
},
|
|
7
|
+
merchant: {
|
|
8
|
+
default: '115px',
|
|
9
|
+
text: '150px',
|
|
10
|
+
sheet: '138px',
|
|
11
|
+
},
|
|
12
|
+
brand: {
|
|
13
|
+
default: '125px',
|
|
14
|
+
text: '116px',
|
|
15
|
+
sheet: '116px',
|
|
16
|
+
},
|
|
7
17
|
payouts: {
|
|
8
18
|
default: '150px',
|
|
9
19
|
text: '250px',
|
package/build/types/table.d.ts
CHANGED
|
@@ -116,6 +116,7 @@ export interface IVirtualTable<R = any> {
|
|
|
116
116
|
headerProps?: TableHeadProps;
|
|
117
117
|
isLoading?: boolean;
|
|
118
118
|
isFetchingNextPage?: boolean;
|
|
119
|
+
defaultSkeleton?: boolean;
|
|
119
120
|
rowProps?: TableRowProps & {
|
|
120
121
|
onRowClick?: (row: R, index: number) => void;
|
|
121
122
|
};
|
package/build/utils/index.d.ts
CHANGED
package/build/utils/index.js
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IColumnProps } from '../types/index.js';
|
|
2
|
+
export declare const DEFAULT_SKELETON_WIDTHS: string[];
|
|
3
|
+
export declare const generateSkeletonColumns: (staticWidths?: string[]) => IColumnProps[];
|
|
4
|
+
export declare const getProcessedColumns: <T = unknown>(columns: readonly IColumnProps<T>[], isLoading: boolean, defaultSkeleton: boolean) => IColumnProps<T>[];
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export const DEFAULT_SKELETON_WIDTHS = ['120px', '180px', '100px', '150px', '200px', '140px', '160px', '110px', '190px', '130px'];
|
|
2
|
+
/** Index column (pinned start) - always first on loading skeleton */
|
|
3
|
+
const SKELETON_INDEX_COLUMN = {
|
|
4
|
+
id: 'index',
|
|
5
|
+
header: '',
|
|
6
|
+
width: '34px',
|
|
7
|
+
order: 0,
|
|
8
|
+
hidden: false,
|
|
9
|
+
sortable: false,
|
|
10
|
+
pinned: 'start',
|
|
11
|
+
isDefaultPinned: true,
|
|
12
|
+
pinnable: true,
|
|
13
|
+
};
|
|
14
|
+
/** Date column (pinned start) - second on loading skeleton */
|
|
15
|
+
const SKELETON_DATE_COLUMN = {
|
|
16
|
+
id: 'date',
|
|
17
|
+
header: '',
|
|
18
|
+
width: '120px',
|
|
19
|
+
order: 1,
|
|
20
|
+
hidden: false,
|
|
21
|
+
sortable: false,
|
|
22
|
+
pinned: 'start',
|
|
23
|
+
isDefaultPinned: true,
|
|
24
|
+
pinnable: true,
|
|
25
|
+
};
|
|
26
|
+
/** Action icon column (pinned end) - always last on loading skeleton; id must match real table action column (action_icon) */
|
|
27
|
+
const SKELETON_ACTION_ICON_COLUMN = {
|
|
28
|
+
id: 'action_icon',
|
|
29
|
+
header: '',
|
|
30
|
+
width: '36px',
|
|
31
|
+
order: DEFAULT_SKELETON_WIDTHS.length + 3,
|
|
32
|
+
hidden: false,
|
|
33
|
+
sortable: false,
|
|
34
|
+
pinned: 'end',
|
|
35
|
+
pinnable: true,
|
|
36
|
+
isDefaultPinned: true,
|
|
37
|
+
};
|
|
38
|
+
export const generateSkeletonColumns = (staticWidths = DEFAULT_SKELETON_WIDTHS) => {
|
|
39
|
+
const middleColumns = staticWidths.map((width, index) => ({
|
|
40
|
+
id: `skeleton-col-${index}`,
|
|
41
|
+
header: '',
|
|
42
|
+
width,
|
|
43
|
+
order: index + 2,
|
|
44
|
+
hidden: false,
|
|
45
|
+
sortable: false,
|
|
46
|
+
pinnable: false,
|
|
47
|
+
}));
|
|
48
|
+
return [SKELETON_INDEX_COLUMN, SKELETON_DATE_COLUMN, ...middleColumns, SKELETON_ACTION_ICON_COLUMN];
|
|
49
|
+
};
|
|
50
|
+
export const getProcessedColumns = (columns, isLoading, defaultSkeleton) => {
|
|
51
|
+
if (defaultSkeleton && isLoading) {
|
|
52
|
+
return generateSkeletonColumns();
|
|
53
|
+
}
|
|
54
|
+
return [...columns];
|
|
55
|
+
};
|
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.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.412-test.1",
|
|
5
|
+
"testVersion": 1,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|
|
@@ -164,4 +164,4 @@
|
|
|
164
164
|
"publishConfig": {
|
|
165
165
|
"registry": "https://registry.npmjs.org/"
|
|
166
166
|
}
|
|
167
|
-
}
|
|
167
|
+
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const ButtonStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
|
-
export declare const ViewWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
6
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
7
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
8
|
-
export declare const ListStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
9
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
10
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
11
|
-
export declare const DropdownStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
12
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
13
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
14
|
-
export declare const MenuItem: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
15
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
16
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
17
|
-
addColumnViewEl?: boolean | undefined;
|
|
18
|
-
}, {}, {}>;
|
|
19
|
-
export declare const Space: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
20
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
21
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
22
|
-
export declare const SpaceAfter: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
23
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
24
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { Box, styled } from '@mui/material';
|
|
2
|
-
export const ButtonStyled = styled(Box)(({ theme }) => ({
|
|
3
|
-
display: 'flex',
|
|
4
|
-
alignItems: 'center',
|
|
5
|
-
justifyContent: 'space-between',
|
|
6
|
-
borderRadius: '4px',
|
|
7
|
-
background: theme.palette.common.white,
|
|
8
|
-
padding: '8px',
|
|
9
|
-
border: '1px solid',
|
|
10
|
-
borderColor: theme.palette.divider,
|
|
11
|
-
gap: 8,
|
|
12
|
-
height: 32,
|
|
13
|
-
cursor: 'pointer',
|
|
14
|
-
'&:hover': {
|
|
15
|
-
border: '1px solid',
|
|
16
|
-
borderColor: theme.palette.info.dark,
|
|
17
|
-
boxShadow: theme.shadows[7],
|
|
18
|
-
},
|
|
19
|
-
}));
|
|
20
|
-
export const ViewWrapper = styled(Box)(({ theme }) => ({
|
|
21
|
-
background: theme.palette.common.white,
|
|
22
|
-
display: 'flex',
|
|
23
|
-
gap: theme.spacing(1),
|
|
24
|
-
alignItems: 'center',
|
|
25
|
-
color: theme.palette.text.primary,
|
|
26
|
-
fontSize: '11px',
|
|
27
|
-
fontWeight: theme.typography.fontWeightRegular,
|
|
28
|
-
textTransform: 'capitalize',
|
|
29
|
-
position: 'relative',
|
|
30
|
-
transition: '0.5s',
|
|
31
|
-
'&:after': {
|
|
32
|
-
content: '""',
|
|
33
|
-
position: 'absolute',
|
|
34
|
-
left: -8,
|
|
35
|
-
right: 0,
|
|
36
|
-
width: '100%',
|
|
37
|
-
height: '100%',
|
|
38
|
-
boxShadow: theme.shadows[11],
|
|
39
|
-
borderRadius: theme.spacing(0.5),
|
|
40
|
-
paddingInlineStart: theme.spacing(1),
|
|
41
|
-
paddingTop: '9px',
|
|
42
|
-
paddingBottom: '9px',
|
|
43
|
-
paddingInlineEnd: '9px',
|
|
44
|
-
zIndex: -1,
|
|
45
|
-
},
|
|
46
|
-
}));
|
|
47
|
-
export const ListStyled = styled(Box)(({ theme }) => ({
|
|
48
|
-
background: theme.palette.common.white,
|
|
49
|
-
borderRadius: theme.spacing(1),
|
|
50
|
-
boxShadow: theme.shadows[5],
|
|
51
|
-
border: '1px solid',
|
|
52
|
-
borderColor: theme.palette.divider,
|
|
53
|
-
zIndex: 5,
|
|
54
|
-
fontSize: '11px',
|
|
55
|
-
width: 192,
|
|
56
|
-
}));
|
|
57
|
-
export const DropdownStyled = styled(Box)(() => ({
|
|
58
|
-
minWidth: 160,
|
|
59
|
-
position: 'relative',
|
|
60
|
-
}));
|
|
61
|
-
export const MenuItem = styled(Box, { shouldForwardProp: (props) => props !== 'addColumnViewEl' })(({ theme }) => ({
|
|
62
|
-
padding: theme.spacing(1),
|
|
63
|
-
paddingInlineEnd: 2,
|
|
64
|
-
borderBottom: '1px solid',
|
|
65
|
-
borderColor: theme.palette.divider,
|
|
66
|
-
display: 'flex',
|
|
67
|
-
alignItems: 'center',
|
|
68
|
-
height: 32,
|
|
69
|
-
cursor: 'pointer',
|
|
70
|
-
img: {
|
|
71
|
-
height: 12,
|
|
72
|
-
},
|
|
73
|
-
'.check-icon': {
|
|
74
|
-
height: 'auto',
|
|
75
|
-
marginInlineEnd: theme.spacing(1),
|
|
76
|
-
},
|
|
77
|
-
'&:hover': {
|
|
78
|
-
color: theme.palette.info.dark,
|
|
79
|
-
fontWeight: theme.typography.fontWeightBold,
|
|
80
|
-
},
|
|
81
|
-
'&.add-column': {
|
|
82
|
-
justifyContent: 'space-between',
|
|
83
|
-
paddingInlineEnd: theme.spacing(1),
|
|
84
|
-
position: 'relative',
|
|
85
|
-
border: 'none',
|
|
86
|
-
zIndex: 5,
|
|
87
|
-
borderBottom: '1px solid',
|
|
88
|
-
borderColor: theme.palette.divider,
|
|
89
|
-
borderTopRightRadius: theme.spacing(1),
|
|
90
|
-
borderTopLeftRadius: theme.spacing(1),
|
|
91
|
-
'&:hover': {
|
|
92
|
-
boxShadow: theme.shadows[6],
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
}));
|
|
96
|
-
export const Space = styled(Box)(({ theme }) => ({
|
|
97
|
-
width: 12,
|
|
98
|
-
marginInlineEnd: theme.spacing(1),
|
|
99
|
-
}));
|
|
100
|
-
export const SpaceAfter = styled(Box)(() => ({
|
|
101
|
-
width: 16,
|
|
102
|
-
}));
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TableHeaderProps } from '../type';
|
|
3
|
-
export interface CustomViewsProps {
|
|
4
|
-
open: boolean;
|
|
5
|
-
onSelect: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
6
|
-
setTableViews: TableHeaderProps['setTableViews'];
|
|
7
|
-
tableViews: TableHeaderProps['tableViews'];
|
|
8
|
-
anchorEl: Element | null;
|
|
9
|
-
onClose?: () => void;
|
|
10
|
-
}
|
|
File without changes
|