@tap-payments/os-micro-frontend-shared 0.1.122-test.7 → 0.1.123-test.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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);
@@ -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,12 @@ 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' }, onError: (e) => {
20
+ e.currentTarget.src = marketPlaceBlueIcon;
21
+ } }));
22
+ return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(Box, Object.assign({ sx: { display: 'flex', alignItems: 'center', gap: 1 } }, { children: _jsx(Tooltip, Object.assign({ title: marketPlaceName }, { children: _jsx(Box, Object.assign({ sx: {
21
23
  width: '24px',
22
24
  height: '24px',
23
25
  border: '1px solid #F2F2F2',
@@ -25,5 +27,5 @@ export default function MarketPlaceCell(_a) {
25
27
  display: 'flex',
26
28
  alignItems: 'center',
27
29
  justifyContent: 'center',
28
- } }, { children: _jsx("img", { src: marketPlaceIcon || marketPlaceBlueIcon, alt: "marketplace", style: { maxWidth: '18px', maxHeight: '18px', objectFit: 'cover' } }) }))) })) })) })));
30
+ } }, { children: logo })) })) })) })));
29
31
  }
@@ -2,5 +2,4 @@ import { TableCellProps } from '@mui/material';
2
2
  export type MarketPlaceCellProps = TableCellProps & {
3
3
  marketPlaceIcon?: string;
4
4
  marketPlaceName?: string;
5
- isTextShown?: boolean;
6
5
  };
@@ -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
26
  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}`;
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
  }
@@ -224,4 +224,14 @@ export declare const refundTableCellWidth: {
224
224
  readonly text: "116px";
225
225
  readonly sheet: "116px";
226
226
  };
227
+ readonly issuer_response: {
228
+ readonly default: "70px";
229
+ readonly text: "70px";
230
+ readonly sheet: "270px";
231
+ };
232
+ readonly acquirer_response: {
233
+ readonly default: "70px";
234
+ readonly text: "70px";
235
+ readonly sheet: "225px";
236
+ };
227
237
  };
@@ -224,4 +224,14 @@ export const refundTableCellWidth = {
224
224
  text: '116px',
225
225
  sheet: '116px',
226
226
  },
227
+ issuer_response: {
228
+ default: '70px',
229
+ text: '70px',
230
+ sheet: '270px',
231
+ },
232
+ acquirer_response: {
233
+ default: '70px',
234
+ text: '70px',
235
+ sheet: '225px',
236
+ },
227
237
  };
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.122-test.7",
5
- "testVersion": 7,
4
+ "version": "0.1.123-test.1",
5
+ "testVersion": 1,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",