@alma/widgets 3.2.0 → 3.2.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.js +66 -147
- package/dist/raw/widgets.js.map +1 -1
- package/dist/raw/widgets.m.js +66 -147
- package/dist/raw/widgets.m.js.map +1 -1
- package/dist/raw/widgets.modern.js +24 -99
- package/dist/raw/widgets.modern.js.map +1 -1
- package/dist/raw/widgets.umd.js +66 -147
- package/dist/raw/widgets.umd.js.map +1 -1
- package/dist/types/Widgets/EligibilityModal/DesktopModal/index.d.ts +2 -4
- package/dist/types/Widgets/EligibilityModal/MobileModal/index.d.ts +2 -4
- package/dist/types/Widgets/EligibilityModal/components/Info/index.d.ts +1 -3
- package/dist/types/utils/index.d.ts +0 -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
|
@@ -1551,9 +1551,6 @@
|
|
|
1551
1551
|
return String(priceFromCents(cents)).replace('.', ',');
|
|
1552
1552
|
}
|
|
1553
1553
|
var desktopWidth = 800;
|
|
1554
|
-
var isP1X = function isP1X(plan) {
|
|
1555
|
-
return (plan == null ? void 0 : plan.installments_count) === 1 && (plan == null ? void 0 : plan.deferred_days) === 0 && (plan == null ? void 0 : plan.deferred_months) === 0;
|
|
1556
|
-
};
|
|
1557
1554
|
|
|
1558
1555
|
/* eslint-disable */
|
|
1559
1556
|
|
|
@@ -6722,9 +6719,6 @@
|
|
|
6722
6719
|
"eligibility-modal.bullet-2": "Lassen Sie sich führen und bestätigen Sie Ihre Zahlung in <strong>2 Minuten.</strong>",
|
|
6723
6720
|
"eligibility-modal.bullet-3": "<strong>Behalten Sie die Kontrolle</strong> , indem Sie Ihre Fristen in Ihrem eigenen Tempo vor- oder zurückverlegen.",
|
|
6724
6721
|
"eligibility-modal.no-eligibility": "Ups, die Prüfung hat anscheinend nicht funktioniert.",
|
|
6725
|
-
"eligibility-modal.p1x-bullet-1": "Wählen Sie <strong>Alma - 1X</strong> bei der Bezahlung.",
|
|
6726
|
-
"eligibility-modal.p1x-bullet-2": "Füllen Sie die Informationen auf Ihrer <strong>Kreditkarte aus.</strong>",
|
|
6727
|
-
"eligibility-modal.p1x-bullet-3": "<strong>Die Bestätigung </strong> Ihrer Zahlung erfolgt sofort!",
|
|
6728
6722
|
"eligibility-modal.title-deferred-plan": "Zahlen Sie mit Alma in Raten oder später.",
|
|
6729
6723
|
"eligibility-modal.title-normal": "Zahlen Sie mit Alma in mehreren Raten.",
|
|
6730
6724
|
"installments.today": "Heute",
|
|
@@ -6737,8 +6731,7 @@
|
|
|
6737
6731
|
"payment-plan-strings.ineligible-lower-than-min": "Ab {minAmount}",
|
|
6738
6732
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
6739
6733
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
6740
|
-
"payment-plan-strings.no-fee": "(0% Finanzierung)"
|
|
6741
|
-
"payment-plan-strings.pay-now": "Bezahlen Sie jetzt {totalAmount}"
|
|
6734
|
+
"payment-plan-strings.no-fee": "(0% Finanzierung)"
|
|
6742
6735
|
};
|
|
6743
6736
|
|
|
6744
6737
|
var messagesEN = {
|
|
@@ -6749,9 +6742,6 @@
|
|
|
6749
6742
|
"eligibility-modal.bullet-2": "Let us guide you and validate your payment in <strong>2 minutes.</strong>",
|
|
6750
6743
|
"eligibility-modal.bullet-3": "<strong>Stay in control</strong> by moving your deadlines forward or backward at your own pace.",
|
|
6751
6744
|
"eligibility-modal.no-eligibility": "Oops, looks like the simulation didn't work.",
|
|
6752
|
-
"eligibility-modal.p1x-bullet-1": "Choose <strong>Alma - 1X</strong> at checkout.",
|
|
6753
|
-
"eligibility-modal.p1x-bullet-2": "Fill in your <strong>credit card information.</strong>",
|
|
6754
|
-
"eligibility-modal.p1x-bullet-3": "<strong>The validation </strong> of your payment is instantaneous!",
|
|
6755
6745
|
"eligibility-modal.title-deferred-plan": "Pay in installments or later by credit card with Alma.",
|
|
6756
6746
|
"eligibility-modal.title-normal": "Pay in installments by credit card with Alma.",
|
|
6757
6747
|
"installments.today": "Today",
|
|
@@ -6764,8 +6754,7 @@
|
|
|
6764
6754
|
"payment-plan-strings.ineligible-lower-than-min": "From {minAmount}",
|
|
6765
6755
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
6766
6756
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
6767
|
-
"payment-plan-strings.no-fee": "(free of charge)"
|
|
6768
|
-
"payment-plan-strings.pay-now": "Pay now {totalAmount}"
|
|
6757
|
+
"payment-plan-strings.no-fee": "(free of charge)"
|
|
6769
6758
|
};
|
|
6770
6759
|
|
|
6771
6760
|
var messagesES = {
|
|
@@ -6776,9 +6765,6 @@
|
|
|
6776
6765
|
"eligibility-modal.bullet-2": "Déjese guiar y valide su pago en <strong>2 minutos.</strong>",
|
|
6777
6766
|
"eligibility-modal.bullet-3": "<strong>Mantenga el control</strong> adelantando o retrasando los plazos a su propio ritmo.",
|
|
6778
6767
|
"eligibility-modal.no-eligibility": "Uy, parece que la simulación no ha funcionado.",
|
|
6779
|
-
"eligibility-modal.p1x-bullet-1": "Elija <strong>Alma - 1X</strong> en la caja.",
|
|
6780
|
-
"eligibility-modal.p1x-bullet-2": "Introduzca los datos de su tarjeta de crédito en <strong>.</strong>",
|
|
6781
|
-
"eligibility-modal.p1x-bullet-3": "<strong>¡La validación </strong> de su pago es instantánea!",
|
|
6782
6768
|
"eligibility-modal.title-deferred-plan": "Paga a plazos o posteriormente con tarjeta bancaria con Alma.",
|
|
6783
6769
|
"eligibility-modal.title-normal": "Pagar a plazos con tarjeta bancaria con Alma.",
|
|
6784
6770
|
"installments.today": "Hoy",
|
|
@@ -6791,8 +6777,7 @@
|
|
|
6791
6777
|
"payment-plan-strings.ineligible-lower-than-min": "Desde {minAmount}",
|
|
6792
6778
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} mensualidad de {othersInstallmentAmount}} other {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} mensualidades de {othersInstallmentAmount}}}",
|
|
6793
6779
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} plazos de {totalAmount}",
|
|
6794
|
-
"payment-plan-strings.no-fee": "(sin intereses)"
|
|
6795
|
-
"payment-plan-strings.pay-now": "Pague ahora {totalAmount}"
|
|
6780
|
+
"payment-plan-strings.no-fee": "(sin intereses)"
|
|
6796
6781
|
};
|
|
6797
6782
|
|
|
6798
6783
|
var messagesFR = {
|
|
@@ -6803,9 +6788,6 @@
|
|
|
6803
6788
|
"eligibility-modal.bullet-2": "Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",
|
|
6804
6789
|
"eligibility-modal.bullet-3": "<strong>Gardez le contrôle</strong> en avançant ou reculant vos échéances à votre rythme.",
|
|
6805
6790
|
"eligibility-modal.no-eligibility": "Oups, il semblerait que la simulation n'ait pas fonctionné.",
|
|
6806
|
-
"eligibility-modal.p1x-bullet-1": "Choisissez <strong>Alma - 1X</strong> au moment du paiement.",
|
|
6807
|
-
"eligibility-modal.p1x-bullet-2": "Renseignez les informations de votre <strong>carte bancaire.</strong>",
|
|
6808
|
-
"eligibility-modal.p1x-bullet-3": "<strong>La validation </strong> de votre paiement est instantanée !",
|
|
6809
6791
|
"eligibility-modal.title-deferred-plan": "Payez en plusieurs fois ou plus tard par carte bancaire avec Alma.",
|
|
6810
6792
|
"eligibility-modal.title-normal": "Payez en plusieurs fois par carte bancaire avec Alma.",
|
|
6811
6793
|
"installments.today": "Aujourd'hui",
|
|
@@ -6818,8 +6800,7 @@
|
|
|
6818
6800
|
"payment-plan-strings.ineligible-lower-than-min": "À partir de {minAmount}",
|
|
6819
6801
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
6820
6802
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
6821
|
-
"payment-plan-strings.no-fee": "(sans frais)"
|
|
6822
|
-
"payment-plan-strings.pay-now": "Payez maintenant {totalAmount}"
|
|
6803
|
+
"payment-plan-strings.no-fee": "(sans frais)"
|
|
6823
6804
|
};
|
|
6824
6805
|
|
|
6825
6806
|
var messagesIT = {
|
|
@@ -6830,9 +6811,6 @@
|
|
|
6830
6811
|
"eligibility-modal.bullet-2": "Lasciatevi guidare e convalidate il pagamento in <strong>2 minuti.</strong>",
|
|
6831
6812
|
"eligibility-modal.bullet-3": "<strong>Mantenete il controllo</strong> spostando le scadenze in avanti o indietro al vostro ritmo.",
|
|
6832
6813
|
"eligibility-modal.no-eligibility": "Ops, sembra che qualcosa non abbia funzionato.",
|
|
6833
|
-
"eligibility-modal.p1x-bullet-1": "Scegliere <strong>Alma - 1X</strong> alla cassa.",
|
|
6834
|
-
"eligibility-modal.p1x-bullet-2": "Compilare i dati della carta di credito <strong>.</strong>",
|
|
6835
|
-
"eligibility-modal.p1x-bullet-3": "<strong>La convalida </strong> del vostro pagamento è istantanea!",
|
|
6836
6814
|
"eligibility-modal.title-deferred-plan": "Paga a rate o posticipa il pagamento con Alma, senza registrazione.",
|
|
6837
6815
|
"eligibility-modal.title-normal": "Paga a rate con Alma, senza registrazione.",
|
|
6838
6816
|
"installments.today": "Oggi",
|
|
@@ -6845,8 +6823,7 @@
|
|
|
6845
6823
|
"payment-plan-strings.ineligible-lower-than-min": "Pagamento rateale disponibile a partire da {minAmount}",
|
|
6846
6824
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {Oggi paghi {firstInstallmentAmount} poi tra {numberOfRemainingInstallments} mese {othersInstallmentAmount}} other {Oggi paghi {firstInstallmentAmount} poi {numberOfRemainingInstallments} rate mensili di {othersInstallmentAmount}}}",
|
|
6847
6825
|
"payment-plan-strings.multiple-installments-same-amount": "In {installmentsCount} rate mensili di {totalAmount}",
|
|
6848
|
-
"payment-plan-strings.no-fee": "(senza interessi)"
|
|
6849
|
-
"payment-plan-strings.pay-now": "Paga ora {totalAmount}"
|
|
6826
|
+
"payment-plan-strings.no-fee": "(senza interessi)"
|
|
6850
6827
|
};
|
|
6851
6828
|
|
|
6852
6829
|
var messagesNL = {
|
|
@@ -6857,9 +6834,6 @@
|
|
|
6857
6834
|
"eligibility-modal.bullet-2": "Laat ons u begeleiden en uw betaling valideren in <strong>2 minuten.</strong>",
|
|
6858
6835
|
"eligibility-modal.bullet-3": "<strong>Houd de controle op</strong> door uw deadlines in uw eigen tempo vooruit of achteruit te schuiven.",
|
|
6859
6836
|
"eligibility-modal.no-eligibility": "Oeps, het lijkt erop dat de simulatie niet werkte.",
|
|
6860
|
-
"eligibility-modal.p1x-bullet-1": "Kies <strong>Alma - 1X</strong> bij het afrekenen.",
|
|
6861
|
-
"eligibility-modal.p1x-bullet-2": "Vul uw <strong>creditcardgegevens in.</strong>",
|
|
6862
|
-
"eligibility-modal.p1x-bullet-3": "<strong>De validatie </strong> van uw betaling is onmiddellijk!",
|
|
6863
6837
|
"eligibility-modal.title-deferred-plan": "Betaal in termijnen of later per creditcard met Alma.",
|
|
6864
6838
|
"eligibility-modal.title-normal": "Betaal in termijnen met een creditcard bij Alma.",
|
|
6865
6839
|
"installments.today": "Tegenwoordig",
|
|
@@ -6872,8 +6846,7 @@
|
|
|
6872
6846
|
"payment-plan-strings.ineligible-lower-than-min": "Van {minAmount}",
|
|
6873
6847
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
6874
6848
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
6875
|
-
"payment-plan-strings.no-fee": "(zonder kosten)"
|
|
6876
|
-
"payment-plan-strings.pay-now": "Betaal nu {totalAmount}"
|
|
6849
|
+
"payment-plan-strings.no-fee": "(zonder kosten)"
|
|
6877
6850
|
};
|
|
6878
6851
|
|
|
6879
6852
|
var messagesPT = {
|
|
@@ -6884,9 +6857,6 @@
|
|
|
6884
6857
|
"eligibility-modal.bullet-2": "Deixe-nos guiá-lo e validar o seu pagamento em <strong>2 minutos.</strong>",
|
|
6885
6858
|
"eligibility-modal.bullet-3": "<strong>Mantenha-se em controlo</strong> avançando ou recuando os seus prazos ao seu próprio ritmo.",
|
|
6886
6859
|
"eligibility-modal.no-eligibility": "Ups, parece que a simulação não funcionou.",
|
|
6887
|
-
"eligibility-modal.p1x-bullet-1": "Escolher <strong>Alma - 1X</strong> no checkout.",
|
|
6888
|
-
"eligibility-modal.p1x-bullet-2": "Preencha as informações do seu <strong>cartão de crédito.</strong>",
|
|
6889
|
-
"eligibility-modal.p1x-bullet-3": "<strong>A validação </strong> do seu pagamento é instantânea!",
|
|
6890
6860
|
"eligibility-modal.title-deferred-plan": "Pagar em prestações ou mais tarde por cartão de crédito com Alma.",
|
|
6891
6861
|
"eligibility-modal.title-normal": "Pagar em prestações por cartão de crédito com Alma.",
|
|
6892
6862
|
"installments.today": "Hoje",
|
|
@@ -6899,8 +6869,7 @@
|
|
|
6899
6869
|
"payment-plan-strings.ineligible-lower-than-min": "A partir de {minAmount}",
|
|
6900
6870
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
6901
6871
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
6902
|
-
"payment-plan-strings.no-fee": "(sem encargos)"
|
|
6903
|
-
"payment-plan-strings.pay-now": "Pague agora {totalAmount}"
|
|
6872
|
+
"payment-plan-strings.no-fee": "(sem encargos)"
|
|
6904
6873
|
};
|
|
6905
6874
|
|
|
6906
6875
|
var getTranslationsByLocale = function getTranslationsByLocale(locale) {
|
|
@@ -14987,13 +14956,17 @@
|
|
|
14987
14956
|
};
|
|
14988
14957
|
|
|
14989
14958
|
var filterELigibility = function filterELigibility(eligibilities, configPlans) {
|
|
14990
|
-
//
|
|
14959
|
+
// Remove p1x
|
|
14960
|
+
var filteredEligibilityPlans = eligibilities.filter(function (plan) {
|
|
14961
|
+
return !(plan.installments_count === 1 && plan.deferred_days === 0 && plan.deferred_months === 0);
|
|
14962
|
+
}); // If no configPlans was provided, return eligibility response
|
|
14963
|
+
|
|
14991
14964
|
if (!configPlans) {
|
|
14992
|
-
return
|
|
14965
|
+
return filteredEligibilityPlans;
|
|
14993
14966
|
} // Else check if the plan is eligible regarding the related configPlan
|
|
14994
14967
|
|
|
14995
14968
|
|
|
14996
|
-
return
|
|
14969
|
+
return filteredEligibilityPlans.map(function (plan) {
|
|
14997
14970
|
var eligibilityDeferredDays = (plan.deferred_months ? plan.deferred_months : 0) * 30 + (plan.deferred_days ? plan.deferred_days : 0); // find the related configPlan
|
|
14998
14971
|
|
|
14999
14972
|
var relatedConfigPlan = configPlans.find(function (configPlan) {
|
|
@@ -19839,8 +19812,7 @@
|
|
|
19839
19812
|
installmentsCount = payment.installments_count;
|
|
19840
19813
|
var deferredDaysCount = deferred_days + deferred_months * 30;
|
|
19841
19814
|
|
|
19842
|
-
if (installmentsCount === 1
|
|
19843
|
-
// For now there is no distinction between deferred days and deferred months, it will be J+ anyway
|
|
19815
|
+
if (installmentsCount === 1) {
|
|
19844
19816
|
return /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
19845
19817
|
id: "payment-plan-strings.day-abbreviation",
|
|
19846
19818
|
defaultMessage: "J{numberOfDeferredDays}",
|
|
@@ -19929,21 +19901,6 @@
|
|
|
19929
19901
|
return index === 0 || installment.total_amount === payment_plan[0].total_amount;
|
|
19930
19902
|
});
|
|
19931
19903
|
|
|
19932
|
-
if (isP1X(payment)) {
|
|
19933
|
-
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
19934
|
-
id: "payment-plan-strings.pay-now",
|
|
19935
|
-
defaultMessage: "Payez maintenant {totalAmount}",
|
|
19936
|
-
values: {
|
|
19937
|
-
totalAmount: /*#__PURE__*/react.createElement(FormattedNumber, {
|
|
19938
|
-
value: priceFromCents(payment_plan[0].total_amount),
|
|
19939
|
-
style: "currency",
|
|
19940
|
-
currency: "EUR"
|
|
19941
|
-
}),
|
|
19942
|
-
installmentsCount: installmentsCount
|
|
19943
|
-
}
|
|
19944
|
-
}), withNoFee(payment));
|
|
19945
|
-
}
|
|
19946
|
-
|
|
19947
19904
|
if (areInstallmentsOfSameAmount) {
|
|
19948
19905
|
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
19949
19906
|
id: "payment-plan-strings.multiple-installments-same-amount",
|
|
@@ -20250,82 +20207,53 @@
|
|
|
20250
20207
|
|
|
20251
20208
|
var s$7 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
|
|
20252
20209
|
|
|
20253
|
-
var Info = function Info(
|
|
20254
|
-
|
|
20255
|
-
|
|
20256
|
-
|
|
20257
|
-
|
|
20258
|
-
|
|
20259
|
-
|
|
20260
|
-
|
|
20261
|
-
|
|
20262
|
-
|
|
20263
|
-
|
|
20264
|
-
|
|
20265
|
-
|
|
20266
|
-
|
|
20267
|
-
|
|
20268
|
-
|
|
20269
|
-
defaultMessage: "Choisissez <strong>Alma - 1X</strong> au moment du paiement.",
|
|
20270
|
-
values: {
|
|
20271
|
-
strong: function strong() {
|
|
20272
|
-
return /*#__PURE__*/react.createElement("strong", null, [].slice.call(arguments));
|
|
20273
|
-
}
|
|
20274
|
-
}
|
|
20275
|
-
}) : /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
20276
|
-
id: "eligibility-modal.bullet-1",
|
|
20277
|
-
defaultMessage: "Choisissez <strong>Alma</strong> au moment du paiement.",
|
|
20278
|
-
values: {
|
|
20279
|
-
strong: function strong() {
|
|
20280
|
-
return /*#__PURE__*/react.createElement("strong", null, [].slice.call(arguments));
|
|
20281
|
-
}
|
|
20282
|
-
}
|
|
20283
|
-
}))), /*#__PURE__*/react.createElement("div", {
|
|
20284
|
-
className: s$7.listItem
|
|
20285
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
20286
|
-
className: classnames(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
20287
|
-
}, "2"), /*#__PURE__*/react.createElement("div", {
|
|
20288
|
-
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
20289
|
-
}, isCurrentPlanP1X ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
20290
|
-
id: "eligibility-modal.p1x-bullet-2",
|
|
20291
|
-
defaultMessage: "Renseignez les informations de votre <strong>carte bancaire.</strong>",
|
|
20292
|
-
values: {
|
|
20293
|
-
strong: function strong() {
|
|
20294
|
-
return /*#__PURE__*/react.createElement("strong", null, [].slice.call(arguments));
|
|
20295
|
-
}
|
|
20296
|
-
}
|
|
20297
|
-
}) : /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
20298
|
-
id: "eligibility-modal.bullet-2",
|
|
20299
|
-
defaultMessage: "Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",
|
|
20300
|
-
values: {
|
|
20301
|
-
strong: function strong() {
|
|
20302
|
-
return /*#__PURE__*/react.createElement("strong", null, [].slice.call(arguments));
|
|
20303
|
-
}
|
|
20210
|
+
var Info = function Info() {
|
|
20211
|
+
return /*#__PURE__*/react.createElement("div", {
|
|
20212
|
+
className: classnames(s$7.list, STATIC_CUSTOMISATION_CLASSES.info),
|
|
20213
|
+
"data-testid": "modal-info-element"
|
|
20214
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
20215
|
+
className: s$7.listItem
|
|
20216
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
20217
|
+
className: classnames(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
20218
|
+
}, "1"), /*#__PURE__*/react.createElement("div", {
|
|
20219
|
+
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
20220
|
+
}, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
20221
|
+
id: "eligibility-modal.bullet-1",
|
|
20222
|
+
defaultMessage: "Choisissez <strong>Alma</strong> au moment du paiement.",
|
|
20223
|
+
values: {
|
|
20224
|
+
strong: function strong() {
|
|
20225
|
+
return /*#__PURE__*/react.createElement("strong", null, [].slice.call(arguments));
|
|
20304
20226
|
}
|
|
20305
|
-
}
|
|
20306
|
-
|
|
20307
|
-
|
|
20308
|
-
|
|
20309
|
-
|
|
20310
|
-
|
|
20311
|
-
|
|
20312
|
-
|
|
20313
|
-
|
|
20314
|
-
|
|
20315
|
-
|
|
20316
|
-
|
|
20317
|
-
|
|
20227
|
+
}
|
|
20228
|
+
}))), /*#__PURE__*/react.createElement("div", {
|
|
20229
|
+
className: s$7.listItem
|
|
20230
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
20231
|
+
className: classnames(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
20232
|
+
}, "2"), /*#__PURE__*/react.createElement("div", {
|
|
20233
|
+
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
20234
|
+
}, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
20235
|
+
id: "eligibility-modal.bullet-2",
|
|
20236
|
+
defaultMessage: "Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",
|
|
20237
|
+
values: {
|
|
20238
|
+
strong: function strong() {
|
|
20239
|
+
return /*#__PURE__*/react.createElement("strong", null, [].slice.call(arguments));
|
|
20318
20240
|
}
|
|
20319
|
-
}
|
|
20320
|
-
|
|
20321
|
-
|
|
20322
|
-
|
|
20323
|
-
|
|
20324
|
-
|
|
20325
|
-
|
|
20241
|
+
}
|
|
20242
|
+
}))), /*#__PURE__*/react.createElement("div", {
|
|
20243
|
+
className: s$7.listItem
|
|
20244
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
20245
|
+
className: classnames(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
20246
|
+
}, "3"), /*#__PURE__*/react.createElement("div", {
|
|
20247
|
+
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
20248
|
+
}, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
20249
|
+
id: "eligibility-modal.bullet-3",
|
|
20250
|
+
defaultMessage: "<strong>Gardez le contr\xF4le</strong> en avan\xE7ant ou reculant vos \xE9ch\xE9ances \xE0 votre rythme.",
|
|
20251
|
+
values: {
|
|
20252
|
+
strong: function strong() {
|
|
20253
|
+
return /*#__PURE__*/react.createElement("strong", null, [].slice.call(arguments));
|
|
20326
20254
|
}
|
|
20327
|
-
}
|
|
20328
|
-
);
|
|
20255
|
+
}
|
|
20256
|
+
}))));
|
|
20329
20257
|
};
|
|
20330
20258
|
|
|
20331
20259
|
var s$8 = {"title":"_3ERx-"};
|
|
@@ -20349,8 +20277,7 @@
|
|
|
20349
20277
|
var DesktopModal = function DesktopModal(_ref) {
|
|
20350
20278
|
var children = _ref.children,
|
|
20351
20279
|
isSomePlanDeferred = _ref.isSomePlanDeferred,
|
|
20352
|
-
cards = _ref.cards
|
|
20353
|
-
isCurrentPlanP1X = _ref.isCurrentPlanP1X;
|
|
20280
|
+
cards = _ref.cards;
|
|
20354
20281
|
return /*#__PURE__*/react.createElement("div", {
|
|
20355
20282
|
className: classnames(s$9.container, STATIC_CUSTOMISATION_CLASSES.desktopModal),
|
|
20356
20283
|
"data-testid": "modal-container"
|
|
@@ -20358,9 +20285,7 @@
|
|
|
20358
20285
|
className: classnames([s$9.block, s$9.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
|
|
20359
20286
|
}, /*#__PURE__*/react.createElement(Title, {
|
|
20360
20287
|
isSomePlanDeferred: isSomePlanDeferred
|
|
20361
|
-
}), /*#__PURE__*/react.createElement(Info, {
|
|
20362
|
-
isCurrentPlanP1X: isCurrentPlanP1X
|
|
20363
|
-
}), cards && /*#__PURE__*/react.createElement(Cards, {
|
|
20288
|
+
}), /*#__PURE__*/react.createElement(Info, null), cards && /*#__PURE__*/react.createElement(Cards, {
|
|
20364
20289
|
cards: cards
|
|
20365
20290
|
}), /*#__PURE__*/react.createElement(AlmaLogo, {
|
|
20366
20291
|
className: s$9.logo,
|
|
@@ -20377,16 +20302,13 @@
|
|
|
20377
20302
|
var MobileModal = function MobileModal(_ref) {
|
|
20378
20303
|
var children = _ref.children,
|
|
20379
20304
|
isSomePlanDeferred = _ref.isSomePlanDeferred,
|
|
20380
|
-
cards = _ref.cards
|
|
20381
|
-
isCurrentPlanP1X = _ref.isCurrentPlanP1X;
|
|
20305
|
+
cards = _ref.cards;
|
|
20382
20306
|
return /*#__PURE__*/react.createElement("div", {
|
|
20383
20307
|
className: classnames(s$b.container, STATIC_CUSTOMISATION_CLASSES.mobileModal),
|
|
20384
20308
|
"data-testid": "modal-container"
|
|
20385
20309
|
}, /*#__PURE__*/react.createElement(Title, {
|
|
20386
20310
|
isSomePlanDeferred: isSomePlanDeferred
|
|
20387
|
-
}), children, /*#__PURE__*/react.createElement(Info, {
|
|
20388
|
-
isCurrentPlanP1X: isCurrentPlanP1X
|
|
20389
|
-
}), cards && /*#__PURE__*/react.createElement(Cards, {
|
|
20311
|
+
}), children, /*#__PURE__*/react.createElement(Info, null), cards && /*#__PURE__*/react.createElement(Cards, {
|
|
20390
20312
|
cards: cards
|
|
20391
20313
|
}), /*#__PURE__*/react.createElement(AlmaLogo, {
|
|
20392
20314
|
className: s$b.logo,
|
|
@@ -20423,8 +20345,7 @@
|
|
|
20423
20345
|
isOpen: true
|
|
20424
20346
|
}, /*#__PURE__*/react.createElement(ModalComponent, {
|
|
20425
20347
|
isSomePlanDeferred: isSomePlanDeferred,
|
|
20426
|
-
cards: cards
|
|
20427
|
-
isCurrentPlanP1X: isP1X(currentPlan)
|
|
20348
|
+
cards: cards
|
|
20428
20349
|
}, status === apiStatus.PENDING && /*#__PURE__*/react.createElement("div", {
|
|
20429
20350
|
className: s$a.loader
|
|
20430
20351
|
}, /*#__PURE__*/react.createElement(LoadingIndicator, null)), status === apiStatus.SUCCESS && eligiblePlans.length === 0 && /*#__PURE__*/react.createElement("div", {
|
|
@@ -20541,9 +20462,7 @@
|
|
|
20541
20462
|
var _loop = function _loop(index) {
|
|
20542
20463
|
var installmentsCount = suggestedPaymentPlanArray[index];
|
|
20543
20464
|
var planFound = eligibilityPlans.findIndex(function (plan) {
|
|
20544
|
-
return plan.installments_count === installmentsCount && plan.eligible
|
|
20545
|
-
// To differentiate P1X from PayLater while using the `suggestedPaymentPlan` property.
|
|
20546
|
-
!plan.deferred_days && !plan.deferred_months;
|
|
20465
|
+
return plan.installments_count === installmentsCount && plan.eligible;
|
|
20547
20466
|
});
|
|
20548
20467
|
|
|
20549
20468
|
if (planFound !== -1) {
|
|
@@ -20582,7 +20501,7 @@
|
|
|
20582
20501
|
|
|
20583
20502
|
var s$d = {"widgetButton":"_TSkFv","logo":"_LJ4nZ","primaryContainer":"_bMClc","paymentPlans":"_17c_S","plan":"_2Kqjn","active":"_3dG_J","monochrome":"_2hx83","notEligible":"_3O1bg","hideBorder":"_3_qcn","info":"_25GrF","loader":"_30j1O","pending":"_1ZDMS","clickable":"_UksZa","unClickable":"_1lr-q"};
|
|
20584
20503
|
|
|
20585
|
-
var VERY_LONG_TIME_IN_MS = 1000 * 3600;
|
|
20504
|
+
var VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
|
|
20586
20505
|
var DEFAULT_TRANSITION_TIME = 5500;
|
|
20587
20506
|
|
|
20588
20507
|
var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|