@alma/widgets 3.2.3 → 3.3.0
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 +18 -17
- package/dist/raw/widgets.js +26 -18
- package/dist/raw/widgets.js.map +1 -1
- package/dist/raw/widgets.m.js +26 -18
- package/dist/raw/widgets.m.js.map +1 -1
- package/dist/raw/widgets.modern.js +28 -16
- package/dist/raw/widgets.modern.js.map +1 -1
- package/dist/raw/widgets.umd.js +26 -18
- 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
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
--soft-yellow: #fff5cc;
|
|
15
15
|
--alma-green: #4bb543;
|
|
16
16
|
--soft-green: #e2f3e1;
|
|
17
|
-
--alma-red: #
|
|
17
|
+
--alma-red: #CF2020;
|
|
18
18
|
--soft-red: #ffecec;
|
|
19
19
|
--off-white: #f9f9f9;
|
|
20
|
-
--light-gray: #
|
|
21
|
-
--dark-gray: #
|
|
20
|
+
--light-gray: #F0F0F0;
|
|
21
|
+
--dark-gray: #6C6C6C;
|
|
22
22
|
--off-black: #1a1a1a;
|
|
23
23
|
--white: #fff;
|
|
24
24
|
--black: #000;
|
|
@@ -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;
|
|
@@ -225,12 +225,13 @@
|
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
._1l2Oa > button {
|
|
228
|
+
display: initial;
|
|
228
229
|
height: 50px;
|
|
229
230
|
min-width: 50px;
|
|
230
231
|
border: 1px solid var(--dark-gray);
|
|
231
232
|
text-transform: lowercase;
|
|
232
233
|
border-radius: 16px;
|
|
233
|
-
font-family: 'Argent
|
|
234
|
+
font-family: 'Argent', sans-serif;
|
|
234
235
|
font-size: 20px;
|
|
235
236
|
line-height: 120%;
|
|
236
237
|
font-weight: 600;
|
|
@@ -340,7 +341,7 @@
|
|
|
340
341
|
}
|
|
341
342
|
|
|
342
343
|
._3B8wx {
|
|
343
|
-
font-family: 'Argent
|
|
344
|
+
font-family: 'Argent', sans-serif;
|
|
344
345
|
font-weight: 600;
|
|
345
346
|
font-size: 32px;
|
|
346
347
|
min-width: 20px;
|
|
@@ -364,7 +365,7 @@
|
|
|
364
365
|
}
|
|
365
366
|
|
|
366
367
|
._3ERx- {
|
|
367
|
-
font-family: 'Argent
|
|
368
|
+
font-family: 'Argent', sans-serif;
|
|
368
369
|
font-weight: 600;
|
|
369
370
|
font-size: 20px;
|
|
370
371
|
line-height: 130%;
|
package/dist/raw/widgets.js
CHANGED
|
@@ -1889,7 +1889,7 @@ var messagesDE = {
|
|
|
1889
1889
|
"credit-features.total-credit-cost": "Davon Kreditkosten",
|
|
1890
1890
|
"eligibility-modal.bullet-1": "Wählen Sie <strong>Alma</strong> beim Check-out. ",
|
|
1891
1891
|
"eligibility-modal.bullet-2": "Lassen Sie sich führen und bestätigen Sie Ihre Zahlung in <strong>2 Minuten.</strong>",
|
|
1892
|
-
"eligibility-modal.bullet-3": "
|
|
1892
|
+
"eligibility-modal.bullet-3": "<strong>Verlieren Sie nicht die Kontrolle,</strong> indem Sie Ihre Fälligkeitstermine nach Ihrem eigenen Tempo vor- oder zurückverlegen.",
|
|
1893
1893
|
"eligibility-modal.no-eligibility": "Ups, die Prüfung hat anscheinend nicht funktioniert.",
|
|
1894
1894
|
"eligibility-modal.p1x-bullet-1": "Wählen Sie <strong>Alma - 1X</strong> beim Check-out.",
|
|
1895
1895
|
"eligibility-modal.p1x-bullet-2": "Tragen Sie Ihre <strong>Kreditkarteninformationen ein.</strong>",
|
|
@@ -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)",
|
|
@@ -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() {
|