@tap-payments/os-micro-frontend-shared 0.1.364 → 0.1.365-test.10

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.
Files changed (75) hide show
  1. package/build/components/ActivityAreaChart/ActivityAreaChart.js +39 -25
  2. package/build/components/ActivityAreaChart/components/ChartLegend/ChartLegend.d.ts +8 -0
  3. package/build/components/ActivityAreaChart/components/ChartLegend/ChartLegend.js +31 -0
  4. package/build/components/ActivityAreaChart/components/ChartLegend/LegendLabel.d.ts +6 -0
  5. package/build/components/ActivityAreaChart/components/ChartLegend/LegendLabel.js +4 -0
  6. package/build/components/ActivityAreaChart/components/ChartLegend/constant.d.ts +17 -0
  7. package/build/components/ActivityAreaChart/components/ChartLegend/constant.js +17 -0
  8. package/build/components/ActivityAreaChart/components/ChartLegend/index.d.ts +3 -0
  9. package/build/components/ActivityAreaChart/components/ChartLegend/index.js +3 -0
  10. package/build/components/ActivityAreaChart/components/ChartLegend/style.d.ts +8 -0
  11. package/build/components/ActivityAreaChart/components/ChartLegend/style.js +23 -0
  12. package/build/components/ActivityAreaChart/components/ChartLegend/type.d.ts +2 -0
  13. package/build/components/ActivityAreaChart/components/ChartLegend/type.js +1 -0
  14. package/build/components/ActivityAreaChart/components/ChartTooltip/ChartTooltip.d.ts +2 -0
  15. package/build/components/ActivityAreaChart/components/ChartTooltip/ChartTooltip.js +24 -0
  16. package/build/components/ActivityAreaChart/components/ChartTooltip/index.d.ts +1 -0
  17. package/build/components/ActivityAreaChart/components/ChartTooltip/index.js +1 -0
  18. package/build/components/ActivityAreaChart/components/LoadingChart/LoadingChart.d.ts +1 -0
  19. package/build/components/ActivityAreaChart/components/{LoadingChart.js → LoadingChart/LoadingChart.js} +1 -2
  20. package/build/components/ActivityAreaChart/components/LoadingChart/index.d.ts +1 -0
  21. package/build/components/ActivityAreaChart/components/LoadingChart/index.js +1 -0
  22. package/build/components/ActivityAreaChart/components/index.d.ts +3 -2
  23. package/build/components/ActivityAreaChart/components/index.js +3 -2
  24. package/build/components/ActivityAreaChart/styles.d.ts +3 -1
  25. package/build/components/ActivityAreaChart/styles.js +4 -4
  26. package/build/components/ActivityAreaChart/types.d.ts +13 -11
  27. package/build/components/AnimatedSpinnerIcon/style.d.ts +0 -1
  28. package/build/components/Chip/style.d.ts +0 -1
  29. package/build/components/CountBadge/style.d.ts +0 -1
  30. package/build/components/Dialog/style.d.ts +0 -1
  31. package/build/components/FlippingCard/style.d.ts +0 -1
  32. package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
  33. package/build/components/JSONViewer/style.d.ts +0 -1
  34. package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
  35. package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
  36. package/build/components/SearchButton/styles.d.ts +0 -1
  37. package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
  38. package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
  39. package/build/components/StatusIcons/ChargeStatusIcon/ChargeStatusIcon.js +11 -11
  40. package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
  41. package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
  42. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
  43. package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +0 -1
  44. package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
  45. package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
  46. package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
  47. package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
  48. package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
  49. package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
  50. package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
  51. package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
  52. package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
  53. package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
  54. package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
  55. package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
  56. package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +0 -1
  57. package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
  58. package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
  59. package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
  60. package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
  61. package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
  62. package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
  63. package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
  64. package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
  65. package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
  66. package/build/components/TableCells/CustomCells/style.d.ts +0 -1
  67. package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -1
  68. package/build/components/TableReports/style.d.ts +0 -1
  69. package/build/components/VirtualTables/components/style.d.ts +0 -1
  70. package/build/constants/assets.d.ts +1 -0
  71. package/build/constants/assets.js +1 -0
  72. package/package.json +3 -3
  73. package/build/components/ActivityAreaChart/components/ChartTooltip.d.ts +0 -3
  74. package/build/components/ActivityAreaChart/components/ChartTooltip.js +0 -24
  75. package/build/components/ActivityAreaChart/components/LoadingChart.d.ts +0 -2
@@ -1,43 +1,57 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useMemo, useState } from 'react';
3
3
  import { Tooltip, ResponsiveContainer, Area, AreaChart } from 'recharts';
