@tap-payments/os-micro-frontend-shared 0.1.430 → 0.1.431-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 (70) hide show
  1. package/build/components/ActivityAreaChart/ActivityAreaChart.js +1 -1
  2. package/build/components/AnimatedSpinnerIcon/style.d.ts +0 -1
  3. package/build/components/Chip/style.d.ts +0 -1
  4. package/build/components/CountBadge/style.d.ts +0 -1
  5. package/build/components/DeviceIcon/index.d.ts +1 -0
  6. package/build/components/DeviceIcon/index.js +1 -0
  7. package/build/components/Dialog/style.d.ts +0 -1
  8. package/build/components/ErrorToast/ErrorToast.js +1 -1
  9. package/build/components/ErrorToast/type.d.ts +2 -1
  10. package/build/components/FilterDropdown/FilterDropdown.d.ts +11 -4
  11. package/build/components/FilterDropdown/FilterDropdown.js +25 -9
  12. package/build/components/FilterDropdown/style.js +1 -1
  13. package/build/components/FlippingCard/style.d.ts +0 -1
  14. package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
  15. package/build/components/JSONViewer/style.d.ts +0 -1
  16. package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
  17. package/build/components/MultiDatakeyDonut/MultiDatakeyDonut.d.ts +12 -0
  18. package/build/components/MultiDatakeyDonut/MultiDatakeyDonut.js +19 -0
  19. package/build/components/MultiDatakeyDonut/index.d.ts +1 -0
  20. package/build/components/MultiDatakeyDonut/index.js +1 -0
  21. package/build/components/MultiDatakeyDonut/style.d.ts +10 -0
  22. package/build/components/MultiDatakeyDonut/style.js +23 -0
  23. package/build/components/PaymentSourceFilter/index.d.ts +3 -0
  24. package/build/components/PaymentSourceFilter/index.js +3 -0
  25. package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
  26. package/build/components/SearchButton/styles.d.ts +0 -1
  27. package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
  28. package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
  29. package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
  30. package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
  31. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
  32. package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +0 -1
  33. package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
  34. package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
  35. package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
  36. package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
  37. package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
  38. package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
  39. package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
  40. package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
  41. package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
  42. package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
  43. package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
  44. package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
  45. package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +0 -1
  46. package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
  47. package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
  48. package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
  49. package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
  50. package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
  51. package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
  52. package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
  53. package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
  54. package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
  55. package/build/components/TableCells/CustomCells/style.d.ts +0 -1
  56. package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -1
  57. package/build/components/TableReports/style.d.ts +0 -1
  58. package/build/components/VirtualTables/components/style.d.ts +0 -1
  59. package/build/components/Widget/List.js +1 -1
  60. package/build/components/index.d.ts +2 -1
  61. package/build/components/index.js +2 -1
  62. package/build/constants/assets.d.ts +4 -0
  63. package/build/constants/assets.js +4 -0
  64. package/build/types/index.d.ts +1 -0
  65. package/build/types/index.js +1 -0
  66. package/build/types/toggleOptions.d.ts +2 -0
  67. package/build/types/toggleOptions.js +1 -0
  68. package/build/utils/date.d.ts +4 -0
  69. package/build/utils/date.js +37 -0
  70. package/package.json +3 -3
@@ -15,7 +15,7 @@ const ActivityAreaChart = ({ data, dataKey, isLoading, dateRange, selectedCurren
15
15
  };
16
16
  const MemoizedChartTooltip = useMemo(() => {
17
17
  return _jsx(ChartTooltip, { position: cursorPosition, dateRange: dateRange, selectedCurrency: selectedCurrency });
18
- }, [cursorPosition]);
18
+ }, [cursorPosition, dateRange, selectedCurrency]);
19
19
  if (isLoading || isEmpty) {
20
20
  return _jsx(LoadingChart, {});
21
21
  }
@@ -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,3 +1,4 @@
1
1
  import DeviceIcon from './DeviceIcon';
2
2
  export { isDeviceIconShown } from './utils';
3
+ export * from './constants';
3
4
  export default DeviceIcon;
@@ -1,3 +1,4 @@
1
1
  import DeviceIcon from './DeviceIcon';
2
2
  export { isDeviceIconShown } from './utils';
