@tap-payments/os-micro-frontend-shared 0.0.158 → 0.0.160-alpha.0
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/CountryFlag/CountryFlag.js +3 -1
- package/build/components/JSONViewer/context/Provider.js +8 -3
- package/build/components/SearchButton/styles.d.ts +1 -1
- package/build/components/StatusButton/StatusButton.js +3 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.js +1 -1
- package/build/components/TableCells/CustomCells/SourceMergedCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +1 -1
- package/build/components/TableHeader_V2/components/StatusButtons/StatusButton.js +3 -1
- package/build/components/VirtualTable/components/ColumnFilter/ColumnFilter.js +1 -1
- package/build/components/VirtualTable/style.d.ts +1 -1
- package/package.json +1 -1
|
@@ -15,6 +15,8 @@ import Box from '@mui/material/Box';
|
|
|
15
15
|
import { defaultCountryIcon, getCountriesIcon } from '../../constants/index.js';
|
|
16
16
|
function CountryFlag(_a) {
|
|
17
17
|
var { code = '' } = _a, props = __rest(_a, ["code"]);
|
|
18
|
-
return (_jsx(Box, Object.assign({}, props, { component: "img", src: getCountriesIcon(code) || defaultCountryIcon, alt: code, sx: Object.assign(Object.assign({ width: 16 }, (code && { height: 12, borderRadius: '3px' })), props.sx), loading: "lazy"
|
|
18
|
+
return (_jsx(Box, Object.assign({}, props, { component: "img", src: getCountriesIcon(code + 'ss') || defaultCountryIcon, alt: code, sx: Object.assign(Object.assign({ width: 16 }, (code && { height: 12, borderRadius: '3px' })), props.sx), loading: "lazy", onError: (e) => {
|
|
19
|
+
e.currentTarget.src = defaultCountryIcon;
|
|
20
|
+
} })));
|
|
19
21
|
}
|
|
20
22
|
export default memo(CountryFlag);
|
|
@@ -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));
|
|
@@ -554,9 +554,9 @@ export declare const Icon: import("@emotion/styled").StyledComponent<{
|
|
|
554
554
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
555
555
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
556
556
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
557
|
-
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
558
557
|
src?: string | undefined;
|
|
559
558
|
alt?: string | undefined;
|
|
559
|
+
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
560
560
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
561
561
|
useMap?: string | undefined;
|
|
562
562
|
loading?: "eager" | "lazy" | undefined;
|
|
@@ -39,10 +39,12 @@ function StatusButton(_a) {
|
|
|
39
39
|
onButtonBodyClick === null || onButtonBodyClick === void 0 ? void 0 : onButtonBodyClick(lastActiveStatus || ((_b = dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions[0]) === null || _b === void 0 ? void 0 : _b.status) || 'all');
|
|
40
40
|
}, sx: Object.assign({}, (hasDropdown && {
|
|
41
41
|
paddingInlineEnd: '27px',
|
|
42
|
-
})) }, { children: _jsxs(LabelWrapper, Object.assign({ onClick: () => {
|
|
42
|
+
})) }, { children: _jsxs(LabelWrapper, Object.assign({ onClick: (e) => {
|
|
43
43
|
if (showDropdownIcon) {
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
+
e.stopPropagation();
|
|
47
|
+
e.preventDefault();
|
|
46
48
|
if (hasDropdown) {
|
|
47
49
|
setAnchorEl(buttonRef.current);
|
|
48
50
|
}
|
|
@@ -272,9 +272,9 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
|
|
|
272
272
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
273
273
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
274
274
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
275
|
-
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
276
275
|
src?: string | undefined;
|
|
277
276
|
alt?: string | undefined;
|
|
277
|
+
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
278
278
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
279
279
|
useMap?: string | undefined;
|
|
280
280
|
loading?: "eager" | "lazy" | undefined;
|
|
@@ -11,7 +11,7 @@ export const ActionCellContainer = styled('section', {
|
|
|
11
11
|
gap: tableMode === 'sheet' ? '4px' : theme.spacing(1),
|
|
12
12
|
overflow: 'visible',
|
|
13
13
|
}));
|
|
14
|
-
export const ActionsIconContainer = styled('span')(({ selected }) => (Object.assign(Object.assign({ overflow: 'visible', borderRadius: '50%', display: 'flex', justifyContent: 'center', alignItems: 'center', '&:hover': {
|
|
14
|
+
export const ActionsIconContainer = styled('span')(({ selected }) => (Object.assign(Object.assign({ overflow: 'visible', borderRadius: '50%', display: 'flex', justifyContent: 'center', alignItems: 'center', position: 'relative', '&:hover': {
|
|
15
15
|
boxShadow: '0px 0px 20px rgba(0, 0, 0, 0.18);',
|
|
16
16
|
} }, (selected && {
|
|
17
17
|
boxShadow: '0px 0px 20px rgba(0, 0, 0, 0.18);',
|
|
@@ -273,9 +273,9 @@ export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<
|
|
|
273
273
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
274
274
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
275
275
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
276
|
-
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
277
276
|
src?: string | undefined;
|
|
278
277
|
alt?: string | undefined;
|
|
278
|
+
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
279
279
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
280
280
|
useMap?: string | undefined;
|
|
281
281
|
loading?: "eager" | "lazy" | undefined;
|
|
@@ -262,9 +262,9 @@ export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<
|
|
|
262
262
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
263
263
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
264
264
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
265
|
-
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
266
265
|
src?: string | undefined;
|
|
267
266
|
alt?: string | undefined;
|
|
267
|
+
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
268
268
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
269
269
|
useMap?: string | undefined;
|
|
270
270
|
loading?: "eager" | "lazy" | undefined;
|
|
@@ -39,7 +39,9 @@ export const StatusButton = memo((props) => {
|
|
|
39
39
|
onButtonBodyClick === null || onButtonBodyClick === void 0 ? void 0 : onButtonBodyClick(lastActiveStatus || ((_b = dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions[0]) === null || _b === void 0 ? void 0 : _b.status) || 'all');
|
|
40
40
|
}, sx: Object.assign({}, (hasDropdown && {
|
|
41
41
|
paddingInlineEnd: '27px',
|
|
42
|
-
})) }, { children: _jsxs(LabelWrapper, Object.assign({ onClick: () => {
|
|
42
|
+
})) }, { children: _jsxs(LabelWrapper, Object.assign({ onClick: (e) => {
|
|
43
|
+
e.stopPropagation();
|
|
44
|
+
e.preventDefault();
|
|
43
45
|
if (hasDropdown) {
|
|
44
46
|
setAnchorEl(buttonRef.current);
|
|
45
47
|
}
|
|
@@ -52,7 +52,7 @@ function ColumnFilter(filter) {
|
|
|
52
52
|
}, [open, filter, anchorEl, setAnchorEl]);
|
|
53
53
|
return (_jsx(ClickAwayListener, Object.assign({ onClickAway: onCloseDropdown }, { children: _jsxs(Box, Object.assign({ component: "section", "data-testid": "ColumnFilter", sx: { position: 'relative', display: 'flex', alignItems: 'center' } }, { children: [showClearIcon ? (_jsxs(FilterWrapper, { children: [_jsx(Box, { component: "img", "data-testid": "ColumnFilter_whiteFilterIcon", src: whiteFilterIcon, alt: "filter-icon", sx: { marginInlineEnd: '2px', height: 6 }, onClick: openDropdown }), _jsx(Box, { component: "img", "data-testid": "ColumnFilter_closeIcon", src: closeIcon, alt: "close-icon", onClick: () => {
|
|
54
54
|
filter.onClear(filterApiKeys);
|
|
55
|
-
} })] })) : (_jsx(Box, { component: "img", "data-testid": "ColumnFilter_columnIcon", src: columnIcon, alt: "column-icon", sx: {
|
|
55
|
+
} })] })) : (_jsx(Box, { component: "img", "data-testid": "ColumnFilter_columnIcon", src: columnIcon, alt: "column-icon", sx: { cursor: 'pointer', marginTop: '2px' }, onClick: openDropdown })), open && _jsx(CustomBackdrop, { onClick: onCloseDropdown }), _jsx(Popper, Object.assign({ open: open, anchorEl: anchorEl, placement: "bottom-start", sx: {
|
|
56
56
|
zIndex: 9999,
|
|
57
57
|
} }, { children: renderFilter }))] })) })));
|
|
58
58
|
}
|
|
@@ -306,9 +306,9 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
|
|
|
306
306
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
307
307
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
308
308
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
309
|
-
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
310
309
|
src?: string | undefined;
|
|
311
310
|
alt?: string | undefined;
|
|
311
|
+
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
312
312
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
313
313
|
useMap?: string | undefined;
|
|
314
314
|
loading?: "eager" | "lazy" | undefined;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.
|
|
4
|
+
"version": "0.0.160-alpha.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
7
7
|
"module": "build/index.js",
|