@tap-payments/os-micro-frontend-shared 0.1.288 → 0.1.290-test.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/Chip/style.d.ts +0 -1
- package/build/components/CountBadge/style.d.ts +0 -1
- package/build/components/DateFilter/DateFilter.d.ts +16 -0
- package/build/components/DateFilter/DateFilter.js +32 -0
- package/build/components/DateFilter/index.d.ts +1 -0
- package/build/components/DateFilter/index.js +1 -0
- package/build/components/DateFilter/style.d.ts +35 -0
- package/build/components/DateFilter/style.js +100 -0
- package/build/components/Dialog/style.d.ts +0 -1
- package/build/components/FlippingCard/style.d.ts +0 -1
- package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
- package/build/components/JSONViewer/style.d.ts +0 -1
- package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
- package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
- package/build/components/SearchButton/styles.d.ts +0 -1
- package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
- package/build/components/StatusIcons/SourceIcons/components/SourceIcon.d.ts +4 -5
- package/build/components/StatusIcons/SourceIcons/components/SourceIcon.js +19 -3
- package/build/components/StatusIcons/SourceIcons/style.d.ts +3 -3
- package/build/components/StatusIcons/SourceIcons/style.js +2 -6
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SourceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/style.d.ts +0 -1
- package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -1
- package/build/components/TableReports/style.d.ts +0 -1
- package/build/components/VirtualTables/VirtualTable/VirtualTable.d.ts +1 -1
- package/build/components/VirtualTables/VirtualTable/VirtualTable.js +2 -2
- package/build/components/VirtualTables/components/TableFooter/TableFooter.d.ts +1 -1
- package/build/components/VirtualTables/components/TableFooter/TableFooter.js +2 -11
- package/build/components/VirtualTables/components/style.d.ts +0 -1
- package/build/components/index.d.ts +1 -0
- package/build/components/index.js +1 -0
- package/build/types/table.d.ts +1 -1
- package/package.json +3 -3
|
@@ -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;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CalenderMode, Timezone } from '../../types/index.js';
|
|
2
|
+
export interface DateFilterProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
onConfirm: (dateRange: [Date, Date] | undefined) => void;
|
|
5
|
+
onClear: () => void;
|
|
6
|
+
dateRange?: [Date, Date];
|
|
7
|
+
onDateRangeChange: (dateRange?: [Date, Date]) => void;
|
|
8
|
+
calendarMode: CalenderMode;
|
|
9
|
+
onCalendarModeChange: (calenderMode: CalenderMode) => void;
|
|
10
|
+
timezone: Timezone | null;
|
|
11
|
+
onTimezoneChange: (timezone: Timezone) => void;
|
|
12
|
+
browserTimezone: string;
|
|
13
|
+
defaultCountryTimezone: Timezone;
|
|
14
|
+
timezoneCountriesCodes: string[];
|
|
15
|
+
}
|
|
16
|
+
export default function DateFilter({ title, dateRange, onDateRangeChange, calendarMode, onCalendarModeChange, timezone, browserTimezone, defaultCountryTimezone, onTimezoneChange, timezoneCountriesCodes, onConfirm, onClear, }: Readonly<DateFilterProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useState } from 'react';
|
|
3
|
+
import dayjs from 'dayjs';
|
|
4
|
+
import Box from '@mui/material/Box';
|
|
5
|
+
import ClickAwayListener from '@mui/material/ClickAwayListener';
|
|
6
|
+
import { calenderIcon, closeIcon, columnIcon, whiteFilterIcon } from '../../constants/index.js';
|
|
7
|
+
import { useTranslation } from 'react-i18next';
|
|
8
|
+
import { Dropdown, Item, Filter, OkayButton, CancelButton, Footer, TitleStyled, FilterHeader, FilterWrapper, SelectedDate } from './style';
|
|
9
|
+
import { Icon, RangeCalender } from '../index.js';
|
|
10
|
+
import { getDefaultDateRange } from '../../utils/index.js';
|
|
11
|
+
export default function DateFilter({ title = 'Date', dateRange, onDateRangeChange, calendarMode, onCalendarModeChange, timezone, browserTimezone, defaultCountryTimezone, onTimezoneChange, timezoneCountriesCodes = [], onConfirm, onClear, }) {
|
|
12
|
+
const { t } = useTranslation();
|
|
13
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
14
|
+
const open = Boolean(anchorEl);
|
|
15
|
+
const onOpen = (e) => setAnchorEl(e.currentTarget);
|
|
16
|
+
const onClose = () => setAnchorEl(null);
|
|
17
|
+
const onCancel = () => onClose();
|
|
18
|
+
const handleOkButtonClick = () => {
|
|
19
|
+
onClose();
|
|
20
|
+
onConfirm(dateRange);
|
|
21
|
+
};
|
|
22
|
+
const handleCalendarModeSwitch = useCallback((newMode) => onCalendarModeChange(newMode), [onCalendarModeChange]);
|
|
23
|
+
const getSelectedDateLabel = (dates) => {
|
|
24
|
+
if (!dates)
|
|
25
|
+
return '';
|
|
26
|
+
const [start, end] = dates;
|
|
27
|
+
const startLabel = dayjs(start).format('MMM D');
|
|
28
|
+
const endLabel = dayjs(end).format('MMM D');
|
|
29
|
+
return startLabel === endLabel ? startLabel : `${startLabel} - ${endLabel}`;
|
|
30
|
+
};
|
|
31
|
+
return (_jsx(ClickAwayListener, Object.assign({ onClickAway: onClose }, { children: _jsxs(Box, { children: [_jsxs(Box, Object.assign({ sx: { cursor: 'pointer', display: 'flex', alignItems: 'center', gap: '4px' }, onClick: onOpen }, { children: [title, dateRange ? (_jsxs(FilterWrapper, { children: [_jsx(Box, { component: "img", src: whiteFilterIcon, alt: "filter-icon", sx: { marginInlineEnd: '2px', height: 6 }, onClick: onOpen }), _jsx(Box, { component: "img", src: closeIcon, alt: "close-icon", onClick: onClear })] })) : (_jsx(Box, { component: "img", src: columnIcon, alt: "column-icon", sx: { cursor: 'pointer', marginTop: '2px' } }))] })), _jsxs(Dropdown, Object.assign({ open: open, anchorEl: anchorEl, placement: "bottom-start" }, { children: [_jsxs(Filter, { children: [_jsx(FilterHeader, { children: _jsx(TitleStyled, Object.assign({ component: "span" }, { children: t('filterBy') })) }), _jsx(Item, { children: _jsx(RangeCalender, { defaultDate: dateRange || getDefaultDateRange(0), onDateChange: onDateRangeChange, maxDateRange: 365, mode: calendarMode, onCalendarModeSwitch: handleCalendarModeSwitch, browserTimezone: browserTimezone, defaultCountryTimezone: defaultCountryTimezone, timezone: timezone, onChangeTimezone: onTimezoneChange, timezoneCountriesCodes: timezoneCountriesCodes, mainSx: { width: '100%' }, popperProps: { placement: 'right-start' }, renderCalendarButton: (isOpen, openCal) => (_jsxs(SelectedDate, Object.assign({ open: isOpen, onClick: openCal }, { children: [_jsx("span", { children: getSelectedDateLabel(dateRange) || 'Date' }), _jsx(Icon, { src: calenderIcon, alt: "selected", sx: { width: 16, height: 16 } })] }))) }, getSelectedDateLabel(dateRange)) }), dateRange && (_jsx(TitleStyled, Object.assign({ component: "span", sx: { color: '#1F88D0', padding: '4px 24px' }, onClick: () => onDateRangeChange(undefined) }, { children: "Clear" })))] }), _jsxs(Footer, { children: [_jsx(CancelButton, Object.assign({ onClick: onCancel }, { children: t('cancel') })), _jsx(OkayButton, Object.assign({ onClick: handleOkButtonClick }, { children: t('okay') }))] })] }))] }) })));
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DateFilter, type DateFilterProps } from './DateFilter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DateFilter } from './DateFilter';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Content: 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 Label: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
6
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
7
|
+
}, "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"> & {
|
|
8
|
+
component?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
9
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
10
|
+
export declare const Dropdown: import("@emotion/styled").StyledComponent<Omit<import("../Menu/Menu").MenuProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
11
|
+
export declare const Item: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
12
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
13
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
14
|
+
export declare const Footer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
15
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
16
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
17
|
+
export declare const OkayButton: import("@emotion/styled").StyledComponent<import("../Button/Button").ButtonI & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
18
|
+
export declare const CancelButton: import("@emotion/styled").StyledComponent<import("../Button/Button").ButtonI & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
19
|
+
export declare const Filter: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
20
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
21
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
22
|
+
export declare const TitleStyled: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
23
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
24
|
+
}, "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"> & {
|
|
25
|
+
component?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
26
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
27
|
+
export declare const FilterHeader: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
28
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
29
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
30
|
+
export declare const SelectedDate: import("@emotion/styled").StyledComponent<import("../Button/Button").ButtonI & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
31
|
+
open: boolean;
|
|
32
|
+
}, {}, {}>;
|
|
33
|
+
export declare const FilterWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
34
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
35
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import Box from '@mui/material/Box';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
import { Button, Menu, Text } from '../index.js';
|
|
4
|
+
export const Content = styled(Box)(() => ({
|
|
5
|
+
paddingBlock: '8px',
|
|
6
|
+
display: 'flex',
|
|
7
|
+
gap: '12px',
|
|
8
|
+
flexDirection: 'column',
|
|
9
|
+
}));
|
|
10
|
+
export const Label = styled(Text)(() => ({
|
|
11
|
+
fontSize: '11px',
|
|
12
|
+
}));
|
|
13
|
+
export const Dropdown = styled(Menu)(() => ({
|
|
14
|
+
marginTop: '8px',
|
|
15
|
+
marginBottom: '8px',
|
|
16
|
+
}));
|
|
17
|
+
export const Item = styled(Box)(() => ({
|
|
18
|
+
display: 'flex',
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
gap: '4px',
|
|
21
|
+
width: '100%',
|
|
22
|
+
paddingInline: '16px',
|
|
23
|
+
}));
|
|
24
|
+
export const Footer = styled(Box)(({ theme }) => ({
|
|
25
|
+
padding: '8px 16px',
|
|
26
|
+
display: 'flex',
|
|
27
|
+
gap: '8px',
|
|
28
|
+
justifyContent: 'flex-end',
|
|
29
|
+
position: 'sticky',
|
|
30
|
+
bottom: 0,
|
|
31
|
+
backgroundColor: 'white',
|
|
32
|
+
zIndex: 99999,
|
|
33
|
+
borderTop: `1px solid ${theme.palette.divider}`,
|
|
34
|
+
}));
|
|
35
|
+
export const OkayButton = styled(Button)(({ theme }) => ({
|
|
36
|
+
textTransform: 'capitalize',
|
|
37
|
+
minWidth: 'auto',
|
|
38
|
+
width: 70,
|
|
39
|
+
borderRadius: '4px',
|
|
40
|
+
border: `1px solid ${theme.palette.info.dark}`,
|
|
41
|
+
backgroundColor: theme.palette.info.dark,
|
|
42
|
+
fontWeight: 700,
|
|
43
|
+
fontSize: '11px',
|
|
44
|
+
color: theme.palette.common.white,
|
|
45
|
+
'&:hover': {
|
|
46
|
+
backgroundColor: theme.palette.info.dark,
|
|
47
|
+
},
|
|
48
|
+
'&.Mui-disabled': {
|
|
49
|
+
color: '#fff !important',
|
|
50
|
+
opacity: 0.5,
|
|
51
|
+
},
|
|
52
|
+
}));
|
|
53
|
+
export const CancelButton = styled(Button)(({ theme }) => ({
|
|
54
|
+
textTransform: 'capitalize',
|
|
55
|
+
minWidth: 'auto',
|
|
56
|
+
width: 70,
|
|
57
|
+
borderRadius: '4px',
|
|
58
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
59
|
+
backgroundColor: theme.palette.common.white,
|
|
60
|
+
fontWeight: 500,
|
|
61
|
+
fontSize: '11px',
|
|
62
|
+
color: theme.palette.text.primary,
|
|
63
|
+
'&:hover': {
|
|
64
|
+
background: 'transparent',
|
|
65
|
+
},
|
|
66
|
+
}));
|
|
67
|
+
export const Filter = styled(Box)(() => ({
|
|
68
|
+
display: 'flex',
|
|
69
|
+
flexDirection: 'column',
|
|
70
|
+
gap: '8px',
|
|
71
|
+
marginBottom: '8px',
|
|
72
|
+
}));
|
|
73
|
+
export const TitleStyled = styled(Label)(() => ({
|
|
74
|
+
fontSize: '11px',
|
|
75
|
+
fontWeight: 500,
|
|
76
|
+
color: '#8D8D94',
|
|
77
|
+
padding: '8px 16px',
|
|
78
|
+
}));
|
|
79
|
+
export const FilterHeader = styled(Box)(({ theme }) => ({
|
|
80
|
+
borderBlock: `1px solid ${theme.palette.divider}`,
|
|
81
|
+
display: 'flex',
|
|
82
|
+
justifyContent: 'space-between',
|
|
83
|
+
alignItems: 'center',
|
|
84
|
+
gap: '2px',
|
|
85
|
+
width: '100%',
|
|
86
|
+
}));
|
|
87
|
+
export const SelectedDate = styled(Button, { shouldForwardProp: (props) => props !== 'open' })(({ open, theme }) => (Object.assign({ color: theme.palette.text.primary, fontSize: '11px', fontWeight: 500, padding: theme.spacing(1), borderRadius: '4px', border: '1px solid', borderColor: theme.palette.divider, background: theme.palette.common.white, textTransform: 'none', width: '100%', height: 32, justifyContent: 'space-between', gap: '4px' }, (open && { border: '1px solid', borderColor: theme.palette.info.dark, boxShadow: theme.shadows[7] }))));
|
|
88
|
+
export const FilterWrapper = styled(Box)(({ theme }) => ({
|
|
89
|
+
background: theme.palette.grey[700],
|
|
90
|
+
width: 27,
|
|
91
|
+
height: 14,
|
|
92
|
+
display: 'inline-flex',
|
|
93
|
+
alignItems: 'center',
|
|
94
|
+
marginInlineStart: '4px',
|
|
95
|
+
borderRadius: '10px',
|
|
96
|
+
padding: '2px 6px',
|
|
97
|
+
img: {
|
|
98
|
+
cursor: 'pointer',
|
|
99
|
+
},
|
|
100
|
+
}));
|
|
@@ -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,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { BoxProps } from '@mui/material/Box';
|
|
2
|
+
interface SourceIconProps extends BoxProps {
|
|
2
3
|
source: string;
|
|
3
4
|
isTextShown?: boolean;
|
|
4
5
|
title?: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
export declare function SourceIcon({ source, isTextShown, title, width, height }: SourceIconProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
}
|
|
7
|
+
export declare function SourceIcon({ source, isTextShown, title, ...props }: SourceIconProps): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export {};
|
|
@@ -1,13 +1,29 @@
|
|
|
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
|
+
};
|
|
1
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
13
|
import camelCase from 'lodash/camelCase';
|
|
3
14
|
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import Box from '@mui/material/Box';
|
|
4
16
|
import Tooltip from '../../../Tooltip';
|
|
5
17
|
import { getPaymentMethodsIcon } from '../../../../constants/index.js';
|
|
6
|
-
import { StyledBadgeTextWrapper,
|
|
7
|
-
export function SourceIcon(
|
|
18
|
+
import { StyledBadgeTextWrapper, TextLabel } from '../style';
|
|
19
|
+
export function SourceIcon(_a) {
|
|
20
|
+
var { source, isTextShown, title } = _a, props = __rest(_a, ["source", "isTextShown", "title"]);
|
|
8
21
|
const { t } = useTranslation();
|
|
9
22
|
const ImageSrc = getPaymentMethodsIcon(source);
|
|
10
|
-
|
|
23
|
+
if (isTextShown) {
|
|
24
|
+
return (_jsx(Tooltip, Object.assign({ title: title }, { children: _jsx(StyledBadgeTextWrapper, Object.assign({ "data-testid": "SourceCell_BadgeTextWrapper" }, props, { children: _jsx(TextLabel, Object.assign({ "data-testid": "SourceCell_TextLabel", "data-source": source }, { children: t(camelCase(source)) })) })) })));
|
|
25
|
+
}
|
|
26
|
+
return (_jsx(Tooltip, Object.assign({ title: title }, { children: _jsx(Box, Object.assign({}, props, { component: "img", src: ImageSrc, alt: source, onError: (e) => {
|
|
11
27
|
e.currentTarget.src = getPaymentMethodsIcon('card');
|
|
12
28
|
} })) })));
|
|
13
29
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
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
|
-
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
3
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
6
4
|
hidden?: boolean | undefined;
|
|
7
5
|
color?: string | undefined;
|
|
@@ -267,6 +265,8 @@ export declare const PaymentSourcesContainer: import("@emotion/styled").StyledCo
|
|
|
267
265
|
sourcesCount: number;
|
|
268
266
|
}, {}, {}>;
|
|
269
267
|
export declare const TextLabel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
270
|
-
export declare const StyledBadgeTextWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").
|
|
268
|
+
export declare const StyledBadgeTextWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
269
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
270
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
271
271
|
export declare const SourceIconWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
272
272
|
export declare const CardNumber: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { styled } from '@mui/material';
|
|
1
|
+
import { Box, styled } from '@mui/material';
|
|
2
2
|
import { motion } from 'framer-motion';
|
|
3
3
|
export const StyledSourceCell = styled('span')(({ theme }) => ({
|
|
4
4
|
display: 'flex',
|
|
@@ -6,10 +6,6 @@ export const StyledSourceCell = styled('span')(({ theme }) => ({
|
|
|
6
6
|
justifyContent: 'flex-start',
|
|
7
7
|
gap: theme.spacing(1),
|
|
8
8
|
}));
|
|
9
|
-
export const StyledSourceImage = styled('img')(() => ({
|
|
10
|
-
maxWidth: '24px',
|
|
11
|
-
maxHeight: '16px',
|
|
12
|
-
}));
|
|
13
9
|
export const PaymentSourcesContainer = styled(motion.span)(({ theme, sourcesCount }) => ({
|
|
14
10
|
display: 'flex',
|
|
15
11
|
alignItems: 'center',
|
|
@@ -29,7 +25,7 @@ export const TextLabel = styled('span')(({ theme }) => ({
|
|
|
29
25
|
padding: '2px 0',
|
|
30
26
|
color: theme.palette.text.primary,
|
|
31
27
|
}));
|
|
32
|
-
export const StyledBadgeTextWrapper = styled(
|
|
28
|
+
export const StyledBadgeTextWrapper = styled(Box)(() => ({
|
|
33
29
|
display: 'flex',
|
|
34
30
|
alignItems: 'center',
|
|
35
31
|
justifyContent: 'center',
|
|
@@ -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 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 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 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 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 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 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,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { IVirtualTable } from '../../../types/index.js';
|
|
3
|
-
declare function VirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableMode, tableTitle, onStartDrag, isSheetView, isMinimized, }: Readonly<IVirtualTable>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function VirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableMode, tableTitle, onStartDrag, isSheetView, isMinimized, footerComponent, }: Readonly<IVirtualTable>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const _default: import("react").MemoExoticComponent<typeof VirtualTable>;
|
|
5
5
|
export default _default;
|
|
@@ -34,7 +34,7 @@ const createItemData = memoize((columns, isLoading, rows, rowProps, scrollToInde
|
|
|
34
34
|
areAllRowsLoaded,
|
|
35
35
|
isSheetView,
|
|
36
36
|
}));
|
|
37
|
-
function VirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableMode, tableTitle, onStartDrag, isSheetView = false, isMinimized, }) {
|
|
37
|
+
function VirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableMode, tableTitle, onStartDrag, isSheetView = false, isMinimized, footerComponent, }) {
|
|
38
38
|
var _a;
|
|
39
39
|
const theme = useTheme();
|
|
40
40
|
const onPointerDown = (e) => {
|
|
@@ -107,6 +107,6 @@ function VirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, showHeader,
|
|
|
107
107
|
// rows height + header height
|
|
108
108
|
, {
|
|
109
109
|
// rows height + header height
|
|
110
|
-
height: (itemsCount + 1) * tableRowHeight, sandboxMode: footerProps === null || footerProps === void 0 ? void 0 : footerProps.sandboxMode, "data-testid": "VirtualTable_TableLastItem" }))] }), _jsx(TableFooter, Object.assign({ "data-testid": "VirtualTable_TableFooter", showSeparator: true, showBackDrop: showBackDrop, onPointerDown: onPointerDown }, footerProps))] }));
|
|
110
|
+
height: (itemsCount + 1) * tableRowHeight, sandboxMode: footerProps === null || footerProps === void 0 ? void 0 : footerProps.sandboxMode, "data-testid": "VirtualTable_TableLastItem" }))] }), footerProps && (_jsx(TableFooter, Object.assign({ "data-testid": "VirtualTable_TableFooter", showSeparator: true, showBackDrop: showBackDrop, onPointerDown: onPointerDown }, footerProps))), footerComponent] }));
|
|
111
111
|
}
|
|
112
112
|
export default memo(VirtualTable);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TableFooterProps } from '../../../../types/index.js';
|
|
3
|
-
declare function TableFooter({ totalCount, showBackDrop, showSeparator, sandboxMode, maximized,
|
|
3
|
+
declare function TableFooter({ totalCount, showBackDrop, showSeparator, sandboxMode, maximized, ...other }: Readonly<TableFooterProps>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const _default: React.MemoExoticComponent<typeof TableFooter>;
|
|
5
5
|
export default _default;
|
|
@@ -15,17 +15,8 @@ import { useTranslation } from 'react-i18next';
|
|
|
15
15
|
import { formatNumber } from '../../../../utils/index.js';
|
|
16
16
|
import { StyledFooter, Label, Title, ValueWrapper, EngravingLine } from './style';
|
|
17
17
|
function TableFooter(_a) {
|
|
18
|
-
var { totalCount, showBackDrop = false, showSeparator, sandboxMode, maximized
|
|
18
|
+
var { totalCount, showBackDrop = false, showSeparator, sandboxMode, maximized } = _a, other = __rest(_a, ["totalCount", "showBackDrop", "showSeparator", "sandboxMode", "maximized"]);
|
|
19
19
|
const { t } = useTranslation();
|
|
20
|
-
|
|
21
|
-
// const max = 50000
|
|
22
|
-
// const average = 30000
|
|
23
|
-
// const sum = 100000
|
|
24
|
-
// const currency = 'SAR'
|
|
25
|
-
// const { integerAmount: minIntegerAmount, decimalAmount: minDecimalAmount } = formatAmount(min)
|
|
26
|
-
// const { integerAmount: maxIntegerAmount, decimalAmount: maxDecimalAmount } = formatAmount(max)
|
|
27
|
-
// const { integerAmount: averageIntegerAmount, decimalAmount: averageDecimalAmount } = formatAmount(average)
|
|
28
|
-
// const { integerAmount: sumIntegerAmount, decimalAmount: sumDecimalAmount } = formatAmount(sum)
|
|
29
|
-
return (_jsxs(StyledFooter, Object.assign({ component: "footer", "data-testid": "TableFooter", maximized: maximized !== null && maximized !== void 0 ? maximized : false, sandboxMode: sandboxMode, showBackDrop: showBackDrop, areTotalRowsNotFillingHeight: !!showSeparator }, other, { children: [showSeparator && _jsx(EngravingLine, {}), totalCount || totalCount === 0 ? (_jsxs(Label, Object.assign({ sx: { gap: '6px', cursor: 'text' } }, { children: [_jsx(Title, { children: t('count') }), _jsx(ValueWrapper, { children: formatNumber(totalCount || 0) })] }))) : null, children] })));
|
|
20
|
+
return (_jsxs(StyledFooter, Object.assign({ component: "footer", "data-testid": "TableFooter", maximized: maximized !== null && maximized !== void 0 ? maximized : false, sandboxMode: sandboxMode, showBackDrop: showBackDrop, areTotalRowsNotFillingHeight: !!showSeparator }, other, { children: [showSeparator && _jsx(EngravingLine, {}), totalCount || totalCount === 0 ? (_jsxs(Label, Object.assign({ sx: { gap: '6px', cursor: 'text' } }, { children: [_jsx(Title, { children: t('count') }), _jsx(ValueWrapper, { children: formatNumber(totalCount || 0) })] }))) : null] })));
|
|
30
21
|
}
|
|
31
22
|
export default React.memo(TableFooter);
|
package/build/types/table.d.ts
CHANGED
|
@@ -46,7 +46,6 @@ export interface TableFooterProps extends BoxProps {
|
|
|
46
46
|
showSeparator?: boolean;
|
|
47
47
|
sandboxMode?: boolean;
|
|
48
48
|
maximized?: boolean;
|
|
49
|
-
children?: React.ReactNode;
|
|
50
49
|
}
|
|
51
50
|
export interface TableChipProps {
|
|
52
51
|
onChipClick?: (rowIndex: number, columnIndex: number, event: React.MouseEvent, chipIndex: number, pinnedType?: 'start' | 'end') => void;
|
|
@@ -140,6 +139,7 @@ export interface IVirtualTable<R = any> {
|
|
|
140
139
|
onStartDrag?: DragControls['start'];
|
|
141
140
|
isSheetView?: boolean;
|
|
142
141
|
isMinimized?: boolean;
|
|
142
|
+
footerComponent?: React.ReactNode;
|
|
143
143
|
}
|
|
144
144
|
export type ColumnFilterValues = Record<string, boolean | string | string[] | Record<string, boolean> | Record<string, string> | {
|
|
145
145
|
phone: string;
|
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.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.290-test.1",
|
|
5
|
+
"testVersion": 1,
|
|
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
|
+
}
|