@tap-payments/os-micro-frontend-shared 0.1.85 → 0.1.87-test.2-test.3
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.
- package/LICENSE +21 -21
- package/README.md +12 -12
- package/build/components/StatusIcons/AuthorizationAutoIcons/CaptureAutoIcon.d.ts +1 -1
- package/build/components/StatusIcons/AuthorizationAutoIcons/CaptureAutoIcon.js +12 -3
- package/build/components/StatusIcons/AuthorizationAutoIcons/VoidAutoIcon.d.ts +1 -1
- package/build/components/StatusIcons/AuthorizationAutoIcons/VoidAutoIcon.js +13 -4
- package/build/components/StatusIcons/AuthorizationAutoIcons/type.d.ts +3 -0
- package/build/components/StatusIcons/ChargeStatusIcon/ChargeStatusIcon.d.ts +4 -1
- package/build/components/StatusIcons/ChargeStatusIcon/ChargeStatusIcon.js +6 -2
- package/build/components/TableCells/CustomCells/AmountCell/AmountCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/AmountCell/AmountCell.js +15 -3
- package/build/components/TableCells/CustomCells/BalanceCell/BalanceCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/BalanceCell/BalanceCell.js +11 -5
- package/build/components/TableCells/CustomCells/BalanceCell/type.d.ts +3 -0
- package/build/components/TableCells/CustomCells/SalesChannelCell/SalesChannelCell.js +3 -1
- package/build/components/TableCells/CustomCells/StatusCell/StatusCell.js +1 -2
- package/build/components/TableCells/CustomCells/type.d.ts +2 -0
- package/build/constants/table/cell/authorizationTableCellWidth.d.ts +58 -8
- package/build/constants/table/cell/authorizationTableCellWidth.js +58 -8
- package/build/constants/table/cell/refundTableCellWidth.d.ts +1 -11
- package/build/constants/table/cell/refundTableCellWidth.js +1 -11
- package/build/constants/table/cell/terminalsTableCellWidth.d.ts +3 -3
- package/build/constants/table/cell/terminalsTableCellWidth.js +3 -3
- package/build/utils/url.d.ts +1 -0
- package/build/utils/url.js +10 -0
- package/package.json +139 -139
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Tap Payments
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Tap Payments
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# os-micro-frontend-shared
|
|
2
|
-
|
|
3
|
-
## Publishing Workflow
|
|
4
|
-
|
|
5
|
-
1. Update version in package.json
|
|
6
|
-
2. Commit changes
|
|
7
|
-
3. Create and push a tag:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm version patch # or minor, major
|
|
11
|
-
git push origin main --tags
|
|
12
|
-
```
|
|
1
|
+
# os-micro-frontend-shared
|
|
2
|
+
|
|
3
|
+
## Publishing Workflow
|
|
4
|
+
|
|
5
|
+
1. Update version in package.json
|
|
6
|
+
2. Commit changes
|
|
7
|
+
3. Create and push a tag:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm version patch # or minor, major
|
|
11
|
+
git push origin main --tags
|
|
12
|
+
```
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BalanceCellProps } from './type';
|
|
2
|
-
declare function CaptureAutoIcon({ voidPercentage, capturePercentage, captureCount, autoType, captureAmount, voidAmount, currency, isTextShown, remainingAmount, }: BalanceCellProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare function CaptureAutoIcon({ voidPercentage, capturePercentage, captureCount, autoType, captureAmount, voidAmount, currency, isTextShown, remainingAmount, isSheetViewShown, selectionProps, }: BalanceCellProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default CaptureAutoIcon;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback } from 'react';
|
|
2
|
+
import { useCallback, useMemo } from 'react';
|
|
3
3
|
import { useTheme } from '@mui/material/styles';
|
|
4
4
|
import { motion } from 'framer-motion';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
@@ -8,10 +8,11 @@ import { CaptureTextLabel } from '../../TableCells/CustomCells/style';
|
|
|
8
8
|
import Tooltip from '../../Tooltip';
|
|
9
9
|
import { capturedAuthorizeIcon, capturedIcon } from '../../../constants/index.js';
|
|
10
10
|
import { formatAmount, formatAmountWithCurrency } from '../../../utils/index.js';
|
|
11
|
+
import StatusChipWithCopy from '../../StatusChipWithCopy';
|
|
11
12
|
import { autoIcons } from './constant';
|
|
12
13
|
import { AutoIconWrapper, BalanceCellContainer, PartialIcon, PercentageContainer, PiePercentage, AutoIconImage, FullyCapturedWrapper } from './style';
|
|
13
14
|
import { formatPercentage } from './utils';
|
|
14
|
-
function CaptureAutoIcon({ voidPercentage, capturePercentage, captureCount, autoType, captureAmount, voidAmount, currency, isTextShown, remainingAmount, }) {
|
|
15
|
+
function CaptureAutoIcon({ voidPercentage, capturePercentage, captureCount, autoType, captureAmount, voidAmount, currency, isTextShown, remainingAmount, isSheetViewShown, selectionProps = {}, }) {
|
|
15
16
|
var _a, _b;
|
|
16
17
|
const isFullyUsed = Number(capturePercentage) + Number(voidPercentage) === 100 || remainingAmount <= 0;
|
|
17
18
|
const theme = useTheme();
|
|
@@ -54,7 +55,15 @@ function CaptureAutoIcon({ voidPercentage, capturePercentage, captureCount, auto
|
|
|
54
55
|
},
|
|
55
56
|
} }, { children: [_jsxs(PercentageContainer, Object.assign({ isCapture: true, percentage: capturePercentage }, { children: [capturePercentage, "% ", _jsx(PiePercentage, { isCapture: true, percentage: formatPercentage(capturePercentage) })] })), captureCount > 1 && (_jsxs(StyledBadge, Object.assign({ compact: true, variant: BadgeVariants.DARK }, { children: [captureCount, "x"] })))] }))] })) }))) : autoType === 'CAPTURED' && !isFullyUsed ? (_jsx(Tooltip, Object.assign({ title: generateAutoTooltip('Capture') }, { children: _jsx(AutoIconWrapper, { children: _jsx(AutoIconImage, { src: (_a = autoIcons.CAPTURED) === null || _a === void 0 ? void 0 : _a.icon, alt: "auto" }) }) }))) : (_jsx(Tooltip, Object.assign({ title: generateAutoTooltip('Capture') }, { children: _jsx(AutoIconWrapper, { children: _jsx(AutoIconImage, { src: (_b = autoIcons.CAPTURED) === null || _b === void 0 ? void 0 : _b.icon, alt: "auto" }) }) })));
|
|
56
57
|
const captureStatus = capturePercentage === 100 ? (_jsx(Tooltip, Object.assign({ title: t('captured') }, { children: _jsx(FullyCapturedWrapper, { children: _jsx(AutoIconImage, { src: capturedIcon, alt: "captured" }) }) }))) : (autoCaptureStatus);
|
|
57
|
-
const captureContent =
|
|
58
|
+
const captureContent = useMemo(() => {
|
|
59
|
+
if (isSheetViewShown && captureStatus) {
|
|
60
|
+
return (_jsx(StatusChipWithCopy, Object.assign({ chipIndex: 4, copyText: t('captured'), selectionProps: selectionProps }, { children: t('captured') })));
|
|
61
|
+
}
|
|
62
|
+
if (isTextShown && captureStatus) {
|
|
63
|
+
return _jsx(CaptureTextLabel, { children: t('captured') });
|
|
64
|
+
}
|
|
65
|
+
return captureStatus;
|
|
66
|
+
}, [isTextShown, captureStatus, isSheetViewShown, selectionProps]);
|
|
58
67
|
return (captureContent && (_jsx("div", Object.assign({ style: {
|
|
59
68
|
zIndex: 12,
|
|
60
69
|
} }, { children: captureContent }))));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BalanceCellProps } from './type';
|
|
2
|
-
declare function VoidAutoIcon({ voidPercentage, capturePercentage, voidCount, autoType, captureAmount, voidAmount, currency, isTextShown, remainingAmount, }: BalanceCellProps): import("react/jsx-runtime").JSX.Element | null;
|
|
2
|
+
declare function VoidAutoIcon({ voidPercentage, capturePercentage, voidCount, autoType, captureAmount, voidAmount, currency, isTextShown, isSheetViewShown, selectionProps, remainingAmount, }: BalanceCellProps): import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
export default VoidAutoIcon;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback } from 'react';
|
|
2
|
+
import { useCallback, useMemo } from 'react';
|
|
3
3
|
import { useTheme } from '@mui/material/styles';
|
|
4
4
|
import { motion } from 'framer-motion';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import StyledBadge, { BadgeVariants } from '../../CountBadge';
|
|
7
7
|
import { VoidTextLabel } from '../../TableCells/CustomCells/style';
|
|
8
|
+
import StatusChipWithCopy from '../../StatusChipWithCopy';
|
|
8
9
|
import Tooltip from '../../Tooltip';
|
|
9
10
|
import { voidedIcon } from '../../../constants/index.js';
|
|
10
11
|
import { formatAmount, formatAmountWithCurrency } from '../../../utils/index.js';
|
|
11
12
|
import { autoIcons } from './constant';
|
|
12
13
|
import { AutoIconWrapper, BalanceCellContainer, PercentageContainer, PiePercentage, AutoIconImage } from './style';
|
|
13
14
|
import { formatPercentage } from './utils';
|
|
14
|
-
function VoidAutoIcon({ voidPercentage, capturePercentage, voidCount, autoType, captureAmount, voidAmount, currency, isTextShown, remainingAmount, }) {
|
|
15
|
+
function VoidAutoIcon({ voidPercentage, capturePercentage, voidCount, autoType, captureAmount, voidAmount, currency, isTextShown, isSheetViewShown, selectionProps = {}, remainingAmount, }) {
|
|
15
16
|
var _a;
|
|
16
17
|
const isFullyUsed = Number(capturePercentage) + Number(voidPercentage) === 100 || remainingAmount <= 0;
|
|
17
18
|
const theme = useTheme();
|
|
@@ -59,7 +60,15 @@ function VoidAutoIcon({ voidPercentage, capturePercentage, voidCount, autoType,
|
|
|
59
60
|
},
|
|
60
61
|
} }, { children: _jsxs(StyledBadge, Object.assign({ compact: true, variant: BadgeVariants.NEUTRAL }, { children: [voidCount, "x"] })) })))] })) }))) : autoType === 'VOID' && !isFullyUsed ? (_jsx(Tooltip, Object.assign({ title: generateAutoTooltip('Void') }, { children: _jsx(AutoIconWrapper, { children: _jsx(AutoIconImage, { src: (_a = autoIcons.VOID) === null || _a === void 0 ? void 0 : _a.icon, alt: "auto" }) }) }))) : null;
|
|
61
62
|
const voidStatus = voidPercentage === 100 ? (_jsx(Tooltip, Object.assign({ title: t('void') }, { children: _jsx(AutoIconWrapper, { children: _jsx(AutoIconImage, { src: voidedIcon, alt: "void" }) }) }))) : (autoVoidStatus);
|
|
62
|
-
const voidContent =
|
|
63
|
-
|
|
63
|
+
const voidContent = useMemo(() => {
|
|
64
|
+
if (isSheetViewShown && voidStatus) {
|
|
65
|
+
return (_jsx(StatusChipWithCopy, Object.assign({ chipIndex: 5, copyText: t('void'), selectionProps: selectionProps }, { children: t('void') })));
|
|
66
|
+
}
|
|
67
|
+
if (isTextShown && voidStatus) {
|
|
68
|
+
return _jsx(VoidTextLabel, { children: t('void') });
|
|
69
|
+
}
|
|
70
|
+
return voidStatus;
|
|
71
|
+
}, [isTextShown, voidStatus, isSheetViewShown, selectionProps]);
|
|
72
|
+
return voidContent ? _jsx("div", Object.assign({ style: Object.assign({}, (!isSheetViewShown && { zIndex: 11 })) }, { children: voidContent })) : null;
|
|
64
73
|
}
|
|
65
74
|
export default VoidAutoIcon;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TableCellProps } from '@mui/material';
|
|
2
|
+
import { SelectionProps } from '../../../types/index.js';
|
|
2
3
|
export interface BalanceCellProps extends TableCellProps {
|
|
3
4
|
autoType?: 'VOID' | 'CAPTURED';
|
|
4
5
|
capturePercentage: number;
|
|
@@ -11,4 +12,6 @@ export interface BalanceCellProps extends TableCellProps {
|
|
|
11
12
|
voidCount: number;
|
|
12
13
|
isTextShown?: boolean;
|
|
13
14
|
remainingAmount: number;
|
|
15
|
+
isSheetViewShown?: boolean;
|
|
16
|
+
selectionProps?: SelectionProps;
|
|
14
17
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
+
import { SelectionProps } from '../../../types/index.js';
|
|
2
3
|
import { type ChargeStatus } from '../../TableCells';
|
|
3
|
-
export declare function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip, chargeTooltip, errorCode, isTextShown, gatewayCode, acquirerCode, unCapturedStyles, iconStyles, iconWrapperStyles, gatewayIconWrapperStyles, gatewayContainerStyles, gateWayIconStyles, showBadge, }: Readonly<{
|
|
4
|
+
export declare function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip, chargeTooltip, errorCode, isTextShown, gatewayCode, acquirerCode, unCapturedStyles, iconStyles, iconWrapperStyles, gatewayIconWrapperStyles, gatewayContainerStyles, gateWayIconStyles, showBadge, isSheetViewShown, selectionProps, }: Readonly<{
|
|
4
5
|
chargeStatus?: ChargeStatus;
|
|
5
6
|
gatewayTooltip?: string;
|
|
6
7
|
showAuthorizedStatus?: boolean;
|
|
@@ -17,4 +18,6 @@ export declare function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquire
|
|
|
17
18
|
gatewayContainerStyles?: CSSProperties;
|
|
18
19
|
gateWayIconStyles?: CSSProperties;
|
|
19
20
|
showBadge?: boolean;
|
|
21
|
+
isSheetViewShown?: boolean;
|
|
22
|
+
selectionProps?: SelectionProps;
|
|
20
23
|
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,10 +4,11 @@ import camelCase from 'lodash/camelCase';
|
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import Tooltip from '../../Tooltip';
|
|
6
6
|
import { unCapturedStatuses } from '../../../constants/index.js';
|
|
7
|
-
import
|
|
7
|
+
import StatusChipWithCopy from '../../StatusChipWithCopy';
|
|
8
8
|
import { capturedStatusesStyles, unCapturedStatusesStyles, statusIcons } from '../../TableCells/CustomCells/StatusCell/constant';
|
|
9
9
|
import { StatusIcon, StatusIconWrapper, TextLabel } from '../../TableCells/CustomCells/style';
|
|
10
|
-
|
|
10
|
+
import { AcquirerContainerAnimationVariants, ErrorCodeLabel, ErrorCodeLabelAnimationVariants, ErrorCodeVariants, ErrorCodeWrapper, GateWayIcon, GatewayIconWrapper, GatewayIconWrapperAnimationTransition, GatewaysContainer, GatewaysContainerAnimationVariants, StatusTextLabel, UnCapturedBadge, UnCapturedContainer, errorCodeLabelAnimation, TextViewWrapper, } from './style';
|
|
11
|
+
export function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip, chargeTooltip, errorCode, isTextShown, gatewayCode, acquirerCode, unCapturedStyles, iconStyles, iconWrapperStyles, gatewayIconWrapperStyles, gatewayContainerStyles, gateWayIconStyles, showBadge = true, isSheetViewShown = false, selectionProps = {}, }) {
|
|
11
12
|
const unCapturedStatusStyle = chargeStatus ? unCapturedStatusesStyles[chargeStatus] : null;
|
|
12
13
|
const captureStatusStyle = chargeStatus ? capturedStatusesStyles[chargeStatus] : null;
|
|
13
14
|
const theme = useTheme();
|
|
@@ -16,6 +17,9 @@ export function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip
|
|
|
16
17
|
const acquirerTooltipTitle = acquirerTooltip && (_jsxs(_Fragment, { children: [_jsx("div", { children: "Acquirer" }), _jsx("div", { children: acquirerTooltip })] }));
|
|
17
18
|
const gatewayTooltipTitle = gatewayTooltip && (_jsxs(_Fragment, { children: [_jsx("div", { children: "Gateway" }), _jsx("div", { children: gatewayTooltip })] }));
|
|
18
19
|
const chargeIcon = chargeStatus && statusIcons[chargeStatus] && (_jsx("div", Object.assign({ "data-testid": "ChargeStatusIcon_ChargeIcon", style: Object.assign({ display: 'flex', alignItems: 'center', justifyContent: 'center', width: '16px', height: '16px', borderRadius: unCapturedStatusStyle ? '50%' : '' }, iconWrapperStyles) }, { children: _jsx(StatusIcon, { src: statusIcons[chargeStatus], alt: "charge-icon", "data-testid": "ChargeStatusIcon_StatusIcon", style: Object.assign({ borderRadius: unCapturedStatusStyle ? '50%' : '', width: '16px', height: '16px' }, iconStyles) }) })));
|
|
20
|
+
if (isSheetViewShown) {
|
|
21
|
+
return (_jsxs(TextViewWrapper, { children: [_jsxs(StatusChipWithCopy, Object.assign({ copyText: t(camelCase(chargeStatus)), chipIndex: 0, selectionProps: selectionProps }, { children: [t(camelCase(chargeStatus)), " ", errorCode] })), unCapturedStatusStyle && (_jsxs(_Fragment, { children: [gatewayCode && (_jsxs(StatusChipWithCopy, Object.assign({ copyText: "Gateway", chipIndex: 1, selectionProps: selectionProps }, { children: ["Gateway ", gatewayCode] }))), acquirerCode && (_jsxs(StatusChipWithCopy, Object.assign({ copyText: "Acquirer", chipIndex: 2, selectionProps: selectionProps }, { children: ["Acquirer ", acquirerCode] })))] }))] }));
|
|
22
|
+
}
|
|
19
23
|
if (isTextShown) {
|
|
20
24
|
return (_jsxs(TextViewWrapper, { children: [_jsx(Tooltip, Object.assign({ title: chargeTooltipTitle }, { children: _jsxs(StatusTextLabel, Object.assign({ "data-testid": "ChargeStatusIcon_isTextShown", "data-status": camelCase(chargeStatus), sx: {
|
|
21
25
|
background: (unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.background) || (captureStatusStyle === null || captureStatusStyle === void 0 ? void 0 : captureStatusStyle.background) || 'transparent',
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AmountCellProps } from '../type';
|
|
2
|
-
declare function AmountCell({ conversionType, amount, currency, tooltipLabel, amountTooltipLabel, isTextShown, tableMode, ...props }: AmountCellProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare function AmountCell({ conversionType, amount, currency, tooltipLabel, amountTooltipLabel, isTextShown, tableMode, selectionProps, chipIndex, ...props }: AmountCellProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default AmountCell;
|
|
@@ -10,17 +10,29 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useMemo } from 'react';
|
|
13
14
|
import { TableCell } from '../../../TableCells';
|
|
14
15
|
import Tooltip from '../../../Tooltip';
|
|
15
|
-
import { CurrencyIcon } from '../../../index.js';
|
|
16
|
+
import { CurrencyIcon, StatusChipWithCopy } from '../../../index.js';
|
|
16
17
|
import { getCurrenciesIcon } from '../../../../constants/index.js';
|
|
17
18
|
import { formatAmountWithCurrency } from '../../../../utils/index.js';
|
|
18
19
|
import { AmountCellContainer, ConversionBadge, CurrencySpan, DecimalSpan, FlagContainer } from './style';
|
|
19
20
|
import { FlagIcon } from '../style';
|
|
20
21
|
function AmountCell(_a) {
|
|
21
|
-
var { conversionType, amount, currency, tooltipLabel, amountTooltipLabel, isTextShown, tableMode } = _a, props = __rest(_a, ["conversionType", "amount", "currency", "tooltipLabel", "amountTooltipLabel", "isTextShown", "tableMode"]);
|
|
22
|
+
var { conversionType, amount, currency, tooltipLabel, amountTooltipLabel, isTextShown, tableMode, selectionProps = {}, chipIndex = 0 } = _a, props = __rest(_a, ["conversionType", "amount", "currency", "tooltipLabel", "amountTooltipLabel", "isTextShown", "tableMode", "selectionProps", "chipIndex"]);
|
|
22
23
|
const icon = currency && _jsx(FlagIcon, { src: getCurrenciesIcon(currency), alt: "customer icon" });
|
|
23
24
|
const { integerAmount, decimalAmount } = formatAmountWithCurrency(amount, currency);
|
|
24
|
-
|
|
25
|
+
const conversionTypeLabel = useMemo(() => {
|
|
26
|
+
if (!conversionType)
|
|
27
|
+
return _jsx(_Fragment, {});
|
|
28
|
+
return (_jsx(ConversionBadge, Object.assign({ tableMode: tableMode, className: "conversion-type" }, { children: conversionType })));
|
|
29
|
+
}, [conversionType, tableMode]);
|
|
30
|
+
const currencyInfo = useMemo(() => {
|
|
31
|
+
return (_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: "-" })) })));
|
|
32
|
+
}, [amount, tableMode, currency, integerAmount, decimalAmount]);
|
|
33
|
+
if (tableMode === 'sheet') {
|
|
34
|
+
return (_jsxs(StatusChipWithCopy, Object.assign({ chipIndex: chipIndex, copyText: amount ? `${integerAmount}.${decimalAmount}` : '-', selectionProps: selectionProps }, { children: [conversionTypeLabel, currencyInfo] })));
|
|
35
|
+
}
|
|
36
|
+
return (_jsx(TableCell, Object.assign({}, props, { children: _jsxs(AmountCellContainer, { children: [_jsx(Tooltip, Object.assign({ title: tooltipLabel || '' }, { children: conversionTypeLabel })), _jsx(Tooltip, Object.assign({ title: _jsx(CurrencyIcon, { currency: currency }) }, { children: isTextShown ? _jsx("span", {}) : _jsx(FlagContainer, { children: icon }) })), _jsx(Tooltip, Object.assign({ title: amountTooltipLabel }, { children: currencyInfo }))] }) })));
|
|
25
37
|
}
|
|
26
38
|
export default AmountCell;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BalanceCellProps } from './type';
|
|
2
|
-
declare function BalanceCell({ percentage, days, remainingAmount, currency, isTextShown, ...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;
|
|
@@ -15,19 +15,25 @@ import { useTheme } from '@mui/material/styles';
|
|
|
15
15
|
import { motion } from 'framer-motion';
|
|
16
16
|
import Tooltip from '../../../Tooltip';
|
|
17
17
|
import { TableCell } from '../../../TableCells';
|
|
18
|
-
import { CurrencyIcon } from '../../../index.js';
|
|
18
|
+
import { CurrencyIcon, StatusChipWithCopy } from '../../../index.js';
|
|
19
19
|
import { formatAmountWithCurrency } from '../../../../utils/index.js';
|
|
20
20
|
import { BalanceCellContainer, PercentageContainer } from './style';
|
|
21
21
|
import { formatPercentage } from './utils';
|
|
22
22
|
import { TextLabel, PiePercentage } from '../style';
|
|
23
23
|
function BalanceCell(_a) {
|
|
24
|
-
var { percentage, days, remainingAmount, currency, isTextShown } = _a, props = __rest(_a, ["percentage", "days", "remainingAmount", "currency", "isTextShown"]);
|
|
24
|
+
var { percentage, days, remainingAmount, currency, isTextShown, isSheetViewShown, selectionProps = {} } = _a, props = __rest(_a, ["percentage", "days", "remainingAmount", "currency", "isTextShown", "isSheetViewShown", "selectionProps"]);
|
|
25
25
|
const theme = useTheme();
|
|
26
|
+
const currencyIcon = _jsx(CurrencyIcon, { currency: currency });
|
|
27
|
+
const { integerAmount, decimalAmount } = formatAmountWithCurrency(remainingAmount, currency);
|
|
28
|
+
const amount = `${integerAmount}.${decimalAmount}`;
|
|
26
29
|
const generatedTooltip = useMemo(() => {
|
|
27
|
-
|
|
28
|
-
const currencyIcon = _jsx(CurrencyIcon, { currency: currency });
|
|
29
|
-
return (_jsxs(_Fragment, { children: ["Remaining Authorized Balance - ", currencyIcon, " ", integerAmount, ".", decimalAmount] }));
|
|
30
|
+
return (_jsxs(_Fragment, { children: ["Remaining Authorized Balance - ", currencyIcon, " ", amount] }));
|
|
30
31
|
}, [remainingAmount, currency]);
|
|
32
|
+
if (isSheetViewShown) {
|
|
33
|
+
if (percentage === 0)
|
|
34
|
+
return null;
|
|
35
|
+
return (_jsxs(StatusChipWithCopy, Object.assign({ chipIndex: 0, copyText: `${integerAmount}.${decimalAmount}`, selectionProps: selectionProps }, { children: [percentage, "% | Remaining balance - ", currencyIcon, " ", amount] })));
|
|
36
|
+
}
|
|
31
37
|
return (_jsx(TableCell, Object.assign({}, props, { children: _jsx("div", Object.assign({ style: {
|
|
32
38
|
display: 'flex',
|
|
33
39
|
alignItems: 'center',
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { TableCellProps } from '@mui/material';
|
|
2
|
+
import { SelectionProps } from '../../../../types/index.js';
|
|
2
3
|
export interface BalanceCellProps extends TableCellProps {
|
|
3
4
|
percentage: number;
|
|
4
5
|
days?: number;
|
|
5
6
|
remainingAmount?: number;
|
|
6
7
|
currency?: string;
|
|
7
8
|
isTextShown?: boolean;
|
|
9
|
+
isSheetViewShown?: boolean;
|
|
10
|
+
selectionProps?: SelectionProps;
|
|
8
11
|
}
|
|
@@ -13,6 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import Tooltip from '../../../Tooltip';
|
|
14
14
|
import { ImageWrapper } from '../../../index.js';
|
|
15
15
|
import { TableCell } from '../../../TableCells';
|
|
16
|
+
import { openNewTab } from '../../../../utils/index.js';
|
|
16
17
|
import { ChannelTextLabel, ChannelTextWrapper, salesChannelAnimation, SalesChannelsContainer, StyledSourceCell, StyledSourceImage } from './style';
|
|
17
18
|
function SalesChannelCell(_a) {
|
|
18
19
|
var _b;
|
|
@@ -25,7 +26,8 @@ function SalesChannelCell(_a) {
|
|
|
25
26
|
width: isTextShown ? '70px' : '36px',
|
|
26
27
|
cursor: 'pointer',
|
|
27
28
|
}, onClick: () => {
|
|
28
|
-
|
|
29
|
+
if (channel === null || channel === void 0 ? void 0 : channel.address)
|
|
30
|
+
openNewTab(channel.address);
|
|
29
31
|
} }, { children: isTextShown ? (_jsx(ChannelTextWrapper, { children: _jsx(ChannelTextLabel, { children: channelCode }) })) : (_jsx(StyledSourceImage, { src: channel.logo, alt: channelCode })) })) }), `${channel}-${index}`));
|
|
30
32
|
});
|
|
31
33
|
const salesChannelsCount = (salesChannels === null || salesChannels === void 0 ? void 0 : salesChannels.length) || 0;
|
|
@@ -11,7 +11,6 @@ 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';
|
|
17
16
|
function StatusCell(_a) {
|
|
@@ -19,7 +18,7 @@ function StatusCell(_a) {
|
|
|
19
18
|
const statusesFilteredObject = statuses ? getStatusesFilteredObject(statuses) : {};
|
|
20
19
|
const statusesList = Object.values(statusesFilteredObject).filter(Boolean);
|
|
21
20
|
if (tableMode === 'sheet') {
|
|
22
|
-
return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(StatusContainer,
|
|
21
|
+
return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(StatusContainer, Object.assign({ sx: { paddingRight: '30px' } }, { children: statusesList.map((status) => status) })) })));
|
|
23
22
|
}
|
|
24
23
|
const xGapValue = isTextShown ? xGap || 120 : 40;
|
|
25
24
|
const centerIconIndex = centerIconKey ? Object.entries(statusesFilteredObject).findIndex(([key]) => key === centerIconKey) : 0;
|
|
@@ -61,6 +61,8 @@ export interface AmountCellProps extends TableCellProps {
|
|
|
61
61
|
amountTooltipLabel?: React.ReactNode;
|
|
62
62
|
isTextShown?: boolean;
|
|
63
63
|
tableMode?: TableMode;
|
|
64
|
+
selectionProps?: SelectionProps;
|
|
65
|
+
chipIndex?: number;
|
|
64
66
|
}
|
|
65
67
|
export interface DestinationCellProps extends TableCellProps {
|
|
66
68
|
destinationsCount?: number;
|
|
@@ -7,7 +7,7 @@ export declare const authorizationTableCellWidth: {
|
|
|
7
7
|
readonly id: {
|
|
8
8
|
readonly default: "225px";
|
|
9
9
|
readonly text: "225px";
|
|
10
|
-
readonly sheet: "
|
|
10
|
+
readonly sheet: "250x";
|
|
11
11
|
};
|
|
12
12
|
readonly auto: {
|
|
13
13
|
readonly default: "70px";
|
|
@@ -17,7 +17,7 @@ export declare const authorizationTableCellWidth: {
|
|
|
17
17
|
readonly balance: {
|
|
18
18
|
readonly default: "60px";
|
|
19
19
|
readonly text: "60px";
|
|
20
|
-
readonly sheet: "
|
|
20
|
+
readonly sheet: "250px";
|
|
21
21
|
};
|
|
22
22
|
readonly product: {
|
|
23
23
|
readonly default: "85px";
|
|
@@ -57,7 +57,7 @@ export declare const authorizationTableCellWidth: {
|
|
|
57
57
|
readonly payment_agreement: {
|
|
58
58
|
readonly default: "50px";
|
|
59
59
|
readonly text: "150px";
|
|
60
|
-
readonly sheet: "
|
|
60
|
+
readonly sheet: "170px";
|
|
61
61
|
};
|
|
62
62
|
readonly amount: {
|
|
63
63
|
readonly default: "170px";
|
|
@@ -77,12 +77,12 @@ export declare const authorizationTableCellWidth: {
|
|
|
77
77
|
readonly status: {
|
|
78
78
|
readonly default: "77px";
|
|
79
79
|
readonly text: "100px";
|
|
80
|
-
readonly sheet: "
|
|
80
|
+
readonly sheet: "300px";
|
|
81
81
|
};
|
|
82
82
|
readonly merchant: {
|
|
83
83
|
readonly default: "110px";
|
|
84
84
|
readonly text: "150px";
|
|
85
|
-
readonly sheet: "
|
|
85
|
+
readonly sheet: "215px";
|
|
86
86
|
};
|
|
87
87
|
readonly charge: {
|
|
88
88
|
readonly default: "150px";
|
|
@@ -112,7 +112,7 @@ export declare const authorizationTableCellWidth: {
|
|
|
112
112
|
readonly metadata: {
|
|
113
113
|
readonly default: "185px";
|
|
114
114
|
readonly text: "185px";
|
|
115
|
-
readonly sheet: "
|
|
115
|
+
readonly sheet: "250px";
|
|
116
116
|
};
|
|
117
117
|
readonly settlement: {
|
|
118
118
|
readonly default: "200px";
|
|
@@ -152,16 +152,66 @@ export declare const authorizationTableCellWidth: {
|
|
|
152
152
|
readonly device: {
|
|
153
153
|
readonly default: "60px";
|
|
154
154
|
readonly text: "190px";
|
|
155
|
-
readonly sheet: "
|
|
155
|
+
readonly sheet: "235px";
|
|
156
156
|
};
|
|
157
157
|
readonly card_no: {
|
|
158
158
|
readonly default: "120px";
|
|
159
159
|
readonly text: "120px";
|
|
160
|
-
readonly sheet: "
|
|
160
|
+
readonly sheet: "140px";
|
|
161
161
|
};
|
|
162
162
|
readonly brand: {
|
|
163
163
|
readonly default: "116px";
|
|
164
164
|
readonly text: "116px";
|
|
165
165
|
readonly sheet: "116px";
|
|
166
166
|
};
|
|
167
|
+
readonly payment_initiated: {
|
|
168
|
+
readonly default: "150px";
|
|
169
|
+
readonly text: "150px";
|
|
170
|
+
readonly sheet: "150px";
|
|
171
|
+
};
|
|
172
|
+
readonly payment_issuers: {
|
|
173
|
+
readonly default: "150px";
|
|
174
|
+
readonly text: "150px";
|
|
175
|
+
readonly sheet: "350px";
|
|
176
|
+
};
|
|
177
|
+
readonly card_number: {
|
|
178
|
+
readonly default: "120px";
|
|
179
|
+
readonly text: "120px";
|
|
180
|
+
readonly sheet: "155px";
|
|
181
|
+
};
|
|
182
|
+
readonly payment_type: {
|
|
183
|
+
readonly default: "150px";
|
|
184
|
+
readonly text: "150px";
|
|
185
|
+
readonly sheet: "120px";
|
|
186
|
+
};
|
|
187
|
+
readonly payment_method: {
|
|
188
|
+
readonly default: "150px";
|
|
189
|
+
readonly text: "150px";
|
|
190
|
+
readonly sheet: "145px";
|
|
191
|
+
};
|
|
192
|
+
readonly payment_scheme: {
|
|
193
|
+
readonly default: "150px";
|
|
194
|
+
readonly text: "150px";
|
|
195
|
+
readonly sheet: "145px";
|
|
196
|
+
};
|
|
197
|
+
readonly auth_status: {
|
|
198
|
+
readonly default: "150px";
|
|
199
|
+
readonly text: "150px";
|
|
200
|
+
readonly sheet: "165px";
|
|
201
|
+
};
|
|
202
|
+
readonly auth_type: {
|
|
203
|
+
readonly default: "150px";
|
|
204
|
+
readonly text: "150px";
|
|
205
|
+
readonly sheet: "155px";
|
|
206
|
+
};
|
|
207
|
+
readonly eci: {
|
|
208
|
+
readonly default: "150px";
|
|
209
|
+
readonly text: "150px";
|
|
210
|
+
readonly sheet: "100px";
|
|
211
|
+
};
|
|
212
|
+
readonly acquirer_response: {
|
|
213
|
+
readonly default: "70px";
|
|
214
|
+
readonly text: "70px";
|
|
215
|
+
readonly sheet: "225px";
|
|
216
|
+
};
|
|
167
217
|
};
|
|
@@ -7,7 +7,7 @@ export const authorizationTableCellWidth = {
|
|
|
7
7
|
id: {
|
|
8
8
|
default: '225px',
|
|
9
9
|
text: '225px',
|
|
10
|
-
sheet: '
|
|
10
|
+
sheet: '250x',
|
|
11
11
|
},
|
|
12
12
|
auto: {
|
|
13
13
|
default: '70px',
|
|
@@ -17,7 +17,7 @@ export const authorizationTableCellWidth = {
|
|
|
17
17
|
balance: {
|
|
18
18
|
default: '60px',
|
|
19
19
|
text: '60px',
|
|
20
|
-
sheet: '
|
|
20
|
+
sheet: '250px',
|
|
21
21
|
},
|
|
22
22
|
product: {
|
|
23
23
|
default: '85px',
|
|
@@ -57,7 +57,7 @@ export const authorizationTableCellWidth = {
|
|
|
57
57
|
payment_agreement: {
|
|
58
58
|
default: '50px',
|
|
59
59
|
text: '150px',
|
|
60
|
-
sheet: '
|
|
60
|
+
sheet: '170px',
|
|
61
61
|
},
|
|
62
62
|
amount: {
|
|
63
63
|
default: '170px',
|
|
@@ -77,12 +77,12 @@ export const authorizationTableCellWidth = {
|
|
|
77
77
|
status: {
|
|
78
78
|
default: '77px',
|
|
79
79
|
text: '100px',
|
|
80
|
-
sheet: '
|
|
80
|
+
sheet: '300px',
|
|
81
81
|
},
|
|
82
82
|
merchant: {
|
|
83
83
|
default: '110px',
|
|
84
84
|
text: '150px',
|
|
85
|
-
sheet: '
|
|
85
|
+
sheet: '215px',
|
|
86
86
|
},
|
|
87
87
|
charge: {
|
|
88
88
|
default: '150px',
|
|
@@ -112,7 +112,7 @@ export const authorizationTableCellWidth = {
|
|
|
112
112
|
metadata: {
|
|
113
113
|
default: '185px',
|
|
114
114
|
text: '185px',
|
|
115
|
-
sheet: '
|
|
115
|
+
sheet: '250px',
|
|
116
116
|
},
|
|
117
117
|
settlement: {
|
|
118
118
|
default: '200px',
|
|
@@ -152,16 +152,66 @@ export const authorizationTableCellWidth = {
|
|
|
152
152
|
device: {
|
|
153
153
|
default: '60px',
|
|
154
154
|
text: '190px',
|
|
155
|
-
sheet: '
|
|
155
|
+
sheet: '235px',
|
|
156
156
|
},
|
|
157
157
|
card_no: {
|
|
158
158
|
default: '120px',
|
|
159
159
|
text: '120px',
|
|
160
|
-
sheet: '
|
|
160
|
+
sheet: '140px',
|
|
161
161
|
},
|
|
162
162
|
brand: {
|
|
163
163
|
default: '116px',
|
|
164
164
|
text: '116px',
|
|
165
165
|
sheet: '116px',
|
|
166
166
|
},
|
|
167
|
+
payment_initiated: {
|
|
168
|
+
default: '150px',
|
|
169
|
+
text: '150px',
|
|
170
|
+
sheet: '150px',
|
|
171
|
+
},
|
|
172
|
+
payment_issuers: {
|
|
173
|
+
default: '150px',
|
|
174
|
+
text: '150px',
|
|
175
|
+
sheet: '350px',
|
|
176
|
+
},
|
|
177
|
+
card_number: {
|
|
178
|
+
default: '120px',
|
|
179
|
+
text: '120px',
|
|
180
|
+
sheet: '155px',
|
|
181
|
+
},
|
|
182
|
+
payment_type: {
|
|
183
|
+
default: '150px',
|
|
184
|
+
text: '150px',
|
|
185
|
+
sheet: '120px',
|
|
186
|
+
},
|
|
187
|
+
payment_method: {
|
|
188
|
+
default: '150px',
|
|
189
|
+
text: '150px',
|
|
190
|
+
sheet: '145px',
|
|
191
|
+
},
|
|
192
|
+
payment_scheme: {
|
|
193
|
+
default: '150px',
|
|
194
|
+
text: '150px',
|
|
195
|
+
sheet: '145px',
|
|
196
|
+
},
|
|
197
|
+
auth_status: {
|
|
198
|
+
default: '150px',
|
|
199
|
+
text: '150px',
|
|
200
|
+
sheet: '165px',
|
|
201
|
+
},
|
|
202
|
+
auth_type: {
|
|
203
|
+
default: '150px',
|
|
204
|
+
text: '150px',
|
|
205
|
+
sheet: '155px',
|
|
206
|
+
},
|
|
207
|
+
eci: {
|
|
208
|
+
default: '150px',
|
|
209
|
+
text: '150px',
|
|
210
|
+
sheet: '100px',
|
|
211
|
+
},
|
|
212
|
+
acquirer_response: {
|
|
213
|
+
default: '70px',
|
|
214
|
+
text: '70px',
|
|
215
|
+
sheet: '225px',
|
|
216
|
+
},
|
|
167
217
|
};
|
|
@@ -94,16 +94,6 @@ export declare const refundTableCellWidth: {
|
|
|
94
94
|
readonly text: "195px";
|
|
95
95
|
readonly sheet: "180px";
|
|
96
96
|
};
|
|
97
|
-
readonly payouts: {
|
|
98
|
-
readonly default: "195px";
|
|
99
|
-
readonly text: "195px";
|
|
100
|
-
readonly sheet: "300px";
|
|
101
|
-
};
|
|
102
|
-
readonly reason: {
|
|
103
|
-
readonly default: "170px";
|
|
104
|
-
readonly text: "240px";
|
|
105
|
-
readonly sheet: "160px";
|
|
106
|
-
};
|
|
107
97
|
readonly destinations: {
|
|
108
98
|
readonly default: "70px";
|
|
109
99
|
readonly text: "240px";
|
|
@@ -192,7 +182,7 @@ export declare const refundTableCellWidth: {
|
|
|
192
182
|
readonly charge_meta: {
|
|
193
183
|
readonly default: "100px";
|
|
194
184
|
readonly text: "100px";
|
|
195
|
-
readonly sheet: "
|
|
185
|
+
readonly sheet: "100px";
|
|
196
186
|
};
|
|
197
187
|
readonly brand: {
|
|
198
188
|
readonly default: "116px";
|
|
@@ -94,16 +94,6 @@ export const refundTableCellWidth = {
|
|
|
94
94
|
text: '195px',
|
|
95
95
|
sheet: '180px',
|
|
96
96
|
},
|
|
97
|
-
payouts: {
|
|
98
|
-
default: '195px',
|
|
99
|
-
text: '195px',
|
|
100
|
-
sheet: '300px',
|
|
101
|
-
},
|
|
102
|
-
reason: {
|
|
103
|
-
default: '170px',
|
|
104
|
-
text: '240px',
|
|
105
|
-
sheet: '160px',
|
|
106
|
-
},
|
|
107
97
|
destinations: {
|
|
108
98
|
default: '70px',
|
|
109
99
|
text: '240px',
|
|
@@ -192,7 +182,7 @@ export const refundTableCellWidth = {
|
|
|
192
182
|
charge_meta: {
|
|
193
183
|
default: '100px',
|
|
194
184
|
text: '100px',
|
|
195
|
-
sheet: '
|
|
185
|
+
sheet: '100px',
|
|
196
186
|
},
|
|
197
187
|
brand: {
|
|
198
188
|
default: '116px',
|
|
@@ -30,9 +30,9 @@ export declare const terminalsTableCellWidth: {
|
|
|
30
30
|
readonly sheet: "80px";
|
|
31
31
|
};
|
|
32
32
|
readonly features: {
|
|
33
|
-
readonly default: "
|
|
34
|
-
readonly text: "
|
|
35
|
-
readonly sheet: "
|
|
33
|
+
readonly default: "100px";
|
|
34
|
+
readonly text: "100px";
|
|
35
|
+
readonly sheet: "100px";
|
|
36
36
|
};
|
|
37
37
|
readonly acceptance: {
|
|
38
38
|
readonly default: "80px";
|
package/build/utils/url.d.ts
CHANGED
package/build/utils/url.js
CHANGED
|
@@ -6,3 +6,13 @@ export const openNewTab = (url, target = '_blank') => {
|
|
|
6
6
|
link.click();
|
|
7
7
|
link.remove();
|
|
8
8
|
};
|
|
9
|
+
export const openUrl = (url) => {
|
|
10
|
+
const isUrl = /^https?:\/\//i.test(url);
|
|
11
|
+
if (isUrl) {
|
|
12
|
+
window.open(url, '_blank', 'noopener,noreferrer');
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
const newUrl = 'about:blank?' + encodeURIComponent(url);
|
|
16
|
+
window.open(newUrl, '_blank', 'noopener,noreferrer');
|
|
17
|
+
}
|
|
18
|
+
};
|
package/package.json
CHANGED
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
|
-
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"testVersion":
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "build/index.js",
|
|
8
|
-
"module": "build/index.js",
|
|
9
|
-
"types": "build/index.d.ts",
|
|
10
|
-
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"types": "./build/index.d.ts",
|
|
13
|
-
"import": "./build/index.js",
|
|
14
|
-
"require": "./build/index.js"
|
|
15
|
-
},
|
|
16
|
-
"./constants": {
|
|
17
|
-
"types": "./build/constants/index.d.ts",
|
|
18
|
-
"import": "./build/constants/index.js",
|
|
19
|
-
"require": "./build/constants/index.js"
|
|
20
|
-
},
|
|
21
|
-
"./components": {
|
|
22
|
-
"types": "./build/components/index.d.ts",
|
|
23
|
-
"import": "./build/components/index.js",
|
|
24
|
-
"require": "./build/components/index.js"
|
|
25
|
-
},
|
|
26
|
-
"./components/*": {
|
|
27
|
-
"types": "./build/components/*/index.d.ts",
|
|
28
|
-
"import": "./build/components/*/index.js",
|
|
29
|
-
"require": "./build/components/*/index.js"
|
|
30
|
-
},
|
|
31
|
-
"./hooks": {
|
|
32
|
-
"types": "./build/hooks/index.d.ts",
|
|
33
|
-
"import": "./build/hooks/index.js",
|
|
34
|
-
"require": "./build/hooks/index.js"
|
|
35
|
-
},
|
|
36
|
-
"./utils": {
|
|
37
|
-
"types": "./build/utils/index.d.ts",
|
|
38
|
-
"import": "./build/utils/index.js",
|
|
39
|
-
"require": "./build/utils/index.js"
|
|
40
|
-
},
|
|
41
|
-
"./theme": {
|
|
42
|
-
"types": "./build/theme/index.d.ts",
|
|
43
|
-
"import": "./build/theme/index.js",
|
|
44
|
-
"require": "./build/theme/index.js"
|
|
45
|
-
},
|
|
46
|
-
"./types": {
|
|
47
|
-
"types": "./build/types/index.d.ts",
|
|
48
|
-
"import": "./build/types/index.js",
|
|
49
|
-
"require": "./build/types/index.js"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"license": "MIT",
|
|
53
|
-
"author": {
|
|
54
|
-
"name": "Ahmed Sharkawy",
|
|
55
|
-
"email": "a.elsharkawy@tap.company"
|
|
56
|
-
},
|
|
57
|
-
"files": [
|
|
58
|
-
"build",
|
|
59
|
-
"readme.md"
|
|
60
|
-
],
|
|
61
|
-
"scripts": {
|
|
62
|
-
"ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
|
|
63
|
-
"push:local": "yarn ts:build && yalc publish --push",
|
|
64
|
-
"push": "npm run ts:build && npm publish --access public",
|
|
65
|
-
"push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
|
|
66
|
-
"dev": "vite",
|
|
67
|
-
"build": "tsc -b && vite build ",
|
|
68
|
-
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
|
|
69
|
-
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
|
|
70
|
-
"lint": "eslint . --color",
|
|
71
|
-
"lint:fix": "eslint src --fix --color",
|
|
72
|
-
"preview": "vite preview",
|
|
73
|
-
"prepare": "husky"
|
|
74
|
-
},
|
|
75
|
-
"dependencies": {
|
|
76
|
-
"@emotion/react": "^11.11.0",
|
|
77
|
-
"@emotion/styled": "^11.11.0",
|
|
78
|
-
"@hookform/resolvers": "^3.3.1",
|
|
79
|
-
"@mui/material": "^5.12.3",
|
|
80
|
-
"@uiw/react-json-view": "^2.0.0-alpha.16",
|
|
81
|
-
"axios": "^1.4.0",
|
|
82
|
-
"color": "^5.0.0",
|
|
83
|
-
"dayjs": "^1.11.8",
|
|
84
|
-
"framer-motion": "10.11.0",
|
|
85
|
-
"i18next": "^22.4.15",
|
|
86
|
-
"memoize-one": "^6.0.0",
|
|
87
|
-
"re-resizable": "^6.9.9",
|
|
88
|
-
"react": "^18.2.0",
|
|
89
|
-
"react-colorful": "^5.6.1",
|
|
90
|
-
"react-currency-input-field": "^3.6.11",
|
|
91
|
-
"react-dom": "^18.2.0",
|
|
92
|
-
"react-draggable": "^4.4.6",
|
|
93
|
-
"react-dropzone": "^14.2.3",
|
|
94
|
-
"react-hook-form": "^7.45.4",
|
|
95
|
-
"react-hot-toast": "^2.4.1",
|
|
96
|
-
"react-i18next": "^12.2.2",
|
|
97
|
-
"react-lazy-load-image-component": "^1.6.3",
|
|
98
|
-
"react-multi-date-picker": "^4.1.2",
|
|
99
|
-
"react-router-dom": "^7.7.0",
|
|
100
|
-
"react-virtualized-auto-sizer": "^1.0.20",
|
|
101
|
-
"react-window": "^1.8.9",
|
|
102
|
-
"react-window-infinite-loader": "^1.0.9",
|
|
103
|
-
"react18-input-otp": "^1.1.4",
|
|
104
|
-
"recharts": "^2.15.1"
|
|
105
|
-
},
|
|
106
|
-
"devDependencies": {
|
|
107
|
-
"@eslint/js": "^9.17.0",
|
|
108
|
-
"@testing-library/jest-dom": "^5.16.5",
|
|
109
|
-
"@types/lodash": "^4.17.15",
|
|
110
|
-
"@types/react": "^18.2.6",
|
|
111
|
-
"@types/react-dom": "^18.3.5",
|
|
112
|
-
"@types/react-lazy-load-image-component": "^1.6.4",
|
|
113
|
-
"@types/react-virtualized-auto-sizer": "^1.0.8",
|
|
114
|
-
"@types/react-window": "^1.8.5",
|
|
115
|
-
"@types/react-window-infinite-loader": "^1.0.6",
|
|
116
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
117
|
-
"eslint": "^9.17.0",
|
|
118
|
-
"eslint-plugin-react-hooks": "^5.0.0",
|
|
119
|
-
"eslint-plugin-react-refresh": "^0.4.16",
|
|
120
|
-
"globals": "^15.14.0",
|
|
121
|
-
"husky": "^8.0.3",
|
|
122
|
-
"lint-staged": "^13.2.2",
|
|
123
|
-
"prettier": "^2.8.8",
|
|
124
|
-
"tsc-alias": "^1.8.16",
|
|
125
|
-
"typescript": "5.0.2",
|
|
126
|
-
"typescript-eslint": "^8.18.2",
|
|
127
|
-
"vite": "6.0.5",
|
|
128
|
-
"vite-tsconfig-paths": "^4.2.0"
|
|
129
|
-
},
|
|
130
|
-
"lint-staged": {
|
|
131
|
-
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
132
|
-
"yarn run prettier:fix",
|
|
133
|
-
"yarn run lint"
|
|
134
|
-
]
|
|
135
|
-
},
|
|
136
|
-
"publishConfig": {
|
|
137
|
-
"registry": "https://registry.npmjs.org/"
|
|
138
|
-
}
|
|
139
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
|
+
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
+
"version": "0.1.87-test.2-test.3",
|
|
5
|
+
"testVersion": 3,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "build/index.js",
|
|
8
|
+
"module": "build/index.js",
|
|
9
|
+
"types": "build/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./build/index.d.ts",
|
|
13
|
+
"import": "./build/index.js",
|
|
14
|
+
"require": "./build/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./constants": {
|
|
17
|
+
"types": "./build/constants/index.d.ts",
|
|
18
|
+
"import": "./build/constants/index.js",
|
|
19
|
+
"require": "./build/constants/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./components": {
|
|
22
|
+
"types": "./build/components/index.d.ts",
|
|
23
|
+
"import": "./build/components/index.js",
|
|
24
|
+
"require": "./build/components/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./components/*": {
|
|
27
|
+
"types": "./build/components/*/index.d.ts",
|
|
28
|
+
"import": "./build/components/*/index.js",
|
|
29
|
+
"require": "./build/components/*/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./hooks": {
|
|
32
|
+
"types": "./build/hooks/index.d.ts",
|
|
33
|
+
"import": "./build/hooks/index.js",
|
|
34
|
+
"require": "./build/hooks/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./utils": {
|
|
37
|
+
"types": "./build/utils/index.d.ts",
|
|
38
|
+
"import": "./build/utils/index.js",
|
|
39
|
+
"require": "./build/utils/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./theme": {
|
|
42
|
+
"types": "./build/theme/index.d.ts",
|
|
43
|
+
"import": "./build/theme/index.js",
|
|
44
|
+
"require": "./build/theme/index.js"
|
|
45
|
+
},
|
|
46
|
+
"./types": {
|
|
47
|
+
"types": "./build/types/index.d.ts",
|
|
48
|
+
"import": "./build/types/index.js",
|
|
49
|
+
"require": "./build/types/index.js"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"author": {
|
|
54
|
+
"name": "Ahmed Sharkawy",
|
|
55
|
+
"email": "a.elsharkawy@tap.company"
|
|
56
|
+
},
|
|
57
|
+
"files": [
|
|
58
|
+
"build",
|
|
59
|
+
"readme.md"
|
|
60
|
+
],
|
|
61
|
+
"scripts": {
|
|
62
|
+
"ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
|
|
63
|
+
"push:local": "yarn ts:build && yalc publish --push",
|
|
64
|
+
"push": "npm run ts:build && npm publish --access public",
|
|
65
|
+
"push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
|
|
66
|
+
"dev": "vite",
|
|
67
|
+
"build": "tsc -b && vite build ",
|
|
68
|
+
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
|
|
69
|
+
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
|
|
70
|
+
"lint": "eslint . --color",
|
|
71
|
+
"lint:fix": "eslint src --fix --color",
|
|
72
|
+
"preview": "vite preview",
|
|
73
|
+
"prepare": "husky"
|
|
74
|
+
},
|
|
75
|
+
"dependencies": {
|
|
76
|
+
"@emotion/react": "^11.11.0",
|
|
77
|
+
"@emotion/styled": "^11.11.0",
|
|
78
|
+
"@hookform/resolvers": "^3.3.1",
|
|
79
|
+
"@mui/material": "^5.12.3",
|
|
80
|
+
"@uiw/react-json-view": "^2.0.0-alpha.16",
|
|
81
|
+
"axios": "^1.4.0",
|
|
82
|
+
"color": "^5.0.0",
|
|
83
|
+
"dayjs": "^1.11.8",
|
|
84
|
+
"framer-motion": "10.11.0",
|
|
85
|
+
"i18next": "^22.4.15",
|
|
86
|
+
"memoize-one": "^6.0.0",
|
|
87
|
+
"re-resizable": "^6.9.9",
|
|
88
|
+
"react": "^18.2.0",
|
|
89
|
+
"react-colorful": "^5.6.1",
|
|
90
|
+
"react-currency-input-field": "^3.6.11",
|
|
91
|
+
"react-dom": "^18.2.0",
|
|
92
|
+
"react-draggable": "^4.4.6",
|
|
93
|
+
"react-dropzone": "^14.2.3",
|
|
94
|
+
"react-hook-form": "^7.45.4",
|
|
95
|
+
"react-hot-toast": "^2.4.1",
|
|
96
|
+
"react-i18next": "^12.2.2",
|
|
97
|
+
"react-lazy-load-image-component": "^1.6.3",
|
|
98
|
+
"react-multi-date-picker": "^4.1.2",
|
|
99
|
+
"react-router-dom": "^7.7.0",
|
|
100
|
+
"react-virtualized-auto-sizer": "^1.0.20",
|
|
101
|
+
"react-window": "^1.8.9",
|
|
102
|
+
"react-window-infinite-loader": "^1.0.9",
|
|
103
|
+
"react18-input-otp": "^1.1.4",
|
|
104
|
+
"recharts": "^2.15.1"
|
|
105
|
+
},
|
|
106
|
+
"devDependencies": {
|
|
107
|
+
"@eslint/js": "^9.17.0",
|
|
108
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
109
|
+
"@types/lodash": "^4.17.15",
|
|
110
|
+
"@types/react": "^18.2.6",
|
|
111
|
+
"@types/react-dom": "^18.3.5",
|
|
112
|
+
"@types/react-lazy-load-image-component": "^1.6.4",
|
|
113
|
+
"@types/react-virtualized-auto-sizer": "^1.0.8",
|
|
114
|
+
"@types/react-window": "^1.8.5",
|
|
115
|
+
"@types/react-window-infinite-loader": "^1.0.6",
|
|
116
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
117
|
+
"eslint": "^9.17.0",
|
|
118
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
119
|
+
"eslint-plugin-react-refresh": "^0.4.16",
|
|
120
|
+
"globals": "^15.14.0",
|
|
121
|
+
"husky": "^8.0.3",
|
|
122
|
+
"lint-staged": "^13.2.2",
|
|
123
|
+
"prettier": "^2.8.8",
|
|
124
|
+
"tsc-alias": "^1.8.16",
|
|
125
|
+
"typescript": "5.0.2",
|
|
126
|
+
"typescript-eslint": "^8.18.2",
|
|
127
|
+
"vite": "6.0.5",
|
|
128
|
+
"vite-tsconfig-paths": "^4.2.0"
|
|
129
|
+
},
|
|
130
|
+
"lint-staged": {
|
|
131
|
+
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
132
|
+
"yarn run prettier:fix",
|
|
133
|
+
"yarn run lint"
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
"publishConfig": {
|
|
137
|
+
"registry": "https://registry.npmjs.org/"
|
|
138
|
+
}
|
|
139
|
+
}
|