@alma/widgets 3.0.5 → 3.1.1
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/raw/widgets.js +47 -17
- package/dist/raw/widgets.js.map +1 -1
- package/dist/raw/widgets.m.js +47 -17
- package/dist/raw/widgets.m.js.map +1 -1
- package/dist/raw/widgets.modern.js +47 -17
- package/dist/raw/widgets.modern.js.map +1 -1
- package/dist/raw/widgets.umd.js +47 -17
- package/dist/raw/widgets.umd.js.map +1 -1
- package/dist/types/Widgets/EligibilityModal/ModalContainer.d.ts +2 -0
- package/dist/types/Widgets/PaymentPlans/index.d.ts +2 -0
- package/dist/types/hooks/useFetchEligibility.d.ts +1 -1
- package/dist/types/types.d.ts +4 -0
- package/dist/widgets.js +1 -1
- package/dist/widgets.js.map +1 -1
- package/dist/widgets.m.js +1 -1
- package/dist/widgets.m.js.map +1 -1
- package/dist/widgets.modern.js +1 -1
- package/dist/widgets.modern.js.map +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/raw/widgets.umd.js
CHANGED
|
@@ -6715,23 +6715,23 @@
|
|
|
6715
6715
|
"credit-features.credit-cost-display": "{creditCost} (APR {taegPercentage})",
|
|
6716
6716
|
"credit-features.information": "Ein Kredit verpflichtet Sie und muss zurückgezahlt werden. Prüfen Sie Ihre Rückzahlungsfähigkeit, bevor Sie sich verpflichten.",
|
|
6717
6717
|
"credit-features.total-credit-cost": "Davon Kreditkosten",
|
|
6718
|
-
"eligibility-modal.bullet-1": "Wählen Sie <strong>Alma</strong>
|
|
6718
|
+
"eligibility-modal.bullet-1": "Wählen Sie <strong>Alma</strong> beim Check-out. ",
|
|
6719
6719
|
"eligibility-modal.bullet-2": "Füllen Sie die <strong>angeforderten</strong> Informationen aus.",
|
|
6720
6720
|
"eligibility-modal.bullet-3": "Ihre Zahlung wird <strong>sofort</strong> bestätigt!",
|
|
6721
|
-
"eligibility-modal.no-eligibility": "Ups, die
|
|
6722
|
-
"eligibility-modal.title-deferred-plan": "
|
|
6723
|
-
"eligibility-modal.title-normal": "
|
|
6721
|
+
"eligibility-modal.no-eligibility": "Ups, die Prüfung hat anscheinend nicht funktioniert.",
|
|
6722
|
+
"eligibility-modal.title-deferred-plan": "Zahlen Sie mit Alma in Raten oder später.",
|
|
6723
|
+
"eligibility-modal.title-normal": "Zahlen Sie mit Alma in mehreren Raten.",
|
|
6724
6724
|
"installments.today": "Heute",
|
|
6725
6725
|
"installments.total-amount": "Gesamtsumme",
|
|
6726
|
-
"installments.total-fees": "Davon Kosten
|
|
6726
|
+
"installments.total-fees": "Davon Kosten",
|
|
6727
6727
|
"payment-plan-strings.day-abbreviation": "T{numberOfDeferredDays}",
|
|
6728
|
-
"payment-plan-strings.default-message": "Bezahlen Sie in Raten mit Alma",
|
|
6728
|
+
"payment-plan-strings.default-message": "Bezahlen Sie zinsfrei in mehreren Raten mit Alma.",
|
|
6729
6729
|
"payment-plan-strings.deferred": "{totalAmount} zu zahlen am {dueDate}",
|
|
6730
6730
|
"payment-plan-strings.ineligible-greater-than-max": "Bis zu {maxAmount}",
|
|
6731
6731
|
"payment-plan-strings.ineligible-lower-than-min": "Ab {minAmount}",
|
|
6732
6732
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
6733
6733
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
6734
|
-
"payment-plan-strings.no-fee": "(
|
|
6734
|
+
"payment-plan-strings.no-fee": "(0% Finanzierung)"
|
|
6735
6735
|
};
|
|
6736
6736
|
|
|
6737
6737
|
var messagesEN = {
|
|
@@ -6765,8 +6765,8 @@
|
|
|
6765
6765
|
"eligibility-modal.bullet-2": "Completa la <strong>información</strong> solicitada.",
|
|
6766
6766
|
"eligibility-modal.bullet-3": "¡La validación de tu pago es <strong>instantánea</strong> !",
|
|
6767
6767
|
"eligibility-modal.no-eligibility": "Uy, parece que la simulación no ha funcionado.",
|
|
6768
|
-
"eligibility-modal.title-deferred-plan": "
|
|
6769
|
-
"eligibility-modal.title-normal": "Pagar a plazos con tarjeta
|
|
6768
|
+
"eligibility-modal.title-deferred-plan": "Paga a plazos o posteriormente con tarjeta bancaria con Alma.",
|
|
6769
|
+
"eligibility-modal.title-normal": "Pagar a plazos con tarjeta bancaria con Alma.",
|
|
6770
6770
|
"installments.today": "Hoy",
|
|
6771
6771
|
"installments.total-amount": "Total",
|
|
6772
6772
|
"installments.total-fees": "De los cuales, costes (IVA incluido)",
|
|
@@ -6805,17 +6805,17 @@
|
|
|
6805
6805
|
|
|
6806
6806
|
var messagesIT = {
|
|
6807
6807
|
"credit-features.credit-cost-display": "{creditCost} (TAEG {taegPercentage})",
|
|
6808
|
-
"credit-features.information": "Un pagamento rateale ti impegna e deve essere ripagato. Verifica la tua
|
|
6808
|
+
"credit-features.information": "Un pagamento rateale ti impegna e deve essere ripagato. Verifica la tua disponibilità finanziaria prima di impegnarti.",
|
|
6809
6809
|
"credit-features.total-credit-cost": "Di cui commissioni",
|
|
6810
6810
|
"eligibility-modal.bullet-1": "Scegli <strong>Alma</strong> alla cassa.",
|
|
6811
6811
|
"eligibility-modal.bullet-2": "Compila le informazioni <strong></strong> richieste.",
|
|
6812
6812
|
"eligibility-modal.bullet-3": "La convalida del pagamento è <strong>istantanea</strong>!",
|
|
6813
6813
|
"eligibility-modal.no-eligibility": "Ops, sembra che qualcosa non abbia funzionato.",
|
|
6814
|
-
"eligibility-modal.title-deferred-plan": "
|
|
6815
|
-
"eligibility-modal.title-normal": "
|
|
6814
|
+
"eligibility-modal.title-deferred-plan": "Paga a rate o posticipa il pagamento con Alma, senza registrazione.",
|
|
6815
|
+
"eligibility-modal.title-normal": "Paga a rate con Alma, senza registrazione.",
|
|
6816
6816
|
"installments.today": "Oggi",
|
|
6817
6817
|
"installments.total-amount": "Totale",
|
|
6818
|
-
"installments.total-fees": "Di cui
|
|
6818
|
+
"installments.total-fees": "Di cui commissioni",
|
|
6819
6819
|
"payment-plan-strings.day-abbreviation": "G{numberOfDeferredDays}",
|
|
6820
6820
|
"payment-plan-strings.default-message": "Paga a rate con Alma",
|
|
6821
6821
|
"payment-plan-strings.deferred": "{totalAmount} da pagare il {dueDate}",
|
|
@@ -14979,7 +14979,7 @@
|
|
|
14979
14979
|
});
|
|
14980
14980
|
};
|
|
14981
14981
|
|
|
14982
|
-
var useFetchEligibility = function useFetchEligibility(purchaseAmount, _ref, plans) {
|
|
14982
|
+
var useFetchEligibility = function useFetchEligibility(purchaseAmount, _ref, plans, customerBillingCountry, customerShippingCountry) {
|
|
14983
14983
|
var domain = _ref.domain,
|
|
14984
14984
|
merchantId = _ref.merchantId;
|
|
14985
14985
|
|
|
@@ -15000,9 +15000,27 @@
|
|
|
15000
15000
|
});
|
|
15001
15001
|
react.useEffect(function () {
|
|
15002
15002
|
if (status === apiStatus.PENDING) {
|
|
15003
|
+
var billing_address = null;
|
|
15004
|
+
|
|
15005
|
+
if (customerBillingCountry) {
|
|
15006
|
+
billing_address = {
|
|
15007
|
+
country: customerBillingCountry
|
|
15008
|
+
};
|
|
15009
|
+
}
|
|
15010
|
+
|
|
15011
|
+
var shipping_address = null;
|
|
15012
|
+
|
|
15013
|
+
if (customerShippingCountry) {
|
|
15014
|
+
shipping_address = {
|
|
15015
|
+
country: customerShippingCountry
|
|
15016
|
+
};
|
|
15017
|
+
}
|
|
15018
|
+
|
|
15003
15019
|
fetchFromApi(domain + '/v2/payments/eligibility', {
|
|
15004
15020
|
purchase_amount: purchaseAmount,
|
|
15005
|
-
queries: configInstallments
|
|
15021
|
+
queries: configInstallments,
|
|
15022
|
+
billing_address: billing_address,
|
|
15023
|
+
shipping_address: shipping_address
|
|
15006
15024
|
}, {
|
|
15007
15025
|
Authorization: "Alma-Merchant-Auth " + merchantId
|
|
15008
15026
|
}).then(function (res) {
|
|
@@ -20358,10 +20376,12 @@
|
|
|
20358
20376
|
var purchaseAmount = _ref.purchaseAmount,
|
|
20359
20377
|
apiData = _ref.apiData,
|
|
20360
20378
|
configPlans = _ref.configPlans,
|
|
20379
|
+
customerBillingCountry = _ref.customerBillingCountry,
|
|
20380
|
+
customerShippingCountry = _ref.customerShippingCountry,
|
|
20361
20381
|
onClose = _ref.onClose,
|
|
20362
20382
|
cards = _ref.cards;
|
|
20363
20383
|
|
|
20364
|
-
var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
|
|
20384
|
+
var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans, customerBillingCountry, customerShippingCountry),
|
|
20365
20385
|
eligibilityPlans = _useFetchEligibility[0],
|
|
20366
20386
|
status = _useFetchEligibility[1];
|
|
20367
20387
|
|
|
@@ -20494,11 +20514,13 @@
|
|
|
20494
20514
|
purchaseAmount = _ref.purchaseAmount,
|
|
20495
20515
|
suggestedPaymentPlan = _ref.suggestedPaymentPlan,
|
|
20496
20516
|
cards = _ref.cards,
|
|
20517
|
+
customerBillingCountry = _ref.customerBillingCountry,
|
|
20518
|
+
customerShippingCountry = _ref.customerShippingCountry,
|
|
20497
20519
|
transitionDelay = _ref.transitionDelay,
|
|
20498
20520
|
_ref$hideBorder = _ref.hideBorder,
|
|
20499
20521
|
hideBorder = _ref$hideBorder === void 0 ? false : _ref$hideBorder;
|
|
20500
20522
|
|
|
20501
|
-
var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
|
|
20523
|
+
var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans, customerBillingCountry, customerShippingCountry),
|
|
20502
20524
|
eligibilityPlans = _useFetchEligibility[0],
|
|
20503
20525
|
status = _useFetchEligibility[1];
|
|
20504
20526
|
|
|
@@ -20657,6 +20679,8 @@
|
|
|
20657
20679
|
_options$monochrome = options.monochrome,
|
|
20658
20680
|
monochrome = _options$monochrome === void 0 ? true : _options$monochrome,
|
|
20659
20681
|
suggestedPaymentPlan = options.suggestedPaymentPlan,
|
|
20682
|
+
customerBillingCountry = options.customerBillingCountry,
|
|
20683
|
+
customerShippingCountry = options.customerShippingCountry,
|
|
20660
20684
|
_options$locale = options.locale,
|
|
20661
20685
|
locale = _options$locale === void 0 ? Locale.en : _options$locale,
|
|
20662
20686
|
cards = options.cards;
|
|
@@ -20672,6 +20696,8 @@
|
|
|
20672
20696
|
purchaseAmount: purchaseAmount,
|
|
20673
20697
|
suggestedPaymentPlan: suggestedPaymentPlan,
|
|
20674
20698
|
cards: cards,
|
|
20699
|
+
customerBillingCountry: customerBillingCountry,
|
|
20700
|
+
customerShippingCountry: customerShippingCountry,
|
|
20675
20701
|
transitionDelay: transitionDelay,
|
|
20676
20702
|
hideBorder: hideBorder
|
|
20677
20703
|
})), document.querySelector(container));
|
|
@@ -20685,6 +20711,8 @@
|
|
|
20685
20711
|
_plans = options.plans,
|
|
20686
20712
|
_options$locale2 = options.locale,
|
|
20687
20713
|
_locale = _options$locale2 === void 0 ? Locale.en : _options$locale2,
|
|
20714
|
+
_customerBillingCountry = options.customerBillingCountry,
|
|
20715
|
+
_customerShippingCountry = options.customerShippingCountry,
|
|
20688
20716
|
_cards = options.cards;
|
|
20689
20717
|
|
|
20690
20718
|
var close = function close() {
|
|
@@ -20698,6 +20726,8 @@
|
|
|
20698
20726
|
purchaseAmount: _purchaseAmount,
|
|
20699
20727
|
apiData: _this.apiData,
|
|
20700
20728
|
configPlans: _plans,
|
|
20729
|
+
customerBillingCountry: _customerBillingCountry,
|
|
20730
|
+
customerShippingCountry: _customerShippingCountry,
|
|
20701
20731
|
onClose: close,
|
|
20702
20732
|
cards: _cards
|
|
20703
20733
|
})), document.querySelector(_container));
|