@tap-payments/os-micro-frontend-shared 0.1.92-test.1 → 0.1.92-test.3
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/build/components/TableCells/CustomCells/SalesChannelCell/SalesChannelCell.js +5 -7
- package/build/constants/assets.d.ts +2 -0
- package/build/constants/assets.js +2 -0
- package/build/constants/index.d.ts +1 -0
- package/build/constants/index.js +1 -0
- package/build/constants/segment.d.ts +13 -0
- package/build/constants/segment.js +12 -0
- package/build/utils/url.d.ts +0 -1
- package/build/utils/url.js +0 -10
- package/package.json +2 -2
|
@@ -13,7 +13,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import Tooltip from '../../../Tooltip';
|
|
14
14
|
import { ImageWrapper } from '../../../index.js';
|
|
15
15
|
import { TableCell } from '../../../TableCells';
|
|
16
|
-
import { openUrl } from '../../../../utils/index.js';
|
|
17
16
|
import { ChannelTextLabel, ChannelTextWrapper, salesChannelAnimation, SalesChannelsContainer, StyledSourceCell, StyledSourceImage } from './style';
|
|
18
17
|
function SalesChannelCell(_a) {
|
|
19
18
|
var _b;
|
|
@@ -22,12 +21,11 @@ function SalesChannelCell(_a) {
|
|
|
22
21
|
var _a;
|
|
23
22
|
const sourceTooltip = channel.address;
|
|
24
23
|
const channelCode = (_a = channel.code) === null || _a === void 0 ? void 0 : _a.replace(/_/g, '');
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
openUrl(channel.address);
|
|
24
|
+
return (_jsx(Tooltip, Object.assign({ title: sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ order: index, variants: salesChannelAnimation(index, isTextShown ? 74 : 0), sx: {
|
|
25
|
+
width: isTextShown ? '70px' : '36px',
|
|
26
|
+
cursor: 'pointer',
|
|
27
|
+
}, onClick: () => {
|
|
28
|
+
window.open(channel.address, '_blank');
|
|
31
29
|
} }, { children: isTextShown ? (_jsx(ChannelTextWrapper, { children: _jsx(ChannelTextLabel, { children: channelCode }) })) : (_jsx(StyledSourceImage, { src: channel.logo, alt: channelCode })) })) }), `${channel}-${index}`));
|
|
32
30
|
});
|
|
33
31
|
const salesChannelsCount = (salesChannels === null || salesChannels === void 0 ? void 0 : salesChannels.length) || 0;
|
|
@@ -400,6 +400,8 @@ export declare const collapseArrows: string;
|
|
|
400
400
|
export declare const customerIcon: string;
|
|
401
401
|
export declare const discountIcon: string;
|
|
402
402
|
export declare const emailIcon: string;
|
|
403
|
+
export declare const emailBlackIcon: string;
|
|
404
|
+
export declare const linkTiltedIcon: string;
|
|
403
405
|
export declare const expandArrows: string;
|
|
404
406
|
export declare const feeIcon: string;
|
|
405
407
|
export declare const minusIcon: string;
|
|
@@ -404,6 +404,8 @@ export const collapseArrows = `${lightUrl}/CollapseArrows.svg`;
|
|
|
404
404
|
export const customerIcon = `${lightUrl}/customerIcon.svg`;
|
|
405
405
|
export const discountIcon = `${lightUrl}/discountIcon.svg`;
|
|
406
406
|
export const emailIcon = `${lightUrl}/emailIcon.svg`;
|
|
407
|
+
export const emailBlackIcon = `${lightUrl}/emailBlackIcon.svg`;
|
|
408
|
+
export const linkTiltedIcon = `${lightUrl}/linkTiltedIcon.svg`;
|
|
407
409
|
export const expandArrows = `${lightUrl}/ExpandArrows.svg`;
|
|
408
410
|
export const feeIcon = `${lightUrl}/feeIcon.svg`;
|
|
409
411
|
export const minusIcon = `${lightUrl}/minusIcon.svg`;
|
package/build/constants/index.js
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const SEGMENT_TYPE_FILTERS_MAP: {
|
|
2
|
+
DEVELOPMENT_HOUSE: string;
|
|
3
|
+
PLATFORM: string;
|
|
4
|
+
BILLING_PLATFORM: string;
|
|
5
|
+
COMMERCE_PLATFORM: string;
|
|
6
|
+
APP_PLATFORM: string;
|
|
7
|
+
PAYMENT_TECHNOLOGY: string;
|
|
8
|
+
PAYMENT_FACILITATOR: string;
|
|
9
|
+
PAYMENT_ISSUER: string;
|
|
10
|
+
PAYMENT_ACQUIRER: string;
|
|
11
|
+
RETAIL_PLATFORM: string;
|
|
12
|
+
};
|
|
13
|
+
export type SegmentCode = keyof typeof SEGMENT_TYPE_FILTERS_MAP;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const SEGMENT_TYPE_FILTERS_MAP = {
|
|
2
|
+
DEVELOPMENT_HOUSE: 'developmentHouseId',
|
|
3
|
+
PLATFORM: 'platformId',
|
|
4
|
+
BILLING_PLATFORM: 'platformId',
|
|
5
|
+
COMMERCE_PLATFORM: 'platformId',
|
|
6
|
+
APP_PLATFORM: 'platformId',
|
|
7
|
+
PAYMENT_TECHNOLOGY: 'paymentTechnology',
|
|
8
|
+
PAYMENT_FACILITATOR: 'paymentInstitution',
|
|
9
|
+
PAYMENT_ISSUER: 'paymentIssuerId',
|
|
10
|
+
PAYMENT_ACQUIRER: 'paymentInstitution',
|
|
11
|
+
RETAIL_PLATFORM: 'platformId',
|
|
12
|
+
};
|
package/build/utils/url.d.ts
CHANGED
package/build/utils/url.js
CHANGED
|
@@ -6,13 +6,3 @@ export const openNewTab = (url, target = '_blank') => {
|
|
|
6
6
|
link.click();
|
|
7
7
|
link.remove();
|
|
8
8
|
};
|
|
9
|
-
export const openUrl = (url) => {
|
|
10
|
-
const isUrl = /^https?:\/\//i.test(url);
|
|
11
|
-
if (isUrl) {
|
|
12
|
-
window.open(url, '_blank', 'noopener,noreferrer');
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
const newUrl = 'about:blank?' + encodeURIComponent(url);
|
|
16
|
-
window.open(newUrl, '_blank', 'noopener,noreferrer');
|
|
17
|
-
}
|
|
18
|
-
};
|
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.92-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.92-test.3",
|
|
5
|
+
"testVersion": 3,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|