@tap-payments/os-micro-frontend-shared 0.1.129-test.2 → 0.1.129-test.4-test.5

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.
@@ -11,13 +11,14 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import TableCell from '../../TableCell';
14
- import { EntityName, EntityWrapper, VerificationIcon, EntityContainer, EntityInfoContainer, VerificationContainer, EmptyCell } from './style';
14
+ import { EntityName, EntityWrapper, VerificationIcon, VerificationContainer } from './style';
15
15
  import { verificationIcon } from './constants';
16
16
  import Tooltip from '../../../Tooltip';
17
17
  import { CountryFlag } from '../../../index.js';
18
18
  import { getCountryName } from '../../../../utils/index.js';
19
+ import { Box } from '@mui/material';
19
20
  export default function EntityCell(_a) {
20
21
  var { entity, country, verificationStatus, licenseNumber, hideStatus } = _a, props = __rest(_a, ["entity", "country", "verificationStatus", "licenseNumber", "hideStatus"]);
21
22
  const icon = verificationIcon[verificationStatus !== null && verificationStatus !== void 0 ? verificationStatus : 'incomplete'];
22
- return (_jsx(TableCell, Object.assign({}, props, { sx: { cursor: (props === null || props === void 0 ? void 0 : props.onClick) ? 'pointer' : 'default' } }, { children: _jsx(Tooltip, Object.assign({ title: entity }, { children: _jsx(EntityWrapper, { children: licenseNumber ? (_jsxs(EntityContainer, { children: [_jsxs(EntityInfoContainer, { children: [_jsx(Tooltip, Object.assign({ title: getCountryName(country) }, { children: _jsx(CountryFlag, { code: country }) })), _jsx(EntityName, { children: licenseNumber })] }), !hideStatus && (_jsx(VerificationContainer, { children: _jsx(VerificationIcon, { src: icon }) }))] })) : (_jsx(EmptyCell, { children: "Not Available" })) }) })) })));
23
+ return (_jsx(TableCell, Object.assign({}, props, { sx: { cursor: (props === null || props === void 0 ? void 0 : props.onClick) ? 'pointer' : 'default' } }, { children: _jsx(Tooltip, Object.assign({ title: entity }, { children: _jsx(EntityWrapper, Object.assign({ sx: { cursor: props.onClick ? 'pointer' : 'default' } }, { children: _jsxs(Box, Object.assign({ display: "flex", alignItems: "center", gap: '5px', sx: { overflow: 'hidden', width: '100%' } }, { children: [_jsx(Tooltip, Object.assign({ title: getCountryName(country) }, { children: _jsx(CountryFlag, { code: country }) })), _jsx(EntityName, { children: licenseNumber }), !hideStatus && (_jsx(VerificationContainer, { children: _jsx(VerificationIcon, { src: icon }) }))] })) })) })) })));
23
24
  }
@@ -3,9 +3,4 @@ export declare const EntityWrapper: import("@emotion/styled").StyledComponent<im
3
3
  export declare const EntityIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
4
4
  export declare const EntityName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
5
  export declare const VerificationIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
6
- export declare const EntityContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
7
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
8
- }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
9
- export declare const EntityInfoContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
10
6
  export declare const VerificationContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
