@alma/widgets 3.2.1 → 3.2.3

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.
@@ -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
 
@@ -6717,21 +6720,26 @@
6717
6720
  "credit-features.total-credit-cost": "Davon Kreditkosten",
6718
6721
  "eligibility-modal.bullet-1": "Wählen Sie <strong>Alma</strong> beim Check-out. ",
6719
6722
  "eligibility-modal.bullet-2": "Lassen Sie sich führen und bestätigen Sie Ihre Zahlung in <strong>2 Minuten.</strong>",
6720
- "eligibility-modal.bullet-3": "<strong>Behalten Sie die Kontrolle</strong> , indem Sie Ihre Fristen in Ihrem eigenen Tempo vor- oder zurückverlegen.",
6723
+ "eligibility-modal.bullet-3": "</strong>Verlieren Sie nicht die Kontrolle,</strong> indem Sie Ihre Fälligkeitstermine nach 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> beim Check-out.",
6726
+ "eligibility-modal.p1x-bullet-2": "Tragen Sie Ihre <strong>Kreditkarteninformationen ein.</strong>",
6727
+ "eligibility-modal.p1x-bullet-3": "<strong> Ihre Zahlung wird sofort bestätigt! </strong>",
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",
6725
6731
  "installments.total-amount": "Gesamtsumme",
6726
6732
  "installments.total-fees": "Davon Kosten",
6727
- "payment-plan-strings.day-abbreviation": "T{numberOfDeferredDays}",
6733
+ "payment-plan-strings.day-abbreviation": "T{deferredDays}",
6728
6734
  "payment-plan-strings.default-message": "Bezahlen Sie zinsfrei in mehreren Raten mit Alma.",
6729
6735
  "payment-plan-strings.deferred": "{totalAmount} zu zahlen am {dueDate}",
6730
6736
  "payment-plan-strings.ineligible-greater-than-max": "Bis zu {maxAmount}",
6731
6737
  "payment-plan-strings.ineligible-lower-than-min": "Ab {minAmount}",
6738
+ "payment-plan-strings.month-abbreviation": "M{deferredMonths}",
6732
6739
  "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
6733
6740
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
6734
- "payment-plan-strings.no-fee": "(0% Finanzierung)"
6741
+ "payment-plan-strings.no-fee": "(0% Finanzierung)",
6742
+ "payment-plan-strings.pay-now": "Zahlen Sie jetzt {totalAmount}"
6735
6743
  };
6736
6744
 
6737
6745
  var messagesEN = {
@@ -6742,19 +6750,24 @@
6742
6750
  "eligibility-modal.bullet-2": "Let us guide you and validate your payment in <strong>2 minutes.</strong>",
6743
6751
  "eligibility-modal.bullet-3": "<strong>Stay in control</strong> by moving your deadlines forward or backward at your own pace.",
6744
6752
  "eligibility-modal.no-eligibility": "Oops, looks like the simulation didn't work.",
6753
+ "eligibility-modal.p1x-bullet-1": "Choose <strong>Alma - 1X</strong> at checkout.",
6754
+ "eligibility-modal.p1x-bullet-2": "Fill in your <strong>credit card information.</strong>",
6755
+ "eligibility-modal.p1x-bullet-3": "<strong>The validation </strong> of your payment is instantaneous!",
6745
6756
  "eligibility-modal.title-deferred-plan": "Pay in installments or later by credit card with Alma.",
6746
6757
  "eligibility-modal.title-normal": "Pay in installments by credit card with Alma.",
6747
6758
  "installments.today": "Today",
6748
6759
  "installments.total-amount": "Total",
6749
6760
  "installments.total-fees": "Of which costs (incl. VAT)",
6750
- "payment-plan-strings.day-abbreviation": "D{numberOfDeferredDays}",
6761
+ "payment-plan-strings.day-abbreviation": "D{deferredDays}",
6751
6762
  "payment-plan-strings.default-message": "Pay in installments with Alma",
6752
- "payment-plan-strings.deferred": "{totalAmount} to be paid on {dueDate}",
6763
+ "payment-plan-strings.deferred": "{totalAmount} to pay the {dueDate}",
6753
6764
  "payment-plan-strings.ineligible-greater-than-max": "Until {maxAmount}",
6754
6765
  "payment-plan-strings.ineligible-lower-than-min": "From {minAmount}",
6766
+ "payment-plan-strings.month-abbreviation": "M{deferredMonths}",
6755
6767
  "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
6756
6768
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
6757
- "payment-plan-strings.no-fee": "(free of charge)"
6769
+ "payment-plan-strings.no-fee": "(free of charge)",
6770
+ "payment-plan-strings.pay-now": "Pay now {totalAmount}"
6758
6771
  };
