@tap-payments/os-micro-frontend-shared 0.1.301-test.4 → 0.1.302
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/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/PaymentMethods.js +4 -5
- package/build/components/PaymentSourceFilter/PaymentSchemes.d.ts +1 -1
- package/build/components/PaymentSourceFilter/PaymentSchemes.js +3 -4
- 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/constants/index.d.ts +1 -0
- package/build/constants/index.js +1 -0
- package/build/constants/payment.d.ts +0 -5
- package/build/constants/payment.js +9 -20
- package/build/constants/reports.d.ts +12 -0
- package/build/constants/reports.js +52 -0
- package/build/types/index.d.ts +1 -0
- package/build/types/index.js +1 -0
- package/build/types/reports.d.ts +6 -0
- package/build/types/reports.js +7 -0
- package/build/types/segment.d.ts +0 -9
- package/build/types/segment.js +1 -10
- package/build/utils/index.d.ts +0 -1
- package/build/utils/index.js +0 -1
- package/package.json +3 -3
- package/build/utils/merchantSource.d.ts +0 -32
- package/build/utils/merchantSource.js +0 -36
|
@@ -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;
|
|
@@ -16,10 +16,9 @@ import { rightArrow } from '../../constants/index.js';
|
|
|
16
16
|
import PaymentMethod from './PaymentMethod';
|
|
17
17
|
import { MenuItemStyled } from './style';
|
|
18
18
|
export default function PaymentMethods({ paymentMethodsSource, filters, setFilters }) {
|
|
19
|
-
var _a, _b
|
|
19
|
+
var _a, _b;
|
|
20
20
|
const [paymentMethodsEl, setPaymentMethodsEl] = useState(null);
|
|
21
21
|
const filterPaymentMethods = (_a = filters === null || filters === void 0 ? void 0 : filters.payment_methods) !== null && _a !== void 0 ? _a : [];
|
|
22
|
-
const isDisabled = !((_b = paymentMethodsSource === null || paymentMethodsSource === void 0 ? void 0 : paymentMethodsSource.options) === null || _b === void 0 ? void 0 : _b.length);
|
|
23
22
|
const onOpen = (e) => {
|
|
24
23
|
setPaymentMethodsEl(e.currentTarget);
|
|
25
24
|
};
|
|
@@ -28,13 +27,13 @@ export default function PaymentMethods({ paymentMethodsSource, filters, setFilte
|
|
|
28
27
|
};
|
|
29
28
|
const paymentMethodsAll = useMemo(() => {
|
|
30
29
|
var _a, _b, _c;
|
|
31
|
-
return (_c = (_b = ((_a = paymentMethodsSource
|
|
30
|
+
return (_c = (_b = ((_a = paymentMethodsSource.options) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.reduce((acc, method) => {
|
|
32
31
|
var _a, _b, _c;
|
|
33
32
|
acc.push(...((_c = (_b = ((_a = method.options) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.map((m) => m.type)) !== null && _c !== void 0 ? _c : []));
|
|
34
33
|
return acc;
|
|
35
34
|
}, [])) !== null && _c !== void 0 ? _c : [];
|
|
36
35
|
}, []);
|
|
37
|
-
const isSelected = useMemo(() => (paymentMethodsAll === null || paymentMethodsAll === void 0 ? void 0 : paymentMethodsAll.length) === filterPaymentMethods.length
|
|
36
|
+
const isSelected = useMemo(() => (paymentMethodsAll === null || paymentMethodsAll === void 0 ? void 0 : paymentMethodsAll.length) === filterPaymentMethods.length, [filterPaymentMethods.length, paymentMethodsAll === null || paymentMethodsAll === void 0 ? void 0 : paymentMethodsAll.length]);
|
|
38
37
|
const isIndeterminate = useMemo(() => !isSelected && (paymentMethodsAll === null || paymentMethodsAll === void 0 ? void 0 : paymentMethodsAll.length) !== filterPaymentMethods.length && filterPaymentMethods.length > 0, [filterPaymentMethods.length, paymentMethodsAll === null || paymentMethodsAll === void 0 ? void 0 : paymentMethodsAll.length, isSelected]);
|
|
39
38
|
const onClick = () => {
|
|
40
39
|
if (isSelected) {
|
|
@@ -45,5 +44,5 @@ export default function PaymentMethods({ paymentMethodsSource, filters, setFilte
|
|
|
45
44
|
setFilters(Object.assign(Object.assign({}, filters), { payment_methods: paymentMethodsAll }));
|
|
46
45
|
}
|
|
47
46
|
};
|
|
48
|
-
return (_jsxs(MenuItemStyled, Object.assign({ isSelected: isSelected, isIndeterminate: isIndeterminate, onMouseEnter: onOpen, onMouseLeave: onClose, onClick: onClick
|
|
47
|
+
return (_jsxs(MenuItemStyled, Object.assign({ isSelected: isSelected, isIndeterminate: isIndeterminate, onMouseEnter: onOpen, onMouseLeave: onClose, onClick: onClick }, { children: [_jsx("span", Object.assign({ className: "label" }, { children: paymentMethodsSource === null || paymentMethodsSource === void 0 ? void 0 : paymentMethodsSource.name })), _jsx("img", { src: rightArrow, alt: "arrow", style: { height: 12 } }), _jsx(Menu, Object.assign({ open: Boolean(paymentMethodsEl), anchorEl: paymentMethodsEl, placement: "right-start" }, { children: (_b = paymentMethodsSource === null || paymentMethodsSource === void 0 ? void 0 : paymentMethodsSource.options) === null || _b === void 0 ? void 0 : _b.map((paymentMethod) => (_jsx(PaymentMethod, Object.assign({}, paymentMethod, { filters: filters, setFilters: setFilters }), paymentMethod.type))) }))] })));
|
|
49
48
|
}
|
|
@@ -15,17 +15,16 @@ import { Menu } from '../index.js';
|
|
|
15
15
|
import { rightArrow } from '../../constants/index.js';
|
|
16
16
|
import { MenuItemStyled } from './style';
|
|
17
17
|
export default function PaymentSchemes({ paymentSchemesSource, filters, setFilters }) {
|
|
18
|
-
var _a, _b, _c
|
|
18
|
+
var _a, _b, _c;
|
|
19
19
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
20
20
|
const paymentScheme = (_a = filters === null || filters === void 0 ? void 0 : filters.payment_scheme) !== null && _a !== void 0 ? _a : [];
|
|
21
|
-
const isDisabled = !((_b = paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.options) === null || _b === void 0 ? void 0 : _b.length);
|
|
22
21
|
const onOpen = (e) => {
|
|
23
22
|
setAnchorEl(e.currentTarget);
|
|
24
23
|
};
|
|
25
24
|
const onClose = () => {
|
|
26
25
|
setAnchorEl(null);
|
|
27
26
|
};
|
|
28
|
-
const isSelected = useMemo(() => { var _a; return paymentScheme.length === ((_a = paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.options) === null || _a === void 0 ? void 0 : _a.length)
|
|
27
|
+
const isSelected = useMemo(() => { var _a; return paymentScheme.length === ((_a = paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.options) === null || _a === void 0 ? void 0 : _a.length); }, [paymentScheme.length, (_b = paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.options) === null || _b === void 0 ? void 0 : _b.length]);
|
|
29
28
|
const isIndeterminate = useMemo(() => !isSelected && paymentScheme.length > 0, [paymentScheme.length, isSelected]);
|
|
30
29
|
const isSelectedPaymentScheme = useCallback((selectedPaymentScheme) => { var _a; return (_a = paymentScheme.includes(selectedPaymentScheme)) !== null && _a !== void 0 ? _a : false; }, [paymentScheme]);
|
|
31
30
|
const onClick = () => {
|
|
@@ -48,5 +47,5 @@ export default function PaymentSchemes({ paymentSchemesSource, filters, setFilte
|
|
|
48
47
|
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] }));
|
|
49
48
|
}
|
|
50
49
|
};
|
|
51
|
-
return (_jsxs(MenuItemStyled, Object.assign({ isSelected: isSelected, isIndeterminate: isIndeterminate, onMouseEnter: onOpen, onMouseLeave: onClose, onClick: onClick
|
|
50
|
+
return (_jsxs(MenuItemStyled, Object.assign({ isSelected: isSelected, isIndeterminate: isIndeterminate, onMouseEnter: onOpen, onMouseLeave: onClose, onClick: onClick }, { 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: (_c = paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.options) === null || _c === void 0 ? void 0 : _c.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))) }))] })));
|
|
52
51
|
}
|
|
@@ -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/constants/index.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
export declare const PAYMENT_TYPES_ICONS: {
|
|
2
|
-
[key: string]: string;
|
|
3
|
-
};
|
|
4
1
|
export declare const PAYMENT_TYPES: {
|
|
5
2
|
name: string;
|
|
6
3
|
label: string;
|
|
7
4
|
icon: string;
|
|
8
5
|
}[];
|
|
9
|
-
export declare const PAYMENT_INITIATED_CUSTOMER_KEY = "customer";
|
|
10
|
-
export declare const PAYMENT_INITIATED_MERCHANT_KEY = "merchant";
|
|
11
6
|
export declare const PAYMENT_INITIATED_OPTIONS: {
|
|
12
7
|
key: string;
|
|
13
8
|
value: string;
|
|
@@ -1,53 +1,42 @@
|
|
|
1
1
|
import { lightUrl } from './assets';
|
|
2
|
-
export const PAYMENT_TYPES_ICONS = {
|
|
3
|
-
DEVICE: `${lightUrl}/device.svg`,
|
|
4
|
-
CARD: `${lightUrl}/payment-method/card.svg`,
|
|
5
|
-
PASS_THRU_WALLET: `${lightUrl}/passThruWallet.svg`,
|
|
6
|
-
EXPRESS_CHECKOUT: `${lightUrl}/express_checkout.svg`,
|
|
7
|
-
STORED_VALUE_WALLET: `${lightUrl}/storedValueWallet.svg`,
|
|
8
|
-
CASH_WALLET: `${lightUrl}/cash.svg`,
|
|
9
|
-
BUY_NOW_PAY_LATER: `${lightUrl}/buyNowPayLater.svg`,
|
|
10
|
-
};
|
|
11
2
|
export const PAYMENT_TYPES = [
|
|
12
3
|
{
|
|
13
4
|
name: 'CARD',
|
|
14
5
|
label: 'Card',
|
|
15
|
-
icon:
|
|
6
|
+
icon: `${lightUrl}/payment-method/card.svg`,
|
|
16
7
|
},
|
|
17
8
|
{
|
|
18
9
|
name: 'EXPRESS',
|
|
19
10
|
label: 'Express Checkout',
|
|
20
|
-
icon:
|
|
11
|
+
icon: `${lightUrl}/express_checkout.svg`,
|
|
21
12
|
},
|
|
22
13
|
{
|
|
23
14
|
name: 'DEVICE',
|
|
24
15
|
label: 'Device',
|
|
25
|
-
icon:
|
|
16
|
+
icon: `${lightUrl}/device.svg`,
|
|
26
17
|
},
|
|
27
18
|
{
|
|
28
19
|
name: 'PT_WALLET',
|
|
29
20
|
label: 'Pass-Thru Wallet',
|
|
30
|
-
icon:
|
|
21
|
+
icon: `${lightUrl}/passThruWallet.svg`,
|
|
31
22
|
},
|
|
32
23
|
{
|
|
33
24
|
name: 'SV_WALLET',
|
|
34
25
|
label: 'Stored Value Wallet',
|
|
35
|
-
icon:
|
|
26
|
+
icon: `${lightUrl}/storedValueWallet.svg`,
|
|
36
27
|
},
|
|
37
28
|
{
|
|
38
29
|
name: 'BNPL',
|
|
39
30
|
label: 'Buy Now Pay Later',
|
|
40
|
-
icon:
|
|
31
|
+
icon: `${lightUrl}/buyNowPayLater.svg`,
|
|
41
32
|
},
|
|
42
33
|
{
|
|
43
34
|
name: 'CASH',
|
|
44
35
|
label: 'Cash Wallet',
|
|
45
|
-
icon:
|
|
36
|
+
icon: `${lightUrl}/cash.svg`,
|
|
46
37
|
},
|
|
47
38
|
];
|
|
48
|
-
export const PAYMENT_INITIATED_CUSTOMER_KEY = 'customer';
|
|
49
|
-
export const PAYMENT_INITIATED_MERCHANT_KEY = 'merchant';
|
|
50
39
|
export const PAYMENT_INITIATED_OPTIONS = [
|
|
51
|
-
{ key:
|
|
52
|
-
{ key:
|
|
40
|
+
{ key: 'customer', value: 'true', label: 'Customer' },
|
|
41
|
+
{ key: 'merchant', value: 'false', label: 'Merchant' },
|
|
53
42
|
];
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { APP_CODES } from './apps';
|
|
2
|
+
import { acceptanceAppIcon, billingAppIcon, payoutsAppIcon, walletAppIcon } from './assets';
|
|
3
|
+
export const filtersTypeMap = {
|
|
4
|
+
[APP_CODES.acceptance.services.charges.code]: ['CHARGE'],
|
|
5
|
+
[APP_CODES.acceptance.services.authorization.code]: ['AUTHORIZE'],
|
|
6
|
+
[APP_CODES.acceptance.services.refunds.code]: ['REFUND'],
|
|
7
|
+
[APP_CODES.acceptance.services.chargeback.code]: ['CHARGEBACKS'],
|
|
8
|
+
[APP_CODES.acceptance.services.destinations.code]: ['DESTINATIONS'],
|
|
9
|
+
[APP_CODES.acceptance.code]: ['CHARGE', 'AUTHORIZE', 'REFUND', 'CHARGEBACKS', 'DESTINATIONS'],
|
|
10
|
+
[APP_CODES.payouts.code]: ['PAYOUT'],
|
|
11
|
+
[APP_CODES.wallet.code]: ['STATEMENT', 'STATEMENT_SUMMARY'],
|
|
12
|
+
[APP_CODES.billing.code]: ['INVOICE'],
|
|
13
|
+
[APP_CODES.payouts.services.payouts.code]: ['PAYOUT'],
|
|
14
|
+
[APP_CODES.wallet.services.merchants.functions.statement.code]: ['STATEMENT'],
|
|
15
|
+
[APP_CODES.wallet.services.merchants.functions.summary.code]: ['STATEMENT_SUMMARY'],
|
|
16
|
+
[APP_CODES.billing.services.invoices.code]: ['INVOICE'],
|
|
17
|
+
};
|
|
18
|
+
export const REPORTS_APPS = [
|
|
19
|
+
{
|
|
20
|
+
code: APP_CODES.billing.code,
|
|
21
|
+
name: 'Billing',
|
|
22
|
+
icon: billingAppIcon,
|
|
23
|
+
services: [{ name: 'Invoices', code: 'INVOICE' }],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
code: APP_CODES.acceptance.code,
|
|
27
|
+
name: 'Acceptance',
|
|
28
|
+
icon: acceptanceAppIcon,
|
|
29
|
+
services: [
|
|
30
|
+
{ name: 'Authorisations', code: 'AUTHORIZE' },
|
|
31
|
+
{ name: 'Charges', code: 'CHARGE' },
|
|
32
|
+
{ name: 'Refunds', code: 'REFUND' },
|
|
33
|
+
{ name: 'Chargebacks', code: 'CHARGEBACKS' },
|
|
34
|
+
{ name: 'Destinations', code: 'DESTINATIONS' },
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
code: APP_CODES.wallet.code,
|
|
39
|
+
name: 'Wallet',
|
|
40
|
+
icon: walletAppIcon,
|
|
41
|
+
services: [
|
|
42
|
+
{ name: 'Aggregated Statement', code: 'STATEMENT_SUMMARY' },
|
|
43
|
+
{ name: 'Detailed Statement', code: 'STATEMENT' },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
code: APP_CODES.payouts.code,
|
|
48
|
+
name: 'Payouts',
|
|
49
|
+
icon: payoutsAppIcon,
|
|
50
|
+
services: [{ name: 'Payouts', code: 'PAYOUT' }],
|
|
51
|
+
},
|
|
52
|
+
];
|
package/build/types/index.d.ts
CHANGED
package/build/types/index.js
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var ReportStatusEnum;
|
|
2
|
+
(function (ReportStatusEnum) {
|
|
3
|
+
ReportStatusEnum["COMPLETED"] = "COMPLETED";
|
|
4
|
+
ReportStatusEnum["FAILED"] = "FAILED";
|
|
5
|
+
ReportStatusEnum["PROCESSING"] = "PROCESSING";
|
|
6
|
+
ReportStatusEnum["INITIATED"] = "INITIATED";
|
|
7
|
+
})(ReportStatusEnum || (ReportStatusEnum = {}));
|
package/build/types/segment.d.ts
CHANGED
|
@@ -4,12 +4,3 @@ export interface SegmentData extends Segment {
|
|
|
4
4
|
defaultCountry?: SegmentCountry;
|
|
5
5
|
defaultEntity?: Entity;
|
|
6
6
|
}
|
|
7
|
-
export declare enum SEGMENT_CODE {
|
|
8
|
-
BUSINESS = "BUSINESS",
|
|
9
|
-
PLATFORM = "PLATFORM",
|
|
10
|
-
DEVELOPMENT = "DEVELOPMENT",
|
|
11
|
-
PAYMENT_TECHNOLOGY = "PAYMENT_TECHNOLOGY",
|
|
12
|
-
PAYMENT_FACILITATOR = "PAYMENT_FACILITATOR",
|
|
13
|
-
PAYMENT_ACQUIRER = "PAYMENT_ACQUIRER",
|
|
14
|
-
PAYMENT_GATEWAY = "PAYMENT_GATEWAY"
|
|
15
|
-
}
|
package/build/types/segment.js
CHANGED
|
@@ -1,10 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
(function (SEGMENT_CODE) {
|
|
3
|
-
SEGMENT_CODE["BUSINESS"] = "BUSINESS";
|
|
4
|
-
SEGMENT_CODE["PLATFORM"] = "PLATFORM";
|
|
5
|
-
SEGMENT_CODE["DEVELOPMENT"] = "DEVELOPMENT";
|
|
6
|
-
SEGMENT_CODE["PAYMENT_TECHNOLOGY"] = "PAYMENT_TECHNOLOGY";
|
|
7
|
-
SEGMENT_CODE["PAYMENT_FACILITATOR"] = "PAYMENT_FACILITATOR";
|
|
8
|
-
SEGMENT_CODE["PAYMENT_ACQUIRER"] = "PAYMENT_ACQUIRER";
|
|
9
|
-
SEGMENT_CODE["PAYMENT_GATEWAY"] = "PAYMENT_GATEWAY";
|
|
10
|
-
})(SEGMENT_CODE || (SEGMENT_CODE = {}));
|
|
1
|
+
export {};
|
package/build/utils/index.d.ts
CHANGED
package/build/utils/index.js
CHANGED
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.302",
|
|
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,32 +0,0 @@
|
|
|
1
|
-
import { TextAndLang } from '../types/index.js';
|
|
2
|
-
interface Source {
|
|
3
|
-
code: string;
|
|
4
|
-
name: TextAndLang[];
|
|
5
|
-
}
|
|
6
|
-
interface PaymentMethod extends Source {
|
|
7
|
-
payment_methods: Source[];
|
|
8
|
-
}
|
|
9
|
-
export declare function transformPaymentMethodsData(data?: PaymentMethod[]): {
|
|
10
|
-
name: string;
|
|
11
|
-
type: string;
|
|
12
|
-
options: {
|
|
13
|
-
name: TextAndLang[];
|
|
14
|
-
type: string;
|
|
15
|
-
icon: string;
|
|
16
|
-
options: {
|
|
17
|
-
name: string | undefined;
|
|
18
|
-
type: string;
|
|
19
|
-
icon: string;
|
|
20
|
-
}[];
|
|
21
|
-
}[] | undefined;
|
|
22
|
-
};
|
|
23
|
-
export declare function transformPaymentSchemesData(data?: Source[]): {
|
|
24
|
-
name: string;
|
|
25
|
-
type: string;
|
|
26
|
-
options: {
|
|
27
|
-
name: string | undefined;
|
|
28
|
-
type: string;
|
|
29
|
-
icon: string;
|
|
30
|
-
}[];
|
|
31
|
-
};
|
|
32
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { lightUrl, PAYMENT_TYPES_ICONS } from '../constants/index.js';
|
|
2
|
-
import { getNameText } from './language';
|
|
3
|
-
export function transformPaymentMethodsData(data) {
|
|
4
|
-
return {
|
|
5
|
-
name: 'Payment Methods',
|
|
6
|
-
type: 'payment_methods',
|
|
7
|
-
options: data === null || data === void 0 ? void 0 : data.map((category) => {
|
|
8
|
-
var _a;
|
|
9
|
-
return {
|
|
10
|
-
name: category === null || category === void 0 ? void 0 : category.name,
|
|
11
|
-
type: category === null || category === void 0 ? void 0 : category.code,
|
|
12
|
-
icon: PAYMENT_TYPES_ICONS[category.code],
|
|
13
|
-
options: (_a = category.payment_methods) === null || _a === void 0 ? void 0 : _a.map((method) => ({
|
|
14
|
-
name: getNameText(method.name),
|
|
15
|
-
type: method.code,
|
|
16
|
-
icon: `${lightUrl}/payment-method/${method.code}.svg`,
|
|
17
|
-
})),
|
|
18
|
-
};
|
|
19
|
-
}),
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export function transformPaymentSchemesData(data = []) {
|
|
23
|
-
return {
|
|
24
|
-
name: 'Payment Schemes',
|
|
25
|
-
type: 'payment_scheme',
|
|
26
|
-
options: data
|
|
27
|
-
.filter((scheme) => scheme.code)
|
|
28
|
-
.map((scheme) => {
|
|
29
|
-
return {
|
|
30
|
-
name: getNameText(scheme === null || scheme === void 0 ? void 0 : scheme.name),
|
|
31
|
-
type: scheme === null || scheme === void 0 ? void 0 : scheme.code,
|
|
32
|
-
icon: `${lightUrl}/payment-method/${scheme.code}.svg`,
|
|
33
|
-
};
|
|
34
|
-
}),
|
|
35
|
-
};
|
|
36
|
-
}
|