3
+ export * from './constants';
3
4
  export default DeviceIcon;
@@ -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;
@@ -2,6 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { reloadIcon } from '../../constants/index.js';
3
3
  import { ToastContainer, ToastIcon, ToastText } from './style';
4
4
  function ErrorToast({ message = 'Something went wrong', onRetry, position = 'bottom-center', iconSrc }) {
5
- return (_jsxs(ToastContainer, Object.assign({ toastPosition: position }, { children: [_jsx(ToastText, { children: message }), _jsx(ToastIcon, { onClick: onRetry, src: iconSrc || reloadIcon, alt: "toast-icon" })] })));
5
+ return (_jsxs(ToastContainer, Object.assign({ toastPosition: position }, { children: [_jsx(ToastText, { children: message }), _jsx(ToastIcon, { onClick: (e) => onRetry === null || onRetry === void 0 ? void 0 : onRetry(e), src: iconSrc || reloadIcon, alt: "toast-icon" })] })));
6
6
  }
7
7
  export default ErrorToast;
@@ -1,7 +1,8 @@
1
+ import { MouseEvent } from 'react';
1
2
  export type ToastPosition = 'bottom-center' | 'bottom-right' | 'bottom-left';
2
3
  export interface ErrorToastProps {
3
4
  message?: string;
4
- onRetry?: () => void;
5
+ onRetry?: (e: MouseEvent<HTMLImageElement>) => void;
5
6
  position?: ToastPosition;
6
7
  iconSrc?: string;
7
8
  }
@@ -1,12 +1,19 @@
1
- /// <reference types="react" />
1
+ import { ReactNode } from 'react';
2
+ import { BoxProps } from '@mui/material/Box';
3
+ import { SxProps } from '@mui/material';
2
4
  import { type MenuProps } from '@mui/material/Menu';
