@tap-payments/os-micro-frontend-shared 0.1.370 → 0.1.372
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/AppWindowWrapper/AppWindow/AppWindow.d.ts +1 -1
- package/build/components/AppWindowWrapper/AppWindow/AppWindow.js +2 -2
- package/build/components/AppWindowWrapper/AppWindow/type.d.ts +2 -0
- package/build/components/AppWindowWrapper/headers/AccountHeader/AccountHeader.d.ts +1 -1
- package/build/components/AppWindowWrapper/headers/AccountHeader/AccountHeader.js +2 -2
- package/build/components/AppWindowWrapper/headers/AccountHeader/components/AccountHeaderTitle/AccountHeaderTitle.d.ts +1 -1
- package/build/components/AppWindowWrapper/headers/AccountHeader/components/AccountHeaderTitle/AccountHeaderTitle.js +2 -2
- package/build/components/AppWindowWrapper/headers/AccountHeader/components/AccountHeaderTitle/type.d.ts +3 -2
- package/build/components/AppWindowWrapper/headers/AccountHeader/type.d.ts +2 -1
- package/build/components/Toolbar/Toolbar.js +1 -1
- package/build/constants/apps.js +1 -0
- package/build/types/reports.d.ts +21 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { WindowProps } from './type';
|
|
3
|
-
declare function Window({ children, titleBar, titleBarText, mainAppOrder, mainAppIsMinimized, showSectionsButton }: WindowProps): import("react").ReactPortal;
|
|
3
|
+
declare function Window({ children, titleBar, titleBarText, mainAppOrder, mainAppIsMinimized, showSectionsButton, rightActions }: WindowProps): import("react").ReactPortal;
|
|
4
4
|
declare const _default: import("react").MemoExoticComponent<typeof Window>;
|
|
5
5
|
export default _default;
|
|
@@ -9,7 +9,7 @@ import { AppWindowContext } from '../context';
|
|
|
9
9
|
import { isSafariBrowser } from '../../../utils/index.js';
|
|
10
10
|
import { animationDuration } from './constant';
|
|
11
11
|
import AccountHeader from '../headers/AccountHeader';
|
|
12
|
-
function Window({ children, titleBar, titleBarText, mainAppOrder, mainAppIsMinimized, showSectionsButton = true }) {
|
|
12
|
+
function Window({ children, titleBar, titleBarText, mainAppOrder, mainAppIsMinimized, showSectionsButton = true, rightActions }) {
|
|
13
13
|
const windowNodeRef = useRef(null);
|
|
14
14
|
const { dimensions, position, resizableRef, isMaximized, isOpen, onClose, viewerDefaultWidth, viewerDefaultHeight, windowZIndex, setPosition, setNewDimensions, isToolbarAnimationDisabled, fullWindowWidth, fullWindowHeight, setIsMaximized, setIsResized, isResized, setIsToolbarAnimationDisabled, setIsSidebarExpanded, isSidebarExpanded, } = useContext(AppWindowContext);
|
|
15
15
|
const isSafari = isSafariBrowser();
|
|
@@ -77,6 +77,6 @@ function Window({ children, titleBar, titleBarText, mainAppOrder, mainAppIsMinim
|
|
|
77
77
|
position: 'relative',
|
|
78
78
|
})) }, { children: _jsxs(Box, Object.assign({ sx: {
|
|
79
79
|
height: '100%',
|
|
80
|
-
}, "data-testid": "AppWindow" }, { children: [titleBar !== null && titleBar !== void 0 ? titleBar : (_jsx(AccountHeader, { setIsToolbarAnimationDisabled: setIsToolbarAnimationDisabled, onClose: onClose, setIsMaximized: setIsMaximized, isToolbarAnimationDisabled: isToolbarAnimationDisabled, setIsSidebarExpanded: setIsSidebarExpanded, isSidebarExpanded: isSidebarExpanded, title: titleBarText, isMaximized: isMaximized, showSectionsButton: showSectionsButton })), children] })) })) })) })), document.body);
|
|
80
|
+
}, "data-testid": "AppWindow" }, { children: [titleBar !== null && titleBar !== void 0 ? titleBar : (_jsx(AccountHeader, { setIsToolbarAnimationDisabled: setIsToolbarAnimationDisabled, onClose: onClose, setIsMaximized: setIsMaximized, isToolbarAnimationDisabled: isToolbarAnimationDisabled, setIsSidebarExpanded: setIsSidebarExpanded, isSidebarExpanded: isSidebarExpanded, title: titleBarText, isMaximized: isMaximized, showSectionsButton: showSectionsButton, rightActions: rightActions })), children] })) })) })) })), document.body);
|
|
81
81
|
}
|
|
82
82
|
export default memo(Window);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
2
3
|
export interface WindowProps {
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
titleBar?: React.ReactNode;
|
|
@@ -6,4 +7,5 @@ export interface WindowProps {
|
|
|
6
7
|
mainAppIsMinimized?: boolean;
|
|
7
8
|
mainAppOrder?: number;
|
|
8
9
|
showSectionsButton?: boolean;
|
|
10
|
+
rightActions?: ReactNode;
|
|
9
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AccountHeaderProps } from './type';
|
|
3
|
-
declare function AccountHeader({ isMaximized, setIsToolbarAnimationDisabled, setIsMaximized, onClose, isSidebarExpanded, setIsSidebarExpanded, isToolbarAnimationDisabled, title, showSectionsButton, }: AccountHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function AccountHeader({ isMaximized, setIsToolbarAnimationDisabled, setIsMaximized, onClose, isSidebarExpanded, setIsSidebarExpanded, isToolbarAnimationDisabled, title, showSectionsButton, rightActions, }: AccountHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const _default: import("react").MemoExoticComponent<typeof AccountHeader>;
|
|
5
5
|
export default _default;
|
|
@@ -4,7 +4,7 @@ import { motion } from 'framer-motion';
|
|
|
4
4
|
import { useMouseState } from '../../../../hooks/index.js';
|
|
5
5
|
import AccountHeaderTitle from './components/AccountHeaderTitle';
|
|
6
6
|
import { animationDuration } from '../../AppWindow/constant';
|
|
7
|
-
function AccountHeader({ isMaximized, setIsToolbarAnimationDisabled, setIsMaximized, onClose, isSidebarExpanded, setIsSidebarExpanded, isToolbarAnimationDisabled, title, showSectionsButton, }) {
|
|
7
|
+
function AccountHeader({ isMaximized, setIsToolbarAnimationDisabled, setIsMaximized, onClose, isSidebarExpanded, setIsSidebarExpanded, isToolbarAnimationDisabled, title, showSectionsButton, rightActions, }) {
|
|
8
8
|
const { isHovered, onMouseEnter, onMouseLeave } = useMouseState();
|
|
9
9
|
return (_jsx(motion.div, Object.assign({ style: Object.assign({}, (isMaximized && {
|
|
10
10
|
height: 0,
|
|
@@ -26,6 +26,6 @@ function AccountHeader({ isMaximized, setIsToolbarAnimationDisabled, setIsMaximi
|
|
|
26
26
|
}, maximized: isMaximized, id: "draggable-dialog-title", onRequestClick: () => {
|
|
27
27
|
setIsToolbarAnimationDisabled === null || setIsToolbarAnimationDisabled === void 0 ? void 0 : setIsToolbarAnimationDisabled(false);
|
|
28
28
|
setIsSidebarExpanded(!isSidebarExpanded);
|
|
29
|
-
}, isSidebarExpanded: isSidebarExpanded, isHovered: isHovered, onMouseHover: onMouseEnter, onMouseLeave: onMouseLeave }) })));
|
|
29
|
+
}, isSidebarExpanded: isSidebarExpanded, isHovered: isHovered, onMouseHover: onMouseEnter, onMouseLeave: onMouseLeave, rightActions: rightActions }) })));
|
|
30
30
|
}
|
|
31
31
|
export default memo(AccountHeader);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AccountHeaderTitleProps } from './type';
|
|
3
|
-
declare function AccountHeaderTitle({ title, onClose, onMaximize, maximized, id, onRequestClick, isSidebarExpanded, isHovered, onMouseHover, onMouseLeave, showSectionsButton, }: Readonly<AccountHeaderTitleProps>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function AccountHeaderTitle({ title, onClose, onMaximize, maximized, id, onRequestClick, isSidebarExpanded, isHovered, onMouseHover, onMouseLeave, showSectionsButton, rightActions, }: Readonly<AccountHeaderTitleProps>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const _default: import("react").MemoExoticComponent<typeof AccountHeaderTitle>;
|
|
5
5
|
export default _default;
|
|
@@ -4,7 +4,7 @@ import Toolbar from '../../../../../Toolbar';
|
|
|
4
4
|
import { StyledHeaderWrapperStyled } from '../../../../../Toolbar/style';
|
|
5
5
|
import { CloseIcon, ExpandButton, MaximizeIcon } from '../../../../../ToolbarIcon';
|
|
6
6
|
import { teamWindowIcon } from '../../../../../../constants/index.js';
|
|
7
|
-
function AccountHeaderTitle({ title, onClose, onMaximize, maximized = false, id, onRequestClick, isSidebarExpanded = false, isHovered = false, onMouseHover, onMouseLeave, showSectionsButton, }) {
|
|
8
|
-
return (_jsx(StyledHeaderWrapperStyled, Object.assign({ id: id, "data-testid": "UserTitleBar", maximized: maximized || false }, { children: _jsx(Toolbar, { onMouseEnter: onMouseHover, onMouseLeave: onMouseLeave, isMaximized: maximized, isHovered: isHovered, title: title, icon: teamWindowIcon, leftActions: _jsxs(_Fragment, { children: [_jsx(CloseIcon, { onClick: onClose }), _jsx(MaximizeIcon, { isMaximized: maximized, onClick: onMaximize }), showSectionsButton && (_jsx(ExpandButton, Object.assign({ onClick: onRequestClick, isExpanded: isSidebarExpanded, isHovered: isHovered }, { children: "
|
|
7
|
+
function AccountHeaderTitle({ title, onClose, onMaximize, maximized = false, id, onRequestClick, isSidebarExpanded = false, isHovered = false, onMouseHover, onMouseLeave, showSectionsButton, rightActions, }) {
|
|
8
|
+
return (_jsx(StyledHeaderWrapperStyled, Object.assign({ id: id, "data-testid": "UserTitleBar", maximized: maximized || false }, { children: _jsx(Toolbar, { onMouseEnter: onMouseHover, onMouseLeave: onMouseLeave, isMaximized: maximized, isHovered: isHovered, title: title, icon: teamWindowIcon, leftActions: _jsxs(_Fragment, { children: [_jsx(CloseIcon, { onClick: onClose }), _jsx(MaximizeIcon, { isMaximized: maximized, onClick: onMaximize }), showSectionsButton && (_jsx(ExpandButton, Object.assign({ onClick: onRequestClick, isExpanded: !isSidebarExpanded, isHovered: isHovered }, { children: "Sidebar" })))] }), rightActions: rightActions }) })));
|
|
9
9
|
}
|
|
10
10
|
export default memo(AccountHeaderTitle);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SyntheticEvent } from 'react';
|
|
2
|
-
import { BoxProps } from '@mui/material/Box';
|
|
1
|
+
import type { ReactNode, SyntheticEvent } from 'react';
|
|
2
|
+
import type { BoxProps } from '@mui/material/Box';
|
|
3
3
|
export interface AccountHeaderTitleProps extends BoxProps {
|
|
4
4
|
title: string;
|
|
5
5
|
onClose?: (e: SyntheticEvent) => void;
|
|
@@ -11,4 +11,5 @@ export interface AccountHeaderTitleProps extends BoxProps {
|
|
|
11
11
|
isHovered?: boolean;
|
|
12
12
|
onMouseHover?: (e: SyntheticEvent) => void;
|
|
13
13
|
showSectionsButton?: boolean;
|
|
14
|
+
rightActions?: ReactNode;
|
|
14
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
1
|
+
import type { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
2
2
|
export interface AccountHeaderProps {
|
|
3
3
|
isSidebarExpanded: boolean;
|
|
4
4
|
setIsSidebarExpanded: (value: boolean) => void;
|
|
@@ -9,4 +9,5 @@ export interface AccountHeaderProps {
|
|
|
9
9
|
onClose?: () => void;
|
|
10
10
|
title?: string;
|
|
11
11
|
showSectionsButton?: boolean;
|
|
12
|
+
rightActions?: ReactNode;
|
|
12
13
|
}
|
|
@@ -15,6 +15,6 @@ import { ToolbarStyled, StyledBox, ActionsBox } from './style';
|
|
|
15
15
|
import WindowAppIcon from '../WindowAppIcon';
|
|
16
16
|
function Toolbar(_a) {
|
|
17
17
|
var { onMouseEnter, onMouseLeave, isMaximized, isHovered, children, rightActions, leftActions, title, icon } = _a, props = __rest(_a, ["onMouseEnter", "onMouseLeave", "isMaximized", "isHovered", "children", "rightActions", "leftActions", "title", "icon"]);
|
|
18
|
-
return (_jsx(ToolbarStyled, Object.assign({ onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, maximized: isMaximized, id: "toolbar", isHovered: isHovered }, props, { children: _jsxs(StyledBox, Object.assign({ className: "toolbar-wrapper" }, { children: [leftActions ? _jsx(ActionsBox, Object.assign({ className: "action-box" }, { children: leftActions })) : _jsx("div", {}), _jsx(WindowAppIcon, { title: title, icon: icon }), rightActions
|
|
18
|
+
return (_jsx(ToolbarStyled, Object.assign({ onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, maximized: isMaximized, id: "toolbar", isHovered: isHovered }, props, { children: _jsxs(StyledBox, Object.assign({ className: "toolbar-wrapper" }, { children: [leftActions ? _jsx(ActionsBox, Object.assign({ className: "action-box" }, { children: leftActions })) : _jsx("div", {}), _jsx(WindowAppIcon, { title: title, icon: icon }), rightActions ? _jsx(ActionsBox, Object.assign({ className: "action-box" }, { children: rightActions })) : _jsx("div", {})] })) })));
|
|
19
19
|
}
|
|
20
20
|
export default memo(Toolbar);
|
package/build/constants/apps.js
CHANGED
package/build/types/reports.d.ts
CHANGED
|
@@ -4,3 +4,24 @@ export declare enum ReportStatusEnum {
|
|
|
4
4
|
PROCESSING = "PROCESSING",
|
|
5
5
|
INITIATED = "INITIATED"
|
|
6
6
|
}
|
|
7
|
+
export interface Report {
|
|
8
|
+
id: string;
|
|
9
|
+
object: string;
|
|
10
|
+
live_mode: boolean;
|
|
11
|
+
api_version: string;
|
|
12
|
+
feature_version: string;
|
|
13
|
+
type: string;
|
|
14
|
+
status: string;
|
|
15
|
+
segment_id: string;
|
|
16
|
+
created_at: number;
|
|
17
|
+
started_at: number;
|
|
18
|
+
completed_at: number;
|
|
19
|
+
total_records: number;
|
|
20
|
+
result_file: string;
|
|
21
|
+
download_count: string;
|
|
22
|
+
last_downloaded_at: number;
|
|
23
|
+
response: {
|
|
24
|
+
code: string;
|
|
25
|
+
message: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
package/package.json
CHANGED