@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
package/dist/raw/widgets.css
CHANGED
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
/** Venn **/
|
|
28
28
|
@font-face {
|
|
29
29
|
font-family: Venn;
|
|
30
|
-
src: url('
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
src: url('https://cdn.almapay.com/fonts/Venn/Venn-Bold.eot') format('embedded-opentype'),
|
|
31
|
+
url('https://cdn.almapay.com/fonts/Venn/Venn-Bold.woff') format('woff'),
|
|
32
|
+
url('https://cdn.almapay.com/fonts/Venn/Venn-Bold.ttf') format('truetype');
|
|
33
33
|
font-weight: 700;
|
|
34
34
|
font-style: normal;
|
|
35
35
|
font-display: swap;
|
|
36
36
|
}
|
|
37
37
|
@font-face {
|
|
38
38
|
font-family: Venn;
|
|
39
|
-
src: url('
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
src: url('https://cdn.almapay.com/fonts/Venn/Venn-Regular.eot?#iefix') format('embedded-opentype'),
|
|
40
|
+
url('https://cdn.almapay.com/fonts/Venn/Venn-Regular.woff') format('woff'),
|
|
41
|
+
url('https://cdn.almapay.com/fonts/Venn/Venn-Regular.ttf') format('truetype');
|
|
42
42
|
font-weight: 400;
|
|
43
43
|
font-style: normal;
|
|
44
44
|
font-display: swap;
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
|
|
47
47
|
/** Argent **/
|
|
48
48
|
@font-face {
|
|
49
|
-
font-family:
|
|
50
|
-
src: url('
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
font-family: Argent;
|
|
50
|
+
src: url('https://cdn.almapay.com/fonts/Argent/ArgentCF-DemiBold.eot') format('embedded-opentype'),
|
|
51
|
+
url('https://cdn.almapay.com/fonts/Argent/ArgentCF-DemiBold.woff') format('woff'),
|
|
52
|
+
url('https://cdn.almapay.com/fonts/Argent/ArgentCF-DemiBold.ttf') format('truetype');
|
|
53
53
|
font-weight: 600;
|
|
54
54
|
font-style: normal;
|
|
55
55
|
font-display: swap;
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
|
|
58
58
|
._GTTk7 {
|
|
59
59
|
margin: 16px 0;
|
|
60
|
-
font-family: 'Argent
|
|
60
|
+
font-family: 'Argent', sans-serif;
|
|
61
61
|
background-color: var(--off-white);
|
|
62
62
|
border-radius: 20px;
|
|
63
63
|
padding: 24px;
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
border: 1px solid var(--dark-gray);
|
|
232
232
|
text-transform: lowercase;
|
|
233
233
|
border-radius: 16px;
|
|
234
|
-
font-family: 'Argent
|
|
234
|
+
font-family: 'Argent', sans-serif;
|
|
235
235
|
font-size: 20px;
|
|
236
236
|
line-height: 120%;
|
|
237
237
|
font-weight: 600;
|
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
}
|
|
342
342
|
|
|
343
343
|
._3B8wx {
|
|
344
|
-
font-family: 'Argent
|
|
344
|
+
font-family: 'Argent', sans-serif;
|
|
345
345
|
font-weight: 600;
|
|
346
346
|
font-size: 32px;
|
|
347
347
|
min-width: 20px;
|
|
@@ -365,7 +365,7 @@
|
|
|
365
365
|
}
|
|
366
366
|
|
|
367
367
|
._3ERx- {
|
|
368
|
-
font-family: 'Argent
|
|
368
|
+
font-family: 'Argent', sans-serif;
|
|
369
369
|
font-weight: 600;
|
|
370
370
|
font-size: 20px;
|
|
371
371
|
line-height: 130%;
|
package/dist/raw/widgets.js
CHANGED
|
@@ -2025,17 +2025,17 @@ var messagesIT = {
|
|
|
2025
2025
|
|
|
2026
2026
|
var messagesNL = {
|
|
2027
2027
|
"credit-features.credit-cost-display": "{creditCost} (gemiddeld rente percentage {taegPercentage})",
|
|
2028
|
-
"credit-features.information": "Een lening
|
|
2029
|
-
"credit-features.total-credit-cost": "Waarvan
|
|
2028
|
+
"credit-features.information": "Een lening is bindend en moet worden terugbetaald. Ga na of je het kunt terugbetalen voordat je jezelf vastlegt.",
|
|
2029
|
+
"credit-features.total-credit-cost": "Waarvan kredietkosten",
|
|
2030
2030
|
"eligibility-modal.bullet-1": "Kies <strong>Alma</strong> bij het afrekenen.",
|
|
2031
|
-
"eligibility-modal.bullet-2": "Laat ons
|
|
2032
|
-
"eligibility-modal.bullet-3": "<strong>
|
|
2031
|
+
"eligibility-modal.bullet-2": "Laat ons je begeleiden en jouw betaling valideren in <strong>2 minuten.</strong>",
|
|
2032
|
+
"eligibility-modal.bullet-3": "<strong>Behoudt de controle</strong> door jouw deadlines op je eigen tempo vooruit of achteruit te schuiven.",
|
|
2033
2033
|
"eligibility-modal.no-eligibility": "Oeps, het lijkt erop dat de simulatie niet werkte.",
|
|
2034
2034
|
"eligibility-modal.p1x-bullet-1": "Kies <strong>Alma - 1X</strong> bij het afrekenen.",
|
|
2035
|
-
"eligibility-modal.p1x-bullet-2": "Vul
|
|
2036
|
-
"eligibility-modal.p1x-bullet-3": "<strong>De
|
|
2037
|
-
"eligibility-modal.title-deferred-plan": "Betaal in termijnen of later per creditcard met Alma.",
|
|
2038
|
-
"eligibility-modal.title-normal": "Betaal in termijnen met
|
|
2035
|
+
"eligibility-modal.p1x-bullet-2": "Vul jouw <strong>creditcardgegevens </strong> in.",
|
|
2036
|
+
"eligibility-modal.p1x-bullet-3": "<strong>De bevestiging </strong> van jouw betaling is onmiddellijk!",
|
|
2037
|
+
"eligibility-modal.title-deferred-plan": "Betaal in termijnen of later via iDEAL of per creditcard met Alma.",
|
|
2038
|
+
"eligibility-modal.title-normal": "Betaal in termijnen met iDEAL of creditcard bij Alma.",
|
|
2039
2039
|
"installments.today": "Tegenwoordig",
|
|
2040
2040
|
"installments.total-amount": "Totaal",
|
|
2041
2041
|
"installments.total-fees": "Waarvan kosten (incl. BTW)",
|
|
@@ -2057,9 +2057,9 @@ var messagesPT = {
|
|
|
2057
2057
|
"credit-features.total-credit-cost": "Incluindo custo do crédito",
|
|
2058
2058
|
"eligibility-modal.bullet-1": "Escolha a <strong>Alma</strong> no checkout.",
|
|
2059
2059
|
"eligibility-modal.bullet-2": "Deixe-nos guiá-lo e validar o seu pagamento em <strong>2 minutos.</strong>",
|
|
2060
|
-
"eligibility-modal.bullet-3": "<strong>Mantenha
|
|
2060
|
+
"eligibility-modal.bullet-3": "<strong>Mantenha o controlo</strong> avançando ou recuando os seus prazos ao seu próprio ritmo.",
|
|
2061
2061
|
"eligibility-modal.no-eligibility": "Ups, parece que a simulação não funcionou.",
|
|
2062
|
-
"eligibility-modal.p1x-bullet-1": "
|
|
2062
|
+
"eligibility-modal.p1x-bullet-1": "Seleccionar <strong>Alma - 1X</strong> no final da compra.",
|
|
2063
2063
|
"eligibility-modal.p1x-bullet-2": "Preencha as informações do seu <strong>cartão de crédito.</strong>",
|
|
2064
2064
|
"eligibility-modal.p1x-bullet-3": "<strong>A validação </strong> do seu pagamento é instantânea!",
|
|
2065
2065
|
"eligibility-modal.title-deferred-plan": "Pagar em prestações ou mais tarde por cartão de crédito com Alma.",
|
|
@@ -2260,7 +2260,8 @@ var useFetchEligibility = function useFetchEligibility(purchaseAmount, _ref, pla
|
|
|
2260
2260
|
billing_address: billing_address,
|
|
2261
2261
|
shipping_address: shipping_address
|
|
2262
2262
|
}, {
|
|
2263
|
-
Authorization: "Alma-Merchant-Auth " + merchantId
|
|
2263
|
+
Authorization: "Alma-Merchant-Auth " + merchantId,
|
|
2264
|
+
'X-Alma-Agent': 'Alma Widget'
|
|
2264
2265
|
}).then(function (res) {
|
|
2265
2266
|
setEligibility(res);
|
|
2266
2267
|
setStatus(apiStatus.SUCCESS);
|
|
@@ -3206,7 +3207,8 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|
|
|
3206
3207
|
customerShippingCountry = _ref.customerShippingCountry,
|
|
3207
3208
|
transitionDelay = _ref.transitionDelay,
|
|
3208
3209
|
_ref$hideBorder = _ref.hideBorder,
|
|
3209
|
-
hideBorder = _ref$hideBorder === void 0 ? false : _ref$hideBorder
|
|
3210
|
+
hideBorder = _ref$hideBorder === void 0 ? false : _ref$hideBorder,
|
|
3211
|
+
onModalClose = _ref.onModalClose;
|
|
3210
3212
|
|
|
3211
3213
|
var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans, customerBillingCountry, customerShippingCountry),
|
|
3212
3214
|
eligibilityPlans = _useFetchEligibility[0],
|
|
@@ -3231,8 +3233,9 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|
|
|
3231
3233
|
return setIsOpen(true);
|
|
3232
3234
|
};
|
|
3233
3235
|
|
|
3234
|
-
var closeModal = function closeModal() {
|
|
3235
|
-
|
|
3236
|
+
var closeModal = function closeModal(event) {
|
|
3237
|
+
setIsOpen(false);
|
|
3238
|
+
onModalClose && onModalClose(event);
|
|
3236
3239
|
};
|
|
3237
3240
|
|
|
3238
3241
|
var eligiblePlanKeys = eligibilityPlans.reduce(function (acc, plan, index) {
|
|
@@ -3371,7 +3374,8 @@ var WidgetsController = /*#__PURE__*/function () {
|
|
|
3371
3374
|
customerShippingCountry = options.customerShippingCountry,
|
|
3372
3375
|
_options$locale = options.locale,
|
|
3373
3376
|
locale = _options$locale === void 0 ? Locale.en : _options$locale,
|
|
3374
|
-
cards = options.cards
|
|
3377
|
+
cards = options.cards,
|
|
3378
|
+
onModalClose = options.onModalClose;
|
|
3375
3379
|
|
|
3376
3380
|
if (containerDiv) {
|
|
3377
3381
|
reactDom.render( /*#__PURE__*/React__default.createElement(Provider, {
|
|
@@ -3387,7 +3391,8 @@ var WidgetsController = /*#__PURE__*/function () {
|
|
|
3387
3391
|
customerBillingCountry: customerBillingCountry,
|
|
3388
3392
|
customerShippingCountry: customerShippingCountry,
|
|
3389
3393
|
transitionDelay: transitionDelay,
|
|
3390
|
-
hideBorder: hideBorder
|
|
3394
|
+
hideBorder: hideBorder,
|
|
3395
|
+
onModalClose: onModalClose
|
|
3391
3396
|
})), document.querySelector(container));
|
|
3392
3397
|
}
|
|
3393
3398
|
}
|
|
@@ -3401,10 +3406,13 @@ var WidgetsController = /*#__PURE__*/function () {
|
|
|
3401
3406
|
_locale = _options$locale2 === void 0 ? Locale.en : _options$locale2,
|
|
3402
3407
|
_customerBillingCountry = options.customerBillingCountry,
|
|
3403
3408
|
_customerShippingCountry = options.customerShippingCountry,
|
|
3404
|
-
_cards = options.cards
|
|
3409
|
+
_cards = options.cards,
|
|
3410
|
+
onClose = options.onClose;
|
|
3405
3411
|
|
|
3406
|
-
var close = function close() {
|
|
3407
|
-
|
|
3412
|
+
var close = function close(event) {
|
|
3413
|
+
if (!containerDiv) return;
|
|
3414
|
+
reactDom.unmountComponentAtNode(containerDiv);
|
|
3415
|
+
onClose && onClose(event);
|
|
3408
3416
|
};
|
|
3409
3417
|
|
|
3410
3418
|
var renderModal = function renderModal() {
|