@tap-payments/os-micro-frontend-shared 0.0.296-test.1-test.2 → 0.0.296-test.1-test.2-test.3-test.4-test.5
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/MaskedText/MaskedText.js +1 -3
- package/build/components/VirtualTable/SheetView/SheetViewVirtualTable.js +6 -5
- package/build/components/VirtualTable/SheetView/components/SheetViewTableRowLoading.d.ts +3 -1
- package/build/components/VirtualTable/SheetView/components/SheetViewTableRowLoading.js +7 -5
- package/build/components/VirtualTable/components/virtualScroll/ListItemWrapper.d.ts +6 -2
- package/build/components/VirtualTable/components/virtualScroll/ListItemWrapper.js +42 -5
- package/build/components/index.d.ts +0 -1
- package/build/components/index.js +0 -1
- package/package.json +2 -2
- package/build/components/SourceChips/AuthenticationChip/AuthenticationChip.d.ts +0 -7
- package/build/components/SourceChips/AuthenticationChip/AuthenticationChip.js +0 -31
- package/build/components/SourceChips/AuthenticationChip/constants.d.ts +0 -30
- package/build/components/SourceChips/AuthenticationChip/constants.js +0 -25
- package/build/components/SourceChips/AuthenticationChip/index.d.ts +0 -3
- package/build/components/SourceChips/AuthenticationChip/index.js +0 -2
- package/build/components/SourceChips/GeographyChip/GeographyChip.d.ts +0 -7
- package/build/components/SourceChips/GeographyChip/GeographyChip.js +0 -22
- package/build/components/SourceChips/GeographyChip/constants.d.ts +0 -16
- package/build/components/SourceChips/GeographyChip/constants.js +0 -11
- package/build/components/SourceChips/GeographyChip/index.d.ts +0 -2
- package/build/components/SourceChips/GeographyChip/index.js +0 -2
- package/build/components/SourceChips/PaymentAgreementChip/PaymentAgreementChip.d.ts +0 -7
- package/build/components/SourceChips/PaymentAgreementChip/PaymentAgreementChip.js +0 -21
- package/build/components/SourceChips/PaymentAgreementChip/constants.d.ts +0 -21
- package/build/components/SourceChips/PaymentAgreementChip/constants.js +0 -16
- package/build/components/SourceChips/PaymentAgreementChip/index.d.ts +0 -3
- package/build/components/SourceChips/PaymentAgreementChip/index.js +0 -2
- package/build/components/SourceChips/index.d.ts +0 -3
- package/build/components/SourceChips/index.js +0 -3
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import StatusChip from '../StatusChip';
|
|
3
|
-
import { Box, useTheme } from '@mui/material';
|
|
4
3
|
import { passwordDotsIcon } from '../../constants/index.js';
|
|
5
4
|
const MaskedText = ({ text, startLength = 8, endLength = 4 }) => {
|
|
6
|
-
const theme = useTheme();
|
|
7
5
|
const startText = text.slice(0, startLength);
|
|
8
6
|
const endText = text.slice(text.length - endLength);
|
|
9
|
-
return (_jsxs(
|
|
7
|
+
return (_jsxs(StatusChip, Object.assign({ sx: { display: 'flex', alignItems: 'center', gap: '4px' } }, { children: [startText, _jsx("img", { src: passwordDotsIcon, alt: "passwordDots" }), endText] })));
|
|
10
8
|
};
|
|
11
9
|
export default MaskedText;
|
|
@@ -25,7 +25,7 @@ import { SheetViewVirtualTableWrapper, PinnedStartColumnWrapper, PinnedEndColumn
|
|
|
25
25
|
import SheetViewTableHeader from './components/SheetViewTableHeader';
|
|
26
26
|
import { usePinnedColumns } from './hooks/usePinnedColumns';
|
|
27
27
|
import { useSynchronizedScroll } from './hooks/useSynchronizedScroll';
|
|
28
|
-
const createItemData = memoize((columns, isLoading, rows, rowProps, scrollToIndex, lastItemIndex, totalCount, isError, areAllRowsLoaded, isPinned, selectedCell, selectedColumn, onCellClick, containerHeight, rowHeight) => ({
|
|
28
|
+
const createItemData = memoize((columns, isLoading, rows, rowProps, scrollToIndex, lastItemIndex, totalCount, isError, areAllRowsLoaded, isPinned, selectedCell, selectedColumn, onCellClick, containerHeight, rowHeight, containerType) => ({
|
|
29
29
|
columns,
|
|
30
30
|
isLoading,
|
|
31
31
|
rows,
|
|
@@ -44,6 +44,7 @@ const createItemData = memoize((columns, isLoading, rows, rowProps, scrollToInde
|
|
|
44
44
|
onCellClick,
|
|
45
45
|
containerHeight,
|
|
46
46
|
rowHeight,
|
|
47
|
+
containerType,
|
|
47
48
|
}));
|
|
48
49
|
function SheetViewVirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, rowHeight = 28, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, showBackgroundColor, areAllRowsLoaded = false, tableBodyStyles, tableTitle, dragControls, onColumnPin, clearBackdropVisibilityTimeout = 100, isPinnable = false, tableMode, }) {
|
|
49
50
|
const theme = useTheme();
|
|
@@ -113,12 +114,12 @@ function SheetViewVirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, sho
|
|
|
113
114
|
areAllRowsLoaded,
|
|
114
115
|
];
|
|
115
116
|
const commonItemDataSuffix = [selectedCell, selectedColumn, handleCellClick, height, rowHeight];
|
|
116
|
-
const getItemDataForContainer = (columnsData, isPinnedColumn) => createItemData(columnsData, ...commonItemDataParams, isPinnedColumn, ...commonItemDataSuffix);
|
|
117
|
+
const getItemDataForContainer = (columnsData, isPinnedColumn, containerType) => createItemData(columnsData, ...commonItemDataParams, isPinnedColumn, ...commonItemDataSuffix, containerType);
|
|
117
118
|
const currentItemData = containerKey === 'pinnedStart'
|
|
118
|
-
? getItemDataForContainer(pinnedStartColumnsData, true)
|
|
119
|
+
? getItemDataForContainer(pinnedStartColumnsData, true, 'pinnedStart')
|
|
119
120
|
: containerKey === 'pinnedEnd'
|
|
120
|
-
? getItemDataForContainer(pinnedEndColumnsData, true)
|
|
121
|
-
: getItemDataForContainer(unpinnedColumnsData, false);
|
|
121
|
+
? getItemDataForContainer(pinnedEndColumnsData, true, 'pinnedEnd')
|
|
122
|
+
: getItemDataForContainer(unpinnedColumnsData, false, 'scrollable');
|
|
122
123
|
return (_jsx(StyledVirtualList, Object.assign({ listRef: listRef, height: height, width: fixedWidth || width, itemCount: tableItemsCount, itemSize: getItemSize, itemData: currentItemData, onItemsRendered: onItemsRendered, overscanCount: TABLE_LIST_OVER_SCAN, setBackdropVisibility: setShowBackdrop, scrollToIndex: scrollToIndex, areTotalRowsNotFillingHeight: areTotalRowsNotFillingHeight, useIsScrolling: true, onScroll: handleScrollCallback, clearBackdropVisibilityTimeout: clearBackdropVisibilityTimeout, style: {
|
|
123
124
|
overflowX: isPinned ? 'hidden' : 'auto',
|
|
124
125
|
paddingBottom: isPinned ? '25px' : '13px',
|
|
@@ -6,7 +6,9 @@ interface ISheetViewTableRowLoadingProps {
|
|
|
6
6
|
animationType?: AnimationType;
|
|
7
7
|
style?: CSSProperties;
|
|
8
8
|
rowIndex?: number;
|
|
9
|
+
useTableBackground?: boolean;
|
|
10
|
+
containerType?: 'pinnedStart' | 'pinnedEnd' | 'default';
|
|
9
11
|
}
|
|
10
|
-
declare function SheetViewTableRowLoading({ columns, style, index, animationType, rowIndex }: ISheetViewTableRowLoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function SheetViewTableRowLoading({ columns, style, index, animationType, rowIndex, useTableBackground, containerType, }: ISheetViewTableRowLoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
11
13
|
declare const _default: import("react").MemoExoticComponent<typeof SheetViewTableRowLoading>;
|
|
12
14
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
import Skeleton from '@mui/material/Skeleton';
|
|
4
|
-
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { styled, useTheme } from '@mui/material/styles';
|
|
5
5
|
import TableCell from '@mui/material/TableCell';
|
|
6
6
|
import MUITableRow from '@mui/material/TableRow';
|
|
7
7
|
import { areEqual } from 'react-window';
|
|
@@ -11,14 +11,16 @@ const StyledSkeleton = styled(Skeleton)(() => ({
|
|
|
11
11
|
width: '100%',
|
|
12
12
|
minWidth: '20px',
|
|
13
13
|
}));
|
|
14
|
-
function SheetViewTableRowLoading({ columns, style, index, animationType, rowIndex = 0 }) {
|
|
15
|
-
|
|
14
|
+
function SheetViewTableRowLoading({ columns, style, index, animationType, rowIndex = 0, useTableBackground = false, containerType = 'default', }) {
|
|
15
|
+
const theme = useTheme();
|
|
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': {
|
|
16
17
|
backgroundColor: 'transparent !important',
|
|
17
18
|
} }), component: "div", hover: true }, { children: columns.map((column, colIndex) => {
|
|
18
19
|
var _a;
|
|
19
20
|
const isLastColumn = colIndex === columns.length - 1;
|
|
20
21
|
const isFirstColumn = colIndex === 0;
|
|
21
|
-
const shouldShowActualData = isFirstColumn && column.render;
|
|
22
|
+
const shouldShowActualData = (isFirstColumn && containerType === 'pinnedStart' && column.render) || column.skipSkeleton;
|
|
23
|
+
const shouldSkipSkeleton = containerType === 'pinnedStart' && index === 0;
|
|
22
24
|
return (_jsx(TableCell, Object.assign({ sx: {
|
|
23
25
|
width: column.width || `${100 / columns.length}%` || '20%',
|
|
24
26
|
paddingBlock: '0',
|
|
@@ -38,7 +40,7 @@ function SheetViewTableRowLoading({ columns, style, index, animationType, rowInd
|
|
|
38
40
|
row: {},
|
|
39
41
|
column,
|
|
40
42
|
value: rowIndex + 1,
|
|
41
|
-
})) : (_jsx(StyledSkeleton, { variant: "rectangular", animation: animationType, height: 16 })) }), `${column.id}-${colIndex}`));
|
|
43
|
+
})) : shouldSkipSkeleton ? (_jsx("div", { style: { width: '100%', height: '16px' } })) : (_jsx(StyledSkeleton, { variant: "rectangular", animation: animationType, height: 16 })) }), `${column.id}-${colIndex}`));
|
|
42
44
|
}) }), index));
|
|
43
45
|
}
|
|
44
46
|
export default memo(SheetViewTableRowLoading, areEqual);
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ListChildComponentProps } from 'react-window';
|
|
3
|
-
|
|
3
|
+
import type { IColumnProps } from '../../../../types/index.js';
|
|
4
|
+
export declare const LastRowContent: React.MemoExoticComponent<({ isLoadingRow, isSheetView, columns, currentRowCount, containerType, }: {
|
|
4
5
|
isLoadingRow: boolean;
|
|
5
6
|
isSheetView?: boolean | undefined;
|
|
7
|
+
columns?: IColumnProps<any>[] | undefined;
|
|
8
|
+
currentRowCount?: number | undefined;
|
|
9
|
+
containerType?: "default" | "pinnedStart" | "pinnedEnd" | undefined;
|
|
6
10
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
7
11
|
export declare const StyledItemWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
8
12
|
showShadowHighlight?: boolean | undefined;
|
|
9
13
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
-
declare function ListItemWrapper({ index, style, data: { renderedScrollTopRef, rows, rowProps, columns, isLoading, scrollToIndex,
|
|
14
|
+
declare function ListItemWrapper({ index, style, data: { renderedScrollTopRef, rows, rowProps, columns, isLoading, scrollToIndex, newLoadedRowsEndIndex, isError, areAllRowsLoaded, isSheetView, isPinned, containerType, ...restData }, }: Readonly<ListChildComponentProps>): import("react/jsx-runtime").JSX.Element;
|
|
11
15
|
export default ListItemWrapper;
|
|
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { Box } from '@mui/material';
|
|
15
15
|
import { styled } from '@mui/material/styles';
|
|
@@ -19,9 +19,18 @@ import { ActionIcon } from '../../style';
|
|
|
19
19
|
import { RowErrorState } from '../RowErrorState';
|
|
20
20
|
import { StyledParagraph } from '../TableLastItem';
|
|
21
21
|
import TableRow from '../TableRow';
|
|
22
|
-
|
|
22
|
+
import SheetViewTableRowLoading from '../../SheetView/components/SheetViewTableRowLoading';
|
|
23
|
+
export const LastRowContent = React.memo(({ isLoadingRow, isSheetView, columns, currentRowCount, containerType, }) => {
|
|
23
24
|
const { t } = useTranslation();
|
|
24
25
|
if (isLoadingRow) {
|
|
26
|
+
if (isSheetView && columns && (columns === null || columns === void 0 ? void 0 : columns.length) > 0) {
|
|
27
|
+
const loadingRows = [];
|
|
28
|
+
for (let i = 0; i < 3; i++) {
|
|
29
|
+
const rowIndex = (currentRowCount || 0) + i + 1;
|
|
30
|
+
loadingRows.push(_jsx(SheetViewTableRowLoading, { columns: columns, animationType: "wave", rowIndex: rowIndex, useTableBackground: true, containerType: containerType }, `loading-row-${i}`));
|
|
31
|
+
}
|
|
32
|
+
return _jsx(_Fragment, { children: loadingRows });
|
|
33
|
+
}
|
|
25
34
|
return (_jsxs(Box, Object.assign({ "data-testid": "ListItemWrapper_lastRowContent_isLoadingRow", sx: {
|
|
26
35
|
height: isSheetView ? '100%' : '24px',
|
|
27
36
|
width: '24px',
|
|
@@ -48,7 +57,7 @@ export const StyledItemWrapper = styled('div', {
|
|
|
48
57
|
}));
|
|
49
58
|
function ListItemWrapper(_a) {
|
|
50
59
|
var _b;
|
|
51
|
-
var { index, style } = _a, _c = _a.data, { renderedScrollTopRef, rows, rowProps, columns, isLoading, scrollToIndex,
|
|
60
|
+
var { index, style } = _a, _c = _a.data, { renderedScrollTopRef, rows, rowProps, columns, isLoading, scrollToIndex, newLoadedRowsEndIndex, isError, areAllRowsLoaded, isSheetView, isPinned = false, containerType } = _c, restData = __rest(_c, ["renderedScrollTopRef", "rows", "rowProps", "columns", "isLoading", "scrollToIndex", "newLoadedRowsEndIndex", "isError", "areAllRowsLoaded", "isSheetView", "isPinned", "containerType"]);
|
|
52
61
|
const lastItemIndex = rows.length - 1;
|
|
53
62
|
const row = rows[index];
|
|
54
63
|
const isLoadingRow = isLoading && index === lastItemIndex + 1;
|
|
@@ -56,12 +65,26 @@ function ListItemWrapper(_a) {
|
|
|
56
65
|
const rowClickHandler = React.useCallback(createRowClickHandler(row, rowProps === null || rowProps === void 0 ? void 0 : rowProps.onRowClick), [row, rowProps === null || rowProps === void 0 ? void 0 : rowProps.onRowClick]);
|
|
57
66
|
const memoizedRowProps = React.useMemo(() => (Object.assign(Object.assign({ showShadowHighlight: scrollToIndex === index, showLoadedStyle: isLoadedRow }, rowProps), { onClick: rowClickHandler })), [scrollToIndex, index, isLoadedRow, rowProps, rowClickHandler, isLoadingRow, areAllRowsLoaded, lastItemIndex]);
|
|
58
67
|
const memoizedListItemComponent = React.useMemo(() => {
|
|
59
|
-
const lastRowContent = _jsx(LastRowContent, { isSheetView: isSheetView, isLoadingRow: isLoadingRow });
|
|
68
|
+
const lastRowContent = (_jsx(LastRowContent, { isSheetView: isSheetView, isLoadingRow: isLoadingRow, columns: columns, currentRowCount: rows.length, containerType: containerType }));
|
|
60
69
|
const isLastRow = isLoadingRow || (areAllRowsLoaded && index === lastItemIndex + 1);
|
|
61
70
|
if (isPinned && isLastRow) {
|
|
71
|
+
if (isSheetView && isLoadingRow && columns && columns.length > 0) {
|
|
72
|
+
return (_jsx(Box, Object.assign({ sx: {
|
|
73
|
+
minHeight: SHEET_VIEW_TABLE_ROW_HEIGHT,
|
|
74
|
+
height: '100%',
|
|
75
|
+
width: '100%',
|
|
76
|
+
} }, { children: isError ? _jsx(RowErrorState, {}) : lastRowContent })));
|
|
77
|
+
}
|
|
62
78
|
return (_jsx(Box, { sx: Object.assign(Object.assign({}, (isSheetView ? { minHeight: SHEET_VIEW_TABLE_ROW_HEIGHT, height: '100%' } : { height: TABLE_ROW_HEIGHT })), { backgroundColor: '#F6F8FACC' }) }));
|
|
63
79
|
}
|
|
64
80
|
if (isLastRow) {
|
|
81
|
+
if (isSheetView && isLoadingRow && columns && columns.length > 0) {
|
|
82
|
+
return (_jsx(Box, Object.assign({ sx: {
|
|
83
|
+
minHeight: SHEET_VIEW_TABLE_ROW_HEIGHT,
|
|
84
|
+
height: '100%',
|
|
85
|
+
width: '100%',
|
|
86
|
+
} }, { children: isError ? _jsx(RowErrorState, {}) : lastRowContent })));
|
|
87
|
+
}
|
|
65
88
|
return (_jsx(Box, Object.assign({ sx: Object.assign(Object.assign({}, (isSheetView ? { minHeight: SHEET_VIEW_TABLE_ROW_HEIGHT, height: '100%' } : { height: TABLE_ROW_HEIGHT })), { display: 'flex', justifyContent: 'center', alignItems: 'center' }) }, { children: _jsx(Box, Object.assign({ sx: {
|
|
66
89
|
backgroundColor: '#F6F8FACC',
|
|
67
90
|
display: 'flex',
|
|
@@ -72,7 +95,21 @@ function ListItemWrapper(_a) {
|
|
|
72
95
|
} }, { children: isError ? _jsx(RowErrorState, {}) : lastRowContent })) })));
|
|
73
96
|
}
|
|
74
97
|
return (_jsx(TableRow, { index: index, row: row, columns: columns, rowProps: memoizedRowProps, isSheetView: isSheetView, selectedCell: restData.selectedCell, selectedColumn: restData.selectedColumn, onCellClick: restData.onCellClick, isLastRow: index === rows.length - 1 }, `row-${index}`));
|
|
75
|
-
}, [
|
|
98
|
+
}, [
|
|
99
|
+
restData,
|
|
100
|
+
index,
|
|
101
|
+
row,
|
|
102
|
+
columns,
|
|
103
|
+
memoizedRowProps,
|
|
104
|
+
isSheetView,
|
|
105
|
+
isLoadingRow,
|
|
106
|
+
isError,
|
|
107
|
+
areAllRowsLoaded,
|
|
108
|
+
lastItemIndex,
|
|
109
|
+
isPinned,
|
|
110
|
+
rows.length,
|
|
111
|
+
containerType,
|
|
112
|
+
]);
|
|
76
113
|
return (_jsx("div", Object.assign({ "data-testid": "ListItemWrapper", style: Object.assign(Object.assign({}, style), { top: Number(style.top) - ((_b = renderedScrollTopRef === null || renderedScrollTopRef === void 0 ? void 0 : renderedScrollTopRef.current) !== null && _b !== void 0 ? _b : 0), willChange: 'top' }) }, { children: _jsx(StyledItemWrapper, Object.assign({ "data-testid": "ListItemWrapper_StyledItemWrapper" }, { children: memoizedListItemComponent })) })));
|
|
77
114
|
}
|
|
78
115
|
export default ListItemWrapper;
|
|
@@ -94,6 +94,5 @@ export * from './StatusGroupChips';
|
|
|
94
94
|
export * from './TableHeader';
|
|
95
95
|
export { default as RangeCalender } from './RangeCalender';
|
|
96
96
|
export { default as AppServices } from './AppServices';
|
|
97
|
-
export * from './SourceChips';
|
|
98
97
|
export { default as ScrollLoader } from './ScrollLoader';
|
|
99
98
|
export * from './ScrollLoader';
|
|
@@ -94,6 +94,5 @@ export * from './StatusGroupChips';
|
|
|
94
94
|
export * from './TableHeader';
|
|
95
95
|
export { default as RangeCalender } from './RangeCalender';
|
|
96
96
|
export { default as AppServices } from './AppServices';
|
|
97
|
-
export * from './SourceChips';
|
|
98
97
|
export { default as ScrollLoader } from './ScrollLoader';
|
|
99
98
|
export * from './ScrollLoader';
|
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.0.296-test.1-test.2",
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.0.296-test.1-test.2-test.3-test.4-test.5",
|
|
5
|
+
"testVersion": 5,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { StatusChipProps } from '../../StatusChip';
|
|
2
|
-
export type AuthenticationChipType = 'issuer' | 'scheme' | 'device' | 'app' | 'wallet' | '3DS' | 'Device Biometric' | 'Non-3DS';
|
|
3
|
-
interface AuthenticationChipProps extends Omit<StatusChipProps, 'children'> {
|
|
4
|
-
authenticationType?: AuthenticationChipType;
|
|
5
|
-
}
|
|
6
|
-
declare const AuthenticationChip: ({ authenticationType, unknownText, ...props }: AuthenticationChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default AuthenticationChip;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import StatusChip from '../../StatusChip';
|
|
14
|
-
import { authenticationColors } from './constants';
|
|
15
|
-
const authenticationTypeMap = {
|
|
16
|
-
issuer: 'Issuer',
|
|
17
|
-
scheme: 'Scheme',
|
|
18
|
-
device: 'Device',
|
|
19
|
-
app: 'App',
|
|
20
|
-
wallet: 'Wallet',
|
|
21
|
-
'Device Biometric': 'Biometric',
|
|
22
|
-
'3DS': '3DS',
|
|
23
|
-
'Non-3DS': 'Non-3DS',
|
|
24
|
-
};
|
|
25
|
-
const AuthenticationChip = (_a) => {
|
|
26
|
-
var { authenticationType, unknownText = 'noAuth' } = _a, props = __rest(_a, ["authenticationType", "unknownText"]);
|
|
27
|
-
const statusText = authenticationType && authenticationTypeMap[authenticationType];
|
|
28
|
-
const chipColors = authenticationType && authenticationColors[authenticationType];
|
|
29
|
-
return (_jsx(StatusChip, Object.assign({}, chipColors, { unknownText: unknownText }, props, { children: statusText })));
|
|
30
|
-
};
|
|
31
|
-
export default AuthenticationChip;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export interface AuthenticationColors {
|
|
2
|
-
bgColor: string;
|
|
3
|
-
borderColor?: string;
|
|
4
|
-
textColor?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const authenticationColors: {
|
|
7
|
-
issuer: {
|
|
8
|
-
bgColor: string;
|
|
9
|
-
textColor: string;
|
|
10
|
-
};
|
|
11
|
-
scheme: {
|
|
12
|
-
bgColor: string;
|
|
13
|
-
textColor: string;
|
|
14
|
-
};
|
|
15
|
-
app: {
|
|
16
|
-
bgColor: string;
|
|
17
|
-
textColor: string;
|
|
18
|
-
};
|
|
19
|
-
wallet: {
|
|
20
|
-
bgColor: string;
|
|
21
|
-
textColor: string;
|
|
22
|
-
};
|
|
23
|
-
device: {};
|
|
24
|
-
'Device Biometric': {
|
|
25
|
-
bgColor: string;
|
|
26
|
-
textColor: string;
|
|
27
|
-
};
|
|
28
|
-
'3DS': {};
|
|
29
|
-
'Non-3DS': {};
|
|
30
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export const authenticationColors = {
|
|
2
|
-
issuer: {
|
|
3
|
-
bgColor: '#1F88D033',
|
|
4
|
-
textColor: '#1F88D0',
|
|
5
|
-
},
|
|
6
|
-
scheme: {
|
|
7
|
-
bgColor: '#5E30EB33',
|
|
8
|
-
textColor: '#5E30EB',
|
|
9
|
-
},
|
|
10
|
-
app: {
|
|
11
|
-
bgColor: '#AF2D6F33',
|
|
12
|
-
textColor: '#AF2D6F',
|
|
13
|
-
},
|
|
14
|
-
wallet: {
|
|
15
|
-
bgColor: '#18AA3333',
|
|
16
|
-
textColor: '#18AA33',
|
|
17
|
-
},
|
|
18
|
-
device: {},
|
|
19
|
-
'Device Biometric': {
|
|
20
|
-
bgColor: '#F0820033',
|
|
21
|
-
textColor: '#F08200',
|
|
22
|
-
},
|
|
23
|
-
'3DS': {},
|
|
24
|
-
'Non-3DS': {},
|
|
25
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { StatusChipProps } from '../../StatusChip';
|
|
2
|
-
import { GeographyVariant } from '../../../types/index.js';
|
|
3
|
-
interface GeographyChipProps extends Omit<StatusChipProps, 'children'> {
|
|
4
|
-
geographyVariant?: GeographyVariant;
|
|
5
|
-
}
|
|
6
|
-
declare const GeographyChip: ({ geographyVariant, ...props }: GeographyChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default GeographyChip;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import StatusChip from '../../StatusChip';
|
|
14
|
-
import { geographyMap } from '../../../utils/index.js';
|
|
15
|
-
import { geographyColors } from './constants';
|
|
16
|
-
const GeographyChip = (_a) => {
|
|
17
|
-
var { geographyVariant } = _a, props = __rest(_a, ["geographyVariant"]);
|
|
18
|
-
const statusText = geographyVariant && geographyMap[geographyVariant];
|
|
19
|
-
const chipColors = geographyVariant && geographyColors[geographyVariant];
|
|
20
|
-
return (_jsx(StatusChip, Object.assign({}, chipColors, props, { children: statusText })));
|
|
21
|
-
};
|
|
22
|
-
export default GeographyChip;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { StatusChipProps } from '../../StatusChip';
|
|
2
|
-
export type PaymentAgreementType = 'ORDER' | 'SAVED_CARD' | 'SUBSCRIPTION' | 'INSTALLMENT' | undefined;
|
|
3
|
-
interface PaymentAgreementChipProps extends Omit<StatusChipProps, 'children'> {
|
|
4
|
-
agreementType?: PaymentAgreementType;
|
|
5
|
-
}
|
|
6
|
-
declare const PaymentAgreementChip: ({ agreementType, unknownText, ...props }: PaymentAgreementChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default PaymentAgreementChip;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import StatusChip from '../../StatusChip';
|
|
14
|
-
import { agreementTypeMap, paymentAgreementColors } from './constants';
|
|
15
|
-
const PaymentAgreementChip = (_a) => {
|
|
16
|
-
var { agreementType, unknownText = 'noAgreement' } = _a, props = __rest(_a, ["agreementType", "unknownText"]);
|
|
17
|
-
const statusText = agreementType && agreementTypeMap[agreementType];
|
|
18
|
-
const chipColors = agreementType && paymentAgreementColors[agreementType];
|
|
19
|
-
return (_jsx(StatusChip, Object.assign({}, chipColors, { unknownText: unknownText }, props, { children: statusText })));
|
|
20
|
-
};
|
|
21
|
-
export default PaymentAgreementChip;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface PaymentAgreementColors {
|
|
2
|
-
bgColor: string;
|
|
3
|
-
borderColor?: string;
|
|
4
|
-
textColor?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const paymentAgreementColors: {
|
|
7
|
-
ORDER: {
|
|
8
|
-
bgColor: string;
|
|
9
|
-
textColor: string;
|
|
10
|
-
};
|
|
11
|
-
SAVED_CARD: {
|
|
12
|
-
bgColor: string;
|
|
13
|
-
textColor: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export declare const agreementTypeMap: {
|
|
17
|
-
ORDER: string;
|
|
18
|
-
SAVED_CARD: string;
|
|
19
|
-
SUBSCRIPTION: string;
|
|
20
|
-
INSTALLMENT: string;
|
|
21
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export const paymentAgreementColors = {
|
|
2
|
-
ORDER: {
|
|
3
|
-
bgColor: '#5E30EB33',
|
|
4
|
-
textColor: '#5E30EB',
|
|
5
|
-
},
|
|
6
|
-
SAVED_CARD: {
|
|
7
|
-
bgColor: '#76BB4033',
|
|
8
|
-
textColor: '#76BB40',
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
export const agreementTypeMap = {
|
|
12
|
-
ORDER: 'Order',
|
|
13
|
-
SAVED_CARD: 'Saved card',
|
|
14
|
-
SUBSCRIPTION: 'Subscription',
|
|
15
|
-
INSTALLMENT: 'Installment',
|
|
16
|
-
};
|