@tap-payments/os-micro-frontend-shared 0.0.168 → 0.0.170
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 +9 -0
- package/build/components/Button/StyledButton/StyledButton.js +19 -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 +9 -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 -2
- package/build/components/StatusButton/constant.js +1 -3
- package/build/components/StatusButton/style.d.ts +1 -1
- package/build/components/TableHeader_V2/components/StatusButtons/constant.d.ts +0 -2
- package/build/components/TableHeader_V2/components/StatusButtons/constant.js +1 -3
- 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/build/constants/assets.d.ts +2 -0
- package/build/constants/assets.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@mui/material';
|
|
3
|
+
export interface StyledButtonProps extends BoxProps {
|
|
4
|
+
isActive?: boolean;
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare function StyledButton({ children, ...props }: StyledButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const _default: import("react").MemoExoticComponent<typeof StyledButton>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
function StyledButton(_a) {
|
|
16
|
+
var { children } = _a, props = __rest(_a, ["children"]);
|
|
17
|
+
return _jsx(Button, Object.assign({}, props, { children: children }));
|
|
18
|
+
}
|
|
19
|
+
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,9 @@
|
|
|
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({ 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
|
+
}))));
|
|
@@ -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
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, viewIcon, searchIcon, chevronDownIcon, unAuthorizedIcon, settlementInitiatedIcon, unCapturedIcon, capturedIcon, authorizedIcon, openFlagIcon, closedFlagIcon, reverseActionIcon, authenticatedIcon, unauthenticatedIcon,
|
|
1
|
+
import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, viewIcon, 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,
|
|
@@ -18,8 +18,6 @@ export const statusButtonIcons = {
|
|
|
18
18
|
closedFlag: closedFlagIcon,
|
|
19
19
|
unauthenticated: unauthenticatedIcon,
|
|
20
20
|
authenticated: authenticatedIcon,
|
|
21
|
-
textView: longWordsIcon,
|
|
22
21
|
paidOut: paidOutFilterIcon,
|
|
23
22
|
scheduled: scheduledFilterIcon,
|
|
24
|
-
trashBin: trashBinIcon,
|
|
25
23
|
};
|
|
@@ -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" | "view" | "reports" | "chevronDown" | "unAuthorized" | "openFlag" | "closedFlag" |
|
|
23
|
+
icon?: "initiated" | "captured" | "unCaptured" | "inProgress" | "abandoned" | "cancelled" | "reversed" | "authorized" | "paidOut" | "unauthenticated" | "authenticated" | "scheduled" | "unSettled" | "search" | "view" | "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>, {}, {}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, viewIcon, searchIcon, chevronDownIcon, unAuthorizedIcon, settlementInitiatedIcon, unCapturedIcon, capturedIcon, authorizedIcon, openFlagIcon, closedFlagIcon, reverseActionIcon, authenticatedIcon, unauthenticatedIcon,
|
|
1
|
+
import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, viewIcon, 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,
|
|
@@ -18,8 +18,6 @@ export const statusButtonIcons = {
|
|
|
18
18
|
closedFlag: closedFlagIcon,
|
|
19
19
|
unauthenticated: unauthenticatedIcon,
|
|
20
20
|
authenticated: authenticatedIcon,
|
|
21
|
-
textView: longWordsIcon,
|
|
22
21
|
paidOut: paidOutFilterIcon,
|
|
23
22
|
scheduled: scheduledFilterIcon,
|
|
24
|
-
trashBin: trashBinIcon,
|
|
25
23
|
};
|
|
@@ -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" | "view" | "reports" | "chevronDown" | "unAuthorized" | "openFlag" | "closedFlag" |
|
|
23
|
+
icon?: "initiated" | "captured" | "unCaptured" | "inProgress" | "abandoned" | "cancelled" | "reversed" | "authorized" | "paidOut" | "unauthenticated" | "authenticated" | "scheduled" | "unSettled" | "search" | "view" | "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';
|
|
@@ -489,5 +489,7 @@ export declare const terminalDeviceFrame: string;
|
|
|
489
489
|
export declare const blackBrushIcon: string;
|
|
490
490
|
export declare const mutedOutlinedCheckIcon: string;
|
|
491
491
|
export declare const outlinedPlatformIcon: string;
|
|
492
|
+
export declare const navigationPointerBlack: string;
|
|
493
|
+
export declare const addIconWhite: string;
|
|
492
494
|
export declare const greyUpArrowIcon: string;
|
|
493
495
|
export declare const greyDownArrowIcon: string;
|
|
@@ -493,5 +493,7 @@ export const terminalDeviceFrame = `${lightUrl}/terminalDeviceFrame.svg`;
|
|
|
493
493
|
export const blackBrushIcon = `${lightUrl}/blackBrushIcon.svg`;
|
|
494
494
|
export const mutedOutlinedCheckIcon = `${lightUrl}/mutedOutlinedCheckIcon.svg`;
|
|
495
495
|
export const outlinedPlatformIcon = `${lightUrl}/outlinedPlatformIcon.svg`;
|
|
496
|
+
export const navigationPointerBlack = `${lightUrl}/navigationPointerBlack.svg`;
|
|
497
|
+
export const addIconWhite = `${lightUrl}/addIconWhite.svg`;
|
|
496
498
|
export const greyUpArrowIcon = `${lightUrl}/greyUpArrow.svg`;
|
|
497
499
|
export const greyDownArrowIcon = `${lightUrl}/greyDownArrow.svg`;
|
package/package.json
CHANGED