@tap-payments/os-micro-frontend-shared 0.1.124 → 0.1.127

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.
Files changed (27) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +12 -12
  3. package/build/components/InputBase/PhoneInputBase/CountriesList/CountriesList.js +10 -9
  4. package/build/components/TableCells/CustomCells/BrandsCell/BrandsCell.js +1 -1
  5. package/build/components/TableCells/CustomCells/IndividualsCell/IndividualsCell.js +1 -1
  6. package/build/components/TableCells/CustomCells/MarketPlaceCell/MarketPlaceCell.d.ts +1 -1
  7. package/build/components/TableCells/CustomCells/MarketPlaceCell/MarketPlaceCell.js +4 -4
  8. package/build/components/TableCells/CustomCells/MarketPlaceCell/type.d.ts +2 -2
  9. package/build/components/TableCells/CustomCells/SalesChannelCell/SalesChannelCell.js +4 -1
  10. package/build/components/TableCells/CustomCells/SalesChannelCell/constants.d.ts +2 -0
  11. package/build/components/TableCells/CustomCells/SalesChannelCell/constants.js +2 -0
  12. package/build/components/TableCells/CustomCells/SegmentsCell/SegmentsCell.d.ts +1 -1
  13. package/build/components/TableCells/CustomCells/SegmentsCell/SegmentsCell.js +8 -10
  14. package/build/components/TableCells/CustomCells/SegmentsCell/type.d.ts +3 -5
  15. package/build/components/VirtualTables/components/ColumnFilter/Inputs/Inputs.js +3 -1
  16. package/build/constants/table/cell/authorizationTableCellWidth.d.ts +3 -3
  17. package/build/constants/table/cell/authorizationTableCellWidth.js +3 -3
  18. package/build/constants/table/cell/chargeTableCellWidth.d.ts +2 -2
  19. package/build/constants/table/cell/chargeTableCellWidth.js +2 -2
  20. package/build/constants/table/cell/destinationsTableCellWidth.d.ts +1 -1
  21. package/build/constants/table/cell/destinationsTableCellWidth.js +1 -1
  22. package/build/constants/table/cell/merchantsTableCellWidth.d.ts +5 -5
  23. package/build/constants/table/cell/merchantsTableCellWidth.js +5 -5
  24. package/build/constants/table/cell/refundTableCellWidth.d.ts +2 -2
  25. package/build/constants/table/cell/refundTableCellWidth.js +2 -2
  26. package/build/types/merchant.d.ts +1 -0
  27. package/package.json +139 -139
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Tap Payments
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Tap Payments
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
- # os-micro-frontend-shared
2
-
3
- ## Publishing Workflow
4
-
5
- 1. Update version in package.json
6
- 2. Commit changes
7
- 3. Create and push a tag:
8
-
9
- ```bash
10
- npm version patch # or minor, major
11
- git push origin main --tags
12
- ```
1
+ # os-micro-frontend-shared
2
+
3
+ ## Publishing Workflow
4
+
5
+ 1. Update version in package.json
6
+ 2. Commit changes
7
+ 3. Create and push a tag:
8
+
9
+ ```bash
10
+ npm version patch # or minor, major
11
+ git push origin main --tags
12
+ ```
@@ -5,6 +5,7 @@ import Skeleton from '@mui/material/Skeleton';
5
5
  import CustomBackdrop from '../../../CustomBackdrop';
6
6
  import { downArrowIcon, searchIcon } from '../../../../constants/index.js';
7
7
  import { CountryStyled, CountriesWrapper, CountriesListStyled, InputStyled, CountryButton, Required } from './style';