6759
6772
 
6760
6773
  var messagesES = {
@@ -6765,19 +6778,24 @@
6765
6778
  "eligibility-modal.bullet-2": "Déjese guiar y valide su pago en <strong>2 minutos.</strong>",
6766
6779
  "eligibility-modal.bullet-3": "<strong>Mantenga el control</strong> adelantando o retrasando los plazos a su propio ritmo.",
6767
6780
  "eligibility-modal.no-eligibility": "Uy, parece que la simulación no ha funcionado.",
6781
+ "eligibility-modal.p1x-bullet-1": "Elija <strong>Alma - 1X</strong> en la caja.",
6782
+ "eligibility-modal.p1x-bullet-2": "Introduzca los datos de su tarjeta de crédito en <strong>.</strong>",
6783
+ "eligibility-modal.p1x-bullet-3": "<strong>¡La validación </strong> de su pago es instantánea!",
6768
6784
  "eligibility-modal.title-deferred-plan": "Paga a plazos o posteriormente con tarjeta bancaria con Alma.",
6769
6785
  "eligibility-modal.title-normal": "Pagar a plazos con tarjeta bancaria con Alma.",
6770
6786
  "installments.today": "Hoy",
6771
6787
  "installments.total-amount": "Total",
6772
6788
  "installments.total-fees": "De los cuales, costes (IVA incluido)",
6773
- "payment-plan-strings.day-abbreviation": "D{numberOfDeferredDays}",
6789
+ "payment-plan-strings.day-abbreviation": "D{deferredDays}",
6774
6790
  "payment-plan-strings.default-message": "Pagar a plazos con Alma",
6775
6791
  "payment-plan-strings.deferred": "{totalAmount} a pagar el {dueDate}",
6776
6792
  "payment-plan-strings.ineligible-greater-than-max": "Hasta {maxAmount}",
6777
6793
  "payment-plan-strings.ineligible-lower-than-min": "Desde {minAmount}",
6794
+ "payment-plan-strings.month-abbreviation": "M{deferredMonths}",
6778
6795
  "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
6796
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} plazos de {totalAmount}",
6780
- "payment-plan-strings.no-fee": "(sin intereses)"
6797
+ "payment-plan-strings.no-fee": "(sin intereses)",
6798
+ "payment-plan-strings.pay-now": "Pague ahora {totalAmount}"
6781
6799
  };
6782
6800
 
6783
6801
  var messagesFR = {
@@ -6788,42 +6806,52 @@
6788
6806
  "eligibility-modal.bullet-2": "Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",
6789
6807
  "eligibility-modal.bullet-3": "<strong>Gardez le contrôle</strong> en avançant ou reculant vos échéances à votre rythme.",
6790
6808
  "eligibility-modal.no-eligibility": "Oups, il semblerait que la simulation n'ait pas fonctionné.",
6809
+ "eligibility-modal.p1x-bullet-1": "Choisissez <strong>Alma - 1X</strong> au moment du paiement.",
6810
+ "eligibility-modal.p1x-bullet-2": "Renseignez les informations de votre <strong>carte bancaire.</strong>",
6811
+ "eligibility-modal.p1x-bullet-3": "<strong>La validation </strong> de votre paiement est instantanée !",
6791
6812
  "eligibility-modal.title-deferred-plan": "Payez en plusieurs fois ou plus tard par carte bancaire avec Alma.",
6792
6813
  "eligibility-modal.title-normal": "Payez en plusieurs fois par carte bancaire avec Alma.",
6793
6814
  "installments.today": "Aujourd'hui",
6794
6815
  "installments.total-amount": "Total",
6795
6816
  "installments.total-fees": "Dont frais (TTC)",
6796
- "payment-plan-strings.day-abbreviation": "J{numberOfDeferredDays}",
6817
+ "payment-plan-strings.day-abbreviation": "J{deferredDays}",
6797
6818
  "payment-plan-strings.default-message": "Payez en plusieurs fois avec Alma",
6798
6819
  "payment-plan-strings.deferred": "{totalAmount} à payer le {dueDate}",
6799
6820
  "payment-plan-strings.ineligible-greater-than-max": "Jusqu'à {maxAmount}",
6800
6821
  "payment-plan-strings.ineligible-lower-than-min": "À partir de {minAmount}",
6822
+ "payment-plan-strings.month-abbreviation": "M{deferredMonths}",
6801
6823
  "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
6802
6824
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
6803
- "payment-plan-strings.no-fee": "(sans frais)"
6825
+ "payment-plan-strings.no-fee": "(sans frais)",
6826
+ "payment-plan-strings.pay-now": "Payez maintenant {totalAmount}"
6804
6827
  };