4
- import { useTheme } from '@mui/material/styles';
5
- import { ChartTooltip, LoadingChart } from './components';
4
+ import { ChartTooltip, LoadingChart, ChartLegend, LEGENDS } from './components';
6
5
  const ActivityAreaChart = ({ data, dataKey, isLoading, dateRange, selectedCurrency }) => {
7
- const theme = useTheme();
8
6
  const [chartHovered, setChartHovered] = useState(false);
9
7
  const [cursorPosition, setCursorPosition] = useState({ x: 0, y: 0 });
8
+ const [activeLegend, setActiveLegend] = useState(LEGENDS.CHARGE.key);
10
9
  const isEmpty = (data === null || data === void 0 ? void 0 : data.length) === 0;
10
+ const isAmountDataKeyActive = dataKey === 'amount';
11
11
  const handleMouseMove = (e) => {
12
12
  if (e.activeCoordinate && e.isTooltipActive) {
13
13
  setCursorPosition(e.activeCoordinate);
14
14
  }
15
15
  };
16
16
  const MemoizedChartTooltip = useMemo(() => {
17
- return _jsx(ChartTooltip, { position: cursorPosition, dateRange: dateRange, selectedCurrency: selectedCurrency });
17
+ return (_jsx(ChartTooltip, { position: cursorPosition, dateRange: dateRange, selectedCurrency: selectedCurrency, activeLegend: activeLegend, activeDataKey: dataKey }));
18
18
  }, [cursorPosition]);
19
19
  if (isLoading || isEmpty) {
20
20
  return _jsx(LoadingChart, {});
21
21
  }
22
- return (_jsx(ResponsiveContainer, { children: _jsxs(AreaChart, Object.assign({ margin: {
23
- top: 20,
24
- }, data: data, onMouseMove: handleMouseMove }, { children: [data.length > 0 && (_jsx(Tooltip, { content: MemoizedChartTooltip, cursor: {
25
- fill: '#A5A8A3',
26
- stroke: '#A5A8A3',
27
- strokeWidth: 1,
28
- strokeOpacity: 1,
29
- stopOpacity: 0.3,
30
- strokeDasharray: '5 5',
31
- strokeLinecap: 'round',
32
- strokeLinejoin: 'round',
33
- } })), _jsx(Area, { dataKey: dataKey, type: "monotone", fill: "#76BB4012", stroke: theme.palette.success.dark, activeDot: {
34
- r: 5,
35
- fill: theme.palette.success.dark,
36
- strokeWidth: 2,
37
- stroke: 'white',
38
- cursor: chartHovered ? 'pointer' : 'default',
39
- onMouseOver: () => setChartHovered(true),
40
- onMouseLeave: () => setChartHovered(false),
41
- } })] })) }));
22
+ return (_jsxs(_Fragment, { children: [_jsx(ResponsiveContainer, { children: _jsxs(AreaChart, Object.assign({ margin: { top: 20 }, data: data, onMouseMove: handleMouseMove }, { children: [(data === null || data === void 0 ? void 0 : data.length) > 0 && (_jsx(Tooltip, { content: MemoizedChartTooltip, cursor: {
23
+ fill: '#A5A8A3',
24
+ stroke: '#A5A8A3',
25
+ strokeWidth: 1,
26
+ strokeOpacity: 1,
27
+ stopOpacity: 0.3,
28
+ strokeDasharray: '5 5',
29
+ strokeLinecap: 'round',
30
+ strokeLinejoin: 'round',
31
+ } })), activeLegend === LEGENDS.REFUNDS.key && (_jsx(Area, { dataKey: isAmountDataKeyActive ? 'refundAmount' : 'refundCount', type: "monotone", stackId: "1", fill: "#5E30EB07", stroke: LEGENDS.REFUNDS.color, activeDot: {
32
+ r: 5,
33
+ fill: LEGENDS.REFUNDS.color,
34
+ strokeWidth: 2,
35
+ stroke: 'white',
36
+ cursor: chartHovered ? 'pointer' : 'default',
37
+ onMouseOver: () => setChartHovered(true),
38
+ onMouseLeave: () => setChartHovered(false),
39
+ } }, `${activeLegend}-${LEGENDS.REFUNDS.key}`)), _jsx(Area, { dataKey: isAmountDataKeyActive ? 'chargeAmount' : 'chargedCount', type: "monotone", stackId: "1", fill: "#76BB4007", stroke: LEGENDS.TRANSACTIONS.color, activeDot: {
40
+ r: 5,
41
+ fill: LEGENDS.TRANSACTIONS.color,
42
+ strokeWidth: 2,
43
+ stroke: 'white',
44
+ cursor: chartHovered ? 'pointer' : 'default',
45
+ onMouseOver: () => setChartHovered(true),
46
+ onMouseLeave: () => setChartHovered(false),
47
+ } }, `${activeLegend}-${LEGENDS.TRANSACTIONS.key}`), activeLegend === LEGENDS.CHARGE.key && (_jsx(Area, { dataKey: "chargeRateValue", type: "monotone", stackId: "1", fill: "#1F88D007", stroke: LEGENDS.CHARGE.color, activeDot: {
48
+ r: 5,
49
+ fill: LEGENDS.CHARGE.color,
50
+ strokeWidth: 2,
51
+ stroke: 'white',
52
+ cursor: chartHovered ? 'pointer' : 'default',
53
+ onMouseOver: () => setChartHovered(true),
54
+ onMouseLeave: () => setChartHovered(false),
55
+ } }, `${activeLegend}-${LEGENDS.CHARGE.key}`))] })) }), _jsx(ChartLegend, { activeLegend: activeLegend, onSelectLegend: setActiveLegend })] }));
42
56
  };
43
57
  export default ActivityAreaChart;