8
+ import { ClickAwayListener } from '@mui/material';
8
9
  function CountriesList({ isLoading, countries, value: countryValue, onCountryChange, required, disabled }) {
9
10
  const [selectedCountry, setSelectedCountry] = useState();
10
11
  const [anchorEl, setAnchorEl] = useState(null);
@@ -50,15 +51,15 @@ function CountriesList({ isLoading, countries, value: countryValue, onCountryCha
50
51
  border: 'none',
51
52
  height: 34,
52
53
  paddingInlineStart: '8px',
53
- } }, { children: isLoading ? (_jsx(Skeleton, { variant: "rectangular", width: 56.5, height: 20, sx: { borderRadius: '4px' } })) : (_jsxs(_Fragment, { children: [selectedCountry && (_jsxs(_Fragment, { children: [_jsx("img", { src: selectedCountry.logo, alt: "c", className: "logo" }), _jsx("span", { children: `+${selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.idd_prefix}` })] })), required && _jsx(Required, Object.assign({ component: "span" }, { children: "*" })), _jsx(Box, { component: "img", src: downArrowIcon, alt: "d", className: "arrow", sx: Object.assign({}, (open && { transform: 'rotate(180deg)' })) })] })) })), open && _jsx(CustomBackdrop, { onClick: closeDropdown }), open && (_jsxs(CountriesWrapper, Object.assign({ id: "CountriesList_CountriesWrapper", open: open, anchorEl: anchorEl, "data-testid": "CountriesList_CountriesWrapper", placement: "bottom-start" }, { children: [_jsx(InputStyled, { endAdornment: _jsx("img", { src: searchIcon, alt: "arrow" }), onChange: handleSearch, hideArrows: true, "data-testid": "CountriesList_InputStyled", value: searchValue }), _jsx(CountriesListStyled, Object.assign({ "data-testid": "CountriesList_CountriesListStyled" }, { children: filteredCountries.map((country) => {
54
- const isSelected = (selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.countryId) === country.countryId;
55
- return (_jsxs(CountryStyled, Object.assign({ onClick: () => {
56
- handleOnCountryChange(country);
57
- }, sx: {
58
- backgroundColor: isSelected ? '#F9F9F9' : 'transparent',
59
- color: isSelected ? '#000' : '#8D8D94',
60
- } }, { children: [_jsx("img", { src: country.logo, alt: "c", className: "logo" }), _jsx("span", { children: `+${country.idd_prefix}` })] }), `country-code-${country.countryId}`));
61
- }) }))] })))] })));
54
+ } }, { children: isLoading ? (_jsx(Skeleton, { variant: "rectangular", width: 56.5, height: 20, sx: { borderRadius: '4px' } })) : (_jsxs(_Fragment, { children: [selectedCountry && (_jsxs(_Fragment, { children: [_jsx("img", { src: selectedCountry.logo, alt: "c", className: "logo" }), _jsx("span", { children: `+${selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.idd_prefix}` })] })), required && _jsx(Required, Object.assign({ component: "span" }, { children: "*" })), _jsx(Box, { component: "img", src: downArrowIcon, alt: "d", className: "arrow", sx: Object.assign({}, (open && { transform: 'rotate(180deg)' })) })] })) })), open && _jsx(CustomBackdrop, { onClick: closeDropdown }), open && (_jsx(ClickAwayListener, Object.assign({ onClickAway: closeDropdown }, { children: _jsxs(CountriesWrapper, Object.assign({ id: "CountriesList_CountriesWrapper", open: open, anchorEl: anchorEl, "data-testid": "CountriesList_CountriesWrapper", placement: "bottom-start" }, { children: [_jsx(InputStyled, { endAdornment: _jsx("img", { src: searchIcon, alt: "arrow" }), onChange: handleSearch, hideArrows: true, "data-testid": "CountriesList_InputStyled", value: searchValue }), _jsx(CountriesListStyled, Object.assign({ "data-testid": "CountriesList_CountriesListStyled" }, { children: filteredCountries.map((country) => {
55
+ const isSelected = (selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.countryId) === country.countryId;
56
+ return (_jsxs(CountryStyled, Object.assign({ onClick: () => {
57
+ handleOnCountryChange(country);
58
+ }, sx: {
59
+ backgroundColor: isSelected ? '#F9F9F9' : 'transparent',
60
+ color: isSelected ? '#000' : '#8D8D94',
61
+ } }, { children: [_jsx("img", { src: country.logo, alt: "c", className: "logo" }), _jsx("span", { children: `+${country.idd_prefix}` })] }), `country-code-${country.countryId}`));
62
+ }) }))] })) })))] })));
62
63
  }
63
64
  CountriesList.displayName = 'CountriesList';
64
65
  export default memo(CountriesList);