6805
6828
 
6806
6829
  var messagesIT = {
6807
6830
  "credit-features.credit-cost-display": "{creditCost} (TAEG {taegPercentage})",
6808
6831
  "credit-features.information": "Un pagamento rateale ti impegna e deve essere ripagato. Verifica la tua disponibilità finanziaria prima di impegnarti.",
6809
6832
  "credit-features.total-credit-cost": "Di cui commissioni",
6810
- "eligibility-modal.bullet-1": "Scegli <strong>Alma</strong> alla cassa.",
6811
- "eligibility-modal.bullet-2": "Lasciatevi guidare e convalidate il pagamento in <strong>2 minuti.</strong>",
6812
- "eligibility-modal.bullet-3": "<strong>Mantenete il controllo</strong> spostando le scadenze in avanti o indietro al vostro ritmo.",
6833
+ "eligibility-modal.bullet-1": "Seleziona <strong>Alma</strong> come metodo di pagamento.",
6834
+ "eligibility-modal.bullet-2": "Segui le istruzioni e completa l'acquisto <strong>in meno di 2 minuti.</strong>",
6835
+ "eligibility-modal.bullet-3": "<strong>Gestisci il tuo piano di pagamento</strong> e modifica le scadenze secondo le tue esigenze.",
6813
6836
  "eligibility-modal.no-eligibility": "Ops, sembra che qualcosa non abbia funzionato.",
6814
- "eligibility-modal.title-deferred-plan": "Paga a rate o posticipa il pagamento con Alma, senza registrazione.",
6837
+ "eligibility-modal.p1x-bullet-1": "Scegli <strong>Alma - 1X</strong> alla cassa.",
6838
+ "eligibility-modal.p1x-bullet-2": "Inserisci i dati della tua <strong>carta bancaria.</strong>",
6839
+ "eligibility-modal.p1x-bullet-3": "Ricevi la conferma di pagamento <strong>istantaneamente!</strong>",
6840
+ "eligibility-modal.title-deferred-plan": "Paga a rate con Alma, senza registrazione.",
6815
6841
  "eligibility-modal.title-normal": "Paga a rate con Alma, senza registrazione.",
6816
6842
  "installments.today": "Oggi",
6817
6843
  "installments.total-amount": "Totale",
6818
6844
  "installments.total-fees": "Di cui commissioni",
6819
- "payment-plan-strings.day-abbreviation": "G{numberOfDeferredDays}",
6820
- "payment-plan-strings.default-message": "Paga a rate con Alma",
6845
+ "payment-plan-strings.day-abbreviation": "G{deferredDays}",
6846
+ "payment-plan-strings.default-message": "Paga a rate con Alma, senza registrazione.",
6821
6847
  "payment-plan-strings.deferred": "{totalAmount} da pagare il {dueDate}",
6822
6848
  "payment-plan-strings.ineligible-greater-than-max": "Disponibile fino a {maxAmount}",
6823
6849
  "payment-plan-strings.ineligible-lower-than-min": "Pagamento rateale disponibile a partire da {minAmount}",
6850
+ "payment-plan-strings.month-abbreviation": "M{deferredMonths}",
6824
6851
  "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
6852
  "payment-plan-strings.multiple-installments-same-amount": "In {installmentsCount} rate mensili di {totalAmount}",
6826
- "payment-plan-strings.no-fee": "(senza interessi)"
6853
+ "payment-plan-strings.no-fee": "(senza interessi)",
6854
+ "payment-plan-strings.pay-now": "Paga ora {totalAmount}"
6827
6855
  };
6828
6856
 
