@alma/widgets 3.1.3 → 3.2.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.js +147 -66
- package/dist/raw/widgets.js.map +1 -1
- package/dist/raw/widgets.m.js +147 -66
- package/dist/raw/widgets.m.js.map +1 -1
- package/dist/raw/widgets.modern.js +99 -24
- package/dist/raw/widgets.modern.js.map +1 -1
- package/dist/raw/widgets.umd.js +147 -66
- package/dist/raw/widgets.umd.js.map +1 -1
- package/dist/types/Widgets/EligibilityModal/DesktopModal/index.d.ts +4 -2
- package/dist/types/Widgets/EligibilityModal/MobileModal/index.d.ts +4 -2
- package/dist/types/Widgets/EligibilityModal/components/Info/index.d.ts +3 -1
- package/dist/types/utils/index.d.ts +2 -0
- 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,6 +1551,9 @@
|
|
|
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
|
+
};
|
|
1554
1557
|
|
|
1555
1558
|
/* eslint-disable */
|
|
1556
1559
|
|
|
@@ -6719,6 +6722,9 @@
|
|
|
6719
6722
|
"eligibility-modal.bullet-2": "Lassen Sie sich führen und bestätigen Sie Ihre Zahlung in <strong>2 Minuten.</strong>",
|
|
6720
6723
|
"eligibility-modal.bullet-3": "<strong>Behalten Sie die Kontrolle</strong> , indem Sie Ihre Fristen in Ihrem eigenen Tempo vor- oder zurückverlegen.",
|
|
6721
6724
|
"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!",
|
|
6722
6728
|
"eligibility-modal.title-deferred-plan": "Zahlen Sie mit Alma in Raten oder später.",
|
|
6723
6729
|
"eligibility-modal.title-normal": "Zahlen Sie mit Alma in mehreren Raten.",
|
|
6724
6730
|
"installments.today": "Heute",
|
|
@@ -6731,7 +6737,8 @@
|
|
|
6731
6737
|
"payment-plan-strings.ineligible-lower-than-min": "Ab {minAmount}",
|
|
6732
6738
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
6733
6739
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
6734
|
-
"payment-plan-strings.no-fee": "(0% Finanzierung)"
|
|
6740
|
+
"payment-plan-strings.no-fee": "(0% Finanzierung)",
|
|
6741
|
+
"payment-plan-strings.pay-now": "Bezahlen Sie jetzt {totalAmount}"
|
|
6735
6742
|
};
|
|
6736
6743
|
|
|
6737
6744
|
var messagesEN = {
|
|
@@ -6742,6 +6749,9 @@
|
|
|
6742
6749
|
"eligibility-modal.bullet-2": "Let us guide you and validate your payment in <strong>2 minutes.</strong>",
|
|
6743
6750
|
"eligibility-modal.bullet-3": "<strong>Stay in control</strong> by moving your deadlines forward or backward at your own pace.",
|
|
6744
6751
|
"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!",
|
|
6745
6755
|
"eligibility-modal.title-deferred-plan": "Pay in installments or later by credit card with Alma.",
|
|
6746
6756
|
"eligibility-modal.title-normal": "Pay in installments by credit card with Alma.",
|
|
6747
6757
|
"installments.today": "Today",
|
|
@@ -6754,7 +6764,8 @@
|
|
|
6754
6764
|
"payment-plan-strings.ineligible-lower-than-min": "From {minAmount}",
|
|
6755
6765
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
6756
6766
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
6757
|
-
"payment-plan-strings.no-fee": "(free of charge)"
|
|
6767
|
+
"payment-plan-strings.no-fee": "(free of charge)",
|
|
6768
|
+
"payment-plan-strings.pay-now": "Pay now {totalAmount}"
|
|
6758
6769
|
};
|
|
6759
6770
|
|
|
6760
6771
|
var messagesES = {
|
|
@@ -6765,6 +6776,9 @@
|
|
|
6765
6776
|
"eligibility-modal.bullet-2": "Déjese guiar y valide su pago en <strong>2 minutos.</strong>",
|
|
6766
6777
|
"eligibility-modal.bullet-3": "<strong>Mantenga el control</strong> adelantando o retrasando los plazos a su propio ritmo.",
|
|
6767
6778
|
"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!",
|
|
6768
6782
|
"eligibility-modal.title-deferred-plan": "Paga a plazos o posteriormente con tarjeta bancaria con Alma.",
|
|
6769
6783
|
"eligibility-modal.title-normal": "Pagar a plazos con tarjeta bancaria con Alma.",
|
|
6770
6784
|
"installments.today": "Hoy",
|
|
@@ -6777,7 +6791,8 @@
|
|
|
6777
6791
|
"payment-plan-strings.ineligible-lower-than-min": "Desde {minAmount}",
|
|
6778
6792
|
"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}}}",
|
|
6779
6793
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} plazos de {totalAmount}",
|
|
6780
|
-
"payment-plan-strings.no-fee": "(sin intereses)"
|
|
6794
|
+
"payment-plan-strings.no-fee": "(sin intereses)",
|
|
6795
|
+
"payment-plan-strings.pay-now": "Pague ahora {totalAmount}"
|
|
6781
6796
|
};
|
|
6782
6797
|
|
|
6783
6798
|
var messagesFR = {
|
|
@@ -6788,6 +6803,9 @@
|
|
|
6788
6803
|
"eligibility-modal.bullet-2": "Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",
|
|
6789
6804
|
"eligibility-modal.bullet-3": "<strong>Gardez le contrôle</strong> en avançant ou reculant vos échéances à votre rythme.",
|
|
6790
6805
|
"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 !",
|
|
6791
6809
|
"eligibility-modal.title-deferred-plan": "Payez en plusieurs fois ou plus tard par carte bancaire avec Alma.",
|
|
6792
6810
|
"eligibility-modal.title-normal": "Payez en plusieurs fois par carte bancaire avec Alma.",
|
|
6793
6811
|
"installments.today": "Aujourd'hui",
|
|
@@ -6800,7 +6818,8 @@
|
|
|
6800
6818
|
"payment-plan-strings.ineligible-lower-than-min": "À partir de {minAmount}",
|
|
6801
6819
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
6802
6820
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
6803
|
-
"payment-plan-strings.no-fee": "(sans frais)"
|
|
6821
|
+
"payment-plan-strings.no-fee": "(sans frais)",
|
|
6822
|
+
"payment-plan-strings.pay-now": "Payez maintenant {totalAmount}"
|
|
6804
6823
|
};
|
|
6805
6824
|
|
|
6806
6825
|
var messagesIT = {
|
|
@@ -6811,6 +6830,9 @@
|
|
|
6811
6830
|
"eligibility-modal.bullet-2": "Lasciatevi guidare e convalidate il pagamento in <strong>2 minuti.</strong>",
|
|
6812
6831
|
"eligibility-modal.bullet-3": "<strong>Mantenete il controllo</strong> spostando le scadenze in avanti o indietro al vostro ritmo.",
|
|
6813
6832
|
"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!",
|
|
6814
6836
|
"eligibility-modal.title-deferred-plan": "Paga a rate o posticipa il pagamento con Alma, senza registrazione.",
|
|
6815
6837
|
"eligibility-modal.title-normal": "Paga a rate con Alma, senza registrazione.",
|
|
6816
6838
|
"installments.today": "Oggi",
|
|
@@ -6823,7 +6845,8 @@
|
|
|
6823
6845
|
"payment-plan-strings.ineligible-lower-than-min": "Pagamento rateale disponibile a partire da {minAmount}",
|
|
6824
6846
|
"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}}}",
|
|
6825
6847
|
"payment-plan-strings.multiple-installments-same-amount": "In {installmentsCount} rate mensili di {totalAmount}",
|
|
6826
|
-
"payment-plan-strings.no-fee": "(senza interessi)"
|
|
6848
|
+
"payment-plan-strings.no-fee": "(senza interessi)",
|
|
6849
|
+
"payment-plan-strings.pay-now": "Paga ora {totalAmount}"
|
|
6827
6850
|
};
|
|
6828
6851
|
|
|
6829
6852
|
var messagesNL = {
|
|
@@ -6834,6 +6857,9 @@
|
|
|
6834
6857
|
"eligibility-modal.bullet-2": "Laat ons u begeleiden en uw betaling valideren in <strong>2 minuten.</strong>",
|
|
6835
6858
|
"eligibility-modal.bullet-3": "<strong>Houd de controle op</strong> door uw deadlines in uw eigen tempo vooruit of achteruit te schuiven.",
|
|
6836
6859
|
"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!",
|
|
6837
6863
|
"eligibility-modal.title-deferred-plan": "Betaal in termijnen of later per creditcard met Alma.",
|
|
6838
6864
|
"eligibility-modal.title-normal": "Betaal in termijnen met een creditcard bij Alma.",
|
|
6839
6865
|
"installments.today": "Tegenwoordig",
|
|
@@ -6846,7 +6872,8 @@
|
|
|
6846
6872
|
"payment-plan-strings.ineligible-lower-than-min": "Van {minAmount}",
|
|
6847
6873
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
6848
6874
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
6849
|
-
"payment-plan-strings.no-fee": "(zonder kosten)"
|
|
6875
|
+
"payment-plan-strings.no-fee": "(zonder kosten)",
|
|
6876
|
+
"payment-plan-strings.pay-now": "Betaal nu {totalAmount}"
|
|
6850
6877
|
};
|
|
6851
6878
|
|
|
6852
6879
|
var messagesPT = {
|
|
@@ -6857,6 +6884,9 @@
|
|
|
6857
6884
|
"eligibility-modal.bullet-2": "Deixe-nos guiá-lo e validar o seu pagamento em <strong>2 minutos.</strong>",
|
|
6858
6885
|
"eligibility-modal.bullet-3": "<strong>Mantenha-se em controlo</strong> avançando ou recuando os seus prazos ao seu próprio ritmo.",
|
|
6859
6886
|
"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!",
|
|
6860
6890
|
"eligibility-modal.title-deferred-plan": "Pagar em prestações ou mais tarde por cartão de crédito com Alma.",
|
|
6861
6891
|
"eligibility-modal.title-normal": "Pagar em prestações por cartão de crédito com Alma.",
|
|
6862
6892
|
"installments.today": "Hoje",
|
|
@@ -6869,7 +6899,8 @@
|
|
|
6869
6899
|
"payment-plan-strings.ineligible-lower-than-min": "A partir de {minAmount}",
|
|
6870
6900
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
6871
6901
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
6872
|
-
"payment-plan-strings.no-fee": "(sem encargos)"
|
|
6902
|
+
"payment-plan-strings.no-fee": "(sem encargos)",
|
|
6903
|
+
"payment-plan-strings.pay-now": "Pague agora {totalAmount}"
|
|
6873
6904
|
};
|
|
6874
6905
|
|
|
6875
6906
|
var getTranslationsByLocale = function getTranslationsByLocale(locale) {
|
|
@@ -14956,17 +14987,13 @@
|
|
|
14956
14987
|
};
|
|
14957
14988
|
|
|
14958
14989
|
var filterELigibility = function filterELigibility(eligibilities, configPlans) {
|
|
14959
|
-
//
|
|
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
|
-
|
|
14990
|
+
// If no configPlans was provided, return eligibility response
|
|
14964
14991
|
if (!configPlans) {
|
|
14965
|
-
return
|
|
14992
|
+
return eligibilities;
|
|
14966
14993
|
} // Else check if the plan is eligible regarding the related configPlan
|
|
14967
14994
|
|
|
14968
14995
|
|
|
14969
|
-
return
|
|
14996
|
+
return eligibilities.map(function (plan) {
|
|
14970
14997
|
var eligibilityDeferredDays = (plan.deferred_months ? plan.deferred_months : 0) * 30 + (plan.deferred_days ? plan.deferred_days : 0); // find the related configPlan
|
|
14971
14998
|
|
|
14972
14999
|
var relatedConfigPlan = configPlans.find(function (configPlan) {
|
|
@@ -19812,7 +19839,8 @@
|
|
|
19812
19839
|
installmentsCount = payment.installments_count;
|
|
19813
19840
|
var deferredDaysCount = deferred_days + deferred_months * 30;
|
|
19814
19841
|
|
|
19815
|
-
if (installmentsCount === 1) {
|
|
19842
|
+
if (installmentsCount === 1 && deferredDaysCount > 0) {
|
|
19843
|
+
// For now there is no distinction between deferred days and deferred months, it will be J+ anyway
|
|
19816
19844
|
return /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
19817
19845
|
id: "payment-plan-strings.day-abbreviation",
|
|
19818
19846
|
defaultMessage: "J{numberOfDeferredDays}",
|
|
@@ -19901,6 +19929,21 @@
|
|
|
19901
19929
|
return index === 0 || installment.total_amount === payment_plan[0].total_amount;
|
|
19902
19930
|
});
|
|
19903
19931
|
|
|
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
|
+
|
|
19904
19947
|
if (areInstallmentsOfSameAmount) {
|
|
19905
19948
|
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
19906
19949
|
id: "payment-plan-strings.multiple-installments-same-amount",
|
|
@@ -20207,53 +20250,82 @@
|
|
|
20207
20250
|
|
|
20208
20251
|
var s$7 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
|
|
20209
20252
|
|
|
20210
|
-
var Info = function Info() {
|
|
20211
|
-
|
|
20212
|
-
|
|
20213
|
-
|
|
20214
|
-
|
|
20215
|
-
|
|
20216
|
-
|
|
20217
|
-
|
|
20218
|
-
|
|
20219
|
-
|
|
20220
|
-
|
|
20221
|
-
|
|
20222
|
-
|
|
20223
|
-
|
|
20224
|
-
|
|
20225
|
-
|
|
20253
|
+
var Info = function Info(_ref) {
|
|
20254
|
+
var isCurrentPlanP1X = _ref.isCurrentPlanP1X;
|
|
20255
|
+
return (
|
|
20256
|
+
/*#__PURE__*/
|
|
20257
|
+
// TODO: refactor this component into subcomponent to factorise code and be cleaner
|
|
20258
|
+
react.createElement("div", {
|
|
20259
|
+
className: classnames(s$7.list, STATIC_CUSTOMISATION_CLASSES.info),
|
|
20260
|
+
"data-testid": "modal-info-element"
|
|
20261
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
20262
|
+
className: s$7.listItem
|
|
20263
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
20264
|
+
className: classnames(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
20265
|
+
}, "1"), /*#__PURE__*/react.createElement("div", {
|
|
20266
|
+
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
20267
|
+
}, isCurrentPlanP1X ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
20268
|
+
id: "eligibility-modal.p1x-bullet-1",
|
|
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
|
+
}
|
|
20226
20274
|
}
|
|
20227
|
-
}
|
|
20228
|
-
|
|
20229
|
-
|
|
20230
|
-
|
|
20231
|
-
|
|
20232
|
-
|
|
20233
|
-
|
|
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));
|
|
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
|
+
}
|
|
20240
20282
|
}
|
|
20241
|
-
}
|
|
20242
|
-
|
|
20243
|
-
|
|
20244
|
-
|
|
20245
|
-
|
|
20246
|
-
|
|
20247
|
-
|
|
20248
|
-
|
|
20249
|
-
|
|
20250
|
-
|
|
20251
|
-
|
|
20252
|
-
|
|
20253
|
-
|
|
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
|
+
}
|
|
20254
20296
|
}
|
|
20255
|
-
}
|
|
20256
|
-
|
|
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
|
+
}
|
|
20304
|
+
}
|
|
20305
|
+
}))), /*#__PURE__*/react.createElement("div", {
|
|
20306
|
+
className: s$7.listItem
|
|
20307
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
20308
|
+
className: classnames(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
20309
|
+
}, "3"), /*#__PURE__*/react.createElement("div", {
|
|
20310
|
+
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
20311
|
+
}, isCurrentPlanP1X ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
20312
|
+
id: "eligibility-modal.p1x-bullet-3",
|
|
20313
|
+
defaultMessage: "<strong>La validation </strong> de votre paiement est instantan\xE9e !",
|
|
20314
|
+
values: {
|
|
20315
|
+
strong: function strong() {
|
|
20316
|
+
return /*#__PURE__*/react.createElement("strong", null, [].slice.call(arguments));
|
|
20317
|
+
}
|
|
20318
|
+
}
|
|
20319
|
+
}) : /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
20320
|
+
id: "eligibility-modal.bullet-3",
|
|
20321
|
+
defaultMessage: "<strong>Gardez le contr\xF4le</strong> en avan\xE7ant ou reculant vos \xE9ch\xE9ances \xE0 votre rythme.",
|
|
20322
|
+
values: {
|
|
20323
|
+
strong: function strong() {
|
|
20324
|
+
return /*#__PURE__*/react.createElement("strong", null, [].slice.call(arguments));
|
|
20325
|
+
}
|
|
20326
|
+
}
|
|
20327
|
+
}))))
|
|
20328
|
+
);
|
|
20257
20329
|
};
|
|
20258
20330
|
|
|
20259
20331
|
var s$8 = {"title":"_3ERx-"};
|
|
@@ -20277,7 +20349,8 @@
|
|
|
20277
20349
|
var DesktopModal = function DesktopModal(_ref) {
|
|
20278
20350
|
var children = _ref.children,
|
|
20279
20351
|
isSomePlanDeferred = _ref.isSomePlanDeferred,
|
|
20280
|
-
cards = _ref.cards
|
|
20352
|
+
cards = _ref.cards,
|
|
20353
|
+
isCurrentPlanP1X = _ref.isCurrentPlanP1X;
|
|
20281
20354
|
return /*#__PURE__*/react.createElement("div", {
|
|
20282
20355
|
className: classnames(s$9.container, STATIC_CUSTOMISATION_CLASSES.desktopModal),
|
|
20283
20356
|
"data-testid": "modal-container"
|
|
@@ -20285,7 +20358,9 @@
|
|
|
20285
20358
|
className: classnames([s$9.block, s$9.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
|
|
20286
20359
|
}, /*#__PURE__*/react.createElement(Title, {
|
|
20287
20360
|
isSomePlanDeferred: isSomePlanDeferred
|
|
20288
|
-
}), /*#__PURE__*/react.createElement(Info,
|
|
20361
|
+
}), /*#__PURE__*/react.createElement(Info, {
|
|
20362
|
+
isCurrentPlanP1X: isCurrentPlanP1X
|
|
20363
|
+
}), cards && /*#__PURE__*/react.createElement(Cards, {
|
|
20289
20364
|
cards: cards
|
|
20290
20365
|
}), /*#__PURE__*/react.createElement(AlmaLogo, {
|
|
20291
20366
|
className: s$9.logo,
|
|
@@ -20302,13 +20377,16 @@
|
|
|
20302
20377
|
var MobileModal = function MobileModal(_ref) {
|
|
20303
20378
|
var children = _ref.children,
|
|
20304
20379
|
isSomePlanDeferred = _ref.isSomePlanDeferred,
|
|
20305
|
-
cards = _ref.cards
|
|
20380
|
+
cards = _ref.cards,
|
|
20381
|
+
isCurrentPlanP1X = _ref.isCurrentPlanP1X;
|
|
20306
20382
|
return /*#__PURE__*/react.createElement("div", {
|
|
20307
20383
|
className: classnames(s$b.container, STATIC_CUSTOMISATION_CLASSES.mobileModal),
|
|
20308
20384
|
"data-testid": "modal-container"
|
|
20309
20385
|
}, /*#__PURE__*/react.createElement(Title, {
|
|
20310
20386
|
isSomePlanDeferred: isSomePlanDeferred
|
|
20311
|
-
}), children, /*#__PURE__*/react.createElement(Info,
|
|
20387
|
+
}), children, /*#__PURE__*/react.createElement(Info, {
|
|
20388
|
+
isCurrentPlanP1X: isCurrentPlanP1X
|
|
20389
|
+
}), cards && /*#__PURE__*/react.createElement(Cards, {
|
|
20312
20390
|
cards: cards
|
|
20313
20391
|
}), /*#__PURE__*/react.createElement(AlmaLogo, {
|
|
20314
20392
|
className: s$b.logo,
|
|
@@ -20345,7 +20423,8 @@
|
|
|
20345
20423
|
isOpen: true
|
|
20346
20424
|
}, /*#__PURE__*/react.createElement(ModalComponent, {
|
|
20347
20425
|
isSomePlanDeferred: isSomePlanDeferred,
|
|
20348
|
-
cards: cards
|
|
20426
|
+
cards: cards,
|
|
20427
|
+
isCurrentPlanP1X: isP1X(currentPlan)
|
|
20349
20428
|
}, status === apiStatus.PENDING && /*#__PURE__*/react.createElement("div", {
|
|
20350
20429
|
className: s$a.loader
|
|
20351
20430
|
}, /*#__PURE__*/react.createElement(LoadingIndicator, null)), status === apiStatus.SUCCESS && eligiblePlans.length === 0 && /*#__PURE__*/react.createElement("div", {
|
|
@@ -20462,7 +20541,9 @@
|
|
|
20462
20541
|
var _loop = function _loop(index) {
|
|
20463
20542
|
var installmentsCount = suggestedPaymentPlanArray[index];
|
|
20464
20543
|
var planFound = eligibilityPlans.findIndex(function (plan) {
|
|
20465
|
-
return plan.installments_count === installmentsCount && plan.eligible
|
|
20544
|
+
return plan.installments_count === installmentsCount && plan.eligible && // Remove the PayLater plans from the plan to target, we will code a better solution later
|
|
20545
|
+
// To differentiate P1X from PayLater while using the `suggestedPaymentPlan` property.
|
|
20546
|
+
!plan.deferred_days && !plan.deferred_months;
|
|
20466
20547
|
});
|
|
20467
20548
|
|
|
20468
20549
|
if (planFound !== -1) {
|
|
@@ -20501,7 +20582,7 @@
|
|
|
20501
20582
|
|
|
20502
20583
|
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"};
|
|
20503
20584
|
|
|
20504
|
-
var VERY_LONG_TIME_IN_MS = 1000 * 3600
|
|
20585
|
+
var VERY_LONG_TIME_IN_MS = 1000 * 3600;
|
|
20505
20586
|
var DEFAULT_TRANSITION_TIME = 5500;
|
|
20506
20587
|
|
|
20507
20588
|
var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|