@@ -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: 10, containerSize: 10, borderColor: "transparent", containerSx: { marginLeft: 'auto' } }))] })) })) })) })));
22
+ return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(Tooltip, Object.assign({ title: brand.name }, { children: _jsx(BrandsWrapper, 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(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 - 1] }) }))] })] })) : (_jsx(EmptyCell, { children: "Not Available" })) }) })));
20
+ return (_jsx(TableCell, Object.assign({}, props, { sx: { cursor: 'pointer' } }, { children: _jsx(Tooltip, Object.assign({ title: name }, { children: _jsx(IndividualsWrapper, { children: id ? (_jsxs(IndividualContainer, { 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
  }
@@ -1,2 +1,2 @@
1
1
  import { MarketPlaceCellProps } from './type';
2
- export default function MarketPlaceCell({ marketPlaceIcon, marketPlaceName, isTextShown, ...props }: MarketPlaceCellProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function MarketPlaceCell({ marketPlaceIcon, marketPlaceName, ...props }: MarketPlaceCellProps): import("react/jsx-runtime").JSX.Element;
@@ -14,10 +14,10 @@ import Tooltip from '../../../Tooltip';
14
14
  import TableCell from '../../TableCell';
15
15
  import { Box } from '@mui/material';
16
16
  import { marketPlaceBlueIcon } from '../../../../constants/index.js';
17
- import { TextLabel } from '../style';
18
17
  export default function MarketPlaceCell(_a) {
19
- var { marketPlaceIcon, marketPlaceName, isTextShown } = _a, props = __rest(_a, ["marketPlaceIcon", "marketPlaceName", "isTextShown"]);
20
- return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(Tooltip, Object.assign({ title: marketPlaceName }, { children: _jsx(Box, Object.assign({ sx: { display: 'flex', alignItems: 'center', gap: 1 } }, { children: isTextShown ? (_jsx(TextLabel, { children: marketPlaceName })) : (_jsx(Box, Object.assign({ sx: {
18
+ var { marketPlaceIcon, marketPlaceName } = _a, props = __rest(_a, ["marketPlaceIcon", "marketPlaceName"]);
19
+ const logo = marketPlaceIcon !== null && marketPlaceIcon !== void 0 ? marketPlaceIcon : (_jsx("img", { src: marketPlaceBlueIcon, alt: "marketplace", style: { maxWidth: '18px', maxHeight: '18px', objectFit: 'cover' } }));
20
+ return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(Box, Object.assign({ sx: { display: 'flex', alignItems: 'center', gap: 1 } }, { children: marketPlaceName && (_jsx(Tooltip, Object.assign({ title: marketPlaceName }, { children: _jsx(Box, Object.assign({ sx: {
21
21
  width: '24px',
22
22
  height: '24px',
23
23
  border: '1px solid #F2F2F2',
@@ -25,5 +25,5 @@ export default function MarketPlaceCell(_a) {
25
25
  display: 'flex',
26
26
  alignItems: 'center',
27
27
  justifyContent: 'center',
28
- } }, { children: _jsx("img", { src: marketPlaceIcon || marketPlaceBlueIcon, alt: "marketplace", style: { maxWidth: '18px', maxHeight: '18px', objectFit: 'cover' } }) }))) })) })) })));
28
+ } }, { children: logo })) }))) })) })));
29
29
  }
@@ -1,6 +1,6 @@
1
1
  import { TableCellProps } from '@mui/material';
2
+ import React from 'react';
2
3
  export type MarketPlaceCellProps = TableCellProps & {
3
- marketPlaceIcon?: string;
4
+ marketPlaceIcon?: React.ReactNode;
4
5
  marketPlaceName?: string;
5
- isTextShown?: boolean;
6
6
  };
@@ -15,6 +15,7 @@ import { ImageWrapper } from '../../../index.js';
15
15
  import { TableCell } from '../../../TableCells';
16
16
  import { openUrl } from '../../../../utils/index.js';
17
17
  import { ChannelTextLabel, ChannelTextWrapper, salesChannelAnimation, SalesChannelsContainer, StyledSourceCell, StyledSourceImage } from './style';
18
+ import { NON_CLICKABLE_CHANNELS } from './constants';
18
19
  function SalesChannelCell(_a) {
19
20
  var _b;
20
21
  var { channels, isTextShown } = _a, props = __rest(_a, ["channels", "isTextShown"]);
@@ -23,9 +24,11 @@ function SalesChannelCell(_a) {
23
24
  const sourceTooltip = channel.address;
24
25
  const channelCode = (_a = channel.code) === null || _a === void 0 ? void 0 : _a.replace(/_/g, '');
25
26
  const isLastChannel = index === (channels === null || channels === void 0 ? void 0 : channels.length) - 1;
26
- 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: 'pointer' }, (isLastChannel && {
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 && {
27
28
  boxShadow: '7px 0px 8px 0px #F2F2F2',
28
29
  })), onClick: () => {
30
+ if (NON_CLICKABLE_CHANNELS.includes(channel.code))
31
+ return;
29
32
  if (channel === null || channel === void 0 ? void 0 : channel.address)
30
33
  openUrl(channel.address);
31
34
  } }, { children: isTextShown ? (_jsx(ChannelTextWrapper, { children: _jsx(ChannelTextLabel, { children: channelCode }) })) : (_jsx(StyledSourceImage, { src: channel.logo, alt: channelCode })) })) }), `${channel}-${index}`));
@@ -0,0 +1,2 @@
1
+ import { SalesChannelTypes } from '../../../../types/index.js';
2
+ export declare const NON_CLICKABLE_CHANNELS: SalesChannelTypes[];
@@ -0,0 +1,2 @@
1
+ import { SalesChannelTypes } from '../../../../types/index.js';
2
+ export const NON_CLICKABLE_CHANNELS = [SalesChannelTypes.CALL_CENTER, SalesChannelTypes.PHYSICAL_STORE, SalesChannelTypes.IOS];
@@ -1,3 +1,3 @@
1
1
  import type { SegmentsCellProps } from './type';
2
- declare function SegmentsCell({ isTextShown, ...props }: SegmentsCellProps): import("react/jsx-runtime").JSX.Element;
2
+ declare function SegmentsCell({ isTextShown, segments, ...props }: SegmentsCellProps): import("react/jsx-runtime").JSX.Element;
3
3
  export default SegmentsCell;
@@ -20,25 +20,23 @@ import { segmentsIcons } from './constant';
20
20
  import { ReferenceTextLabel, ReferenceTextWrapper, ReferenceSourcesContainer, StyledSourceCell, referenceSourceAnimation } from './style';
