@tap-payments/os-micro-frontend-shared 0.1.92-test.1 → 0.1.92

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.
@@ -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
- 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
- boxShadow: '7px 0px 8px 0px #F2F2F2',
28
- })), onClick: () => {
29
- if (channel === null || channel === void 0 ? void 0 : channel.address)
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`;
@@ -11,3 +11,4 @@ export * from './currency';
11
11
  export * from './table';
12
12
  export * from './toggleOptions';
13
13
  export * from './payment';
14
+ export * from './segment';
@@ -11,3 +11,4 @@ export * from './currency';
11
11
  export * from './table';
12
12
  export * from './toggleOptions';
13
13
  export * from './payment';
14
+ export * from './segment';
@@ -0,0 +1,12 @@
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
+ };
12
+ export type SegmentCode = keyof typeof SEGMENT_TYPE_FILTERS_MAP;
@@ -0,0 +1,11 @@
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
+ };
@@ -1,2 +1 @@
1
1
  export declare const openNewTab: (url: string, target?: string) => void;
2
- export declare const openUrl: (url: string) => void;
@@ -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.1",
5
- "testVersion": 1,
4
+ "version": "0.1.92",
5
+ "testVersion": 2,
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
+ }