@tonder.io/rn-sdk 0.1.4 → 0.1.5-beta.DEV1404.b71a839
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/README.md +148 -12
- package/lib/commonjs/core/BaseEnrollment/index.js +1 -0
- package/lib/commonjs/core/BaseEnrollment/index.js.map +1 -1
- package/lib/commonjs/core/BaseSDK/index.js +1 -1
- package/lib/commonjs/core/BaseSDK/index.js.map +1 -1
- package/lib/commonjs/core/PaymentInlineContainer/index.js +1 -0
- package/lib/commonjs/core/PaymentInlineContainer/index.js.map +1 -1
- package/lib/commonjs/services/SkyflowService.js +3 -2
- package/lib/commonjs/services/SkyflowService.js.map +1 -1
- package/lib/commonjs/types/base.js.map +1 -1
- package/lib/commonjs/ui/components/CardForm/index.js +19 -5
- package/lib/commonjs/ui/components/CardForm/index.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardCVVInput.js +13 -7
- package/lib/commonjs/ui/components/Input/CardCVVInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardExpirationDateInput.js +10 -3
- package/lib/commonjs/ui/components/Input/CardExpirationDateInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardExpirationMonthInput.js +13 -7
- package/lib/commonjs/ui/components/Input/CardExpirationMonthInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardExpirationYearInput.js +13 -7
- package/lib/commonjs/ui/components/Input/CardExpirationYearInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardHolderInput.js +13 -7
- package/lib/commonjs/ui/components/Input/CardHolderInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardNumberInput.js +13 -7
- package/lib/commonjs/ui/components/Input/CardNumberInput.js.map +1 -1
- package/lib/commonjs/ui/features/TonderEnrollment/index.js +2 -1
- package/lib/commonjs/ui/features/TonderEnrollment/index.js.map +1 -1
- package/lib/commonjs/ui/features/TonderPayment/index.js +2 -1
- package/lib/commonjs/ui/features/TonderPayment/index.js.map +1 -1
- package/lib/module/core/BaseEnrollment/index.js +1 -0
- package/lib/module/core/BaseEnrollment/index.js.map +1 -1
- package/lib/module/core/BaseSDK/index.js +1 -1
- package/lib/module/core/BaseSDK/index.js.map +1 -1
- package/lib/module/core/PaymentInlineContainer/index.js +1 -0
- package/lib/module/core/PaymentInlineContainer/index.js.map +1 -1
- package/lib/module/services/SkyflowService.js +3 -2
- package/lib/module/services/SkyflowService.js.map +1 -1
- package/lib/module/types/base.js.map +1 -1
- package/lib/module/ui/components/CardForm/index.js +19 -5
- package/lib/module/ui/components/CardForm/index.js.map +1 -1
- package/lib/module/ui/components/Input/CardCVVInput.js +13 -7
- package/lib/module/ui/components/Input/CardCVVInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardExpirationDateInput.js +10 -3
- package/lib/module/ui/components/Input/CardExpirationDateInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardExpirationMonthInput.js +13 -7
- package/lib/module/ui/components/Input/CardExpirationMonthInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardExpirationYearInput.js +13 -7
- package/lib/module/ui/components/Input/CardExpirationYearInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardHolderInput.js +13 -7
- package/lib/module/ui/components/Input/CardHolderInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardNumberInput.js +13 -7
- package/lib/module/ui/components/Input/CardNumberInput.js.map +1 -1
- package/lib/module/ui/features/TonderEnrollment/index.js +2 -1
- package/lib/module/ui/features/TonderEnrollment/index.js.map +1 -1
- package/lib/module/ui/features/TonderPayment/index.js +2 -1
- package/lib/module/ui/features/TonderPayment/index.js.map +1 -1
- package/lib/typescript/commonjs/src/core/BaseEnrollment/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/BaseSDK/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/PaymentInlineContainer/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/SkyflowService.d.ts +2 -1
- package/lib/typescript/commonjs/src/services/SkyflowService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/base.d.ts +3 -1
- package/lib/typescript/commonjs/src/types/base.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/enrollment.d.ts +3 -1
- package/lib/typescript/commonjs/src/types/enrollment.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/inlineCheckout.d.ts +3 -1
- package/lib/typescript/commonjs/src/types/inlineCheckout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/input.d.ts +30 -1
- package/lib/typescript/commonjs/src/types/input.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/CardForm/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/ui/components/CardForm/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardCVVInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationDateInput.d.ts +1 -7
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationDateInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationMonthInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationYearInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardHolderInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardNumberInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/features/TonderEnrollment/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/features/TonderPayment/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/BaseEnrollment/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/BaseSDK/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/PaymentInlineContainer/index.d.ts.map +1 -1
- package/lib/typescript/module/src/services/SkyflowService.d.ts +2 -1
- package/lib/typescript/module/src/services/SkyflowService.d.ts.map +1 -1
- package/lib/typescript/module/src/types/base.d.ts +3 -1
- package/lib/typescript/module/src/types/base.d.ts.map +1 -1
- package/lib/typescript/module/src/types/enrollment.d.ts +3 -1
- package/lib/typescript/module/src/types/enrollment.d.ts.map +1 -1
- package/lib/typescript/module/src/types/inlineCheckout.d.ts +3 -1
- package/lib/typescript/module/src/types/inlineCheckout.d.ts.map +1 -1
- package/lib/typescript/module/src/types/input.d.ts +30 -1
- package/lib/typescript/module/src/types/input.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/CardForm/index.d.ts +2 -1
- package/lib/typescript/module/src/ui/components/CardForm/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardCVVInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationDateInput.d.ts +1 -7
- package/lib/typescript/module/src/ui/components/Input/CardExpirationDateInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationMonthInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationYearInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardHolderInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardNumberInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/features/TonderEnrollment/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/features/TonderPayment/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/core/BaseEnrollment/index.ts +1 -0
- package/src/core/BaseSDK/index.ts +4 -1
- package/src/core/PaymentInlineContainer/index.ts +1 -0
- package/src/services/SkyflowService.ts +6 -2
- package/src/types/base.ts +3 -0
- package/src/types/enrollment.ts +3 -1
- package/src/types/inlineCheckout.ts +3 -0
- package/src/types/input.ts +33 -1
- package/src/ui/components/CardForm/index.tsx +16 -0
- package/src/ui/components/Input/CardCVVInput.tsx +11 -4
- package/src/ui/components/Input/CardExpirationDateInput.tsx +8 -7
- package/src/ui/components/Input/CardExpirationMonthInput.tsx +11 -4
- package/src/ui/components/Input/CardExpirationYearInput.tsx +11 -4
- package/src/ui/components/Input/CardHolderInput.tsx +11 -4
- package/src/ui/components/Input/CardNumberInput.tsx +11 -4
- package/src/ui/features/TonderEnrollment/index.tsx +1 -0
- package/src/ui/features/TonderPayment/index.tsx +1 -0
|
@@ -22,6 +22,9 @@ export const CardExpirationYearInput: React.FC<InputProps> = ({
|
|
|
22
22
|
placeholder = DEFAULT_SKYFLOW_PLACEHOLDERS.expiryYearPlaceholder,
|
|
23
23
|
label = DEFAULT_SKYFLOW_lABELS.expiryYearLabel,
|
|
24
24
|
style,
|
|
25
|
+
onFocus,
|
|
26
|
+
onBlur,
|
|
27
|
+
onChange,
|
|
25
28
|
}) => {
|
|
26
29
|
const { state } = useTonderContext();
|
|
27
30
|
const [errorText, setErrorText] = useState('');
|
|
@@ -72,12 +75,16 @@ export const CardExpirationYearInput: React.FC<InputProps> = ({
|
|
|
72
75
|
}
|
|
73
76
|
: {}),
|
|
74
77
|
}}
|
|
75
|
-
onChange={() => {
|
|
78
|
+
onChange={(event) => {
|
|
76
79
|
setErrorText('');
|
|
80
|
+
if (onChange) onChange(event);
|
|
77
81
|
}}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
onFocus={(event) => {
|
|
83
|
+
if (onFocus) onFocus(event);
|
|
84
|
+
}}
|
|
85
|
+
onBlur={(event) => {
|
|
86
|
+
setErrorText(getErrorField(event, label));
|
|
87
|
+
if (onBlur) onBlur(event);
|
|
81
88
|
}}
|
|
82
89
|
// onReady={props.onReady}
|
|
83
90
|
/>
|
|
@@ -23,6 +23,9 @@ export const CardHolderInput: React.FC<InputProps> = ({
|
|
|
23
23
|
placeholder = DEFAULT_SKYFLOW_PLACEHOLDERS.namePlaceholder,
|
|
24
24
|
label = DEFAULT_SKYFLOW_lABELS.nameLabel,
|
|
25
25
|
style,
|
|
26
|
+
onFocus,
|
|
27
|
+
onBlur,
|
|
28
|
+
onChange,
|
|
26
29
|
}) => {
|
|
27
30
|
const { state } = useTonderContext();
|
|
28
31
|
|
|
@@ -72,12 +75,16 @@ export const CardHolderInput: React.FC<InputProps> = ({
|
|
|
72
75
|
}
|
|
73
76
|
: {}),
|
|
74
77
|
}}
|
|
75
|
-
onChange={() => {
|
|
78
|
+
onChange={(event) => {
|
|
76
79
|
setErrorText('');
|
|
80
|
+
if (onChange) onChange(event);
|
|
77
81
|
}}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
onFocus={(event) => {
|
|
83
|
+
if (onFocus) onFocus(event);
|
|
84
|
+
}}
|
|
85
|
+
onBlur={(event) => {
|
|
86
|
+
setErrorText(getErrorField(event, label));
|
|
87
|
+
if (onBlur) onBlur(event);
|
|
81
88
|
}}
|
|
82
89
|
// onReady={props.onReady}
|
|
83
90
|
/>
|
|
@@ -22,6 +22,9 @@ export const CardNumberInput: React.FC<InputProps> = ({
|
|
|
22
22
|
placeholder = DEFAULT_SKYFLOW_PLACEHOLDERS.cardPlaceholder,
|
|
23
23
|
label = DEFAULT_SKYFLOW_lABELS.cardLabel,
|
|
24
24
|
style,
|
|
25
|
+
onFocus,
|
|
26
|
+
onBlur,
|
|
27
|
+
onChange,
|
|
25
28
|
}) => {
|
|
26
29
|
const { state } = useTonderContext();
|
|
27
30
|
const [errorText, setErrorText] = useState('');
|
|
@@ -71,12 +74,16 @@ export const CardNumberInput: React.FC<InputProps> = ({
|
|
|
71
74
|
}
|
|
72
75
|
: {}),
|
|
73
76
|
}}
|
|
74
|
-
onChange={() => {
|
|
77
|
+
onChange={(event) => {
|
|
75
78
|
setErrorText('');
|
|
79
|
+
if (onChange) onChange(event);
|
|
76
80
|
}}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
onFocus={(event) => {
|
|
82
|
+
if (onFocus) onFocus(event);
|
|
83
|
+
}}
|
|
84
|
+
onBlur={(event) => {
|
|
85
|
+
setErrorText(getErrorField(event, label));
|
|
86
|
+
if (onBlur) onBlur(event);
|
|
80
87
|
}}
|
|
81
88
|
// onReady={props.onReady}
|
|
82
89
|
/>
|
|
@@ -47,6 +47,7 @@ const TonderEnrollment: React.FC<ITonderEnrollmentProps> = () => {
|
|
|
47
47
|
style={state?.customization?.styles?.cardForm}
|
|
48
48
|
labels={state?.customization?.labels}
|
|
49
49
|
placeholders={state?.customization?.placeholders}
|
|
50
|
+
events={state?.events}
|
|
50
51
|
/>
|
|
51
52
|
)}
|
|
52
53
|
{state?.customization?.showMessages &&
|
|
@@ -133,6 +133,7 @@ const TonderPayment: React.FC<ITonderPaymentProps> = () => {
|
|
|
133
133
|
style={state?.customization?.styles?.cardForm}
|
|
134
134
|
labels={state?.customization?.labels}
|
|
135
135
|
placeholders={state?.customization?.placeholders}
|
|
136
|
+
events={state?.events}
|
|
136
137
|
/>
|
|
137
138
|
)}
|
|
138
139
|
{state?.customization?.paymentMethods?.show && (
|