@tap-payments/os-micro-frontend-shared 0.1.291 → 0.1.292
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/BrandsCell/BrandsCell.js +4 -5
- package/build/components/TableCells/CustomCells/BrandsCell/style.d.ts +9 -2
- package/build/components/TableCells/CustomCells/BrandsCell/style.js +16 -13
- package/build/components/TableCells/CustomCells/EntityCell/EntityCell.js +4 -5
- package/build/components/TableCells/CustomCells/EntityCell/style.d.ts +10 -2
- package/build/components/TableCells/CustomCells/EntityCell/style.js +12 -16
- package/build/components/TableCells/CustomCells/IndividualsCell/style.js +1 -1
- package/package.json +1 -1
|
@@ -10,14 +10,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import TableCell from '../../TableCell';
|
|
14
|
-
import { BrandsWrapper, Label } from './style';
|
|
15
|
-
import { verificationIcon } from './constants';
|
|
16
13
|
import Tooltip from '../../../Tooltip';
|
|
17
|
-
import { Box } from '@mui/material';
|
|
18
14
|
import IconWithBadge from '../../../IconWithBadge';
|
|
15
|
+
import TableCell from '../../TableCell';
|
|
16
|
+
import { BrandsWrapper, BrandsWrapperContent, Label } from './style';
|
|
17
|
+
import { verificationIcon } from './constants';
|
|
19
18
|
export default function BrandsCell(_a) {
|
|
20
19
|
var { brand, verificationStatus, hideStatus } = _a, props = __rest(_a, ["brand", "verificationStatus", "hideStatus"]);
|
|
21
20
|
const icon = verificationIcon[verificationStatus !== null && verificationStatus !== void 0 ? verificationStatus : 'incomplete'];
|
|
22
|
-
return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(Tooltip, Object.assign({ title: brand.name }, { children: _jsx(BrandsWrapper, Object.assign({
|
|
21
|
+
return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(Tooltip, Object.assign({ title: brand.name }, { children: _jsx(BrandsWrapper, Object.assign({ hasClick: !!props.onClick }, { children: _jsxs(BrandsWrapperContent, { children: [_jsx(IconWithBadge, { mainIcon: brand.logo, mainIconSize: 16, containerSize: 16, borderColor: "transparent" }), _jsx(Label, Object.assign({ brandName: brand.name }, { children: brand.name || 'Not Available' })), !hideStatus && (_jsx(IconWithBadge, { mainIcon: icon, mainIconSize: 10, containerSize: 10, borderColor: "transparent", containerSx: { marginLeft: 'auto' } }))] }) })) })) })));
|
|
23
22
|
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const BrandsWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme
|
|
2
|
+
export declare const BrandsWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
3
|
+
hasClick?: boolean | undefined;
|
|
4
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
+
export declare const BrandsWrapperContent: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
6
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
7
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
3
8
|
export declare const BrandName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
4
9
|
export declare const VerificationIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
|
-
export declare const Label: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme
|
|
10
|
+
export declare const Label: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
11
|
+
brandName?: string | undefined;
|
|
12
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import { styled } from '@mui/material';
|
|
2
|
-
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
export const BrandsWrapper = styled('div', { shouldForwardProp: (props) => !['hasClick'].includes(props) })(({ theme, hasClick }) => ({
|
|
3
4
|
display: 'flex',
|
|
4
5
|
alignItems: 'center',
|
|
5
6
|
gap: theme.spacing(1),
|
|
6
7
|
border: '1px solid #F2F2F2',
|
|
7
8
|
borderRadius: '44px',
|
|
8
|
-
padding: '
|
|
9
|
-
|
|
9
|
+
padding: '3.5px 5px',
|
|
10
|
+
height: '24px',
|
|
11
|
+
cursor: hasClick ? 'pointer' : 'default',
|
|
12
|
+
}));
|
|
13
|
+
export const BrandsWrapperContent = styled(Box)(() => ({
|
|
14
|
+
display: 'flex',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
gap: '4px',
|
|
17
|
+
overflow: 'hidden',
|
|
18
|
+
width: '100%',
|
|
10
19
|
}));
|
|
11
20
|
export const BrandName = styled('div')(({ theme }) => ({
|
|
12
21
|
fontSize: '14px',
|
|
@@ -17,13 +26,7 @@ export const VerificationIcon = styled('img')(() => ({
|
|
|
17
26
|
width: '8px',
|
|
18
27
|
height: '8px',
|
|
19
28
|
}));
|
|
20
|
-
export const Label = styled('p')(({ theme }) => ({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
overflow: 'hidden',
|
|
25
|
-
textOverflow: 'ellipsis',
|
|
26
|
-
whiteSpace: 'nowrap',
|
|
27
|
-
width: '74px',
|
|
28
|
-
margin: '0',
|
|
29
|
-
}));
|
|
29
|
+
export const Label = styled('p', { shouldForwardProp: (props) => !['brandName'].includes(props) })(({ theme, brandName }) => (Object.assign({ fontSize: '14px', fontWeight: 400, color: theme.palette.text.primary, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', width: '74px', margin: '0' }, (!brandName && {
|
|
30
|
+
color: '#B1B1B1',
|
|
31
|
+
width: '84px',
|
|
32
|
+
}))));
|
|
@@ -10,15 +10,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import TableCell from '../../TableCell';
|
|
14
|
-
import { EntityName, EntityWrapper, VerificationIcon, VerificationContainer } from './style';
|
|
15
|
-
import { verificationIcon } from './constants';
|
|
16
13
|
import Tooltip from '../../../Tooltip';
|
|
17
14
|
import { CountryFlag } from '../../../index.js';
|
|
18
15
|
import { getCountryNameByISO } from '../../../../utils/index.js';
|
|
19
|
-
import
|
|
16
|
+
import TableCell from '../../TableCell';
|
|
17
|
+
import { EntityName, EntityWrapper, VerificationIcon, VerificationContainer, EntityWrapperContent } from './style';
|
|
18
|
+
import { verificationIcon } from './constants';
|
|
20
19
|
export default function EntityCell(_a) {
|
|
21
20
|
var { entity, country, verificationStatus, licenseNumber, hideStatus } = _a, props = __rest(_a, ["entity", "country", "verificationStatus", "licenseNumber", "hideStatus"]);
|
|
22
21
|
const icon = verificationIcon[verificationStatus !== null && verificationStatus !== void 0 ? verificationStatus : 'incomplete'];
|
|
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({
|
|
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, Object.assign({ hasClick: !!(props === null || props === void 0 ? void 0 : props.onClick), licenseNumber: licenseNumber }, { children: _jsxs(EntityWrapperContent, { children: [_jsx(Tooltip, Object.assign({ title: getCountryNameByISO(country) }, { children: _jsx(CountryFlag, { countryCode: country }) })), _jsx(EntityName, Object.assign({ licenseNumber: licenseNumber }, { children: licenseNumber || 'Not Available' })), !hideStatus && (_jsx(VerificationContainer, { children: _jsx(VerificationIcon, { src: icon }) }))] }) })) })) })));
|
|
24
23
|
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const EntityWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme
|
|
2
|
+
export declare const EntityWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
3
|
+
licenseNumber?: string | undefined;
|
|
4
|
+
hasClick?: boolean | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const EntityWrapperContent: 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>, {}, {}>;
|
|
3
9
|
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
|
-
export declare const EntityName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme
|
|
10
|
+
export declare const EntityName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
11
|
+
licenseNumber?: string | undefined;
|
|
12
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
13
|
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
14
|
export declare const VerificationContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
import { styled } from '@mui/material';
|
|
2
|
-
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
export const EntityWrapper = styled('div', { shouldForwardProp: (props) => !['licenseNumber', 'hasClick'].includes(props) })(({ theme, licenseNumber, hasClick }) => (Object.assign({ display: 'flex', alignItems: 'center', gap: theme.spacing(1), border: '1px solid #F2F2F2', borderRadius: '44px', padding: '3.5px 5px', height: '24px', cursor: hasClick ? 'pointer' : 'default' }, (licenseNumber && {
|
|
4
|
+
padding: '3.5px 8px',
|
|
5
|
+
}))));
|
|
6
|
+
export const EntityWrapperContent = styled(Box)(() => ({
|
|
3
7
|
display: 'flex',
|
|
4
8
|
alignItems: 'center',
|
|
5
|
-
gap:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
padding: '4px 8px',
|
|
9
|
-
lineHeight: '120%',
|
|
9
|
+
gap: '4px',
|
|
10
|
+
overflow: 'hidden',
|
|
11
|
+
width: '100%',
|
|
10
12
|
}));
|
|
11
13
|
export const EntityIcon = styled('img')(() => ({
|
|
12
14
|
width: '16px',
|
|
13
15
|
height: '11.73px',
|
|
14
16
|
}));
|
|
15
|
-
export const EntityName = styled('div')(({ theme }) => ({
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
overflow: 'hidden',
|
|
20
|
-
textOverflow: 'ellipsis',
|
|
21
|
-
whiteSpace: 'nowrap',
|
|
22
|
-
maxWidth: '100%',
|
|
23
|
-
margin: '0',
|
|
24
|
-
}));
|
|
17
|
+
export const EntityName = styled('div', { shouldForwardProp: (props) => !['licenseNumber'].includes(props) })(({ theme, licenseNumber }) => (Object.assign({ fontSize: '14px', fontWeight: 400, color: theme.palette.text.primary, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', margin: '0', width: '74px' }, (!licenseNumber && {
|
|
18
|
+
color: '#B1B1B1',
|
|
19
|
+
width: '84px',
|
|
20
|
+
}))));
|
|
25
21
|
export const VerificationIcon = styled('img')(() => ({
|
|
26
22
|
width: '10.5px',
|
|
27
23
|
height: '10.5px',
|
|
@@ -15,7 +15,7 @@ export const IndividualName = styled('div')(({ theme }) => ({
|
|
|
15
15
|
overflow: 'hidden',
|
|
16
16
|
textOverflow: 'ellipsis',
|
|
17
17
|
whiteSpace: 'nowrap',
|
|
18
|
-
|
|
18
|
+
width: '84px',
|
|
19
19
|
}));
|
|
20
20
|
export const VerificationIcon = styled('img')(() => ({
|
|
21
21
|
width: '10.5px',
|
package/package.json
CHANGED