6829
6857
  var messagesNL = {
@@ -6834,19 +6862,24 @@
6834
6862
  "eligibility-modal.bullet-2": "Laat ons u begeleiden en uw betaling valideren in <strong>2 minuten.</strong>",
6835
6863
  "eligibility-modal.bullet-3": "<strong>Houd de controle op</strong> door uw deadlines in uw eigen tempo vooruit of achteruit te schuiven.",
6836
6864
  "eligibility-modal.no-eligibility": "Oeps, het lijkt erop dat de simulatie niet werkte.",
6865
+ "eligibility-modal.p1x-bullet-1": "Kies <strong>Alma - 1X</strong> bij het afrekenen.",
6866
+ "eligibility-modal.p1x-bullet-2": "Vul uw <strong>creditcardgegevens in.</strong>",
6867
+ "eligibility-modal.p1x-bullet-3": "<strong>De validatie </strong> van uw betaling is onmiddellijk!",
6837
6868
  "eligibility-modal.title-deferred-plan": "Betaal in termijnen of later per creditcard met Alma.",
6838
6869
  "eligibility-modal.title-normal": "Betaal in termijnen met een creditcard bij Alma.",
6839
6870
  "installments.today": "Tegenwoordig",
6840
6871
  "installments.total-amount": "Totaal",
6841
6872
  "installments.total-fees": "Waarvan kosten (incl. BTW)",
6842
- "payment-plan-strings.day-abbreviation": "D{numberOfDeferredDays}",
6873
+ "payment-plan-strings.day-abbreviation": "D{deferredDays}",
6843
6874
  "payment-plan-strings.default-message": "Betaal in termijnen met Alma",
6844
6875
  "payment-plan-strings.deferred": "{totalAmount} te betalen op {dueDate}",
6845
6876
  "payment-plan-strings.ineligible-greater-than-max": "Tot {maxAmount}",
6846
6877
  "payment-plan-strings.ineligible-lower-than-min": "Van {minAmount}",
6878
+ "payment-plan-strings.month-abbreviation": "M{deferredMonths}",
6847
6879
  "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
6848
6880
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
6849
- "payment-plan-strings.no-fee": "(zonder kosten)"
6881
+ "payment-plan-strings.no-fee": "(zonder kosten)",
6882
+ "payment-plan-strings.pay-now": "Betaal nu {totalAmount}"
6850
6883
  };
6851
6884
 
6852
6885
  var messagesPT = {
@@ -6857,19 +6890,24 @@
6857
6890
  "eligibility-modal.bullet-2": "Deixe-nos guiá-lo e validar o seu pagamento em <strong>2 minutos.</strong>",
6858
6891
  "eligibility-modal.bullet-3": "<strong>Mantenha-se em controlo</strong> avançando ou recuando os seus prazos ao seu próprio ritmo.",
6859
6892
  "eligibility-modal.no-eligibility": "Ups, parece que a simulação não funcionou.",
6893
+ "eligibility-modal.p1x-bullet-1": "Escolher <strong>Alma - 1X</strong> no checkout.",
6894
+ "eligibility-modal.p1x-bullet-2": "Preencha as informações do seu <strong>cartão de crédito.</strong>",
6895
+ "eligibility-modal.p1x-bullet-3": "<strong>A validação </strong> do seu pagamento é instantânea!",
6860
6896
  "eligibility-modal.title-deferred-plan": "Pagar em prestações ou mais tarde por cartão de crédito com Alma.",
6861
6897
  "eligibility-modal.title-normal": "Pagar em prestações por cartão de crédito com Alma.",
6862
6898
  "installments.today": "Hoje",
6863
6899
  "installments.total-amount": "Total",
6864
6900
  "installments.total-fees": "Dos quais custos (incl. IVA)",
6865
- "payment-plan-strings.day-abbreviation": "D{numberOfDeferredDays}",
6901
+ "payment-plan-strings.day-abbreviation": "D{deferredDays}",
6866
6902
  "payment-plan-strings.default-message": "Pague em prestações através da Alma",
6867
6903
  "payment-plan-strings.deferred": "{totalAmount} a pagar em {dueDate}",
6868
6904
  "payment-plan-strings.ineligible-greater-than-max": "Até {maxAmount}",
6869
6905
  "payment-plan-strings.ineligible-lower-than-min": "A partir de {minAmount}",
6906
+ "payment-plan-strings.month-abbreviation": "M{deferredMonths}",
6870
6907
  "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
6871
6908
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
6872
- "payment-plan-strings.no-fee": "(sem encargos)"
6909
+ "payment-plan-strings.no-fee": "(sem encargos)",
6910
+ "payment-plan-strings.pay-now": "Pague agora {totalAmount}"
6873
6911
  };
