@tap-payments/os-micro-frontend-shared 0.0.169 → 0.0.171
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/Button/StyledButton/StyledButton.d.ts +10 -0
- package/build/components/Button/StyledButton/StyledButton.js +20 -0
- package/build/components/Button/StyledButton/index.d.ts +2 -0
- package/build/components/Button/StyledButton/index.js +2 -0
- package/build/components/Button/StyledButton/style.d.ts +5 -0
- package/build/components/Button/StyledButton/style.js +11 -0
- package/build/components/Button/index.d.ts +1 -0
- package/build/components/Button/index.js +1 -0
- package/build/components/FileUpload/FileUpload.js +5 -4
- package/build/components/StatusButton/constant.d.ts +0 -3
- package/build/components/StatusButton/constant.js +1 -4
- package/build/components/StatusButton/style.d.ts +1 -1
- package/build/components/TableHeader_V2/components/StatusButtons/constant.d.ts +0 -3
- package/build/components/TableHeader_V2/components/StatusButtons/constant.js +1 -4
- package/build/components/TableHeader_V2/components/StatusButtons/style.d.ts +1 -1
- package/build/components/TableHeader_V2/components/TableView/TableView.js +4 -3
- package/build/components/index.d.ts +1 -1
- package/build/components/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@mui/material';
|
|
3
|
+
export interface StyledButtonProps extends BoxProps {
|
|
4
|
+
title?: string;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare function StyledButton({ children, title, ...props }: StyledButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const _default: import("react").MemoExoticComponent<typeof StyledButton>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
13
|
+
import { memo } from 'react';
|
|
14
|
+
import { Button } from './style';
|
|
15
|
+
import Tooltip from '../../Tooltip';
|
|
16
|
+
function StyledButton(_a) {
|
|
17
|
+
var { children, title } = _a, props = __rest(_a, ["children", "title"]);
|
|
18
|
+
return (_jsx(Tooltip, Object.assign({ title: title }, { children: _jsx(Button, Object.assign({}, props, { children: children })) })));
|
|
19
|
+
}
|
|
20
|
+
export default memo(StyledButton);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StyledButtonProps } from './StyledButton';
|
|
3
|
+
export declare const Button: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
5
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Pick<StyledButtonProps, "isDisabled" | "isActive">, {}, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Box from '@mui/material/Box';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
export const Button = styled(Box)(({ isActive, isDisabled, theme }) => (Object.assign(Object.assign(Object.assign({ minWidth: 32, height: 32, width: 'fit-content', borderRadius: '4px', padding: '9px 8px', display: 'flex', alignItems: 'center', justifyContent: 'center', border: `1px solid ${theme.palette.divider}`, cursor: 'pointer' }, (isActive && {
|
|
4
|
+
boxShadow: theme.shadows[7],
|
|
5
|
+
borderColor: theme.palette.info.dark,
|
|
6
|
+
})), (isDisabled && {
|
|
7
|
+
opacity: 0.5,
|
|
8
|
+
pointerEvents: 'none',
|
|
9
|
+
})), { img: {
|
|
10
|
+
filter: 'brightness(0) invert(0)',
|
|
11
|
+
} })));
|
|
@@ -3,11 +3,12 @@ import { memo, useEffect, useMemo, useState } from 'react';
|
|
|
3
3
|
import Box from '@mui/material/Box';
|
|
4
4
|
import { useDropzone } from 'react-dropzone';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { blueCircleCheckIcon, redVerifyIcon, uploadBlueIcon } from '../../constants/index.js';
|
|
6
|
+
import { blueCircleCheckIcon, redVerifyIcon, trashBinIcon, uploadBlueIcon } from '../../constants/index.js';
|
|
7
7
|
import { readableFileSize } from '../../utils/index.js';
|
|
8
8
|
import { Wrapper, Title, Format, FileUploader, Content, Upload, TextWrapper, Maximum, UploadAgain, StyledButton, SendBulkContainer } from './style';
|
|
9
9
|
import CircularProgressWithLabel from '../CircularProgressWithLabel';
|
|
10
|
-
import
|
|
10
|
+
import Button from '../Button/StyledButton';
|
|
11
|
+
import Icon from '../Icon';
|
|
11
12
|
function FileUpload({ accept, footer, options, isCreateLoading, progress, error, subtitleComponent, isSuccess: isUploadSuccess, onConfirm, isSendDisabled, }) {
|
|
12
13
|
const { t } = useTranslation();
|
|
13
14
|
const [selectedFiles, setSelectedFiles] = useState([]);
|
|
@@ -26,9 +27,9 @@ function FileUpload({ accept, footer, options, isCreateLoading, progress, error,
|
|
|
26
27
|
return error;
|
|
27
28
|
}, [isDragReject, error, fileRejections]);
|
|
28
29
|
if (isUploadSuccess && selectedFiles.length && !isCreateLoading) {
|
|
29
|
-
return (_jsxs(Wrapper, { children: [_jsxs(Box, { children: [_jsx(Title, { children: "File uploaded" }), subtitleComponent] }), _jsx(FileUploader, { children: _jsxs(Content, { children: [isUploadSuccess && _jsx(Box, { component: "img", src: blueCircleCheckIcon, width: 56, height: 56 }), _jsxs(TextWrapper, Object.assign({ sx: { fontWeight: 600 } }, { children: [_jsx(Box, { children: selectedFiles[0].name }), _jsx(Maximum, { children: readableFileSize(selectedFiles[0].size) })] }))] }) }), _jsxs(SendBulkContainer, { children: [_jsx(
|
|
30
|
+
return (_jsxs(Wrapper, { children: [_jsxs(Box, { children: [_jsx(Title, { children: "File uploaded" }), subtitleComponent] }), _jsx(FileUploader, { children: _jsxs(Content, { children: [isUploadSuccess && _jsx(Box, { component: "img", src: blueCircleCheckIcon, width: 56, height: 56 }), _jsxs(TextWrapper, Object.assign({ sx: { fontWeight: 600 } }, { children: [_jsx(Box, { children: selectedFiles[0].name }), _jsx(Maximum, { children: readableFileSize(selectedFiles[0].size) })] }))] }) }), _jsxs(SendBulkContainer, { children: [_jsx(Button, Object.assign({ onClick: () => {
|
|
30
31
|
setSelectedFiles([]);
|
|
31
|
-
},
|
|
32
|
+
} }, { children: _jsx(Icon, { src: trashBinIcon, alt: "delete", sx: { width: 14, height: 14 } }) })), _jsx(StyledButton, Object.assign({ disabled: isSendDisabled, onClick: () => {
|
|
32
33
|
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(selectedFiles);
|
|
33
34
|
} }, { children: "Bulk Send" }))] })] }));
|
|
34
35
|
}
|
|
@@ -5,7 +5,6 @@ export declare const statusButtonIcons: {
|
|
|
5
5
|
cancelled: string;
|
|
6
6
|
reversed: string;
|
|
7
7
|
reports: string;
|
|
8
|
-
view: string;
|
|
9
8
|
search: string;
|
|
10
9
|
chevronDown: string;
|
|
11
10
|
unAuthorized: string;
|
|
@@ -17,8 +16,6 @@ export declare const statusButtonIcons: {
|
|
|
17
16
|
closedFlag: string;
|
|
18
17
|
unauthenticated: string;
|
|
19
18
|
authenticated: string;
|
|
20
|
-
textView: string;
|
|
21
19
|
paidOut: string;
|
|
22
20
|
scheduled: string;
|
|
23
|
-
trashBin: string;
|
|
24
21
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon,
|
|
1
|
+
import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, searchIcon, chevronDownIcon, unAuthorizedIcon, settlementInitiatedIcon, unCapturedIcon, capturedIcon, authorizedIcon, openFlagIcon, closedFlagIcon, reverseActionIcon, authenticatedIcon, unauthenticatedIcon, paidOutFilterIcon, scheduledFilterIcon, } from '../../constants/index.js';
|
|
2
2
|
export const statusButtonIcons = {
|
|
3
3
|
inProgress: initiatedIcon,
|
|
4
4
|
initiated: initiatedIcon,
|
|
@@ -6,7 +6,6 @@ export const statusButtonIcons = {
|
|
|
6
6
|
cancelled: cancelledIcon,
|
|
7
7
|
reversed: reverseActionIcon,
|
|
8
8
|
reports: reportsIcon,
|
|
9
|
-
view: viewIcon,
|
|
10
9
|
search: searchIcon,
|
|
11
10
|
chevronDown: chevronDownIcon,
|
|
12
11
|
unAuthorized: unAuthorizedIcon,
|
|
@@ -18,8 +17,6 @@ export const statusButtonIcons = {
|
|
|
18
17
|
closedFlag: closedFlagIcon,
|
|
19
18
|
unauthenticated: unauthenticatedIcon,
|
|
20
19
|
authenticated: authenticatedIcon,
|
|
21
|
-
textView: longWordsIcon,
|
|
22
20
|
paidOut: paidOutFilterIcon,
|
|
23
21
|
scheduled: scheduledFilterIcon,
|
|
24
|
-
trashBin: trashBinIcon,
|
|
25
22
|
};
|
|
@@ -20,7 +20,7 @@ export declare const CountBadge: import("@emotion/styled").StyledComponent<impor
|
|
|
20
20
|
}, {}, {}>;
|
|
21
21
|
export declare const StatusIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
22
22
|
variant: StatusButtonVariant;
|
|
23
|
-
icon?: "initiated" | "captured" | "unCaptured" | "inProgress" | "abandoned" | "cancelled" | "reversed" | "authorized" | "paidOut" | "unauthenticated" | "authenticated" | "scheduled" | "unSettled" | "search" | "
|
|
23
|
+
icon?: "initiated" | "captured" | "unCaptured" | "inProgress" | "abandoned" | "cancelled" | "reversed" | "authorized" | "paidOut" | "unauthenticated" | "authenticated" | "scheduled" | "unSettled" | "search" | "reports" | "chevronDown" | "unAuthorized" | "openFlag" | "closedFlag" | undefined;
|
|
24
24
|
}, React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
25
25
|
export declare const StyledFilterName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
26
26
|
export declare const StyledDropdown: import("@emotion/styled").StyledComponent<import("../DropdownMenu").IProps & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
|
|
@@ -5,7 +5,6 @@ export declare const statusButtonIcons: {
|
|
|
5
5
|
cancelled: string;
|
|
6
6
|
reversed: string;
|
|
7
7
|
reports: string;
|
|
8
|
-
view: string;
|
|
9
8
|
search: string;
|
|
10
9
|
chevronDown: string;
|
|
11
10
|
unAuthorized: string;
|
|
@@ -17,8 +16,6 @@ export declare const statusButtonIcons: {
|
|
|
17
16
|
closedFlag: string;
|
|
18
17
|
unauthenticated: string;
|
|
19
18
|
authenticated: string;
|
|
20
|
-
textView: string;
|
|
21
19
|
paidOut: string;
|
|
22
20
|
scheduled: string;
|
|
23
|
-
trashBin: string;
|
|
24
21
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon,
|
|
1
|
+
import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, searchIcon, chevronDownIcon, unAuthorizedIcon, settlementInitiatedIcon, unCapturedIcon, capturedIcon, authorizedIcon, openFlagIcon, closedFlagIcon, reverseActionIcon, authenticatedIcon, unauthenticatedIcon, paidOutFilterIcon, scheduledFilterIcon, } from '../../../../constants/index.js';
|
|
2
2
|
export const statusButtonIcons = {
|
|
3
3
|
inProgress: initiatedIcon,
|
|
4
4
|
initiated: initiatedIcon,
|
|
@@ -6,7 +6,6 @@ export const statusButtonIcons = {
|
|
|
6
6
|
cancelled: cancelledIcon,
|
|
7
7
|
reversed: reverseActionIcon,
|
|
8
8
|
reports: reportsIcon,
|
|
9
|
-
view: viewIcon,
|
|
10
9
|
search: searchIcon,
|
|
11
10
|
chevronDown: chevronDownIcon,
|
|
12
11
|
unAuthorized: unAuthorizedIcon,
|
|
@@ -18,8 +17,6 @@ export const statusButtonIcons = {
|
|
|
18
17
|
closedFlag: closedFlagIcon,
|
|
19
18
|
unauthenticated: unauthenticatedIcon,
|
|
20
19
|
authenticated: authenticatedIcon,
|
|
21
|
-
textView: longWordsIcon,
|
|
22
20
|
paidOut: paidOutFilterIcon,
|
|
23
21
|
scheduled: scheduledFilterIcon,
|
|
24
|
-
trashBin: trashBinIcon,
|
|
25
22
|
};
|
|
@@ -20,7 +20,7 @@ export declare const CountBadge: import("@emotion/styled").StyledComponent<impor
|
|
|
20
20
|
}, {}, {}>;
|
|
21
21
|
export declare const StyledStatusIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
22
22
|
variant: StatusButtonVariant;
|
|
23
|
-
icon?: "initiated" | "captured" | "unCaptured" | "inProgress" | "abandoned" | "cancelled" | "reversed" | "authorized" | "paidOut" | "unauthenticated" | "authenticated" | "scheduled" | "unSettled" | "search" | "
|
|
23
|
+
icon?: "initiated" | "captured" | "unCaptured" | "inProgress" | "abandoned" | "cancelled" | "reversed" | "authorized" | "paidOut" | "unauthenticated" | "authenticated" | "scheduled" | "unSettled" | "search" | "reports" | "chevronDown" | "unAuthorized" | "openFlag" | "closedFlag" | undefined;
|
|
24
24
|
}, React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
25
25
|
export declare const StyledFilterName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
26
26
|
export declare const StyledDropdown: import("@emotion/styled").StyledComponent<import("../../..").IProps & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
|
|
@@ -2,12 +2,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { memo, useState } from 'react';
|
|
3
3
|
import { Box, ClickAwayListener } from '@mui/material';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import ExportButton from '../../../ExportButton';
|
|
6
5
|
import Tooltip from '../../../Tooltip';
|
|
7
|
-
import { closeXIcon } from '../../../../constants/index.js';
|
|
6
|
+
import { closeXIcon, viewIcon } from '../../../../constants/index.js';
|
|
8
7
|
import CustomViews from './CustomViews';
|
|
9
8
|
import DefaultViews from './DefaultViews';
|
|
10
9
|
import { ButtonStyled, ViewWrapper } from './style';
|
|
10
|
+
import { StyledButton } from '../../../Button';
|
|
11
|
+
import Icon from '../../../Icon';
|
|
11
12
|
function TableView({ onViewChange, setIsViewVisible, setTableViews, tableViews, resetTableViews }) {
|
|
12
13
|
const [anchorViewEl, setAnchorViewEl] = useState(null);
|
|
13
14
|
const [defaultViewEl, setDefaultViewElement] = useState(null);
|
|
@@ -36,7 +37,7 @@ function TableView({ onViewChange, setIsViewVisible, setTableViews, tableViews,
|
|
|
36
37
|
closeViewDropdown();
|
|
37
38
|
};
|
|
38
39
|
if (!anchorViewEl) {
|
|
39
|
-
return (_jsx(Tooltip, Object.assign({ title: t('tableView'), "data-testid": "TableView_no_anchorViewEl" }, { children: _jsx(Box, { children: _jsx(
|
|
40
|
+
return (_jsx(Tooltip, Object.assign({ title: t('tableView'), "data-testid": "TableView_no_anchorViewEl" }, { children: _jsx(Box, { children: _jsx(StyledButton, Object.assign({ onClick: onViewButtonClick, "data-testid": "TableView_no_anchorViewEl_button" }, { children: _jsx(Icon, { src: viewIcon, alt: "view-icon", sx: { width: 14, height: 14 } }) })) }) })));
|
|
40
41
|
}
|
|
41
42
|
return (_jsx(ClickAwayListener, Object.assign({ onClickAway: closeViewDropdown }, { children: _jsxs(ViewWrapper, Object.assign({ "data-testid": "TableView" }, { children: [selectedViewInfo.id === 'custom' && (_jsx(CustomViews, { tableViews: tableViews, setTableViews: setTableViews, anchorEl: customViewEl, open: Boolean(customViewEl), onSelect: (e) => {
|
|
42
43
|
setCustomViewElement(customViewEl ? null : e.currentTarget);
|
|
@@ -3,7 +3,7 @@ export { default as ActionMenu, ActionMenuDropDown, ActionMenuItem, type ActionM
|
|
|
3
3
|
export { default as ActivityAreaChart, type ActivityAreaChartProps, type ChartDataPoint, ChartTooltip, type ChartTooltipProps, LoadingChart, type PayloadItem, } from './ActivityAreaChart';
|
|
4
4
|
export { default as AppWindowWrapper, type AccountHeaderProps, AccountHeaderTitle, AppWindow, type AccountHeaderTitleProps, type AppWindowProps, type WindowProps, AppWindowContext, AppWindowContextProvider, LEFT_SIDEBAR, RIGHT_SIDEBAR, VIEWER_HEIGHT, VIEWER_WIDTH, animationDuration, StyledFooter, StyledHideButton, StyledMenuLink, StyledSubmitButton, SubmitButtonWrapper, } from './AppWindowWrapper';
|
|
5
5
|
export { default as BackgroundAnimation, type BlobGradient, type Blob } from './BackgroundAnimation';
|
|
6
|
-
export { default as Button, PlusButton } from './Button';
|
|
6
|
+
export { default as Button, PlusButton, StyledButton } from './Button';
|
|
7
7
|
export { default as Calender } from './Calender';
|
|
8
8
|
export { default as Timepicker } from './Timepicker';
|
|
9
9
|
export { default as CardEmptyState, type CardEmptyStateProps } from './CardEmptyState';
|
|
@@ -3,7 +3,7 @@ export { default as ActionMenu, ActionMenuDropDown, ActionMenuItem } from './Act
|
|
|
3
3
|
export { default as ActivityAreaChart, ChartTooltip, LoadingChart, } from './ActivityAreaChart';
|
|
4
4
|
export { default as AppWindowWrapper, AccountHeaderTitle, AppWindow, AppWindowContext, AppWindowContextProvider, LEFT_SIDEBAR, RIGHT_SIDEBAR, VIEWER_HEIGHT, VIEWER_WIDTH, animationDuration, StyledFooter, StyledHideButton, StyledMenuLink, StyledSubmitButton, SubmitButtonWrapper, } from './AppWindowWrapper';
|
|
5
5
|
export { default as BackgroundAnimation } from './BackgroundAnimation';
|
|
6
|
-
export { default as Button, PlusButton } from './Button';
|
|
6
|
+
export { default as Button, PlusButton, StyledButton } from './Button';
|
|
7
7
|
export { default as Calender } from './Calender';
|
|
8
8
|
export { default as Timepicker } from './Timepicker';
|
|
9
9
|
export { default as CardEmptyState } from './CardEmptyState';
|
package/package.json
CHANGED