@tap-payments/os-micro-frontend-shared 0.0.199 → 0.0.200

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.
@@ -23,7 +23,7 @@ function AmountCell(_a) {
23
23
  const icon = currency && _jsx(FlagIcon, { src: getCurrenciesIcon(currency), alt: "customer icon" });
24
24
  const { integerAmount, decimalAmount } = formatAmountWithCurrency(amount, currency);
25
25
  if (tableMode === 'sheet') {
26
- return (_jsx(SheetviewAmountCell, { selectAmount: selectAmount, selectCurrency: selectCurrency, requestAmount: requestAmount, requestCurrency: requestCurrency, merchantAmount: merchantAmount, merchantCurrency: merchantCurrency }));
26
+ return (_jsx(SheetviewAmountCell, { type: conversionType, selectAmount: selectAmount, selectCurrency: selectCurrency, requestAmount: requestAmount, requestCurrency: requestCurrency, merchantAmount: merchantAmount, merchantCurrency: merchantCurrency }));
27
27
  }
28
28
  return (_jsx(TableCell, Object.assign({}, props, { children: _jsxs(AmountCellContainer, { children: [_jsx(Tooltip, Object.assign({ title: tooltipLabel || '' }, { children: conversionType && (_jsx(ConversionBadge, Object.assign({ tableMode: tableMode, className: "conversion-type" }, { children: conversionType }))) })), _jsx(Tooltip, Object.assign({ title: _jsx(CurrencyIcon, { currency: currency }) }, { children: isTextShown ? _jsx("span", {}) : _jsx(FlagContainer, { children: icon }) })), _jsx(Tooltip, Object.assign({ title: amountTooltipLabel }, { children: _jsx(CurrencySpan, Object.assign({ tableMode: tableMode }, { children: amount !== undefined ? (_jsxs(_Fragment, { children: [_jsx("span", { children: _jsx(CurrencyIcon, { currency: currency, fontSize: 10 }) }), ' ', integerAmount, decimalAmount && (_jsxs(_Fragment, { children: [".", _jsx(DecimalSpan, { children: decimalAmount })] }))] })) : (_jsx("span", { children: "-" })) })) }))] }) })));
29
29
  }
@@ -1,4 +1,5 @@
1
1
  type Props = {
2
+ type: 'fx' | 'dcc' | undefined;
2
3
  selectAmount?: number;
3
4
  selectCurrency?: string;
4
5
  requestAmount?: number;
@@ -6,5 +7,5 @@ type Props = {
6
7
  merchantAmount?: number;
7
8
  merchantCurrency?: string;
8
9
  };
9
- export declare const SheetviewAmountCell: ({ selectAmount, selectCurrency, requestAmount, requestCurrency, merchantAmount, merchantCurrency }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const SheetviewAmountCell: ({ type, selectAmount, selectCurrency, requestAmount, requestCurrency, merchantAmount, merchantCurrency, }: Props) => import("react/jsx-runtime").JSX.Element;
10
11
  export {};
@@ -2,7 +2,7 @@ import { jsxs as _jsxs, Fragment as _Fragment, jsx as _jsx } from "react/jsx-run
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { formatAmountWithCurrency } from '../../../../utils/index.js';
4
4
  import { CurrencyIcon, StatusGroupChips } from '../../../index.js';
5
- export const SheetviewAmountCell = ({ selectAmount, selectCurrency, requestAmount, requestCurrency, merchantAmount, merchantCurrency }) => {
5
+ export const SheetviewAmountCell = ({ type, selectAmount, selectCurrency, requestAmount, requestCurrency, merchantAmount, merchantCurrency, }) => {
6
6
  const customerSelectValue = formatAmountWithCurrency(selectAmount, selectCurrency);
7
7
  const chargeValue = formatAmountWithCurrency(requestAmount, requestCurrency);
8
8
  const settlementValue = formatAmountWithCurrency(merchantAmount, merchantCurrency);
@@ -12,11 +12,15 @@ export const SheetviewAmountCell = ({ selectAmount, selectCurrency, requestAmoun
12
12
  border: 'none',
13
13
  };
14
14
  const chips = [
15
- {
16
- key: 'selected',
17
- content: (_jsxs(_Fragment, { children: [_jsxs("span", { children: [t('customerSelected'), ": ", selectCurrency] }), customerSelectValue.integerAmount, ".", customerSelectValue.decimalAmount] })),
18
- sx: chipSx,
19
- },
15
+ ...(type !== 'fx'
16
+ ? [
17
+ {
18
+ key: 'selected',
19
+ content: (_jsxs(_Fragment, { children: [_jsxs("span", { children: [t('customerSelected'), ": ", selectCurrency] }), customerSelectValue.integerAmount, ".", customerSelectValue.decimalAmount] })),
20
+ sx: chipSx,
21
+ },
22
+ ]
23
+ : []),
20
24
  {
21
25
  key: 'charge',
22
26
  content: (_jsxs(_Fragment, { children: [_jsxs("span", { children: [t('charge'), ": ", requestCurrency] }), chargeValue.integerAmount, ".", chargeValue.decimalAmount] })),
@@ -24,7 +28,7 @@ export const SheetviewAmountCell = ({ selectAmount, selectCurrency, requestAmoun
24
28
  },
25
29
  {
26
30
  key: 'settlement',
27
- content: (_jsxs(_Fragment, { children: [_jsxs("span", { children: [t('settled'), ":"] }), _jsx(CurrencyIcon, { currency: merchantCurrency }), settlementValue.integerAmount, ".", settlementValue.decimalAmount] })),
31
+ content: (_jsxs(_Fragment, { children: [_jsxs("span", { children: [t('settled'), ":"] }), _jsx(CurrencyIcon, { currency: 'KWD' }), _jsxs("span", { children: [settlementValue.integerAmount, ".", settlementValue.decimalAmount] })] })),
28
32
  sx: chipSx,
29
33
  },
30
34
  ];
package/package.json CHANGED
@@ -1,7 +1,7 @@
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.0.199",
4
+ "version": "0.0.200",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
7
7
  "module": "build/index.js",