@tap-payments/os-micro-frontend-shared 0.1.435-test.6 → 0.1.436
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/AnimatedSpinnerIcon/style.d.ts +1 -0
- package/build/components/Chip/style.d.ts +1 -0
- package/build/components/CountBadge/style.d.ts +1 -0
- package/build/components/Dialog/style.d.ts +1 -0
- package/build/components/FlippingCard/style.d.ts +1 -0
- package/build/components/ImageWrapper/ImageWrapper.d.ts +1 -0
- package/build/components/JSONViewer/style.d.ts +1 -0
- package/build/components/LeftPeekRightExpandingChip/style.d.ts +1 -0
- package/build/components/PaymentSourceFilter/index.d.ts +0 -1
- package/build/components/PaymentSourceFilter/index.js +0 -1
- package/build/components/RightLeftExpandingCenterChip/style.d.ts +1 -0
- package/build/components/SearchButton/styles.d.ts +1 -0
- package/build/components/StatusIcons/AuthIcons/style.d.ts +1 -0
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +1 -0
- package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +1 -0
- package/build/components/StatusIcons/SourceIcons/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/constant.js +2 -2
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/IDButton/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/AuthenticationMode/AuthenticationMode.d.ts +2 -2
- package/build/components/TableCells/CustomCells/SourceCell/components/AuthenticationMode/AuthenticationMode.js +3 -2
- package/build/components/TableCells/CustomCells/SourceCell/components/AuthenticationMode/constant.d.ts +5 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/AuthenticationMode/constant.js +9 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/AuthenticationMode/index.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/components/AuthenticationMode/index.js +1 -0
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/style.d.ts +1 -0
- package/build/components/TableHeader/TableView/ViewsDropdown.js +2 -0
- package/build/components/TableReports/components/DownloadButton/style.d.ts +1 -0
- package/build/components/TableReports/style.d.ts +1 -0
- package/build/components/VirtualTables/components/style.d.ts +1 -0
- package/build/constants/authentication.d.ts +0 -5
- package/build/constants/authentication.js +0 -9
- package/build/constants/table/cell/chargeTableCellWidth.d.ts +5 -0
- package/build/constants/table/cell/chargeTableCellWidth.js +5 -0
- package/build/types/charge.d.ts +19 -0
- package/package.json +3 -3
- package/build/components/PaymentSourceFilter/AuthenticationMode.d.ts +0 -7
- package/build/components/PaymentSourceFilter/AuthenticationMode.js +0 -59
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
import { GetSourceAnimationFunction } from './type';
|
|
3
4
|
export declare const ChipStyled: import("@emotion/styled").StyledComponent<import("react").RefAttributes<unknown> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
4
5
|
variant?: import("./type").ChipVariant | undefined;
|
|
@@ -2,5 +2,4 @@ export { default as PaymentSourceFilter } from './PaymentSourceFilter';
|
|
|
2
2
|
export { default as PaymentMethods } from './PaymentMethods';
|
|
3
3
|
export { default as PaymentSchemes } from './PaymentSchemes';
|
|
4
4
|
export { default as PaymentInitiated } from './PaymentInitiated';
|
|
5
|
-
export { AuthenticationMode } from './AuthenticationMode';
|
|
6
5
|
export * from './type';
|
|
@@ -2,5 +2,4 @@ export { default as PaymentSourceFilter } from './PaymentSourceFilter';
|
|
|
2
2
|
export { default as PaymentMethods } from './PaymentMethods';
|
|
3
3
|
export { default as PaymentSchemes } from './PaymentSchemes';
|
|
4
4
|
export { default as PaymentInitiated } from './PaymentInitiated';
|
|
5
|
-
export { AuthenticationMode } from './AuthenticationMode';
|
|
6
5
|
export * from './type';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
import { TableMode } from '../../../../types/index.js';
|
|
3
4
|
export declare const ActionCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
4
5
|
tableMode?: TableMode | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const AgreementCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledAgreementCardIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const CardContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledAppsCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const AppsStatusContainer: import("@emotion/styled").StyledComponent<{
|
|
4
5
|
hidden?: boolean | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const AuthIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
3
4
|
export declare const AuthCellContainer: import("@emotion/styled").StyledComponent<{
|
|
4
5
|
hidden?: boolean | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { authenticationAttemptedIcon, authenticationFailedIcon, authenticationPendingIcon, authenticationUnavailableIcon, authenticationExemptedWithTransactionIcon, authenticationExemptedWithoutTransactionIcon, authenticationWithTransactionIcon, authenticatedSuccessIcon, authenticationDeclinedIcon, authenticationUndeterminedIcon, authenticationNoAuthIcon, } from '../../../../constants/index.js';
|
|
1
|
+
import { authenticationAttemptedIcon, authenticationFailedIcon, authenticationPendingIcon, authenticationUnavailableIcon, authenticationExemptedWithTransactionIcon, authenticationExemptedWithoutTransactionIcon, authenticationWithTransactionIcon, authenticationWithoutTransactionIcon, authenticatedSuccessIcon, authenticationDeclinedIcon, authenticationUndeterminedIcon, authenticationNoAuthIcon, } from '../../../../constants/index.js';
|
|
2
2
|
import { statusIcons } from '../../../TableCells/CustomCells/StatusCell/constant';
|
|
3
3
|
export const authenticationStatusIcons = {
|
|
4
4
|
FAILED: authenticationFailedIcon,
|
|
@@ -14,7 +14,7 @@ export const authenticationStatusIcons = {
|
|
|
14
14
|
SUCCESS: authenticatedSuccessIcon,
|
|
15
15
|
AUTHENTICATED: authenticationWithTransactionIcon,
|
|
16
16
|
AUTHENTICATED_WITH_TRANSACTION: authenticationWithTransactionIcon,
|
|
17
|
-
AUTHENTICATED_WITHOUT_TRANSACTION:
|
|
17
|
+
AUTHENTICATED_WITHOUT_TRANSACTION: authenticationWithoutTransactionIcon,
|
|
18
18
|
AUTHENTICATED_AUTHORIZE_FAILED: authenticationFailedIcon,
|
|
19
19
|
};
|
|
20
20
|
export const chargeStatusIcons = statusIcons;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledDownloadFileImageWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
3
4
|
isTextShown?: boolean | undefined;
|
|
4
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const SalesChannelsContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
4
5
|
hidden?: boolean | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AuthenticationMode } from './constant';
|
|
2
2
|
interface AuthenticationModeBadgeProps {
|
|
3
|
-
mode:
|
|
3
|
+
mode: AuthenticationMode;
|
|
4
4
|
}
|
|
5
5
|
export declare const AuthenticationModeBadge: ({ mode }: AuthenticationModeBadgeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
6
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import Box from '@mui/material/Box';
|
|
3
3
|
import Tooltip from '../../../../../Tooltip';
|
|
4
|
-
import { ChallengeIcon, FrictionlessIcon
|
|
4
|
+
import { ChallengeIcon, FrictionlessIcon } from '../../../../../../constants/index.js';
|
|
5
|
+
import { AuthenticationMode, AUTHENTICATION_LABEL } from './constant';
|
|
5
6
|
export const AuthenticationModeBadge = ({ mode }) => {
|
|
6
7
|
if (!mode)
|
|
7
8
|
return null;
|
|
8
|
-
return (_jsx(Tooltip, Object.assign({ title: AUTHENTICATION_LABEL[mode] }, { children: _jsx(Box, { component: "img", src: mode ===
|
|
9
|
+
return (_jsx(Tooltip, Object.assign({ title: AUTHENTICATION_LABEL[mode] }, { children: _jsx(Box, { component: "img", src: mode === AuthenticationMode.Challenge ? ChallengeIcon : FrictionlessIcon }) })));
|
|
9
10
|
};
|
package/build/components/TableCells/CustomCells/SourceCell/components/AuthenticationMode/constant.js
ADDED
|
@@ -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
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const GeographyBox: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
3
4
|
variant?: "Global" | "Regional" | "Local" | undefined;
|
|
4
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -74,6 +74,7 @@ function ViewsDropdown({ open, selectedViewInfo, setSelectedViewInfo, anchorEl,
|
|
|
74
74
|
setDraftColumns(null);
|
|
75
75
|
clearOriginalState();
|
|
76
76
|
forceClose();
|
|
77
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
77
78
|
}
|
|
78
79
|
function applyAndClose() {
|
|
79
80
|
const isDefaultView = selectedViewInfo.id === (defaultTemplate === null || defaultTemplate === void 0 ? void 0 : defaultTemplate.id) || selectedViewInfo.id === 'default' || (defaultTemplate === null || defaultTemplate === void 0 ? void 0 : defaultTemplate.default) === true;
|
|
@@ -88,6 +89,7 @@ function ViewsDropdown({ open, selectedViewInfo, setSelectedViewInfo, anchorEl,
|
|
|
88
89
|
setDraftColumns(null);
|
|
89
90
|
clearOriginalState();
|
|
90
91
|
forceClose();
|
|
92
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
91
93
|
}
|
|
92
94
|
function toggleColumn(columnName) {
|
|
93
95
|
if (!draftColumns)
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
export declare const unAuthenticatedStatuses: string[];
|
|
2
2
|
export declare const allAuthenticationStatuses: string[];
|
|
3
|
-
export declare enum AuthenticationModeType {
|
|
4
|
-
Challenge = "C",
|
|
5
|
-
Frictionless = "F"
|
|
6
|
-
}
|
|
7
|
-
export declare const AUTHENTICATION_LABEL: Record<AuthenticationModeType, string>;
|
|
@@ -12,12 +12,3 @@ export const unAuthenticatedStatuses = [
|
|
|
12
12
|
'INITIATED',
|
|
13
13
|
];
|
|
14
14
|
export const allAuthenticationStatuses = [...authenticationStatuses, ...unAuthenticatedStatuses];
|
|
15
|
-
export var AuthenticationModeType;
|
|
16
|
-
(function (AuthenticationModeType) {
|
|
17
|
-
AuthenticationModeType["Challenge"] = "C";
|
|
18
|
-
AuthenticationModeType["Frictionless"] = "F";
|
|
19
|
-
})(AuthenticationModeType || (AuthenticationModeType = {}));
|
|
20
|
-
export const AUTHENTICATION_LABEL = {
|
|
21
|
-
[AuthenticationModeType.Challenge]: 'Challenge',
|
|
22
|
-
[AuthenticationModeType.Frictionless]: 'Frictionless',
|
|
23
|
-
};
|
|
@@ -29,6 +29,11 @@ export declare const chargeTableCellWidth: {
|
|
|
29
29
|
readonly text: "180px";
|
|
30
30
|
readonly sheet: "250px";
|
|
31
31
|
};
|
|
32
|
+
readonly auth_code_reference: {
|
|
33
|
+
readonly default: "155px";
|
|
34
|
+
readonly text: "180px";
|
|
35
|
+
readonly sheet: "250px";
|
|
36
|
+
};
|
|
32
37
|
readonly order: {
|
|
33
38
|
readonly default: "80px";
|
|
34
39
|
readonly text: "80px";
|
package/build/types/charge.d.ts
CHANGED
|
@@ -117,6 +117,7 @@ export interface Charge {
|
|
|
117
117
|
status: AuthenticationStatus;
|
|
118
118
|
threeDSecure?: {
|
|
119
119
|
status: AuthenticationStatus;
|
|
120
|
+
provider: string;
|
|
120
121
|
};
|
|
121
122
|
};
|
|
122
123
|
payment: {
|
|
@@ -332,6 +333,24 @@ export interface Charge {
|
|
|
332
333
|
retailer: {
|
|
333
334
|
id: string;
|
|
334
335
|
};
|
|
336
|
+
payment_provider?: {
|
|
337
|
+
technology?: {
|
|
338
|
+
id: string;
|
|
339
|
+
brand?: {
|
|
340
|
+
name?: {
|
|
341
|
+
en: string;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
institution?: {
|
|
346
|
+
id: string;
|
|
347
|
+
brand?: {
|
|
348
|
+
name?: {
|
|
349
|
+
en: string;
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
};
|
|
335
354
|
};
|
|
336
355
|
refunds: {
|
|
337
356
|
summary: {
|
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.436",
|
|
5
|
+
"testVersion": 0,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|
|
@@ -164,4 +164,4 @@
|
|
|
164
164
|
"publishConfig": {
|
|
165
165
|
"registry": "https://registry.npmjs.org/"
|
|
166
166
|
}
|
|
167
|
-
}
|
|
167
|
+
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AuthenticationModeType } from '../../constants/index.js';
|
|
2
|
-
import { Filters } from './type';
|
|
3
|
-
export declare const AUTHENTICATION_MODES: {
|
|
4
|
-
label: string;
|
|
5
|
-
value: AuthenticationModeType;
|
|
6
|
-
}[];
|
|
7
|
-
export declare const AuthenticationMode: ({ filters, setFilters }: Filters) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { useCallback, useMemo, useState } from 'react';
|
|
14
|
-
import { AuthenticationModeBadge } from '../TableCells';
|
|
15
|
-
import Menu from '../Menu';
|
|
16
|
-
import { AUTHENTICATION_LABEL, AuthenticationModeType, rightArrow } from '../../constants/index.js';
|
|
17
|
-
import MenuItem from '../MenuItem';
|
|
18
|
-
import { MenuItemStyled } from './style';
|
|
19
|
-
export const AUTHENTICATION_MODES = [
|
|
20
|
-
{ label: AUTHENTICATION_LABEL[AuthenticationModeType.Challenge], value: AuthenticationModeType.Challenge },
|
|
21
|
-
{ label: AUTHENTICATION_LABEL[AuthenticationModeType.Frictionless], value: AuthenticationModeType.Frictionless },
|
|
22
|
-
];
|
|
23
|
-
export const AuthenticationMode = ({ filters, setFilters }) => {
|
|
24
|
-
var _a;
|
|
25
|
-
const [authenticationModeEl, setAuthenticationModeEl] = useState(null);
|
|
26
|
-
const open = Boolean(authenticationModeEl);
|
|
27
|
-
const filterAuthMode = (_a = filters === null || filters === void 0 ? void 0 : filters.auth_mode) !== null && _a !== void 0 ? _a : [];
|
|
28
|
-
const onOpen = (e) => {
|
|
29
|
-
if (!open)
|
|
30
|
-
setAuthenticationModeEl(e.currentTarget);
|
|
31
|
-
};
|
|
32
|
-
const onClose = () => {
|
|
33
|
-
if (open)
|
|
34
|
-
setAuthenticationModeEl(null);
|
|
35
|
-
};
|
|
36
|
-
const authModeAll = useMemo(() => AUTHENTICATION_MODES.map((mode) => mode.value), []);
|
|
37
|
-
const isSelected = useMemo(() => AUTHENTICATION_MODES.length === filterAuthMode.length && filterAuthMode.length > 0, [filterAuthMode.length, authModeAll === null || authModeAll === void 0 ? void 0 : authModeAll.length]);
|
|
38
|
-
const isIndeterminate = useMemo(() => !isSelected && filterAuthMode.length > 0, [filterAuthMode.length, isSelected]);
|
|
39
|
-
const onClick = () => {
|
|
40
|
-
if (isSelected) {
|
|
41
|
-
const { auth_mode } = filters, resetFilters = __rest(filters, ["auth_mode"]);
|
|
42
|
-
setFilters(resetFilters);
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
setFilters(Object.assign(Object.assign({}, filters), { auth_mode: authModeAll }));
|
|
46
|
-
};
|
|
47
|
-
const isSelectedAuthMode = useCallback((selectedAuthMode) => { var _a; return (_a = filterAuthMode.includes(selectedAuthMode)) !== null && _a !== void 0 ? _a : false; }, [filterAuthMode.length]);
|
|
48
|
-
const onClickAuthMode = (e, selectedAuthMode) => {
|
|
49
|
-
var _a;
|
|
50
|
-
e.stopPropagation();
|
|
51
|
-
if (isSelectedAuthMode(selectedAuthMode)) {
|
|
52
|
-
setFilters(Object.assign(Object.assign({}, filters), { auth_mode: (_a = filterAuthMode === null || filterAuthMode === void 0 ? void 0 : filterAuthMode.filter((authMode) => authMode !== selectedAuthMode)) !== null && _a !== void 0 ? _a : [] }));
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
setFilters(Object.assign(Object.assign({}, filters), { auth_mode: [...(filterAuthMode !== null && filterAuthMode !== void 0 ? filterAuthMode : []), selectedAuthMode] }));
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
return (_jsxs(MenuItemStyled, Object.assign({ isSelected: isSelected, isIndeterminate: isIndeterminate, onMouseEnter: onOpen, onMouseLeave: onClose, onClick: onClick }, { children: [_jsx("span", Object.assign({ className: "label" }, { children: "Authentication Mode" })), _jsx("img", { src: rightArrow, alt: "arrow", style: { height: 12 } }), _jsx(Menu, Object.assign({ open: open, anchorEl: authenticationModeEl, placement: "right-start" }, { children: AUTHENTICATION_MODES.map((mode) => (_jsxs(MenuItem, Object.assign({ isSelected: isSelectedAuthMode(mode.value), onClick: (e) => onClickAuthMode(e, mode.value) }, { children: [_jsx(AuthenticationModeBadge, { mode: mode.value }), mode.label] }), mode.value))) }))] })));
|
|
59
|
-
};
|