@tap-payments/os-micro-frontend-shared 0.1.338-test.1 → 0.1.338-test.2
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,10 +1,18 @@
|
|
|
1
1
|
import { SelectionProps } from '../../../../types/index.js';
|
|
2
2
|
interface Item {
|
|
3
3
|
id: string;
|
|
4
|
-
|
|
5
|
-
quantity: number;
|
|
6
|
-
amount: number;
|
|
4
|
+
product_id: string;
|
|
7
5
|
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
image: string;
|
|
8
|
+
currency: string;
|
|
9
|
+
amount: number;
|
|
10
|
+
quantity: number;
|
|
11
|
+
discount: {
|
|
12
|
+
type: string;
|
|
13
|
+
value: number;
|
|
14
|
+
};
|
|
15
|
+
merchant_id: string;
|
|
8
16
|
}
|
|
9
17
|
interface OrdersCellSheetProps {
|
|
10
18
|
selectionProps?: SelectionProps;
|
|
@@ -10,7 +10,7 @@ export function OrdersCellSheet({ items, selectionProps = {} }) {
|
|
|
10
10
|
const open = Boolean(anchorEl);
|
|
11
11
|
const [firstOrder, ...resetOrders] = items;
|
|
12
12
|
const orderLabel = useCallback((order) => `Qty ${order.quantity} ${order.name} - ${order.currency} ${order.amount}`, []);
|
|
13
|
-
return (_jsxs(Box, Object.assign({ sx: { display: 'flex', gap: '4px', alignItems: 'center' } }, { children: [_jsx(StatusChipWithCopy, Object.assign({ chipIndex: 0, selectionProps: selectionProps }, { children: _jsx(Text, Object.assign({ noWrap: true, sx: { maxWidth:
|
|
13
|
+
return (_jsxs(Box, Object.assign({ sx: { display: 'flex', gap: '4px', alignItems: 'center' } }, { children: [_jsx(StatusChipWithCopy, Object.assign({ chipIndex: 0, selectionProps: selectionProps }, { children: _jsx(Text, Object.assign({ noWrap: true, sx: { maxWidth: 190, fontSize: 11 } }, { children: orderLabel(firstOrder) })) })), items.length > 1 && (_jsx(Box, Object.assign({ onClick: (e) => {
|
|
14
14
|
setAnchorEl(e.currentTarget.parentElement);
|
|
15
15
|
}, 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: () => {
|
|
16
16
|
setAnchorEl(null);
|
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.338-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.338-test.2",
|
|
5
|
+
"testVersion": 2,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|