11
- export declare const EmptyCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,9 +1,9 @@
1
- import { Box, styled } from '@mui/material';
1
+ import { styled } from '@mui/material';
2
2
  export const EntityWrapper = styled('div')(({ theme }) => ({
3
3
  display: 'flex',
4
4
  alignItems: 'center',
5
5
  gap: theme.spacing(1),
6
- border: '1.029px solid #F2F2F2',
6
+ border: '1px solid #F2F2F2',
7
7
  borderRadius: '44px',
8
8
  padding: '4px 8px',
9
9
  lineHeight: '120%',
@@ -26,29 +26,7 @@ export const VerificationIcon = styled('img')(() => ({
26
26
  width: '10.5px',
27
27
  height: '10.5px',
28
28
  }));
29
- export const EntityContainer = styled(Box)({
30
- display: 'flex',
31
- alignItems: 'center',
32
- width: '100%',
33
- overflow: 'hidden',
34
- gap: '5px',
35
- });
36
- export const EntityInfoContainer = styled('div')({
37
- display: 'flex',
38
- alignItems: 'center',
39
- minWidth: '110px',
40
- gap: '8px',
41
- });
42
29
  export const VerificationContainer = styled('div')({
43
30
  marginLeft: 'auto',
44
31
  width: 'auto',
45
32
  });
46
- export const EmptyCell = styled('div')({
47
- fontWeight: 400,
48
- fontSize: 14,
49
- lineHeight: '120%',
50
- letterSpacing: 0,
51
- color: '#B1B1B1',
52
- textAlign: 'center',
53
- width: '100%',
54
- });
@@ -24,9 +24,10 @@ function SalesChannelCell(_a) {
24
24
  const sourceTooltip = channel.address;
25
25
  const channelCode = (_a = channel.code) === null || _a === void 0 ? void 0 : _a.replace(/_/g, '');
26
26
  const isLastChannel = index === (channels === null || channels === void 0 ? void 0 : channels.length) - 1;
27
- return (_jsx(Tooltip, Object.assign({ title: sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ order: index, variants: salesChannelAnimation(index, isTextShown ? 74 : 0), sx: Object.assign({ width: isTextShown ? '70px' : '36px', cursor: NON_CLICKABLE_CHANNELS.includes(channel.code) ? 'default' : 'pointer' }, (isLastChannel && {
28
- boxShadow: '7px 0px 8px 0px #F2F2F2',
29
- })), onClick: () => {
27
+ return (_jsx(Tooltip, Object.assign({ title: sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ order: index, variants: salesChannelAnimation(index, isTextShown ? 74 : 0, isLastChannel), sx: {
28
+ width: isTextShown ? '70px' : '36px',
29
+ cursor: NON_CLICKABLE_CHANNELS.includes(channel.code) ? 'default' : 'pointer',
30
+ }, onClick: () => {
30
31
  if (NON_CLICKABLE_CHANNELS.includes(channel.code))
31
32
  return;
32
33
  if (channel === null || channel === void 0 ? void 0 : channel.address)
@@ -267,7 +267,7 @@ export declare const SalesChannelsContainer: import("@emotion/styled").StyledCom
267
267
  }, {}, {}>;
268
268
  export declare const ChannelTextLabel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
269
269
  export declare const ChannelTextWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
270
- export declare const salesChannelAnimation: (index: number, xDelta?: number) => {
270
+ export declare const salesChannelAnimation: (index: number, xDelta?: number, isLastChannel?: boolean) => {
271
271
  start: {
272
272
  x: number;
273
273
  transition: {
@@ -277,6 +277,7 @@ export declare const salesChannelAnimation: (index: number, xDelta?: number) =>
277
277
  };
278
278
  };
279
279
  animate: {
280
+ boxShadow?: string | undefined;
280
281
  x: number;
281
282
  transition: {
282
283
  duration: number;
@@ -34,7 +34,7 @@ export const ChannelTextWrapper = styled('div')(() => ({
34
34
  justifyContent: 'center',
35
35
  paddingInline: '4px',
36
36
  }));
37
- export const salesChannelAnimation = (index, xDelta) => ({
37
+ export const salesChannelAnimation = (index, xDelta, isLastChannel) => ({
38
38
  start: {
39
39
  x: index * 6,
40
40
  transition: {
@@ -43,12 +43,11 @@ export const salesChannelAnimation = (index, xDelta) => ({
43
43
  ease: 'easeIn',
44
44
  },
45
45
  },
46
- animate: {
47
- x: xDelta ? index * xDelta : index * 39,
48
- transition: {
46
+ animate: Object.assign({ x: xDelta ? index * xDelta : index * 39, transition: {
49
47
  duration: 0.3,
50
48
  type: 'tween',
51
49
  ease: 'easeOut',
52
- },
53
- },
50
+ } }, (isLastChannel && {
51
+ boxShadow: '7px 0px 8px 0px #F2F2F2',
52
+ })),
54
53
  });
@@ -44,7 +44,7 @@ function Inputs({ onCloseDropdown, filter: { options = [], onConfirm, data, isOn
44
44
  }, disabled: isDisabled || isInputDisabled(apiKey, filterGroup), value: getInputValue(apiKey), inputProps: { autoComplete: 'off', 'data-testid': 'ColumnFilterInputs_input' }, endAdornment: _jsx(Box, { component: "img", "data-testid": "ColumnFilterInputs_icon", "data-icon": isInputHasValue(apiKey) ? 'close' : 'search', src: isInputHasValue(apiKey) ? grayCloseIcon : searchIcon, alt: "search", className: "icon", sx: { cursor: isInputHasValue(apiKey) ? 'pointer' : 'default' }, onClick: () => {
45
45
  onClickResetInput(apiKey);
46
46
  } }) })) }, apiKey))) })), _jsx(Collapse, Object.assign({ in: showClearButton, component: "section", "data-testid": "ColumnFilterInputs_Collapse", sx: {
47
- borderTop: '0',
47
+ borderTopColor: 'transparent',
48
48
  } }, { children: _jsx(ClearWrapper, Object.assign({ "data-testid": "ColumnFilterInputs_ClearWrapper" }, { children: _jsx(ClearButton, Object.assign({ type: "button", onClick: onClickClear, "data-testid": "ColumnFilterInputs_ClearButton" }, { children: t('clear') })) })) })), _jsxs(Footer, Object.assign({ component: "footer", "data-testid": "ColumnFilterInputs_footer" }, { children: [_jsx(CancelButton, Object.assign({ type: "button", onClick: onClickCancel, "data-testid": "ColumnFilterInputs_CancelButton" }, { children: t('cancel') })), _jsx(OkayButton, Object.assign({ type: "button", onClick: onClickOkay, "data-testid": "ColumnFilterInputs_OkayButton" }, { children: t('okay') }))] }))] })));
49
49
  }
50
50
  export default Inputs;
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.129-test.2",
5
- "testVersion": 2,
4
+ "version": "0.1.129-test.4-test.5",
5
+ "testVersion": 5,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",