21
21
  import IconWithBadge from '../../../IconWithBadge';
22
22
  function SegmentsCell(_a) {
23
- var { isTextShown } = _a, props = __rest(_a, ["isTextShown"]);
23
+ var { isTextShown, segments } = _a, props = __rest(_a, ["isTextShown", "segments"]);
24
24
  const [isTooltipOpen, setIsTooltipOpen] = useState(false);
25
25
  const theme = useTheme();
26
- const segments = useMemo(() => Object.keys(segmentsIcons).filter((key) => { var _a; return !!((_a = props[key]) === null || _a === void 0 ? void 0 : _a.name); }), [props]);
27
- const ReferenceSources = useMemo(() => segments.map((segment, index) => {
28
- const prefixKey = ['technology', 'institution'].includes(segment) ? 'Payment' : '';
29
- const segmentData = props[segment];
30
- const sourceTooltip = `${prefixKey} ${startCase(segment)} - ${segmentData === null || segmentData === void 0 ? void 0 : segmentData.name}`;
26
+ const ReferenceSources = useMemo(() => segments === null || segments === void 0 ? void 0 : segments.filter((segment) => !!segment.name).map((segment, index) => {
27
+ const prefixKey = ['technology', 'institution'].includes(segment.type) ? 'Payment' : '';
28
+ const sourceTooltip = segment.tooltip || `${prefixKey} ${startCase(segment.type)} - ${segment.name}`;
31
29
  return (_jsx(Tooltip, Object.assign({ onOpen: () => {
32
30
  setIsTooltipOpen(true);
33
31
  }, onClose: () => {
34
32
  setIsTooltipOpen(false);
35
33
  }, title: sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ order: index, variants: referenceSourceAnimation(index, theme.shadows[4], isTextShown ? 83 : 0), sx: {
36
34
  width: isTextShown ? '79px' : '36px',
37
- } }, { children: isTextShown ? (_jsx(ReferenceTextWrapper, { children: _jsx(ReferenceTextLabel, { children: startCase(segment) }) })) : (_jsx(IconWithBadge, { mainIcon: (segmentData === null || segmentData === void 0 ? void 0 : segmentData.icon) || segmentsIcons[segment], mainIconSize: segment === 'order' ? 11.82 : 16, containerSize: segment === 'order' ? 11.82 : 16, sx: Object.assign({}, ((segmentData === null || segmentData === void 0 ? void 0 : segmentData.icon) ? { borderRadius: '40px' } : { borderRadius: '0px' })), onError: (e) => {
38
- e.currentTarget.src = segmentsIcons[segment];
35
+ } }, { children: isTextShown ? (_jsx(ReferenceTextWrapper, { children: _jsx(ReferenceTextLabel, { children: startCase(segment.name) }) })) : (_jsx(IconWithBadge, { mainIcon: segment.icon || segmentsIcons[segment.type], mainIconSize: 16, containerSize: 16, sx: Object.assign({}, (segment.icon ? { borderRadius: '40px' } : { borderRadius: '0px' })), onError: (e) => {
36
+ e.currentTarget.src = segmentsIcons[segment.type];
39
37
  e.currentTarget.style.borderRadius = '0px';
40
- }, borderColor: "transparent" })) })) }), `${segment}-${index}`));
41
- }), [props, segments, isTextShown, theme]);
38
+ }, borderColor: "transparent" })) })) }), `${segment.name}-${index}`));
39
+ }), [segments, isTextShown, theme]);
42
40
  const referenceSourcesCount = (ReferenceSources === null || ReferenceSources === void 0 ? void 0 : ReferenceSources.length) || 0;
