@tap-payments/os-micro-frontend-shared 0.1.64-test.4 → 0.1.65-test.1-test.2
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/LICENSE +21 -21
- package/README.md +12 -12
- package/build/components/ColorPicker/ColorPicker.d.ts +10 -0
- package/build/components/ColorPicker/ColorPicker.js +59 -0
- package/build/components/ColorPicker/index.d.ts +2 -0
- package/build/components/ColorPicker/index.js +2 -0
- package/build/components/ColorPicker/style.d.ts +14 -0
- package/build/components/ColorPicker/style.js +85 -0
- package/build/components/FileUploader/FileUploader.d.ts +1 -1
- package/build/components/FileUploader/FileUploader.js +3 -3
- package/build/components/FileUploader/type.d.ts +5 -0
- package/build/components/FilteredIds/FilteredIds.js +1 -1
- package/build/components/FilteredIds/style.d.ts +1 -0
- package/build/components/FilteredIds/style.js +5 -4
- package/build/components/TableCells/CustomCells/BrandsCell/BrandsCell.js +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useSynchronizedScroll.js +0 -2
- package/build/components/index.d.ts +1 -0
- package/build/components/index.js +1 -0
- package/build/constants/assets.d.ts +9 -0
- package/build/constants/assets.js +9 -0
- package/build/constants/table/cell/merchantsTableCellWidth.d.ts +12 -17
- package/build/constants/table/cell/merchantsTableCellWidth.js +12 -17
- package/package.json +4 -2
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Tap Payments
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Tap Payments
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# os-micro-frontend-shared
|
|
2
|
-
|
|
3
|
-
## Publishing Workflow
|
|
4
|
-
|
|
5
|
-
1. Update version in package.json
|
|
6
|
-
2. Commit changes
|
|
7
|
-
3. Create and push a tag:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm version patch # or minor, major
|
|
11
|
-
git push origin main --tags
|
|
12
|
-
```
|
|
1
|
+
# os-micro-frontend-shared
|
|
2
|
+
|
|
3
|
+
## Publishing Workflow
|
|
4
|
+
|
|
5
|
+
1. Update version in package.json
|
|
6
|
+
2. Commit changes
|
|
7
|
+
3. Create and push a tag:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm version patch # or minor, major
|
|
11
|
+
git push origin main --tags
|
|
12
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type SxProps } from '@mui/material/styles';
|
|
2
|
+
type ColorPickerProps = {
|
|
3
|
+
id: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
onChange: (value: string) => void;
|
|
6
|
+
onReset?: () => void;
|
|
7
|
+
sx?: SxProps;
|
|
8
|
+
};
|
|
9
|
+
declare const ColorPicker: ({ id, value, onChange, onReset, sx }: ColorPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default ColorPicker;
|
|
@@ -0,0 +1,59 @@
|
|
|
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";
|
|
13
|
+
import { useCallback, useRef, useState } from 'react';
|
|
14
|
+
import { RgbaColorPicker } from 'react-colorful';
|
|
15
|
+
import { useTranslation } from 'react-i18next';
|
|
16
|
+
import Color from 'color';
|
|
17
|
+
import Box from '@mui/material/Box';
|
|
18
|
+
import ClickAwayListener from '@mui/material/ClickAwayListener';
|
|
19
|
+
import Divider from '@mui/material/Divider';
|
|
20
|
+
import Popper from '@mui/material/Popper';
|
|
21
|
+
import Stack from '@mui/material/Stack';
|
|
22
|
+
import Typography from '@mui/material/Typography';
|
|
23
|
+
import { CancelButton, ConfirmButton, Footer, StyledCloseButtonWrapper, StyledColorWidgetWrapper } from './style';
|
|
24
|
+
import { closeXIcon } from '../../constants/index.js';
|
|
25
|
+
const hexa2Rgba = (value) => {
|
|
26
|
+
const colorInstance = Color(value).rgb();
|
|
27
|
+
const { r, g, b, alpha = 1 } = colorInstance.object();
|
|
28
|
+
return {
|
|
29
|
+
value: { r, g, b, alpha },
|
|
30
|
+
stringified: `rgba(${r},${g},${b},${alpha})`,
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
const rgba2Hexa = (value) => Color(value).hexa();
|
|
34
|
+
const ColorPicker = ({ id, value = '#ffffff', onChange, onReset, sx }) => {
|
|
35
|
+
const { t } = useTranslation();
|
|
36
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
37
|
+
const rootRef = useRef(null);
|
|
38
|
+
const [color, setColor] = useState(() => {
|
|
39
|
+
const _a = hexa2Rgba(value).value, { alpha: a } = _a, rest = __rest(_a, ["alpha"]);
|
|
40
|
+
return Object.assign(Object.assign({}, rest), { a });
|
|
41
|
+
});
|
|
42
|
+
const handleOpen = useCallback(() => {
|
|
43
|
+
setAnchorEl(rootRef.current);
|
|
44
|
+
const _a = hexa2Rgba(value).value, { alpha: a } = _a, rest = __rest(_a, ["alpha"]);
|
|
45
|
+
setColor(Object.assign(Object.assign({}, rest), { a }));
|
|
46
|
+
}, [value]);
|
|
47
|
+
const handleCancel = useCallback(() => {
|
|
48
|
+
const _a = hexa2Rgba(value).value, { alpha: a } = _a, rest = __rest(_a, ["alpha"]);
|
|
49
|
+
setColor(Object.assign(Object.assign({}, rest), { a }));
|
|
50
|
+
setAnchorEl(null);
|
|
51
|
+
}, [value]);
|
|
52
|
+
const handleConfirm = useCallback(() => {
|
|
53
|
+
const { a: alpha } = color, rest = __rest(color, ["a"]);
|
|
54
|
+
onChange(rgba2Hexa(Object.assign(Object.assign({}, rest), { alpha })));
|
|
55
|
+
setAnchorEl(null);
|
|
56
|
+
}, [onChange, color]);
|
|
57
|
+
return (_jsx(ClickAwayListener, Object.assign({ onClickAway: () => setAnchorEl(null) }, { children: _jsxs(Stack, Object.assign({ ref: rootRef, bgcolor: "grey.400", borderRadius: "4px", p: "4px", pr: "12px", direction: "row", justifyContent: "space-between", spacing: 1, alignItems: "center", className: "color-picker" }, { children: [_jsxs(Stack, Object.assign({ sx: sx, direction: "row", spacing: 1, alignItems: "center", className: "color-picker__controls-wrapper" }, { children: [_jsx(Box, { borderRadius: "5px", width: 32, height: 32, sx: { backgroundColor: value }, className: "color-picker__viewer" }), _jsxs(Box, Object.assign({ className: "color-picker__actions-wrapper" }, { children: [_jsx(Typography, Object.assign({ className: "color-picker__label", fontWeight: 500, fontSize: 9, color: "text.primary", textTransform: "uppercase" }, { children: value })), _jsx(Typography, Object.assign({ className: "color-picker__edit-btn", role: "button", onClick: handleOpen, htmlFor: id, fontWeight: 500, fontSize: 9, color: "info.dark", component: "label", sx: { textDecoration: 'underline', cursor: 'pointer' } }, { children: "Edit" }))] }))] })), _jsx(StyledCloseButtonWrapper, Object.assign({ className: "color-picker__close-btn", type: "button", onClick: onReset }, { children: _jsx(Box, { component: "img", src: closeXIcon, width: 10, height: 10 }) })), _jsx(Popper, Object.assign({ anchorEl: anchorEl, open: !!anchorEl, placement: "top" }, { children: _jsxs(StyledColorWidgetWrapper, Object.assign({ className: "color-picker__widget" }, { children: [_jsx(RgbaColorPicker, { color: color, onChange: setColor }), _jsx(Divider, { sx: { my: '12px' } }), _jsxs(Footer, Object.assign({ className: "color-picker__widget-actions" }, { children: [_jsx(CancelButton, Object.assign({ className: "color-picker__widget-actions__cancel", onClick: handleCancel }, { children: t('cancel') })), _jsx(ConfirmButton, Object.assign({ className: "color-picker__widget-actions__confirm", onClick: handleConfirm }, { children: t('okay') }))] }))] })) }))] })) })));
|
|
58
|
+
};
|
|
59
|
+
export default ColorPicker;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledCloseButtonWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
3
|
+
export declare const StyledColorWidgetWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").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").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
6
|
+
export declare const Footer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
8
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
9
|
+
export declare const ConfirmButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
10
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
11
|
+
}, "disabled" | "style" | "color" | "className" | "classes" | "tabIndex" | "children" | "sx" | "variant" | "size" | "fullWidth" | "href" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
12
|
+
export declare const CancelButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
13
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
14
|
+
}, "disabled" | "style" | "color" | "className" | "classes" | "tabIndex" | "children" | "sx" | "variant" | "size" | "fullWidth" | "href" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Box, Button } from '@mui/material';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
export const StyledCloseButtonWrapper = styled('button')({
|
|
4
|
+
background: 'transparent',
|
|
5
|
+
border: 'none',
|
|
6
|
+
padding: 0,
|
|
7
|
+
margin: 0,
|
|
8
|
+
cursor: 'pointer',
|
|
9
|
+
width: 10,
|
|
10
|
+
height: 10,
|
|
11
|
+
display: 'flex',
|
|
12
|
+
justifyContent: 'center',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
});
|
|
15
|
+
export const StyledColorWidgetWrapper = styled(Box)(({ theme }) => ({
|
|
16
|
+
boxShadow: '0px 8px 30px rgba(0, 0, 0, 0.16)',
|
|
17
|
+
minWidth: 264,
|
|
18
|
+
backgroundColor: '#ffffff',
|
|
19
|
+
padding: '12px',
|
|
20
|
+
borderRadius: theme.spacing(1),
|
|
21
|
+
'& .react-colorful': {
|
|
22
|
+
width: '100%',
|
|
23
|
+
'&__saturation': {
|
|
24
|
+
minHeight: 152,
|
|
25
|
+
borderRadius: '4px',
|
|
26
|
+
marginBottom: theme.spacing(2),
|
|
27
|
+
border: 0,
|
|
28
|
+
'&-pointer': {
|
|
29
|
+
width: 13,
|
|
30
|
+
height: 13,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
'&__hue': {
|
|
34
|
+
marginBottom: theme.spacing(2),
|
|
35
|
+
borderRadius: '4px',
|
|
36
|
+
height: '16px',
|
|
37
|
+
'&-pointer': {
|
|
38
|
+
width: 10,
|
|
39
|
+
height: 10,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
'&__alpha': {
|
|
43
|
+
border: 0,
|
|
44
|
+
borderRadius: '4px',
|
|
45
|
+
height: '16px',
|
|
46
|
+
'&-pointer': {
|
|
47
|
+
width: 10,
|
|
48
|
+
height: 10,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
}));
|
|
53
|
+
export const Footer = styled(Box)(() => ({
|
|
54
|
+
display: 'flex',
|
|
55
|
+
gap: '8px',
|
|
56
|
+
justifyContent: 'flex-end',
|
|
57
|
+
}));
|
|
58
|
+
export const ConfirmButton = styled(Button)(({ theme }) => ({
|
|
59
|
+
textTransform: 'capitalize',
|
|
60
|
+
minWidth: 'auto',
|
|
61
|
+
width: 74,
|
|
62
|
+
borderRadius: '4px',
|
|
63
|
+
border: `1px solid ${theme.palette.info.dark}`,
|
|
64
|
+
backgroundColor: theme.palette.info.dark,
|
|
65
|
+
fontWeight: 700,
|
|
66
|
+
fontSize: '11px',
|
|
67
|
+
color: theme.palette.common.white,
|
|
68
|
+
'&:hover': {
|
|
69
|
+
backgroundColor: theme.palette.info.dark,
|
|
70
|
+
},
|
|
71
|
+
}));
|
|
72
|
+
export const CancelButton = styled(Button)(({ theme }) => ({
|
|
73
|
+
textTransform: 'capitalize',
|
|
74
|
+
minWidth: 'auto',
|
|
75
|
+
width: 74,
|
|
76
|
+
borderRadius: '4px',
|
|
77
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
78
|
+
backgroundColor: theme.palette.common.white,
|
|
79
|
+
fontWeight: 500,
|
|
80
|
+
fontSize: '11px',
|
|
81
|
+
color: theme.palette.text.primary,
|
|
82
|
+
'&:hover': {
|
|
83
|
+
background: 'transparent',
|
|
84
|
+
},
|
|
85
|
+
}));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { FileUploaderComponentProps } from './type';
|
|
2
|
-
declare const FileUploader: ({ getRootProps, getInputProps, open, onChangeFiles, processFiles, disabled, errorMessage, maxFileSize, preventDuplicates, }: FileUploaderComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const FileUploader: ({ getRootProps, getInputProps, open, onChangeFiles, processFiles, disabled, errorMessage, maxFileSize, preventDuplicates, label, hintText, sx, }: FileUploaderComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default FileUploader;
|
|
@@ -2,12 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import Box from '@mui/material/Box';
|
|
3
3
|
import { redVerifyIcon, uploadBlueIcon } from '../../constants/index.js';
|
|
4
4
|
import { Content, ErrorMessage, StyledFileUploader, IconWrapper, Maximum, TextWrapper, Upload } from './style';
|
|
5
|
-
const FileUploader = ({ getRootProps, getInputProps, open, onChangeFiles, processFiles, disabled, errorMessage, maxFileSize, preventDuplicates, }) => {
|
|
6
|
-
return (_jsxs(StyledFileUploader, Object.assign({}, getRootProps(), { onClick: open }, { children: [_jsx("input", Object.assign({}, getInputProps(), { onChange: (e) => {
|
|
5
|
+
const FileUploader = ({ getRootProps, getInputProps, open, onChangeFiles, processFiles, disabled, errorMessage, maxFileSize, preventDuplicates, label = 'Click to upload', hintText, sx, }) => {
|
|
6
|
+
return (_jsxs(StyledFileUploader, Object.assign({}, getRootProps(), { sx: sx, onClick: open }, { children: [_jsx("input", Object.assign({ "data-slot": "input" }, getInputProps(), { onChange: (e) => {
|
|
7
7
|
const processedFiles = processFiles(Array.from(e.target.files || []));
|
|
8
8
|
if (processedFiles.length > 0 || !preventDuplicates) {
|
|
9
9
|
onChangeFiles(processedFiles);
|
|
10
10
|
}
|
|
11
|
-
}, disabled: disabled })), _jsxs(Content, { children: [_jsx(IconWrapper, { children: _jsx(Box, { component: "img", src: errorMessage ? redVerifyIcon : uploadBlueIcon, width: 16, height: 16 }) }), errorMessage ? (_jsxs(TextWrapper, { children: [_jsx(ErrorMessage, { children: errorMessage }), _jsx(Upload, { children: "Click to upload again" })] })) : (_jsxs(TextWrapper, { children: [_jsx(Upload, { children:
|
|
11
|
+
}, disabled: disabled })), _jsxs(Content, Object.assign({ "data-slot": "content" }, { children: [_jsx(IconWrapper, Object.assign({ "data-slot": "icon-wrapper" }, { children: _jsx(Box, { component: "img", src: errorMessage ? redVerifyIcon : uploadBlueIcon, width: 16, height: 16 }) })), errorMessage ? (_jsxs(TextWrapper, { children: [_jsx(ErrorMessage, { children: errorMessage }), _jsx(Upload, { children: "Click to upload again" })] })) : (_jsxs(TextWrapper, { children: [_jsx(Upload, { children: label }), _jsx(Maximum, { children: hintText || `PDF, JPG or PNG files up to ${maxFileSize}` })] }))] }))] })));
|
|
12
12
|
};
|
|
13
13
|
export default FileUploader;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { DropzoneInputProps, DropzoneRootProps } from 'react-dropzone';
|
|
2
3
|
import type { FileType } from '../../types/index.js';
|
|
4
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
5
|
export interface FileUploaderComponentProps {
|
|
4
6
|
getRootProps: <T extends DropzoneRootProps>(props?: T | undefined) => T;
|
|
5
7
|
getInputProps: <T extends DropzoneInputProps>(props?: T | undefined) => T;
|
|
@@ -10,4 +12,7 @@ export interface FileUploaderComponentProps {
|
|
|
10
12
|
errorMessage?: string;
|
|
11
13
|
maxFileSize: string;
|
|
12
14
|
preventDuplicates?: boolean;
|
|
15
|
+
label?: React.ReactNode;
|
|
16
|
+
hintText?: React.ReactNode;
|
|
17
|
+
sx?: SxProps<Theme>;
|
|
13
18
|
}
|
|
@@ -8,7 +8,7 @@ function FilteredIds({ Ids, onCancelClick, isShown, cardNumber }) {
|
|
|
8
8
|
var _a;
|
|
9
9
|
if (!isShown)
|
|
10
10
|
return null;
|
|
11
|
-
return (_jsxs(FilteredIdsContainer, Object.assign({ isLongerString: ((_a = cardNumber === null || cardNumber === void 0 ? void 0 : cardNumber.length) !== null && _a !== void 0 ? _a : 0) > 11 }, { children: [cardNumber ? _jsx(StyledFilterName, { children: cardNumber }) : _jsx("span", { children: Ids === null || Ids === void 0 ? void 0 : Ids.join(',') }), _jsx(StyledBadge, Object.assign({ pointer: true, round: true, onClick: onCancelClick, variant: BadgeVariants.ACTIVE
|
|
11
|
+
return (_jsxs(FilteredIdsContainer, Object.assign({ centered: !!cardNumber, isLongerString: ((_a = cardNumber === null || cardNumber === void 0 ? void 0 : cardNumber.length) !== null && _a !== void 0 ? _a : 0) > 11 }, { children: [cardNumber ? _jsx(StyledFilterName, { children: cardNumber }) : _jsx("span", { children: Ids === null || Ids === void 0 ? void 0 : Ids.join(',') }), _jsx(StyledBadge, Object.assign({ pointer: true, round: true, onClick: onCancelClick, variant: BadgeVariants.ACTIVE }, { children: _jsx("img", { src: whiteCloseIcon, alt: "close", style: {
|
|
12
12
|
width: '8px',
|
|
13
13
|
height: '7px',
|
|
14
14
|
} }) }))] })));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
interface FilteredIdsContainerProps {
|
|
3
|
+
centered: boolean;
|
|
3
4
|
isLongerString: boolean;
|
|
4
5
|
}
|
|
5
6
|
export declare const FilteredIdsContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Box, styled } from '@mui/material';
|
|
2
2
|
export const FilteredIdsContainer = styled(Box, {
|
|
3
|
-
shouldForwardProp: (props) => props !== 'isLongerString',
|
|
4
|
-
})(({ theme, isLongerString }) => ({
|
|
3
|
+
shouldForwardProp: (props) => props !== 'centered' && props !== 'isLongerString',
|
|
4
|
+
})(({ theme, centered, isLongerString }) => ({
|
|
5
5
|
display: 'flex',
|
|
6
|
-
justifyContent: '
|
|
6
|
+
justifyContent: centered ? 'space-between' : 'flex-start',
|
|
7
7
|
alignItems: 'center',
|
|
8
|
-
|
|
8
|
+
paddingRight: theme.spacing(1.3),
|
|
9
|
+
paddingLeft: theme.spacing(3),
|
|
9
10
|
height: '32px',
|
|
10
11
|
background: theme.palette.background.gradient.shadedBlue,
|
|
11
12
|
color: theme.palette.common.white,
|
|
@@ -19,5 +19,5 @@ import IconWithBadge from '../../../IconWithBadge';
|
|
|
19
19
|
export default function BrandsCell(_a) {
|
|
20
20
|
var { brand, verificationStatus, hideStatus } = _a, props = __rest(_a, ["brand", "verificationStatus", "hideStatus"]);
|
|
21
21
|
const icon = verificationIcon[verificationStatus !== null && verificationStatus !== void 0 ? verificationStatus : 'incomplete'];
|
|
22
|
-
return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(BrandsWrapper, Object.assign({ sx: { cursor: props.onClick ? 'pointer' : 'default' } }, { children: _jsx(Tooltip, Object.assign({ title: brand.name }, { children: _jsxs(Box, Object.assign({ display: "flex", alignItems: "center", gap: '5px', sx: { overflow: 'hidden', width: '100%' } }, { children: [_jsx(IconWithBadge, { mainIcon: brand.logo, mainIconSize: 16, containerSize: 16, borderColor: "transparent" }), _jsx(Label, Object.assign({ sx: Object.assign({}, (!brand.name && { color: '#B1B1B1' })) }, { children: brand.name || 'Not Available' })), !hideStatus && (_jsx(IconWithBadge, { mainIcon: icon, mainIconSize:
|
|
22
|
+
return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(BrandsWrapper, Object.assign({ sx: { cursor: props.onClick ? 'pointer' : 'default' } }, { children: _jsx(Tooltip, Object.assign({ title: brand.name }, { children: _jsxs(Box, Object.assign({ display: "flex", alignItems: "center", gap: '5px', sx: { overflow: 'hidden', width: '100%' } }, { children: [_jsx(IconWithBadge, { mainIcon: brand.logo, mainIconSize: 16, containerSize: 16, borderColor: "transparent" }), _jsx(Label, Object.assign({ sx: Object.assign({}, (!brand.name && { color: '#B1B1B1' })) }, { children: brand.name || 'Not Available' })), !hideStatus && (_jsx(IconWithBadge, { mainIcon: icon, mainIconSize: 16, containerSize: 16, borderColor: "transparent", containerSx: { marginLeft: 'auto' } }))] })) })) })) })));
|
|
23
23
|
}
|
|
@@ -5,8 +5,6 @@ export const useSynchronizedScroll = () => {
|
|
|
5
5
|
const pinnedEndVirtualListRef = useRef(null);
|
|
6
6
|
const isScrollingSyncRef = useRef(false);
|
|
7
7
|
const handleScroll = useCallback(({ scrollOffset }, source) => {
|
|
8
|
-
if (isScrollingSyncRef.current)
|
|
9
|
-
return;
|
|
10
8
|
isScrollingSyncRef.current = true;
|
|
11
9
|
if (source !== 'start' && pinnedStartVirtualListRef.current) {
|
|
12
10
|
pinnedStartVirtualListRef.current.scrollTo(scrollOffset);
|
|
@@ -525,3 +525,12 @@ export declare const exclamationOutlinedCircle: string;
|
|
|
525
525
|
export declare const outlinedCircle: string;
|
|
526
526
|
export declare const greenCheck2ACE00: string;
|
|
527
527
|
export declare const blueCopyIcon: string;
|
|
528
|
+
export declare const blackLinkIcon: string;
|
|
529
|
+
export declare const blackSettingsIcon: string;
|
|
530
|
+
export declare const blackWallet: string;
|
|
531
|
+
export declare const blueGradientBrushIcon: string;
|
|
532
|
+
export declare const gadientLink: string;
|
|
533
|
+
export declare const gradientSettings: string;
|
|
534
|
+
export declare const gradientWallet: string;
|
|
535
|
+
export declare const manyCurrencyCoin: string;
|
|
536
|
+
export declare const manyCurrencyCoinGradient: string;
|
|
@@ -529,3 +529,12 @@ export const exclamationOutlinedCircle = `${lightUrl}/exclamationOutlinedCircle.
|
|
|
529
529
|
export const outlinedCircle = `${lightUrl}/outlinedCircle.svg`;
|
|
530
530
|
export const greenCheck2ACE00 = `${lightUrl}/greenCheck2ACE00.svg`;
|
|
531
531
|
export const blueCopyIcon = `${lightUrl}/blueCopyIcon.svg`;
|
|
532
|
+
export const blackLinkIcon = `${lightUrl}/blackLinkIcon.svg`;
|
|
533
|
+
export const blackSettingsIcon = `${lightUrl}/blackSettingsIcon.svg`;
|
|
534
|
+
export const blackWallet = `${lightUrl}/blackWallet.svg`;
|
|
535
|
+
export const blueGradientBrushIcon = `${lightUrl}/blueGradientBrushIcon.svg`;
|
|
536
|
+
export const gadientLink = `${lightUrl}/gadientLink.svg`;
|
|
537
|
+
export const gradientSettings = `${lightUrl}/gradientSettings.svg`;
|
|
538
|
+
export const gradientWallet = `${lightUrl}/gradientWallet.svg`;
|
|
539
|
+
export const manyCurrencyCoin = `${lightUrl}/manyCurrencyCoin.svg`;
|
|
540
|
+
export const manyCurrencyCoinGradient = `${lightUrl}/manyCurrencyCoinGradient.svg`;
|
|
@@ -5,19 +5,19 @@ export declare const merchantsTableCellWidth: {
|
|
|
5
5
|
readonly sheet: "225px";
|
|
6
6
|
};
|
|
7
7
|
readonly entity: {
|
|
8
|
-
readonly default: "
|
|
8
|
+
readonly default: "150px";
|
|
9
9
|
readonly text: "180px";
|
|
10
10
|
readonly sheet: "180px";
|
|
11
11
|
};
|
|
12
12
|
readonly created: {
|
|
13
|
-
readonly default: "
|
|
13
|
+
readonly default: "170px";
|
|
14
14
|
readonly text: "170px";
|
|
15
15
|
readonly sheet: "170px";
|
|
16
16
|
};
|
|
17
17
|
readonly brands: {
|
|
18
|
-
readonly default: "
|
|
19
|
-
readonly text: "
|
|
20
|
-
readonly sheet: "
|
|
18
|
+
readonly default: "116px";
|
|
19
|
+
readonly text: "120px";
|
|
20
|
+
readonly sheet: "120px";
|
|
21
21
|
};
|
|
22
22
|
readonly marketplace: {
|
|
23
23
|
readonly default: "110px";
|
|
@@ -25,9 +25,9 @@ export declare const merchantsTableCellWidth: {
|
|
|
25
25
|
readonly sheet: "110px";
|
|
26
26
|
};
|
|
27
27
|
readonly individuals: {
|
|
28
|
-
readonly default: "
|
|
29
|
-
readonly text: "
|
|
30
|
-
readonly sheet: "
|
|
28
|
+
readonly default: "116px";
|
|
29
|
+
readonly text: "120px";
|
|
30
|
+
readonly sheet: "120px";
|
|
31
31
|
};
|
|
32
32
|
readonly segments: {
|
|
33
33
|
readonly default: "70px";
|
|
@@ -35,17 +35,17 @@ export declare const merchantsTableCellWidth: {
|
|
|
35
35
|
readonly sheet: "180px";
|
|
36
36
|
};
|
|
37
37
|
readonly psp: {
|
|
38
|
-
readonly default: "
|
|
38
|
+
readonly default: "60px";
|
|
39
39
|
readonly text: "180px";
|
|
40
40
|
readonly sheet: "180px";
|
|
41
41
|
};
|
|
42
42
|
readonly status: {
|
|
43
|
-
readonly default: "
|
|
43
|
+
readonly default: "80px";
|
|
44
44
|
readonly text: "100px";
|
|
45
45
|
readonly sheet: "100px";
|
|
46
46
|
};
|
|
47
47
|
readonly partners: {
|
|
48
|
-
readonly default: "
|
|
48
|
+
readonly default: "75px";
|
|
49
49
|
readonly text: "100px";
|
|
50
50
|
readonly sheet: "100px";
|
|
51
51
|
};
|
|
@@ -65,13 +65,8 @@ export declare const merchantsTableCellWidth: {
|
|
|
65
65
|
readonly sheet: "180px";
|
|
66
66
|
};
|
|
67
67
|
readonly channels: {
|
|
68
|
-
readonly default: "
|
|
68
|
+
readonly default: "110px";
|
|
69
69
|
readonly text: "120px";
|
|
70
70
|
readonly sheet: "120px";
|
|
71
71
|
};
|
|
72
|
-
readonly merchant: {
|
|
73
|
-
readonly default: "175px";
|
|
74
|
-
readonly text: "180px";
|
|
75
|
-
readonly sheet: "180px";
|
|
76
|
-
};
|
|
77
72
|
};
|
|
@@ -5,19 +5,19 @@ export const merchantsTableCellWidth = {
|
|
|
5
5
|
sheet: '225px',
|
|
6
6
|
},
|
|
7
7
|
entity: {
|
|
8
|
-
default: '
|
|
8
|
+
default: '150px',
|
|
9
9
|
text: '180px',
|
|
10
10
|
sheet: '180px',
|
|
11
11
|
},
|
|
12
12
|
created: {
|
|
13
|
-
default: '
|
|
13
|
+
default: '170px',
|
|
14
14
|
text: '170px',
|
|
15
15
|
sheet: '170px',
|
|
16
16
|
},
|
|
17
17
|
brands: {
|
|
18
|
-
default: '
|
|
19
|
-
text: '
|
|
20
|
-
sheet: '
|
|
18
|
+
default: '116px',
|
|
19
|
+
text: '120px',
|
|
20
|
+
sheet: '120px',
|
|
21
21
|
},
|
|
22
22
|
marketplace: {
|
|
23
23
|
default: '110px',
|
|
@@ -25,9 +25,9 @@ export const merchantsTableCellWidth = {
|
|
|
25
25
|
sheet: '110px',
|
|
26
26
|
},
|
|
27
27
|
individuals: {
|
|
28
|
-
default: '
|
|
29
|
-
text: '
|
|
30
|
-
sheet: '
|
|
28
|
+
default: '116px',
|
|
29
|
+
text: '120px',
|
|
30
|
+
sheet: '120px',
|
|
31
31
|
},
|
|
32
32
|
segments: {
|
|
33
33
|
default: '70px',
|
|
@@ -35,17 +35,17 @@ export const merchantsTableCellWidth = {
|
|
|
35
35
|
sheet: '180px',
|
|
36
36
|
},
|
|
37
37
|
psp: {
|
|
38
|
-
default: '
|
|
38
|
+
default: '60px',
|
|
39
39
|
text: '180px',
|
|
40
40
|
sheet: '180px',
|
|
41
41
|
},
|
|
42
42
|
status: {
|
|
43
|
-
default: '
|
|
43
|
+
default: '80px',
|
|
44
44
|
text: '100px',
|
|
45
45
|
sheet: '100px',
|
|
46
46
|
},
|
|
47
47
|
partners: {
|
|
48
|
-
default: '
|
|
48
|
+
default: '75px',
|
|
49
49
|
text: '100px',
|
|
50
50
|
sheet: '100px',
|
|
51
51
|
},
|
|
@@ -65,13 +65,8 @@ export const merchantsTableCellWidth = {
|
|
|
65
65
|
sheet: '180px',
|
|
66
66
|
},
|
|
67
67
|
channels: {
|
|
68
|
-
default: '
|
|
68
|
+
default: '110px',
|
|
69
69
|
text: '120px',
|
|
70
70
|
sheet: '120px',
|
|
71
71
|
},
|
|
72
|
-
merchant: {
|
|
73
|
-
default: '175px',
|
|
74
|
-
text: '180px',
|
|
75
|
-
sheet: '180px',
|
|
76
|
-
},
|
|
77
72
|
};
|
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.65-test.1-test.2",
|
|
5
|
+
"testVersion": 2,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|
|
@@ -79,12 +79,14 @@
|
|
|
79
79
|
"@mui/material": "^5.12.3",
|
|
80
80
|
"@uiw/react-json-view": "^2.0.0-alpha.16",
|
|
81
81
|
"axios": "^1.4.0",
|
|
82
|
+
"color": "^5.0.0",
|
|
82
83
|
"dayjs": "^1.11.8",
|
|
83
84
|
"framer-motion": "10.11.0",
|
|
84
85
|
"i18next": "^22.4.15",
|
|
85
86
|
"memoize-one": "^6.0.0",
|
|
86
87
|
"re-resizable": "^6.9.9",
|
|
87
88
|
"react": "^18.2.0",
|
|
89
|
+
"react-colorful": "^5.6.1",
|
|
88
90
|
"react-currency-input-field": "^3.6.11",
|
|
89
91
|
"react-dom": "^18.2.0",
|
|
90
92
|
"react-draggable": "^4.4.6",
|