@alma/widgets 2.11.0 → 2.12.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/README.md +0 -15
- package/dist/raw/widgets.css +1 -1
- package/dist/raw/widgets.js +53 -22
- package/dist/raw/widgets.js.map +1 -1
- package/dist/raw/widgets.m.js +53 -22
- package/dist/raw/widgets.m.js.map +1 -1
- package/dist/raw/widgets.modern.js +53 -22
- package/dist/raw/widgets.modern.js.map +1 -1
- package/dist/raw/widgets.umd.js +53 -22
- package/dist/raw/widgets.umd.js.map +1 -1
- package/dist/types/Widgets/EligibilityModal/__tests__/Schedule.test.d.ts +1 -0
- package/dist/types/Widgets/EligibilityModal/classNames.const.d.ts +3 -0
- package/dist/types/Widgets/PaymentPlans/__tests__/PaymentPlanContainer.test.d.ts +1 -0
- package/dist/types/Widgets/PaymentPlans/index.d.ts +1 -1
- package/dist/types/types.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/widgets.css +1 -1
- 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
|
@@ -1531,6 +1531,7 @@
|
|
|
1531
1531
|
Locale["it"] = "it";
|
|
1532
1532
|
Locale["es"] = "es";
|
|
1533
1533
|
Locale["nl"] = "nl";
|
|
1534
|
+
Locale["pt"] = "pt";
|
|
1534
1535
|
Locale["nl-NL"] = "nl-NL";
|
|
1535
1536
|
Locale["nl-BE"] = "nl-BE";
|
|
1536
1537
|
})(Locale || (Locale = {}));
|
|
@@ -1544,6 +1545,7 @@
|
|
|
1544
1545
|
function formatCents(cents) {
|
|
1545
1546
|
return String(priceFromCents(cents)).replace('.', ',');
|
|
1546
1547
|
}
|
|
1548
|
+
var desktopWidth = 800;
|
|
1547
1549
|
|
|
1548
1550
|
/* eslint-disable */
|
|
1549
1551
|
|
|
@@ -6707,7 +6709,7 @@
|
|
|
6707
6709
|
var messagesDE = {
|
|
6708
6710
|
"eligibility-modal.bullet-1": "Wählen Sie an der Kasse <strong>Alma</strong> .",
|
|
6709
6711
|
"eligibility-modal.bullet-2": "Füllen Sie die <strong>angeforderten</strong> Informationen aus.",
|
|
6710
|
-
"eligibility-modal.bullet-3": "Die Bestätigung Ihrer Zahlung <strong>sofort</strong> !",
|
|
6712
|
+
"eligibility-modal.bullet-3": "Die Bestätigung Ihrer Zahlung erfolgt <strong>sofort</strong> !",
|
|
6711
6713
|
"eligibility-modal.cost": "Davon Kosten",
|
|
6712
6714
|
"eligibility-modal.credit-commitment": "Ein Kredit verpflichtet Sie und muss zurückgezahlt werden. Prüfen Sie Ihre Rückzahlungsfähigkeit, bevor Sie sich verpflichten.",
|
|
6713
6715
|
"eligibility-modal.credit-cost": "Davon Kreditkosten",
|
|
@@ -6730,7 +6732,7 @@
|
|
|
6730
6732
|
var messagesEN = {
|
|
6731
6733
|
"eligibility-modal.bullet-1": "Choose <strong>Alma</strong> at checkout.",
|
|
6732
6734
|
"eligibility-modal.bullet-2": "Fill in the <strong>information</strong> requested.",
|
|
6733
|
-
"eligibility-modal.bullet-3": "
|
|
6735
|
+
"eligibility-modal.bullet-3": "The validation of your payment is <strong>instantaneous</strong> !",
|
|
6734
6736
|
"eligibility-modal.cost": "Of which costs",
|
|
6735
6737
|
"eligibility-modal.credit-commitment": "A loan commits you and must be repaid. Check your ability to repay before committing yourself.",
|
|
6736
6738
|
"eligibility-modal.credit-cost": "Of which cost of credit",
|
|
@@ -6753,7 +6755,7 @@
|
|
|
6753
6755
|
var messagesES = {
|
|
6754
6756
|
"eligibility-modal.bullet-1": "Elige <strong>Alma</strong> como método de pago.",
|
|
6755
6757
|
"eligibility-modal.bullet-2": "Completa la <strong>información</strong> solicitada.",
|
|
6756
|
-
"eligibility-modal.bullet-3": "¡
|
|
6758
|
+
"eligibility-modal.bullet-3": "¡La validación de su pago es <strong>instantánea</strong> !",
|
|
6757
6759
|
"eligibility-modal.cost": "Gastos (incl. en el total)",
|
|
6758
6760
|
"eligibility-modal.credit-commitment": "Un préstamo te compromete y debe ser devuelto. Comprueba tu capacidad financiera antes de comprometerte.",
|
|
6759
6761
|
"eligibility-modal.credit-cost": "Coste de crédito (incl. en el total)",
|
|
@@ -6776,7 +6778,7 @@
|
|
|
6776
6778
|
var messagesFR = {
|
|
6777
6779
|
"eligibility-modal.bullet-1": "Choisissez <strong>Alma</strong> au moment du paiement.",
|
|
6778
6780
|
"eligibility-modal.bullet-2": "Renseignez les <strong>informations</strong> demandées.",
|
|
6779
|
-
"eligibility-modal.bullet-3": "La validation de votre paiement <strong>instantanée</strong> !",
|
|
6781
|
+
"eligibility-modal.bullet-3": "La validation de votre paiement est <strong>instantanée</strong> !",
|
|
6780
6782
|
"eligibility-modal.cost": "Dont frais",
|
|
6781
6783
|
"eligibility-modal.credit-commitment": "Un crédit vous engage et doit être remboursé. Vérifiez vos capacités de remboursement avant de vous engager.",
|
|
6782
6784
|
"eligibility-modal.credit-cost": "Dont coût du crédit",
|
|
@@ -6799,7 +6801,7 @@
|
|
|
6799
6801
|
var messagesIT = {
|
|
6800
6802
|
"eligibility-modal.bullet-1": "Scegli <strong>Alma</strong> alla cassa.",
|
|
6801
6803
|
"eligibility-modal.bullet-2": "Compila le informazioni <strong></strong> richieste.",
|
|
6802
|
-
"eligibility-modal.bullet-3": "
|
|
6804
|
+
"eligibility-modal.bullet-3": "La convalida del pagamento è <strong>istantanea</strong> !",
|
|
6803
6805
|
"eligibility-modal.cost": "Di cui commissioni",
|
|
6804
6806
|
"eligibility-modal.credit-commitment": "Un pagamento rateale ti impegna e deve essere ripagato. Verifica la tua capacità di rimborso prima di impegnarti.",
|
|
6805
6807
|
"eligibility-modal.credit-cost": "Di cui commissioni",
|
|
@@ -6822,24 +6824,47 @@
|
|
|
6822
6824
|
var messagesNL = {
|
|
6823
6825
|
"eligibility-modal.bullet-1": "Kies <strong>Alma</strong> bij het afrekenen.",
|
|
6824
6826
|
"eligibility-modal.bullet-2": "Vul de <strong>gevraagde informatie</strong> in.",
|
|
6825
|
-
"eligibility-modal.bullet-3": "
|
|
6827
|
+
"eligibility-modal.bullet-3": "De validatie van uw betaling is <strong>onmiddellijk</strong> !",
|
|
6826
6828
|
"eligibility-modal.cost": "Waarvan kosten",
|
|
6827
6829
|
"eligibility-modal.credit-commitment": "Een lening bindt je en moet worden terugbetaald. Ga na of u kunt terugbetalen voordat u zich vastlegt.",
|
|
6828
6830
|
"eligibility-modal.credit-cost": "Waarvan kosten van krediet",
|
|
6829
|
-
"eligibility-modal.credit-cost-amount": "{creditCost} (
|
|
6831
|
+
"eligibility-modal.credit-cost-amount": "{creditCost} (gemiddeld rente percentage {TAEG})",
|
|
6830
6832
|
"eligibility-modal.no-eligibility": "Oeps, het lijkt erop dat de simulatie niet werkte.",
|
|
6831
|
-
"eligibility-modal.title": "<highlighted>Betaal in termijnen</highlighted> met kredietkaart bij Alma.",
|
|
6832
|
-
"eligibility-modal.title-deferred": "<highlighted>Betaal in termijnen</highlighted> of later per
|
|
6833
|
+
"eligibility-modal.title": "<highlighted>Betaal in termijnen</highlighted> met bank- en kredietkaart bij Alma.",
|
|
6834
|
+
"eligibility-modal.title-deferred": "<highlighted>Betaal in termijnen</highlighted> of later per bank- en kredietkaart met Alma.",
|
|
6833
6835
|
"eligibility-modal.total": "Totaal",
|
|
6834
6836
|
"installments.today": "Tegenwoordig",
|
|
6835
|
-
"payment-plan-strings.day-abbreviation": "
|
|
6837
|
+
"payment-plan-strings.day-abbreviation": "D{numberOfDeferredDays}",
|
|
6836
6838
|
"payment-plan-strings.default-message": "Betaal in termijnen met Alma",
|
|
6837
6839
|
"payment-plan-strings.deferred": "{totalAmount} te betalen op {dueDate}",
|
|
6838
6840
|
"payment-plan-strings.ineligible-greater-than-max": "Tot {maxAmount}",
|
|
6839
6841
|
"payment-plan-strings.ineligible-lower-than-min": "Van {minAmount}",
|
|
6840
6842
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
6841
6843
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
6842
|
-
"payment-plan-strings.no-fee": "(
|
|
6844
|
+
"payment-plan-strings.no-fee": "(zonder kosten)"
|
|
6845
|
+
};
|
|
6846
|
+
|
|
6847
|
+
var messagesPT = {
|
|
6848
|
+
"eligibility-modal.bullet-1": "Escolha a <strong>Alma</strong> no checkout.",
|
|
6849
|
+
"eligibility-modal.bullet-2": "Preencha os <strong>dados</strong> solicitados.",
|
|
6850
|
+
"eligibility-modal.bullet-3": "A validação do seu pagamento é <strong>instantaneamente</strong> !",
|
|
6851
|
+
"eligibility-modal.cost": "Incluindo encargos",
|
|
6852
|
+
"eligibility-modal.credit-commitment": "Um crédito é um compromisso e deve ser reembolsado. Verifique a sua capacidade de pagar antes de se comprometer.",
|
|
6853
|
+
"eligibility-modal.credit-cost": "Incluindo custo do crédito",
|
|
6854
|
+
"eligibility-modal.credit-cost-amount": "{creditCost} (TAEG {TAEG})",
|
|
6855
|
+
"eligibility-modal.no-eligibility": "Ups, parece que a simulação não funcionou.",
|
|
6856
|
+
"eligibility-modal.title": "<highlighted>Pague em prestações</highlighted> com cartão bancário através da Alma.",
|
|
6857
|
+
"eligibility-modal.title-deferred": "<highlighted>Pague em prestações</highlighted> ou mais tarde com cartão bancário através da Alma.",
|
|
6858
|
+
"eligibility-modal.total": "Total",
|
|
6859
|
+
"installments.today": "Hoje",
|
|
6860
|
+
"payment-plan-strings.day-abbreviation": "D{numberOfDeferredDays}",
|
|
6861
|
+
"payment-plan-strings.default-message": "Pague em prestações através da Alma",
|
|
6862
|
+
"payment-plan-strings.deferred": "{totalAmount} a pagar em {dueDate}",
|
|
6863
|
+
"payment-plan-strings.ineligible-greater-than-max": "Até {maxAmount}",
|
|
6864
|
+
"payment-plan-strings.ineligible-lower-than-min": "A partir de {minAmount}",
|
|
6865
|
+
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
6866
|
+
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
6867
|
+
"payment-plan-strings.no-fee": "(sem encargos)"
|
|
6843
6868
|
};
|
|
6844
6869
|
|
|
6845
6870
|
var getTranslationsByLocale = function getTranslationsByLocale(locale) {
|
|
@@ -6856,6 +6881,9 @@
|
|
|
6856
6881
|
case Locale.de:
|
|
6857
6882
|
return messagesDE;
|
|
6858
6883
|
|
|
6884
|
+
case Locale.pt:
|
|
6885
|
+
return messagesPT;
|
|
6886
|
+
|
|
6859
6887
|
case Locale.nl:
|
|
6860
6888
|
case Locale['nl-BE']:
|
|
6861
6889
|
case Locale['nl-NL']:
|
|
@@ -17187,7 +17215,10 @@
|
|
|
17187
17215
|
*/
|
|
17188
17216
|
|
|
17189
17217
|
var STATIC_CUSTOMISATION_CLASSES = {
|
|
17218
|
+
desktopModal: prefix + '-desktop-modal',
|
|
17219
|
+
mobileModal: prefix + '-mobile-modal',
|
|
17190
17220
|
leftSide: prefix + '-left-side',
|
|
17221
|
+
bullet: prefix + '-bullet',
|
|
17191
17222
|
rightSide: prefix + '-right-side',
|
|
17192
17223
|
title: prefix + '-title',
|
|
17193
17224
|
info: prefix + '-info',
|
|
@@ -19851,11 +19882,11 @@
|
|
|
19851
19882
|
|
|
19852
19883
|
var Schedule = function Schedule(_ref) {
|
|
19853
19884
|
var currentPlan = _ref.currentPlan;
|
|
19854
|
-
var total =
|
|
19855
|
-
var creditCost =
|
|
19885
|
+
var total = priceFromCents(currentPlan.purchase_amount + currentPlan.customer_total_cost_amount);
|
|
19886
|
+
var creditCost = priceFromCents(currentPlan.customer_total_cost_amount);
|
|
19856
19887
|
var TAEG = (currentPlan == null ? void 0 : currentPlan.annual_interest_rate) && currentPlan.annual_interest_rate / 10000;
|
|
19857
|
-
var customerFees = priceFromCents(currentPlan
|
|
19858
|
-
var isCredit = currentPlan
|
|
19888
|
+
var customerFees = priceFromCents(currentPlan.customer_total_cost_amount);
|
|
19889
|
+
var isCredit = currentPlan.installments_count > 4;
|
|
19859
19890
|
var intl = useIntl();
|
|
19860
19891
|
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
|
19861
19892
|
className: classnames(s$3.schedule, STATIC_CUSTOMISATION_CLASSES.scheduleDetails),
|
|
@@ -20104,7 +20135,7 @@
|
|
|
20104
20135
|
}, /*#__PURE__*/react.createElement("div", {
|
|
20105
20136
|
className: s$5.listItem
|
|
20106
20137
|
}, /*#__PURE__*/react.createElement("div", {
|
|
20107
|
-
className: s$5.bullet
|
|
20138
|
+
className: classnames(s$5.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
20108
20139
|
}, "1"), /*#__PURE__*/react.createElement("div", {
|
|
20109
20140
|
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
20110
20141
|
}, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
@@ -20118,7 +20149,7 @@
|
|
|
20118
20149
|
}))), /*#__PURE__*/react.createElement("div", {
|
|
20119
20150
|
className: s$5.listItem
|
|
20120
20151
|
}, /*#__PURE__*/react.createElement("div", {
|
|
20121
|
-
className: s$5.bullet
|
|
20152
|
+
className: classnames(s$5.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
20122
20153
|
}, "2"), /*#__PURE__*/react.createElement("div", {
|
|
20123
20154
|
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
20124
20155
|
}, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
@@ -20132,12 +20163,12 @@
|
|
|
20132
20163
|
}))), /*#__PURE__*/react.createElement("div", {
|
|
20133
20164
|
className: s$5.listItem
|
|
20134
20165
|
}, /*#__PURE__*/react.createElement("div", {
|
|
20135
|
-
className: s$5.bullet
|
|
20166
|
+
className: classnames(s$5.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
20136
20167
|
}, "3"), /*#__PURE__*/react.createElement("div", {
|
|
20137
20168
|
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
20138
20169
|
}, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
20139
20170
|
id: "eligibility-modal.bullet-3",
|
|
20140
|
-
defaultMessage: "La validation de votre paiement <strong>instantan\xE9e</strong> !",
|
|
20171
|
+
defaultMessage: "La validation de votre paiement est <strong>instantan\xE9e</strong> !",
|
|
20141
20172
|
values: {
|
|
20142
20173
|
strong: function strong() {
|
|
20143
20174
|
return /*#__PURE__*/react.createElement("strong", null, [].slice.call(arguments));
|
|
@@ -20231,7 +20262,7 @@
|
|
|
20231
20262
|
isSomePlanDeferred = _ref.isSomePlanDeferred,
|
|
20232
20263
|
cards = _ref.cards;
|
|
20233
20264
|
return /*#__PURE__*/react.createElement("div", {
|
|
20234
|
-
className: s$8.container,
|
|
20265
|
+
className: classnames(s$8.container, STATIC_CUSTOMISATION_CLASSES.desktopModal),
|
|
20235
20266
|
"data-testid": "modal-container"
|
|
20236
20267
|
}, /*#__PURE__*/react.createElement("div", {
|
|
20237
20268
|
className: classnames([s$8.block, s$8.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
|
|
@@ -20253,7 +20284,7 @@
|
|
|
20253
20284
|
isSomePlanDeferred = _ref.isSomePlanDeferred,
|
|
20254
20285
|
cards = _ref.cards;
|
|
20255
20286
|
return /*#__PURE__*/react.createElement("div", {
|
|
20256
|
-
className: s$a.container,
|
|
20287
|
+
className: classnames(s$a.container, STATIC_CUSTOMISATION_CLASSES.mobileModal),
|
|
20257
20288
|
"data-testid": "modal-container"
|
|
20258
20289
|
}, /*#__PURE__*/react.createElement(Title, {
|
|
20259
20290
|
isSomePlanDeferred: isSomePlanDeferred
|
|
@@ -20274,7 +20305,7 @@
|
|
|
20274
20305
|
setCurrentPlanIndex = _useState[1];
|
|
20275
20306
|
|
|
20276
20307
|
var isBigScreen = reactResponsive.useMediaQuery({
|
|
20277
|
-
minWidth:
|
|
20308
|
+
minWidth: desktopWidth
|
|
20278
20309
|
});
|
|
20279
20310
|
var ModalComponent = isBigScreen ? DesktopModal : MobileModal;
|
|
20280
20311
|
var eligiblePlans = eligibilityPlans.filter(function (plan) {
|