@tap-payments/os-micro-frontend-shared 0.1.418 → 0.1.419-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/AnimatedSpinnerIcon/style.d.ts +0 -1
- package/build/components/Chip/style.d.ts +0 -1
- package/build/components/CountBadge/style.d.ts +0 -1
- package/build/components/Dialog/style.d.ts +0 -1
- package/build/components/FilterDropdown/FilterDropdown.d.ts +3 -1
- package/build/components/FilterDropdown/FilterDropdown.js +11 -23
- package/build/components/FilterDropdown/style.d.ts +1 -0
- package/build/components/FilterDropdown/style.js +13 -0
- package/build/components/FlippingCard/style.d.ts +0 -1
- package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
- package/build/components/JSONViewer/style.d.ts +0 -1
- package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
- package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
- package/build/components/SearchButton/styles.d.ts +0 -1
- package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
- package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/style.d.ts +0 -1
- package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -1
- package/build/components/TableReports/style.d.ts +0 -1
- package/build/components/VirtualTables/components/style.d.ts +0 -1
- package/build/constants/server.d.ts +2 -2
- package/build/constants/server.js +12 -5
- package/build/types/index.d.ts +1 -0
- package/build/types/index.js +1 -0
- package/build/types/window.d.ts +7 -0
- package/build/types/window.js +1 -0
- package/package.json +3 -3
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
import { GetSourceAnimationFunction } from './type';
|
|
4
3
|
export declare const ChipStyled: import("@emotion/styled").StyledComponent<import("react").RefAttributes<unknown> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
5
4
|
variant?: import("./type").ChipVariant | undefined;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { type MenuProps } from '@mui/material/Menu';
|
|
2
3
|
interface FilterDropdownProps {
|
|
3
4
|
children?: React.ReactNode;
|
|
4
5
|
onConfirm: () => void;
|
|
5
6
|
onCancel: () => void;
|
|
6
7
|
isOkayButDisabled?: boolean;
|
|
7
8
|
isDisabled?: boolean;
|
|
9
|
+
menuProps?: Partial<MenuProps>;
|
|
8
10
|
}
|
|
9
|
-
export default function FilterDropdown({ onConfirm, onCancel, isOkayButDisabled, children, isDisabled }: Readonly<FilterDropdownProps>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default function FilterDropdown({ onConfirm, onCancel, isOkayButDisabled, children, isDisabled, menuProps }: Readonly<FilterDropdownProps>): import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
export {};
|
|
@@ -1,32 +1,14 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import Box from '@mui/material/Box';
|
|
3
4
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import {
|
|
5
|
-
import { ClickAwayListener } from '@mui/material';
|
|
5
|
+
import { StyledMenu as Menu } from './style';
|
|
6
6
|
import { darkFilterIcon } from '../../constants/index.js';
|
|
7
|
-
import { Menu, CustomBackdrop } from '../index.js';
|
|
8
7
|
import { CancelButton, FilterButton, Footer, OkayButton, TitleStyled } from './style';
|
|
9
|
-
export default function FilterDropdown({ onConfirm, onCancel, isOkayButDisabled, children, isDisabled }) {
|
|
8
|
+
export default function FilterDropdown({ onConfirm, onCancel, isOkayButDisabled, children, isDisabled, menuProps }) {
|
|
10
9
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
11
10
|
const open = Boolean(anchorEl);
|
|
12
11
|
const { t } = useTranslation();
|
|
13
|
-
// Lock body scroll when filter dropdown is open (Safari fix)
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
if (open) {
|
|
16
|
-
const scrollY = window.scrollY;
|
|
17
|
-
document.body.style.position = 'fixed';
|
|
18
|
-
document.body.style.top = `-${scrollY}px`;
|
|
19
|
-
document.body.style.width = '100%';
|
|
20
|
-
document.body.style.overflow = 'hidden';
|
|
21
|
-
return () => {
|
|
22
|
-
document.body.style.position = '';
|
|
23
|
-
document.body.style.top = '';
|
|
24
|
-
document.body.style.width = '';
|
|
25
|
-
document.body.style.overflow = '';
|
|
26
|
-
window.scrollTo(0, scrollY);
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
}, [open]);
|
|
30
12
|
const onOpen = (e) => {
|
|
31
13
|
if (isDisabled)
|
|
32
14
|
return;
|
|
@@ -50,5 +32,11 @@ export default function FilterDropdown({ onConfirm, onCancel, isOkayButDisabled,
|
|
|
50
32
|
onConfirm();
|
|
51
33
|
onClose();
|
|
52
34
|
};
|
|
53
|
-
return (
|
|
35
|
+
return (_jsxs(_Fragment, { children: [_jsx(FilterButton, Object.assign({ isActive: open, onClick: onOpen, sx: Object.assign({}, (isDisabled && { pointerEvents: 'none', opacity: 0.5 })) }, { children: _jsx(Box, { component: "img", src: darkFilterIcon, alt: "filter" }) })), _jsxs(Menu, Object.assign({ anchorEl: anchorEl, open: open, onClose: handleCancel, anchorOrigin: {
|
|
36
|
+
vertical: 'bottom',
|
|
37
|
+
horizontal: 'right',
|
|
38
|
+
}, transformOrigin: {
|
|
39
|
+
vertical: 'top',
|
|
40
|
+
horizontal: 'right',
|
|
41
|
+
} }, menuProps, { children: [_jsx(TitleStyled, Object.assign({ component: "span" }, { children: t('filterBy') })), children, _jsxs(Footer, { children: [_jsx(CancelButton, Object.assign({ onClick: handleCancel }, { children: t('cancel') })), _jsx(OkayButton, Object.assign({ disabled: isOkayButDisabled, onClick: handleConfirm }, { children: t('okay') }))] })] }))] }));
|
|
54
42
|
}
|
|
@@ -4,6 +4,7 @@ export declare const FilterButton: import("@emotion/styled").StyledComponent<imp
|
|
|
4
4
|
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
5
5
|
isActive?: boolean | undefined;
|
|
6
6
|
}, {}, {}>;
|
|
7
|
+
export declare const StyledMenu: import("@emotion/styled").StyledComponent<import("@mui/material/Menu").MenuProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
7
8
|
export declare const TitleStyled: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
8
9
|
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
9
10
|
}, "width" | "minHeight" | "height" | "bottom" | "left" | "right" | "top" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "visibility" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "classes" | "align" | "className" | "style" | "children" | "gutterBottom" | "noWrap" | "paragraph" | "sx" | "variant" | "variantMapping"> & {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Box from '@mui/material/Box';
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
3
|
import Button from '@mui/material/Button';
|
|
4
|
+
import Menu from '@mui/material/Menu';
|
|
4
5
|
import { Text } from '../index.js';
|
|
5
6
|
export const FilterButton = styled(Box, { shouldForwardProp: (props) => props !== 'isActive' })(({ theme, isActive }) => (Object.assign({ borderRadius: '4px', border: `1px solid ${theme.palette.divider}`, height: 32, width: 30, display: 'flex', alignItems: 'center', justifyContent: 'center', cursor: 'pointer', backgroundColor: theme.palette.common.white, ':hover': {
|
|
6
7
|
opacity: 0.7,
|
|
@@ -8,6 +9,17 @@ export const FilterButton = styled(Box, { shouldForwardProp: (props) => props !=
|
|
|
8
9
|
boxShadow: `0px 0px 4px 0px ${theme.palette.info.dark}80`,
|
|
9
10
|
border: `1px solid ${theme.palette.info.dark}`,
|
|
10
11
|
}))));
|
|
12
|
+
export const StyledMenu = styled(Menu)(({ theme }) => ({
|
|
13
|
+
marginTop: theme.spacing(1),
|
|
14
|
+
marginBottom: theme.spacing(1),
|
|
15
|
+
minWidth: 193,
|
|
16
|
+
'& .MuiPaper-root': {
|
|
17
|
+
borderRadius: theme.spacing(0.5),
|
|
18
|
+
'&>.MuiList-root': {
|
|
19
|
+
padding: 0,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
}));
|
|
11
23
|
export const TitleStyled = styled(Text)(({ theme }) => ({
|
|
12
24
|
fontWeight: theme.typography.fontWeightMedium,
|
|
13
25
|
fontSize: theme.typography.subtitle1.fontSize,
|
|
@@ -17,6 +29,7 @@ export const TitleStyled = styled(Text)(({ theme }) => ({
|
|
|
17
29
|
paddingBottom: theme.spacing(1),
|
|
18
30
|
paddingInlineEnd: theme.spacing(1),
|
|
19
31
|
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
32
|
+
display: 'block',
|
|
20
33
|
}));
|
|
21
34
|
export const Footer = styled(Box)(({ theme }) => ({
|
|
22
35
|
padding: '8px 16px',
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
import { TableMode } from '../../../../types/index.js';
|
|
4
3
|
export declare const ActionCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
5
4
|
tableMode?: TableMode | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const AgreementCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledAgreementCardIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const CardContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledAppsCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const AppsStatusContainer: import("@emotion/styled").StyledComponent<{
|
|
5
4
|
hidden?: boolean | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const AuthIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
3
|
export declare const AuthCellContainer: import("@emotion/styled").StyledComponent<{
|
|
5
4
|
hidden?: boolean | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledDownloadFileImageWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
4
3
|
isTextShown?: boolean | undefined;
|
|
5
4
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const SalesChannelsContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
5
4
|
hidden?: boolean | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const GeographyBox: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
4
3
|
variant?: "Global" | "Regional" | "Local" | undefined;
|
|
5
4
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
var _a;
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
1
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2
|
+
const runtimeConfig = (_a = window.__GLOBAL_CONFIG__) !== null && _a !== void 0 ? _a : {};
|
|
3
|
+
const config = {
|
|
4
|
+
env: (_b = runtimeConfig.ENV) !== null && _b !== void 0 ? _b : import.meta.env.VITE_ENV,
|
|
5
|
+
deploymentRegion: (_c = runtimeConfig.DEPLOYMENT_REGION) !== null && _c !== void 0 ? _c : import.meta.env.VITE_DEPLOYMENT_REGION,
|
|
6
|
+
baseUrl: (_d = runtimeConfig.BASE_URL) !== null && _d !== void 0 ? _d : import.meta.env.VITE_BASE_URL,
|
|
7
|
+
mwBaseUrl: (_e = runtimeConfig.MW_BASE_URL) !== null && _e !== void 0 ? _e : import.meta.env.VITE_MW_BASE_URL,
|
|
8
|
+
};
|
|
9
|
+
const isSAOCI = config.deploymentRegion === 'sa-oci';
|
|
10
|
+
export const BASE_URL = (_f = (isSAOCI ? 'https://mw-os.tap.com.sa' : config.mwBaseUrl)) !== null && _f !== void 0 ? _f : config.baseUrl;
|
|
5
11
|
export const API_URL = `${BASE_URL}/api`;
|
|
6
|
-
export const ENV =
|
|
12
|
+
export const ENV = config.env;
|
|
7
13
|
export const TEST_SECRET_KEY = import.meta.env.VITE_TEST_FIXED_SK;
|
|
14
|
+
console.log('runtimeConfig', { runtimeConfig, isSAOCI, BASE_URL });
|
package/build/types/index.d.ts
CHANGED
package/build/types/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
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.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.419-test.2",
|
|
5
|
+
"testVersion": 2,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|
|
@@ -164,4 +164,4 @@
|
|
|
164
164
|
"publishConfig": {
|
|
165
165
|
"registry": "https://registry.npmjs.org/"
|
|
166
166
|
}
|
|
167
|
-
}
|
|
167
|
+
}
|