@tap-payments/os-micro-frontend-shared 0.1.129-test.2 → 0.1.129-test.3
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/TableCells/CustomCells/EntityCell/EntityCell.js +3 -2
- package/build/components/TableCells/CustomCells/EntityCell/style.d.ts +0 -5
- package/build/components/TableCells/CustomCells/EntityCell/style.js +2 -24
- package/build/components/TableCells/CustomCells/SalesChannelCell/SalesChannelCell.js +4 -3
- package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +2 -1
- package/build/components/TableCells/CustomCells/SalesChannelCell/style.js +5 -6
- package/package.json +2 -2
|
@@ -11,13 +11,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import TableCell from '../../TableCell';
|
|
14
|
-
import { EntityName, EntityWrapper, VerificationIcon,
|
|
14
|
+
import { EntityName, EntityWrapper, VerificationIcon, VerificationContainer } from './style';
|
|
15
15
|
import { verificationIcon } from './constants';
|
|
16
16
|
import Tooltip from '../../../Tooltip';
|
|
17
17
|
import { CountryFlag } from '../../../index.js';
|
|
18
18
|
import { getCountryName } from '../../../../utils/index.js';
|
|
19
|
+
import { Box } from '@mui/material';
|
|
19
20
|
export default function EntityCell(_a) {
|
|
20
21
|
var { entity, country, verificationStatus, licenseNumber, hideStatus } = _a, props = __rest(_a, ["entity", "country", "verificationStatus", "licenseNumber", "hideStatus"]);
|
|
21
22
|
const icon = verificationIcon[verificationStatus !== null && verificationStatus !== void 0 ? verificationStatus : 'incomplete'];
|
|
22
|
-
return (_jsx(TableCell, Object.assign({}, props, { sx: { cursor: (props === null || props === void 0 ? void 0 : props.onClick) ? 'pointer' : 'default' } }, { children: _jsx(Tooltip, Object.assign({ title: entity }, { children: _jsx(EntityWrapper, {
|
|
23
|
+
return (_jsx(TableCell, Object.assign({}, props, { sx: { cursor: (props === null || props === void 0 ? void 0 : props.onClick) ? 'pointer' : 'default' } }, { children: _jsx(Tooltip, Object.assign({ title: entity }, { children: _jsx(EntityWrapper, Object.assign({ sx: { cursor: props.onClick ? 'pointer' : 'default' } }, { children: _jsxs(Box, Object.assign({ display: "flex", alignItems: "center", gap: '5px', sx: { overflow: 'hidden', width: '100%' } }, { children: [_jsx(Tooltip, Object.assign({ title: getCountryName(country) }, { children: _jsx(CountryFlag, { code: country }) })), _jsx(EntityName, { children: licenseNumber }), !hideStatus && (_jsx(VerificationContainer, { children: _jsx(VerificationIcon, { src: icon }) }))] })) })) })) })));
|
|
23
24
|
}
|
|
@@ -3,9 +3,4 @@ export declare const EntityWrapper: import("@emotion/styled").StyledComponent<im
|
|
|
3
3
|
export declare const EntityIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
4
|
export declare const EntityName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
5
|
export declare const VerificationIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
6
|
-
export declare const EntityContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
8
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
9
|
-
export declare const EntityInfoContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
6
|
export declare const VerificationContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
|
-
export declare const EmptyCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { styled } from '@mui/material';
|
|
2
2
|
export const EntityWrapper = styled('div')(({ theme }) => ({
|
|
3
3
|
display: 'flex',
|
|
4
4
|
alignItems: 'center',
|
|
5
5
|
gap: theme.spacing(1),
|
|
6
|
-
border: '
|
|
6
|
+
border: '1px solid #F2F2F2',
|
|
7
7
|
borderRadius: '44px',
|
|
8
8
|
padding: '4px 8px',
|
|
9
9
|
lineHeight: '120%',
|
|
@@ -26,29 +26,7 @@ export const VerificationIcon = styled('img')(() => ({
|
|
|
26
26
|
width: '10.5px',
|
|
27
27
|
height: '10.5px',
|
|
28
28
|
}));
|
|
29
|
-
export const EntityContainer = styled(Box)({
|
|
30
|
-
display: 'flex',
|
|
31
|
-
alignItems: 'center',
|
|
32
|
-
width: '100%',
|
|
33
|
-
overflow: 'hidden',
|
|
34
|
-
gap: '5px',
|
|
35
|
-
});
|
|
36
|
-
export const EntityInfoContainer = styled('div')({
|
|
37
|
-
display: 'flex',
|
|
38
|
-
alignItems: 'center',
|
|
39
|
-
minWidth: '110px',
|
|
40
|
-
gap: '8px',
|
|
41
|
-
});
|
|
42
29
|
export const VerificationContainer = styled('div')({
|
|
43
30
|
marginLeft: 'auto',
|
|
44
31
|
width: 'auto',
|
|
45
32
|
});
|
|
46
|
-
export const EmptyCell = styled('div')({
|
|
47
|
-
fontWeight: 400,
|
|
48
|
-
fontSize: 14,
|
|
49
|
-
lineHeight: '120%',
|
|
50
|
-
letterSpacing: 0,
|
|
51
|
-
color: '#B1B1B1',
|
|
52
|
-
textAlign: 'center',
|
|
53
|
-
width: '100%',
|
|
54
|
-
});
|
|
@@ -24,9 +24,10 @@ function SalesChannelCell(_a) {
|
|
|
24
24
|
const sourceTooltip = channel.address;
|
|
25
25
|
const channelCode = (_a = channel.code) === null || _a === void 0 ? void 0 : _a.replace(/_/g, '');
|
|
26
26
|
const isLastChannel = index === (channels === null || channels === void 0 ? void 0 : channels.length) - 1;
|
|
27
|
-
return (_jsx(Tooltip, Object.assign({ title: sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ order: index, variants: salesChannelAnimation(index, isTextShown ? 74 : 0), sx:
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
return (_jsx(Tooltip, Object.assign({ title: sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ order: index, variants: salesChannelAnimation(index, isTextShown ? 74 : 0, isLastChannel), sx: {
|
|
28
|
+
width: isTextShown ? '70px' : '36px',
|
|
29
|
+
cursor: NON_CLICKABLE_CHANNELS.includes(channel.code) ? 'default' : 'pointer',
|
|
30
|
+
}, onClick: () => {
|
|
30
31
|
if (NON_CLICKABLE_CHANNELS.includes(channel.code))
|
|
31
32
|
return;
|
|
32
33
|
if (channel === null || channel === void 0 ? void 0 : channel.address)
|
|
@@ -267,7 +267,7 @@ export declare const SalesChannelsContainer: import("@emotion/styled").StyledCom
|
|
|
267
267
|
}, {}, {}>;
|
|
268
268
|
export declare const ChannelTextLabel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
269
269
|
export declare const ChannelTextWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
270
|
-
export declare const salesChannelAnimation: (index: number, xDelta?: number) => {
|
|
270
|
+
export declare const salesChannelAnimation: (index: number, xDelta?: number, isLastChannel?: boolean) => {
|
|
271
271
|
start: {
|
|
272
272
|
x: number;
|
|
273
273
|
transition: {
|
|
@@ -277,6 +277,7 @@ export declare const salesChannelAnimation: (index: number, xDelta?: number) =>
|
|
|
277
277
|
};
|
|
278
278
|
};
|
|
279
279
|
animate: {
|
|
280
|
+
boxShadow?: string | undefined;
|
|
280
281
|
x: number;
|
|
281
282
|
transition: {
|
|
282
283
|
duration: number;
|
|
@@ -34,7 +34,7 @@ export const ChannelTextWrapper = styled('div')(() => ({
|
|
|
34
34
|
justifyContent: 'center',
|
|
35
35
|
paddingInline: '4px',
|
|
36
36
|
}));
|
|
37
|
-
export const salesChannelAnimation = (index, xDelta) => ({
|
|
37
|
+
export const salesChannelAnimation = (index, xDelta, isLastChannel) => ({
|
|
38
38
|
start: {
|
|
39
39
|
x: index * 6,
|
|
40
40
|
transition: {
|
|
@@ -43,12 +43,11 @@ export const salesChannelAnimation = (index, xDelta) => ({
|
|
|
43
43
|
ease: 'easeIn',
|
|
44
44
|
},
|
|
45
45
|
},
|
|
46
|
-
animate: {
|
|
47
|
-
x: xDelta ? index * xDelta : index * 39,
|
|
48
|
-
transition: {
|
|
46
|
+
animate: Object.assign({ x: xDelta ? index * xDelta : index * 39, transition: {
|
|
49
47
|
duration: 0.3,
|
|
50
48
|
type: 'tween',
|
|
51
49
|
ease: 'easeOut',
|
|
52
|
-
},
|
|
53
|
-
|
|
50
|
+
} }, (isLastChannel && {
|
|
51
|
+
boxShadow: '7px 0px 8px 0px #F2F2F2',
|
|
52
|
+
})),
|
|
54
53
|
});
|
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.129-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.129-test.3",
|
|
5
|
+
"testVersion": 3,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|