@tap-payments/os-micro-frontend-shared 0.1.206 → 0.1.207
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { StatusChipWithCopy } from '../../../index.js';
|
|
2
|
+
import { StatusChip, StatusChipWithCopy } from '../../../index.js';
|
|
3
3
|
import { Box, Popover } from '@mui/material';
|
|
4
4
|
import { useEffect, useRef, useState } from 'react';
|
|
5
5
|
import { StyledSheetContainer } from './style';
|
|
@@ -13,12 +13,23 @@ function SalesChannelCellSheet({ channels, selectionProps = {} }) {
|
|
|
13
13
|
setHasOverflow(channelWrapperRef.current.scrollHeight > 20);
|
|
14
14
|
}
|
|
15
15
|
}, [channels]);
|
|
16
|
-
return (_jsxs(StyledSheetContainer, { children: [_jsx(Box, Object.assign({ sx: { display: 'flex', flexWrap: 'wrap', gap: hasOverflow ? '8px' : '4px'
|
|
16
|
+
return (_jsxs(StyledSheetContainer, { children: [_jsx(Box, Object.assign({ sx: { display: 'flex', flexWrap: 'wrap', gap: hasOverflow ? '8px' : '4px' }, ref: channelWrapperRef }, { children: channels === null || channels === void 0 ? void 0 : channels.filter((s) => !!s.address).map((channel, index) => {
|
|
17
17
|
var _a, _b;
|
|
18
|
-
return (_jsxs(StatusChipWithCopy, Object.assign({ copyText: `${(_a = channel.name) === null || _a === void 0 ? void 0 : _a.en}: ${channel.address}`, chipIndex: index + 1, selectionProps: selectionProps
|
|
18
|
+
return (_jsxs(StatusChipWithCopy, Object.assign({ copyText: `${(_a = channel.name) === null || _a === void 0 ? void 0 : _a.en}: ${channel.address}`, chipIndex: index + 1, selectionProps: selectionProps, maxWidth: "367px", sx: {
|
|
19
|
+
overflow: 'hidden',
|
|
20
|
+
textOverflow: 'ellipsis',
|
|
21
|
+
whiteSpace: 'nowrap',
|
|
22
|
+
maxWidth: '367px',
|
|
23
|
+
'& div': {
|
|
24
|
+
overflow: 'hidden',
|
|
25
|
+
textOverflow: 'ellipsis',
|
|
26
|
+
whiteSpace: 'nowrap',
|
|
27
|
+
maxWidth: '367px',
|
|
28
|
+
},
|
|
29
|
+
} }, { children: [(_b = channel.name) === null || _b === void 0 ? void 0 : _b.en, ": ", channel.address] }), channel.id));
|
|
19
30
|
}) })), hasOverflow && (_jsx(Box, Object.assign({ onClick: (e) => {
|
|
20
31
|
setAnchorEl(e.currentTarget.parentElement);
|
|
21
|
-
}, sx: { height: '18px' } }, { children: _jsx(
|
|
32
|
+
}, sx: { height: '18px' } }, { children: _jsx(StatusChip, Object.assign({ minWidth: "25", sx: { borderRadius: '24px', overflow: 'hidden' }, copyText: "..." }, { children: "..." })) }))), _jsx(Popover, Object.assign({ open: open, anchorEl: anchorEl, sx: { minWidth: anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.clientWidth }, onClose: () => {
|
|
22
33
|
setAnchorEl(null);
|
|
23
34
|
}, anchorOrigin: {
|
|
24
35
|
vertical: 'top',
|
|
@@ -54,7 +54,7 @@ export const salesChannelAnimation = (index, xDelta, isLastChannel) => ({
|
|
|
54
54
|
export const StyledSheetContainer = styled(Box)(() => ({
|
|
55
55
|
display: 'flex',
|
|
56
56
|
gap: '4px',
|
|
57
|
-
maxWidth: '
|
|
57
|
+
maxWidth: '440px',
|
|
58
58
|
justifyContent: 'space-between',
|
|
59
59
|
height: '18px',
|
|
60
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.207",
|
|
5
|
+
"testVersion": 11,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|