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

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.
Files changed (21) hide show
  1. package/build/components/TableCells/CustomCells/SourceCell/components/AuthenticationMode/AuthenticationMode.d.ts +6 -0
  2. package/build/components/TableCells/CustomCells/SourceCell/components/AuthenticationMode/AuthenticationMode.js +12 -0
  3. package/build/components/TableCells/CustomCells/SourceCell/components/AuthenticationMode/constant.d.ts +5 -0
  4. package/build/components/TableCells/CustomCells/SourceCell/components/AuthenticationMode/constant.js +9 -0
  5. package/build/components/TableCells/CustomCells/SourceCell/components/AuthenticationMode/index.d.ts +2 -0
  6. package/build/components/TableCells/CustomCells/SourceCell/components/AuthenticationMode/index.js +2 -0
  7. package/build/components/TableCells/CustomCells/SourceCell/components/AuthenticationMode/types.d.ts +0 -0
  8. package/build/components/TableCells/CustomCells/SourceCell/components/AuthenticationMode/types.js +1 -0
  9. package/build/components/TableCells/CustomCells/SourceCell/components/index.d.ts +1 -0
  10. package/build/components/TableCells/CustomCells/SourceCell/components/index.js +1 -0
  11. package/build/components/TableCells/CustomCells/SourceCell/constant.d.ts +2 -2
  12. package/build/components/TableCells/CustomCells/SourceCell/constant.js +1 -1
  13. package/build/components/TableCells/CustomCells/SourceCell/type.d.ts +1 -0
  14. package/build/components/TableCells/CustomCells/SourceCell/type.js +1 -0
  15. package/build/constants/assets.d.ts +2 -0
  16. package/build/constants/assets.js +2 -0
  17. package/build/constants/table/cell/authenticationsTableCellWidth.d.ts +5 -0
  18. package/build/constants/table/cell/authenticationsTableCellWidth.js +5 -0
  19. package/build/utils/browser.d.ts +1 -1
  20. package/build/utils/browser.js +21 -3
  21. package/package.json +2 -2
@@ -0,0 +1,6 @@
1
+ import { AuthenticationMode } from "./constant";
2
+ interface AuthenticationModeBadgeProps {
3
+ mode: AuthenticationMode;
4
+ }
5
+ export declare const AuthenticationModeBadge: ({ mode }: AuthenticationModeBadgeProps) => import("react/jsx-runtime").JSX.Element | null;
6
+ export {};
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import Box from "@mui/material/Box";
3
+ import Tooltip from "../../../../../Tooltip";
4
+ import { ChallengeIcon, FrictionlessIcon } from "../../../../../../constants/index.js";
5
+ import { AuthenticationMode, AUTHENTICATION_LABEL } from "./constant";
6
+ export const AuthenticationModeBadge = ({ mode }) => {
7
+ if (!mode)
8
+ return null;
9
+ return (_jsx(Tooltip, Object.assign({ title: AUTHENTICATION_LABEL[mode] }, { children: _jsx(Box, { component: "img", src: mode === AuthenticationMode.Challenge
10
+ ? ChallengeIcon
11
+ : FrictionlessIcon }) })));
12
+ };
@@ -0,0 +1,5 @@
1
+ export declare enum AuthenticationMode {
2
+ Challenge = "C",
3
+ Frictionless = "F"
4
+ }
5
+ export declare const AUTHENTICATION_LABEL: Record<AuthenticationMode, string>;
@@ -0,0 +1,9 @@
1
+ export var AuthenticationMode;
2
+ (function (AuthenticationMode) {
3
+ AuthenticationMode["Challenge"] = "C";
4
+ AuthenticationMode["Frictionless"] = "F";
5
+ })(AuthenticationMode || (AuthenticationMode = {}));
6
+ export const AUTHENTICATION_LABEL = {
7
+ [AuthenticationMode.Challenge]: 'Challenge',
8
+ [AuthenticationMode.Frictionless]: 'Frictionless',
9
+ };
@@ -0,0 +1,2 @@
1
+ export * from './AuthenticationMode';
2
+ export * from './constant';
@@ -0,0 +1,2 @@
1
+ export * from './AuthenticationMode';
2
+ export * from './constant';
@@ -2,3 +2,4 @@ export * from './PaymentCardNumberSource';
2
2
  export * from './PaymentMethodSource';
3
3
  export * from './PaymentTypeSource';
4
4
  export * from './PaymentSchemeSource';
