@tap-payments/os-micro-frontend-shared 0.1.70 → 0.1.72
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/StatusIcons/SourceIcons/components/SourceIcon.d.ts +6 -2
- package/build/components/StatusIcons/SourceIcons/components/SourceIcon.js +2 -2
- package/build/components/TableCells/CustomCells/TerminalsPlatformCell/TerminalsPlatformCell.d.ts +3 -2
- package/build/components/TableCells/CustomCells/TerminalsPlatformCell/TerminalsPlatformCell.js +14 -2
- package/build/components/WindowBackdrop/WindowBackdrop.d.ts +6 -0
- package/build/components/WindowBackdrop/WindowBackdrop.js +9 -0
- package/build/components/WindowBackdrop/index.d.ts +1 -0
- package/build/components/WindowBackdrop/index.js +1 -0
- package/build/components/WindowSideBar/WindowSideBar.d.ts +4 -8
- package/build/components/WindowSideBar/index.d.ts +1 -0
- package/build/components/WindowSideBar/type.d.ts +10 -0
- package/build/components/WindowSideBar/type.js +1 -0
- package/build/components/index.d.ts +1 -0
- package/build/components/index.js +1 -0
- package/build/constants/assets.d.ts +6 -0
- package/build/constants/assets.js +6 -0
- package/build/types/user.d.ts +1 -2
- package/package.json +2 -2
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
type SourceIconProps = {
|
|
2
2
|
source: string;
|
|
3
3
|
isTextShown?: boolean;
|
|
4
4
|
title?: string;
|
|
5
|
-
|
|
5
|
+
width?: number | string;
|
|
6
|
+
height?: number | string;
|
|
7
|
+
};
|
|
8
|
+
export declare function SourceIcon({ source, isTextShown, title, width, height }: SourceIconProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -4,10 +4,10 @@ import { useTranslation } from 'react-i18next';
|
|
|
4
4
|
import Tooltip from '../../../Tooltip';
|
|
5
5
|
import { getPaymentMethodsIcon } from '../../../../constants/index.js';
|
|
6
6
|
import { StyledBadgeTextWrapper, StyledSourceImage, TextLabel } from '../style';
|
|
7
|
-
export function SourceIcon({ source, isTextShown, title }) {
|
|
7
|
+
export function SourceIcon({ source, isTextShown, title, width, height }) {
|
|
8
8
|
const { t } = useTranslation();
|
|
9
9
|
const ImageSrc = getPaymentMethodsIcon(source);
|
|
10
|
-
return (_jsx(Tooltip, Object.assign({ title: title }, { children: isTextShown ? (_jsx(StyledBadgeTextWrapper, Object.assign({ "data-testid": "SourceCell_BadgeTextWrapper" }, { children: _jsx(TextLabel, Object.assign({ "data-testid": "SourceCell_TextLabel", "data-source": source }, { children: t(camelCase(source)) })) }))) : (_jsx(StyledSourceImage, { src: ImageSrc, alt: source, onError: (e) => {
|
|
10
|
+
return (_jsx(Tooltip, Object.assign({ title: title }, { children: isTextShown ? (_jsx(StyledBadgeTextWrapper, Object.assign({ "data-testid": "SourceCell_BadgeTextWrapper" }, { children: _jsx(TextLabel, Object.assign({ "data-testid": "SourceCell_TextLabel", "data-source": source }, { children: t(camelCase(source)) })) }))) : (_jsx(StyledSourceImage, { src: ImageSrc, alt: source, width: width, height: height, onError: (e) => {
|
|
11
11
|
e.currentTarget.src = getPaymentMethodsIcon('card');
|
|
12
12
|
} })) })));
|
|
13
13
|
}
|
package/build/components/TableCells/CustomCells/TerminalsPlatformCell/TerminalsPlatformCell.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { StackProps } from '@mui/material/Stack';
|
|
2
3
|
import { TextAndLang } from '../../../../types/index.js';
|
|
3
|
-
type TerminalsPlatformCellProps = {
|
|
4
|
+
type TerminalsPlatformCellProps = StackProps & {
|
|
4
5
|
name: TextAndLang[];
|
|
5
6
|
icon?: React.ReactNode;
|
|
6
7
|
displayRules?: {
|
|
@@ -8,5 +9,5 @@ type TerminalsPlatformCellProps = {
|
|
|
8
9
|
showLabel?: boolean;
|
|
9
10
|
};
|
|
10
11
|
};
|
|
11
|
-
declare const _default: import("react").MemoExoticComponent<({ name, icon, displayRules }: TerminalsPlatformCellProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
12
|
+
declare const _default: import("react").MemoExoticComponent<({ name, icon, displayRules, ...props }: TerminalsPlatformCellProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
12
13
|
export default _default;
|
package/build/components/TableCells/CustomCells/TerminalsPlatformCell/TerminalsPlatformCell.js
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
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
|
+
};
|
|
1
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
13
|
import { memo } from 'react';
|
|
3
14
|
import { useTranslation } from 'react-i18next';
|
|
@@ -6,7 +17,8 @@ import Typography from '@mui/material/Typography';
|
|
|
6
17
|
import Box from '@mui/material/Box';
|
|
7
18
|
import { Chip, Tooltip } from '../../../index.js';
|
|
8
19
|
import { getNameText } from '../../../../utils/index.js';
|
|
9
|
-
const TerminalsPlatformCell = (
|
|
20
|
+
const TerminalsPlatformCell = (_a) => {
|
|
21
|
+
var { name, icon, displayRules } = _a, props = __rest(_a, ["name", "icon", "displayRules"]);
|
|
10
22
|
const { i18n } = useTranslation();
|
|
11
23
|
const { showIcon = true, showLabel = true } = displayRules || {};
|
|
12
24
|
const platformName = getNameText(name, i18n.language);
|
|
@@ -14,6 +26,6 @@ const TerminalsPlatformCell = ({ name, icon, displayRules }) => {
|
|
|
14
26
|
const displayLabel = showLabel || !!platformName;
|
|
15
27
|
if (!displayIcon && !displayLabel)
|
|
16
28
|
return null;
|
|
17
|
-
return (_jsxs(Stack, Object.assign({ "data-testid": "TerminalsPlatformCell", direction: "row", alignItems: "center", spacing: 1, color: "text.primary" }, { children: [displayIcon && (_jsx(Chip, Object.assign({ variant: "circular", sx: { '&.CustomVariant_circular': { minWidth: 32, height: 32 } } }, { children: icon }))), displayLabel && (_jsx(Tooltip, Object.assign({ title: platformName }, { children: _jsx(Typography, Object.assign({ noWrap: true, fontSize: 12, fontWeight: 500 }, { children: platformName || (_jsx(Box, Object.assign({ component: "span", sx: { opacity: 0.2 } }, { children: "Unavailable" }))) })) })))] })));
|
|
29
|
+
return (_jsxs(Stack, Object.assign({ "data-testid": "TerminalsPlatformCell", direction: "row", alignItems: "center", spacing: 1, color: "text.primary" }, props, { children: [displayIcon && (_jsx(Chip, Object.assign({ variant: "circular", sx: { '&.CustomVariant_circular': { minWidth: 32, height: 32 } } }, { children: icon }))), displayLabel && (_jsx(Tooltip, Object.assign({ title: platformName }, { children: _jsx(Typography, Object.assign({ noWrap: true, fontSize: 12, fontWeight: 500 }, { children: platformName || (_jsx(Box, Object.assign({ component: "span", sx: { opacity: 0.2 } }, { children: "Unavailable" }))) })) })))] })));
|
|
18
30
|
};
|
|
19
31
|
export default memo(TerminalsPlatformCell);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BackdropProps as MuiBackdropProps } from '@mui/material/Backdrop';
|
|
3
|
+
export type WindowBackdropProps = MuiBackdropProps;
|
|
4
|
+
declare function WindowBackdrop(props: WindowBackdropProps): import("react").ReactPortal;
|
|
5
|
+
declare const _default: import("react").MemoExoticComponent<typeof WindowBackdrop>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { createPortal } from 'react-dom';
|
|
4
|
+
import Backdrop from '@mui/material/Backdrop';
|
|
5
|
+
import { alpha } from '@mui/material/styles';
|
|
6
|
+
function WindowBackdrop(props) {
|
|
7
|
+
return createPortal(_jsx(Backdrop, Object.assign({ sx: { zIndex: 1, backgroundColor: (theme) => alpha(theme.palette.common.black, 0.3) } }, props)), document.body);
|
|
8
|
+
}
|
|
9
|
+
export default memo(WindowBackdrop);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './WindowBackdrop';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './WindowBackdrop';
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { Section } from './type';
|
|
3
3
|
interface WindowSideBarProps {
|
|
4
|
-
sections:
|
|
4
|
+
sections: Section[];
|
|
5
5
|
isMaximized?: boolean;
|
|
6
|
-
onClick?: (section:
|
|
7
|
-
|
|
8
|
-
title?: string;
|
|
9
|
-
icon?: string;
|
|
10
|
-
}) => void;
|
|
11
|
-
activeSection?: ACCOUNT_SECTION;
|
|
6
|
+
onClick?: (section: Section) => void;
|
|
7
|
+
activeSection?: string;
|
|
12
8
|
}
|
|
13
9
|
declare function WindowSideBar({ sections, isMaximized, onClick, activeSection }: WindowSideBarProps): import("react/jsx-runtime").JSX.Element;
|
|
14
10
|
declare const _default: import("react").MemoExoticComponent<typeof WindowSideBar>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -103,6 +103,7 @@ export declare const checkIcon: string;
|
|
|
103
103
|
export declare const closeXIcon: string;
|
|
104
104
|
export declare const dragIcon: string;
|
|
105
105
|
export declare const checkboxIcon: string;
|
|
106
|
+
export declare const whitePlusIcon: string;
|
|
106
107
|
export declare const protectIcon: string;
|
|
107
108
|
export declare const unisoIcon: string;
|
|
108
109
|
export declare const addidasIcon: string;
|
|
@@ -534,3 +535,8 @@ export declare const gradientSettings: string;
|
|
|
534
535
|
export declare const gradientWallet: string;
|
|
535
536
|
export declare const manyCurrencyCoin: string;
|
|
536
537
|
export declare const manyCurrencyCoinGradient: string;
|
|
538
|
+
export declare const blackMobileBatteryIcon: string;
|
|
539
|
+
export declare const blackMobileSignalIcon: string;
|
|
540
|
+
export declare const emptyMobileWifiIcon: string;
|
|
541
|
+
export declare const deemaWithLabel: string;
|
|
542
|
+
export declare const blackUnLinkIcon: string;
|
|
@@ -107,6 +107,7 @@ export const checkIcon = `${appBaseUrl}/check.svg`;
|
|
|
107
107
|
export const closeXIcon = `${appBaseUrl}/closeX.svg`;
|
|
108
108
|
export const dragIcon = `${appBaseUrl}/drag.svg`;
|
|
109
109
|
export const checkboxIcon = `${appBaseUrl}/checkboxIcon.svg`;
|
|
110
|
+
export const whitePlusIcon = `${lightUrl}/plusWhite.svg`;
|
|
110
111
|
export const protectIcon = `${appBaseUrl}/checkboxIcon.svg`;
|
|
111
112
|
export const unisoIcon = `${lightUrl}/Uniso.svg`;
|
|
112
113
|
export const addidasIcon = `${lightUrl}/addidas.svg`;
|
|
@@ -538,3 +539,8 @@ export const gradientSettings = `${lightUrl}/gradientSettings.svg`;
|
|
|
538
539
|
export const gradientWallet = `${lightUrl}/gradientWallet.svg`;
|
|
539
540
|
export const manyCurrencyCoin = `${lightUrl}/manyCurrencyCoin.svg`;
|
|
540
541
|
export const manyCurrencyCoinGradient = `${lightUrl}/manyCurrencyCoinGradient.svg`;
|
|
542
|
+
export const blackMobileBatteryIcon = `${lightUrl}/blackMobileBatteryIcon.svg`;
|
|
543
|
+
export const blackMobileSignalIcon = `${lightUrl}/blackMobileSignalIcon.svg`;
|
|
544
|
+
export const emptyMobileWifiIcon = `${lightUrl}/emptyMobileWifiIcon.svg`;
|
|
545
|
+
export const deemaWithLabel = `${lightUrl}/deemaWithLabel.svg`;
|
|
546
|
+
export const blackUnLinkIcon = `${lightUrl}/blackUnLinkIcon.svg`;
|
package/build/types/user.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { UserApp } from './apps';
|
|
|
2
2
|
import { Brand } from './brand';
|
|
3
3
|
import { Entity } from './entity';
|
|
4
4
|
import { Merchant } from './merchant';
|
|
5
|
-
import { ACCOUNT_SECTION } from './account';
|
|
6
5
|
import { Country } from './appConfig';
|
|
7
6
|
export interface TextAndLang {
|
|
8
7
|
lang: string;
|
|
@@ -161,7 +160,7 @@ export interface SegmentRole {
|
|
|
161
160
|
role_id: string;
|
|
162
161
|
}
|
|
163
162
|
export interface UserSection {
|
|
164
|
-
id:
|
|
163
|
+
id: string;
|
|
165
164
|
title?: string;
|
|
166
165
|
icon?: string;
|
|
167
166
|
}
|
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.72",
|
|
5
|
+
"testVersion": 0,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|