@tap-payments/os-micro-frontend-shared 0.1.425 → 0.1.426-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/AnimatedSpinnerIcon/style.d.ts +0 -1
- package/build/components/AppServicesActionMenu/AppServicesActionMenu.d.ts +1 -1
- package/build/components/AppServicesActionMenu/AppServicesActionMenu.js +15 -4
- package/build/components/AppServicesActionMenu/types.d.ts +2 -0
- package/build/components/Chip/style.d.ts +0 -1
- package/build/components/CountBadge/style.d.ts +0 -1
- 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/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AgreementCell/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/PayoutReportCell/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/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/components/style.d.ts +0 -1
- package/build/constants/assets.d.ts +1 -0
- package/build/constants/assets.js +1 -0
- package/package.json +3 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { AppServicesActionMenuProps } from './types';
|
|
2
|
-
export declare function AppServicesActionMenu({ anchorEl, open, onClose, items, onSelectService }: AppServicesActionMenuProps): import("react/jsx-runtime").JSX.Element | null;
|
|
2
|
+
export declare function AppServicesActionMenu({ anchorEl, open, onClose, items, onSelectService, showViewApi, onViewApiClick, }: AppServicesActionMenuProps): import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
export default AppServicesActionMenu;
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useCallback } from 'react';
|
|
3
3
|
import Box from '@mui/material/Box';
|
|
4
4
|
import Popper from '@mui/material/Popper';
|
|
5
5
|
import { ClickAwayListener } from '@mui/material';
|
|
6
|
-
import { rightArrow } from '../../constants/index.js';
|
|
6
|
+
import { rightArrow, jsonBlackIcon } from '../../constants/index.js';
|
|
7
7
|
import CustomBackdrop from '../CustomBackdrop';
|
|
8
8
|
import { App, AppDetails, AppName, AppList, AppIcon } from './style';
|
|
9
9
|
import ServicesSubmenu from './ServicesSubmenu';
|
|
10
|
-
export function AppServicesActionMenu({ anchorEl, open, onClose, items, onSelectService }) {
|
|
10
|
+
export function AppServicesActionMenu({ anchorEl, open, onClose, items, onSelectService, showViewApi = false, onViewApiClick, }) {
|
|
11
11
|
const [childAnchorEl, setChildAnchorEl] = useState(null);
|
|
12
12
|
const [hoveredItem, setHoveredItem] = useState(null);
|
|
13
|
+
const [hoveredViewApi, setHoveredViewApi] = useState(false);
|
|
13
14
|
const onChildMouseOver = useCallback((event, item) => {
|
|
14
15
|
setChildAnchorEl(event.currentTarget);
|
|
15
16
|
setHoveredItem(item);
|
|
17
|
+
setHoveredViewApi(false);
|
|
16
18
|
}, []);
|
|
17
19
|
const onChildLeave = useCallback(() => {
|
|
18
20
|
setChildAnchorEl(null);
|
|
19
21
|
setHoveredItem(null);
|
|
22
|
+
setHoveredViewApi(false);
|
|
20
23
|
}, []);
|
|
21
24
|
const handleClose = useCallback(() => {
|
|
22
25
|
onClose();
|
|
@@ -26,8 +29,16 @@ export function AppServicesActionMenu({ anchorEl, open, onClose, items, onSelect
|
|
|
26
29
|
onSelectService(appCode, serviceCode);
|
|
27
30
|
handleClose();
|
|
28
31
|
}, [onSelectService, handleClose]);
|
|
32
|
+
const handleViewApiClick = useCallback((e) => {
|
|
33
|
+
e.stopPropagation();
|
|
34
|
+
onViewApiClick === null || onViewApiClick === void 0 ? void 0 : onViewApiClick();
|
|
35
|
+
handleClose();
|
|
36
|
+
}, [onViewApiClick, handleClose]);
|
|
29
37
|
if (!open)
|
|
30
38
|
return null;
|
|
31
|
-
return (_jsx(ClickAwayListener, Object.assign({ onClickAway: handleClose }, { children: _jsxs(Box, { children: [_jsx(CustomBackdrop, { onClick: handleClose }), _jsx(Popper, Object.assign({ open: open, anchorEl: anchorEl, placement: "bottom-end", sx: { zIndex: 2000 } }, { children: _jsx(AppList, { children: items.length === 0 ? (_jsx(App, Object.assign({ sx: { cursor: 'default', '&:hover': { boxShadow: 'none' } } }, { children: _jsx(AppDetails, { children: _jsx(AppName, Object.assign({ sx: { fontSize: 11, color: 'text.secondary' } }, { children: "No actions available" })) }) }))) : (items.map((item) => (_jsxs(App, Object.assign({ onMouseOver: (e) => onChildMouseOver(e, item), open: (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.appCode) === item.appCode }, { children: [_jsxs(AppDetails, { children: [_jsx(AppIcon, { children: _jsx("img", { src: item.appIconUrl, alt: "app", width: 16, height: 16 }) }), _jsx(AppName, { children: item.appName })] }), _jsx(AppDetails, { children: _jsx("img", { src: rightArrow, alt: "icon", className: "arrow-icon" }) })] }), item.appCode)))
|
|
39
|
+
return (_jsx(ClickAwayListener, Object.assign({ onClickAway: handleClose }, { children: _jsxs(Box, { children: [_jsx(CustomBackdrop, { onClick: handleClose }), _jsx(Popper, Object.assign({ open: open, anchorEl: anchorEl, placement: "bottom-end", sx: { zIndex: 2000 } }, { children: _jsx(AppList, { children: items.length === 0 && !showViewApi ? (_jsx(App, Object.assign({ sx: { cursor: 'default', '&:hover': { boxShadow: 'none' } } }, { children: _jsx(AppDetails, { children: _jsx(AppName, Object.assign({ sx: { fontSize: 11, color: 'text.secondary' } }, { children: "No actions available" })) }) }))) : (_jsxs(_Fragment, { children: [items.map((item) => (_jsxs(App, Object.assign({ onMouseOver: (e) => onChildMouseOver(e, item), open: (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.appCode) === item.appCode }, { children: [_jsxs(AppDetails, { children: [_jsx(AppIcon, { children: _jsx("img", { src: item.appIconUrl, alt: "app", width: 16, height: 16 }) }), _jsx(AppName, { children: item.appName })] }), _jsx(AppDetails, { children: _jsx("img", { src: rightArrow, alt: "icon", className: "arrow-icon" }) })] }), item.appCode))), showViewApi && onViewApiClick && (_jsx(App, Object.assign({ onClick: handleViewApiClick, open: hoveredViewApi, onMouseOver: () => {
|
|
40
|
+
setHoveredItem(null);
|
|
41
|
+
setHoveredViewApi(true);
|
|
42
|
+
}, onMouseLeave: () => setHoveredViewApi(false) }, { children: _jsxs(AppDetails, { children: [_jsx(AppIcon, { children: _jsx("img", { src: jsonBlackIcon, alt: "app", width: 16, height: 16 }) }), _jsx(AppName, { children: "View API" })] }) })))] })) }) })), items.length > 0 && (_jsx(ServicesSubmenu, { item: hoveredItem, anchorEl: childAnchorEl, onMouseLeave: onChildLeave, onSelectService: handleSelectService }))] }) })));
|
|
32
43
|
}
|
|
33
44
|
export default AppServicesActionMenu;
|
|
@@ -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;
|
|
@@ -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 PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -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 AgreementCellContainer: 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 StyledAgreementCardIcon: 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 CardContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -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 StyledDownloadFileImageWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
4
3
|
isTextShown?: boolean | undefined;
|
|
5
4
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -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 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>, {}>;
|
|
@@ -10,6 +10,7 @@ export declare const getServiceFunctionIcon: (functionCode: string) => string;
|
|
|
10
10
|
export declare const getStatusIcon: (statusCode: string) => string;
|
|
11
11
|
export declare const getCurrenciesIcon: (currency: string) => string;
|
|
12
12
|
export declare const getAuthorityIcon: (authority: string) => string;
|
|
13
|
+
export declare const getBrowserIcon: (browser: string) => string;
|
|
13
14
|
export declare const SARIconImage: string;
|
|
14
15
|
export declare const DirhamIconImage: string;
|
|
15
16
|
export declare const abandonedIcon: string;
|
|
@@ -15,6 +15,7 @@ export const getAuthorityIcon = (authority) => {
|
|
|
15
15
|
const authorityWithoutSpaces = authority.replace(/\s/g, '');
|
|
16
16
|
return `${cdnUrl}/icons/dashboard/light/authority/v2/${authorityWithoutSpaces}.svg`;
|
|
17
17
|
};
|
|
18
|
+
export const getBrowserIcon = (browser) => `${lightUrl}/browsers/${browser}.svg`;
|
|
18
19
|
export const SARIconImage = `${lightUrl}/currency/sar.svg`;
|
|
19
20
|
export const DirhamIconImage = `${lightUrl}/currency/dirham.svg`;
|
|
20
21
|
export const abandonedIcon = `${lightUrl}/abandoned.svg`;
|
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.426-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
|
+
}
|