@tap-payments/os-micro-frontend-shared 0.0.165 → 0.0.168
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.
|
@@ -7,7 +7,6 @@ export const JsonViewerDialogContextProvider = ({ children }) => {
|
|
|
7
7
|
const [isWindowMinimized, setIsWindowMinimized] = useState(false);
|
|
8
8
|
const [windowOrder, setWindowOrder] = useState(1);
|
|
9
9
|
const handleJsonViewerDialogOpen = useCallback((jsonViewer) => {
|
|
10
|
-
var _a;
|
|
11
10
|
if (jsonViewerList.length === 7) {
|
|
12
11
|
alert('Maximum allowed active Json Viewer is 7 per table.');
|
|
13
12
|
return;
|
|
@@ -15,8 +14,14 @@ export const JsonViewerDialogContextProvider = ({ children }) => {
|
|
|
15
14
|
if (jsonViewerList.some((item) => item.json.id === jsonViewer.json.id)) {
|
|
16
15
|
return;
|
|
17
16
|
}
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
const jsonCopy = structuredClone(jsonViewer.json);
|
|
18
|
+
const requestData = jsonCopy.request_body;
|
|
19
|
+
const jsonViewerPreservedRequest = {
|
|
20
|
+
json: jsonCopy,
|
|
21
|
+
requestJson: jsonViewer.requestJson || requestData || undefined,
|
|
22
|
+
};
|
|
23
|
+
delete jsonViewerPreservedRequest.json.request_body;
|
|
24
|
+
setJsonViewerList((prev) => [...prev, jsonViewerPreservedRequest]);
|
|
20
25
|
}, [jsonViewerList]);
|
|
21
26
|
const handleJsonViewerDialogClose = (index) => {
|
|
22
27
|
setJsonViewerList((prev) => prev.filter((_, idx) => index !== idx));
|
|
@@ -40,6 +40,7 @@ export const StatusButton = memo((props) => {
|
|
|
40
40
|
}, sx: Object.assign({}, (hasDropdown && {
|
|
41
41
|
paddingInlineEnd: '27px',
|
|
42
42
|
})) }, { children: _jsxs(LabelWrapper, Object.assign({ onClick: (e) => {
|
|
43
|
+
e.stopPropagation();
|
|
43
44
|
e.preventDefault();
|
|
44
45
|
if (hasDropdown) {
|
|
45
46
|
setAnchorEl(buttonRef.current);
|
package/package.json
CHANGED