@tap-payments/os-micro-frontend-shared 0.1.203 → 0.1.204
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/AppServices/ServiceItem.js +4 -6
- package/build/components/BetaBanner/BetaBanner.d.ts +1 -0
- package/build/components/BetaBanner/BetaBanner.js +5 -0
- package/build/components/BetaBanner/index.d.ts +2 -0
- package/build/components/BetaBanner/index.js +2 -0
- package/build/components/BetaBanner/style.d.ts +6 -0
- package/build/components/BetaBanner/style.js +17 -0
- package/build/components/Widget/List.d.ts +2 -1
- package/build/components/Widget/List.js +2 -2
- package/build/components/index.d.ts +1 -0
- package/build/components/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { memo, useState } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { DropdownMenu
|
|
5
|
-
import {
|
|
6
|
-
import { homeIcon, newWindowIcon } from '../../constants/index.js';
|
|
4
|
+
import { DropdownMenu } from '../index.js';
|
|
5
|
+
import { newWindowIcon } from '../../constants/index.js';
|
|
7
6
|
import { ServiceItemStyled } from './style';
|
|
8
7
|
function ServiceItem({ isDropdown = false, name, code, activeCode, navigateToMenuItem, onClickServiceItem }) {
|
|
9
8
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
@@ -12,17 +11,16 @@ function ServiceItem({ isDropdown = false, name, code, activeCode, navigateToMen
|
|
|
12
11
|
const handleClose = () => {
|
|
13
12
|
setAnchorEl(null);
|
|
14
13
|
};
|
|
15
|
-
const isHomeService = isInsightService(code);
|
|
16
14
|
return (_jsxs(_Fragment, { children: [_jsx(ServiceItemStyled, Object.assign({ isDropdown: isDropdown, className: activeCode.toLowerCase() === code.toLowerCase() ? 'active' : '', onClick: (e) => {
|
|
17
15
|
e.preventDefault();
|
|
18
16
|
e.stopPropagation();
|
|
19
17
|
navigateToMenuItem(code);
|
|
20
|
-
}, title:
|
|
18
|
+
}, title: name, onContextMenu: (event) => {
|
|
21
19
|
event.preventDefault();
|
|
22
20
|
event.stopPropagation();
|
|
23
21
|
handleClose();
|
|
24
22
|
setAnchorEl(event.currentTarget);
|
|
25
|
-
} }, { children:
|
|
23
|
+
} }, { children: name })), _jsx(DropdownMenu, { open: open, anchorEl: anchorEl, onClose: handleClose, menuItems: [
|
|
26
24
|
{
|
|
27
25
|
label: t('openNewWindow'),
|
|
28
26
|
name: 'new',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function BetaBanner(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { BannerContainer, BoldText, RegularText } from './style';
|
|
3
|
+
export default function BetaBanner() {
|
|
4
|
+
return (_jsxs(BannerContainer, { children: [_jsx(BoldText, { children: "Insights is in beta - " }), _jsx(RegularText, { children: "improvements are ongoing, thanks for your patience." })] }));
|
|
5
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const BannerContainer: 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 BoldText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
6
|
+
export declare const RegularText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Box from '@mui/material/Box';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
export const BannerContainer = styled(Box)(() => ({
|
|
4
|
+
color: '#1F88D0',
|
|
5
|
+
backgroundColor: '#1F88D00D',
|
|
6
|
+
padding: '8px 12px',
|
|
7
|
+
borderRadius: '4px',
|
|
8
|
+
fontSize: '11px',
|
|
9
|
+
display: 'flex',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
}));
|
|
12
|
+
export const BoldText = styled('span')(() => ({
|
|
13
|
+
fontWeight: 700,
|
|
14
|
+
}));
|
|
15
|
+
export const RegularText = styled('span')(() => ({
|
|
16
|
+
fontWeight: 500,
|
|
17
|
+
}));
|
|
@@ -2,7 +2,8 @@ import { type ReactNode } from 'react';
|
|
|
2
2
|
import { BoxProps } from '@mui/material/Box';
|
|
3
3
|
interface ListI extends BoxProps {
|
|
4
4
|
children: ReactNode;
|
|
5
|
+
allowShadow?: boolean;
|
|
5
6
|
}
|
|
6
|
-
declare function List({ children, ...props }: ListI): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function List({ allowShadow, children, ...props }: ListI): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
declare const _default: import("react").MemoExoticComponent<typeof List>;
|
|
8
9
|
export default _default;
|
|
@@ -16,8 +16,8 @@ import { listShadowBg } from '../../constants/index.js';
|
|
|
16
16
|
import { ListStyled } from './style';
|
|
17
17
|
import { useScrollWithShadow } from './useScrollWithShadow';
|
|
18
18
|
function List(_a) {
|
|
19
|
-
var { children } = _a, props = __rest(_a, ["children"]);
|
|
19
|
+
var { allowShadow = true, children } = _a, props = __rest(_a, ["allowShadow", "children"]);
|
|
20
20
|
const { onScrollHandler, showShadow } = useScrollWithShadow();
|
|
21
|
-
return (_jsxs(ListStyled, Object.assign({ component: "ul", "data-testid": "Widget_List", onScroll: onScrollHandler }, props, { children: [children, showShadow && _jsx(Box, { component: "img", src: listShadowBg, sx: { width: '100%', position: 'fixed', bottom: 0, pointerEvents: 'none' } })] })));
|
|
21
|
+
return (_jsxs(ListStyled, Object.assign({ component: "ul", "data-testid": "Widget_List", onScroll: onScrollHandler }, props, { children: [children, showShadow && allowShadow && (_jsx(Box, { component: "img", src: listShadowBg, sx: { width: '100%', position: 'fixed', bottom: 0, pointerEvents: 'none' } }))] })));
|
|
22
22
|
}
|
|
23
23
|
export default memo(List);
|
package/package.json
CHANGED