@tap-payments/os-micro-frontend-shared 0.1.71 → 0.1.73-test.1

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.
@@ -8,7 +8,7 @@ function FilteredIds({ Ids, onCancelClick, isShown, cardNumber }) {
8
8
  var _a;
9
9
  if (!isShown)
10
10
  return null;
11
- return (_jsxs(FilteredIdsContainer, Object.assign({ centered: !!cardNumber, isLongerString: ((_a = cardNumber === null || cardNumber === void 0 ? void 0 : cardNumber.length) !== null && _a !== void 0 ? _a : 0) > 11 }, { children: [cardNumber ? _jsx(StyledFilterName, { children: cardNumber }) : _jsx("span", { children: Ids === null || Ids === void 0 ? void 0 : Ids.join(',') }), _jsx(StyledBadge, Object.assign({ pointer: true, round: true, onClick: onCancelClick, variant: BadgeVariants.ACTIVE }, { children: _jsx("img", { src: whiteCloseIcon, alt: "close", style: {
11
+ return (_jsxs(FilteredIdsContainer, Object.assign({ isLongerString: ((_a = cardNumber === null || cardNumber === void 0 ? void 0 : cardNumber.length) !== null && _a !== void 0 ? _a : 0) > 11 }, { children: [cardNumber ? _jsx(StyledFilterName, { children: cardNumber }) : _jsx("span", { children: Ids === null || Ids === void 0 ? void 0 : Ids.join(',') }), _jsx(StyledBadge, Object.assign({ pointer: true, round: true, onClick: onCancelClick, variant: BadgeVariants.ACTIVE, sx: { position: 'absolute', right: '8px' } }, { children: _jsx("img", { src: whiteCloseIcon, alt: "close", style: {
12
12
  width: '8px',
13
13
  height: '7px',
14
14
  } }) }))] })));
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  interface FilteredIdsContainerProps {
3
- centered: boolean;
4
3
  isLongerString: boolean;
5
4
  }
6
5
  export declare const FilteredIdsContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
@@ -1,12 +1,11 @@
1
1
  import { Box, styled } from '@mui/material';
2
2
  export const FilteredIdsContainer = styled(Box, {
3
- shouldForwardProp: (props) => props !== 'centered' && props !== 'isLongerString',
4
- })(({ theme, centered, isLongerString }) => ({
3
+ shouldForwardProp: (props) => props !== 'isLongerString',
4
+ })(({ theme, isLongerString }) => ({
5
5
  display: 'flex',
6
- justifyContent: centered ? 'space-between' : 'flex-start',
6
+ justifyContent: 'center',
7
7
  alignItems: 'center',
8
- paddingRight: theme.spacing(1.3),
9
- paddingLeft: theme.spacing(3),
8
+ padding: '6px 16px',
10
9
  height: '32px',
11
10
  background: theme.palette.background.gradient.shadedBlue,
12
11
  color: theme.palette.common.white,
@@ -5,6 +5,7 @@ export const StyledFormControlLabel = styled(FormControlLabel, {
5
5
  })(({ size = 'small', showHoverEffects = true, labelSx }) => (Object.assign(Object.assign({ margin: '0', width: '100%', cursor: 'pointer', padding: size === 'small' ? '7.5px 16px 7.5px 8px' : size === 'medium' ? '9px 16px 9px 10px' : '11px 16px 11px 12px', maxHeight: size === 'small' ? '35px' : size === 'medium' ? '40px' : '45px' }, (showHoverEffects && {
6
6
  '&:hover': {
7
7
  boxShadow: '0px 0px 16px 0px #00000021',
8
+ borderLeft: '1px solid transparent',
8
9
  },
9
10
  })), { '& .MuiFormControlLabel-label': Object.assign({ fontSize: size === 'small' ? '11px' : size === 'medium' ? '13px' : '15px', fontWeight: '500', color: '#20232B', width: '100%', cursor: 'pointer' }, labelSx), '& .MuiRadio-root': {
10
11
  cursor: 'pointer',
@@ -19,5 +19,5 @@ import IconWithBadge from '../../../IconWithBadge';
19
19
  export default function BrandsCell(_a) {
20
20
  var { brand, verificationStatus, hideStatus } = _a, props = __rest(_a, ["brand", "verificationStatus", "hideStatus"]);
21
21
  const icon = verificationIcon[verificationStatus !== null && verificationStatus !== void 0 ? verificationStatus : 'incomplete'];
22
- return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(BrandsWrapper, Object.assign({ sx: { cursor: props.onClick ? 'pointer' : 'default' } }, { children: _jsx(Tooltip, Object.assign({ title: brand.name }, { children: _jsxs(Box, Object.assign({ display: "flex", alignItems: "center", gap: '5px', sx: { overflow: 'hidden', width: '100%' } }, { children: [_jsx(IconWithBadge, { mainIcon: brand.logo, mainIconSize: 16, containerSize: 16, borderColor: "transparent" }), _jsx(Label, Object.assign({ sx: Object.assign({}, (!brand.name && { color: '#B1B1B1' })) }, { children: brand.name || 'Not Available' })), !hideStatus && (_jsx(IconWithBadge, { mainIcon: icon, mainIconSize: 16, containerSize: 16, borderColor: "transparent", containerSx: { marginLeft: 'auto' } }))] })) })) })) })));
22
+ return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(BrandsWrapper, Object.assign({ sx: { cursor: props.onClick ? 'pointer' : 'default' } }, { children: _jsx(Tooltip, Object.assign({ title: brand.name }, { children: _jsxs(Box, Object.assign({ display: "flex", alignItems: "center", gap: '5px', sx: { overflow: 'hidden', width: '100%' } }, { children: [_jsx(IconWithBadge, { mainIcon: brand.logo, mainIconSize: 16, containerSize: 16, borderColor: "transparent" }), _jsx(Label, Object.assign({ sx: Object.assign({}, (!brand.name && { color: '#B1B1B1' })) }, { children: brand.name || 'Not Available' })), !hideStatus && (_jsx(IconWithBadge, { mainIcon: icon, mainIconSize: 10, containerSize: 10, borderColor: "transparent", containerSx: { marginLeft: 'auto' } }))] })) })) })) })));
23
23
  }
@@ -17,5 +17,5 @@ import Tooltip from '../../../Tooltip';
17
17
  export default function IndividualsCell(_a) {
18
18
  var { id, status, count, name } = _a, props = __rest(_a, ["id", "status", "count", "name"]);
19
19
  const icon = verificationIcons[status !== null && status !== void 0 ? status : 'incomplete'];
20
- return (_jsx(TableCell, Object.assign({}, props, { sx: { cursor: 'pointer' } }, { children: _jsx(IndividualsWrapper, { children: id ? (_jsxs(IndividualContainer, { children: [_jsx(Tooltip, Object.assign({ title: name }, { children: _jsx(IndividualName, { children: id }) })), _jsxs(VerificationContainer, { children: [_jsx(VerificationIcon, { src: icon }), count > 1 && (_jsx("div", { children: _jsxs(Count, { children: ["+", count] }) }))] })] })) : (_jsx(EmptyCell, { children: "Not Available" })) }) })));
20
+ return (_jsx(TableCell, Object.assign({}, props, { sx: { cursor: 'pointer' } }, { children: _jsx(IndividualsWrapper, { children: id ? (_jsxs(IndividualContainer, { children: [_jsx(Tooltip, Object.assign({ title: name }, { children: _jsx(IndividualName, { children: id }) })), _jsxs(VerificationContainer, { children: [_jsx(VerificationIcon, { src: icon }), count > 1 && (_jsx("div", { children: _jsxs(Count, { children: ["+", count - 1] }) }))] })] })) : (_jsx(EmptyCell, { children: "Not Available" })) }) })));
21
21
  }
@@ -17,15 +17,20 @@ import { ChannelTextLabel, ChannelTextWrapper, salesChannelAnimation, SalesChann
17
17
  function SalesChannelCell(_a) {
18
18
  var _b;
19
19
  var { channels, isTextShown } = _a, props = __rest(_a, ["channels", "isTextShown"]);
20
- const salesChannels = (_b = channels === null || channels === void 0 ? void 0 : channels.filter((s) => !!s.address)) === null || _b === void 0 ? void 0 : _b.map((channel, index) => {
20
+ const salesChannels = (_b = channels === null || channels === void 0 ? void 0 : channels.filter((item) => !!item.address)) === null || _b === void 0 ? void 0 : _b.map((channel, index) => {
21
21
  var _a;
22
22
  const sourceTooltip = channel.address;
23
23
  const channelCode = (_a = channel.code) === null || _a === void 0 ? void 0 : _a.replace(/_/g, '');
24
+ let channelAddressUrl = channel.address || '';
25
+ if (!/^https?:\/\//i.test(channelAddressUrl)) {
26
+ channelAddressUrl = 'https://' + channelAddressUrl;
27
+ }
24
28
  return (_jsx(Tooltip, Object.assign({ title: sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ order: index, variants: salesChannelAnimation(index, isTextShown ? 74 : 0), sx: {
25
29
  width: isTextShown ? '70px' : '36px',
26
30
  cursor: 'pointer',
31
+ boxShadow: '7px 0px 8px 0px #F2F2F2',
27
32
  }, onClick: () => {
28
- window.open(channel.address, '_blank');
33
+ window.open(channelAddressUrl, '_blank');
29
34
  } }, { children: isTextShown ? (_jsx(ChannelTextWrapper, { children: _jsx(ChannelTextLabel, { children: channelCode }) })) : (_jsx(StyledSourceImage, { src: channel.logo, alt: channelCode })) })) }), `${channel}-${index}`));
30
35
  });
31
36
  const salesChannelsCount = (salesChannels === null || salesChannels === void 0 ? void 0 : salesChannels.length) || 0;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { BackdropProps as MuiBackdropProps } from '@mui/material/Backdrop';
3
+ export type WindowBackdropProps = MuiBackdropProps;
4
+ declare function WindowBackdrop(props: WindowBackdropProps): import("react").ReactPortal;
5
+ declare const _default: import("react").MemoExoticComponent<typeof WindowBackdrop>;
6
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { memo } from 'react';
3
+ import { createPortal } from 'react-dom';
4
+ import Backdrop from '@mui/material/Backdrop';
5
+ import { alpha } from '@mui/material/styles';
6
+ function WindowBackdrop(props) {
7
+ return createPortal(_jsx(Backdrop, Object.assign({ sx: { zIndex: 1, backgroundColor: (theme) => alpha(theme.palette.common.black, 0.3) } }, props)), document.body);
8
+ }
9
+ export default memo(WindowBackdrop);
@@ -0,0 +1 @@
1
+ export { default } from './WindowBackdrop';
@@ -0,0 +1 @@
1
+ export { default } from './WindowBackdrop';
@@ -1,14 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { ACCOUNT_SECTION, UserSection } from '../../types/index.js';
2
+ import { Section } from './type';
3
3
  interface WindowSideBarProps {
4
- sections: UserSection[];
4
+ sections: Section[];
5
5
  isMaximized?: boolean;
6
- onClick?: (section: {
7
- id: ACCOUNT_SECTION;
8
- title?: string;
9
- icon?: string;
10
- }) => void;
11
- activeSection?: ACCOUNT_SECTION;
6
+ onClick?: (section: Section) => void;
7
+ activeSection?: string;
12
8
  }
13
9
  declare function WindowSideBar({ sections, isMaximized, onClick, activeSection }: WindowSideBarProps): import("react/jsx-runtime").JSX.Element;
14
10
  declare const _default: import("react").MemoExoticComponent<typeof WindowSideBar>;
@@ -1,4 +1,5 @@
1
1
  import WindowSideBar from './WindowSideBar';
2
2
  export { TITLE_BAR_HEIGHT } from './constant';
3
+ export type { Section } from './type';
3
4
  export { SideBar, Content } from './style';
4
5
  export default WindowSideBar;
@@ -0,0 +1,10 @@
1
+ export interface Section {
2
+ id: string;
3
+ title: string;
4
+ icon?: string;
5
+ subSections?: {
6
+ id: string;
7
+ title: string;
8
+ icon?: string;
9
+ }[];
10
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -103,3 +103,4 @@ export * from './RadioButton';
103
103
  export * from './RadioGroup';
104
104
  export * from './LeftPeekRightExpandingChip';
105
105
  export { default as ColorPicker } from './ColorPicker';
106
+ export { default as WindowBackdrop } from './WindowBackdrop';
@@ -103,3 +103,4 @@ export * from './RadioButton';
103
103
  export * from './RadioGroup';
104
104
  export * from './LeftPeekRightExpandingChip';
105
105
  export { default as ColorPicker } from './ColorPicker';
106
+ export { default as WindowBackdrop } from './WindowBackdrop';
@@ -103,6 +103,7 @@ export declare const checkIcon: string;
103
103
  export declare const closeXIcon: string;
104
104
  export declare const dragIcon: string;
105
105
  export declare const checkboxIcon: string;
106
+ export declare const whitePlusIcon: string;
106
107
  export declare const protectIcon: string;
107
108
  export declare const unisoIcon: string;
108
109
  export declare const addidasIcon: string;
@@ -107,6 +107,7 @@ export const checkIcon = `${appBaseUrl}/check.svg`;
107
107
  export const closeXIcon = `${appBaseUrl}/closeX.svg`;
108
108
  export const dragIcon = `${appBaseUrl}/drag.svg`;
109
109
  export const checkboxIcon = `${appBaseUrl}/checkboxIcon.svg`;
110
+ export const whitePlusIcon = `${lightUrl}/plusWhite.svg`;
110
111
  export const protectIcon = `${appBaseUrl}/checkboxIcon.svg`;
111
112
  export const unisoIcon = `${lightUrl}/Uniso.svg`;
112
113
  export const addidasIcon = `${lightUrl}/addidas.svg`;
@@ -5,19 +5,19 @@ export declare const merchantsTableCellWidth: {
5
5
  readonly sheet: "225px";
6
6
  };
7
7
  readonly entity: {
8
- readonly default: "150px";
8
+ readonly default: "146px";
9
9
  readonly text: "180px";
10
10
  readonly sheet: "180px";
11
11
  };
12
12
  readonly created: {
13
- readonly default: "170px";
13
+ readonly default: "160px";
14
14
  readonly text: "170px";
15
15
  readonly sheet: "170px";
16
16
  };
17
17
  readonly brands: {
18
- readonly default: "116px";
19
- readonly text: "120px";
20
- readonly sheet: "120px";
18
+ readonly default: "140px";
19
+ readonly text: "140px";
20
+ readonly sheet: "140px";
21
21
  };
22
22
  readonly marketplace: {
23
23
  readonly default: "110px";
@@ -25,9 +25,9 @@ export declare const merchantsTableCellWidth: {
25
25
  readonly sheet: "110px";
26
26
  };
27
27
  readonly individuals: {
28
- readonly default: "116px";
29
- readonly text: "120px";
30
- readonly sheet: "120px";
28
+ readonly default: "185px";
29
+ readonly text: "185px";
30
+ readonly sheet: "185px";
31
31
  };
32
32
  readonly segments: {
33
33
  readonly default: "70px";
@@ -35,17 +35,17 @@ export declare const merchantsTableCellWidth: {
35
35
  readonly sheet: "180px";
36
36
  };
37
37
  readonly psp: {
38
- readonly default: "60px";
38
+ readonly default: "70px";
39
39
  readonly text: "180px";
40
40
  readonly sheet: "180px";
41
41
  };
42
42
  readonly status: {
43
- readonly default: "80px";
43
+ readonly default: "64px";
44
44
  readonly text: "100px";
45
45
  readonly sheet: "100px";
46
46
  };
47
47
  readonly partners: {
48
- readonly default: "75px";
48
+ readonly default: "88px";
49
49
  readonly text: "100px";
50
50
  readonly sheet: "100px";
51
51
  };
@@ -65,8 +65,13 @@ export declare const merchantsTableCellWidth: {
65
65
  readonly sheet: "180px";
66
66
  };
67
67
  readonly channels: {
68
- readonly default: "110px";
68
+ readonly default: "94px";
69
69
  readonly text: "120px";
70
70
  readonly sheet: "120px";
71
71
  };
72
+ readonly merchant: {
73
+ readonly default: "175px";
74
+ readonly text: "180px";
75
+ readonly sheet: "180px";
76
+ };
72
77
  };
@@ -5,19 +5,19 @@ export const merchantsTableCellWidth = {
5
5
  sheet: '225px',
6
6
  },
7
7
  entity: {
8
- default: '150px',
8
+ default: '146px',
9
9
  text: '180px',
10
10
  sheet: '180px',
11
11
  },
12
12
  created: {
13
- default: '170px',
13
+ default: '160px',
14
14
  text: '170px',
15
15
  sheet: '170px',
16
16
  },
17
17
  brands: {
18
- default: '116px',
19
- text: '120px',
20
- sheet: '120px',
18
+ default: '140px',
19
+ text: '140px',
20
+ sheet: '140px',
21
21
  },
22
22
  marketplace: {
23
23
  default: '110px',
@@ -25,9 +25,9 @@ export const merchantsTableCellWidth = {
25
25
  sheet: '110px',
26
26
  },
27
27
  individuals: {
28
- default: '116px',
29
- text: '120px',
30
- sheet: '120px',
28
+ default: '185px',
29
+ text: '185px',
30
+ sheet: '185px',
31
31
  },
32
32
  segments: {
33
33
  default: '70px',
@@ -35,17 +35,17 @@ export const merchantsTableCellWidth = {
35
35
  sheet: '180px',
36
36
  },
37
37
  psp: {
38
- default: '60px',
38
+ default: '70px',
39
39
  text: '180px',
40
40
  sheet: '180px',
41
41
  },
42
42
  status: {
43
- default: '80px',
43
+ default: '64px',
44
44
  text: '100px',
45
45
  sheet: '100px',
46
46
  },
47
47
  partners: {
48
- default: '75px',
48
+ default: '88px',
49
49
  text: '100px',
50
50
  sheet: '100px',
51
51
  },
@@ -65,8 +65,13 @@ export const merchantsTableCellWidth = {
65
65
  sheet: '180px',
66
66
  },
67
67
  channels: {
68
- default: '110px',
68
+ default: '94px',
69
69
  text: '120px',
70
70
  sheet: '120px',
71
71
  },
72
+ merchant: {
73
+ default: '175px',
74
+ text: '180px',
75
+ sheet: '180px',
76
+ },
72
77
  };
@@ -2,7 +2,6 @@ import { UserApp } from './apps';
2
2
  import { Brand } from './brand';
3
3
  import { Entity } from './entity';
4
4
  import { Merchant } from './merchant';
5
- import { ACCOUNT_SECTION } from './account';
6
5
  import { Country } from './appConfig';
7
6
  export interface TextAndLang {
8
7
  lang: string;
@@ -161,7 +160,7 @@ export interface SegmentRole {
161
160
  role_id: string;
162
161
  }
163
162
  export interface UserSection {
164
- id: ACCOUNT_SECTION;
163
+ id: string;
165
164
  title?: string;
166
165
  icon?: string;
167
166
  }
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.71",
5
- "testVersion": 0,
4
+ "version": "0.1.73-test.1",
5
+ "testVersion": 1,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",
@@ -134,4 +134,4 @@
134
134
  "publishConfig": {
135
135
  "registry": "https://registry.npmjs.org/"
136
136
  }
137
- }
137
+ }