@tap-payments/os-micro-frontend-shared 0.1.90-test.22 → 0.1.90-test.23

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,14 @@
1
1
  /// <reference types="react" />
2
2
  import { PayoutStatusType } from '../../TableCells';
3
+ import { SelectionProps } from '../../../types/index.js';
3
4
  type PayoutIconProps = {
4
5
  iconStyles?: React.CSSProperties;
5
6
  payoutStatus?: PayoutStatusType;
6
7
  payoutTooltip?: React.ReactNode;
7
8
  isTextShown?: boolean;
9
+ isSheetViewShown?: boolean;
10
+ chipIndex?: number;
11
+ selectionProps?: SelectionProps;
8
12
  };
9
- export declare const PayoutIcon: ({ payoutStatus, isTextShown, payoutTooltip, iconStyles }: PayoutIconProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const PayoutIcon: ({ payoutStatus, isTextShown, payoutTooltip, iconStyles, isSheetViewShown, chipIndex, selectionProps, }: PayoutIconProps) => import("react/jsx-runtime").JSX.Element;
10
14
  export {};
@@ -5,8 +5,13 @@ import Tooltip from '../../Tooltip';
5
5
  import { StatusIcon } from '../../TableCells/CustomCells/style';
6
6
  import { StatusTextLabel } from '../../TableCells/CustomCells/InvoiceStatusCell/style';
7
7
  import { payoutStatusIcons } from '../../TableCells/CustomCells/StatusCell/constant';
8
- export const PayoutIcon = ({ payoutStatus = 'PENDING', isTextShown, payoutTooltip, iconStyles }) => {
8
+ import StatusChipWithCopy from '../../StatusChipWithCopy';
9
+ export const PayoutIcon = ({ payoutStatus = 'PENDING', isTextShown, payoutTooltip, iconStyles, isSheetViewShown, chipIndex = 0, selectionProps = {}, }) => {
9
10
  const { t } = useTranslation();
10
- const title = payoutTooltip ? payoutTooltip : t(camelCase(payoutStatus));
11
- return (_jsx(Tooltip, Object.assign({ title: title }, { children: isTextShown ? (_jsx(StatusTextLabel, Object.assign({ "data-testid": "StatusCell_PayoutStatusLabel" }, { children: t(camelCase(payoutStatus)) }))) : (_jsx(StatusIcon, { src: payoutStatusIcons[payoutStatus], alt: "settled-icon", "data-testid": "StatusCell_PayoutStatusIcon", style: iconStyles })) })));
11
+ const statusText = t(camelCase(payoutStatus));
12
+ const title = payoutTooltip ? payoutTooltip : statusText;
13
+ if (isSheetViewShown) {
14
+ return (_jsx(StatusChipWithCopy, Object.assign({ chipIndex: chipIndex, copyText: statusText, selectionProps: selectionProps }, { children: statusText })));
15
+ }
16
+ return (_jsx(Tooltip, Object.assign({ title: title }, { children: isTextShown ? (_jsx(StatusTextLabel, Object.assign({ "data-testid": "StatusCell_PayoutStatusLabel" }, { children: statusText }))) : (_jsx(StatusIcon, { src: payoutStatusIcons[payoutStatus], alt: "settled-icon", "data-testid": "StatusCell_PayoutStatusIcon", style: iconStyles })) })));
12
17
  };
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.90-test.22",
5
- "testVersion": 22,
4
+ "version": "0.1.90-test.23",
5
+ "testVersion": 23,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",