6874
6912
 
6875
6913
  var getTranslationsByLocale = function getTranslationsByLocale(locale) {
@@ -14955,18 +14993,16 @@
14955
14993
  return configPlan != null ? configPlan : {};
14956
14994
  };
14957
14995
 
14958
- var filterELigibility = function filterELigibility(eligibilities, configPlans) {
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
-
14996
+ var filterEligibility = function filterEligibility(eligibilities, configPlans) {
14997
+ // Remove P1X if no configuration is provided
14964
14998
  if (!configPlans) {
14965
- return filteredEligibilityPlans;
14999
+ return eligibilities.filter(function (plan) {
15000
+ return !(plan.installments_count === 1 && plan.deferred_days === 0 && plan.deferred_months === 0);
15001
+ });
14966
15002
  } // Else check if the plan is eligible regarding the related configPlan
14967
15003
 
14968
15004
 
14969
- return filteredEligibilityPlans.map(function (plan) {
15005
+ return eligibilities.map(function (plan) {
14970
15006
  var eligibilityDeferredDays = (plan.deferred_months ? plan.deferred_months : 0) * 30 + (plan.deferred_days ? plan.deferred_days : 0); // find the related configPlan
14971
15007
 
14972
15008
  var relatedConfigPlan = configPlans.find(function (configPlan) {
@@ -15031,7 +15067,7 @@
15031
15067
  });
15032
15068
  }
15033
15069
  }, [status]);
15034
- return [filterELigibility(eligibility, plans), status];
15070
+ return [filterEligibility(eligibility, plans), status];
15035
15071
  };
15036
15072
 
15037
15073
  var classnames = createCommonjsModule(function (module) {
@@ -19810,14 +19846,23 @@
19810
19846
  var deferred_days = payment.deferred_days,
19811
19847
  deferred_months = payment.deferred_months,
19812
19848
  installmentsCount = payment.installments_count;
19813
- var deferredDaysCount = deferred_days + deferred_months * 30;
19814
19849
 
19815
- if (installmentsCount === 1) {
19850
+ if (installmentsCount === 1 && deferred_days) {
19816
19851
  return /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
19817
19852
  id: "payment-plan-strings.day-abbreviation",
19818
- defaultMessage: "J{numberOfDeferredDays}",
19853
+ defaultMessage: "J{deferredDays}",
19854
+ values: {
19855
+ deferredDays: "+" + deferred_days
19856
+ }
19857
+ });
19858
+ }
19859
+
19860
+ if (installmentsCount === 1 && deferred_months) {
19861
+ return /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
19862
+ id: "payment-plan-strings.month-abbreviation",
19863
+ defaultMessage: "M{deferredMonths}",
19819
19864
  values: {
19820
- numberOfDeferredDays: deferredDaysCount > 0 ? "+" + deferredDaysCount : ''
19865
+ deferredMonths: "+" + deferred_months
19821
19866
  }
19822
19867
  });
19823
19868
  } else {
@@ -19901,6 +19946,21 @@
19901
19946
  return index === 0 || installment.total_amount === payment_plan[0].total_amount;
19902
19947
  });
19903
19948
 