43
41
  return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(StyledSourceCell, { children: referenceSourcesCount > 0 ? (_jsx(ReferenceSourcesContainer, Object.assign({ layout: true, className: "reference-sources-container", whileHover: "animate", animate: isTooltipOpen ? 'animate' : 'start', sourcesCount: referenceSourcesCount, variants: { animate: { width: referenceSourcesCount * (6 + 32) } }, style: {
44
42
  zIndex: 29,
@@ -4,12 +4,10 @@ export type SegmentsType = keyof typeof segmentsIcons;
4
4
  export interface SegmentInfo {
5
5
  name?: string;
6
6
  icon?: string;
7
+ type: SegmentsType;
8
+ tooltip?: string;
7
9
  }
8
10
  export interface SegmentsCellProps extends TableCellProps {
9
- technology?: SegmentInfo;
10
- institution?: SegmentInfo;
11
- payment?: SegmentInfo;
12
- developmentHouse?: SegmentInfo;
13
- platform?: SegmentInfo;
14
11
  isTextShown?: boolean;
12
+ segments: SegmentInfo[];
15
13
  }
@@ -43,6 +43,8 @@ function Inputs({ onCloseDropdown, filter: { options = [], onConfirm, data, isOn
43
43
  setValues(Object.assign(Object.assign({}, values), { [apiKey]: e.target.value }));
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
- } }) })) }, apiKey))) })), _jsx(Collapse, Object.assign({ in: showClearButton, component: "section", "data-testid": "ColumnFilterInputs_Collapse" }, { 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') }))] }))] })));
46
+ } }) })) }, apiKey))) })), _jsx(Collapse, Object.assign({ in: showClearButton, component: "section", "data-testid": "ColumnFilterInputs_Collapse", sx: {
47
+ borderTop: '0',
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') }))] }))] })));
47
49
  }
48
50
  export default Inputs;
@@ -167,7 +167,7 @@ export declare const authorizationTableCellWidth: {
167
167
  readonly transaction_id: {
168
168
  readonly default: "120px";
169
169
  readonly text: "120px";
170
- readonly sheet: "140px";
170
+ readonly sheet: "315px";
171
171
  };
172
172
  readonly device: {
173
173
  readonly default: "60px";
@@ -197,7 +197,7 @@ export declare const authorizationTableCellWidth: {
197
197
  readonly payment_issuers: {
198
198
  readonly default: "150px";
199
199
  readonly text: "150px";
200
- readonly sheet: "404px";
200
+ readonly sheet: "430px";
201
201
  };
202
202
  readonly issuer_response: {
203
203
  readonly default: "70px";
@@ -242,6 +242,6 @@ export declare const authorizationTableCellWidth: {
242
242
  readonly acquirer_response: {
243
243
  readonly default: "70px";
244
244
  readonly text: "70px";
245
- readonly sheet: "225px";
245
+ readonly sheet: "253px";
246
246
  };
247
247
  };
@@ -167,7 +167,7 @@ export const authorizationTableCellWidth = {
167
167
  transaction_id: {
168
168
  default: '120px',
169
169
  text: '120px',
170
- sheet: '140px',
170
+ sheet: '315px',
171
171
  },
172
172
  device: {
173
173
  default: '60px',
@@ -197,7 +197,7 @@ export const authorizationTableCellWidth = {
197
197
  payment_issuers: {
198
198
  default: '150px',
199
199
  text: '150px',
200
- sheet: '404px',
200
+ sheet: '430px',
201
201
  },
202
202
  issuer_response: {
203
203
  default: '70px',
@@ -242,6 +242,6 @@ export const authorizationTableCellWidth = {
242
242
  acquirer_response: {
243
243
  default: '70px',
244
244
  text: '70px',
245
- sheet: '225px',
245
+ sheet: '253px',
246
246
  },
247
247
  };
@@ -82,7 +82,7 @@ export declare const chargeTableCellWidth: {
82
82
  readonly payment_issuers: {
83
83
  readonly default: "150px";
84
84
  readonly text: "150px";
85
- readonly sheet: "404px";
85
+ readonly sheet: "430px";
86
86
  };
87
87
  readonly payment_method: {
88
88
  readonly default: "150px";
@@ -142,7 +142,7 @@ export declare const chargeTableCellWidth: {
142
142
  readonly acquirer_response: {
143
143
  readonly default: "70px";
144
144
  readonly text: "70px";
145
- readonly sheet: "225px";
145
+ readonly sheet: "253px";
146
146
  };
147
147
  readonly payout_status: {
148
148
  readonly default: "70px";
@@ -82,7 +82,7 @@ export const chargeTableCellWidth = {
82
82
  payment_issuers: {
83
83
  default: '150px',
84
84
  text: '150px',
85
- sheet: '404px',
85
+ sheet: '430px',
86
86
  },
87
87
  payment_method: {
88
88
  default: '150px',
@@ -142,7 +142,7 @@ export const chargeTableCellWidth = {
142
142
  acquirer_response: {
143
143
  default: '70px',
144
144
  text: '70px',
145
- sheet: '225px',
145
+ sheet: '253px',
146
146
  },
147
147
  payout_status: {
148
148
  default: '70px',
@@ -137,7 +137,7 @@ export declare const destinationsTableCellWidth: {
137
137
  readonly payment_issuers: {
138
138
  readonly default: "150px";
139
139
  readonly text: "150px";
140
- readonly sheet: "404px";
140
+ readonly sheet: "430px";
141
141
  };
142
142
  readonly card_number: {
143
143
  readonly default: "120px";
@@ -137,7 +137,7 @@ export const destinationsTableCellWidth = {
137
137
  payment_issuers: {
138
138
  default: '150px',
139
139
  text: '150px',
140
- sheet: '404px',
140
+ sheet: '430px',
141
141
  },
142
142
  card_number: {
143
143
  default: '120px',
@@ -5,17 +5,17 @@ export declare const merchantsTableCellWidth: {
5
5
  readonly sheet: "225px";
6
6
  };
7
7
  readonly entity: {
8
- readonly default: "146px";
8
+ readonly default: "137px";
9
9
  readonly text: "180px";
10
10
  readonly sheet: "180px";
11
11
  };
12
12
  readonly created: {
13
- readonly default: "160px";
13
+ readonly default: "144px";
14
14
  readonly text: "170px";
15
15
  readonly sheet: "170px";
16
16
  };
17
17
  readonly brands: {
18
- readonly default: "140px";
18
+ readonly default: "131px";
19
19
  readonly text: "140px";
20
20
  readonly sheet: "140px";
21
21
  };
@@ -25,7 +25,7 @@ export declare const merchantsTableCellWidth: {
25
25
  readonly sheet: "110px";
26
26
  };
27
27
  readonly individuals: {
28
- readonly default: "185px";
28
+ readonly default: "147px";
29
29
  readonly text: "185px";
30
30
  readonly sheet: "185px";
31
31
  };
@@ -40,7 +40,7 @@ export declare const merchantsTableCellWidth: {
40
40
  readonly sheet: "180px";
41
41
  };
42
42
  readonly status: {
43
- readonly default: "64px";
43
+ readonly default: "55px";
44
44
  readonly text: "100px";
45
45
  readonly sheet: "100px";
46
46
  };
@@ -5,17 +5,17 @@ export const merchantsTableCellWidth = {
5
5
  sheet: '225px',
6
6
  },
7
7
  entity: {
8
- default: '146px',
8
+ default: '137px',
9
9
  text: '180px',
10
10
  sheet: '180px',
11
11
  },
12
12
  created: {
13
- default: '160px',
13
+ default: '144px',
14
14
  text: '170px',
15
15
  sheet: '170px',
16
16
  },
17
17
  brands: {
18
- default: '140px',
18
+ default: '131px',
19
19
  text: '140px',
20
20
  sheet: '140px',
21
21
  },
@@ -25,7 +25,7 @@ export const merchantsTableCellWidth = {
25
25
  sheet: '110px',
26
26
  },
27
27
  individuals: {
28
- default: '185px',
28
+ default: '147px',
29
29
  text: '185px',
30
30
  sheet: '185px',
31
31
  },
@@ -40,7 +40,7 @@ export const merchantsTableCellWidth = {
40
40
  sheet: '180px',
41
41
  },
42
42
  status: {
43
- default: '64px',
43
+ default: '55px',
44
44
  text: '100px',
45
45
  sheet: '100px',
46
46
  },
@@ -77,7 +77,7 @@ export declare const refundTableCellWidth: {
77
77
  readonly payment_issuers: {
78
78
  readonly default: "150px";
79
79
  readonly text: "150px";
80
- readonly sheet: "404px";
80
+ readonly sheet: "430px";
81
81
  };
82
82
  readonly payment_method: {
83
83
  readonly default: "150px";
@@ -232,6 +232,6 @@ export declare const refundTableCellWidth: {
232
232
  readonly acquirer_response: {
233
233
  readonly default: "70px";
234
234
  readonly text: "70px";
235
- readonly sheet: "225px";
235
+ readonly sheet: "253px";
236
236
  };
237
237
  };
@@ -77,7 +77,7 @@ export const refundTableCellWidth = {
77
77
  payment_issuers: {
78
78
  default: '150px',
79
79
  text: '150px',
80
- sheet: '404px',
80
+ sheet: '430px',
81
81
  },
82
82
  payment_method: {
83
83
  default: '150px',
@@ -232,6 +232,6 @@ export const refundTableCellWidth = {
232
232
  acquirer_response: {
233
233
  default: '70px',
234
234
  text: '70px',
235
- sheet: '225px',
235
+ sheet: '253px',
236
236
  },
237
237
  };
@@ -67,6 +67,7 @@ export interface BusinessMerchant {
67
67
  };
68
68
  platforms: Array<{
69
69
  id: string;
70
+ segment: string;
70
71
  brand: {
71
72
  logo?: string;
72
73
  name: Array<{
package/package.json CHANGED
@@ -1,139 +1,139 @@
1
- {
2
- "name": "@tap-payments/os-micro-frontend-shared",
3
- "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.1.124",
5
- "testVersion": 6,
6
- "type": "module",
7
- "main": "build/index.js",
8
- "module": "build/index.js",
9
- "types": "build/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "types": "./build/index.d.ts",
13
- "import": "./build/index.js",
14
- "require": "./build/index.js"
15
- },
16
- "./constants": {
17
- "types": "./build/constants/index.d.ts",
18
- "import": "./build/constants/index.js",
19
- "require": "./build/constants/index.js"
20
- },
21
- "./components": {
22
- "types": "./build/components/index.d.ts",
23
- "import": "./build/components/index.js",
24
- "require": "./build/components/index.js"
25
- },
26
- "./components/*": {
27
- "types": "./build/components/*/index.d.ts",
28
- "import": "./build/components/*/index.js",
29
- "require": "./build/components/*/index.js"
30
- },
31
- "./hooks": {
32
- "types": "./build/hooks/index.d.ts",
33
- "import": "./build/hooks/index.js",
34
- "require": "./build/hooks/index.js"
35
- },
36
- "./utils": {
37
- "types": "./build/utils/index.d.ts",
38
- "import": "./build/utils/index.js",
39
- "require": "./build/utils/index.js"
40
- },
41
- "./theme": {
42
- "types": "./build/theme/index.d.ts",
43
- "import": "./build/theme/index.js",
44
- "require": "./build/theme/index.js"
45
- },
46
- "./types": {
47
- "types": "./build/types/index.d.ts",
48
- "import": "./build/types/index.js",
49
- "require": "./build/types/index.js"
50
- }
51
- },
52
- "license": "MIT",
53
- "author": {
54
- "name": "Ahmed Sharkawy",
55
- "email": "a.elsharkawy@tap.company"
56
- },
57
- "files": [
58
- "build",
59
- "readme.md"
60
- ],
61
- "scripts": {
62
- "ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
63
- "push:local": "yarn ts:build && yalc publish --push",
64
- "push": "npm run ts:build && npm publish --access public",
65
- "push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
66
- "dev": "vite",
67
- "build": "tsc -b && vite build ",
68
- "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
69
- "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
70
- "lint": "eslint . --color",
71
- "lint:fix": "eslint src --fix --color",
72
- "preview": "vite preview",
73
- "prepare": "husky"
74
- },
75
- "dependencies": {
76
- "@emotion/react": "^11.11.0",
77
- "@emotion/styled": "^11.11.0",
78
- "@hookform/resolvers": "^3.3.1",
79
- "@mui/material": "^5.12.3",
80
- "@uiw/react-json-view": "^2.0.0-alpha.16",
81
- "axios": "^1.4.0",
82
- "color": "^5.0.0",
83
- "dayjs": "^1.11.8",
84
- "framer-motion": "10.11.0",
85
- "i18next": "^22.4.15",
86
- "memoize-one": "^6.0.0",
87
- "re-resizable": "^6.9.9",
88
- "react": "^18.2.0",
89
- "react-colorful": "^5.6.1",
90
- "react-currency-input-field": "^3.6.11",
91
- "react-dom": "^18.2.0",
92
- "react-draggable": "^4.4.6",
93
- "react-dropzone": "^14.2.3",
94
- "react-hook-form": "^7.45.4",
95
- "react-hot-toast": "^2.4.1",
96
- "react-i18next": "^12.2.2",
97
- "react-lazy-load-image-component": "^1.6.3",
98
- "react-multi-date-picker": "^4.1.2",
99
- "react-router-dom": "^7.7.0",
100
- "react-virtualized-auto-sizer": "^1.0.20",
101
- "react-window": "^1.8.9",
102
- "react-window-infinite-loader": "^1.0.9",
103
- "react18-input-otp": "^1.1.4",
104
- "recharts": "^2.15.1"
105
- },
106
- "devDependencies": {
107
- "@eslint/js": "^9.17.0",
108
- "@testing-library/jest-dom": "^5.16.5",
109
- "@types/lodash": "^4.17.15",
110
- "@types/react": "^18.2.6",
111
- "@types/react-dom": "^18.3.5",
112
- "@types/react-lazy-load-image-component": "^1.6.4",
113
- "@types/react-virtualized-auto-sizer": "^1.0.8",
114
- "@types/react-window": "^1.8.5",
115
- "@types/react-window-infinite-loader": "^1.0.6",
116
- "@vitejs/plugin-react": "^4.3.4",
117
- "eslint": "^9.17.0",
118
- "eslint-plugin-react-hooks": "^5.0.0",
119
- "eslint-plugin-react-refresh": "^0.4.16",
120
- "globals": "^15.14.0",
121
- "husky": "^8.0.3",
122
- "lint-staged": "^13.2.2",
123
- "prettier": "^2.8.8",
124
- "tsc-alias": "^1.8.16",
125
- "typescript": "5.0.2",
126
- "typescript-eslint": "^8.18.2",
127
- "vite": "6.0.5",
128
- "vite-tsconfig-paths": "^4.2.0"
129
- },
130
- "lint-staged": {
131
- "src/**/*.{ts,tsx,json,js,jsx}": [
132
- "yarn run prettier:fix",
133
- "yarn run lint"
134
- ]
135
- },
136
- "publishConfig": {
137
- "registry": "https://registry.npmjs.org/"
138
- }
139
- }
1
+ {
2
+ "name": "@tap-payments/os-micro-frontend-shared",
3
+ "description": "Shared components and utilities for Tap Payments micro frontends",
4
+ "version": "0.1.127",
5
+ "testVersion": 6,
6
+ "type": "module",
7
+ "main": "build/index.js",
8
+ "module": "build/index.js",
9
+ "types": "build/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./build/index.d.ts",
13
+ "import": "./build/index.js",
14
+ "require": "./build/index.js"
15
+ },
16
+ "./constants": {
17
+ "types": "./build/constants/index.d.ts",
18
+ "import": "./build/constants/index.js",
19
+ "require": "./build/constants/index.js"
20
+ },
21
+ "./components": {
22
+ "types": "./build/components/index.d.ts",
23
+ "import": "./build/components/index.js",
24
+ "require": "./build/components/index.js"
25
+ },
26
+ "./components/*": {
27
+ "types": "./build/components/*/index.d.ts",
28
+ "import": "./build/components/*/index.js",
29
+ "require": "./build/components/*/index.js"
30
+ },
31
+ "./hooks": {
32
+ "types": "./build/hooks/index.d.ts",
33
+ "import": "./build/hooks/index.js",
34
+ "require": "./build/hooks/index.js"
35
+ },
36
+ "./utils": {
37
+ "types": "./build/utils/index.d.ts",
38
+ "import": "./build/utils/index.js",
39
+ "require": "./build/utils/index.js"
40
+ },
41
+ "./theme": {
42
+ "types": "./build/theme/index.d.ts",
43
+ "import": "./build/theme/index.js",
44
+ "require": "./build/theme/index.js"
45
+ },
46
+ "./types": {
47
+ "types": "./build/types/index.d.ts",
48
+ "import": "./build/types/index.js",
49
+ "require": "./build/types/index.js"
50
+ }
51
+ },
52
+ "license": "MIT",
53
+ "author": {
54
+ "name": "Ahmed Sharkawy",
55
+ "email": "a.elsharkawy@tap.company"
56
+ },
57
+ "files": [
58
+ "build",
59
+ "readme.md"
60
+ ],
61
+ "scripts": {
62
+ "ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
63
+ "push:local": "yarn ts:build && yalc publish --push",
64
+ "push": "npm run ts:build && npm publish --access public",
65
+ "push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
66
+ "dev": "vite",
67
+ "build": "tsc -b && vite build ",
68
+ "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
69
+ "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
70
+ "lint": "eslint . --color",
71
+ "lint:fix": "eslint src --fix --color",
72
+ "preview": "vite preview",
73
+ "prepare": "husky"
74
+ },
75
+ "dependencies": {
76
+ "@emotion/react": "^11.11.0",
77
+ "@emotion/styled": "^11.11.0",
78
+ "@hookform/resolvers": "^3.3.1",
79
+ "@mui/material": "^5.12.3",
80
+ "@uiw/react-json-view": "^2.0.0-alpha.16",
81
+ "axios": "^1.4.0",
82
+ "color": "^5.0.0",
83
+ "dayjs": "^1.11.8",
84
+ "framer-motion": "10.11.0",
85
+ "i18next": "^22.4.15",
86
+ "memoize-one": "^6.0.0",
87
+ "re-resizable": "^6.9.9",
88
+ "react": "^18.2.0",
89
+ "react-colorful": "^5.6.1",
90
+ "react-currency-input-field": "^3.6.11",
91
+ "react-dom": "^18.2.0",
92
+ "react-draggable": "^4.4.6",
93
+ "react-dropzone": "^14.2.3",
94
+ "react-hook-form": "^7.45.4",
95
+ "react-hot-toast": "^2.4.1",
96
+ "react-i18next": "^12.2.2",
97
+ "react-lazy-load-image-component": "^1.6.3",
98
+ "react-multi-date-picker": "^4.1.2",
99
+ "react-router-dom": "^7.7.0",
100
+ "react-virtualized-auto-sizer": "^1.0.20",
101
+ "react-window": "^1.8.9",
102
+ "react-window-infinite-loader": "^1.0.9",
103
+ "react18-input-otp": "^1.1.4",
104
+ "recharts": "^2.15.1"
105
+ },
106
+ "devDependencies": {
107
+ "@eslint/js": "^9.17.0",
108
+ "@testing-library/jest-dom": "^5.16.5",
109
+ "@types/lodash": "^4.17.15",
110
+ "@types/react": "^18.2.6",
111
+ "@types/react-dom": "^18.3.5",
112
+ "@types/react-lazy-load-image-component": "^1.6.4",
113
+ "@types/react-virtualized-auto-sizer": "^1.0.8",
114
+ "@types/react-window": "^1.8.5",
115
+ "@types/react-window-infinite-loader": "^1.0.6",
116
+ "@vitejs/plugin-react": "^4.3.4",
117
+ "eslint": "^9.17.0",
118
+ "eslint-plugin-react-hooks": "^5.0.0",
119
+ "eslint-plugin-react-refresh": "^0.4.16",
120
+ "globals": "^15.14.0",
121
+ "husky": "^8.0.3",
122
+ "lint-staged": "^13.2.2",
123
+ "prettier": "^2.8.8",
124
+ "tsc-alias": "^1.8.16",
125
+ "typescript": "5.0.2",
126
+ "typescript-eslint": "^8.18.2",
127
+ "vite": "6.0.5",
128
+ "vite-tsconfig-paths": "^4.2.0"
129
+ },
130
+ "lint-staged": {
131
+ "src/**/*.{ts,tsx,json,js,jsx}": [
132
+ "yarn run prettier:fix",
133
+ "yarn run lint"
134
+ ]
135
+ },
136
+ "publishConfig": {
137
+ "registry": "https://registry.npmjs.org/"
138
+ }
139
+ }