@tap-payments/os-micro-frontend-shared 0.1.319 → 0.1.321
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/LinkCell/LinkCell.d.ts +7 -0
- package/build/components/TableCells/CustomCells/LinkCell/LinkCell.js +23 -0
- package/build/components/TableCells/CustomCells/LinkCell/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/LinkCell/index.js +1 -0
- package/build/components/TableCells/CustomCells/LinkCell/style.d.ts +7 -0
- package/build/components/TableCells/CustomCells/LinkCell/style.js +19 -0
- package/build/components/TableCells/CustomCells/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/index.js +1 -0
- package/build/constants/apps.d.ts +1 -0
- package/build/constants/apps.js +1 -0
- package/build/constants/country.d.ts +1 -0
- package/build/constants/country.js +1 -0
- package/build/constants/index.d.ts +1 -0
- package/build/constants/index.js +1 -0
- package/build/types/apps.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface LinkCellProps {
|
|
3
|
+
url: string;
|
|
4
|
+
}
|
|
5
|
+
declare function LinkCell({ url }: LinkCellProps): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
declare const _default: import("react").MemoExoticComponent<typeof LinkCell>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { memo, useState } from 'react';
|
|
3
|
+
import { CopyImage, Icon, Text, Tooltip } from '../../../index.js';
|
|
4
|
+
import { gadientLink } from '../../../../constants/index.js';
|
|
5
|
+
import { copyText } from '../../../../utils/index.js';
|
|
6
|
+
import { Chip, TooltipWrapper } from './style';
|
|
7
|
+
function LinkCell({ url }) {
|
|
8
|
+
const [isCopyActive, setIsCopyActive] = useState(false);
|
|
9
|
+
const onClick = () => {
|
|
10
|
+
setIsCopyActive(true);
|
|
11
|
+
copyText(url);
|
|
12
|
+
const timer = setTimeout(() => {
|
|
13
|
+
setIsCopyActive(false);
|
|
14
|
+
}, 2000);
|
|
15
|
+
return () => {
|
|
16
|
+
clearTimeout(timer);
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
if (!url)
|
|
20
|
+
return null;
|
|
21
|
+
return (_jsx(Tooltip, Object.assign({ title: _jsxs(TooltipWrapper, { children: [_jsx(Text, Object.assign({ noWrap: true, sx: { fontSize: 12 } }, { children: url })), _jsx(CopyImage, { isCopyActive: isCopyActive, onClick: onClick })] }) }, { children: _jsx(Chip, { children: _jsx(Icon, { src: gadientLink, alt: "link" }) }) })));
|
|
22
|
+
}
|
|
23
|
+
export default memo(LinkCell);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as LinkCell } from './LinkCell';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as LinkCell } from './LinkCell';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Chip: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
5
|
+
export declare const TooltipWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").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/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Box from '@mui/material/Box';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
export const Chip = styled(Box)(({ theme }) => ({
|
|
4
|
+
width: 43,
|
|
5
|
+
height: 24,
|
|
6
|
+
display: 'flex',
|
|
7
|
+
alignItems: 'center',
|
|
8
|
+
justifyContent: 'center',
|
|
9
|
+
borderRadius: '24px',
|
|
10
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
11
|
+
cursor: 'pointer',
|
|
12
|
+
}));
|
|
13
|
+
export const TooltipWrapper = styled(Box)(() => ({
|
|
14
|
+
display: 'flex',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
justifyContent: 'center',
|
|
17
|
+
fontSize: '12px',
|
|
18
|
+
gap: '4px',
|
|
19
|
+
}));
|
package/build/constants/apps.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BUSINESS_COUNTRIES: string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const BUSINESS_COUNTRIES = ['SA', 'KW', 'AE', 'BH', 'QA', 'OM', 'EG', 'JO', 'LB'];
|
package/build/constants/index.js
CHANGED
package/build/types/apps.d.ts
CHANGED
package/package.json
CHANGED