@tap-payments/os-micro-frontend-shared 0.0.239 → 0.0.242
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/build/components/TableCells/CustomCells/RefundStatusCell/RefundStatusCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/RefundStatusCell.js +2 -2
- package/build/components/TableCells/CustomCells/RefundStatusCell/components/RefundStatus.d.ts +1 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/components/RefundStatus.js +2 -2
- package/build/components/TableCells/CustomCells/RefundStatusCell/type.d.ts +1 -0
- package/build/types/index.d.ts +0 -1
- package/build/types/index.js +0 -1
- package/build/utils/index.d.ts +0 -1
- package/build/utils/index.js +0 -1
- package/package.json +2 -2
- package/build/types/day.d.ts +0 -1
- package/build/types/day.js +0 -1
- package/build/utils/day.d.ts +0 -2
- package/build/utils/day.js +0 -9
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BalanceCellProps } from './type';
|
|
2
|
-
declare function RefundStatusCell({ status, date, refundTooltip, isTextShown, gatewayTooltip, acquirerTooltip, errorCode, acquirerCode, gatewayCode, unCapturedTooltip, timezone, ...props }: BalanceCellProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare function RefundStatusCell({ status, date, refundTooltip, isTextShown, gatewayTooltip, acquirerTooltip, errorCode, acquirerCode, gatewayCode, unCapturedTooltip, timezone, refundTooltipLabel, ...props }: BalanceCellProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default RefundStatusCell;
|
|
@@ -21,12 +21,12 @@ import { useRefundStyles } from './hooks/useRefundStyles';
|
|
|
21
21
|
import { TextLabel, StatusCellContainer } from '../style';
|
|
22
22
|
import { IconWrapper } from './style';
|
|
23
23
|
function RefundStatusCell(_a) {
|
|
24
|
-
var { status, date, refundTooltip, isTextShown, gatewayTooltip, acquirerTooltip, errorCode, acquirerCode, gatewayCode, unCapturedTooltip, timezone } = _a, props = __rest(_a, ["status", "date", "refundTooltip", "isTextShown", "gatewayTooltip", "acquirerTooltip", "errorCode", "acquirerCode", "gatewayCode", "unCapturedTooltip", "timezone"]);
|
|
24
|
+
var { status, date, refundTooltip, isTextShown, gatewayTooltip, acquirerTooltip, errorCode, acquirerCode, gatewayCode, unCapturedTooltip, timezone, refundTooltipLabel } = _a, props = __rest(_a, ["status", "date", "refundTooltip", "isTextShown", "gatewayTooltip", "acquirerTooltip", "errorCode", "acquirerCode", "gatewayCode", "unCapturedTooltip", "timezone", "refundTooltipLabel"]);
|
|
25
25
|
const { t } = useTranslation();
|
|
26
26
|
const refundStyles = useRefundStyles();
|
|
27
27
|
const formatDate = useCallback((dateMs) => dayjs(dateMs).format('MMM D, YYYY'), []);
|
|
28
28
|
return (_jsx(TableCell, Object.assign({}, props, { style: {
|
|
29
29
|
overflow: 'visible',
|
|
30
|
-
} }, { children: _jsx(StatusCellContainer, { children: _jsx(IconWrapper, Object.assign({ width: isTextShown ? 'auto' : '36px' }, { children: isTextShown ? (_jsx(Tooltip, Object.assign({ title: date ? formatDate(date) : t(camelCase(status)) }, { children: _jsx(TextLabel, Object.assign({ sx: Object.assign({}, (refundStyles[status] ? refundStyles[status] : refundStyles.PENDING)) }, { children: t(camelCase(status)) })) }))) : (_jsx(RefundStatus, { status: status, refundTooltip: refundTooltip, date: date, gatewayTooltip: gatewayTooltip, unCapturedTooltip: unCapturedTooltip, acquirerTooltip: acquirerTooltip, errorCode: errorCode, acquirerCode: acquirerCode, gatewayCode: gatewayCode, timezone: timezone })) })) }) })));
|
|
30
|
+
} }, { children: _jsx(StatusCellContainer, { children: _jsx(IconWrapper, Object.assign({ width: isTextShown ? 'auto' : '36px' }, { children: isTextShown ? (_jsx(Tooltip, Object.assign({ title: date ? formatDate(date) : t(camelCase(status)) }, { children: _jsx(TextLabel, Object.assign({ sx: Object.assign({}, (refundStyles[status] ? refundStyles[status] : refundStyles.PENDING)) }, { children: t(camelCase(status)) })) }))) : (_jsx(RefundStatus, { status: status, refundTooltip: refundTooltip, date: date, gatewayTooltip: gatewayTooltip, unCapturedTooltip: unCapturedTooltip, acquirerTooltip: acquirerTooltip, errorCode: errorCode, acquirerCode: acquirerCode, gatewayCode: gatewayCode, timezone: timezone, refundTooltipLabel: refundTooltipLabel })) })) }) })));
|
|
31
31
|
}
|
|
32
32
|
export default RefundStatusCell;
|
package/build/components/TableCells/CustomCells/RefundStatusCell/components/RefundStatus.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BalanceCellProps } from '../type';
|
|
2
|
-
export default function RefundStatus({ status, refundTooltip, date, gatewayTooltip, unCapturedTooltip, acquirerTooltip, errorCode, acquirerCode, gatewayCode, timezone, }: Partial<BalanceCellProps>): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function RefundStatus({ status, refundTooltip, refundTooltipLabel, date, gatewayTooltip, unCapturedTooltip, acquirerTooltip, errorCode, acquirerCode, gatewayCode, timezone, }: Partial<BalanceCellProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,7 +8,7 @@ import { changeDateTimezone } from '../../../../../utils/index.js';
|
|
|
8
8
|
import { RefundStateIcon } from './RefundStateIcon';
|
|
9
9
|
import { refundStatusLabels } from '../constant';
|
|
10
10
|
import { RefundCellContainer, PartialIcon, PercentageContainer, DateContainer } from '../style';
|
|
11
|
-
export default function RefundStatus({ status, refundTooltip, date, gatewayTooltip, unCapturedTooltip, acquirerTooltip, errorCode, acquirerCode, gatewayCode, timezone, }) {
|
|
11
|
+
export default function RefundStatus({ status, refundTooltip, refundTooltipLabel, date, gatewayTooltip, unCapturedTooltip, acquirerTooltip, errorCode, acquirerCode, gatewayCode, timezone, }) {
|
|
12
12
|
const theme = useTheme();
|
|
13
13
|
const { t } = useTranslation();
|
|
14
14
|
const formattedDate = changeDateTimezone(new Date(Number(date)), {
|
|
@@ -18,7 +18,7 @@ export default function RefundStatus({ status, refundTooltip, date, gatewayToolt
|
|
|
18
18
|
if (!['REFUNDED', 'PAID_OUT'].includes(status !== null && status !== void 0 ? status : '')) {
|
|
19
19
|
return (_jsx(RefundStateIcon, { status: status, refundTooltip: refundTooltip, gatewayTooltip: gatewayTooltip, unCapturedTooltip: unCapturedTooltip, acquirerTooltip: acquirerTooltip, errorCode: errorCode, acquirerCode: acquirerCode, gatewayCode: gatewayCode }));
|
|
20
20
|
}
|
|
21
|
-
return (_jsx(Tooltip, Object.assign({ title: _jsxs("div", { children: [_jsx("div", { children: t(refundStatusLabels.REFUNDED) }), refundTooltip] }) }, { children: _jsxs(RefundCellContainer, Object.assign({ whileHover: ['animate', 'fadeIn'], animate: 'start', variants: Object.assign({}, (date && {
|
|
21
|
+
return (_jsx(Tooltip, Object.assign({ title: _jsxs("div", { children: [_jsx("div", { children: refundTooltipLabel !== null && refundTooltipLabel !== void 0 ? refundTooltipLabel : t(refundStatusLabels.REFUNDED) }), refundTooltip] }) }, { children: _jsxs(RefundCellContainer, Object.assign({ whileHover: ['animate', 'fadeIn'], animate: 'start', variants: Object.assign({}, (date && {
|
|
22
22
|
animate: {
|
|
23
23
|
boxShadow: theme.shadows[4],
|
|
24
24
|
},
|
package/build/types/index.d.ts
CHANGED
package/build/types/index.js
CHANGED
package/build/utils/index.d.ts
CHANGED
package/build/utils/index.js
CHANGED
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.0.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.0.242",
|
|
5
|
+
"testVersion": 0,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|
package/build/types/day.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type Day = 'sun' | 'mon' | 'tue' | 'wed' | 'thur' | 'fri' | 'sat';
|
package/build/types/day.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/build/utils/day.d.ts
DELETED
package/build/utils/day.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export function getOrderedWeekDays(startDay = 'sun') {
|
|
2
|
-
const days = ['sun', 'mon', 'tue', 'wed', 'thur', 'fri', 'sat'];
|
|
3
|
-
const startIndex = days.indexOf(startDay.toLowerCase());
|
|
4
|
-
if (startIndex === -1) {
|
|
5
|
-
console.error(`${startDay} is not a valid day`);
|
|
6
|
-
return days;
|
|
7
|
-
}
|
|
8
|
-
return [...days.slice(startIndex), ...days.slice(0, startIndex)];
|
|
9
|
-
}
|