19949
+ if (isP1X(payment)) {
19950
+ return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
19951
+ id: "payment-plan-strings.pay-now",
19952
+ defaultMessage: "Payez maintenant {totalAmount}",
19953
+ values: {
19954
+ totalAmount: /*#__PURE__*/react.createElement(FormattedNumber, {
19955
+ value: priceFromCents(payment_plan[0].total_amount),
19956
+ style: "currency",
19957
+ currency: "EUR"
19958
+ }),
19959
+ installmentsCount: installmentsCount
19960
+ }
19961
+ }), withNoFee(payment));
19962
+ }
19963
+
19904
19964
  if (areInstallmentsOfSameAmount) {
19905
19965
  return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
19906
19966
  id: "payment-plan-strings.multiple-installments-same-amount",
@@ -20207,53 +20267,82 @@
20207
20267
 
20208
20268
  var s$7 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
20209
20269
 
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));
20270
+ var Info = function Info(_ref) {
20271
+ var isCurrentPlanP1X = _ref.isCurrentPlanP1X;
20272
+ return (
20273
+ /*#__PURE__*/
20274
+ // TODO: refactor this component into subcomponent to factorise code and be cleaner
20275
+ react.createElement("div", {
20276
+ className: classnames(s$7.list, STATIC_CUSTOMISATION_CLASSES.info),
20277
+ "data-testid": "modal-info-element"
20278
+ }, /*#__PURE__*/react.createElement("div", {
20279
+ className: s$7.listItem
20280
+ }, /*#__PURE__*/react.createElement("div", {
20281
+ className: classnames(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
20282
+ }, "1"), /*#__PURE__*/react.createElement("div", {
20283
+ className: STATIC_CUSTOMISATION_CLASSES.infoMessage
20284
+ }, isCurrentPlanP1X ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
20285
+ id: "eligibility-modal.p1x-bullet-1",
20286
+ defaultMessage: "Choisissez <strong>Alma - 1X</strong> au moment du paiement.",
20287
+ values: {
20288
+ strong: function strong() {
20289
+ return /*#__PURE__*/react.createElement("strong", null, [].slice.call(arguments));
20290
+ }
20226
20291
  }
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));
20292
+ }) : /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
20293
+ id: "eligibility-modal.bullet-1",
20294
+ defaultMessage: "Choisissez <strong>Alma</strong> au moment du paiement.",
20295
+ values: {
20296
+ strong: function strong() {
20297
+ return /*#__PURE__*/react.createElement("strong", null, [].slice.call(arguments));
20298
+ }
20240
20299
  }
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));
20300
+ }))), /*#__PURE__*/react.createElement("div", {
20301
+ className: s$7.listItem
20302
+ }, /*#__PURE__*/react.createElement("div", {
20303
+ className: classnames(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
20304
+ }, "2"), /*#__PURE__*/react.createElement("div", {
20305
+ className: STATIC_CUSTOMISATION_CLASSES.infoMessage
20306
+ }, isCurrentPlanP1X ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
20307
+ id: "eligibility-modal.p1x-bullet-2",
20308
+ defaultMessage: "Renseignez les informations de votre <strong>carte bancaire.</strong>",
20309
+ values: {
20310
+ strong: function strong() {
20311
+ return /*#__PURE__*/react.createElement("strong", null, [].slice.call(arguments));
20312
+ }
20254
20313
  }
20255
- }
20256
- }))));
20314
+ }) : /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
20315
+ id: "eligibility-modal.bullet-2",
20316
+ defaultMessage: "Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",
20317
+ values: {
20318
+ strong: function strong() {
20319
+ return /*#__PURE__*/react.createElement("strong", null, [].slice.call(arguments));
20320
+ }
20321
+ }
20322
+ }))), /*#__PURE__*/react.createElement("div", {
20323
+ className: s$7.listItem
20324
+ }, /*#__PURE__*/react.createElement("div", {
20325
+ className: classnames(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
20326
+ }, "3"), /*#__PURE__*/react.createElement("div", {
20327
+ className: STATIC_CUSTOMISATION_CLASSES.infoMessage
20328
+ }, isCurrentPlanP1X ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
20329
+ id: "eligibility-modal.p1x-bullet-3",
20330
+ defaultMessage: "<strong>La validation </strong> de votre paiement est instantan\xE9e !",
20331
+ values: {
20332
+ strong: function strong() {
20333
+ return /*#__PURE__*/react.createElement("strong", null, [].slice.call(arguments));
20334
+ }
20335
+ }
20336
+ }) : /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
20337
+ id: "eligibility-modal.bullet-3",
20338
+ defaultMessage: "<strong>Gardez le contr\xF4le</strong> en avan\xE7ant ou reculant vos \xE9ch\xE9ances \xE0 votre rythme.",
20339
+ values: {
20340
+ strong: function strong() {
20341
+ return /*#__PURE__*/react.createElement("strong", null, [].slice.call(arguments));
20342
+ }
20343
+ }
20344
+ }))))
20345
+ );
20257
20346
  };
20258
20347
 
20259
20348
  var s$8 = {"title":"_3ERx-"};
