@tap-payments/os-micro-frontend-shared 0.1.67 → 0.1.69
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/StatusChip/StatusChip.js +1 -1
- package/build/components/StatusIcons/SourceIcons/components/SourceIcon.d.ts +2 -6
- package/build/components/StatusIcons/SourceIcons/components/SourceIcon.js +2 -2
- package/build/components/TableCells/CustomCells/TerminalsPlatformCell/TerminalsPlatformCell.d.ts +2 -3
- package/build/components/TableCells/CustomCells/TerminalsPlatformCell/TerminalsPlatformCell.js +2 -14
- package/build/constants/assets.d.ts +0 -4
- package/build/constants/assets.js +0 -4
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ const StatusChip = (_a) => {
|
|
|
23
23
|
const { t } = useTranslation();
|
|
24
24
|
const isSelected = props.isSelected;
|
|
25
25
|
if (!children) {
|
|
26
|
-
return (_jsx(ChipStyled, Object.assign({}, unknownGeographyColors, props, { isSelected: false }, { children: unknownText ? t(unknownText) : t('unknown') })));
|
|
26
|
+
return (_jsx(ChipStyled, Object.assign({}, unknownGeographyColors, props, { isSelected: false, sx: (theme) => ({ borderColor: theme.palette.divider }) }, { children: unknownText ? t(unknownText) : t('unknown') })));
|
|
27
27
|
}
|
|
28
28
|
const handleCopy = (e) => {
|
|
29
29
|
e.stopPropagation();
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
export declare function SourceIcon({ source, isTextShown, title }: {
|
|
2
2
|
source: string;
|
|
3
3
|
isTextShown?: boolean;
|
|
4
4
|
title?: string;
|
|
5
|
-
|
|
6
|
-
height?: number | string;
|
|
7
|
-
};
|
|
8
|
-
export declare function SourceIcon({ source, isTextShown, title, width, height }: SourceIconProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,10 +4,10 @@ import { useTranslation } from 'react-i18next';
|
|
|
4
4
|
import Tooltip from '../../../Tooltip';
|
|
5
5
|
import { getPaymentMethodsIcon } from '../../../../constants/index.js';
|
|
6
6
|
import { StyledBadgeTextWrapper, StyledSourceImage, TextLabel } from '../style';
|
|
7
|
-
export function SourceIcon({ source, isTextShown, title
|
|
7
|
+
export function SourceIcon({ source, isTextShown, title }) {
|
|
8
8
|
const { t } = useTranslation();
|
|
9
9
|
const ImageSrc = getPaymentMethodsIcon(source);
|
|
10
|
-
return (_jsx(Tooltip, Object.assign({ title: title }, { children: isTextShown ? (_jsx(StyledBadgeTextWrapper, Object.assign({ "data-testid": "SourceCell_BadgeTextWrapper" }, { children: _jsx(TextLabel, Object.assign({ "data-testid": "SourceCell_TextLabel", "data-source": source }, { children: t(camelCase(source)) })) }))) : (_jsx(StyledSourceImage, { src: ImageSrc, alt: source,
|
|
10
|
+
return (_jsx(Tooltip, Object.assign({ title: title }, { children: isTextShown ? (_jsx(StyledBadgeTextWrapper, Object.assign({ "data-testid": "SourceCell_BadgeTextWrapper" }, { children: _jsx(TextLabel, Object.assign({ "data-testid": "SourceCell_TextLabel", "data-source": source }, { children: t(camelCase(source)) })) }))) : (_jsx(StyledSourceImage, { src: ImageSrc, alt: source, onError: (e) => {
|
|
11
11
|
e.currentTarget.src = getPaymentMethodsIcon('card');
|
|
12
12
|
} })) })));
|
|
13
13
|
}
|
package/build/components/TableCells/CustomCells/TerminalsPlatformCell/TerminalsPlatformCell.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { StackProps } from '@mui/material/Stack';
|
|
3
2
|
import { TextAndLang } from '../../../../types/index.js';
|
|
4
|
-
type TerminalsPlatformCellProps =
|
|
3
|
+
type TerminalsPlatformCellProps = {
|
|
5
4
|
name: TextAndLang[];
|
|
6
5
|
icon?: React.ReactNode;
|
|
7
6
|
displayRules?: {
|
|
@@ -9,5 +8,5 @@ type TerminalsPlatformCellProps = StackProps & {
|
|
|
9
8
|
showLabel?: boolean;
|
|
10
9
|
};
|
|
11
10
|
};
|
|
12
|
-
declare const _default: import("react").MemoExoticComponent<({ name, icon, displayRules
|
|
11
|
+
declare const _default: import("react").MemoExoticComponent<({ name, icon, displayRules }: TerminalsPlatformCellProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
13
12
|
export default _default;
|
package/build/components/TableCells/CustomCells/TerminalsPlatformCell/TerminalsPlatformCell.js
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
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
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import { memo } from 'react';
|
|
14
3
|
import { useTranslation } from 'react-i18next';
|
|
@@ -17,8 +6,7 @@ import Typography from '@mui/material/Typography';
|
|
|
17
6
|
import Box from '@mui/material/Box';
|
|
18
7
|
import { Chip, Tooltip } from '../../../index.js';
|
|
19
8
|
import { getNameText } from '../../../../utils/index.js';
|
|
20
|
-
const TerminalsPlatformCell = (
|
|
21
|
-
var { name, icon, displayRules } = _a, props = __rest(_a, ["name", "icon", "displayRules"]);
|
|
9
|
+
const TerminalsPlatformCell = ({ name, icon, displayRules }) => {
|
|
22
10
|
const { i18n } = useTranslation();
|
|
23
11
|
const { showIcon = true, showLabel = true } = displayRules || {};
|
|
24
12
|
const platformName = getNameText(name, i18n.language);
|
|
@@ -26,6 +14,6 @@ const TerminalsPlatformCell = (_a) => {
|
|
|
26
14
|
const displayLabel = showLabel || !!platformName;
|
|
27
15
|
if (!displayIcon && !displayLabel)
|
|
28
16
|
return null;
|
|
29
|
-
return (_jsxs(Stack, Object.assign({ "data-testid": "TerminalsPlatformCell", direction: "row", alignItems: "center", spacing: 1, color: "text.primary" },
|
|
17
|
+
return (_jsxs(Stack, Object.assign({ "data-testid": "TerminalsPlatformCell", direction: "row", alignItems: "center", spacing: 1, color: "text.primary" }, { children: [displayIcon && (_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
18
|
};
|
|
31
19
|
export default memo(TerminalsPlatformCell);
|
|
@@ -534,7 +534,3 @@ export declare const gradientSettings: string;
|
|
|
534
534
|
export declare const gradientWallet: string;
|
|
535
535
|
export declare const manyCurrencyCoin: string;
|
|
536
536
|
export declare const manyCurrencyCoinGradient: string;
|
|
537
|
-
export declare const blackMobileBatteryIcon: string;
|
|
538
|
-
export declare const blackMobileSignalIcon: string;
|
|
539
|
-
export declare const emptyMobileWifiIcon: string;
|
|
540
|
-
export declare const deemaWithLabel: string;
|
|
@@ -538,7 +538,3 @@ export const gradientSettings = `${lightUrl}/gradientSettings.svg`;
|
|
|
538
538
|
export const gradientWallet = `${lightUrl}/gradientWallet.svg`;
|
|
539
539
|
export const manyCurrencyCoin = `${lightUrl}/manyCurrencyCoin.svg`;
|
|
540
540
|
export const manyCurrencyCoinGradient = `${lightUrl}/manyCurrencyCoinGradient.svg`;
|
|
541
|
-
export const blackMobileBatteryIcon = `${lightUrl}/blackMobileBatteryIcon.svg`;
|
|
542
|
-
export const blackMobileSignalIcon = `${lightUrl}/blackMobileSignalIcon.svg`;
|
|
543
|
-
export const emptyMobileWifiIcon = `${lightUrl}/emptyMobileWifiIcon.svg`;
|
|
544
|
-
export const deemaWithLabel = `${lightUrl}/deemaWithLabel.svg`;
|
package/package.json
CHANGED