@@ -0,0 +1,8 @@
1
+ import { BoxProps } from '@mui/material/Box';
2
+ import { LegendKey } from './type';
3
+ interface ChartLegendProps extends BoxProps {
4
+ activeLegend: LegendKey;
5
+ onSelectLegend: (key: LegendKey) => void;
6
+ }
7
+ export declare const ChartLegend: ({ activeLegend, onSelectLegend }: ChartLegendProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,31 @@
1
+ import { createElement as _createElement } from "react";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useState } from 'react';
4
+ import Box from '@mui/material/Box';
5
+ import { MenuItem } from '../../../index.js';
6
+ import { downArrowIcon } from '../../../../constants/index.js';
7
+ import { LegendLabel } from './LegendLabel';
8
+ import { LEGENDS } from './constant';
9
+ import { ChartLegendContainer, StyledMenu, LegendWrapper } from './style';
10
+ export const ChartLegend = ({ activeLegend, onSelectLegend }) => {
11
+ const [anchorEl, setAnchorEl] = useState(null);
12
+ const open = Boolean(anchorEl);
13
+ const active = LEGENDS[activeLegend];
14
+ const onOpen = (e) => {
15
+ setAnchorEl(e.currentTarget);
16
+ };
17
+ const onClose = () => {
18
+ setAnchorEl(null);
19
+ };
20
+ const onSelect = (key) => {
21
+ onSelectLegend(key);
22
+ onClose();
23
+ };
24
+ return (_jsxs(ChartLegendContainer, Object.assign({ sx: {
25
+ backgroundImage: activeLegend === LEGENDS.REFUNDS.key
26
+ ? 'linear-gradient(180deg, rgba(94, 48, 235, 0.025) 38.02%, rgba(255, 255, 255, 0) 99.99%)'
27
+ : 'linear-gradient(180deg, rgba(118, 187, 64, 0.025) 49.57%, rgba(255, 255, 255, 0) 100%)',
28
+ } }, { children: [_jsx(LegendLabel, Object.assign({}, LEGENDS.TRANSACTIONS)), _jsxs(LegendWrapper, Object.assign({ onMouseEnter: onOpen, onMouseLeave: onClose }, { children: [_jsx(LegendLabel, Object.assign({}, active)), _jsx(Box, { component: "img", src: downArrowIcon, alt: "down arrow", sx: { width: 15, marginTop: '2px' } }), _jsx(StyledMenu, Object.assign({ open: open, anchorEl: anchorEl, placement: "bottom-start" }, { children: Object.values(LEGENDS)
29
+ .filter((l) => l.key !== activeLegend && l.key !== LEGENDS.TRANSACTIONS.key)
30
+ .map((legend) => (_jsx(MenuItem, Object.assign({ hideCheckbox: true, onClick: () => onSelect(legend.key) }, { children: _createElement(LegendLabel, Object.assign({}, legend, { key: legend.key })) }), legend.key))) }))] }))] })));
31
+ };
@@ -0,0 +1,6 @@
1
+ interface LegendLabelProps {
2
+ label: string;
3
+ color: string;
4
+ }
5
+ export declare const LegendLabel: ({ label, color }: LegendLabelProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Box from '@mui/material/Box';
3
+ import { Text } from '../../../index.js';
4
+ export const LegendLabel = ({ label, color }) => (_jsxs(Box, Object.assign({ sx: { display: 'flex', alignItems: 'center', gap: '4px' } }, { children: [_jsx(Box, { sx: { background: color, width: 8, height: 8, borderRadius: '50%' } }), _jsx(Text, Object.assign({ sx: { fontWeight: 500, fontSize: '11px' } }, { children: label }))] })));
@@ -0,0 +1,17 @@
1
+ export declare const LEGENDS: {
2
+ readonly TRANSACTIONS: {
3
+ readonly key: "TRANSACTIONS";
4
+ readonly label: "Transactions";
5
+ readonly color: "rgb(118, 187, 64)";
6
+ };
7
+ readonly REFUNDS: {
8
+ readonly key: "REFUNDS";
9
+ readonly label: "Refunds";
10
+ readonly color: "rgb(94, 48, 235)";
11
+ };
12
+ readonly CHARGE: {
13
+ readonly key: "CHARGE";
14
+ readonly label: "Charge rate";
15
+ readonly color: "rgb(31, 136, 208)";
16
+ };
17
+ };
@@ -0,0 +1,17 @@
1
+ export const LEGENDS = {
2
+ TRANSACTIONS: {
3
+ key: 'TRANSACTIONS',
4
+ label: 'Transactions',
5
+ color: 'rgb(118, 187, 64)',
6
+ },
7
+ REFUNDS: {
8
+ key: 'REFUNDS',
9
+ label: 'Refunds',
10
+ color: 'rgb(94, 48, 235)',
11
+ },
12
+ CHARGE: {
13
+ key: 'CHARGE',
14
+ label: 'Charge rate',
15
+ color: 'rgb(31, 136, 208)',
16
+ },
17
+ };
@@ -0,0 +1,3 @@
1
+ export * from './ChartLegend';
2
+ export * from './constant';
3
+ export * from './type';
@@ -0,0 +1,3 @@
1
+ export * from './ChartLegend';
2
+ export * from './constant';
3
+ export * from './type';
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export declare const ChartLegendContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
5
+ export declare const StyledMenu: import("@emotion/styled").StyledComponent<Omit<import("../../../Menu/Menu").MenuProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
6
+ export declare const LegendWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
7
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
8
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -0,0 +1,23 @@
1
+ import { styled } from '@mui/material/styles';
2
+ import Box from '@mui/material/Box';
3
+ import Menu from '../../../Menu';
4
+ export const ChartLegendContainer = styled(Box)(() => ({
5
+ padding: '8px 16px',
6
+ display: 'flex',
7
+ alignItems: 'center',
8
+ gap: '12px',
9
+ position: 'relative',
10
+ }));
11
+ export const StyledMenu = styled(Menu)(() => ({
12
+ marginTop: '8px',
13
+ marginBottom: '8px',
14
+ maxHeight: '190px',
15
+ overflow: 'auto',
16
+ minWidth: '100px',
17
+ }));
18
+ export const LegendWrapper = styled(Box)(() => ({
19
+ display: 'flex',
20
+ alignItems: 'center',
21
+ gap: '2px',
22
+ cursor: 'pointer',
23
+ }));
@@ -0,0 +1,2 @@
1
+ import { LEGENDS } from './constant';
2
+ export type LegendKey = keyof typeof LEGENDS;
@@ -0,0 +1,2 @@
1
+ import { ChartTooltipProps } from '../../types';
2
+ export declare const ChartTooltip: ({ active, payload, dateRange, activeLegend, }: ChartTooltipProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import dayjs from 'dayjs';
3
+ import Box from '@mui/material/Box';
4
+ import { TooltipContainer, TimeTypography, ValueTypography } from '../../styles';
5
+ import {
6
+ // getTooltipFormattedValue,
7
+ getFormattedDateWithTimezone, } from '../../utils';
8
+ import Text from '../../../Text';
9
+ import { LEGENDS } from '../ChartLegend';
10
+ export const ChartTooltip = ({ active, payload, dateRange,
11
+ // selectedCurrency,
12
+ activeLegend, }) => {
13
+ var _a, _b, _c, _d, _e, _f, _g;
14
+ const dateRangeFrom = dayjs(dateRange === null || dateRange === void 0 ? void 0 : dateRange[0]);
15
+ const dateRangeTo = dayjs(dateRange === null || dateRange === void 0 ? void 0 : dateRange[1]);
16
+ const isSingleDay = dateRangeFrom === null || dateRangeFrom === void 0 ? void 0 : dateRangeFrom.isSame(dateRangeTo, 'day');
17
+ if (active && (payload === null || payload === void 0 ? void 0 : payload.length)) {
18
+ const point = payload[0];
19
+ // const localizedUnitLabel = getLocalizedUnitLabel(activeDataKey, point?.value)
20
+ const formattedDate = ((_a = point === null || point === void 0 ? void 0 : point.payload) === null || _a === void 0 ? void 0 : _a.date) && getFormattedDateWithTimezone((_b = point === null || point === void 0 ? void 0 : point.payload) === null || _b === void 0 ? void 0 : _b.date, isSingleDay, (_c = point === null || point === void 0 ? void 0 : point.payload) === null || _c === void 0 ? void 0 : _c.hour);
21
+ return (_jsxs(TooltipContainer, Object.assign({ className: "chart-tooltip" }, { children: [_jsx(TimeTypography, { children: formattedDate !== null && formattedDate !== void 0 ? formattedDate : (_d = point === null || point === void 0 ? void 0 : point.payload) === null || _d === void 0 ? void 0 : _d.date }), _jsx(ValueTypography, { children: _jsxs(Box, Object.assign({ sx: { display: 'flex', flexDirection: 'column', gap: '4px' } }, { children: [activeLegend === LEGENDS.CHARGE.key && (_jsxs(Box, Object.assign({ sx: { display: 'flex', alignItems: 'center', gap: '4px' } }, { children: [_jsx(Box, { sx: { width: 12, height: 12, background: LEGENDS.CHARGE.color, borderRadius: '50%', border: `2px solid #fff`, flexShrink: 0 } }), _jsx(Text, Object.assign({ sx: { fontSize: '11px', fontWeight: 600 } }, { children: `${(_e = point.payload) === null || _e === void 0 ? void 0 : _e.chargeRate} Charge Rate` }))] }))), _jsxs(Box, Object.assign({ sx: { display: 'flex', alignItems: 'center', gap: '4px' } }, { children: [_jsx(Box, { sx: { width: 12, height: 12, background: LEGENDS.TRANSACTIONS.color, borderRadius: '50%', border: `2px solid #fff`, flexShrink: 0 } }), _jsx(Text, Object.assign({ sx: { fontSize: '11px', fontWeight: 600 } }, { children: `${(_f = point.payload) === null || _f === void 0 ? void 0 : _f.chargeCount} Transactions` }))] })), activeLegend === LEGENDS.REFUNDS.key && (_jsxs(Box, Object.assign({ sx: { display: 'flex', alignItems: 'center', gap: '4px' } }, { children: [_jsx(Box, { sx: { width: 12, height: 12, background: LEGENDS.REFUNDS.color, borderRadius: '50%', border: `2px solid #fff`, flexShrink: 0 } }), _jsx(Text, Object.assign({ sx: { fontSize: '11px', fontWeight: 600 } }, { children: `${(_g = point.payload) === null || _g === void 0 ? void 0 : _g.chargeCount} Refunds` }))] })))] })) })] })));
22
+ }
23
+ return null;
24
+ };
@@ -0,0 +1 @@
1
+ export * from './ChartTooltip';
@@ -0,0 +1 @@
1
+ export * from './ChartTooltip';
@@ -0,0 +1 @@
1
+ export declare const LoadingChart: () => import("react/jsx-runtime").JSX.Element;
@@ -10,9 +10,8 @@ const loadingData = [
10
10
  { dataKey: 94.3882 },
11
11
  { dataKey: 110.406 },
12
12
  ];
13
- const LoadingChart = () => {
13
+ export const LoadingChart = () => {
14
14
  return (_jsx(ResponsiveContainer, { children: _jsxs(AreaChart, Object.assign({ margin: {
15
15
  top: 40,
16
16
  }, data: loadingData }, { children: [_jsx("defs", { children: _jsxs("linearGradient", Object.assign({ id: "loadingGradient", x1: "0", y1: "0", x2: "0", y2: "1", gradientUnits: "objectBoundingBox" }, { children: [_jsx("stop", { offset: "0.54", stopColor: "rgba(67, 67, 67, 0.035)" }), _jsx("stop", { offset: "1", stopColor: "rgba(255, 255, 255, 0)" })] })) }), _jsx(Area, { dataKey: "dataKey", type: "linear", fill: "url(#loadingGradient)", fillOpacity: 1, stroke: "#C2C2C2", strokeWidth: 1, strokeLinecap: "round", strokeDasharray: "4 4", activeDot: false })] })) }));
17
17
  };
18
- export default LoadingChart;
@@ -0,0 +1 @@
1
+ export * from './LoadingChart';
@@ -0,0 +1 @@
1
+ export * from './LoadingChart';
@@ -1,2 +1,3 @@
1
- export { default as ChartTooltip } from './ChartTooltip';
2
- export { default as LoadingChart } from './LoadingChart';
1
+ export * from './ChartTooltip';
2
+ export * from './LoadingChart';
3
+ export * from './ChartLegend';
@@ -1,2 +1,3 @@
1
- export { default as ChartTooltip } from './ChartTooltip';
2
- export { default as LoadingChart } from './LoadingChart';
1
+ export * from './ChartTooltip';
2
+ export * from './LoadingChart';
3
+ export * from './ChartLegend';
@@ -13,4 +13,6 @@ export declare const CurrencyBox: import("@emotion/styled").StyledComponent<impo
13
13
  }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
14
14
  export declare const CurrencyText: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
15
15
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
16
- }, "width" | "minHeight" | "height" | "bottom" | "left" | "right" | "top" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "visibility" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "classes" | "align" | "className" | "style" | "children" | "gutterBottom" | "noWrap" | "paragraph" | "sx" | "variant" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
16
+ }, "width" | "minHeight" | "height" | "bottom" | "left" | "right" | "top" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "visibility" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "classes" | "align" | "className" | "style" | "children" | "gutterBottom" | "noWrap" | "paragraph" | "sx" | "variant" | "variantMapping"> & {
17
+ component?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
18
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -1,3 +1,4 @@
1
+ import Text from '../Text';
1
2
  import { Box, Typography, styled } from '@mui/material';
2
3
  export const TooltipContainer = styled(Box)(() => ({
3
4
  width: 'auto',
@@ -33,14 +34,13 @@ export const ValueTypography = styled(Typography)({
33
34
  export const CurrencyBox = styled(Box)({
34
35
  display: 'flex',
35
36
  alignItems: 'center',
36
- height: '100%',
37
+ // height: '100%',
37
38
  gap: '2.6px',
38
39
  maxHeight: '19px',
39
40
  });
40
- export const CurrencyText = styled(Typography)({
41
- fontWeight: 500,
41
+ export const CurrencyText = styled(Text)({
42
+ fontWeight: 600,
42
43
  fontSize: 11,
43
44
  lineHeight: '130%',
44
- color: '#4B4847',
45
45
  letterSpacing: '-0.14px',
46
46
  });
@@ -1,3 +1,4 @@
1
+ import { LegendKey } from './components';
1
2
  export interface ActivityAreaChartProps {
2
3
  data: ChartDataPoint[];
3
4
  dataKey: string;
@@ -5,17 +6,23 @@ export interface ActivityAreaChartProps {
5
6
  dateRange: [Date, Date];
6
7
  selectedCurrency: string;
7
8
  }
9
+ export interface ChartDataPoint {
10
+ date: string;
11
+ chargeCount: number;
12
+ chargeAmount: number;
13
+ chargeRate: number;
14
+ refundCount: number;
15
+ refundAmount: number;
16
+ hour?: number;
17
+ }
8
18
  export interface ChartTooltipProps {
9
19
  active?: boolean;
20
+ activeLegend: LegendKey;
21
+ activeDataKey: string;
10
22
  payload?: Array<{
11
23
  value?: number;
12
24
  dataKey?: string;
13
- payload?: {
14
- date?: string;
15
- count?: number;
16
- amount?: number;
17
- hour?: number;
18
- };
25
+ payload?: ChartDataPoint;
19
26
  }>;
20
27
  position?: {
21
28
  x: number;
@@ -24,9 +31,4 @@ export interface ChartTooltipProps {
24
31
  dateRange: [Date, Date];
25
32
  selectedCurrency: string;
26
33
  }
27
- export interface ChartDataPoint {
28
- date: string;
29
- count: number;
30
- amount: number;
31
- }
32
34
  export type PayloadItem = NonNullable<ChartTooltipProps['payload']>[number];
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  type AnimatedSpinnerIconProps = {
4
3
  width?: string;
5
4
  height?: string;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  import { GetSourceAnimationFunction } from './type';
4
3
  export declare const ChipStyled: import("@emotion/styled").StyledComponent<import("react").RefAttributes<unknown> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
5
4
  variant?: import("./type").ChipVariant | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const AgreementImageWrapper: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const DialogWrapper: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const Wrapper: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  declare const ImageWrapper: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const FOOTER_HEIGHT = 37;
4
3
  export declare const TITLE_BAR_HEIGHT = "32px";
5
4
  export declare const VIEWER_HEIGHT = 545;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  import type { SxProps, Theme } from '@mui/material/styles';
4
3
  export declare const CHIP_GAP = 3;
5
4
  export declare const DEFAULT_CHIP_MIN_WIDTH = 24;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  import type { SxProps, Theme } from '@mui/material/styles';
4
3
  export declare const CHIP_GAP = 3;
5
4
  export declare const CenterIconWrapper: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledInput: import("@emotion/styled").StyledComponent<{
4
3
  width?: string | number | undefined;
5
4
  height?: string | number | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const BalanceCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -16,7 +16,7 @@ export function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip
16
16
  const chargeTooltipTitle = chargeTooltip && (_jsx(_Fragment, { children: _jsx("div", { children: chargeTooltip }) }));
17
17
  const acquirerTooltipTitle = acquirerTooltip && (_jsxs(_Fragment, { children: [_jsx("div", { children: "Acquirer" }), _jsx("div", { children: acquirerTooltip })] }));
18
18
  const gatewayTooltipTitle = gatewayTooltip && (_jsxs(_Fragment, { children: [_jsx("div", { children: "Gateway" }), _jsx("div", { children: gatewayTooltip })] }));
19
- const chargeIcon = chargeStatus && statusIcons[chargeStatus] && (_jsx(Tooltip, Object.assign({ title: t(camelCase(chargeStatus)) }, { children: _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) }) })) })));
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
20
  if (isSheetViewShown) {
21
21
  return (_jsxs(TextViewWrapper, { children: [_jsxs(StatusChipWithCopy, Object.assign({ copyText: t(camelCase(chargeStatus)), chipIndex: chipIndex, 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
22
  }
@@ -38,7 +38,7 @@ export function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip
38
38
  border: '1px solid #F2F2F2',
39
39
  borderRadius: '12px',
40
40
  backgroundColor: '#fff',
41
- })), unCapturedStyles) }, { children: [_jsxs(UnCapturedBadge, Object.assign({ "data-testid": "ChargeStatusIcon_UnCapturedBadge", sx: {
41
+ })), unCapturedStyles) }, { children: [_jsx(UnCapturedBadge, Object.assign({ "data-testid": "ChargeStatusIcon_UnCapturedBadge", sx: {
42
42
  borderRadius: '56px',
43
43
  }, initial: {
44
44
  background: 'transparent',
@@ -46,13 +46,13 @@ export function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip
46
46
  animate: {
47
47
  background: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.background,
48
48
  },
49
- } }, { children: [chargeIcon, _jsx(Tooltip, Object.assign({ title: chargeTooltipTitle !== null && chargeTooltipTitle !== void 0 ? chargeTooltipTitle : t(camelCase(chargeStatus)) }, { children: _jsx(ErrorCodeWrapper, Object.assign({ "data-testid": "ChargeStatusIcon_ErrorCodeWrapper", transition: {
50
- animate: {
51
- duration: 0.05,
52
- },
53
- }, variants: ErrorCodeLabelAnimationVariants, style: Object.assign({}, (errorCode && {
54
- padding: '0 !important',
55
- })) }, { children: _jsx(ErrorCodeLabel, Object.assign({ "data-testid": "ChargeStatusIcon_ErrorCodeLabel", sx: {
56
- background: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.color,
57
- }, transition: errorCodeLabelAnimation, variants: ErrorCodeVariants, initial: { opacity: 0 } }, { children: errorCode })) })) }))] })), _jsx(GatewaysContainer, Object.assign({ "data-testid": "ChargeStatusIcon_GatewaysContainer", transition: GatewayIconWrapperAnimationTransition, variants: GatewaysContainerAnimationVariants, style: gatewayContainerStyles, isVisible: !!gatewayTooltipTitle }, { children: gatewayTooltipTitle && (_jsx(Tooltip, Object.assign({ title: gatewayTooltipTitle }, { children: _jsx(GatewayIconWrapper, Object.assign({ "data-testid": "ChargeStatusIcon_GatewayIconWrapper", style: Object.assign({ background: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.background }, gatewayIconWrapperStyles) }, { children: _jsx(GateWayIcon, { src: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.gatewayIcon, alt: "gateway-icon", "data-testid": "ChargeStatusIcon_GatewayIcon", style: gateWayIconStyles }) })) }))) })), _jsx(GatewaysContainer, Object.assign({ "data-testid": "ChargeStatusIcon_GatewaysContainer", transition: GatewayIconWrapperAnimationTransition, variants: AcquirerContainerAnimationVariants, style: gatewayContainerStyles, isVisible: !!acquirerTooltipTitle }, { children: acquirerTooltipTitle && (_jsx(Tooltip, Object.assign({ title: acquirerTooltipTitle }, { children: _jsx(GatewayIconWrapper, Object.assign({ "data-testid": "ChargeStatusIcon_AcquirerIconWrapper", style: Object.assign({ background: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.background }, gatewayIconWrapperStyles) }, { children: _jsx(GateWayIcon, { src: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.acquirerIcon, alt: "acquirer-icon", "data-testid": "ChargeStatusIcon_AcquirerIcon", style: gateWayIconStyles }) })) }))) }))] }))) : (_jsx(Tooltip, Object.assign({ title: chargeTooltipTitle !== null && chargeTooltipTitle !== void 0 ? chargeTooltipTitle : t(camelCase(chargeStatus)) }, { children: _jsx(StatusIconWrapper, { children: chargeIcon }) }))) })));
49
+ } }, { children: _jsx(Tooltip, Object.assign({ title: chargeTooltipTitle !== null && chargeTooltipTitle !== void 0 ? chargeTooltipTitle : t(camelCase(chargeStatus)) }, { children: _jsxs(_Fragment, { children: [chargeIcon, _jsx(ErrorCodeWrapper, Object.assign({ "data-testid": "ChargeStatusIcon_ErrorCodeWrapper", transition: {
50
+ animate: {
51
+ duration: 0.05,
52
+ },
53
+ }, variants: ErrorCodeLabelAnimationVariants, style: Object.assign({}, (errorCode && {
54
+ padding: '0 !important',
55
+ })) }, { children: _jsx(ErrorCodeLabel, Object.assign({ "data-testid": "ChargeStatusIcon_ErrorCodeLabel", sx: {
56
+ background: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.color,
57
+ }, transition: errorCodeLabelAnimation, variants: ErrorCodeVariants, initial: { opacity: 0 } }, { children: errorCode })) }))] }) })) })), _jsx(GatewaysContainer, Object.assign({ "data-testid": "ChargeStatusIcon_GatewaysContainer", transition: GatewayIconWrapperAnimationTransition, variants: GatewaysContainerAnimationVariants, style: gatewayContainerStyles, isVisible: !!gatewayTooltipTitle }, { children: gatewayTooltipTitle && (_jsx(Tooltip, Object.assign({ title: gatewayTooltipTitle }, { children: _jsx(GatewayIconWrapper, Object.assign({ "data-testid": "ChargeStatusIcon_GatewayIconWrapper", style: Object.assign({ background: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.background }, gatewayIconWrapperStyles) }, { children: _jsx(GateWayIcon, { src: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.gatewayIcon, alt: "gateway-icon", "data-testid": "ChargeStatusIcon_GatewayIcon", style: gateWayIconStyles }) })) }))) })), _jsx(GatewaysContainer, Object.assign({ "data-testid": "ChargeStatusIcon_GatewaysContainer", transition: GatewayIconWrapperAnimationTransition, variants: AcquirerContainerAnimationVariants, style: gatewayContainerStyles, isVisible: !!acquirerTooltipTitle }, { children: acquirerTooltipTitle && (_jsx(Tooltip, Object.assign({ title: acquirerTooltipTitle }, { children: _jsx(GatewayIconWrapper, Object.assign({ "data-testid": "ChargeStatusIcon_AcquirerIconWrapper", style: Object.assign({ background: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.background }, gatewayIconWrapperStyles) }, { children: _jsx(GateWayIcon, { src: unCapturedStatusStyle === null || unCapturedStatusStyle === void 0 ? void 0 : unCapturedStatusStyle.acquirerIcon, alt: "acquirer-icon", "data-testid": "ChargeStatusIcon_AcquirerIcon", style: gateWayIconStyles }) })) }))) }))] }))) : (_jsx(Tooltip, Object.assign({ title: chargeTooltipTitle !== null && chargeTooltipTitle !== void 0 ? chargeTooltipTitle : t(camelCase(chargeStatus)) }, { children: _jsx(StatusIconWrapper, { children: chargeIcon }) }))) })));
58
58
  }
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const ErrorCodeLabel: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  import { TableMode } from '../../../../types/index.js';
4
3
  export declare const ActionCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
