@tap-payments/os-micro-frontend-shared 0.1.111-test.2 → 0.1.112-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/build/components/StatusIcons/AuthorizationAutoIcons/style.js +1 -1
- package/build/components/TableCells/CustomCells/BalanceCell/style.js +1 -1
- package/build/components/TableCells/CustomCells/ProductsCell/style.js +1 -1
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.js +1 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.js +1 -1
- package/build/components/TableCells/CustomCells/style.js +1 -1
- package/build/components/index.d.ts +0 -1
- package/build/components/index.js +0 -1
- package/package.json +1 -1
- package/build/components/ReceiptViewer/ReceiptViewer.d.ts +0 -2
- package/build/components/ReceiptViewer/ReceiptViewer.js +0 -122
- package/build/components/ReceiptViewer/ReceiptViewerList.d.ts +0 -9
- package/build/components/ReceiptViewer/ReceiptViewerList.js +0 -10
- package/build/components/ReceiptViewer/components/FooterButton/FooterButton.d.ts +0 -5
- package/build/components/ReceiptViewer/components/FooterButton/FooterButton.js +0 -44
- package/build/components/ReceiptViewer/components/FooterButton/index.d.ts +0 -2
- package/build/components/ReceiptViewer/components/FooterButton/index.js +0 -2
- package/build/components/ReceiptViewer/components/ReceiptTitleBar/ReceiptTitleBar.d.ts +0 -5
- package/build/components/ReceiptViewer/components/ReceiptTitleBar/ReceiptTitleBar.js +0 -9
- package/build/components/ReceiptViewer/components/ReceiptTitleBar/index.d.ts +0 -3
- package/build/components/ReceiptViewer/components/ReceiptTitleBar/index.js +0 -3
- package/build/components/ReceiptViewer/components/ReceiptTitleBar/type.d.ts +0 -11
- package/build/components/ReceiptViewer/components/ReceiptTitleBar/type.js +0 -1
- package/build/components/ReceiptViewer/components/index.d.ts +0 -2
- package/build/components/ReceiptViewer/components/index.js +0 -2
- package/build/components/ReceiptViewer/context/Provider.d.ts +0 -6
- package/build/components/ReceiptViewer/context/Provider.js +0 -42
- package/build/components/ReceiptViewer/context/context.d.ts +0 -3
- package/build/components/ReceiptViewer/context/context.js +0 -7
- package/build/components/ReceiptViewer/context/index.d.ts +0 -2
- package/build/components/ReceiptViewer/context/index.js +0 -2
- package/build/components/ReceiptViewer/hooks/index.d.ts +0 -1
- package/build/components/ReceiptViewer/hooks/index.js +0 -1
- package/build/components/ReceiptViewer/hooks/useReceiptViewerContext.d.ts +0 -8
- package/build/components/ReceiptViewer/hooks/useReceiptViewerContext.js +0 -18
- package/build/components/ReceiptViewer/index.d.ts +0 -7
- package/build/components/ReceiptViewer/index.js +0 -7
- package/build/components/ReceiptViewer/style.d.ts +0 -631
- package/build/components/ReceiptViewer/style.js +0 -176
- package/build/components/ReceiptViewer/type.d.ts +0 -22
- package/build/components/ReceiptViewer/type.js +0 -1
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import { Box, Input, Popover, Typography, styled } from '@mui/material';
|
|
2
|
-
import { motion } from 'framer-motion';
|
|
3
|
-
export const FOOTER_HEIGHT = 37;
|
|
4
|
-
export const TITLE_BAR_HEIGHT = '32px';
|
|
5
|
-
export const VIEWER_HEIGHT = 545;
|
|
6
|
-
export const StyledPopover = styled(Popover)(({ theme }) => ({
|
|
7
|
-
backgroundColor: theme.palette.background.default,
|
|
8
|
-
boxShadow: theme.shadows[21],
|
|
9
|
-
'& .MuiPaper-root': {
|
|
10
|
-
borderRadius: '12px',
|
|
11
|
-
},
|
|
12
|
-
}));
|
|
13
|
-
export const HEADER_HEIGHT = 44;
|
|
14
|
-
export const jsonTheme = {
|
|
15
|
-
'--w-rjv-color': '#9cdcfe',
|
|
16
|
-
'--w-rjv-key-string': '#357fb9',
|
|
17
|
-
'--w-rjv-background-color': '#ffffff',
|
|
18
|
-
'--w-rjv-line-color': '#ffffff',
|
|
19
|
-
'--w-rjv-arrow-color': '#116e6bed',
|
|
20
|
-
'--w-rjv-edit-color': '#9cdcfe',
|
|
21
|
-
'--w-rjv-info-color': '#9c9c9c7a',
|
|
22
|
-
'--w-rjv-update-color': '#FFE20B',
|
|
23
|
-
'--w-rjv-copied-color': '#9cdcfe',
|
|
24
|
-
'--w-rjv-copied-success-color': '#28a745',
|
|
25
|
-
'--w-rjv-curlybraces-color': '#000000',
|
|
26
|
-
'--w-rjv-colon-color': '#000000',
|
|
27
|
-
'--w-rjv-brackets-color': '#000000',
|
|
28
|
-
'--w-rjv-quotes-color': '#9cdcfe',
|
|
29
|
-
'--w-rjv-quotes-string-color': '#c27c46',
|
|
30
|
-
'--w-rjv-type-string-color': '#c27c46',
|
|
31
|
-
'--w-rjv-type-int-color': '#956ea5',
|
|
32
|
-
'--w-rjv-type-float-color': '#956ea5',
|
|
33
|
-
'--w-rjv-type-bigint-color': '#956ea5',
|
|
34
|
-
'--w-rjv-type-boolean-color': '#956ea5',
|
|
35
|
-
'--w-rjv-type-date-color': '#956ea5',
|
|
36
|
-
'--w-rjv-type-url-color': '#3b89cf',
|
|
37
|
-
'--w-rjv-type-null-color': '#956ea5',
|
|
38
|
-
'--w-rjv-type-nan-color': '#956ea5',
|
|
39
|
-
'--w-rjv-type-undefined-color': '#956ea5',
|
|
40
|
-
padding: '1rem',
|
|
41
|
-
height: `calc(100% - ${HEADER_HEIGHT + FOOTER_HEIGHT}px`,
|
|
42
|
-
overflow: 'auto',
|
|
43
|
-
};
|
|
44
|
-
export const requestJsonTheme = Object.assign(Object.assign({}, jsonTheme), { background: 'transparent', '--w-rjv-line-color': 'transparent' });
|
|
45
|
-
export const StyledAnimatedButton = styled('button')(({ theme }) => ({
|
|
46
|
-
padding: '0rem',
|
|
47
|
-
borderRadius: '0.25rem',
|
|
48
|
-
backgroundColor: theme.palette.background.paper,
|
|
49
|
-
display: 'flex',
|
|
50
|
-
alignItems: 'center',
|
|
51
|
-
justifyContent: 'center',
|
|
52
|
-
gap: '0.25rem',
|
|
53
|
-
color: theme.palette.text.primary,
|
|
54
|
-
fontSize: '0.625rem',
|
|
55
|
-
fontWeight: theme.typography.fontWeightBold,
|
|
56
|
-
outline: 'none',
|
|
57
|
-
cursor: 'pointer',
|
|
58
|
-
border: `1px solid ${theme.palette.grey['100']}`,
|
|
59
|
-
'&:hover': {
|
|
60
|
-
boxShadow: '0px 0px 8px 0px rgba(31, 136, 208, 0.30)',
|
|
61
|
-
border: `1px solid ${theme.palette.info.dark};`,
|
|
62
|
-
},
|
|
63
|
-
position: 'relative',
|
|
64
|
-
overflow: 'hidden',
|
|
65
|
-
transition: 'all 0.2s ease-in-out',
|
|
66
|
-
width: '24px',
|
|
67
|
-
height: '24px',
|
|
68
|
-
flexShrink: 0,
|
|
69
|
-
}));
|
|
70
|
-
export const StyledCopyButton = styled('button')(({ theme }) => ({
|
|
71
|
-
outline: 'none',
|
|
72
|
-
cursor: 'pointer',
|
|
73
|
-
border: `1px solid transparent`,
|
|
74
|
-
'&:hover': {
|
|
75
|
-
boxShadow: theme.shadows[8],
|
|
76
|
-
},
|
|
77
|
-
borderRadius: '0.25rem',
|
|
78
|
-
position: 'relative',
|
|
79
|
-
backgroundColor: theme.palette.background.transparent,
|
|
80
|
-
display: 'inline-flex',
|
|
81
|
-
alignItems: 'center',
|
|
82
|
-
justifyContent: 'center',
|
|
83
|
-
}));
|
|
84
|
-
export const StyledSearchInput = styled(Input)(({ theme }) => ({
|
|
85
|
-
border: `1px solid ${theme.palette.grey[100]}`,
|
|
86
|
-
borderRadius: '0.25rem',
|
|
87
|
-
padding: '0.375rem',
|
|
88
|
-
fontSize: '0.625rem',
|
|
89
|
-
outline: 'none',
|
|
90
|
-
width: '100%',
|
|
91
|
-
maxWidth: '150px',
|
|
92
|
-
height: '1.5rem',
|
|
93
|
-
backgroundColor: theme.palette.background.paper,
|
|
94
|
-
'&:focus': {
|
|
95
|
-
border: `1px solid ${theme.palette.info.dark}`,
|
|
96
|
-
},
|
|
97
|
-
}));
|
|
98
|
-
export const StyledTitle = styled(Typography)(() => ({
|
|
99
|
-
border: '1px solid rgba(242, 242, 242, 0.70);',
|
|
100
|
-
display: 'inline-flex',
|
|
101
|
-
height: '24px',
|
|
102
|
-
padding: '0px 8px',
|
|
103
|
-
justifyContent: 'center',
|
|
104
|
-
alignItems: 'center',
|
|
105
|
-
borderRadius: '37.5px',
|
|
106
|
-
backgroundColor: '#fff',
|
|
107
|
-
}));
|
|
108
|
-
export const SectionWrapper = styled(Box, {
|
|
109
|
-
shouldForwardProp: (prop) => !['isMaximized', 'isScrollingRequest', 'isRequestShown'].includes(prop),
|
|
110
|
-
})(({ isScrollingRequest, isMaximized, isRequestShown, theme }) => (Object.assign(Object.assign({ display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: '4px', paddingBlock: '0px', paddingInlineStart: '12px', paddingInlineEnd: '12px', position: 'sticky', left: 0, right: 0, top: 0, background: '#fff', zIndex: 5 }, (isScrollingRequest && {
|
|
111
|
-
boxShadow: theme.shadows[23],
|
|
112
|
-
})), (isMaximized && Object.assign({ paddingTop: TITLE_BAR_HEIGHT, transition: 'padding 0.3s ease-in-out' }, (isRequestShown && {
|
|
113
|
-
width: '50%',
|
|
114
|
-
}))))));
|
|
115
|
-
export const FooterWrapper = styled(Box, {
|
|
116
|
-
shouldForwardProp: (prop) => !['isMaximized', 'isRequestShown'].includes(prop),
|
|
117
|
-
})(({ isMaximized, isRequestShown }) => (Object.assign({ display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: '8px', height: FOOTER_HEIGHT, position: 'fixed', bottom: 0, right: 0, left: isMaximized ? '50vw' : 0 }, (!isRequestShown && {
|
|
118
|
-
left: 0,
|
|
119
|
-
}))));
|
|
120
|
-
export const ButtonsWrapper = styled(Box)(() => ({
|
|
121
|
-
display: 'flex',
|
|
122
|
-
justifyContent: 'flex-end',
|
|
123
|
-
alignItems: 'center',
|
|
124
|
-
gap: '4px',
|
|
125
|
-
paddingBlock: '10px',
|
|
126
|
-
paddingInlineStart: '8px',
|
|
127
|
-
paddingInlineEnd: '0px',
|
|
128
|
-
}));
|
|
129
|
-
export const StyledHeaderWrapper = styled(Box)(() => ({
|
|
130
|
-
display: 'flex',
|
|
131
|
-
justifyContent: 'flex-start',
|
|
132
|
-
alignItems: 'center',
|
|
133
|
-
gap: '4px',
|
|
134
|
-
paddingBlock: '10px',
|
|
135
|
-
paddingInlineStart: '0px',
|
|
136
|
-
paddingInlineEnd: '12px',
|
|
137
|
-
}));
|
|
138
|
-
export const JSONViewerWrapper = styled(motion.div, {
|
|
139
|
-
shouldForwardProp: (prop) => !['isRequestShown', 'isMaximized'].includes(prop),
|
|
140
|
-
})(({ isRequestShown, isMaximized }) => (Object.assign({ width: '100%', height: '100%', overflowY: 'auto', background: '#fff', zIndex: 20, position: 'relative', display: 'flex', flexDirection: 'column', borderBottomRightRadius: '12px', borderBottomLeftRadius: isRequestShown ? 0 : '12px' }, (isMaximized && {
|
|
141
|
-
borderBottomLeftRadius: 0,
|
|
142
|
-
borderBottomRightRadius: 0,
|
|
143
|
-
height: '100vh',
|
|
144
|
-
}))));
|
|
145
|
-
export const JSONViewerWrapperRequest = styled(motion.div, {
|
|
146
|
-
shouldForwardProp: (prop) => !['isMaximized', 'currentRequestWidth'].includes(prop),
|
|
147
|
-
})(({ isMaximized, currentRequestWidth }) => ({
|
|
148
|
-
backgroundColor: '#E7E7E7B2',
|
|
149
|
-
backdropFilter: 'blur(12px)',
|
|
150
|
-
height: isMaximized ? '100vh' : '100%',
|
|
151
|
-
overflowY: 'auto',
|
|
152
|
-
position: 'absolute',
|
|
153
|
-
width: isMaximized ? '100vw' : currentRequestWidth,
|
|
154
|
-
zIndex: 19,
|
|
155
|
-
display: 'flex',
|
|
156
|
-
flexDirection: 'column',
|
|
157
|
-
borderBottomLeftRadius: '12px',
|
|
158
|
-
}));
|
|
159
|
-
export const JSONViewerScreenContainer = styled(Box, {
|
|
160
|
-
shouldForwardProp: (prop) => !['isMaximized', 'currentHeight'].includes(prop),
|
|
161
|
-
})(({ isMaximized, currentHeight }) => ({
|
|
162
|
-
display: 'flex',
|
|
163
|
-
flexDirection: 'row',
|
|
164
|
-
justifyContent: 'space-between',
|
|
165
|
-
alignItems: 'flex-start',
|
|
166
|
-
height: isMaximized ? `calc(100vh - ${FOOTER_HEIGHT}px)` : (currentHeight || VIEWER_HEIGHT) - FOOTER_HEIGHT + 5,
|
|
167
|
-
background: 'transparent',
|
|
168
|
-
position: 'fixed',
|
|
169
|
-
width: '100%',
|
|
170
|
-
}));
|
|
171
|
-
export const JSONContainer = styled(Box)(() => ({
|
|
172
|
-
position: 'fixed',
|
|
173
|
-
width: '100%',
|
|
174
|
-
background: 'transparent',
|
|
175
|
-
height: '100%',
|
|
176
|
-
}));
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export type ReceiptViewerProps = JsonViewer & {
|
|
3
|
-
index: number;
|
|
4
|
-
onClose: () => void;
|
|
5
|
-
isWindowMinimized?: boolean;
|
|
6
|
-
windowOrder?: number;
|
|
7
|
-
};
|
|
8
|
-
export interface AnimatedButtonProps extends HTMLAttributes<HTMLButtonElement> {
|
|
9
|
-
label?: ReactNode;
|
|
10
|
-
icon?: string;
|
|
11
|
-
disableAnimation?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export type JsonViewer = {
|
|
14
|
-
json: Record<string, any>;
|
|
15
|
-
requestJson?: Record<string, any>;
|
|
16
|
-
};
|
|
17
|
-
export type ReceiptViewerContext = {
|
|
18
|
-
receiptViewerList: JsonViewer[];
|
|
19
|
-
handleReceiptViewerDialogOpen: (jsonViewer: JsonViewer) => void;
|
|
20
|
-
handleWindowMinimize: (value: boolean) => void;
|
|
21
|
-
handleWindowOrder: (value: number) => void;
|
|
22
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|