@tap-payments/os-micro-frontend-shared 0.1.33-test.2 → 0.1.33-test.5
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/StatusButton/constant.d.ts +0 -1
- package/build/components/StatusButton/constant.js +1 -2
- package/build/components/StatusButton/style.d.ts +2 -2
- package/build/components/Window/Window.js +2 -16
- package/build/components/Window/style.d.ts +1 -1
- package/build/components/Window/style.js +15 -6
- package/build/constants/assets.d.ts +0 -1
- package/build/constants/assets.js +0 -1
- package/build/types/table.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, searchIcon, chevronDownIcon, unAuthorizedIcon, settlementInitiatedIcon, unCapturedIcon, capturedIcon, authorizedIcon, openFlagIcon, closedFlagIcon, reverseActionIcon, authenticatedIcon, unauthenticatedIcon, paidOutFilterIcon, scheduledFilterIcon,
|
|
1
|
+
import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, searchIcon, chevronDownIcon, unAuthorizedIcon, settlementInitiatedIcon, unCapturedIcon, capturedIcon, authorizedIcon, openFlagIcon, closedFlagIcon, reverseActionIcon, authenticatedIcon, unauthenticatedIcon, paidOutFilterIcon, scheduledFilterIcon, } from '../../constants/index.js';
|
|
2
2
|
export const statusButtonIcons = {
|
|
3
3
|
inProgress: initiatedIcon,
|
|
4
4
|
initiated: initiatedIcon,
|
|
@@ -19,5 +19,4 @@ export const statusButtonIcons = {
|
|
|
19
19
|
authenticated: authenticatedIcon,
|
|
20
20
|
paidOut: paidOutFilterIcon,
|
|
21
21
|
scheduled: scheduledFilterIcon,
|
|
22
|
-
checked: completedBlackIcon,
|
|
23
22
|
};
|
|
@@ -20,7 +20,7 @@ export declare const CountBadge: import("@emotion/styled").StyledComponent<impor
|
|
|
20
20
|
}, {}, {}>;
|
|
21
21
|
export declare const StatusIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
22
22
|
variant: StatusButtonVariant;
|
|
23
|
-
icon?: "search" | "scheduled" | "paidOut" | "reversed" | "
|
|
23
|
+
icon?: "search" | "scheduled" | "paidOut" | "reversed" | "initiated" | "captured" | "unCaptured" | "inProgress" | "abandoned" | "cancelled" | "authorized" | "unauthenticated" | "authenticated" | "unSettled" | "reports" | "chevronDown" | "unAuthorized" | "openFlag" | "closedFlag" | undefined;
|
|
24
24
|
}, React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
25
25
|
export declare const StyledFilterName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
26
26
|
export declare const StyledDropdown: import("@emotion/styled").StyledComponent<import("../DropdownMenu").IProps & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
|
|
@@ -35,5 +35,5 @@ export declare const LabelWrapper: import("@emotion/styled").StyledComponent<imp
|
|
|
35
35
|
}, keyof import("@mui/system").BoxOwnProps<Theme>> & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
|
|
36
36
|
export declare const StyledStatusIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
37
37
|
variant: StatusButtonVariant;
|
|
38
|
-
icon?: "search" | "scheduled" | "paidOut" | "reversed" | "
|
|
38
|
+
icon?: "search" | "scheduled" | "paidOut" | "reversed" | "initiated" | "captured" | "unCaptured" | "inProgress" | "abandoned" | "cancelled" | "authorized" | "unauthenticated" | "authenticated" | "unSettled" | "reports" | "chevronDown" | "unAuthorized" | "openFlag" | "closedFlag" | undefined;
|
|
39
39
|
}, React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
@@ -3,9 +3,8 @@ import { memo, useMemo, useState, useRef, useEffect } from 'react';
|
|
|
3
3
|
import { motion } from 'framer-motion';
|
|
4
4
|
import { Resizable } from 're-resizable';
|
|
5
5
|
import { APP_WINDOW_Z_INDEX, FOOTER_HEIGHT, HEADER_HEIGHT } from '../../constants/index.js';
|
|
6
|
-
import { contentStyle, ContentWrapper,
|
|
6
|
+
import { contentStyle, ContentWrapper, initialStyle, resizableMainStyle, AppContainerWrapper, AppContainerContainer } from './style';
|
|
7
7
|
function WindowWrapper({ children, id, onResize, isMaximized, isMinimized, dragControls, onClick, options: { width, height, minHeight, minWidth, maxHeight, maxWidth, order, openOrder = 1 }, }) {
|
|
8
|
-
var _a, _b, _c, _d;
|
|
9
8
|
const [isDrag, setIsDrag] = useState(true);
|
|
10
9
|
const modalRef = useRef(null);
|
|
11
10
|
const constraintsRef = useRef(null);
|
|
@@ -20,19 +19,6 @@ function WindowWrapper({ children, id, onResize, isMaximized, isMinimized, dragC
|
|
|
20
19
|
const resizableStyle = useMemo(() => (Object.assign(Object.assign(Object.assign({}, resizableMainStyle), { maxWidth: width, borderRadius: !isMaximized ? 12 : '0 !important' }), (!isMaximized && {
|
|
21
20
|
top: 0,
|
|
22
21
|
}))), [isMaximized, width]);
|
|
23
|
-
const dragConstraints = useMemo(() => {
|
|
24
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
25
|
-
return ({
|
|
26
|
-
right: Number((_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) + Number((_b = modalRef.current) === null || _b === void 0 ? void 0 : _b.offsetLeft) - 10,
|
|
27
|
-
left: -(Number((_c = modalRef.current) === null || _c === void 0 ? void 0 : _c.clientWidth) + Number((_d = modalRef.current) === null || _d === void 0 ? void 0 : _d.offsetLeft) - 10),
|
|
28
|
-
top: -(Number((_e = modalRef.current) === null || _e === void 0 ? void 0 : _e.clientHeight) + Number((_f = constraintsRef.current) === null || _f === void 0 ? void 0 : _f.offsetTop) - 10),
|
|
29
|
-
bottom: Number((_g = modalRef.current) === null || _g === void 0 ? void 0 : _g.clientHeight) +
|
|
30
|
-
Number((_j = (_h = constraintsRef.current) === null || _h === void 0 ? void 0 : _h.parentElement) === null || _j === void 0 ? void 0 : _j.offsetHeight) -
|
|
31
|
-
Number((_k = constraintsRef.current) === null || _k === void 0 ? void 0 : _k.offsetTop) -
|
|
32
|
-
Number((_l = modalRef.current) === null || _l === void 0 ? void 0 : _l.offsetHeight) -
|
|
33
|
-
10,
|
|
34
|
-
});
|
|
35
|
-
}, [(_a = constraintsRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight, (_b = constraintsRef.current) === null || _b === void 0 ? void 0 : _b.offsetWidth, (_c = modalRef.current) === null || _c === void 0 ? void 0 : _c.clientWidth, (_d = modalRef.current) === null || _d === void 0 ? void 0 : _d.clientHeight]);
|
|
36
22
|
useEffect(() => {
|
|
37
23
|
var _a;
|
|
38
24
|
(_a = resizableRef.current) === null || _a === void 0 ? void 0 : _a.updateSize({
|
|
@@ -40,7 +26,7 @@ function WindowWrapper({ children, id, onResize, isMaximized, isMinimized, dragC
|
|
|
40
26
|
height: isMaximized ? '100vh' : '100%',
|
|
41
27
|
});
|
|
42
28
|
}, [isMaximized]);
|
|
43
|
-
return (_jsx(AppContainerWrapper, Object.assign({ id: "app-container-wrapper", "data-testid": "AppContainerWrapper" }, { children: _jsx(AppContainerContainer, Object.assign({ "data-testid": "AppContainerContainer" }, { children: _jsx(motion.div, Object.assign({ id: "app-content", "data-add-id": id, "data-testid": "AppContent", ref: constraintsRef, initial:
|
|
29
|
+
return (_jsx(AppContainerWrapper, Object.assign({ id: "app-container-wrapper", "data-testid": "AppContainerWrapper" }, { children: _jsx(AppContainerContainer, Object.assign({ "data-testid": "AppContainerContainer" }, { children: _jsx(motion.div, Object.assign({ id: "app-content", "data-add-id": id, "data-testid": "AppContent", ref: constraintsRef, initial: initialStyle }, { children: _jsx(ContentWrapper, Object.assign({ id: "content-wrapper", drag: !isMaximized && isDrag, dragMomentum: false, dragConstraints: constraintsRef, onDragStart: onClick, onDragEnter: onClick, onClick: onClick, dragControls: dragControls, dragListener: false, style: Object.assign(Object.assign(Object.assign({}, (order && {
|
|
44
30
|
zIndex: Number(order) + APP_WINDOW_Z_INDEX,
|
|
45
31
|
})), contentStyle), { height }), initial: Object.assign({ marginInline: 'auto', scale: 0, left: 0 }, (!isMaximized && {
|
|
46
32
|
left: 48 * (openOrder - 1),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
export declare const resizableMainStyle: CSSProperties;
|
|
3
3
|
export declare const contentStyle: CSSProperties;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const initialStyle: any;
|
|
5
5
|
export declare const ContentWrapper: import("@emotion/styled").StyledComponent<{
|
|
6
6
|
hidden?: boolean | undefined;
|
|
7
7
|
id?: string | undefined;
|
|
@@ -19,7 +19,7 @@ export const contentStyle = {
|
|
|
19
19
|
overflow: 'visible',
|
|
20
20
|
borderRadius: '12px',
|
|
21
21
|
};
|
|
22
|
-
export const
|
|
22
|
+
export const initialStyle = {
|
|
23
23
|
width: 'inherit',
|
|
24
24
|
height: 'inherit',
|
|
25
25
|
gridRowStart: 1,
|
|
@@ -30,15 +30,24 @@ export const initalStyle = {
|
|
|
30
30
|
};
|
|
31
31
|
export const ContentWrapper = styled(motion.div, {
|
|
32
32
|
shouldForwardProp: (props) => props !== 'maximized',
|
|
33
|
-
})(({ maximized }) => (Object.assign({ overflow: 'hidden', display: 'flex', flexDirection: 'column',
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
})(({ maximized }) => (Object.assign({ overflow: 'hidden', display: 'flex', flexDirection: 'column', zIndex: 1, position: 'fixed', top: 0, left: 0 }, (maximized
|
|
34
|
+
? {
|
|
35
|
+
width: '100vw',
|
|
36
|
+
height: '100vh',
|
|
37
|
+
borderRadius: 0,
|
|
38
|
+
transform: 'translate(0,0) !important',
|
|
39
|
+
}
|
|
40
|
+
: {
|
|
41
|
+
width: 'auto',
|
|
42
|
+
height: 'auto',
|
|
43
|
+
borderRadius: 12,
|
|
44
|
+
}))));
|
|
36
45
|
export const AppContainerWrapper = styled(Box)(() => ({
|
|
37
46
|
flexGrow: 1,
|
|
38
47
|
}));
|
|
39
48
|
export const AppContainerContainer = styled(motion.div)(() => ({
|
|
40
|
-
width: '
|
|
41
|
-
height: '
|
|
49
|
+
width: '100vw',
|
|
50
|
+
height: '100vh',
|
|
42
51
|
overflow: 'hidden',
|
|
43
52
|
flexGrow: 1,
|
|
44
53
|
position: 'relative',
|
|
@@ -309,7 +309,6 @@ export declare const destinationSuccessTableIcon: string;
|
|
|
309
309
|
export declare const authenticationFailedTableIcon: string;
|
|
310
310
|
export declare const authenticatedIcon: string;
|
|
311
311
|
export declare const scheduledFilterIcon: string;
|
|
312
|
-
export declare const completedBlackIcon: string;
|
|
313
312
|
export declare const paidOutFilterIcon: string;
|
|
314
313
|
export declare const unauthenticatedIcon: string;
|
|
315
314
|
export declare const authenticationAttemptedIcon: string;
|
|
@@ -313,7 +313,6 @@ export const destinationSuccessTableIcon = `${appBaseUrl}/destinationSuccess.svg
|
|
|
313
313
|
export const authenticationFailedTableIcon = `${lightUrl}/status/authenticationFailed.svg`;
|
|
314
314
|
export const authenticatedIcon = `${lightUrl}/status/table/authenticated.svg`;
|
|
315
315
|
export const scheduledFilterIcon = `${lightUrl}/paidOutFilterIcon.svg`;
|
|
316
|
-
export const completedBlackIcon = `${lightUrl}/completedBlackIcon.svg`;
|
|
317
316
|
export const paidOutFilterIcon = `${lightUrl}/scheduledFilterIcon.svg`;
|
|
318
317
|
export const unauthenticatedIcon = `${lightUrl}/status/unauthenticated.svg`;
|
|
319
318
|
export const authenticationAttemptedIcon = `${lightUrl}/status/authenticationAttempted.svg`;
|
package/build/types/table.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface TableStatus<T> {
|
|
|
19
19
|
filterStatus: T;
|
|
20
20
|
totalCount?: number;
|
|
21
21
|
}
|
|
22
|
-
export type TableHeaderStatus = 'all' | 'initiated' | 'captured' | 'unCaptured' | 'inProgress' | 'abandoned' | 'cancelled' | 'reversed' | 'unsettled' | 'unauthorized' | 'completed' | 'authorized' | 'refunded' | 'paidOut' | 'pending' | 'cleared' | 'open' | 'revered' | 'unauthenticated' | 'authenticated' | 'issued' | 'drafted' | 'scheduled' | 'paid' | 'outstanding' | 'draft' | 'expired' | 'transacted' | 'settled' | 'unSettled' | 'summary' | 'chargeSettlements' | 'refundSettlements' | 'destinationSettlements' | 'chargebackSettlements' | 'used' | 'active' | 'expired' | 'consumed' | 'notActive' | 'signedUp' |
|
|
22
|
+
export type TableHeaderStatus = 'all' | 'initiated' | 'captured' | 'unCaptured' | 'inProgress' | 'abandoned' | 'cancelled' | 'reversed' | 'unsettled' | 'unauthorized' | 'completed' | 'authorized' | 'refunded' | 'paidOut' | 'pending' | 'cleared' | 'open' | 'revered' | 'unauthenticated' | 'authenticated' | 'issued' | 'drafted' | 'scheduled' | 'paid' | 'outstanding' | 'draft' | 'expired' | 'transacted' | 'settled' | 'unSettled' | 'summary' | 'chargeSettlements' | 'refundSettlements' | 'destinationSettlements' | 'chargebackSettlements' | 'used' | 'active' | 'expired' | 'consumed' | 'notActive' | 'signedUp' | (string & {}) | undefined;
|
|
23
23
|
export interface IColumnProps<R = any> {
|
|
24
24
|
header?: string | (() => React.ReactNode);
|
|
25
25
|
render?: (props: IRenderAttr<R, IColumnProps<R>>) => React.ReactNode;
|
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.33-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.33-test.5",
|
|
5
|
+
"testVersion": 5,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|