udp-react-enterprise-component-library 26.5.0-beta.11 → 26.5.0-beta.13
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/dist/.tsbuildinfo +1 -1
- package/dist/inquiry/InquiryContainer.d.ts.map +1 -1
- package/dist/inquiry/InquiryContainer.js +7 -2
- package/dist/inquiry/InquiryContainer.js.map +1 -1
- package/dist/inquiry/InquiryContainer.mjs +5 -2
- package/dist/inquiry/InquiryContainer.mjs.map +1 -1
- package/dist/utilities/form/paymentForm/BankAccountForm.d.ts +12 -29
- package/dist/utilities/form/paymentForm/BankAccountForm.d.ts.map +1 -1
- package/dist/utilities/form/paymentForm/BankAccountForm.js +64 -78
- package/dist/utilities/form/paymentForm/BankAccountForm.js.map +1 -1
- package/dist/utilities/form/paymentForm/BankAccountForm.mjs +77 -196
- package/dist/utilities/form/paymentForm/BankAccountForm.mjs.map +1 -1
- package/dist/utilities/form/paymentForm/CashForm.d.ts +1 -1
- package/dist/utilities/form/paymentForm/CashForm.d.ts.map +1 -1
- package/dist/utilities/form/paymentForm/CashForm.js +19 -51
- package/dist/utilities/form/paymentForm/CashForm.js.map +1 -1
- package/dist/utilities/form/paymentForm/CashForm.mjs +80 -119
- package/dist/utilities/form/paymentForm/CashForm.mjs.map +1 -1
- package/dist/utilities/form/paymentForm/CreditCardForm.d.ts +10 -21
- package/dist/utilities/form/paymentForm/CreditCardForm.d.ts.map +1 -1
- package/dist/utilities/form/paymentForm/CreditCardForm.js +81 -87
- package/dist/utilities/form/paymentForm/CreditCardForm.js.map +1 -1
- package/dist/utilities/form/paymentForm/CreditCardForm.mjs +84 -195
- package/dist/utilities/form/paymentForm/CreditCardForm.mjs.map +1 -1
- package/dist/utilities/form/paymentForm/CreditCardUtils.d.ts.map +1 -1
- package/dist/utilities/form/paymentForm/CreditCardUtils.js +5 -0
- package/dist/utilities/form/paymentForm/CreditCardUtils.js.map +1 -1
- package/dist/utilities/form/paymentForm/CreditCardUtils.mjs +1 -0
- package/dist/utilities/form/paymentForm/CreditCardUtils.mjs.map +1 -1
- package/dist/utilities/form/paymentForm/HostedPaymentError.d.ts +5 -16
- package/dist/utilities/form/paymentForm/HostedPaymentError.d.ts.map +1 -1
- package/dist/utilities/form/paymentForm/HostedPaymentError.js +6 -18
- package/dist/utilities/form/paymentForm/HostedPaymentError.js.map +1 -1
- package/dist/utilities/form/paymentForm/HostedPaymentError.mjs +18 -55
- package/dist/utilities/form/paymentForm/HostedPaymentError.mjs.map +1 -1
- package/dist/utilities/form/paymentForm/NewCreditCardForm.d.ts +12 -14
- package/dist/utilities/form/paymentForm/NewCreditCardForm.d.ts.map +1 -1
- package/dist/utilities/form/paymentForm/NewCreditCardForm.js +45 -58
- package/dist/utilities/form/paymentForm/NewCreditCardForm.js.map +1 -1
- package/dist/utilities/form/paymentForm/NewCreditCardForm.mjs +185 -262
- package/dist/utilities/form/paymentForm/NewCreditCardForm.mjs.map +1 -1
- package/dist/utilities/form/paymentForm/NewECheckForm.d.ts +9 -14
- package/dist/utilities/form/paymentForm/NewECheckForm.d.ts.map +1 -1
- package/dist/utilities/form/paymentForm/NewECheckForm.js +28 -68
- package/dist/utilities/form/paymentForm/NewECheckForm.js.map +1 -1
- package/dist/utilities/form/paymentForm/NewECheckForm.mjs +184 -227
- package/dist/utilities/form/paymentForm/NewECheckForm.mjs.map +1 -1
- package/dist/utilities/form/paymentForm/PaymentBankDetails.d.ts.map +1 -1
- package/dist/utilities/form/paymentForm/PaymentBankDetails.js +4 -2
- package/dist/utilities/form/paymentForm/PaymentBankDetails.js.map +1 -1
- package/dist/utilities/form/paymentForm/PaymentCardDetail.d.ts.map +1 -1
- package/dist/utilities/form/paymentForm/PaymentCardDetail.js +4 -2
- package/dist/utilities/form/paymentForm/PaymentCardDetail.js.map +1 -1
- package/dist/utilities/form/paymentForm/PaymentForm.d.ts +67 -3
- package/dist/utilities/form/paymentForm/PaymentForm.d.ts.map +1 -1
- package/dist/utilities/form/paymentForm/PaymentForm.js +265 -246
- package/dist/utilities/form/paymentForm/PaymentForm.js.map +1 -1
- package/dist/utilities/form/paymentForm/PaymentForm.mjs +275 -296
- package/dist/utilities/form/paymentForm/PaymentForm.mjs.map +1 -1
- package/dist/utilities/form/paymentForm/usePaymentContext.d.ts +22 -0
- package/dist/utilities/form/paymentForm/usePaymentContext.d.ts.map +1 -0
- package/dist/utilities/form/paymentForm/usePaymentContext.js +117 -0
- package/dist/utilities/form/paymentForm/usePaymentContext.js.map +1 -0
- package/dist/utilities/form/paymentForm/usePaymentContext.mjs +119 -0
- package/dist/utilities/form/paymentForm/usePaymentContext.mjs.map +1 -0
- package/dist/utilities/form/paymentForm/vendorsForms/FiservForm.d.ts.map +1 -1
- package/dist/utilities/form/paymentForm/vendorsForms/FiservForm.js +22 -28
- package/dist/utilities/form/paymentForm/vendorsForms/FiservForm.js.map +1 -1
- package/dist/utilities/form/paymentForm/vendorsForms/FiservForm.mjs +37 -32
- package/dist/utilities/form/paymentForm/vendorsForms/FiservForm.mjs.map +1 -1
- package/dist/utilities/form/paymentForm/vendorsForms/ICheckForm.d.ts.map +1 -1
- package/dist/utilities/form/paymentForm/vendorsForms/ICheckForm.js +25 -27
- package/dist/utilities/form/paymentForm/vendorsForms/ICheckForm.js.map +1 -1
- package/dist/utilities/form/paymentForm/vendorsForms/ICheckForm.mjs +40 -38
- package/dist/utilities/form/paymentForm/vendorsForms/ICheckForm.mjs.map +1 -1
- package/dist/utilities/form/paymentForm/vendorsForms/PaymentusForm.d.ts.map +1 -1
- package/dist/utilities/form/paymentForm/vendorsForms/PaymentusForm.js +25 -32
- package/dist/utilities/form/paymentForm/vendorsForms/PaymentusForm.js.map +1 -1
- package/dist/utilities/form/paymentForm/vendorsForms/PaymentusForm.mjs +38 -43
- package/dist/utilities/form/paymentForm/vendorsForms/PaymentusForm.mjs.map +1 -1
- package/package.json +6 -42
- package/dist/utilities/form/paymentForm/BankIcon.mjs +0 -56
- package/dist/utilities/form/paymentForm/BankIcon.mjs.map +0 -1
- package/dist/utilities/form/paymentForm/CashIcon.mjs +0 -55
- package/dist/utilities/form/paymentForm/CashIcon.mjs.map +0 -1
- package/dist/utilities/form/paymentForm/CheckIcon.mjs +0 -62
- package/dist/utilities/form/paymentForm/CheckIcon.mjs.map +0 -1
- package/dist/utilities/form/paymentForm/CreditCardIcon.mjs +0 -85
- package/dist/utilities/form/paymentForm/CreditCardIcon.mjs.map +0 -1
- package/dist/utilities/form/paymentForm/DisableOverlay.mjs +0 -44
- package/dist/utilities/form/paymentForm/DisableOverlay.mjs.map +0 -1
- package/dist/utilities/form/paymentForm/PaymentBankDetails.mjs +0 -161
- package/dist/utilities/form/paymentForm/PaymentBankDetails.mjs.map +0 -1
- package/dist/utilities/form/paymentForm/PaymentCard.d.ts +0 -13
- package/dist/utilities/form/paymentForm/PaymentCard.d.ts.map +0 -1
- package/dist/utilities/form/paymentForm/PaymentCard.js +0 -54
- package/dist/utilities/form/paymentForm/PaymentCard.js.map +0 -1
- package/dist/utilities/form/paymentForm/PaymentCard.mjs +0 -96
- package/dist/utilities/form/paymentForm/PaymentCard.mjs.map +0 -1
- package/dist/utilities/form/paymentForm/PaymentCardDetail.mjs +0 -284
- package/dist/utilities/form/paymentForm/PaymentCardDetail.mjs.map +0 -1
- package/dist/utilities/form/paymentForm/PaymentDropdown.mjs +0 -142
- package/dist/utilities/form/paymentForm/PaymentDropdown.mjs.map +0 -1
- package/dist/utilities/form/paymentForm/TabPanel.mjs +0 -74
- package/dist/utilities/form/paymentForm/TabPanel.mjs.map +0 -1
|
@@ -1,28 +1,16 @@
|
|
|
1
1
|
import { c } from "../../../reactCompilerRuntime.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { LayoutUnit } from "../../../layout/LayoutUnit.mjs";
|
|
2
|
+
import { UdpMessageBar } from "../../../UI/fluent-web-components/UdpMessageBar.mjs";
|
|
4
3
|
import React from "react";
|
|
5
4
|
import { useTranslation } from "react-i18next";
|
|
6
5
|
//#region src/utilities/form/paymentForm/HostedPaymentError.tsx
|
|
7
6
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* HostedPaymentError component
|
|
13
|
-
*
|
|
14
|
-
* This component is used to display an error message when there is an issue rendering the hosted payment form.
|
|
15
|
-
* It utilizes the `useTranslation` hook to support internationalization.
|
|
16
|
-
*
|
|
17
|
-
* @param {Object} props - The properties object.
|
|
18
|
-
* @param {string} props.error - The error string.
|
|
19
|
-
* @param {string} props.message - The error message to be displayed.
|
|
20
|
-
*
|
|
21
|
-
* @returns {JSX.Element} The rendered error message component.
|
|
7
|
+
* Inline error surface for failures while preparing the hosted-payment iframe
|
|
8
|
+
* (bad config string, missing baseUrl, etc.). Rendered above the payment form
|
|
9
|
+
* so the user can see the problem without losing context.
|
|
22
10
|
*/
|
|
23
11
|
const HostedPaymentError = (t0) => {
|
|
24
|
-
const $ = c(
|
|
25
|
-
const { message } = t0;
|
|
12
|
+
const $ = c(6);
|
|
13
|
+
const { error, message } = t0;
|
|
26
14
|
const { t } = useTranslation();
|
|
27
15
|
let t1;
|
|
28
16
|
if ($[0] !== t) {
|
|
@@ -30,44 +18,19 @@ const HostedPaymentError = (t0) => {
|
|
|
30
18
|
$[0] = t;
|
|
31
19
|
$[1] = t1;
|
|
32
20
|
} else t1 = $[1];
|
|
33
|
-
|
|
34
|
-
if ($[2] !== t1) {
|
|
35
|
-
t2 = /* @__PURE__ */ React.createElement(Typography, {
|
|
36
|
-
variant: "subtitle1",
|
|
37
|
-
color: "error"
|
|
38
|
-
}, t1, ":");
|
|
39
|
-
$[2] = t1;
|
|
40
|
-
$[3] = t2;
|
|
41
|
-
} else t2 = $[3];
|
|
21
|
+
const t2 = error ? `${error}: ` : "";
|
|
42
22
|
let t3;
|
|
43
|
-
if ($[4]
|
|
44
|
-
t3 = /* @__PURE__ */ React.createElement(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
$[
|
|
51
|
-
$[
|
|
52
|
-
} else
|
|
53
|
-
|
|
54
|
-
if ($[7] !== message || $[8] !== t4) {
|
|
55
|
-
t5 = /* @__PURE__ */ React.createElement(Typography, {
|
|
56
|
-
variant: "body1",
|
|
57
|
-
color: "error"
|
|
58
|
-
}, t4, ": ", message);
|
|
59
|
-
$[7] = message;
|
|
60
|
-
$[8] = t4;
|
|
61
|
-
$[9] = t5;
|
|
62
|
-
} else t5 = $[9];
|
|
63
|
-
let t6;
|
|
64
|
-
if ($[10] !== t2 || $[11] !== t5) {
|
|
65
|
-
t6 = /* @__PURE__ */ React.createElement(React.Fragment, null, t2, t3, t5);
|
|
66
|
-
$[10] = t2;
|
|
67
|
-
$[11] = t5;
|
|
68
|
-
$[12] = t6;
|
|
69
|
-
} else t6 = $[12];
|
|
70
|
-
return t6;
|
|
23
|
+
if ($[2] !== message || $[3] !== t1 || $[4] !== t2) {
|
|
24
|
+
t3 = /* @__PURE__ */ React.createElement(UdpMessageBar, {
|
|
25
|
+
intent: "error",
|
|
26
|
+
layout: "multiline"
|
|
27
|
+
}, t1, ": ", t2, message);
|
|
28
|
+
$[2] = message;
|
|
29
|
+
$[3] = t1;
|
|
30
|
+
$[4] = t2;
|
|
31
|
+
$[5] = t3;
|
|
32
|
+
} else t3 = $[5];
|
|
33
|
+
return t3;
|
|
71
34
|
};
|
|
72
35
|
//#endregion
|
|
73
36
|
export { HostedPaymentError };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HostedPaymentError.mjs","names":["React","useTranslation","
|
|
1
|
+
{"version":3,"file":"HostedPaymentError.mjs","names":["React","useTranslation","UdpMessageBar","HostedPaymentError","t0","$","_c","error","message","t","t1","t2","t3"],"sources":["../../../../src/utilities/form/paymentForm/HostedPaymentError.tsx"],"sourcesContent":["import React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { UdpMessageBar } from '../../../UI/fluent-web-components/UdpMessageBar';\n\n/**\n * Inline error surface for failures while preparing the hosted-payment iframe\n * (bad config string, missing baseUrl, etc.). Rendered above the payment form\n * so the user can see the problem without losing context.\n */\nexport const HostedPaymentError = ({\n error,\n message,\n}: {\n error?: string;\n message: string;\n}) => {\n const { t } = useTranslation();\n return (\n <UdpMessageBar intent=\"error\" layout=\"multiline\">\n {t(\n 'There was an error rendering the hosted payment form. Please check your settings and try again'\n )}\n {': '}\n {error ? `${error}: ` : ''}\n {message}\n </UdpMessageBar>\n );\n};\n"],"mappings":";;;;;;;;;;AASA,MAAaG,sBAAqBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAC,MAAA,EAAAC,OAAAC,YAAAJ;CAOjC,MAAA,EAAAK,MAAcR,gBAAgB;CAAC,IAAAS;AAAA,KAAAL,EAAA,OAAAI,GAAA;AAG1BC,OAAAD,EACC,iGACD;AAAAJ,IAAA,KAAAI;AAAAJ,IAAA,KAAAK;OAAAA,MAAAL,EAAA;CAEA,MAAAM,KAAAJ,QAAA,GAAWA,MAAK,MAAhB;CAAyB,IAAAK;AAAA,KAAAP,EAAA,OAAAG,WAAAH,EAAA,OAAAK,MAAAL,EAAA,OAAAM,IAAA;AAL5BC,OAAA,sBAAA,cAAC,eAAD;GAAsB,QAAA;GAAe,QAAA;GAOrB,EANbF,IAGA,MACAC,IACAH,QACa;AAAAH,IAAA,KAAAG;AAAAH,IAAA,KAAAK;AAAAL,IAAA,KAAAM;AAAAN,IAAA,KAAAO;OAAAA,MAAAP,EAAA;AAAA,QAPhBO"}
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PaymentDetails } from './AccountPayment.model';
|
|
3
|
+
export interface NewCreditCardFormProps {
|
|
4
|
+
isFormDisabled: boolean;
|
|
5
|
+
paymentDetails: PaymentDetails;
|
|
6
|
+
/** When false, hides the "save this card" checkbox (guest flows). */
|
|
7
|
+
allowSaveMethod?: boolean;
|
|
8
|
+
}
|
|
3
9
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @param {boolean} props.isFormDisabled - Flag to disable the form fields.
|
|
8
|
-
* @param {Record<string, string>} props.classes - CSS classes for styling the form controls.
|
|
9
|
-
* @param {React.Dispatch<React.SetStateAction<string>>} props.setCreditCardNumberInput - Function to set the credit card number input value.
|
|
10
|
+
* Manual credit-card entry form. Used when the configured vendor doesn't have
|
|
11
|
+
* a hosted-payment page, or when the user selected "Other / use a different
|
|
12
|
+
* card" while saved methods were available.
|
|
10
13
|
*
|
|
11
|
-
*
|
|
14
|
+
* NOTE: This form collects raw PAN/CVV/expiry in our DOM. Retained for
|
|
15
|
+
* testing until hosted pages are provisioned for every supported vendor.
|
|
12
16
|
*/
|
|
13
|
-
export declare const NewCreditCardForm: ({ isFormDisabled,
|
|
14
|
-
isFormDisabled: boolean;
|
|
15
|
-
classes: Record<string, string>;
|
|
16
|
-
creditCardNumberInput: string;
|
|
17
|
-
paymentDetails: PaymentDetails;
|
|
18
|
-
setCreditCardNumberInput: React.Dispatch<React.SetStateAction<string>>;
|
|
19
|
-
}) => React.JSX.Element;
|
|
17
|
+
export declare const NewCreditCardForm: ({ isFormDisabled, paymentDetails, allowSaveMethod, }: NewCreditCardFormProps) => React.JSX.Element;
|
|
20
18
|
//# sourceMappingURL=NewCreditCardForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewCreditCardForm.d.ts","sourceRoot":"","sources":["../../../../src/utilities/form/paymentForm/NewCreditCardForm.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"NewCreditCardForm.d.ts","sourceRoot":"","sources":["../../../../src/utilities/form/paymentForm/NewCreditCardForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAcxC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAOxD,MAAM,WAAW,sBAAsB;IACrC,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,cAAc,CAAC;IAC/B,qEAAqE;IACrE,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,qGAwG7B,CAAC"}
|
|
@@ -1,72 +1,59 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import {
|
|
3
|
+
import { Field as FinalField } from 'react-final-form';
|
|
4
4
|
import { Field } from '../Field';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { PaymentCard } from './PaymentCard';
|
|
11
|
-
import { formatCreditCardNumber, formatCVC, formatExpirationDate } from './CreditCardUtils';
|
|
5
|
+
import { UdpFlexbox } from '../../../UI/fluent-web-components/UdpFlexbox';
|
|
6
|
+
import { UdpContainerQueryGrid } from '../../../UI/fluent-web-components/UdpContainerQueryGrid';
|
|
7
|
+
import { UdpTextInput } from '../../../UI/fluent-web-components/UdpTextInput';
|
|
8
|
+
import { UdpCheckbox } from '../../../UI/fluent-web-components/UdpCheckbox';
|
|
9
|
+
import { formatCreditCardNumber, formatCVC, formatExpirationDate, } from './CreditCardUtils';
|
|
12
10
|
import { CreditCardAdornment } from './CreditCardAdornment';
|
|
11
|
+
// The UdpContainerQueryGrid wrapper types gaps as numeric-only, but the
|
|
12
|
+
// underlying component also accepts spacing names ("sm"). Cast at the use
|
|
13
|
+
// site rather than changing the shared wrapper (out of scope for V2).
|
|
14
|
+
const GRID_GAPS = { 0: 'sm' };
|
|
13
15
|
/**
|
|
14
|
-
*
|
|
16
|
+
* Manual credit-card entry form. Used when the configured vendor doesn't have
|
|
17
|
+
* a hosted-payment page, or when the user selected "Other / use a different
|
|
18
|
+
* card" while saved methods were available.
|
|
15
19
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* @param {Record<string, string>} props.classes - CSS classes for styling the form controls.
|
|
19
|
-
* @param {React.Dispatch<React.SetStateAction<string>>} props.setCreditCardNumberInput - Function to set the credit card number input value.
|
|
20
|
-
*
|
|
21
|
-
* @returns {JSX.Element} The rendered NewCardForm component.
|
|
20
|
+
* NOTE: This form collects raw PAN/CVV/expiry in our DOM. Retained for
|
|
21
|
+
* testing until hosted pages are provisioned for every supported vendor.
|
|
22
22
|
*/
|
|
23
|
-
export const NewCreditCardForm = ({ isFormDisabled,
|
|
23
|
+
export const NewCreditCardForm = ({ isFormDisabled, paymentDetails, allowSaveMethod = true, }) => {
|
|
24
24
|
const { accountNumber } = paymentDetails || {};
|
|
25
25
|
const { t } = useTranslation();
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
const [creditCardNumberInput, setCreditCardNumberInput] = useState('');
|
|
27
|
+
const saveCardLabel = accountNumber
|
|
28
|
+
? t('Save this card to account {{accountNumber}}', { accountNumber })
|
|
29
|
+
: t('Save');
|
|
30
|
+
return (React.createElement(UdpFlexbox, { direction: "column", gap: "sm", wrap: "nowrap" }, React.createElement(Field, { component: UdpTextInput, ComponentProps: {
|
|
31
|
+
label: t('Cardholder'),
|
|
32
|
+
autocomplete: 'cc-name',
|
|
30
33
|
disabled: isFormDisabled,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
}, name: "nameOnCard", initialValue: "", required: !isFormDisabled, onChange: () => { } }), React.createElement(FinalField, { name: "cardNumber", initialValue: "", format: formatCreditCardNumber,
|
|
35
|
+
// Raw FinalField (the brand adornment needs the render prop), so the
|
|
36
|
+
// required validation the Field wrapper would add is replicated here.
|
|
37
|
+
validate: (value) => (!isFormDisabled && !value ? 'Required' : undefined) }, ({ input, meta }) => {
|
|
38
|
+
var _a;
|
|
39
|
+
return (React.createElement(UdpTextInput, { label: t('Card Number'), autocomplete: "cc-number", value: String((_a = input.value) !== null && _a !== void 0 ? _a : ''), error: meta.touched && meta.error ? meta.error : undefined, onChange: (e) => {
|
|
40
|
+
var _a;
|
|
41
|
+
input.onChange(e);
|
|
42
|
+
setCreditCardNumberInput(String((_a = e.target.value) !== null && _a !== void 0 ? _a : ''));
|
|
43
|
+
}, disabled: isFormDisabled, required: !isFormDisabled }, React.createElement("div", { slot: "start" }, React.createElement(CreditCardAdornment, { creditCardNumberInput: creditCardNumberInput }))));
|
|
44
|
+
}), React.createElement(UdpContainerQueryGrid, { columns: { 0: 1, 320: 2 }, gaps: GRID_GAPS }, React.createElement(Field, { component: UdpTextInput, ComponentProps: {
|
|
45
|
+
label: t('Expiry Date'),
|
|
46
|
+
hint: 'MM/YY',
|
|
47
|
+
autocomplete: 'cc-exp',
|
|
36
48
|
disabled: isFormDisabled,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}, name: "cardNumber", initialValue: "", required: !isFormDisabled, pattern: "\\d{16,22}", format: formatCreditCardNumber, onChange: (e) => setCreditCardNumberInput(e.target.value) })), React.createElement(Box, { display: "flex", flexDirection: "row", alignItems: "flex-start", padding: "0px", width: "100%", style: { gap: '10px' } }, React.createElement(FormControl, { className: classes.formControl }, React.createElement(Field
|
|
42
|
-
// @ts-ignore
|
|
43
|
-
, {
|
|
44
|
-
// @ts-ignore
|
|
45
|
-
component: FluentTextField, ComponentProps: {
|
|
46
|
-
label: t("Expiry Date"),
|
|
47
|
-
variant: "outlined",
|
|
48
|
-
margin: "normal",
|
|
49
|
-
size: "small",
|
|
50
|
-
width: "100%",
|
|
49
|
+
}, name: "expiryDate", initialValue: "", format: formatExpirationDate, required: !isFormDisabled, onChange: () => { } }), React.createElement(Field, { component: UdpTextInput, ComponentProps: {
|
|
50
|
+
label: t('CVV'),
|
|
51
|
+
hint: t('3-digit code on back'),
|
|
52
|
+
autocomplete: 'cc-csc',
|
|
51
53
|
disabled: isFormDisabled,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
// @ts-ignore
|
|
55
|
-
, {
|
|
56
|
-
// @ts-ignore
|
|
57
|
-
component: FluentTextField, ComponentProps: {
|
|
58
|
-
label: "CVV",
|
|
59
|
-
variant: "outlined",
|
|
60
|
-
margin: "normal",
|
|
61
|
-
size: "small",
|
|
62
|
-
width: "100%",
|
|
54
|
+
}, name: "cvv", initialValue: "", format: formatCVC, required: !isFormDisabled, onChange: () => { } })), allowSaveMethod && (React.createElement(Field, { component: UdpCheckbox, type: "checkbox", name: "isSaveAsNewMethod", ComponentProps: {
|
|
55
|
+
label: saveCardLabel,
|
|
63
56
|
disabled: isFormDisabled,
|
|
64
|
-
|
|
65
|
-
}, name: "cvv", helperText: t("3-digit code on back"), initialValue: "", required: !isFormDisabled, pattern: "\\d{3,4}", format: formatCVC, onChange: () => { } }))), React.createElement(FormControl, { className: classes.formControlCheck }, React.createElement(FormControlLabel, { control: React.createElement(Field, { component: FluentCheckbox, name: "isSaveAsNewMethod", type: "checkbox", defaultValue: false,
|
|
66
|
-
// @ts-ignore
|
|
67
|
-
disabled: isFormDisabled, required: false, onChange: () => { } }), label: React.createElement(Typography, null, accountNumber ?
|
|
68
|
-
React.createElement("span", null, t('Save this card to'), " ", React.createElement("strong", null, " ", t('Account'), " ", accountNumber), " ", t('file'))
|
|
69
|
-
:
|
|
70
|
-
t('Save')) }))));
|
|
57
|
+
}, defaultValue: false, required: false, onChange: () => { } }))));
|
|
71
58
|
};
|
|
72
59
|
//# sourceMappingURL=NewCreditCardForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewCreditCardForm.js","sourceRoot":"","sources":["../../../../src/utilities/form/paymentForm/NewCreditCardForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NewCreditCardForm.js","sourceRoot":"","sources":["../../../../src/utilities/form/paymentForm/NewCreditCardForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC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