@tap-payments/os-micro-frontend-shared 0.1.125 → 0.1.127-test.7

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/SearchListInput/SearchListInput.d.ts +10 -0
  5. package/build/components/SearchListInput/SearchListInput.js +20 -0
  6. package/build/components/SearchListInput/index.d.ts +2 -0
  7. package/build/components/SearchListInput/index.js +2 -0
  8. package/build/components/SearchListInput/style.d.ts +7 -0
  9. package/build/components/SearchListInput/style.js +15 -0
  10. package/build/components/TableCells/CustomCells/BrandsCell/BrandsCell.js +1 -1
  11. package/build/components/TableCells/CustomCells/IndividualsCell/IndividualsCell.js +1 -1
  12. package/build/components/TableCells/CustomCells/MarketPlaceCell/MarketPlaceCell.d.ts +1 -1
  13. package/build/components/TableCells/CustomCells/MarketPlaceCell/MarketPlaceCell.js +4 -4
  14. package/build/components/TableCells/CustomCells/MarketPlaceCell/type.d.ts +2 -2
  15. package/build/components/TableCells/CustomCells/SalesChannelCell/SalesChannelCell.js +4 -1
  16. package/build/components/TableCells/CustomCells/SalesChannelCell/constants.d.ts +2 -0
  17. package/build/components/TableCells/CustomCells/SalesChannelCell/constants.js +2 -0
  18. package/build/components/TableCells/CustomCells/SegmentsCell/SegmentsCell.d.ts +1 -1
  19. package/build/components/TableCells/CustomCells/SegmentsCell/SegmentsCell.js +8 -10
  20. package/build/components/TableCells/CustomCells/SegmentsCell/type.d.ts +3 -5
  21. package/build/components/VirtualTables/components/ColumnFilter/Inputs/Inputs.js +3 -1
  22. package/build/components/index.d.ts +1 -0
  23. package/build/components/index.js +1 -0
  24. package/build/constants/table/cell/merchantsTableCellWidth.d.ts +5 -5
  25. package/build/constants/table/cell/merchantsTableCellWidth.js +5 -5
  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);
@@ -0,0 +1,10 @@
1
+ import { BoxProps } from '@mui/material/Box';
2
+ type Props = BoxProps & {
3
+ value: string;
4
+ apiKey: string;
5
+ placeholder: string;
6
+ onSearchChange: (value: string) => void;
7
+ onSearchReset: () => void;
8
+ };
9
+ declare const SearchListInput: ({ value, apiKey, placeholder, onSearchChange, onSearchReset, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export default SearchListInput;
@@ -0,0 +1,20 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import Box from '@mui/material/Box';
14
+ import { grayCloseIcon, searchIcon } from '../../constants/index.js';
15
+ import { InputsWrapper, InputStyled } from './style';
16
+ const SearchListInput = (_a) => {
17
+ var { value, apiKey, placeholder, onSearchChange, onSearchReset } = _a, props = __rest(_a, ["value", "apiKey", "placeholder", "onSearchChange", "onSearchReset"]);
18
+ return (_jsx(InputsWrapper, Object.assign({ component: "main" }, props, { children: _jsx(InputStyled, { className: "input", name: apiKey, placeholder: placeholder, onChange: (e) => onSearchChange(e.target.value), value: value, inputProps: { autoComplete: 'off' }, endAdornment: _jsx(Box, { component: "img", "data-icon": value ? 'close' : 'search', src: value ? grayCloseIcon : searchIcon, alt: "search", className: "icon", sx: { cursor: value ? 'pointer' : 'default' }, onClick: onSearchReset }) }) })));
19
+ };
20
+ export default SearchListInput;
@@ -0,0 +1,2 @@
1
+ import SearchListInput from './SearchListInput';
2
+ export default SearchListInput;
@@ -0,0 +1,2 @@
1
+ import SearchListInput from './SearchListInput';
2
+ export default SearchListInput;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const InputStyled: import("@emotion/styled").StyledComponent<Readonly<import("@mui/material").InputProps & {
3
+ isError?: boolean | undefined;
4
+ }> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
5
+ export declare const InputsWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
7
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -0,0 +1,15 @@
1
+ import { styled } from '@mui/material/styles';
2
+ import Input from '../Input';
3
+ import Box from '@mui/material/Box';
4
+ export const InputStyled = styled(Input)(({ theme }) => ({
5
+ border: `1px solid ${theme.palette.divider}`,
6
+ '.icon': {
7
+ width: 14,
8
+ },
9
+ }));
10
+ export const InputsWrapper = styled(Box)(() => ({
11
+ padding: '8px 16px',
12
+ '> div + div': {
13
+ marginTop: '8px',
14
+ },
15
+ }));
@@ -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;
@@ -108,3 +108,4 @@ export { default as LazyImage } from './LazyImage';
108
108
  export { default as AmountStatusChip, type AmountStatusChipProps } from './AmountStatusChip';
109
109
  export { default as AuthenticationTypeChip, type AuthenticationTypeChipProps } from './AuthenticationTypeChip';
110
110
  export * from './LazyImage';
111
+ export { default as SearchListInput } from './SearchListInput';
@@ -108,3 +108,4 @@ export { default as LazyImage } from './LazyImage';
108
108
  export { default as AmountStatusChip } from './AmountStatusChip';
109
109
  export { default as AuthenticationTypeChip } from './AuthenticationTypeChip';
110
110
  export * from './LazyImage';
111
+ export { default as SearchListInput } from './SearchListInput';
@@ -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
  },
@@ -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.125",
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-test.7",
5
+ "testVersion": 7,
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
+ }