@tap-payments/os-micro-frontend-shared 0.1.381-test.2 → 0.1.381-test.4

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.
@@ -17,7 +17,7 @@ import Dropdown from '../../../DropdownMenu';
17
17
  import Tooltip from '../../../Tooltip';
18
18
  import { TableCell } from '../../../TableCells';
19
19
  import StyledBadge, { BadgeVariants } from '../../../CountBadge';
20
- import { jsonBlackIcon } from '../../../../constants/index.js';
20
+ import { idIcon, jsonBlackIcon } from '../../../../constants/index.js';
21
21
  import ActionIconsVariants from './components/ActionIconsVariants';
22
22
  import { actionIcons, colorToVariant, flags } from './constant';
23
23
  import { useActionCell } from './hooks/useActionCell';
@@ -71,7 +71,7 @@ export const ActionCell = memo((_a) => {
71
71
  },
72
72
  opacity: 1,
73
73
  },
74
- } }, { children: _jsxs(StyledBadge, Object.assign({ compact: true, variant: colorToVariant[(_c = flags[flag]) === null || _c === void 0 ? void 0 : _c.color] || BadgeVariants.ORANGE, "data-testid": "ActionCell_StyledBadge" }, { children: [flagsCount, "x"] })) })))] })) }))) })), showIdButton && _jsx(IDButton, { rowId: rowId || row.id }), _jsxs("div", Object.assign({ "data-testid": "ActionCell_IconsContainer", style: {
74
+ } }, { children: _jsxs(StyledBadge, Object.assign({ compact: true, variant: colorToVariant[(_c = flags[flag]) === null || _c === void 0 ? void 0 : _c.color] || BadgeVariants.ORANGE, "data-testid": "ActionCell_StyledBadge" }, { children: [flagsCount, "x"] })) })))] })) }))) })), showIdButton && _jsx(IDButton, { id: rowId || row.id, icon: idIcon }), _jsxs("div", Object.assign({ "data-testid": "ActionCell_IconsContainer", style: {
75
75
  display: 'flex',
76
76
  alignItems: 'center',
77
77
  justifyContent: 'center',
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  interface IDButtonI {
3
- rowId?: string;
3
+ icon: string;
4
+ id?: string;
4
5
  }
5
- declare function IDButton({ rowId }: IDButtonI): import("react/jsx-runtime").JSX.Element;
6
+ declare function IDButton({ icon, id }: IDButtonI): import("react/jsx-runtime").JSX.Element;
6
7
  declare const _default: import("react").MemoExoticComponent<typeof IDButton>;
7
8
  export default _default;
@@ -6,14 +6,14 @@ import Tooltip from '../../../Tooltip';
6
6
  import { greenCheckIcon, idIcon } from '../../../../constants/index.js';
7
7
  import { copyText } from '../../../../utils/index.js';
8
8
  import { RowId, Button } from './style';
9
- function IDButton({ rowId }) {
9
+ function IDButton({ icon, id }) {
10
10
  const [showCopy, setShowCopy] = useState(false);
11
11
  const [isHover, setIsHover] = useState(false);
12
12
  const { t } = useTranslation();
13
13
  const handleCopyRowId = () => {
14
- if (rowId) {
14
+ if (id) {
15
15
  setShowCopy(true);
16
- copyText(rowId);
16
+ copyText(id);
17
17
  const timer = setTimeout(() => {
18
18
  setShowCopy(false);
19
19
  }, 2000);
@@ -39,6 +39,6 @@ function IDButton({ rowId }) {
39
39
  opacity: isHover ? 1 : 0,
40
40
  }, exit: {
41
41
  opacity: 0,
42
- }, transition: { delay: isHover ? 0.3 : 0, duration: isHover ? 0.3 : 0.1 } }, { children: rowId }))), _jsx(Box, { component: "img", src: showCopy ? greenCheckIcon : idIcon, alt: "id" })] })) })) })));
42
+ }, transition: { delay: isHover ? 0.3 : 0, duration: isHover ? 0.3 : 0.1 } }, { children: id }))), _jsx(Box, { component: "img", src: showCopy ? greenCheckIcon : idIcon, alt: "id" })] })) })) })));
43
43
  }
44
44
  export default memo(IDButton);
@@ -54,6 +54,7 @@ export declare const disputeResolvedIcon: string;
54
54
  export declare const reversePayoutIcon: string;
55
55
  export declare const ellipsisHorizontalIcon: string;
56
56
  export declare const threeDsIcon: string;
57
+ export declare const invoiceIdIcon: string;
57
58
  export declare const idIcon: string;
58
59
  export declare const copyIcon: string;
59
60
  export declare const codeIcon: string;
@@ -59,6 +59,7 @@ export const disputeResolvedIcon = `${lightUrl}/disputeResolved.svg`;
59
59
  export const reversePayoutIcon = `${lightUrl}/reversePayout.svg`;
60
60
  export const ellipsisHorizontalIcon = `${lightUrl}/ellipsisHorizontal.svg`;
61
61
  export const threeDsIcon = `${lightUrl}/3ds.svg`;
62
+ export const invoiceIdIcon = `${lightUrl}/invoiceId.svg`;
62
63
  export const idIcon = `${lightUrl}/id.svg`;
63
64
  export const copyIcon = `${appBaseUrl}/copyIcon.svg`;
64
65
  export const codeIcon = `${appBaseUrl}/codeIcon.svg`;
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.381-test.2",
5
- "testVersion": 2,
4
+ "version": "0.1.381-test.4",
5
+ "testVersion": 4,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",