5
+ export * from './AuthenticationMode';
@@ -2,3 +2,4 @@ export * from './PaymentCardNumberSource';
2
2
  export * from './PaymentMethodSource';
3
3
  export * from './PaymentTypeSource';
4
4
  export * from './PaymentSchemeSource';
5
+ export * from './AuthenticationMode';
@@ -1,4 +1,4 @@
1
1
  import { CENTER_ICON_KEY } from './type';
2
- export declare const RIGHT_ICON_PRIORITY: readonly [CENTER_ICON_KEY.PAYMENT_AUTH, CENTER_ICON_KEY.PAYMENT_AGREEMENT];
2
+ export declare const RIGHT_ICON_PRIORITY: readonly [CENTER_ICON_KEY.AUTHENTICATION_MODE, CENTER_ICON_KEY.PAYMENT_AUTH, CENTER_ICON_KEY.PAYMENT_AGREEMENT];
3
3
  export declare const LEFT_ICON_PRIORITY: readonly [CENTER_ICON_KEY.PAYMENT_ISSUER, CENTER_ICON_KEY.PAYMENT_INITIATED, CENTER_ICON_KEY.PAYMENT_DEVICE];
4
- export declare const CENTER_ICON_PRIORITY: readonly [CENTER_ICON_KEY.PAYMENT_METHOD, CENTER_ICON_KEY.PAYMENT_TYPE, CENTER_ICON_KEY.PAYMENT_SCHEME, CENTER_ICON_KEY.PAYMENT_CARD_NUMBER, CENTER_ICON_KEY.PAYMENT_ISSUER, CENTER_ICON_KEY.PAYMENT_INITIATED, CENTER_ICON_KEY.PAYMENT_DEVICE, CENTER_ICON_KEY.PAYMENT_AUTH, CENTER_ICON_KEY.PAYMENT_AGREEMENT];
4
+ export declare const CENTER_ICON_PRIORITY: readonly [CENTER_ICON_KEY.PAYMENT_METHOD, CENTER_ICON_KEY.PAYMENT_TYPE, CENTER_ICON_KEY.PAYMENT_SCHEME, CENTER_ICON_KEY.PAYMENT_CARD_NUMBER, CENTER_ICON_KEY.PAYMENT_ISSUER, CENTER_ICON_KEY.PAYMENT_INITIATED, CENTER_ICON_KEY.PAYMENT_DEVICE, CENTER_ICON_KEY.AUTHENTICATION_MODE, CENTER_ICON_KEY.PAYMENT_AUTH, CENTER_ICON_KEY.PAYMENT_AGREEMENT];
@@ -1,5 +1,5 @@
1
1
  import { CENTER_ICON_KEY } from './type';
2
- export const RIGHT_ICON_PRIORITY = [CENTER_ICON_KEY.PAYMENT_AUTH, CENTER_ICON_KEY.PAYMENT_AGREEMENT];
2
+ export const RIGHT_ICON_PRIORITY = [CENTER_ICON_KEY.AUTHENTICATION_MODE, CENTER_ICON_KEY.PAYMENT_AUTH, CENTER_ICON_KEY.PAYMENT_AGREEMENT];
3
3
  export const LEFT_ICON_PRIORITY = [CENTER_ICON_KEY.PAYMENT_ISSUER, CENTER_ICON_KEY.PAYMENT_INITIATED, CENTER_ICON_KEY.PAYMENT_DEVICE];
4
4
  export const CENTER_ICON_PRIORITY = [
5
5
  CENTER_ICON_KEY.PAYMENT_METHOD,
@@ -8,6 +8,7 @@ export declare enum CENTER_ICON_KEY {
8
8
  PAYMENT_ISSUER = "paymentIssuer",
9
9
  PAYMENT_INITIATED = "paymentInitiated",
10
10
  PAYMENT_DEVICE = "paymentDevice",
11
+ AUTHENTICATION_MODE = "authenticationMode",
11
12
  PAYMENT_AUTH = "paymentAuth",
12
13
  PAYMENT_AGREEMENT = "paymentAgreement"
13
14
  }
@@ -7,6 +7,7 @@ export var CENTER_ICON_KEY;
7
7
  CENTER_ICON_KEY["PAYMENT_ISSUER"] = "paymentIssuer";
8
8
  CENTER_ICON_KEY["PAYMENT_INITIATED"] = "paymentInitiated";
9
9
  CENTER_ICON_KEY["PAYMENT_DEVICE"] = "paymentDevice";
10
+ CENTER_ICON_KEY["AUTHENTICATION_MODE"] = "authenticationMode";
10
11
  CENTER_ICON_KEY["PAYMENT_AUTH"] = "paymentAuth";
11
12
  CENTER_ICON_KEY["PAYMENT_AGREEMENT"] = "paymentAgreement";
12
13
  })(CENTER_ICON_KEY || (CENTER_ICON_KEY = {}));
