@tap-payments/os-micro-frontend-shared 0.1.86 → 0.1.87-test.2-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 +3 -1
- package/build/constants/table/cell/terminalsTableCellWidth.d.ts +3 -3
- package/build/constants/table/cell/terminalsTableCellWidth.js +3 -3
- package/build/utils/url.d.ts +1 -0
- package/build/utils/url.js +10 -0
- package/package.json +3 -3
|
@@ -13,6 +13,7 @@ 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 { openNewTab } from '../../../../utils/index.js';
|
|
16
17
|
import { ChannelTextLabel, ChannelTextWrapper, salesChannelAnimation, SalesChannelsContainer, StyledSourceCell, StyledSourceImage } from './style';
|
|
17
18
|
function SalesChannelCell(_a) {
|
|
18
19
|
var _b;
|
|
@@ -25,7 +26,8 @@ function SalesChannelCell(_a) {
|
|
|
25
26
|
width: isTextShown ? '70px' : '36px',
|
|
26
27
|
cursor: 'pointer',
|
|
27
28
|
}, onClick: () => {
|
|
28
|
-
|
|
29
|
+
if (channel === null || channel === void 0 ? void 0 : channel.address)
|
|
30
|
+
openNewTab(channel.address);
|
|
29
31
|
} }, { children: isTextShown ? (_jsx(ChannelTextWrapper, { children: _jsx(ChannelTextLabel, { children: channelCode }) })) : (_jsx(StyledSourceImage, { src: channel.logo, alt: channelCode })) })) }), `${channel}-${index}`));
|
|
30
32
|
});
|
|
31
33
|
const salesChannelsCount = (salesChannels === null || salesChannels === void 0 ? void 0 : salesChannels.length) || 0;
|
|
@@ -30,9 +30,9 @@ export declare const terminalsTableCellWidth: {
|
|
|
30
30
|
readonly sheet: "80px";
|
|
31
31
|
};
|
|
32
32
|
readonly features: {
|
|
33
|
-
readonly default: "
|
|
34
|
-
readonly text: "
|
|
35
|
-
readonly sheet: "
|
|
33
|
+
readonly default: "100px";
|
|
34
|
+
readonly text: "100px";
|
|
35
|
+
readonly sheet: "100px";
|
|
36
36
|
};
|
|
37
37
|
readonly acceptance: {
|
|
38
38
|
readonly default: "80px";
|
package/build/utils/url.d.ts
CHANGED
package/build/utils/url.js
CHANGED
|
@@ -6,3 +6,13 @@ 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.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.87-test.2-test.3",
|
|
5
|
+
"testVersion": 3,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|
|
@@ -136,4 +136,4 @@
|
|
|
136
136
|
"publishConfig": {
|
|
137
137
|
"registry": "https://registry.npmjs.org/"
|
|
138
138
|
}
|
|
139
|
-
}
|
|
139
|
+
}
|