@tap-payments/os-micro-frontend-shared 0.1.147-test.1 → 0.1.147-test.2
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.
|
@@ -25,14 +25,17 @@ function SegmentsCell(_a) {
|
|
|
25
25
|
const [isTooltipOpen, setIsTooltipOpen] = useState(false);
|
|
26
26
|
const theme = useTheme();
|
|
27
27
|
const ReferenceSources = useMemo(() => segments === null || segments === void 0 ? void 0 : segments.filter((segment) => !!segment.name).map((segment, index) => {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
const isPlatformSegment = (_b = (_a = segment.type) === null || _a === void 0 ? void 0 : _a.toLowerCase) === null || _b === void 0 ? void 0 : _b.call(_a).includes('platform');
|
|
28
30
|
const sourceTooltip = segment.tooltip || getSegmentTooltip(segment);
|
|
31
|
+
const icon = isPlatformSegment ? segmentsIcons.platform : segmentsIcons[segment.type];
|
|
29
32
|
return (_jsx(Tooltip, Object.assign({ onOpen: () => {
|
|
30
33
|
setIsTooltipOpen(true);
|
|
31
34
|
}, onClose: () => {
|
|
32
35
|
setIsTooltipOpen(false);
|
|
33
36
|
}, title: sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ order: index, variants: referenceSourceAnimation(index, theme.shadows[4], isTextShown ? 83 : 0), sx: {
|
|
34
37
|
width: isTextShown ? '79px' : '36px',
|
|
35
|
-
} }, { children: isTextShown ? (_jsx(ReferenceTextWrapper, { children: _jsx(ReferenceTextLabel, { children: startCase(segment.name) }) })) : (_jsx(IconWithBadge, { mainIcon: segment.icon ||
|
|
38
|
+
} }, { children: isTextShown ? (_jsx(ReferenceTextWrapper, { children: _jsx(ReferenceTextLabel, { children: startCase(segment.name) }) })) : (_jsx(IconWithBadge, { mainIcon: segment.icon || icon, mainIconSize: 16, containerSize: 16, sx: Object.assign({}, (segment.icon ? { borderRadius: '40px' } : { borderRadius: '0px' })), onError: (e) => {
|
|
36
39
|
e.currentTarget.src = segmentsIcons[segment.type];
|
|
37
40
|
e.currentTarget.style.borderRadius = '0px';
|
|
38
41
|
}, borderColor: "transparent" })) })) }), `${segment.name}-${index}`));
|
|
@@ -6,8 +6,8 @@ export const getSegmentTooltip = (segment) => {
|
|
|
6
6
|
case 'institution':
|
|
7
7
|
prefixKey = 'Payment';
|
|
8
8
|
break;
|
|
9
|
-
|
|
10
|
-
prefixKey = '
|
|
9
|
+
default:
|
|
10
|
+
prefixKey = '';
|
|
11
11
|
break;
|
|
12
12
|
}
|
|
13
13
|
return `${prefixKey} ${startCase(segment.type)} - ${segment.name}`;
|
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.147-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.147-test.2",
|
|
5
|
+
"testVersion": 2,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|