@@ -46,6 +46,8 @@ export declare const passThruWalletIcon: string;
46
46
  export declare const storedValueWalletIcon: string;
47
47
  export declare const buyNowPayLaterIcon: string;
48
48
  export declare const openBankingIcon: string;
49
+ export declare const FrictionlessIcon: string;
50
+ export declare const ChallengeIcon: string;
49
51
  export declare const visaIcon: string;
50
52
  export declare const completedIcon: string;
51
53
  export declare const chargeBackRequestedIcon: string;
@@ -51,6 +51,8 @@ export const passThruWalletIcon = `${lightUrl}/passThruWallet.svg`;
51
51
  export const storedValueWalletIcon = `${lightUrl}/storedValueWallet.svg`;
52
52
  export const buyNowPayLaterIcon = `${lightUrl}/buyNowPayLater.svg`;
53
53
  export const openBankingIcon = `${lightUrl}/openBanking.svg`;
54
+ export const FrictionlessIcon = `${lightUrl}/FrictionlessIcon.svg`;
55
+ export const ChallengeIcon = `${lightUrl}/ChallengeIcon.svg`;
54
56
  export const visaIcon = `${lightUrl}/visa.svg`;
55
57
  export const completedIcon = `${lightUrl}/completed.svg`;
56
58
  export const chargeBackRequestedIcon = `${lightUrl}/chargebackRequested.svg`;
@@ -89,6 +89,11 @@ export declare const authenticationsTableCellWidth: {
89
89
  readonly text: "170px";
90
90
  readonly sheet: "130px";
91
91
  };
92
+ readonly channel: {
93
+ readonly default: "100px";
94
+ readonly text: "100px";
95
+ readonly sheet: "100px";
96
+ };
92
97
  readonly payment_issuers: {
93
98
  readonly default: "150px";
94
99
  readonly text: "150px";
@@ -89,6 +89,11 @@ export const authenticationsTableCellWidth = {
89
89
  text: '170px',
90
90
  sheet: '130px',
91
91
  },
92
+ channel: {
93
+ default: '100px',
94
+ text: '100px',
95
+ sheet: '100px',
96
+ },
92
97
  payment_issuers: {
93
98
  default: '150px',
94
99
  text: '150px',
@@ -1,2 +1,2 @@
1
- export declare function getBrowserName(): string;
1
+ export declare function getBrowserName(userAgent?: string): "edge" | "opera" | "chrome" | "safari" | "firefox" | "ie" | "tor" | "uc" | "yandex" | undefined;
2
2
  export declare const isSafariBrowser: () => boolean;
@@ -1,6 +1,24 @@
1
- export function getBrowserName() {
2
- var _a, _b, _c;
3
- return ((_c = (_b = (_a = navigator === null || navigator === void 0 ? void 0 : navigator.userAgent) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.match(/(edge|chrome|safari|firefox)/)) === null || _c === void 0 ? void 0 : _c[0]) || 'chrome';
1
+ export function getBrowserName(userAgent) {
2
+ const uaSource = userAgent !== null && userAgent !== void 0 ? userAgent : (typeof navigator !== 'undefined' && navigator.userAgent ? navigator.userAgent : '');
3
+ const ua = uaSource.toLowerCase();
4
+ if (ua.includes('edg'))
5
+ return 'edge';
6
+ if (ua.includes('opr') || ua.includes('opera'))
7
+ return 'opera';
8
+ if (ua.includes('chrome') && !ua.includes('edg') && !ua.includes('opr'))
9
+ return 'chrome';
10
+ if (ua.includes('safari') && !ua.includes('chrome'))
11
+ return 'safari';
12
+ if (ua.includes('firefox'))
13
+ return 'firefox';
14
+ if (ua.includes('msie') || ua.includes('trident'))
15
+ return 'ie';
16
+ if (ua.includes('tor'))
17
+ return 'tor';
18
+ if (ua.includes('uc'))
19
+ return 'uc';
20
+ if (ua.includes('yandex'))
21
+ return 'yandex';
4
22
  }
5
23
  export const isSafariBrowser = () => {
6
24
  return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
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.426-test.1",
5
- "testVersion": 1,
4
+ "version": "0.1.426-test.12",
5
+ "testVersion": 12,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",