3
- interface FilterDropdownProps {
4
- children?: React.ReactNode;
5
+ interface FilterDropdownProps extends BoxProps {
5
6
  onConfirm: () => void;
6
7
  onCancel: () => void;
7
8
  isOkayButDisabled?: boolean;
8
9
  isDisabled?: boolean;
10
+ icon?: string;
11
+ title?: string;
12
+ menuStyle?: SxProps;
13
+ hideTitle?: boolean;
14
+ renderButton?: ReactNode;
15
+ onOpenChange?: (isOpen: boolean) => void;
9
16
  menuProps?: Partial<MenuProps>;
10
17
  }
11
- export default function FilterDropdown({ onConfirm, onCancel, isOkayButDisabled, children, isDisabled, menuProps }: Readonly<FilterDropdownProps>): import("react/jsx-runtime").JSX.Element;
18
+ export default function FilterDropdown({ onConfirm, onCancel, isOkayButDisabled, children, isDisabled, icon, title, menuStyle, hideTitle, renderButton, onOpenChange, menuProps, ...props }: Readonly<FilterDropdownProps>): import("react/jsx-runtime").JSX.Element;
12
19
  export {};
@@ -1,11 +1,25 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
13
  import { useState } from 'react';
3
14
  import Box from '@mui/material/Box';
15
+ import ClickAwayListener from '@mui/material/ClickAwayListener';
4
16
  import { useTranslation } from 'react-i18next';
5
17
  import { StyledMenu as Menu } from './style';
6
18
  import { darkFilterIcon } from '../../constants/index.js';
19
+ import { CustomBackdrop } from '../index.js';
7
20
  import { CancelButton, FilterButton, Footer, OkayButton, TitleStyled } from './style';
8
- export default function FilterDropdown({ onConfirm, onCancel, isOkayButDisabled, children, isDisabled, menuProps }) {
21
+ export default function FilterDropdown(_a) {
22
+ var { onConfirm, onCancel, isOkayButDisabled, children, isDisabled, icon, title, menuStyle, hideTitle = false, renderButton, onOpenChange, menuProps } = _a, props = __rest(_a, ["onConfirm", "onCancel", "isOkayButDisabled", "children", "isDisabled", "icon", "title", "menuStyle", "hideTitle", "renderButton", "onOpenChange", "menuProps"]);
9
23
  const [anchorEl, setAnchorEl] = useState(null);
10
24
  const open = Boolean(anchorEl);
11
25
  const { t } = useTranslation();
@@ -14,12 +28,14 @@ export default function FilterDropdown({ onConfirm, onCancel, isOkayButDisabled,
14
28
  return;
15
29
  if (!open) {
16
30
  setAnchorEl(e.currentTarget);
31
+ onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(true);
17
32
  return;
18
33
  }
19
34
  onClose();
20
35
  };
21
36
  const onClose = () => {
22
37
  setAnchorEl(null);
38
+ onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(false);
23
39
  onCancel();
24
40
  };
25
41
  const handleCancel = () => {
@@ -32,11 +48,11 @@ export default function FilterDropdown({ onConfirm, onCancel, isOkayButDisabled,
32
48
  onConfirm();
33
49
  onClose();
34
50
  };
35
- return (_jsxs(_Fragment, { children: [_jsx(FilterButton, Object.assign({ isActive: open, onClick: onOpen, sx: Object.assign({}, (isDisabled && { pointerEvents: 'none', opacity: 0.5 })) }, { children: _jsx(Box, { component: "img", src: darkFilterIcon, alt: "filter" }) })), _jsxs(Menu, Object.assign({ anchorEl: anchorEl, open: open, onClose: handleCancel, anchorOrigin: {
36
- vertical: 'bottom',
37
- horizontal: 'right',
38
- }, transformOrigin: {
39
- vertical: 'top',
40
- horizontal: 'right',
41
- } }, menuProps, { children: [_jsx(TitleStyled, Object.assign({ component: "span" }, { children: t('filterBy') })), children, _jsxs(Footer, { children: [_jsx(CancelButton, Object.assign({ onClick: handleCancel }, { children: t('cancel') })), _jsx(OkayButton, Object.assign({ disabled: isOkayButDisabled, onClick: handleConfirm }, { children: t('okay') }))] })] }))] }));
51
+ return (_jsx(ClickAwayListener, Object.assign({ onClickAway: handleCancel }, { children: _jsxs(Box, Object.assign({}, props, { children: [_jsx(FilterButton, Object.assign({ className: "filter-button", isActive: open, onClick: onOpen, sx: Object.assign({}, (isDisabled && Object.assign({ pointerEvents: 'none', opacity: 0.5 }, props.sx))) }, { children: renderButton !== null && renderButton !== void 0 ? renderButton : _jsx(Box, { component: "img", src: icon !== null && icon !== void 0 ? icon : darkFilterIcon, alt: "filter" }) })), _jsxs(Menu, Object.assign({ anchorEl: anchorEl, open: open, onClose: handleCancel, anchorOrigin: {
52
+ vertical: 'bottom',
53
+ horizontal: 'right',
54
+ }, transformOrigin: {
55
+ vertical: 'top',
56
+ horizontal: 'right',
57
+ }, sx: Object.assign({ marginTop: '8px', marginBottom: '8px', width: 193 }, menuStyle) }, menuProps, { children: [!hideTitle && _jsx(TitleStyled, Object.assign({ component: "span" }, { children: title !== null && title !== void 0 ? title : t('filterBy') })), children, _jsxs(Footer, { children: [_jsx(CancelButton, Object.assign({ onClick: handleCancel }, { children: t('cancel') })), _jsx(OkayButton, Object.assign({ disabled: isOkayButDisabled, onClick: handleConfirm }, { children: t('okay') }))] })] })), open && _jsx(CustomBackdrop, { onClick: onClose })] })) })));
42
58
  }
@@ -3,7 +3,7 @@ import { styled } from '@mui/material/styles';
3
3
  import Button from '@mui/material/Button';
4
4
  import Menu from '@mui/material/Menu';
5
5
  import { Text } from '../index.js';
6
- export const FilterButton = styled(Box, { shouldForwardProp: (props) => props !== 'isActive' })(({ theme, isActive }) => (Object.assign({ borderRadius: '4px', border: `1px solid ${theme.palette.divider}`, height: 32, width: 30, display: 'flex', alignItems: 'center', justifyContent: 'center', cursor: 'pointer', backgroundColor: theme.palette.common.white, ':hover': {
6
+ export const FilterButton = styled(Box, { shouldForwardProp: (props) => props !== 'isActive' })(({ theme, isActive }) => (Object.assign({ borderRadius: '4px', border: `1px solid ${theme.palette.divider}`, minHeight: 32, minWidth: 30, display: 'flex', alignItems: 'center', justifyContent: 'center', cursor: 'pointer', backgroundColor: theme.palette.common.white, ':hover': {
7
7
  opacity: 0.7,
8
8
  } }, (isActive && {
9
9
  boxShadow: `0px 0px 4px 0px ${theme.palette.info.dark}80`,
@@ -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;
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ interface DonutProps {
3
+ size?: number;
4
+ chartData: Array<{
5
+ name: string;
6
+ value: number;
7
+ color: string;
8
+ }>;
9
+ chartInfo?: ReactNode;
10
+ }
11
+ export declare const MultiDatakeyDonut: ({ chartData, size, chartInfo }: DonutProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo } from 'react';
3
+ import { ResponsiveContainer, PieChart, Pie, Cell } from 'recharts';
4
+ import { DonutWrapper, CenterOverlay, Empty } from './style';
5
+ export const MultiDatakeyDonut = ({ chartData, size = 170, chartInfo }) => {
6
+ const pieSegments = useMemo(() => {
7
+ const total = chartData.reduce((sum, d) => sum + d.value, 0) || 1;
8
+ let cumulative = 0;
9
+ return chartData.map((d) => {
10
+ const start = (cumulative / total) * 360;
11
+ const end = ((cumulative + d.value) / total) * 360;
12
+ cumulative += d.value;
13
+ return Object.assign(Object.assign({}, d), { startAngle: start, endAngle: end });
14
+ });
15
+ }, [chartData]);
16
+ const isEmpty = chartData.every((d) => d.value === 0);
17
+ return (_jsxs(DonutWrapper, Object.assign({ sx: { width: size, height: size } }, { children: [_jsx(ResponsiveContainer, { children: _jsxs(PieChart, { children: [_jsx(Pie, { data: [{ value: 100 }], dataKey: "value", cx: "50%", cy: "50%", innerRadius: "70%", outerRadius: "100%", fill: "#E5E7EB", stroke: "none", isAnimationActive: false }), !isEmpty &&
18
+ pieSegments.map((segment) => (_jsx(Pie, Object.assign({ data: [segment], dataKey: "value", cx: "50%", cy: "50%", innerRadius: "70%", outerRadius: "100%", startAngle: 90 - segment.startAngle, endAngle: 90 - segment.endAngle, cornerRadius: 0, stroke: "none", isAnimationActive: true, animationDuration: 800, style: { outline: 'none' } }, { children: _jsx(Cell, { fill: segment.color, tabIndex: -1 }, segment.name) }), segment.name)))] }) }), _jsx(CenterOverlay, { children: !chartInfo ? _jsx(Empty, { children: "----" }) : chartInfo })] })));
19
+ };
@@ -0,0 +1 @@
1
+ export * from './MultiDatakeyDonut';
@@ -0,0 +1 @@
1
+ export * from './MultiDatakeyDonut';
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ export declare const DonutWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").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").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
5
+ export declare const CenterOverlay: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
7
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
8
+ export declare const Empty: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
9
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
10
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -0,0 +1,23 @@
1
+ import { Box } from '@mui/material';
2
+ import { styled } from '@mui/material/styles';
3
+ export const DonutWrapper = styled(Box)(() => ({
4
+ width: '100%',
5
+ maxWidth: 500,
6
+ aspectRatio: '1',
7
+ position: 'relative',
8
+ }));
9
+ export const CenterOverlay = styled(Box)(({ theme }) => ({
10
+ position: 'absolute',
11
+ inset: 0,
12
+ display: 'flex',
13
+ flexDirection: 'column',
14
+ justifyContent: 'center',
15
+ alignItems: 'center',
16
+ pointerEvents: 'none',
17
+ gap: theme.spacing(1),
18
+ }));
19
+ export const Empty = styled(Box)(({ theme }) => ({
20
+ fontSize: 17,
21
+ fontWeight: 700,
22
+ color: '#CFD0D2',
23
+ }));
@@ -1,2 +1,5 @@
1
1
  export { default as PaymentSourceFilter } from './PaymentSourceFilter';
2
+ export { default as PaymentMethods } from './PaymentMethods';
3
+ export { default as PaymentSchemes } from './PaymentSchemes';
4
+ export { default as PaymentInitiated } from './PaymentInitiated';
2
5
  export { type PaymentSourceFilters } from './type';
@@ -1 +1,4 @@
1
1
  export { default as PaymentSourceFilter } from './PaymentSourceFilter';
2
+ export { default as PaymentMethods } from './PaymentMethods';
3
+ export { default as PaymentSchemes } from './PaymentSchemes';
4
+ export { default as PaymentInitiated } from './PaymentInitiated';
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  import { type 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;
@@ -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
  }
@@ -18,6 +18,6 @@ import { useScrollWithShadow } from './useScrollWithShadow';
18
18
  function List(_a) {
19
19
  var { allowShadow = true, children } = _a, props = __rest(_a, ["allowShadow", "children"]);
20
20
  const { onScrollHandler, showShadow } = useScrollWithShadow();
21
- return (_jsxs(ListStyled, Object.assign({ component: "ul", "data-testid": "Widget_List", onScroll: onScrollHandler }, props, { children: [children, showShadow && allowShadow && (_jsx(Box, { component: "img", src: listShadowBg, sx: { width: '100%', position: 'fixed', bottom: 0, pointerEvents: 'none' } }))] })));
21
+ return (_jsxs(ListStyled, Object.assign({ component: "ul", "data-testid": "Widget_List", onScroll: onScrollHandler }, props, { children: [children, showShadow && allowShadow && (_jsx(Box, { component: "img", src: listShadowBg, sx: { width: '100%', position: 'fixed', bottom: 0, pointerEvents: 'none', right: 0, left: 0 } }))] })));
22
22
  }
23
23
  export default memo(List);
@@ -77,7 +77,7 @@ export { default as Dropdown2 } from './Dropdown2';
77
77
  export { default as CountryFlag } from './CountryFlag';
78
78
  export { default as CurrencySymbol } from './CurrencySymbol';
79
79
  export { default as CustomBackdrop } from './CustomBackdrop';
80
- export { default as DeviceIcon, isDeviceIconShown } from './DeviceIcon';
80
+ export { default as DeviceIcon, isDeviceIconShown, DEVICE_ICON } from './DeviceIcon';
81
81
  export { default as CountBadge, BadgeVariants, CountAnimatedBadge, type StyledBadgeProps, paymentSourceAnimation } from './CountBadge';
82
82
  export { default as CircularProgressWithLabel } from './CircularProgressWithLabel';
83
83
  export { default as Collapse, type CollapseProps } from './Collapse';
@@ -153,6 +153,7 @@ export * from './SalesChannelFilter';
153
153
  export * from './ReferenceTypeFilter';
154
154
  export * from './ListColumnFilter';
155
155
  export * from './VerificationIcon';
156
+ export * from './MultiDatakeyDonut';
156
157
  export { default as TreeDropdown } from './TreeDropdown';
157
158
  export * from './TreeDropdown';
158
159
  export * from './AppServicesActionMenu';
@@ -77,7 +77,7 @@ export { default as Dropdown2 } from './Dropdown2';
77
77
  export { default as CountryFlag } from './CountryFlag';
78
78
  export { default as CurrencySymbol } from './CurrencySymbol';
79
79
  export { default as CustomBackdrop } from './CustomBackdrop';
80
- export { default as DeviceIcon, isDeviceIconShown } from './DeviceIcon';
80
+ export { default as DeviceIcon, isDeviceIconShown, DEVICE_ICON } from './DeviceIcon';
81
81
  export { default as CountBadge, BadgeVariants, CountAnimatedBadge, paymentSourceAnimation } from './CountBadge';
82
82
  export { default as CircularProgressWithLabel } from './CircularProgressWithLabel';
83
83
  export { default as Collapse } from './Collapse';
@@ -153,6 +153,7 @@ export * from './SalesChannelFilter';
153
153
  export * from './ReferenceTypeFilter';
154
154
  export * from './ListColumnFilter';
155
155
  export * from './VerificationIcon';
156
+ export * from './MultiDatakeyDonut';
156
157
  export { default as TreeDropdown } from './TreeDropdown';
157
158
  export * from './TreeDropdown';
158
159
  export * from './AppServicesActionMenu';
@@ -49,6 +49,7 @@ export declare const openBankingIcon: string;
49
49
  export declare const FrictionlessIcon: string;
50
50
  export declare const ChallengeIcon: string;
51
51
  export declare const visaIcon: string;
52
+ export declare const redArrowDownIcon: string;
52
53
  export declare const completedIcon: string;
53
54
  export declare const chargeBackRequestedIcon: string;
54
55
  export declare const chargeBackIcon: string;
@@ -75,6 +76,7 @@ export declare const invoiceNumberIcon: string;
75
76
  export declare const columnIcon: string;
76
77
  export declare const sortAzIcon: string;
77
78
  export declare const sortZaIcon: string;
79
+ export declare const exclamationGreyIcon: string;
78
80
  export declare const percentage0Icon: string;
79
81
  export declare const percentage50Icon: string;
80
82
  export declare const percentage75Icon: string;
@@ -90,12 +92,14 @@ export declare const paidNoBgIcon: string;
90
92
  export declare const refunededNoBgIcon: string;
91
93
  export declare const deactivatedIcon: string;
92
94
  export declare const topUpIcon: string;
95
+ export declare const AIOverviewIcon: string;
93
96
  export declare const deMaximizeIcon: string;
94
97
  export declare const pendingFlag: string;
95
98
  export declare const ibanIcon: string;
96
99
  export declare const payoutIcon: string;
97
100
  export declare const releasedFlag: string;
98
101
  export declare const acceptedFlag: string;
102
+ export declare const clearIcon: string;
99
103
  export declare const unCapturedIcon: string;
100
104
  export declare const newWindowIcon: string;
101
105
  export declare const viewAllIcon: string;
@@ -54,6 +54,7 @@ export const openBankingIcon = `${lightUrl}/openBanking.svg`;
54
54
  export const FrictionlessIcon = `${lightUrl}/FrictionlessIcon.svg`;
55
55
  export const ChallengeIcon = `${lightUrl}/ChallengeIcon.svg`;
56
56
  export const visaIcon = `${lightUrl}/visa.svg`;
57
+ export const redArrowDownIcon = `${lightUrl}/redArrowDownIcon.svg`;
57
58
  export const completedIcon = `${lightUrl}/completed.svg`;
58
59
  export const chargeBackRequestedIcon = `${lightUrl}/chargebackRequested.svg`;
59
60
  export const chargeBackIcon = `${lightUrl}/chargeback.svg`;
@@ -80,6 +81,7 @@ export const invoiceNumberIcon = `${lightUrl}/invoiceNumberIcon.svg`;
80
81
  export const columnIcon = `${lightUrl}/column.svg`;
81
82
  export const sortAzIcon = `${lightUrl}/sortAz.svg`;
82
83
  export const sortZaIcon = `${lightUrl}/sortZa.svg`;
84
+ export const exclamationGreyIcon = `${lightUrl}/exclamationGreyIcon.svg`;
83
85
  export const percentage0Icon = `${lightUrl}/percentage0.svg`;
84
86
  export const percentage50Icon = `${lightUrl}/percentage50.svg`;
85
87
  export const percentage75Icon = `${lightUrl}/percentage75.svg`;
@@ -95,12 +97,14 @@ export const paidNoBgIcon = `${lightUrl}/paidStatusIcon.svg`;
95
97
  export const refunededNoBgIcon = `${lightUrl}/refundedStatusIcon.svg`;
96
98
  export const deactivatedIcon = `${lightUrl}/deactivatedIcon.svg`;
97
99
  export const topUpIcon = `${lightUrl}/topup.svg`;
100
+ export const AIOverviewIcon = `${lightUrl}/AIOverviewIcon.svg`;
98
101
  export const deMaximizeIcon = `${appBaseUrl}/demaximize.svg`;
99
102
  export const pendingFlag = `${lightUrl}/pendingFlag.svg`;
100
103
  export const ibanIcon = `${lightUrl}/ibanIcon.svg`;
101
104
  export const payoutIcon = `${lightUrl}/payoutIcon.svg`;
102
105
  export const releasedFlag = `${lightUrl}/releasedFlag.svg`;
103
106
  export const acceptedFlag = `${lightUrl}/acceptedFlag.svg`;
107
+ export const clearIcon = `${lightUrl}/clearIcon.svg`;
104
108
  export const unCapturedIcon = `${lightUrl}/status/unCaptured.svg`;
105
109
  export const newWindowIcon = `${appBaseUrl}/newWindow.svg`;
106
110
  export const viewAllIcon = `${appBaseUrl}/viewAll.svg`;
@@ -32,6 +32,7 @@ export * from './filter';
32
32
  export * from './utilities';
33
33
  export * from './reports';
34
34
  export * from './document';
35
+ export * from './toggleOptions';
35
36
  export * from './toast';
36
37
  export * from './flag';
37
38
  export * from './window';
@@ -32,6 +32,7 @@ export * from './filter';
32
32
  export * from './utilities';
33
33
  export * from './reports';
34
34
  export * from './document';
35
+ export * from './toggleOptions';
35
36
  export * from './toast';
36
37
  export * from './flag';
37
38
  export * from './window';
@@ -0,0 +1,2 @@
1
+ import { DATA_KEY } from '../constants/index.js';
2
+ export type DataKey = (typeof DATA_KEY)[keyof typeof DATA_KEY];
@@ -0,0 +1 @@
1
+ export {};
@@ -43,5 +43,9 @@ export declare function isWithinTimeAgo(timestampMs: number, amount: number, uni
43
43
  export declare const formatRelativeTimeWithinHour: (timestampMs: number) => string;
44
44
  export declare const isTodayDate: (date: string | Date) => boolean;
45
45
  export declare const isYesterdayDate: (date: string | Date) => boolean;
46
+ export declare const getDateLabel: (from: Date, to: Date) => {
47
+ label: string;
48
+ isCustom: boolean;
49
+ };
46
50
  export declare const isValidDate: (date?: Date | string | number) => boolean;
47
51
  export {};
@@ -245,6 +245,43 @@ export const formatRelativeTimeWithinHour = (timestampMs) => {
245
245
  };
246
246
  export const isTodayDate = (date) => dayjs(date).isToday();
247
247
  export const isYesterdayDate = (date) => dayjs(date).isYesterday();
248
+ export const getDateLabel = (from, to) => {
249
+ const start = dayjs(from).startOf('day');
250
+ const end = dayjs(to).endOf('day');
251
+ const today = dayjs().startOf('day');
252
+ const currentYear = today.year();
253
+ const diffDays = end.diff(start, 'day') + 1;
254
+ // Today / Yesterday
255
+ if (start.isToday() && end.isToday())
256
+ return { label: 'Today', isCustom: false };
257
+ if (start.isYesterday() && end.isYesterday())
258
+ return { label: 'Yesterday', isCustom: false };
259
+ // Last 7 days
260
+ if (diffDays === 7 && end.isSame(today, 'day'))
261
+ return { label: 'Last 7 days', isCustom: false };
262
+ // Last 30 days (inclusive)
263
+ if (diffDays === 31 && end.isSame(today, 'day'))
264
+ return { label: 'Last 30 days', isCustom: false };
265
+ // Full month
266
+ if (start.date() === 1 && end.date() === end.daysInMonth() && start.month() === end.month()) {
267
+ const monthLabel = start.year() === currentYear ? start.format('MMMM') : start.format('MMMM YYYY');
268
+ return { label: monthLabel, isCustom: false };
269
+ }
270
+ // Same day: show Month + Day
271
+ if (start.isSame(end, 'day')) {
272
+ const label = start.format(start.year() === currentYear ? 'MMM D' : 'MMM D YYYY');
273
+ return { label, isCustom: false };
274
+ }
275
+ // Custom range
276
+ const showStartYear = start.year() !== currentYear;
277
+ const showEndYear = end.year() !== currentYear;
278
+ const startLabel = start.format(`MMM D${showStartYear ? ' YYYY' : ''}`);
279
+ const endLabel = end.format(`MMM D${showEndYear ? ' YYYY' : ''}`);
280
+ return {
281
+ label: `${startLabel} – ${endLabel}`,
282
+ isCustom: true,
283
+ };
284
+ };
248
285
  export const isValidDate = (date) => {
249
286
  return dayjs(date).isValid();
250
287
  };
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.430",
5
- "testVersion": 0,
4
+ "version": "0.1.431-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
+ }