@alma/widgets 2.4.0 → 2.6.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 +13 -2
- package/dist/raw/widgets.js +72 -47
- package/dist/raw/widgets.js.map +1 -1
- package/dist/raw/widgets.m.js +72 -47
- package/dist/raw/widgets.m.js.map +1 -1
- package/dist/raw/widgets.modern.js +67 -45
- package/dist/raw/widgets.modern.js.map +1 -1
- package/dist/raw/widgets.umd.js +72 -47
- package/dist/raw/widgets.umd.js.map +1 -1
- package/dist/types/Widgets/EligibilityModal/DesktopModal/index.d.ts +3 -1
- package/dist/types/Widgets/EligibilityModal/MobileModal/index.d.ts +3 -1
- package/dist/types/Widgets/EligibilityModal/ModalContainer.test.d.ts +1 -0
- package/dist/types/Widgets/EligibilityModal/classNames.const.d.ts +1 -0
- package/dist/types/Widgets/EligibilityModal/components/Title/index.d.ts +3 -1
- package/dist/types/Widgets/EligibilityModal/modal.test.d.ts +1 -0
- package/dist/types/Widgets/PaymentPlans/__tests__/Basics.test.d.ts +1 -0
- package/dist/types/Widgets/PaymentPlans/__tests__/Credit.test.d.ts +1 -0
- package/dist/types/Widgets/PaymentPlans/__tests__/CustomTransitionDelay.test.d.ts +1 -0
- package/dist/types/Widgets/PaymentPlans/__tests__/HideWidget.test.d.ts +1 -0
- package/dist/types/Widgets/PaymentPlans/__tests__/IneligibleOptions.test.d.ts +1 -0
- package/dist/types/Widgets/PaymentPlans/__tests__/LanguageCheck.test.d.ts +1 -0
- package/dist/types/Widgets/PaymentPlans/__tests__/LaunchModal.test.d.ts +1 -0
- package/dist/types/Widgets/PaymentPlans/__tests__/SuggestedPaymentPlan.test.d.ts +1 -0
- package/dist/types/Widgets/PaymentPlans/__tests__/WithoutPlans.test.d.ts +1 -0
- package/dist/types/test/fixtures.d.ts +1 -0
- package/dist/types/utils/index.test.d.ts +1 -0
- package/dist/widgets.css +2 -2
- 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
|
@@ -6292,8 +6292,9 @@
|
|
|
6292
6292
|
"eligibility-modal.credit-commitment": "Ein Kredit verpflichtet Sie und muss zurückgezahlt werden. Prüfen Sie Ihre Rückzahlungsfähigkeit, bevor Sie sich verpflichten.",
|
|
6293
6293
|
"eligibility-modal.credit-cost": "Davon Kreditkosten",
|
|
6294
6294
|
"eligibility-modal.credit-cost-amount": "{creditCost} (APR {TAEG})",
|
|
6295
|
-
"eligibility-modal.no-eligibility": "Ups, die Simulation
|
|
6296
|
-
"eligibility-modal.title": "<highlighted>Bezahlen Sie in Raten</highlighted>
|
|
6295
|
+
"eligibility-modal.no-eligibility": "Ups, die Simulation hat anscheinend nicht funktioniert.",
|
|
6296
|
+
"eligibility-modal.title": "<highlighted>Bezahlen Sie in Raten</highlighted> per Kreditkarte mit Alma.",
|
|
6297
|
+
"eligibility-modal.title-deferred": "<highlighted>Bezahlen Sie in Raten</highlighted> oder später per Kreditkarte mit Alma.",
|
|
6297
6298
|
"eligibility-modal.total": "Insgesamt",
|
|
6298
6299
|
"installments.today": "Heutzutage",
|
|
6299
6300
|
"payment-plan-strings.day-abbreviation": "J{numberOfDeferredDays}",
|
|
@@ -6315,7 +6316,8 @@
|
|
|
6315
6316
|
"eligibility-modal.credit-cost": "Of which cost of credit",
|
|
6316
6317
|
"eligibility-modal.credit-cost-amount": "{creditCost} (APR {TAEG})",
|
|
6317
6318
|
"eligibility-modal.no-eligibility": "Oops, looks like the simulation didn't work.",
|
|
6318
|
-
"eligibility-modal.title": "<highlighted>Pay in installments</highlighted>
|
|
6319
|
+
"eligibility-modal.title": "<highlighted>Pay in installments</highlighted> by credit card with Alma.",
|
|
6320
|
+
"eligibility-modal.title-deferred": "<highlighted>Pay in installments</highlighted> or later by credit card with Alma.",
|
|
6319
6321
|
"eligibility-modal.total": "Total",
|
|
6320
6322
|
"installments.today": "Today",
|
|
6321
6323
|
"payment-plan-strings.day-abbreviation": "T{numberOfDeferredDays}",
|
|
@@ -6337,7 +6339,8 @@
|
|
|
6337
6339
|
"eligibility-modal.credit-cost": "Coste de crédito (incl. en el total)",
|
|
6338
6340
|
"eligibility-modal.credit-cost-amount": "{creditCost} (TAE {TAEG})",
|
|
6339
6341
|
"eligibility-modal.no-eligibility": "Uy, parece que la simulación no ha funcionado.",
|
|
6340
|
-
"eligibility-modal.title": "<highlighted>Paga a plazos</highlighted>
|
|
6342
|
+
"eligibility-modal.title": "<highlighted>Paga a plazos</highlighted> con tarjeta de crédito con Alma.",
|
|
6343
|
+
"eligibility-modal.title-deferred": "<highlighted>Paga a plazos</highlighted> o más adelante con tu tarjeta, a través de Alma.",
|
|
6341
6344
|
"eligibility-modal.total": "Total",
|
|
6342
6345
|
"installments.today": "Hoy",
|
|
6343
6346
|
"payment-plan-strings.day-abbreviation": "D{numberOfDeferredDays}",
|
|
@@ -6358,8 +6361,9 @@
|
|
|
6358
6361
|
"eligibility-modal.credit-commitment": "Un crédit vous engage et doit être remboursé. Vérifiez vos capacités de remboursement avant de vous engager.",
|
|
6359
6362
|
"eligibility-modal.credit-cost": "Dont coût du crédit",
|
|
6360
6363
|
"eligibility-modal.credit-cost-amount": "{creditCost} (TAEG {TAEG})",
|
|
6361
|
-
"eligibility-modal.no-eligibility": "Oups, il semblerait que la simulation n'
|
|
6362
|
-
"eligibility-modal.title": "<highlighted>Payez en plusieurs fois</highlighted>
|
|
6364
|
+
"eligibility-modal.no-eligibility": "Oups, il semblerait que la simulation n'ait pas fonctionné.",
|
|
6365
|
+
"eligibility-modal.title": "<highlighted>Payez en plusieurs fois</highlighted> par carte bancaire avec Alma.",
|
|
6366
|
+
"eligibility-modal.title-deferred": "<highlighted>Payez en plusieurs fois</highlighted> ou plus tard par carte bancaire avec Alma.",
|
|
6363
6367
|
"eligibility-modal.total": "Total",
|
|
6364
6368
|
"installments.today": "Aujourd'hui",
|
|
6365
6369
|
"payment-plan-strings.day-abbreviation": "J{numberOfDeferredDays}",
|
|
@@ -6381,7 +6385,8 @@
|
|
|
6381
6385
|
"eligibility-modal.credit-cost": "Di cui commissioni",
|
|
6382
6386
|
"eligibility-modal.credit-cost-amount": "{creditCost} (TAEG {TAEG})",
|
|
6383
6387
|
"eligibility-modal.no-eligibility": "Ops, sembra che la simulazione non abbia funzionato.",
|
|
6384
|
-
"eligibility-modal.title": "<highlighted>Paga a rate</highlighted>
|
|
6388
|
+
"eligibility-modal.title": "<highlighted>Paga a rate</highlighted> con carta di credito con Alma.",
|
|
6389
|
+
"eligibility-modal.title-deferred": "<highlighted>Paga a rate</highlighted> e posticipa il pagamento con Alma, senza interessi.",
|
|
6385
6390
|
"eligibility-modal.total": "Totale",
|
|
6386
6391
|
"installments.today": "Oggi",
|
|
6387
6392
|
"payment-plan-strings.day-abbreviation": "G{numberOfDeferredDays}",
|
|
@@ -6403,7 +6408,8 @@
|
|
|
6403
6408
|
"eligibility-modal.credit-cost": "Waarvan kosten van krediet",
|
|
6404
6409
|
"eligibility-modal.credit-cost-amount": "{creditCost} (APR {TAEG})",
|
|
6405
6410
|
"eligibility-modal.no-eligibility": "Oeps, het lijkt erop dat de simulatie niet werkte.",
|
|
6406
|
-
"eligibility-modal.title": "<highlighted>Betaal in termijnen</highlighted>
|
|
6411
|
+
"eligibility-modal.title": "<highlighted>Betaal in termijnen</highlighted> met kredietkaart bij Alma.",
|
|
6412
|
+
"eligibility-modal.title-deferred": "<highlighted>Betaal in termijnen</highlighted> of later per credit card met Alma.",
|
|
6407
6413
|
"eligibility-modal.total": "Totaal",
|
|
6408
6414
|
"installments.today": "Tegenwoordig",
|
|
6409
6415
|
"payment-plan-strings.day-abbreviation": "J{numberOfDeferredDays}",
|
|
@@ -16774,7 +16780,8 @@
|
|
|
16774
16780
|
closeButton: prefix + '-close-button',
|
|
16775
16781
|
scheduleDetails: prefix + '-schedule-details',
|
|
16776
16782
|
scheduleTotal: prefix + '-schedule-total',
|
|
16777
|
-
scheduleCredit: prefix + '-schedule-credit'
|
|
16783
|
+
scheduleCredit: prefix + '-schedule-credit',
|
|
16784
|
+
summary: prefix + '-summary'
|
|
16778
16785
|
};
|
|
16779
16786
|
|
|
16780
16787
|
var _excluded = ["children", "isOpen", "onClose", "className", "contentClassName", "scrollable"];
|
|
@@ -18316,7 +18323,7 @@
|
|
|
18316
18323
|
}));
|
|
18317
18324
|
};
|
|
18318
18325
|
|
|
18319
|
-
var s$3 = {"schedule":"_MPKjS","scheduleLine":"_1A7Qv","total":"_14Ejo","creditCost":"_1ZIgu","creditMessage":"_1BUr8"};
|
|
18326
|
+
var s$3 = {"schedule":"_MPKjS","scheduleLine":"_1A7Qv","total":"_14Ejo","summary":"_65ZpD","creditCost":"_1ZIgu","creditCostAmount":"_tUTZp","creditMessage":"_1BUr8"};
|
|
18320
18327
|
|
|
18321
18328
|
var Schedule = function Schedule(_ref) {
|
|
18322
18329
|
var currentPlan = _ref.currentPlan;
|
|
@@ -18326,9 +18333,29 @@
|
|
|
18326
18333
|
var customerFees = priceFromCents(currentPlan ? currentPlan.customer_total_cost_amount : 0);
|
|
18327
18334
|
var isCredit = currentPlan && currentPlan.installments_count > 4;
|
|
18328
18335
|
var intl = useIntl();
|
|
18329
|
-
return /*#__PURE__*/react.createElement("div", {
|
|
18336
|
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
|
18330
18337
|
className: classnames(s$3.schedule, STATIC_CUSTOMISATION_CLASSES.scheduleDetails),
|
|
18331
18338
|
"data-testid": "modal-installments-element"
|
|
18339
|
+
}, ((currentPlan == null ? void 0 : currentPlan.payment_plan) || []).map(function (installment, index) {
|
|
18340
|
+
return /*#__PURE__*/react.createElement("div", {
|
|
18341
|
+
className: s$3.scheduleLine,
|
|
18342
|
+
key: index
|
|
18343
|
+
}, /*#__PURE__*/react.createElement("span", null, isToday(installment.due_date * 1000) ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
18344
|
+
id: "installments.today",
|
|
18345
|
+
defaultMessage: "Aujourd'hui"
|
|
18346
|
+
}) : /*#__PURE__*/react.createElement(FormattedDate, {
|
|
18347
|
+
value: installment.due_date * 1000,
|
|
18348
|
+
day: "numeric",
|
|
18349
|
+
month: "long",
|
|
18350
|
+
year: "numeric"
|
|
18351
|
+
})), /*#__PURE__*/react.createElement("span", null, /*#__PURE__*/react.createElement(FormattedNumber, {
|
|
18352
|
+
value: priceFromCents(installment.total_amount),
|
|
18353
|
+
style: "currency",
|
|
18354
|
+
currency: "EUR"
|
|
18355
|
+
})));
|
|
18356
|
+
})), /*#__PURE__*/react.createElement("div", {
|
|
18357
|
+
className: classnames(s$3.summary, STATIC_CUSTOMISATION_CLASSES.summary),
|
|
18358
|
+
"data-testid": "modal-summary"
|
|
18332
18359
|
}, /*#__PURE__*/react.createElement("div", {
|
|
18333
18360
|
className: classnames(s$3.scheduleLine, s$3.total, STATIC_CUSTOMISATION_CLASSES.scheduleTotal)
|
|
18334
18361
|
}, /*#__PURE__*/react.createElement("span", null, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
@@ -18346,7 +18373,9 @@
|
|
|
18346
18373
|
})) : /*#__PURE__*/react.createElement("span", null, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
18347
18374
|
id: "eligibility-modal.cost",
|
|
18348
18375
|
defaultMessage: "Dont frais"
|
|
18349
|
-
})), /*#__PURE__*/react.createElement("span",
|
|
18376
|
+
})), /*#__PURE__*/react.createElement("span", {
|
|
18377
|
+
className: s$3.creditCostAmount
|
|
18378
|
+
}, isCredit ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
18350
18379
|
id: "eligibility-modal.credit-cost-amount",
|
|
18351
18380
|
defaultMessage: "{creditCost} (TAEG {TAEG})",
|
|
18352
18381
|
values: {
|
|
@@ -18363,29 +18392,12 @@
|
|
|
18363
18392
|
value: customerFees,
|
|
18364
18393
|
style: "currency",
|
|
18365
18394
|
currency: "EUR"
|
|
18366
|
-
}))),
|
|
18367
|
-
return /*#__PURE__*/react.createElement("div", {
|
|
18368
|
-
className: s$3.scheduleLine,
|
|
18369
|
-
key: index
|
|
18370
|
-
}, /*#__PURE__*/react.createElement("span", null, isToday(installment.due_date * 1000) ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
18371
|
-
id: "installments.today",
|
|
18372
|
-
defaultMessage: "Aujourd'hui"
|
|
18373
|
-
}) : /*#__PURE__*/react.createElement(FormattedDate, {
|
|
18374
|
-
value: installment.due_date * 1000,
|
|
18375
|
-
day: "numeric",
|
|
18376
|
-
month: "long",
|
|
18377
|
-
year: "numeric"
|
|
18378
|
-
})), /*#__PURE__*/react.createElement("span", null, /*#__PURE__*/react.createElement(FormattedNumber, {
|
|
18379
|
-
value: priceFromCents(installment.total_amount),
|
|
18380
|
-
style: "currency",
|
|
18381
|
-
currency: "EUR"
|
|
18382
|
-
})));
|
|
18383
|
-
}), isCredit && /*#__PURE__*/react.createElement("p", {
|
|
18395
|
+
}))), isCredit && /*#__PURE__*/react.createElement("p", {
|
|
18384
18396
|
className: s$3.creditMessage
|
|
18385
18397
|
}, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
18386
18398
|
id: "eligibility-modal.credit-commitment",
|
|
18387
18399
|
defaultMessage: "Un cr\xE9dit vous engage et doit \xEAtre rembours\xE9. V\xE9rifiez vos capacit\xE9s de remboursement\n avant de vous engager."
|
|
18388
|
-
})));
|
|
18400
|
+
}))));
|
|
18389
18401
|
};
|
|
18390
18402
|
|
|
18391
18403
|
var s$4 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
|
|
@@ -18484,31 +18496,43 @@
|
|
|
18484
18496
|
|
|
18485
18497
|
var s$6 = {"title":"_3ERx-"};
|
|
18486
18498
|
|
|
18487
|
-
var Title = function Title() {
|
|
18499
|
+
var Title = function Title(_ref) {
|
|
18500
|
+
var isSomePlanDeferred = _ref.isSomePlanDeferred;
|
|
18488
18501
|
return /*#__PURE__*/react.createElement("div", {
|
|
18489
18502
|
className: classnames(s$6.title, STATIC_CUSTOMISATION_CLASSES.title),
|
|
18490
18503
|
"data-testid": "modal-title-element"
|
|
18491
|
-
}, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
18492
|
-
id:
|
|
18504
|
+
}, isSomePlanDeferred ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
18505
|
+
id: 'eligibility-modal.title-deferred',
|
|
18493
18506
|
defaultMessage: "<highlighted>Payez en plusieurs fois</highlighted> ou plus tard par carte bancaire avec Alma.",
|
|
18494
18507
|
values: {
|
|
18495
18508
|
highlighted: function highlighted() {
|
|
18496
18509
|
return /*#__PURE__*/react.createElement("span", null, [].slice.call(arguments));
|
|
18497
18510
|
}
|
|
18498
18511
|
}
|
|
18512
|
+
}) : /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
18513
|
+
id: 'eligibility-modal.title',
|
|
18514
|
+
defaultMessage: "<highlighted>Payez en plusieurs fois</highlighted> par carte bancaire avec Alma.",
|
|
18515
|
+
values: {
|
|
18516
|
+
highlighted: function highlighted() {
|
|
18517
|
+
return /*#__PURE__*/react.createElement("span", null, [].slice.call(arguments));
|
|
18518
|
+
}
|
|
18519
|
+
}
|
|
18499
18520
|
}));
|
|
18500
18521
|
};
|
|
18501
18522
|
|
|
18502
18523
|
var s$7 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC"};
|
|
18503
18524
|
|
|
18504
18525
|
var DesktopModal = function DesktopModal(_ref) {
|
|
18505
|
-
var children = _ref.children
|
|
18526
|
+
var children = _ref.children,
|
|
18527
|
+
isSomePlanDeferred = _ref.isSomePlanDeferred;
|
|
18506
18528
|
return /*#__PURE__*/react.createElement("div", {
|
|
18507
18529
|
className: s$7.container,
|
|
18508
18530
|
"data-testid": "modal-container"
|
|
18509
18531
|
}, /*#__PURE__*/react.createElement("div", {
|
|
18510
18532
|
className: classnames([s$7.block, s$7.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
|
|
18511
|
-
}, /*#__PURE__*/react.createElement(Title,
|
|
18533
|
+
}, /*#__PURE__*/react.createElement(Title, {
|
|
18534
|
+
isSomePlanDeferred: isSomePlanDeferred
|
|
18535
|
+
}), /*#__PURE__*/react.createElement(Info, null), /*#__PURE__*/react.createElement(Logo, null)), /*#__PURE__*/react.createElement("div", {
|
|
18512
18536
|
className: classnames(s$7.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
|
|
18513
18537
|
}, children));
|
|
18514
18538
|
};
|
|
@@ -18518,11 +18542,14 @@
|
|
|
18518
18542
|
var s$9 = {"container":"_2G7Ch"};
|
|
18519
18543
|
|
|
18520
18544
|
var MobileModal = function MobileModal(_ref) {
|
|
18521
|
-
var children = _ref.children
|
|
18545
|
+
var children = _ref.children,
|
|
18546
|
+
isSomePlanDeferred = _ref.isSomePlanDeferred;
|
|
18522
18547
|
return /*#__PURE__*/react.createElement("div", {
|
|
18523
18548
|
className: s$9.container,
|
|
18524
18549
|
"data-testid": "modal-container"
|
|
18525
|
-
}, /*#__PURE__*/react.createElement(Title,
|
|
18550
|
+
}, /*#__PURE__*/react.createElement(Title, {
|
|
18551
|
+
isSomePlanDeferred: isSomePlanDeferred
|
|
18552
|
+
}), children, /*#__PURE__*/react.createElement(Info, null), /*#__PURE__*/react.createElement(Logo, null));
|
|
18526
18553
|
};
|
|
18527
18554
|
|
|
18528
18555
|
var EligibilityModal = function EligibilityModal(_ref) {
|
|
@@ -18543,25 +18570,23 @@
|
|
|
18543
18570
|
return plan.eligible;
|
|
18544
18571
|
});
|
|
18545
18572
|
var currentPlan = eligiblePlans[currentPlanIndex];
|
|
18546
|
-
var
|
|
18547
|
-
|
|
18548
|
-
|
|
18549
|
-
setCurrentPlanIndex: setCurrentPlanIndex,
|
|
18550
|
-
currentPlan: currentPlan,
|
|
18551
|
-
status: status
|
|
18552
|
-
};
|
|
18573
|
+
var isSomePlanDeferred = eligibilityPlans.some(function (plan) {
|
|
18574
|
+
return plan.deferred_days > 0 || plan.deferred_months > 0;
|
|
18575
|
+
});
|
|
18553
18576
|
return /*#__PURE__*/react.createElement(ControlledModal, {
|
|
18554
18577
|
onClose: onClose,
|
|
18555
18578
|
ariaHideApp: false,
|
|
18556
18579
|
scrollable: true,
|
|
18557
18580
|
isOpen: true
|
|
18558
|
-
}, /*#__PURE__*/react.createElement(ModalComponent,
|
|
18581
|
+
}, /*#__PURE__*/react.createElement(ModalComponent, {
|
|
18582
|
+
isSomePlanDeferred: isSomePlanDeferred
|
|
18583
|
+
}, status === apiStatus.PENDING && /*#__PURE__*/react.createElement("div", {
|
|
18559
18584
|
className: s$8.loader
|
|
18560
18585
|
}, /*#__PURE__*/react.createElement(LoadingIndicator, null)), status === apiStatus.SUCCESS && eligiblePlans.length === 0 && /*#__PURE__*/react.createElement("div", {
|
|
18561
18586
|
className: s$8.noEligibility
|
|
18562
18587
|
}, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
18563
18588
|
id: "eligibility-modal.no-eligibility",
|
|
18564
|
-
defaultMessage: "Oups, il semblerait que la simulation n'
|
|
18589
|
+
defaultMessage: "Oups, il semblerait que la simulation n'ait pas fonctionn\xE9."
|
|
18565
18590
|
})), status === apiStatus.SUCCESS && eligiblePlans.length >= 1 && /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(EligibilityPlansButtons, {
|
|
18566
18591
|
eligibilityPlans: eligiblePlans,
|
|
18567
18592
|
currentPlanIndex: currentPlanIndex,
|