@tap-payments/os-micro-frontend-shared 0.0.246 → 0.0.248-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/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeader.d.ts +5 -0
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeader.js +23 -0
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeaderBase.d.ts +5 -0
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeaderBase.js +20 -0
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/index.d.ts +4 -0
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/index.js +4 -0
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/type.d.ts +25 -0
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/type.js +1 -0
- package/build/components/AppWindowWrapper/index.d.ts +2 -0
- package/build/components/AppWindowWrapper/index.js +2 -0
- package/build/components/SourceChips/AuthenticationChip/AuthenticationChip.d.ts +7 -0
- package/build/components/SourceChips/AuthenticationChip/AuthenticationChip.js +31 -0
- package/build/components/SourceChips/AuthenticationChip/constants.d.ts +30 -0
- package/build/components/SourceChips/AuthenticationChip/constants.js +25 -0
- package/build/components/SourceChips/AuthenticationChip/index.d.ts +3 -0
- package/build/components/SourceChips/AuthenticationChip/index.js +2 -0
- package/build/components/SourceChips/GeographyChip/GeographyChip.d.ts +7 -0
- package/build/components/SourceChips/GeographyChip/GeographyChip.js +22 -0
- package/build/components/SourceChips/GeographyChip/constants.d.ts +16 -0
- package/build/components/SourceChips/GeographyChip/constants.js +11 -0
- package/build/components/SourceChips/GeographyChip/index.d.ts +2 -0
- package/build/components/SourceChips/GeographyChip/index.js +2 -0
- package/build/components/SourceChips/PaymentAgreementChip/PaymentAgreementChip.d.ts +7 -0
- package/build/components/SourceChips/PaymentAgreementChip/PaymentAgreementChip.js +21 -0
- package/build/components/SourceChips/PaymentAgreementChip/constants.d.ts +21 -0
- package/build/components/SourceChips/PaymentAgreementChip/constants.js +16 -0
- package/build/components/SourceChips/PaymentAgreementChip/index.d.ts +3 -0
- package/build/components/SourceChips/PaymentAgreementChip/index.js +2 -0
- package/build/components/SourceChips/index.d.ts +3 -0
- package/build/components/SourceChips/index.js +3 -0
- package/build/components/StatusChip/StatusChip.d.ts +1 -2
- package/build/components/StatusChip/StatusChip.js +10 -5
- package/build/components/StatusChip/constants.d.ts +5 -0
- package/build/components/StatusChip/constants.js +5 -0
- package/build/components/StatusChip/style.d.ts +1 -0
- package/build/components/StatusChip/type.d.ts +1 -0
- package/build/components/StatusGroupChips/style.d.ts +12 -1
- package/build/components/StatusIcons/GeographyIcon/GeographyIcon.d.ts +1 -1
- package/build/components/StatusIcons/index.d.ts +0 -1
- package/build/components/StatusIcons/index.js +0 -1
- package/build/components/TableCells/CustomCells/StatusCell/constant.js +1 -1
- package/build/components/Toolbar/style.d.ts +4 -4
- package/build/components/ToolbarIcon/MaximizeIcon/MaximizeIcon.d.ts +1 -1
- package/build/components/index.d.ts +2 -1
- package/build/components/index.js +2 -1
- package/build/constants/assets.d.ts +1 -0
- package/build/constants/assets.js +1 -0
- package/build/constants/table/cell/chargeTableCellWidth.d.ts +1 -1
- package/build/constants/table/cell/chargeTableCellWidth.js +1 -1
- package/build/types/user.d.ts +1 -0
- package/package.json +3 -3
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,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AppWindowHeaderProps } from './type';
|
|
3
|
+
declare function AppWindowHeader({ isMaximized, id, isToolbarAnimationDisabled, title, leftActions, onClose, onMaximize, sx }: AppWindowHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const _default: import("react").MemoExoticComponent<typeof AppWindowHeader>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { motion } from 'framer-motion';
|
|
4
|
+
import { useMouseState } from '../../../../hooks/index.js';
|
|
5
|
+
import { animationDuration } from '../../AppWindow/constant';
|
|
6
|
+
import AppWindowHeaderBase from './AppWindowHeaderBase';
|
|
7
|
+
import { CloseIcon, MaximizeIcon } from '../../../ToolbarIcon';
|
|
8
|
+
function AppWindowHeader({ isMaximized, id, isToolbarAnimationDisabled, title, leftActions, onClose, onMaximize, sx }) {
|
|
9
|
+
const { isHovered, onMouseEnter, onMouseLeave } = useMouseState();
|
|
10
|
+
return (_jsx(motion.div, Object.assign({ style: Object.assign({}, (isMaximized && {
|
|
11
|
+
height: 0,
|
|
12
|
+
zIndex: 1000,
|
|
13
|
+
position: 'relative',
|
|
14
|
+
})), animate: Object.assign(Object.assign({}, (isMaximized && {
|
|
15
|
+
width: '100vw',
|
|
16
|
+
})), (!isMaximized && {
|
|
17
|
+
transform: 'translateX(0px)',
|
|
18
|
+
width: '100%',
|
|
19
|
+
})), transition: Object.assign({ duration: animationDuration }, (isToolbarAnimationDisabled && {
|
|
20
|
+
duration: 0,
|
|
21
|
+
})) }, { children: _jsx(AppWindowHeaderBase, { title: title, maximized: isMaximized, id: id || 'draggable-dialog-title', isHovered: isHovered, onMouseHover: onMouseEnter, onMouseLeave: onMouseLeave, leftActions: leftActions || (_jsxs(_Fragment, { children: [_jsx(CloseIcon, { onClick: onClose }), _jsx(MaximizeIcon, { isMaximized: isMaximized, onClick: () => onMaximize === null || onMaximize === void 0 ? void 0 : onMaximize(!isMaximized) })] })), sx: sx }) })));
|
|
22
|
+
}
|
|
23
|
+
export default memo(AppWindowHeader);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AppWindowHeaderBaseProps } from './type';
|
|
3
|
+
declare function AppWindowHeaderBase({ title, maximized, id, isHovered, onMouseHover, onMouseLeave, leftActions, sandboxMode, titleIconSrc, sx, ...rootProps }: AppWindowHeaderBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const _default: import("react").MemoExoticComponent<typeof AppWindowHeaderBase>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 Toolbar from '../../../Toolbar';
|
|
15
|
+
import { StyledHeaderWrapperStyled } from '../../../Toolbar/style';
|
|
16
|
+
function AppWindowHeaderBase(_a) {
|
|
17
|
+
var { title, maximized = false, id, isHovered = false, onMouseHover, onMouseLeave, leftActions, sandboxMode = false, titleIconSrc, sx } = _a, rootProps = __rest(_a, ["title", "maximized", "id", "isHovered", "onMouseHover", "onMouseLeave", "leftActions", "sandboxMode", "titleIconSrc", "sx"]);
|
|
18
|
+
return (_jsx(StyledHeaderWrapperStyled, Object.assign({ className: "header-wrapper", id: id, maximized: maximized || false, sandboxMode: sandboxMode, sx: sx }, rootProps, { children: _jsx(Toolbar, { onMouseEnter: onMouseHover, onMouseLeave: onMouseLeave, isMaximized: maximized, isHovered: isHovered, title: title || '', icon: titleIconSrc, leftActions: leftActions }) })));
|
|
19
|
+
}
|
|
20
|
+
export default memo(AppWindowHeaderBase);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StyledHeaderWrapperStyled, ToolbarProps } from '../../../Toolbar';
|
|
2
|
+
import type { SxProps, Theme } from '@mui/material/styles';
|
|
3
|
+
import { ReactNode, SyntheticEvent } from 'react';
|
|
4
|
+
export type AppWindowHeaderBaseProps = React.ComponentProps<typeof StyledHeaderWrapperStyled> & {
|
|
5
|
+
title?: string;
|
|
6
|
+
maximized?: boolean;
|
|
7
|
+
id?: string;
|
|
8
|
+
isHovered?: boolean;
|
|
9
|
+
onMouseHover?: (e: SyntheticEvent) => void;
|
|
10
|
+
onMouseLeave?: (e: SyntheticEvent) => void;
|
|
11
|
+
leftActions?: ToolbarProps['leftActions'];
|
|
12
|
+
titleIconSrc?: ToolbarProps['icon'];
|
|
13
|
+
};
|
|
14
|
+
export type AppWindowHeaderProps = {
|
|
15
|
+
id?: string;
|
|
16
|
+
isToolbarAnimationDisabled?: boolean;
|
|
17
|
+
isMaximized?: boolean;
|
|
18
|
+
title?: string;
|
|
19
|
+
leftActions?: ReactNode;
|
|
20
|
+
onClose?: () => void;
|
|
21
|
+
onMaximize?: (isMaximized: boolean) => void;
|
|
22
|
+
headerBaseProps?: Partial<AppWindowHeaderBaseProps>;
|
|
23
|
+
headerBaseStyles?: SxProps<Theme>;
|
|
24
|
+
sx?: AppWindowHeaderBaseProps['sx'];
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import AppWindowWrapper from './AppWindowWrapper';
|
|
2
2
|
export { default as AppWindow, type WindowProps, LEFT_SIDEBAR, RIGHT_SIDEBAR, VIEWER_HEIGHT, VIEWER_WIDTH, animationDuration, FOOTER_HEIGHT, StyledFooter, StyledHideButton, StyledMenuLink, StyledSubmitButton, SubmitButtonWrapper, } from './AppWindow';
|
|
3
3
|
export * from './headers/AccountHeader';
|
|
4
|
+
export * from './headers/AppWindowHeader';
|
|
5
|
+
export { default as AppWindowHeader } from './headers/AppWindowHeader';
|
|
4
6
|
export * from './context';
|
|
5
7
|
export type { AppWindowProps } from './type';
|
|
6
8
|
export default AppWindowWrapper;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import AppWindowWrapper from './AppWindowWrapper';
|
|
2
2
|
export { default as AppWindow, LEFT_SIDEBAR, RIGHT_SIDEBAR, VIEWER_HEIGHT, VIEWER_WIDTH, animationDuration, FOOTER_HEIGHT, StyledFooter, StyledHideButton, StyledMenuLink, StyledSubmitButton, SubmitButtonWrapper, } from './AppWindow';
|
|
3
3
|
export * from './headers/AccountHeader';
|
|
4
|
+
export * from './headers/AppWindowHeader';
|
|
5
|
+
export { default as AppWindowHeader } from './headers/AppWindowHeader';
|
|
4
6
|
export * from './context';
|
|
5
7
|
export default AppWindowWrapper;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StatusChipProps } from '../../StatusChip';
|
|
2
|
+
export type AuthenticationChipType = 'issuer' | 'scheme' | 'device' | 'app' | 'wallet' | '3DS' | 'Device Biometric' | 'Non-3DS';
|
|
3
|
+
interface AuthenticationChipProps extends Omit<StatusChipProps, 'children'> {
|
|
4
|
+
authenticationType?: AuthenticationChipType;
|
|
5
|
+
}
|
|
6
|
+
declare const AuthenticationChip: ({ authenticationType, unknownText, ...props }: AuthenticationChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default AuthenticationChip;
|
|
@@ -0,0 +1,31 @@
|
|
|
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 StatusChip from '../../StatusChip';
|
|
14
|
+
import { authenticationColors } from './constants';
|
|
15
|
+
const authenticationTypeMap = {
|
|
16
|
+
issuer: 'Issuer',
|
|
17
|
+
scheme: 'Scheme',
|
|
18
|
+
device: 'Device',
|
|
19
|
+
app: 'App',
|
|
20
|
+
wallet: 'Wallet',
|
|
21
|
+
'Device Biometric': 'Biometric',
|
|
22
|
+
'3DS': '3DS',
|
|
23
|
+
'Non-3DS': 'Non-3DS',
|
|
24
|
+
};
|
|
25
|
+
const AuthenticationChip = (_a) => {
|
|
26
|
+
var { authenticationType, unknownText = 'noAuth' } = _a, props = __rest(_a, ["authenticationType", "unknownText"]);
|
|
27
|
+
const statusText = authenticationType && authenticationTypeMap[authenticationType];
|
|
28
|
+
const chipColors = authenticationType && authenticationColors[authenticationType];
|
|
29
|
+
return (_jsx(StatusChip, Object.assign({}, chipColors, { unknownText: unknownText }, props, { children: statusText })));
|
|
30
|
+
};
|
|
31
|
+
export default AuthenticationChip;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface AuthenticationColors {
|
|
2
|
+
bgColor: string;
|
|
3
|
+
borderColor?: string;
|
|
4
|
+
textColor?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const authenticationColors: {
|
|
7
|
+
issuer: {
|
|
8
|
+
bgColor: string;
|
|
9
|
+
textColor: string;
|
|
10
|
+
};
|
|
11
|
+
scheme: {
|
|
12
|
+
bgColor: string;
|
|
13
|
+
textColor: string;
|
|
14
|
+
};
|
|
15
|
+
app: {
|
|
16
|
+
bgColor: string;
|
|
17
|
+
textColor: string;
|
|
18
|
+
};
|
|
19
|
+
wallet: {
|
|
20
|
+
bgColor: string;
|
|
21
|
+
textColor: string;
|
|
22
|
+
};
|
|
23
|
+
device: {};
|
|
24
|
+
'Device Biometric': {
|
|
25
|
+
bgColor: string;
|
|
26
|
+
textColor: string;
|
|
27
|
+
};
|
|
28
|
+
'3DS': {};
|
|
29
|
+
'Non-3DS': {};
|
|
30
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const authenticationColors = {
|
|
2
|
+
issuer: {
|
|
3
|
+
bgColor: '#1F88D033',
|
|
4
|
+
textColor: '#1F88D0',
|
|
5
|
+
},
|
|
6
|
+
scheme: {
|
|
7
|
+
bgColor: '#5E30EB33',
|
|
8
|
+
textColor: '#5E30EB',
|
|
9
|
+
},
|
|
10
|
+
app: {
|
|
11
|
+
bgColor: '#AF2D6F33',
|
|
12
|
+
textColor: '#AF2D6F',
|
|
13
|
+
},
|
|
14
|
+
wallet: {
|
|
15
|
+
bgColor: '#18AA3333',
|
|
16
|
+
textColor: '#18AA33',
|
|
17
|
+
},
|
|
18
|
+
device: {},
|
|
19
|
+
'Device Biometric': {
|
|
20
|
+
bgColor: '#F0820033',
|
|
21
|
+
textColor: '#F08200',
|
|
22
|
+
},
|
|
23
|
+
'3DS': {},
|
|
24
|
+
'Non-3DS': {},
|
|
25
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StatusChipProps } from '../../StatusChip';
|
|
2
|
+
import { GeographyVariant } from '../../../types/index.js';
|
|
3
|
+
interface GeographyChipProps extends Omit<StatusChipProps, 'children'> {
|
|
4
|
+
geographyVariant?: GeographyVariant;
|
|
5
|
+
}
|
|
6
|
+
declare const GeographyChip: ({ geographyVariant, ...props }: GeographyChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default GeographyChip;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 StatusChip from '../../StatusChip';
|
|
14
|
+
import { geographyMap } from '../../../utils/index.js';
|
|
15
|
+
import { geographyColors } from './constants';
|
|
16
|
+
const GeographyChip = (_a) => {
|
|
17
|
+
var { geographyVariant } = _a, props = __rest(_a, ["geographyVariant"]);
|
|
18
|
+
const statusText = geographyVariant && geographyMap[geographyVariant];
|
|
19
|
+
const chipColors = geographyVariant && geographyColors[geographyVariant];
|
|
20
|
+
return (_jsx(StatusChip, Object.assign({}, chipColors, props, { children: statusText })));
|
|
21
|
+
};
|
|
22
|
+
export default GeographyChip;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StatusChipProps } from '../../StatusChip';
|
|
2
|
+
export type PaymentAgreementType = 'ORDER' | 'SAVED_CARD' | 'SUBSCRIPTION' | 'INSTALLMENT' | undefined;
|
|
3
|
+
interface PaymentAgreementChipProps extends Omit<StatusChipProps, 'children'> {
|
|
4
|
+
agreementType?: PaymentAgreementType;
|
|
5
|
+
}
|
|
6
|
+
declare const PaymentAgreementChip: ({ agreementType, unknownText, ...props }: PaymentAgreementChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default PaymentAgreementChip;
|
|
@@ -0,0 +1,21 @@
|
|
|
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 StatusChip from '../../StatusChip';
|
|
14
|
+
import { agreementTypeMap, paymentAgreementColors } from './constants';
|
|
15
|
+
const PaymentAgreementChip = (_a) => {
|
|
16
|
+
var { agreementType, unknownText = 'noAgreement' } = _a, props = __rest(_a, ["agreementType", "unknownText"]);
|
|
17
|
+
const statusText = agreementType && agreementTypeMap[agreementType];
|
|
18
|
+
const chipColors = agreementType && paymentAgreementColors[agreementType];
|
|
19
|
+
return (_jsx(StatusChip, Object.assign({}, chipColors, { unknownText: unknownText }, props, { children: statusText })));
|
|
20
|
+
};
|
|
21
|
+
export default PaymentAgreementChip;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface PaymentAgreementColors {
|
|
2
|
+
bgColor: string;
|
|
3
|
+
borderColor?: string;
|
|
4
|
+
textColor?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const paymentAgreementColors: {
|
|
7
|
+
ORDER: {
|
|
8
|
+
bgColor: string;
|
|
9
|
+
textColor: string;
|
|
10
|
+
};
|
|
11
|
+
SAVED_CARD: {
|
|
12
|
+
bgColor: string;
|
|
13
|
+
textColor: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const agreementTypeMap: {
|
|
17
|
+
ORDER: string;
|
|
18
|
+
SAVED_CARD: string;
|
|
19
|
+
SUBSCRIPTION: string;
|
|
20
|
+
INSTALLMENT: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const paymentAgreementColors = {
|
|
2
|
+
ORDER: {
|
|
3
|
+
bgColor: '#5E30EB33',
|
|
4
|
+
textColor: '#5E30EB',
|
|
5
|
+
},
|
|
6
|
+
SAVED_CARD: {
|
|
7
|
+
bgColor: '#76BB4033',
|
|
8
|
+
textColor: '#76BB40',
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
export const agreementTypeMap = {
|
|
12
|
+
ORDER: 'Order',
|
|
13
|
+
SAVED_CARD: 'Saved card',
|
|
14
|
+
SUBSCRIPTION: 'Subscription',
|
|
15
|
+
INSTALLMENT: 'Installment',
|
|
16
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ChipProps } from './type';
|
|
3
|
-
declare const StatusChip:
|
|
2
|
+
declare const StatusChip: ({ children, unknownText, ...props }: ChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default StatusChip;
|
|
@@ -10,10 +10,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import {
|
|
13
|
+
import { useTranslation } from 'react-i18next';
|
|
14
|
+
import { unknownGeographyColors } from './constants';
|
|
14
15
|
import { ChipStyled } from './style';
|
|
15
|
-
const StatusChip =
|
|
16
|
-
var { children } = _a, props = __rest(_a, ["children"]);
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const StatusChip = (_a) => {
|
|
17
|
+
var { children, unknownText } = _a, props = __rest(_a, ["children", "unknownText"]);
|
|
18
|
+
const { t } = useTranslation();
|
|
19
|
+
if (!children) {
|
|
20
|
+
return (_jsx(ChipStyled, Object.assign({}, unknownGeographyColors, props, { children: unknownText ? t(unknownText) : t('unknown') })));
|
|
21
|
+
}
|
|
22
|
+
return _jsx(ChipStyled, Object.assign({}, props, { children: children }));
|
|
23
|
+
};
|
|
19
24
|
export default StatusChip;
|
|
@@ -7,6 +7,7 @@ export declare const ChipStyled: import("@emotion/styled").StyledComponent<impor
|
|
|
7
7
|
borderColor?: string | undefined;
|
|
8
8
|
disabled?: boolean | undefined;
|
|
9
9
|
padding?: string | undefined;
|
|
10
|
+
unknownText?: string | undefined;
|
|
10
11
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
11
12
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
12
13
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
|
|
@@ -2,4 +2,15 @@
|
|
|
2
2
|
export declare const StyledContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
3
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
4
|
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
|
-
export declare const StyledStatusChip: import("@emotion/styled").StyledComponent<
|
|
5
|
+
export declare const StyledStatusChip: import("@emotion/styled").StyledComponent<{
|
|
6
|
+
textColor?: string | undefined;
|
|
7
|
+
bgColor?: string | undefined;
|
|
8
|
+
borderColor?: string | undefined;
|
|
9
|
+
disabled?: boolean | undefined;
|
|
10
|
+
padding?: string | undefined;
|
|
11
|
+
unknownText?: string | undefined;
|
|
12
|
+
} & import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
13
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
14
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
|
|
15
|
+
children?: import("react").ReactNode;
|
|
16
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const GeographyIcon: ({ geographyVariant, countryCode, isTextShown, }: {
|
|
2
|
-
geographyVariant?: "
|
|
2
|
+
geographyVariant?: "G" | "L" | "R" | undefined;
|
|
3
3
|
countryCode?: string | undefined;
|
|
4
4
|
isTextShown?: boolean | undefined;
|
|
5
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { default as AgreementIcon, type AgreementIconProps } from './AgreementIcon';
|
|
2
2
|
export { default as AuthIcons, type AuthIconsProps, AuthSourceAnimation } from './AuthIcons';
|
|
3
|
-
export { default as AuthorizationAutoIcons, VoidAutoIcon } from './AuthorizationAutoIcons';
|
|
4
3
|
export { AuthorizedIcon } from './AuthorizedIcon';
|
|
5
4
|
export { ChargeStatusIcon } from './ChargeStatusIcon';
|
|
6
5
|
export { CustomerInitiatedIcon } from './CustomerInitiated';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { default as AgreementIcon } from './AgreementIcon';
|
|
2
2
|
export { default as AuthIcons, AuthSourceAnimation } from './AuthIcons';
|
|
3
|
-
export { default as AuthorizationAutoIcons, VoidAutoIcon } from './AuthorizationAutoIcons';
|
|
4
3
|
export { AuthorizedIcon } from './AuthorizedIcon';
|
|
5
4
|
export { ChargeStatusIcon } from './ChargeStatusIcon';
|
|
6
5
|
export { CustomerInitiatedIcon } from './CustomerInitiated';
|
|
@@ -9,8 +9,8 @@ export declare const StyledBox: import("@emotion/styled").StyledComponent<import
|
|
|
9
9
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
10
10
|
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
11
11
|
export declare const StyledHeaderWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
12
|
-
sandboxMode
|
|
13
|
-
maximized
|
|
12
|
+
sandboxMode?: boolean | undefined;
|
|
13
|
+
maximized?: boolean | undefined;
|
|
14
14
|
isDragging?: boolean | undefined;
|
|
15
15
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
16
16
|
export declare const ToolbarStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
@@ -20,7 +20,7 @@ export declare const ToolbarStyled: import("@emotion/styled").StyledComponent<im
|
|
|
20
20
|
isHovered?: boolean | undefined;
|
|
21
21
|
}, {}, {}>;
|
|
22
22
|
export declare const StyledHeaderWrapperStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
23
|
-
sandboxMode
|
|
24
|
-
maximized
|
|
23
|
+
sandboxMode?: boolean | undefined;
|
|
24
|
+
maximized?: boolean | undefined;
|
|
25
25
|
isDragging?: boolean | undefined;
|
|
26
26
|
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, {}, {}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BoxProps } from '@mui/material/Box';
|
|
2
2
|
interface MaximizeIconProps extends BoxProps {
|
|
3
|
-
isMaximized
|
|
3
|
+
isMaximized?: boolean;
|
|
4
4
|
}
|
|
5
5
|
export declare function MaximizeIcon({ isMaximized, ...props }: MaximizeIconProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as AccordionAdapter } from './AccordionAdapter';
|
|
2
2
|
export { default as ActionMenu, ActionMenuDropDown, ActionMenuItem, type ActionMenuProps } from './ActionMenu';
|
|
3
3
|
export { default as ActivityAreaChart, type ActivityAreaChartProps, type ChartDataPoint, ChartTooltip, type ChartTooltipProps, LoadingChart, type PayloadItem, } from './ActivityAreaChart';
|
|
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';
|
|
4
|
+
export { default as AppWindowWrapper, type AccountHeaderProps, AccountHeaderTitle, AppWindowHeader, type AppWindowHeaderProps, type AppWindowHeaderBaseProps, 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
6
|
export { default as Button, PlusButton, StyledButton } from './Button';
|
|
7
7
|
export { default as Calender, type CalenderProps, type DateObject } from './Calender';
|
|
@@ -94,3 +94,4 @@ export * from './StatusGroupChips';
|
|
|
94
94
|
export * from './TableHeader';
|
|
95
95
|
export { default as RangeCalender } from './RangeCalender';
|
|
96
96
|
export { default as AppServices } from './AppServices';
|
|
97
|
+
export * from './SourceChips';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as AccordionAdapter } from './AccordionAdapter';
|
|
2
2
|
export { default as ActionMenu, ActionMenuDropDown, ActionMenuItem } from './ActionMenu';
|
|
3
3
|
export { default as ActivityAreaChart, ChartTooltip, LoadingChart, } from './ActivityAreaChart';
|
|
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';
|
|
4
|
+
export { default as AppWindowWrapper, AccountHeaderTitle, AppWindowHeader, 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
6
|
export { default as Button, PlusButton, StyledButton } from './Button';
|
|
7
7
|
export { default as Calender } from './Calender';
|
|
@@ -94,3 +94,4 @@ export * from './StatusGroupChips';
|
|
|
94
94
|
export * from './TableHeader';
|
|
95
95
|
export { default as RangeCalender } from './RangeCalender';
|
|
96
96
|
export { default as AppServices } from './AppServices';
|
|
97
|
+
export * from './SourceChips';
|
|
@@ -515,3 +515,4 @@ export const dashedOutlinedCircle = `${lightUrl}/dashedOutlinedCircle.svg`;
|
|
|
515
515
|
export const deactivatedCircle = `${lightUrl}/deactivatedCircle.svg`;
|
|
516
516
|
export const exclamationOutlinedCircle = `${lightUrl}/exclamationOutlinedCircle.svg`;
|
|
517
517
|
export const outlinedCircle = `${lightUrl}/outlinedCircle.svg`;
|
|
518
|
+
export const greenCheck2ACE00 = `${lightUrl}/greenCheck2ACE00.svg`;
|
package/build/types/user.d.ts
CHANGED
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.0.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.0.248-test.2",
|
|
5
|
+
"testVersion": 2,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|
|
@@ -131,4 +131,4 @@
|
|
|
131
131
|
"publishConfig": {
|
|
132
132
|
"registry": "https://registry.npmjs.org/"
|
|
133
133
|
}
|
|
134
|
-
}
|
|
134
|
+
}
|