@alma/widgets 3.2.4 → 3.3.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.css +14 -14
- package/dist/raw/widgets.js +27 -19
- package/dist/raw/widgets.js.map +1 -1
- package/dist/raw/widgets.m.js +27 -19
- package/dist/raw/widgets.m.js.map +1 -1
- package/dist/raw/widgets.modern.js +29 -17
- package/dist/raw/widgets.modern.js.map +1 -1
- package/dist/raw/widgets.umd.js +27 -19
- package/dist/raw/widgets.umd.js.map +1 -1
- package/dist/types/Widgets/EligibilityModal/ModalContainer.d.ts +1 -1
- package/dist/types/Widgets/EligibilityModal/index.d.ts +2 -2
- package/dist/types/Widgets/PaymentPlans/index.d.ts +2 -1
- package/dist/types/components/Modal/index.d.ts +2 -2
- package/dist/types/types.d.ts +3 -0
- package/dist/types/widgets_controller.d.ts +2 -1
- package/dist/widgets.css +5 -5
- 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/assets/fonts/ArgentCF-DemiBold.eot +0 -0
- package/dist/assets/fonts/ArgentCF-DemiBold.ttf +0 -0
- package/dist/assets/fonts/ArgentCF-DemiBold.woff +0 -0
- package/dist/assets/fonts/ArgentCF-DemiBold.woff2 +0 -0
- package/dist/assets/fonts/Venn-Bold.eot +0 -0
- package/dist/assets/fonts/Venn-Bold.ttf +0 -0
- package/dist/assets/fonts/Venn-Bold.woff +0 -0
- package/dist/assets/fonts/Venn-Bold.woff2 +0 -0
- package/dist/assets/fonts/Venn-Regular.eot +0 -0
- package/dist/assets/fonts/Venn-Regular.ttf +0 -0
- package/dist/assets/fonts/Venn-Regular.woff +0 -0
- package/dist/assets/fonts/Venn-Regular.woff2 +0 -0
|
@@ -2000,17 +2000,17 @@ var messagesIT = {
|
|
|
2000
2000
|
|
|
2001
2001
|
var messagesNL = {
|
|
2002
2002
|
"credit-features.credit-cost-display": "{creditCost} (gemiddeld rente percentage {taegPercentage})",
|
|
2003
|
-
"credit-features.information": "Een lening
|
|
2004
|
-
"credit-features.total-credit-cost": "Waarvan
|
|
2003
|
+
"credit-features.information": "Een lening is bindend en moet worden terugbetaald. Ga na of je het kunt terugbetalen voordat je jezelf vastlegt.",
|
|
2004
|
+
"credit-features.total-credit-cost": "Waarvan kredietkosten",
|
|
2005
2005
|
"eligibility-modal.bullet-1": "Kies <strong>Alma</strong> bij het afrekenen.",
|
|
2006
|
-
"eligibility-modal.bullet-2": "Laat ons
|
|
2007
|
-
"eligibility-modal.bullet-3": "<strong>
|
|
2006
|
+
"eligibility-modal.bullet-2": "Laat ons je begeleiden en jouw betaling valideren in <strong>2 minuten.</strong>",
|
|
2007
|
+
"eligibility-modal.bullet-3": "<strong>Behoudt de controle</strong> door jouw deadlines op je eigen tempo vooruit of achteruit te schuiven.",
|
|
2008
2008
|
"eligibility-modal.no-eligibility": "Oeps, het lijkt erop dat de simulatie niet werkte.",
|
|
2009
2009
|
"eligibility-modal.p1x-bullet-1": "Kies <strong>Alma - 1X</strong> bij het afrekenen.",
|
|
2010
|
-
"eligibility-modal.p1x-bullet-2": "Vul
|
|
2011
|
-
"eligibility-modal.p1x-bullet-3": "<strong>De
|
|
2012
|
-
"eligibility-modal.title-deferred-plan": "Betaal in termijnen of later per creditcard met Alma.",
|
|
2013
|
-
"eligibility-modal.title-normal": "Betaal in termijnen met
|
|
2010
|
+
"eligibility-modal.p1x-bullet-2": "Vul jouw <strong>creditcardgegevens </strong> in.",
|
|
2011
|
+
"eligibility-modal.p1x-bullet-3": "<strong>De bevestiging </strong> van jouw betaling is onmiddellijk!",
|
|
2012
|
+
"eligibility-modal.title-deferred-plan": "Betaal in termijnen of later via iDEAL of per creditcard met Alma.",
|
|
2013
|
+
"eligibility-modal.title-normal": "Betaal in termijnen met iDEAL of creditcard bij Alma.",
|
|
2014
2014
|
"installments.today": "Tegenwoordig",
|
|
2015
2015
|
"installments.total-amount": "Totaal",
|
|
2016
2016
|
"installments.total-fees": "Waarvan kosten (incl. BTW)",
|
|
@@ -2032,9 +2032,9 @@ var messagesPT = {
|
|
|
2032
2032
|
"credit-features.total-credit-cost": "Incluindo custo do crédito",
|
|
2033
2033
|
"eligibility-modal.bullet-1": "Escolha a <strong>Alma</strong> no checkout.",
|
|
2034
2034
|
"eligibility-modal.bullet-2": "Deixe-nos guiá-lo e validar o seu pagamento em <strong>2 minutos.</strong>",
|
|
2035
|
-
"eligibility-modal.bullet-3": "<strong>Mantenha
|
|
2035
|
+
"eligibility-modal.bullet-3": "<strong>Mantenha o controlo</strong> avançando ou recuando os seus prazos ao seu próprio ritmo.",
|
|
2036
2036
|
"eligibility-modal.no-eligibility": "Ups, parece que a simulação não funcionou.",
|
|
2037
|
-
"eligibility-modal.p1x-bullet-1": "
|
|
2037
|
+
"eligibility-modal.p1x-bullet-1": "Seleccionar <strong>Alma - 1X</strong> no final da compra.",
|
|
2038
2038
|
"eligibility-modal.p1x-bullet-2": "Preencha as informações do seu <strong>cartão de crédito.</strong>",
|
|
2039
2039
|
"eligibility-modal.p1x-bullet-3": "<strong>A validação </strong> do seu pagamento é instantânea!",
|
|
2040
2040
|
"eligibility-modal.title-deferred-plan": "Pagar em prestações ou mais tarde por cartão de crédito com Alma.",
|
|
@@ -2215,7 +2215,8 @@ const useFetchEligibility = (purchaseAmount, {
|
|
|
2215
2215
|
billing_address,
|
|
2216
2216
|
shipping_address
|
|
2217
2217
|
}, {
|
|
2218
|
-
Authorization: `Alma-Merchant-Auth ${merchantId}
|
|
2218
|
+
Authorization: `Alma-Merchant-Auth ${merchantId}`,
|
|
2219
|
+
'X-Alma-Agent': 'Alma Widget'
|
|
2219
2220
|
}).then(res => {
|
|
2220
2221
|
setEligibility(res);
|
|
2221
2222
|
setStatus(apiStatus.SUCCESS);
|
|
@@ -3107,7 +3108,8 @@ const PaymentPlanWidget = ({
|
|
|
3107
3108
|
customerBillingCountry,
|
|
3108
3109
|
customerShippingCountry,
|
|
3109
3110
|
transitionDelay,
|
|
3110
|
-
hideBorder: _hideBorder = false
|
|
3111
|
+
hideBorder: _hideBorder = false,
|
|
3112
|
+
onModalClose
|
|
3111
3113
|
}) => {
|
|
3112
3114
|
const [eligibilityPlans, status] = useFetchEligibility(purchaseAmount, apiData, configPlans, customerBillingCountry, customerShippingCountry);
|
|
3113
3115
|
const eligiblePlans = eligibilityPlans.filter(plan => plan.eligible);
|
|
@@ -3123,7 +3125,10 @@ const PaymentPlanWidget = ({
|
|
|
3123
3125
|
|
|
3124
3126
|
const openModal = () => setIsOpen(true);
|
|
3125
3127
|
|
|
3126
|
-
const closeModal =
|
|
3128
|
+
const closeModal = event => {
|
|
3129
|
+
setIsOpen(false);
|
|
3130
|
+
onModalClose && onModalClose(event);
|
|
3131
|
+
};
|
|
3127
3132
|
|
|
3128
3133
|
const eligiblePlanKeys = eligibilityPlans.reduce((acc, plan, index) => plan.eligible ? [...acc, index] : acc, []);
|
|
3129
3134
|
/**
|
|
@@ -3255,7 +3260,8 @@ class WidgetsController {
|
|
|
3255
3260
|
customerBillingCountry,
|
|
3256
3261
|
customerShippingCountry,
|
|
3257
3262
|
locale = Locale.en,
|
|
3258
|
-
cards
|
|
3263
|
+
cards,
|
|
3264
|
+
onModalClose
|
|
3259
3265
|
} = options;
|
|
3260
3266
|
|
|
3261
3267
|
if (containerDiv) {
|
|
@@ -3272,7 +3278,8 @@ class WidgetsController {
|
|
|
3272
3278
|
customerBillingCountry: customerBillingCountry,
|
|
3273
3279
|
customerShippingCountry: customerShippingCountry,
|
|
3274
3280
|
transitionDelay: transitionDelay,
|
|
3275
|
-
hideBorder: hideBorder
|
|
3281
|
+
hideBorder: hideBorder,
|
|
3282
|
+
onModalClose: onModalClose
|
|
3276
3283
|
})), document.querySelector(container));
|
|
3277
3284
|
}
|
|
3278
3285
|
}
|
|
@@ -3286,10 +3293,15 @@ class WidgetsController {
|
|
|
3286
3293
|
locale = Locale.en,
|
|
3287
3294
|
customerBillingCountry,
|
|
3288
3295
|
customerShippingCountry,
|
|
3289
|
-
cards
|
|
3296
|
+
cards,
|
|
3297
|
+
onClose
|
|
3290
3298
|
} = options;
|
|
3291
3299
|
|
|
3292
|
-
const close =
|
|
3300
|
+
const close = event => {
|
|
3301
|
+
if (!containerDiv) return;
|
|
3302
|
+
unmountComponentAtNode(containerDiv);
|
|
3303
|
+
onClose && onClose(event);
|
|
3304
|
+
};
|
|
3293
3305
|
|
|
3294
3306
|
const renderModal = () => {
|
|
3295
3307
|
render( /*#__PURE__*/React.createElement(Provider, {
|