straumur-web-component 0.5.8-alpha.1 → 0.5.9
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/index.d.ts +5 -2
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -79,6 +79,7 @@ type StraumurWebConfiguration = {
|
|
|
79
79
|
submitDetails?: (details: any) => void;
|
|
80
80
|
placeholders?: Placeholders;
|
|
81
81
|
locale?: "is" | "en";
|
|
82
|
+
localizations?: Partial<Record<Language, Partial<Record<TranslationKey, string>>>>;
|
|
82
83
|
};
|
|
83
84
|
type ResultCode = "AuthenticationFinished" | "AuthenticationNotRequired" | "Authorised" | "Cancelled" | "ChallengeShopper" | "Error" | "IdentifyShopper" | "PartiallyAuthorised" | "Pending" | "PresentToShopper" | "Received" | "RedirectShopper" | "Refused";
|
|
84
85
|
type PaymentCompletedData = {
|
|
@@ -94,6 +95,7 @@ type StraumurCheckoutConfiguration = {
|
|
|
94
95
|
onPaymentFailed?: (data?: PaymentFailedData) => void;
|
|
95
96
|
placeholders?: Placeholders;
|
|
96
97
|
locale: Language;
|
|
98
|
+
customLocalizations?: Partial<Record<Language, Partial<Record<TranslationKey, string>>>>;
|
|
97
99
|
};
|
|
98
100
|
type PlaceholderKeys = "cardNumber" | "expiryDate" | "expiryMonth" | "expiryYear" | "securityCodeThreeDigits" | "securityCodeFourDigits";
|
|
99
101
|
type Placeholders = Partial<Record<PlaceholderKeys, string>>;
|
|
@@ -102,16 +104,17 @@ declare class StraumurCheckout {
|
|
|
102
104
|
private configuration;
|
|
103
105
|
private paymentMethods;
|
|
104
106
|
private mountElement;
|
|
107
|
+
private i18n;
|
|
105
108
|
constructor(config: StraumurWebConfiguration);
|
|
106
109
|
mount(selector: HTMLElement | string): Promise<void>;
|
|
107
110
|
private renderComponent;
|
|
108
|
-
updateConfig(newConfig: Partial<StraumurCheckoutConfiguration>): void;
|
|
109
111
|
handleSuccess(message: TranslationKey): void;
|
|
112
|
+
handleError(message: TranslationKey): void;
|
|
110
113
|
submitDetails(redirectResult: string): Promise<void>;
|
|
111
114
|
private handleOnSubmitAdditionalData;
|
|
115
|
+
updateConfig(newConfig: Partial<StraumurCheckoutConfiguration>): void;
|
|
112
116
|
setLanguage(locale: Language): void;
|
|
113
117
|
destroy(): void;
|
|
114
|
-
handleError(message: TranslationKey): void;
|
|
115
118
|
}
|
|
116
119
|
|
|
117
120
|
export { StraumurCheckout };
|