@@ -20277,7 +20366,8 @@
20277
20366
  var DesktopModal = function DesktopModal(_ref) {
20278
20367
  var children = _ref.children,
20279
20368
  isSomePlanDeferred = _ref.isSomePlanDeferred,
20280
- cards = _ref.cards;
20369
+ cards = _ref.cards,
20370
+ isCurrentPlanP1X = _ref.isCurrentPlanP1X;
20281
20371
  return /*#__PURE__*/react.createElement("div", {
20282
20372
  className: classnames(s$9.container, STATIC_CUSTOMISATION_CLASSES.desktopModal),
20283
20373
  "data-testid": "modal-container"
@@ -20285,7 +20375,9 @@
20285
20375
  className: classnames([s$9.block, s$9.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
20286
20376
  }, /*#__PURE__*/react.createElement(Title, {
20287
20377
  isSomePlanDeferred: isSomePlanDeferred
20288
- }), /*#__PURE__*/react.createElement(Info, null), cards && /*#__PURE__*/react.createElement(Cards, {
20378
+ }), /*#__PURE__*/react.createElement(Info, {
20379
+ isCurrentPlanP1X: isCurrentPlanP1X
20380
+ }), cards && /*#__PURE__*/react.createElement(Cards, {
20289
20381
  cards: cards
20290
20382
  }), /*#__PURE__*/react.createElement(AlmaLogo, {
20291
20383
  className: s$9.logo,
@@ -20302,13 +20394,16 @@
20302
20394
  var MobileModal = function MobileModal(_ref) {
20303
20395
  var children = _ref.children,
20304
20396
  isSomePlanDeferred = _ref.isSomePlanDeferred,
20305
- cards = _ref.cards;
20397
+ cards = _ref.cards,
20398
+ isCurrentPlanP1X = _ref.isCurrentPlanP1X;
20306
20399
  return /*#__PURE__*/react.createElement("div", {
20307
20400
  className: classnames(s$b.container, STATIC_CUSTOMISATION_CLASSES.mobileModal),
20308
20401
  "data-testid": "modal-container"
20309
20402
  }, /*#__PURE__*/react.createElement(Title, {
20310
20403
  isSomePlanDeferred: isSomePlanDeferred
20311
- }), children, /*#__PURE__*/react.createElement(Info, null), cards && /*#__PURE__*/react.createElement(Cards, {
20404
+ }), children, /*#__PURE__*/react.createElement(Info, {
20405
+ isCurrentPlanP1X: isCurrentPlanP1X
20406
+ }), cards && /*#__PURE__*/react.createElement(Cards, {
20312
20407
  cards: cards
20313
20408
  }), /*#__PURE__*/react.createElement(AlmaLogo, {
20314
20409
  className: s$b.logo,
@@ -20345,7 +20440,8 @@
20345
20440
  isOpen: true
20346
20441
  }, /*#__PURE__*/react.createElement(ModalComponent, {
20347
20442
  isSomePlanDeferred: isSomePlanDeferred,
20348
- cards: cards
20443
+ cards: cards,
20444
+ isCurrentPlanP1X: isP1X(currentPlan)
20349
20445
  }, status === apiStatus.PENDING && /*#__PURE__*/react.createElement("div", {
20350
20446
  className: s$a.loader
20351
20447
  }, /*#__PURE__*/react.createElement(LoadingIndicator, null)), status === apiStatus.SUCCESS && eligiblePlans.length === 0 && /*#__PURE__*/react.createElement("div", {
@@ -20462,7 +20558,9 @@
20462
20558
  var _loop = function _loop(index) {
20463
20559
  var installmentsCount = suggestedPaymentPlanArray[index];
20464
20560
  var planFound = eligibilityPlans.findIndex(function (plan) {
20465
- return plan.installments_count === installmentsCount && plan.eligible;
20561
+ return plan.installments_count === installmentsCount && plan.eligible && // Remove the PayLater plans from the plan to target, we will code a better solution later
20562
+ // To differentiate P1X from PayLater while using the `suggestedPaymentPlan` property.
20563
+ !plan.deferred_days && !plan.deferred_months;
20466
20564
  });
20467
20565
 
20468
20566
  if (planFound !== -1) {
@@ -20501,7 +20599,7 @@
20501
20599
 
20502
20600
  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
20601
 
20504
- var VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
20602
+ var VERY_LONG_TIME_IN_MS = 1000 * 3600;
20505
20603
  var DEFAULT_TRANSITION_TIME = 5500;
20506
20604
 
20507
20605
  var PaymentPlanWidget = function PaymentPlanWidget(_ref) {