@tap-payments/os-micro-frontend-shared 0.1.332 → 0.1.333-test.2
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/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/SourceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/TextWithChipCell/TextWithChipCell.d.ts +21 -0
- package/build/components/TableCells/CustomCells/TextWithChipCell/TextWithChipCell.js +31 -0
- package/build/components/TableCells/CustomCells/TextWithChipCell/index.d.ts +2 -0
- package/build/components/TableCells/CustomCells/TextWithChipCell/index.js +2 -0
- package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/index.d.ts +1 -2
- package/build/components/TableCells/CustomCells/index.js +1 -2
- package/build/components/TableCells/CustomCells/style.d.ts +0 -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/components/style.d.ts +0 -1
- package/build/utils/segment.d.ts +13 -20
- package/build/utils/segment.js +13 -17
- package/package.json +3 -3
- package/build/components/TableCells/CustomCells/TerminalsBrandCell/TerminalsBrandCell.d.ts +0 -12
- package/build/components/TableCells/CustomCells/TerminalsBrandCell/TerminalsBrandCell.js +0 -21
- package/build/components/TableCells/CustomCells/TerminalsBrandCell/index.d.ts +0 -1
- package/build/components/TableCells/CustomCells/TerminalsBrandCell/index.js +0 -1
- package/build/components/TableCells/CustomCells/TerminalsPlatformCell/TerminalsPlatformCell.d.ts +0 -13
- package/build/components/TableCells/CustomCells/TerminalsPlatformCell/TerminalsPlatformCell.js +0 -31
- package/build/components/TableCells/CustomCells/TerminalsPlatformCell/index.d.ts +0 -1
- package/build/components/TableCells/CustomCells/TerminalsPlatformCell/index.js +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
import { GetSourceAnimationFunction } from './type';
|
|
4
3
|
export declare const ChipStyled: import("@emotion/styled").StyledComponent<import("react").RefAttributes<unknown> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
5
4
|
variant?: import("./type").ChipVariant | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
import { TableMode } from '../../../../types/index.js';
|
|
4
3
|
export declare const ActionCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
5
4
|
tableMode?: TableMode | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledAppsCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const AppsStatusContainer: import("@emotion/styled").StyledComponent<{
|
|
5
4
|
hidden?: boolean | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const AuthIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
3
|
export declare const AuthCellContainer: import("@emotion/styled").StyledComponent<{
|
|
5
4
|
hidden?: boolean | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledDownloadFileImageWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
4
3
|
isTextShown?: boolean | undefined;
|
|
5
4
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const SalesChannelsContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
5
4
|
hidden?: boolean | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StackProps } from '@mui/material/Stack';
|
|
3
|
+
import { TypographyProps } from '@mui/material/Typography';
|
|
4
|
+
import { ChipProps, Tooltip } from '../../../index.js';
|
|
5
|
+
import { TextAndLang } from '../../../../types/index.js';
|
|
6
|
+
export type TextWithChipCell<T extends React.ElementType = 'div'> = StackProps<T> & {
|
|
7
|
+
name?: TextAndLang[];
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
namePlaceholder?: React.ReactNode;
|
|
10
|
+
showIcon?: boolean;
|
|
11
|
+
showLabel?: boolean;
|
|
12
|
+
slotsProps?: {
|
|
13
|
+
tooltip?: Partial<React.ComponentProps<typeof Tooltip>>;
|
|
14
|
+
chip?: Partial<ChipProps>;
|
|
15
|
+
chipsTooltip?: Partial<React.ComponentProps<typeof Tooltip>>;
|
|
16
|
+
label?: Partial<TypographyProps>;
|
|
17
|
+
labelTooltip?: Partial<React.ComponentProps<typeof Tooltip>>;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
declare const _default: React.MemoExoticComponent<(props: TextWithChipCell<"div">) => import("react/jsx-runtime").JSX.Element | null>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
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, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { memo, useMemo } from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import Stack from '@mui/material/Stack';
|
|
16
|
+
import Typography from '@mui/material/Typography';
|
|
17
|
+
import Box from '@mui/material/Box';
|
|
18
|
+
import { Chip, Tooltip } from '../../../index.js';
|
|
19
|
+
import { getNameText } from '../../../../utils/index.js';
|
|
20
|
+
const TextWithChipCell = (props) => {
|
|
21
|
+
const { name, icon, namePlaceholder = 'Unavailable', showIcon = true, showLabel = true, slotsProps } = props, restProps = __rest(props, ["name", "icon", "namePlaceholder", "showIcon", "showLabel", "slotsProps"]);
|
|
22
|
+
const { i18n } = useTranslation();
|
|
23
|
+
const formattedName = useMemo(() => (name ? getNameText(name, i18n.language) : null), [name, i18n.language]);
|
|
24
|
+
const { tooltip = {}, chip = {}, chipsTooltip = {}, label = {}, labelTooltip = {} } = slotsProps || {};
|
|
25
|
+
const displayIcon = showIcon && !!icon;
|
|
26
|
+
const displayLabel = showLabel;
|
|
27
|
+
if (!displayIcon && !displayLabel)
|
|
28
|
+
return null;
|
|
29
|
+
return (_jsxs(Stack, Object.assign({ direction: "row", alignItems: "center", spacing: 1, color: "text.primary" }, restProps, { children: [displayIcon && (_jsx(Tooltip, Object.assign({ title: formattedName ? `Platform: ${formattedName}` : null }, tooltip, chipsTooltip, { children: _jsx(Chip, Object.assign({ variant: "circular", sx: { '&.CustomVariant_circular': { minWidth: 32, height: 32 } } }, chip, { children: icon })) }))), displayLabel && (_jsx(Tooltip, Object.assign({ title: formattedName }, tooltip, labelTooltip, { children: _jsx(Typography, Object.assign({ noWrap: true, fontSize: 12, fontWeight: 500 }, label, { children: formattedName || (_jsx(Box, Object.assign({ component: "span", sx: { opacity: 0.2 } }, { children: namePlaceholder }))) })) })))] })));
|
|
30
|
+
};
|
|
31
|
+
export default memo(TextWithChipCell);
|
|
@@ -43,8 +43,6 @@ export * from './MarketPlaceCell';
|
|
|
43
43
|
export * from './IndividualsCell';
|
|
44
44
|
export * from './BrandsCell';
|
|
45
45
|
export * from './SalesChannelCell';
|
|
46
|
-
export * from './TerminalsBrandCell';
|
|
47
|
-
export * from './TerminalsPlatformCell';
|
|
48
46
|
export * from './AppsCell';
|
|
49
47
|
export * from './type';
|
|
50
48
|
export * from './style';
|
|
@@ -53,3 +51,4 @@ export * from './PaymentAgreementCell';
|
|
|
53
51
|
export * from './ProviderCell';
|
|
54
52
|
export * from './PurposeCell';
|
|
55
53
|
export * from './LinkCell';
|
|
54
|
+
export * from './TextWithChipCell';
|
|
@@ -43,8 +43,6 @@ export * from './MarketPlaceCell';
|
|
|
43
43
|
export * from './IndividualsCell';
|
|
44
44
|
export * from './BrandsCell';
|
|
45
45
|
export * from './SalesChannelCell';
|
|
46
|
-
export * from './TerminalsBrandCell';
|
|
47
|
-
export * from './TerminalsPlatformCell';
|
|
48
46
|
export * from './AppsCell';
|
|
49
47
|
export * from './type';
|
|
50
48
|
export * from './style';
|
|
@@ -53,3 +51,4 @@ export * from './PaymentAgreementCell';
|
|
|
53
51
|
export * from './ProviderCell';
|
|
54
52
|
export * from './PurposeCell';
|
|
55
53
|
export * from './LinkCell';
|
|
54
|
+
export * from './TextWithChipCell';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const GeographyBox: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
4
3
|
variant?: "Global" | "Regional" | "Local" | undefined;
|
|
5
4
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
package/build/utils/segment.d.ts
CHANGED
|
@@ -1,66 +1,59 @@
|
|
|
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
|
|
3
|
+
export declare const getBusinessSegmentConfig: ({ merchantsIds, options }: {
|
|
4
|
+
merchantsIds: string[];
|
|
5
|
+
options: Record<string, unknown>;
|
|
6
|
+
}) => {
|
|
4
7
|
business?: undefined;
|
|
5
8
|
} | {
|
|
6
9
|
business: {
|
|
7
10
|
merchant: string[];
|
|
8
11
|
};
|
|
9
12
|
};
|
|
10
|
-
export declare const getNonBusinessSegmentConfig: ({ segmentCode, segmentId, segmentTypeCode, }: {
|
|
13
|
+
export declare const getNonBusinessSegmentConfig: ({ segmentCode, segmentId, segmentTypeCode, merchantsIds, options, }: {
|
|
11
14
|
segmentCode: string;
|
|
12
15
|
segmentTypeCode: string;
|
|
13
16
|
segmentId: string;
|
|
17
|
+
merchantsIds?: string[] | undefined;
|
|
18
|
+
options: Record<string, unknown>;
|
|
14
19
|
}) => {
|
|
20
|
+
business?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
business: {
|
|
23
|
+
merchant: string[];
|
|
24
|
+
};
|
|
25
|
+
} | {
|
|
15
26
|
payment_provider: {
|
|
16
27
|
technology: {
|
|
17
28
|
orchestrator: string[];
|
|
18
|
-
gateway?: undefined;
|
|
19
29
|
};
|
|
20
30
|
institution?: undefined;
|
|
21
31
|
};
|
|
22
|
-
platform?: undefined;
|
|
23
|
-
development_agency?: undefined;
|
|
24
32
|
} | {
|
|
25
33
|
payment_provider: {
|
|
26
34
|
technology: {
|
|
27
35
|
gateway: string[];
|
|
28
|
-
orchestrator?: undefined;
|
|
29
36
|
};
|
|
30
37
|
institution?: undefined;
|
|
31
38
|
};
|
|
32
|
-
platform?: undefined;
|
|
33
|
-
development_agency?: undefined;
|
|
34
39
|
} | {
|
|
35
40
|
payment_provider: {
|
|
36
41
|
institution: {
|
|
37
42
|
facilitator: string[];
|
|
38
|
-
acquirer?: undefined;
|
|
39
43
|
};
|
|
40
44
|
technology?: undefined;
|
|
41
45
|
};
|
|
42
|
-
platform?: undefined;
|
|
43
|
-
development_agency?: undefined;
|
|
44
46
|
} | {
|
|
45
47
|
payment_provider: {
|
|
46
48
|
institution: {
|
|
47
49
|
acquirer: string[];
|
|
48
|
-
facilitator?: undefined;
|
|
49
50
|
};
|
|
50
51
|
technology?: undefined;
|
|
51
52
|
};
|
|
52
|
-
platform?: undefined;
|
|
53
|
-
development_agency?: undefined;
|
|
54
53
|
} | {
|
|
55
54
|
platform: string[];
|
|
56
55
|
payment_provider?: undefined;
|
|
57
|
-
development_agency?: undefined;
|
|
58
56
|
} | {
|
|
59
57
|
development_agency: string[];
|
|
60
58
|
payment_provider?: undefined;
|
|
61
|
-
platform?: undefined;
|
|
62
|
-
} | {
|
|
63
|
-
payment_provider?: undefined;
|
|
64
|
-
platform?: undefined;
|
|
65
|
-
development_agency?: undefined;
|
|
66
59
|
};
|
package/build/utils/segment.js
CHANGED
|
@@ -11,54 +11,50 @@ 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) => {
|
|
14
|
+
export const getBusinessSegmentConfig = ({ merchantsIds, options }) => {
|
|
15
15
|
if (!merchantsIds || !(merchantsIds === null || merchantsIds === void 0 ? void 0 : merchantsIds.length))
|
|
16
16
|
return {};
|
|
17
|
-
return { business: { merchant: merchantsIds } };
|
|
17
|
+
return { business: Object.assign({ merchant: merchantsIds }, options) };
|
|
18
18
|
};
|
|
19
|
-
export const getNonBusinessSegmentConfig = ({ segmentCode, segmentId, segmentTypeCode, }) => {
|
|
19
|
+
export const getNonBusinessSegmentConfig = ({ segmentCode, segmentId, segmentTypeCode, merchantsIds = [], options, }) => {
|
|
20
20
|
const code = SEGMENT_CODE.PSP === segmentTypeCode ? segmentCode : segmentTypeCode;
|
|
21
|
+
const specialBusinessSegmentsIDs = ['payment_facilitator_14po8231419aIsi1fN7F385'];
|
|
22
|
+
if (specialBusinessSegmentsIDs.includes(segmentId)) {
|
|
23
|
+
return getBusinessSegmentConfig({ merchantsIds, options });
|
|
24
|
+
}
|
|
21
25
|
if (code === SEGMENT_CODE.PAYMENT_TECHNOLOGY) {
|
|
22
26
|
return {
|
|
23
27
|
payment_provider: {
|
|
24
|
-
technology: {
|
|
25
|
-
orchestrator: [segmentId],
|
|
26
|
-
},
|
|
28
|
+
technology: Object.assign({ orchestrator: [segmentId] }, options),
|
|
27
29
|
},
|
|
28
30
|
};
|
|
29
31
|
}
|
|
30
32
|
if (code === SEGMENT_CODE.PAYMENT_GATEWAY || code === SEGMENT_CODE.PAYMENT_GATEWAY_PROVIDER) {
|
|
31
33
|
return {
|
|
32
34
|
payment_provider: {
|
|
33
|
-
technology: {
|
|
34
|
-
gateway: [segmentId],
|
|
35
|
-
},
|
|
35
|
+
technology: Object.assign({ gateway: [segmentId] }, options),
|
|
36
36
|
},
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
if (code === SEGMENT_CODE.PAYMENT_FACILITATOR) {
|
|
40
40
|
return {
|
|
41
41
|
payment_provider: {
|
|
42
|
-
institution: {
|
|
43
|
-
facilitator: [segmentId],
|
|
44
|
-
},
|
|
42
|
+
institution: Object.assign({ facilitator: [segmentId] }, options),
|
|
45
43
|
},
|
|
46
44
|
};
|
|
47
45
|
}
|
|
48
46
|
if (code === SEGMENT_CODE.PAYMENT_ACQUIRER) {
|
|
49
47
|
return {
|
|
50
48
|
payment_provider: {
|
|
51
|
-
institution: {
|
|
52
|
-
acquirer: [segmentId],
|
|
53
|
-
},
|
|
49
|
+
institution: Object.assign({ acquirer: [segmentId] }, options),
|
|
54
50
|
},
|
|
55
51
|
};
|
|
56
52
|
}
|
|
57
53
|
if (code === SEGMENT_CODE.PLATFORM) {
|
|
58
|
-
return { platform: [segmentId] };
|
|
54
|
+
return Object.assign({ platform: [segmentId] }, options);
|
|
59
55
|
}
|
|
60
56
|
if (code === SEGMENT_CODE.DEVELOPMENT) {
|
|
61
|
-
return { development_agency: [segmentId] };
|
|
57
|
+
return Object.assign({ development_agency: [segmentId] }, options);
|
|
62
58
|
}
|
|
63
59
|
return {};
|
|
64
60
|
};
|
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.333-test.2",
|
|
5
|
+
"testVersion": 2,
|
|
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,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TextAndLang } from '../../../../types/index.js';
|
|
3
|
-
type TerminalsBrandCellProps = {
|
|
4
|
-
name?: TextAndLang[];
|
|
5
|
-
icon?: React.ReactNode;
|
|
6
|
-
displayRules?: {
|
|
7
|
-
showIcon?: boolean;
|
|
8
|
-
showLabel?: boolean;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
declare const TerminalsBrandCell: (props: TerminalsBrandCellProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
-
export default TerminalsBrandCell;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
|
-
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import Stack from '@mui/material/Stack';
|
|
5
|
-
import Typography from '@mui/material/Typography';
|
|
6
|
-
import { Chip, Tooltip } from '../../../index.js';
|
|
7
|
-
import { getNameText } from '../../../../utils/index.js';
|
|
8
|
-
const TerminalsBrandCell = (props) => {
|
|
9
|
-
const { name, icon, displayRules } = props;
|
|
10
|
-
const { i18n } = useTranslation();
|
|
11
|
-
const brandName = useMemo(() => (name ? getNameText(name, i18n.language) : null), [name, i18n.language]);
|
|
12
|
-
if (!name && !icon)
|
|
13
|
-
return null;
|
|
14
|
-
const { showIcon = true, showLabel = true } = displayRules || {};
|
|
15
|
-
const displayIcon = showIcon && !!icon;
|
|
16
|
-
const displayLabel = showLabel;
|
|
17
|
-
if (!displayIcon && !displayLabel)
|
|
18
|
-
return null;
|
|
19
|
-
return (_jsxs(Stack, Object.assign({ "data-testid": "TerminalsBrandCell", direction: "row", alignItems: "center", spacing: 1, color: "text.primary" }, { children: [displayIcon && (_jsx(Tooltip, Object.assign({ title: brandName ? `Brand: ${brandName}` : null }, { children: _jsx(Chip, Object.assign({ variant: "circular", sx: { '&.CustomVariant_circular': { minWidth: 32, height: 32 } } }, { children: icon })) }))), displayLabel && (_jsx(Tooltip, Object.assign({ title: brandName }, { children: _jsx(Typography, Object.assign({ noWrap: true, fontSize: 12, fontWeight: 500 }, { children: brandName })) })))] })));
|
|
20
|
-
};
|
|
21
|
-
export default TerminalsBrandCell;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as TerminalsBrandCell } from './TerminalsBrandCell';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as TerminalsBrandCell } from './TerminalsBrandCell';
|
package/build/components/TableCells/CustomCells/TerminalsPlatformCell/TerminalsPlatformCell.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { StackProps } from '@mui/material/Stack';
|
|
3
|
-
import { TextAndLang } from '../../../../types/index.js';
|
|
4
|
-
type TerminalsPlatformCellProps = StackProps & {
|
|
5
|
-
name?: TextAndLang[];
|
|
6
|
-
icon?: React.ReactNode;
|
|
7
|
-
displayRules?: {
|
|
8
|
-
showIcon?: boolean;
|
|
9
|
-
showLabel?: boolean;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
declare const _default: import("react").MemoExoticComponent<({ name, icon, displayRules, ...props }: TerminalsPlatformCellProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
13
|
-
export default _default;
|
package/build/components/TableCells/CustomCells/TerminalsPlatformCell/TerminalsPlatformCell.js
DELETED
|
@@ -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, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { memo, useMemo } from 'react';
|
|
14
|
-
import { useTranslation } from 'react-i18next';
|
|
15
|
-
import Stack from '@mui/material/Stack';
|
|
16
|
-
import Typography from '@mui/material/Typography';
|
|
17
|
-
import Box from '@mui/material/Box';
|
|
18
|
-
import { Chip, Tooltip } from '../../../index.js';
|
|
19
|
-
import { getNameText } from '../../../../utils/index.js';
|
|
20
|
-
const TerminalsPlatformCell = (_a) => {
|
|
21
|
-
var { name, icon, displayRules } = _a, props = __rest(_a, ["name", "icon", "displayRules"]);
|
|
22
|
-
const { i18n } = useTranslation();
|
|
23
|
-
const platformName = useMemo(() => (name ? getNameText(name, i18n.language) : null), [name, i18n.language]);
|
|
24
|
-
const { showIcon = true, showLabel = true } = displayRules || {};
|
|
25
|
-
const displayIcon = showIcon && !!icon;
|
|
26
|
-
const displayLabel = showLabel;
|
|
27
|
-
if (!displayIcon && !displayLabel)
|
|
28
|
-
return null;
|
|
29
|
-
return (_jsxs(Stack, Object.assign({ "data-testid": "TerminalsPlatformCell", direction: "row", alignItems: "center", spacing: 1, color: "text.primary" }, props, { children: [displayIcon && (_jsx(Tooltip, Object.assign({ title: platformName ? `Platform: ${platformName}` : null }, { children: _jsx(Chip, Object.assign({ variant: "circular", sx: { '&.CustomVariant_circular': { minWidth: 32, height: 32 } } }, { children: icon })) }))), displayLabel && (_jsx(Tooltip, Object.assign({ title: platformName }, { children: _jsx(Typography, Object.assign({ noWrap: true, fontSize: 12, fontWeight: 500 }, { children: platformName || (_jsx(Box, Object.assign({ component: "span", sx: { opacity: 0.2 } }, { children: "Unavailable" }))) })) })))] })));
|
|
30
|
-
};
|
|
31
|
-
export default memo(TerminalsPlatformCell);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as TerminalsPlatformCell } from './TerminalsPlatformCell';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as TerminalsPlatformCell } from './TerminalsPlatformCell';
|