5
4
  tableMode?: TableMode | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const AgreementCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledAgreementCardIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const CardContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledAppsCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const AppsStatusContainer: import("@emotion/styled").StyledComponent<{
5
4
  hidden?: boolean | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const AuthIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
4
3
  export declare const AuthCellContainer: import("@emotion/styled").StyledComponent<{
5
4
  hidden?: boolean | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const BalanceCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const DueDateCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const DueDateCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const Button: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const DueDateCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const DueDateCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledDownloadFileImageWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
4
3
  isTextShown?: boolean | undefined;
5
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const ProductCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const RefundChargeCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const RefundCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const SalesChannelsContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
5
4
  hidden?: boolean | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<{
4
3
  width?: string | number | undefined;
5
4
  height?: string | number | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const GeographyBox: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
4
3
  variant?: "Global" | "Regional" | "Local" | undefined;
5
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const Button: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  type ExportButtonProps = {
4
3
  notificationState?: {
5
4
  success: boolean;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  interface TableWrapperProps {
4
3
  showNoDataView?: boolean;
5
4
  }
@@ -76,6 +76,7 @@ export declare const closeIcon: string;
76
76
  export declare const dashedCheckIcon: string;
77
77
  export declare const deactivatedIcon: string;
78
78
  export declare const topUpIcon: string;
79
+ export declare const AIOverviewIcon: string;
79
80
  export declare const deMaximizeIcon: string;
80
81
  export declare const pendingFlag: string;
81
82
  export declare const ibanIcon: string;
@@ -81,6 +81,7 @@ export const closeIcon = `${lightUrl}/close.svg`;
81
81
  export const dashedCheckIcon = `${lightUrl}/dashedCheckIcon.svg`;
82
82
  export const deactivatedIcon = `${lightUrl}/deactivatedIcon.svg`;
83
83
  export const topUpIcon = `${lightUrl}/topup.svg`;
84
+ export const AIOverviewIcon = `${lightUrl}/AIOverviewIcon.svg`;
84
85
  export const deMaximizeIcon = `${appBaseUrl}/demaximize.svg`;
85
86
  export const pendingFlag = `${lightUrl}/pendingFlag.svg`;
86
87
  export const ibanIcon = `${lightUrl}/ibanIcon.svg`;
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.364",
5
- "testVersion": 0,
4
+ "version": "0.1.365-test.10",
5
+ "testVersion": 10,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",
@@ -164,4 +164,4 @@
164
164
  "publishConfig": {
165
165
  "registry": "https://registry.npmjs.org/"
166
166
  }
167
- }
167
+ }
@@ -1,3 +0,0 @@
1
- import { ChartTooltipProps } from '../types';
2
- declare const ChartTooltip: ({ active, payload, dateRange, selectedCurrency }: ChartTooltipProps) => import("react/jsx-runtime").JSX.Element | null;
3
- export default ChartTooltip;
@@ -1,24 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useTranslation } from 'react-i18next';
3
- import dayjs from 'dayjs';
4
- import Box from '@mui/material/Box';
5
- import { getLocalizedUnitLabel } from '../../../utils/index.js';
6
- import { DATA_KEY } from '../../../constants/index.js';
7
- import CountryFlag from '../../CountryFlag';
8
- import { TooltipContainer, TimeTypography, ValueTypography, CurrencyBox, CurrencyText } from '../styles';
9
- import { getTooltipFormattedValue, getFormattedDateWithTimezone } from '../utils';
10
- const ChartTooltip = ({ active, payload, dateRange, selectedCurrency }) => {
11
- var _a, _b, _c, _d;
12
- const { t } = useTranslation();
13
- const dateRangeFrom = dayjs(dateRange === null || dateRange === void 0 ? void 0 : dateRange[0]);
14
- const dateRangeTo = dayjs(dateRange === null || dateRange === void 0 ? void 0 : dateRange[1]);
15
- const isSingleDay = dateRangeFrom === null || dateRangeFrom === void 0 ? void 0 : dateRangeFrom.isSame(dateRangeTo, 'day');
16
- if (active && (payload === null || payload === void 0 ? void 0 : payload.length)) {
17
- const point = payload[0];
18
- const localizedUnitLabel = getLocalizedUnitLabel(point === null || point === void 0 ? void 0 : point.dataKey, point === null || point === void 0 ? void 0 : point.value);
19
- const formattedDate = ((_a = point === null || point === void 0 ? void 0 : point.payload) === null || _a === void 0 ? void 0 : _a.date) && getFormattedDateWithTimezone((_b = point === null || point === void 0 ? void 0 : point.payload) === null || _b === void 0 ? void 0 : _b.date, isSingleDay, (_c = point === null || point === void 0 ? void 0 : point.payload) === null || _c === void 0 ? void 0 : _c.hour);
20
- return (_jsxs(TooltipContainer, Object.assign({ className: "chart-tooltip" }, { children: [_jsx(TimeTypography, { children: formattedDate !== null && formattedDate !== void 0 ? formattedDate : (_d = point === null || point === void 0 ? void 0 : point.payload) === null || _d === void 0 ? void 0 : _d.date }), _jsxs(ValueTypography, { children: [(point === null || point === void 0 ? void 0 : point.dataKey) === DATA_KEY.AMOUNT && (_jsxs(CurrencyBox, { children: [_jsx(CountryFlag, { currencyCode: selectedCurrency, width: 12 }), _jsx(CurrencyText, { children: selectedCurrency })] })), _jsx(Box, { children: `${getTooltipFormattedValue(point, t(localizedUnitLabel), selectedCurrency)}` })] })] })));
21
- }
22
- return null;
23
- };
24
- export default ChartTooltip;
@@ -1,2 +0,0 @@
1
- declare const LoadingChart: () => import("react/jsx-runtime").JSX.Element;
2
- export default LoadingChart;