@tap-payments/os-micro-frontend-shared 0.1.70-test.22 → 0.1.70-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,3 +1,3 @@
1
1
  import { BalanceCellProps } from './type';
2
- declare function BalanceCell({ percentage, days, remainingAmount, currency, isTextShown, isSheetViewShown, selectionProps, ...props }: BalanceCellProps): import("react/jsx-runtime").JSX.Element;
2
+ declare function BalanceCell({ percentage, days, remainingAmount, currency, isTextShown, isSheetViewShown, selectionProps, ...props }: BalanceCellProps): import("react/jsx-runtime").JSX.Element | null;
3
3
  export default BalanceCell;
@@ -30,6 +30,8 @@ function BalanceCell(_a) {
30
30
  return (_jsxs(_Fragment, { children: ["Remaining Authorized Balance - ", currencyIcon, " ", amount] }));
31
31
  }, [remainingAmount, currency]);
32
32
  if (isSheetViewShown) {
33
+ if (percentage === 0)
34
+ return null;
33
35
  return (_jsxs(StatusChipWithCopy, Object.assign({ chipIndex: 0, copyText: `${integerAmount}.${decimalAmount}`, selectionProps: selectionProps }, { children: [percentage, "% | Remaining balance - ", currencyIcon, " ", amount] })));
34
36
  }
35
37
  return (_jsx(TableCell, Object.assign({}, props, { children: _jsx("div", Object.assign({ style: {
@@ -1,6 +1,10 @@
1
1
  import type { StatusCellProps } from './type';
2
- declare function StatusCell({ statuses, isTextShown, centerIconKey, xGap, tableMode, ...props }: Readonly<StatusCellProps & {
2
+ import { SelectionProps } from '../../../../types/index.js';
3
+ interface StatusCellI extends Readonly<StatusCellProps & {
3
4
  isChargesService?: boolean;
4
5
  isAuthorizationsService?: boolean;
5
- }>): import("react/jsx-runtime").JSX.Element;
6
+ }> {
7
+ selectionProps?: SelectionProps;
8
+ }
9
+ declare function StatusCell({ statuses, isTextShown, centerIconKey, xGap, tableMode, selectionProps, ...props }: StatusCellI): import("react/jsx-runtime").JSX.Element;
6
10
  export default StatusCell;
@@ -11,15 +11,15 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { TableCell } from '../../../TableCells';
14
- import StatusChip from '../../../StatusChip';
15
14
  import { StatusIcon, StatusContainer, StatusWrapper } from './style';
16
15
  import { getStatusesFilteredObject } from './utils';
16
+ import StatusChipWithCopy from '../../../StatusChipWithCopy';
17
17
  function StatusCell(_a) {
18
- var { statuses, isTextShown, centerIconKey, xGap, tableMode } = _a, props = __rest(_a, ["statuses", "isTextShown", "centerIconKey", "xGap", "tableMode"]);
18
+ var { statuses, isTextShown, centerIconKey, xGap, tableMode, selectionProps = {} } = _a, props = __rest(_a, ["statuses", "isTextShown", "centerIconKey", "xGap", "tableMode", "selectionProps"]);
19
19
  const statusesFilteredObject = statuses ? getStatusesFilteredObject(statuses) : {};
20
20
  const statusesList = Object.values(statusesFilteredObject).filter(Boolean);
21
21
  if (tableMode === 'sheet') {
22
- return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(StatusContainer, { children: statusesList.map((status, index) => (_jsx(StatusChip, Object.assign({ borderColor: "transparent", padding: '0px' }, { children: status }), index))) }) })));
22
+ return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(StatusContainer, { children: statusesList.map((status, index) => (_jsx(StatusChipWithCopy, Object.assign({ borderColor: "transparent", padding: '0px', chipIndex: index, selectionProps: selectionProps }, { children: status }), index))) }) })));
23
23
  }
24
24
  const xGapValue = isTextShown ? xGap || 120 : 40;
25
25
  const centerIconIndex = centerIconKey ? Object.entries(statusesFilteredObject).findIndex(([key]) => key === centerIconKey) : 0;
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.70-test.22",
5
- "testVersion": 22,
4
+ "version": "0.1.70-test.23",
5
+ "testVersion": 23,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",