@tap-payments/os-micro-frontend-shared 0.1.327-test.5 → 0.1.328
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 +1 -0
- package/build/components/Chip/style.d.ts +1 -0
- package/build/components/ColorPicker/ColorPicker.js +1 -1
- package/build/components/CountBadge/style.d.ts +1 -0
- package/build/components/Dialog/style.d.ts +1 -0
- package/build/components/FlippingCard/style.d.ts +1 -0
- package/build/components/ImageWrapper/ImageWrapper.d.ts +1 -0
- package/build/components/JSONViewer/style.d.ts +1 -0
- package/build/components/LeftPeekRightExpandingChip/style.d.ts +1 -0
- package/build/components/PaymentSourceFilter/PaymentMethod.js +1 -2
- package/build/components/PaymentSourceFilter/PaymentSchemes.js +1 -2
- package/build/components/PaymentSourceFilter/style.d.ts +0 -4
- package/build/components/PaymentSourceFilter/style.js +0 -10
- package/build/components/RightLeftExpandingCenterChip/style.d.ts +1 -0
- package/build/components/SearchButton/styles.d.ts +1 -0
- package/build/components/StatusIcons/AuthIcons/style.d.ts +1 -0
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +1 -0
- package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +1 -0
- package/build/components/StatusIcons/SourceIcons/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/IDButton/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/style.d.ts +1 -0
- package/build/components/TableReports/components/DownloadButton/style.d.ts +1 -0
- package/build/components/TableReports/style.d.ts +1 -0
- package/build/components/VirtualTables/components/style.d.ts +1 -0
- package/build/types/segment.d.ts +1 -7
- package/build/types/segment.js +0 -6
- package/build/utils/merchantSource.d.ts +2 -0
- package/build/utils/merchantSource.js +6 -4
- package/build/utils/segment.d.ts +0 -64
- package/build/utils/segment.js +1 -52
- package/package.json +3 -3
- package/build/components/PaymentSourceFilter/PaymentIcon.d.ts +0 -5
- package/build/components/PaymentSourceFilter/PaymentIcon.js +0 -9
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
import { GetSourceAnimationFunction } from './type';
|
|
3
4
|
export declare const ChipStyled: import("@emotion/styled").StyledComponent<import("react").RefAttributes<unknown> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
4
5
|
variant?: import("./type").ChipVariant | undefined;
|
|
@@ -30,6 +30,6 @@ const ColorPicker = ({ value = '#ffffff', onChange, onReset, sx, options = DEFAU
|
|
|
30
30
|
onChange(disableAlpha ? newValue.substring(0, 7) : newValue);
|
|
31
31
|
setAnchorEl(null);
|
|
32
32
|
}, [onChange, disableAlpha]);
|
|
33
|
-
return (_jsx(ClickAwayListener, Object.assign({ onClickAway: () => setAnchorEl(null) }, { children: _jsxs(Stack, Object.assign({ ref: rootRef, bgcolor: "grey.400", borderRadius: "4px", p: "4px", pr: "12px", direction: "row", justifyContent: "space-between", spacing: 1, alignItems: "center", className: "color-picker", sx: sx }, { children: [_jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center", className: "color-picker__controls-wrapper" }, { children: [_jsx(Box, { borderRadius: "5px", width: 32, height: 32, sx: { backgroundColor: value }, className: "color-picker__viewer" }), _jsxs(Box, Object.assign({ className: "color-picker__actions-wrapper" }, { children: [_jsx(Typography, Object.assign({ className: "color-picker__label", fontWeight: 500, fontSize: 9, color: "text.primary", textTransform: "uppercase" }, { children: value })), _jsx(EditButton, Object.assign({ className: "color-picker__edit-btn", onClick: handleOpen, disabled: disabled }, { children: "Edit" }))] }))] })), !hideReset ? (_jsx(StyledCloseButtonWrapper, Object.assign({ className: "color-picker__close-btn", type: "button", disabled: disabled, onClick: onReset }, { children: _jsx(Box, { component: "img", src: closeXIcon, width: 10, height: 10 }) }))) : (_jsx("div", {})), _jsx(Popper, Object.assign({ anchorEl: anchorEl, open: !!anchorEl, placement: "top" }, { children: _jsx(ColorPickerPanel, { initialValue: value, onCancel: handleCancel, onConfirm: handleConfirm, disableAlpha: disableAlpha }) }))] })) })));
|
|
33
|
+
return (_jsx(ClickAwayListener, Object.assign({ onClickAway: () => setAnchorEl(null) }, { children: _jsxs(Stack, Object.assign({ ref: rootRef, bgcolor: "grey.400", borderRadius: "4px", p: "4px", pr: "12px", direction: "row", justifyContent: "space-between", spacing: 1, alignItems: "center", className: "color-picker", sx: sx }, { children: [_jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center", className: "color-picker__controls-wrapper" }, { children: [_jsx(Box, { borderRadius: "5px", width: 32, height: 32, sx: { backgroundColor: value }, className: "color-picker__viewer" }), _jsxs(Box, Object.assign({ className: "color-picker__actions-wrapper" }, { children: [_jsx(Typography, Object.assign({ className: "color-picker__label", fontWeight: 500, fontSize: 9, color: "text.primary", textTransform: "uppercase" }, { children: value })), _jsx(EditButton, Object.assign({ className: "color-picker__edit-btn", type: "button", onClick: handleOpen, disabled: disabled }, { children: "Edit" }))] }))] })), !hideReset ? (_jsx(StyledCloseButtonWrapper, Object.assign({ className: "color-picker__close-btn", type: "button", disabled: disabled, onClick: onReset }, { children: _jsx(Box, { component: "img", src: closeXIcon, width: 10, height: 10 }) }))) : (_jsx("div", {})), _jsx(Popper, Object.assign({ anchorEl: anchorEl, open: !!anchorEl, placement: "top" }, { children: _jsx(ColorPickerPanel, { initialValue: value, onCancel: handleCancel, onConfirm: handleConfirm, disableAlpha: disableAlpha }) }))] })) })));
|
|
34
34
|
};
|
|
35
35
|
export default ColorPicker;
|
|
@@ -14,7 +14,6 @@ import { useState, useCallback, useMemo } from 'react';
|
|
|
14
14
|
import { Menu } from '../index.js';
|
|
15
15
|
import { rightArrow } from '../../constants/index.js';
|
|
16
16
|
import { MenuItemStyled } from './style';
|
|
17
|
-
import { PaymentIcon } from './PaymentIcon';
|
|
18
17
|
export default function PaymentMethod({ icon, name, options = [], filters, setFilters }) {
|
|
19
18
|
var _a;
|
|
20
19
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
@@ -51,5 +50,5 @@ export default function PaymentMethod({ icon, name, options = [], filters, setFi
|
|
|
51
50
|
setFilters(Object.assign(Object.assign({}, filters), { payment_methods: [...(paymentMethods !== null && paymentMethods !== void 0 ? paymentMethods : []), selectedPaymentMethod] }));
|
|
52
51
|
}
|
|
53
52
|
};
|
|
54
|
-
return (_jsxs(MenuItemStyled, Object.assign({ isSelected: isSelected, isIndeterminate: isIndeterminate, onMouseEnter: onOpen, onMouseLeave: onClose, onClick: onClick }, { children: [_jsx("img", { src: icon, alt: name }), _jsx("span", Object.assign({ className: "label" }, { children: name })), _jsx("img", { src: rightArrow, alt: "arrow", style: { height: 12 } }), _jsx(Menu, Object.assign({ open: Boolean(anchorEl), anchorEl: anchorEl, placement: "right-end" }, { children: options === null || options === void 0 ? void 0 : options.map((option) => (_jsx(MenuItemStyled, Object.assign({ isSelected: isSelectedPaymentMethod(option.type), onClick: (e) => onClickPaymentMethod(e, option.type) }, { children: _jsx(
|
|
53
|
+
return (_jsxs(MenuItemStyled, Object.assign({ isSelected: isSelected, isIndeterminate: isIndeterminate, onMouseEnter: onOpen, onMouseLeave: onClose, onClick: onClick }, { children: [_jsx("img", { src: icon, alt: name }), _jsx("span", Object.assign({ className: "label" }, { children: name })), _jsx("img", { src: rightArrow, alt: "arrow", style: { height: 12 } }), _jsx(Menu, Object.assign({ open: Boolean(anchorEl), anchorEl: anchorEl, placement: "right-end" }, { children: options === null || options === void 0 ? void 0 : options.map((option) => (_jsx(MenuItemStyled, Object.assign({ isSelected: isSelectedPaymentMethod(option.type), onClick: (e) => onClickPaymentMethod(e, option.type) }, { children: _jsx("img", { src: option.icon, alt: option === null || option === void 0 ? void 0 : option.name, style: { height: 24, width: 36, objectFit: 'contain' } }) }), option.type))) }))] })));
|
|
55
54
|
}
|
|
@@ -14,7 +14,6 @@ import { useCallback, useMemo, useState } from 'react';
|
|
|
14
14
|
import { Menu } from '../index.js';
|
|
15
15
|
import { rightArrow } from '../../constants/index.js';
|
|
16
16
|
import { MenuItemStyled } from './style';
|
|
17
|
-
import { PaymentIcon } from './PaymentIcon';
|
|
18
17
|
export default function PaymentSchemes({ paymentSchemesSource, filters, setFilters }) {
|
|
19
18
|
var _a, _b, _c, _d;
|
|
20
19
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
@@ -50,5 +49,5 @@ export default function PaymentSchemes({ paymentSchemesSource, filters, setFilte
|
|
|
50
49
|
setFilters(Object.assign(Object.assign({}, filters), { payment_scheme: [...((_b = filters === null || filters === void 0 ? void 0 : filters.payment_scheme) !== null && _b !== void 0 ? _b : []), selectedPaymentScheme] }));
|
|
51
50
|
}
|
|
52
51
|
};
|
|
53
|
-
return (_jsxs(MenuItemStyled, Object.assign({ isSelected: isSelected, isIndeterminate: isIndeterminate, onMouseEnter: onOpen, onMouseLeave: onClose, onClick: onClick, sx: Object.assign({}, (isDisabled && { opacity: 0.5, pointerEvents: 'none' })) }, { children: [_jsx("span", Object.assign({ className: "label" }, { children: paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.name })), _jsx("img", { src: rightArrow, alt: "arrow", style: { height: 12 } }), _jsx(Menu, Object.assign({ open: Boolean(anchorEl), anchorEl: anchorEl, placement: "right-start" }, { children: (_d = paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.options) === null || _d === void 0 ? void 0 : _d.map((scheme) => (_jsx(MenuItemStyled, Object.assign({ isSelected: isSelectedPaymentScheme(scheme.type), onClick: (e) => onClickPaymentScheme(e, scheme.type) }, { children: _jsx(
|
|
52
|
+
return (_jsxs(MenuItemStyled, Object.assign({ isSelected: isSelected, isIndeterminate: isIndeterminate, onMouseEnter: onOpen, onMouseLeave: onClose, onClick: onClick, sx: Object.assign({}, (isDisabled && { opacity: 0.5, pointerEvents: 'none' })) }, { children: [_jsx("span", Object.assign({ className: "label" }, { children: paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.name })), _jsx("img", { src: rightArrow, alt: "arrow", style: { height: 12 } }), _jsx(Menu, Object.assign({ open: Boolean(anchorEl), anchorEl: anchorEl, placement: "right-start" }, { children: (_d = paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.options) === null || _d === void 0 ? void 0 : _d.map((scheme) => (_jsx(MenuItemStyled, Object.assign({ isSelected: isSelectedPaymentScheme(scheme.type), onClick: (e) => onClickPaymentScheme(e, scheme.type) }, { children: _jsx("img", { src: scheme.icon, alt: scheme === null || scheme === void 0 ? void 0 : scheme.name, style: { height: 24 } }) }), scheme.type))) }))] })));
|
|
54
53
|
}
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const MenuItemStyled: import("@emotion/styled").StyledComponent<import("../MenuItem/MenuItem").MenuItemProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
3
|
-
export declare const PaymentChip: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
5
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { styled } from '@mui/material/styles';
|
|
2
|
-
import Box from '@mui/material/Box';
|
|
3
2
|
import { MenuItem } from '../index.js';
|
|
4
3
|
export const MenuItemStyled = styled(MenuItem)(({ theme }) => ({
|
|
5
4
|
height: 40,
|
|
@@ -11,12 +10,3 @@ export const MenuItemStyled = styled(MenuItem)(({ theme }) => ({
|
|
|
11
10
|
flexGrow: 1,
|
|
12
11
|
},
|
|
13
12
|
}));
|
|
14
|
-
export const PaymentChip = styled(Box)(({ theme }) => ({
|
|
15
|
-
width: 36,
|
|
16
|
-
height: 24,
|
|
17
|
-
border: `1px solid ${theme.palette.divider}`,
|
|
18
|
-
display: 'flex',
|
|
19
|
-
alignItems: 'center',
|
|
20
|
-
justifyContent: 'center',
|
|
21
|
-
borderRadius: '12px',
|
|
22
|
-
}));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
import { TableMode } from '../../../../types/index.js';
|
|
3
4
|
export declare const ActionCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
4
5
|
tableMode?: TableMode | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledAppsCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const AppsStatusContainer: import("@emotion/styled").StyledComponent<{
|
|
4
5
|
hidden?: boolean | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const AuthIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
3
4
|
export declare const AuthCellContainer: import("@emotion/styled").StyledComponent<{
|
|
4
5
|
hidden?: boolean | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledDownloadFileImageWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
3
4
|
isTextShown?: boolean | undefined;
|
|
4
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const SalesChannelsContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
4
5
|
hidden?: boolean | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const GeographyBox: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
3
4
|
variant?: "Global" | "Regional" | "Local" | undefined;
|
|
4
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
package/build/types/segment.d.ts
CHANGED
|
@@ -8,14 +8,8 @@ export declare enum SEGMENT_CODE {
|
|
|
8
8
|
BUSINESS = "BUSINESS",
|
|
9
9
|
PLATFORM = "PLATFORM",
|
|
10
10
|
DEVELOPMENT = "DEVELOPMENT",
|
|
11
|
-
PSP = "PSP",
|
|
12
11
|
PAYMENT_TECHNOLOGY = "PAYMENT_TECHNOLOGY",
|
|
13
12
|
PAYMENT_FACILITATOR = "PAYMENT_FACILITATOR",
|
|
14
13
|
PAYMENT_ACQUIRER = "PAYMENT_ACQUIRER",
|
|
15
|
-
PAYMENT_GATEWAY = "PAYMENT_GATEWAY"
|
|
16
|
-
BILLING_PLATFORM = "BILLING_PLATFORM",
|
|
17
|
-
COMMERCE_PLATFORM = "COMMERCE_PLATFORM",
|
|
18
|
-
DEVELOPMENT_HOUSE = "DEVELOPMENT_HOUSE",
|
|
19
|
-
PAYMENT_GATEWAY_PROVIDER = "PAYMENT_GATEWAY_PROVIDER",
|
|
20
|
-
RETAIL_PLATFORM = "RETAIL_PLATFORM"
|
|
14
|
+
PAYMENT_GATEWAY = "PAYMENT_GATEWAY"
|
|
21
15
|
}
|
package/build/types/segment.js
CHANGED
|
@@ -3,14 +3,8 @@ export var SEGMENT_CODE;
|
|
|
3
3
|
SEGMENT_CODE["BUSINESS"] = "BUSINESS";
|
|
4
4
|
SEGMENT_CODE["PLATFORM"] = "PLATFORM";
|
|
5
5
|
SEGMENT_CODE["DEVELOPMENT"] = "DEVELOPMENT";
|
|
6
|
-
SEGMENT_CODE["PSP"] = "PSP";
|
|
7
6
|
SEGMENT_CODE["PAYMENT_TECHNOLOGY"] = "PAYMENT_TECHNOLOGY";
|
|
8
7
|
SEGMENT_CODE["PAYMENT_FACILITATOR"] = "PAYMENT_FACILITATOR";
|
|
9
8
|
SEGMENT_CODE["PAYMENT_ACQUIRER"] = "PAYMENT_ACQUIRER";
|
|
10
9
|
SEGMENT_CODE["PAYMENT_GATEWAY"] = "PAYMENT_GATEWAY";
|
|
11
|
-
SEGMENT_CODE["BILLING_PLATFORM"] = "BILLING_PLATFORM";
|
|
12
|
-
SEGMENT_CODE["COMMERCE_PLATFORM"] = "COMMERCE_PLATFORM";
|
|
13
|
-
SEGMENT_CODE["DEVELOPMENT_HOUSE"] = "DEVELOPMENT_HOUSE";
|
|
14
|
-
SEGMENT_CODE["PAYMENT_GATEWAY_PROVIDER"] = "PAYMENT_GATEWAY_PROVIDER";
|
|
15
|
-
SEGMENT_CODE["RETAIL_PLATFORM"] = "RETAIL_PLATFORM";
|
|
16
10
|
})(SEGMENT_CODE || (SEGMENT_CODE = {}));
|
|
@@ -16,6 +16,7 @@ export declare function transformPaymentMethodsData(data?: PaymentMethod[]): {
|
|
|
16
16
|
options: {
|
|
17
17
|
name: string | undefined;
|
|
18
18
|
type: string;
|
|
19
|
+
icon: string;
|
|
19
20
|
}[];
|
|
20
21
|
}[] | undefined;
|
|
21
22
|
};
|
|
@@ -25,6 +26,7 @@ export declare function transformPaymentSchemesData(data?: Source[]): {
|
|
|
25
26
|
options: {
|
|
26
27
|
name: string | undefined;
|
|
27
28
|
type: string;
|
|
29
|
+
icon: string;
|
|
28
30
|
}[];
|
|
29
31
|
};
|
|
30
32
|
export {};
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import capitalize from 'lodash/capitalize';
|
|
2
|
-
import { PAYMENT_TYPES_ICONS } from '../constants/index.js';
|
|
2
|
+
import { lightUrl, PAYMENT_TYPES_ICONS } from '../constants/index.js';
|
|
3
3
|
import { getNameText } from './language';
|
|
4
4
|
export function transformPaymentMethodsData(data) {
|
|
5
5
|
return {
|
|
6
6
|
name: 'Payment Methods',
|
|
7
7
|
type: 'payment_methods',
|
|
8
8
|
options: data === null || data === void 0 ? void 0 : data.map((category) => {
|
|
9
|
-
var _a
|
|
9
|
+
var _a;
|
|
10
10
|
return {
|
|
11
11
|
name: capitalize(getNameText(category === null || category === void 0 ? void 0 : category.name)),
|
|
12
12
|
type: category === null || category === void 0 ? void 0 : category.code,
|
|
13
|
-
icon:
|
|
14
|
-
options: (
|
|
13
|
+
icon: PAYMENT_TYPES_ICONS[category.code],
|
|
14
|
+
options: (_a = category.payment_methods) === null || _a === void 0 ? void 0 : _a.map((method) => ({
|
|
15
15
|
name: getNameText(method.name),
|
|
16
16
|
type: method.code,
|
|
17
|
+
icon: `${lightUrl}/payment-method/${method.code}.svg`,
|
|
17
18
|
})),
|
|
18
19
|
};
|
|
19
20
|
}),
|
|
@@ -29,6 +30,7 @@ export function transformPaymentSchemesData(data = []) {
|
|
|
29
30
|
return {
|
|
30
31
|
name: getNameText(scheme === null || scheme === void 0 ? void 0 : scheme.name),
|
|
31
32
|
type: scheme === null || scheme === void 0 ? void 0 : scheme.code,
|
|
33
|
+
icon: `${lightUrl}/payment-method/${scheme.code}.svg`,
|
|
32
34
|
};
|
|
33
35
|
}),
|
|
34
36
|
};
|
package/build/utils/segment.d.ts
CHANGED
|
@@ -1,66 +1,2 @@
|
|
|
1
1
|
import { Segment, SegmentData } from '../types/index.js';
|
|
2
2
|
export declare const getSegmentData: (segments: Segment[], activeSegmentId: string, activeSegments: Segment[]) => SegmentData;
|
|
3
|
-
export declare const getBusinessSegmentConfig: (merchantsIds: string[]) => {
|
|
4
|
-
business?: undefined;
|
|
5
|
-
} | {
|
|
6
|
-
business: {
|
|
7
|
-
merchant: string[];
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export declare const getNonBusinessSegmentConfig: ({ segmentCode, segmentId, segmentTypeCode, }: {
|
|
11
|
-
segmentCode: string;
|
|
12
|
-
segmentTypeCode: string;
|
|
13
|
-
segmentId: string;
|
|
14
|
-
}) => {
|
|
15
|
-
payment_provider: {
|
|
16
|
-
technology: {
|
|
17
|
-
orchestrator: string[];
|
|
18
|
-
gateway?: undefined;
|
|
19
|
-
};
|
|
20
|
-
institution?: undefined;
|
|
21
|
-
};
|
|
22
|
-
platform?: undefined;
|
|
23
|
-
development_agency?: undefined;
|
|
24
|
-
} | {
|
|
25
|
-
payment_provider: {
|
|
26
|
-
technology: {
|
|
27
|
-
gateway: string[];
|
|
28
|
-
orchestrator?: undefined;
|
|
29
|
-
};
|
|
30
|
-
institution?: undefined;
|
|
31
|
-
};
|
|
32
|
-
platform?: undefined;
|
|
33
|
-
development_agency?: undefined;
|
|
34
|
-
} | {
|
|
35
|
-
payment_provider: {
|
|
36
|
-
institution: {
|
|
37
|
-
facilitator: string[];
|
|
38
|
-
acquirer?: undefined;
|
|
39
|
-
};
|
|
40
|
-
technology?: undefined;
|
|
41
|
-
};
|
|
42
|
-
platform?: undefined;
|
|
43
|
-
development_agency?: undefined;
|
|
44
|
-
} | {
|
|
45
|
-
payment_provider: {
|
|
46
|
-
institution: {
|
|
47
|
-
acquirer: string[];
|
|
48
|
-
facilitator?: undefined;
|
|
49
|
-
};
|
|
50
|
-
technology?: undefined;
|
|
51
|
-
};
|
|
52
|
-
platform?: undefined;
|
|
53
|
-
development_agency?: undefined;
|
|
54
|
-
} | {
|
|
55
|
-
platform: string[];
|
|
56
|
-
payment_provider?: undefined;
|
|
57
|
-
development_agency?: undefined;
|
|
58
|
-
} | {
|
|
59
|
-
development_agency: string[];
|
|
60
|
-
payment_provider?: undefined;
|
|
61
|
-
platform?: undefined;
|
|
62
|
-
} | {
|
|
63
|
-
payment_provider?: undefined;
|
|
64
|
-
platform?: undefined;
|
|
65
|
-
development_agency?: undefined;
|
|
66
|
-
};
|
package/build/utils/segment.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SEGMENT_CODE } from '../types/index.js';
|
|
2
1
|
import { getDefaultEntityCountry } from './entity';
|
|
3
2
|
export const getSegmentData = (segments, activeSegmentId, activeSegments) => {
|
|
4
3
|
var _a, _b, _c;
|
|
4
|
+
// debugger
|
|
5
5
|
const newSegment = (_a = segments.find((segment) => segment.id === activeSegmentId)) !== null && _a !== void 0 ? _a : {};
|
|
6
6
|
const activeSegment = (_b = activeSegments.find((segment) => segment.id === activeSegmentId)) !== null && _b !== void 0 ? _b : {};
|
|
7
7
|
const defaultCountry = activeSegment.countries.length === 1
|
|
@@ -11,54 +11,3 @@ export const getSegmentData = (segments, activeSegmentId, activeSegments) => {
|
|
|
11
11
|
return Object.assign(Object.assign({}, newSegment), { defaultCountry,
|
|
12
12
|
defaultEntity });
|
|
13
13
|
};
|
|
14
|
-
export const getBusinessSegmentConfig = (merchantsIds) => {
|
|
15
|
-
if (!merchantsIds || !(merchantsIds === null || merchantsIds === void 0 ? void 0 : merchantsIds.length))
|
|
16
|
-
return {};
|
|
17
|
-
return { business: { merchant: merchantsIds } };
|
|
18
|
-
};
|
|
19
|
-
export const getNonBusinessSegmentConfig = ({ segmentCode, segmentId, segmentTypeCode, }) => {
|
|
20
|
-
const code = SEGMENT_CODE.PSP === segmentTypeCode ? segmentCode : segmentTypeCode;
|
|
21
|
-
if (code === SEGMENT_CODE.PAYMENT_TECHNOLOGY) {
|
|
22
|
-
return {
|
|
23
|
-
payment_provider: {
|
|
24
|
-
technology: {
|
|
25
|
-
orchestrator: [segmentId],
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
if (code === SEGMENT_CODE.PAYMENT_GATEWAY || code === SEGMENT_CODE.PAYMENT_GATEWAY_PROVIDER) {
|
|
31
|
-
return {
|
|
32
|
-
payment_provider: {
|
|
33
|
-
technology: {
|
|
34
|
-
gateway: [segmentId],
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
if (code === SEGMENT_CODE.PAYMENT_FACILITATOR) {
|
|
40
|
-
return {
|
|
41
|
-
payment_provider: {
|
|
42
|
-
institution: {
|
|
43
|
-
facilitator: [segmentId],
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
if (code === SEGMENT_CODE.PAYMENT_ACQUIRER) {
|
|
49
|
-
return {
|
|
50
|
-
payment_provider: {
|
|
51
|
-
institution: {
|
|
52
|
-
acquirer: [segmentId],
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
if (code === SEGMENT_CODE.PLATFORM) {
|
|
58
|
-
return { platform: [segmentId] };
|
|
59
|
-
}
|
|
60
|
-
if (code === SEGMENT_CODE.DEVELOPMENT) {
|
|
61
|
-
return { development_agency: [segmentId] };
|
|
62
|
-
}
|
|
63
|
-
return {};
|
|
64
|
-
};
|
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.328",
|
|
5
|
+
"testVersion": 0,
|
|
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,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import Box from '@mui/material/Box';
|
|
3
|
-
import { getPaymentMethodsIcon } from '../../constants/index.js';
|
|
4
|
-
import { PaymentChip } from './style';
|
|
5
|
-
export function PaymentIcon({ type }) {
|
|
6
|
-
return (_jsx(PaymentChip, { children: _jsx(Box, { component: "img", src: getPaymentMethodsIcon(type), sx: { width: 18, height: 12, objectFit: 'contain' }, onError: (e) => {
|
|
7
|
-
e.currentTarget.src = getPaymentMethodsIcon('card');
|
|
8
|
-
} }) }));
|
|
9
|
-
}
|