@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.
@@ -1551,7 +1551,6 @@ function formatCents(cents) {
1551
1551
  return String(priceFromCents(cents)).replace('.', ',');
1552
1552
  }
1553
1553
  const desktopWidth = 800;
1554
- const isP1X = plan => (plan == null ? void 0 : plan.installments_count) === 1 && (plan == null ? void 0 : plan.deferred_days) === 0 && (plan == null ? void 0 : plan.deferred_months) === 0;
1555
1554
 
1556
1555
  /* eslint-disable */
1557
1556
 
@@ -1866,9 +1865,6 @@ var messagesDE = {
1866
1865
  "eligibility-modal.bullet-2": "Lassen Sie sich führen und bestätigen Sie Ihre Zahlung in <strong>2 Minuten.</strong>",
1867
1866
  "eligibility-modal.bullet-3": "<strong>Behalten Sie die Kontrolle</strong> , indem Sie Ihre Fristen in Ihrem eigenen Tempo vor- oder zurückverlegen.",
1868
1867
  "eligibility-modal.no-eligibility": "Ups, die Prüfung hat anscheinend nicht funktioniert.",
1869
- "eligibility-modal.p1x-bullet-1": "Wählen Sie <strong>Alma - 1X</strong> bei der Bezahlung.",
1870
- "eligibility-modal.p1x-bullet-2": "Füllen Sie die Informationen auf Ihrer <strong>Kreditkarte aus.</strong>",
1871
- "eligibility-modal.p1x-bullet-3": "<strong>Die Bestätigung </strong> Ihrer Zahlung erfolgt sofort!",
1872
1868
  "eligibility-modal.title-deferred-plan": "Zahlen Sie mit Alma in Raten oder später.",
1873
1869
  "eligibility-modal.title-normal": "Zahlen Sie mit Alma in mehreren Raten.",
1874
1870
  "installments.today": "Heute",
@@ -1881,8 +1877,7 @@ var messagesDE = {
1881
1877
  "payment-plan-strings.ineligible-lower-than-min": "Ab {minAmount}",
1882
1878
  "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
1883
1879
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
1884
- "payment-plan-strings.no-fee": "(0% Finanzierung)",
1885
- "payment-plan-strings.pay-now": "Bezahlen Sie jetzt {totalAmount}"
1880
+ "payment-plan-strings.no-fee": "(0% Finanzierung)"
1886
1881
  };
1887
1882
 
1888
1883
  var messagesEN = {
@@ -1893,9 +1888,6 @@ var messagesEN = {
1893
1888
  "eligibility-modal.bullet-2": "Let us guide you and validate your payment in <strong>2 minutes.</strong>",
1894
1889
  "eligibility-modal.bullet-3": "<strong>Stay in control</strong> by moving your deadlines forward or backward at your own pace.",
1895
1890
  "eligibility-modal.no-eligibility": "Oops, looks like the simulation didn't work.",
1896
- "eligibility-modal.p1x-bullet-1": "Choose <strong>Alma - 1X</strong> at checkout.",
1897
- "eligibility-modal.p1x-bullet-2": "Fill in your <strong>credit card information.</strong>",
1898
- "eligibility-modal.p1x-bullet-3": "<strong>The validation </strong> of your payment is instantaneous!",
1899
1891
  "eligibility-modal.title-deferred-plan": "Pay in installments or later by credit card with Alma.",
1900
1892
  "eligibility-modal.title-normal": "Pay in installments by credit card with Alma.",
1901
1893
  "installments.today": "Today",
@@ -1908,8 +1900,7 @@ var messagesEN = {
1908
1900
  "payment-plan-strings.ineligible-lower-than-min": "From {minAmount}",
1909
1901
  "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
1910
1902
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
1911
- "payment-plan-strings.no-fee": "(free of charge)",
1912
- "payment-plan-strings.pay-now": "Pay now {totalAmount}"
1903
+ "payment-plan-strings.no-fee": "(free of charge)"
1913
1904
  };
1914
1905
 
1915
1906
  var messagesES = {
@@ -1920,9 +1911,6 @@ var messagesES = {
1920
1911
  "eligibility-modal.bullet-2": "Déjese guiar y valide su pago en <strong>2 minutos.</strong>",
1921
1912
  "eligibility-modal.bullet-3": "<strong>Mantenga el control</strong> adelantando o retrasando los plazos a su propio ritmo.",
1922
1913
  "eligibility-modal.no-eligibility": "Uy, parece que la simulación no ha funcionado.",
1923
- "eligibility-modal.p1x-bullet-1": "Elija <strong>Alma - 1X</strong> en la caja.",
1924
- "eligibility-modal.p1x-bullet-2": "Introduzca los datos de su tarjeta de crédito en <strong>.</strong>",
1925
- "eligibility-modal.p1x-bullet-3": "<strong>¡La validación </strong> de su pago es instantánea!",
1926
1914
  "eligibility-modal.title-deferred-plan": "Paga a plazos o posteriormente con tarjeta bancaria con Alma.",
1927
1915
  "eligibility-modal.title-normal": "Pagar a plazos con tarjeta bancaria con Alma.",
1928
1916
  "installments.today": "Hoy",
@@ -1935,8 +1923,7 @@ var messagesES = {
1935
1923
  "payment-plan-strings.ineligible-lower-than-min": "Desde {minAmount}",
1936
1924
  "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}}}",
1937
1925
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} plazos de {totalAmount}",
1938
- "payment-plan-strings.no-fee": "(sin intereses)",
1939
- "payment-plan-strings.pay-now": "Pague ahora {totalAmount}"
1926
+ "payment-plan-strings.no-fee": "(sin intereses)"
1940
1927
  };
1941
1928
 
1942
1929
  var messagesFR = {
@@ -1947,9 +1934,6 @@ var messagesFR = {
1947
1934
  "eligibility-modal.bullet-2": "Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",
1948
1935
  "eligibility-modal.bullet-3": "<strong>Gardez le contrôle</strong> en avançant ou reculant vos échéances à votre rythme.",
1949
1936
  "eligibility-modal.no-eligibility": "Oups, il semblerait que la simulation n'ait pas fonctionné.",
1950
- "eligibility-modal.p1x-bullet-1": "Choisissez <strong>Alma - 1X</strong> au moment du paiement.",
1951
- "eligibility-modal.p1x-bullet-2": "Renseignez les informations de votre <strong>carte bancaire.</strong>",
1952
- "eligibility-modal.p1x-bullet-3": "<strong>La validation </strong> de votre paiement est instantanée !",
1953
1937
  "eligibility-modal.title-deferred-plan": "Payez en plusieurs fois ou plus tard par carte bancaire avec Alma.",
1954
1938
  "eligibility-modal.title-normal": "Payez en plusieurs fois par carte bancaire avec Alma.",
1955
1939
  "installments.today": "Aujourd'hui",
@@ -1962,8 +1946,7 @@ var messagesFR = {
1962
1946
  "payment-plan-strings.ineligible-lower-than-min": "À partir de {minAmount}",
1963
1947
  "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
1964
1948
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
1965
- "payment-plan-strings.no-fee": "(sans frais)",
1966
- "payment-plan-strings.pay-now": "Payez maintenant {totalAmount}"
1949
+ "payment-plan-strings.no-fee": "(sans frais)"
1967
1950
  };
1968
1951
 
1969
1952
  var messagesIT = {
@@ -1974,9 +1957,6 @@ var messagesIT = {
1974
1957
  "eligibility-modal.bullet-2": "Lasciatevi guidare e convalidate il pagamento in <strong>2 minuti.</strong>",
1975
1958
  "eligibility-modal.bullet-3": "<strong>Mantenete il controllo</strong> spostando le scadenze in avanti o indietro al vostro ritmo.",
1976
1959
  "eligibility-modal.no-eligibility": "Ops, sembra che qualcosa non abbia funzionato.",
1977
- "eligibility-modal.p1x-bullet-1": "Scegliere <strong>Alma - 1X</strong> alla cassa.",
1978
- "eligibility-modal.p1x-bullet-2": "Compilare i dati della carta di credito <strong>.</strong>",
1979
- "eligibility-modal.p1x-bullet-3": "<strong>La convalida </strong> del vostro pagamento è istantanea!",
1980
1960
  "eligibility-modal.title-deferred-plan": "Paga a rate o posticipa il pagamento con Alma, senza registrazione.",
1981
1961
  "eligibility-modal.title-normal": "Paga a rate con Alma, senza registrazione.",
1982
1962
  "installments.today": "Oggi",
@@ -1989,8 +1969,7 @@ var messagesIT = {
1989
1969
  "payment-plan-strings.ineligible-lower-than-min": "Pagamento rateale disponibile a partire da {minAmount}",
1990
1970
  "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}}}",
1991
1971
  "payment-plan-strings.multiple-installments-same-amount": "In {installmentsCount} rate mensili di {totalAmount}",
1992
- "payment-plan-strings.no-fee": "(senza interessi)",
1993
- "payment-plan-strings.pay-now": "Paga ora {totalAmount}"
1972
+ "payment-plan-strings.no-fee": "(senza interessi)"
1994
1973
  };
1995
1974
 
1996
1975
  var messagesNL = {
@@ -2001,9 +1980,6 @@ var messagesNL = {
2001
1980
  "eligibility-modal.bullet-2": "Laat ons u begeleiden en uw betaling valideren in <strong>2 minuten.</strong>",
2002
1981
  "eligibility-modal.bullet-3": "<strong>Houd de controle op</strong> door uw deadlines in uw eigen tempo vooruit of achteruit te schuiven.",
2003
1982
  "eligibility-modal.no-eligibility": "Oeps, het lijkt erop dat de simulatie niet werkte.",
2004
- "eligibility-modal.p1x-bullet-1": "Kies <strong>Alma - 1X</strong> bij het afrekenen.",
2005
- "eligibility-modal.p1x-bullet-2": "Vul uw <strong>creditcardgegevens in.</strong>",
2006
- "eligibility-modal.p1x-bullet-3": "<strong>De validatie </strong> van uw betaling is onmiddellijk!",
2007
1983
  "eligibility-modal.title-deferred-plan": "Betaal in termijnen of later per creditcard met Alma.",
2008
1984
  "eligibility-modal.title-normal": "Betaal in termijnen met een creditcard bij Alma.",
2009
1985
  "installments.today": "Tegenwoordig",
@@ -2016,8 +1992,7 @@ var messagesNL = {
2016
1992
  "payment-plan-strings.ineligible-lower-than-min": "Van {minAmount}",
2017
1993
  "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
2018
1994
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
2019
- "payment-plan-strings.no-fee": "(zonder kosten)",
2020
- "payment-plan-strings.pay-now": "Betaal nu {totalAmount}"
1995
+ "payment-plan-strings.no-fee": "(zonder kosten)"
2021
1996
  };
2022
1997
 
2023
1998
  var messagesPT = {
@@ -2028,9 +2003,6 @@ var messagesPT = {
2028
2003
  "eligibility-modal.bullet-2": "Deixe-nos guiá-lo e validar o seu pagamento em <strong>2 minutos.</strong>",
2029
2004
  "eligibility-modal.bullet-3": "<strong>Mantenha-se em controlo</strong> avançando ou recuando os seus prazos ao seu próprio ritmo.",
2030
2005
  "eligibility-modal.no-eligibility": "Ups, parece que a simulação não funcionou.",
2031
- "eligibility-modal.p1x-bullet-1": "Escolher <strong>Alma - 1X</strong> no checkout.",
2032
- "eligibility-modal.p1x-bullet-2": "Preencha as informações do seu <strong>cartão de crédito.</strong>",
2033
- "eligibility-modal.p1x-bullet-3": "<strong>A validação </strong> do seu pagamento é instantânea!",
2034
2006
  "eligibility-modal.title-deferred-plan": "Pagar em prestações ou mais tarde por cartão de crédito com Alma.",
2035
2007
  "eligibility-modal.title-normal": "Pagar em prestações por cartão de crédito com Alma.",
2036
2008
  "installments.today": "Hoje",
@@ -2043,8 +2015,7 @@ var messagesPT = {
2043
2015
  "payment-plan-strings.ineligible-lower-than-min": "A partir de {minAmount}",
2044
2016
  "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
2045
2017
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
2046
- "payment-plan-strings.no-fee": "(sem encargos)",
2047
- "payment-plan-strings.pay-now": "Pague agora {totalAmount}"
2018
+ "payment-plan-strings.no-fee": "(sem encargos)"
2048
2019
  };
2049
2020
 
2050
2021
  const getTranslationsByLocale = locale => {
@@ -2154,13 +2125,15 @@ const getPaymentPlanBoundaries = (plan, configPlan) => {
2154
2125
  };
2155
2126
 
2156
2127
  const filterELigibility = (eligibilities, configPlans) => {
2157
- // If no configPlans was provided, return eligibility response
2128
+ // Remove p1x
2129
+ const filteredEligibilityPlans = eligibilities.filter(plan => !(plan.installments_count === 1 && plan.deferred_days === 0 && plan.deferred_months === 0)); // If no configPlans was provided, return eligibility response
2130
+
2158
2131
  if (!configPlans) {
2159
- return eligibilities;
2132
+ return filteredEligibilityPlans;
2160
2133
  } // Else check if the plan is eligible regarding the related configPlan
2161
2134
 
2162
2135
 
2163
- return eligibilities.map(plan => {
2136
+ return filteredEligibilityPlans.map(plan => {
2164
2137
  const eligibilityDeferredDays = (plan.deferred_months ? plan.deferred_months : 0) * 30 + (plan.deferred_days ? plan.deferred_days : 0); // find the related configPlan
2165
2138
 
2166
2139
  const relatedConfigPlan = configPlans.find(configPlan => {
@@ -2389,8 +2362,7 @@ const paymentPlanShorthandName = payment => {
2389
2362
  } = payment;
2390
2363
  const deferredDaysCount = deferred_days + deferred_months * 30;
2391
2364
 
2392
- if (installmentsCount === 1 && deferredDaysCount > 0) {
2393
- // For now there is no distinction between deferred days and deferred months, it will be J+ anyway
2365
+ if (installmentsCount === 1) {
2394
2366
  return /*#__PURE__*/React.createElement(FormattedMessage, {
2395
2367
  id: "payment-plan-strings.day-abbreviation",
2396
2368
  defaultMessage: "J{numberOfDeferredDays}",
@@ -2475,21 +2447,6 @@ const paymentPlanInfoText = payment => {
2475
2447
  } else if (installmentsCount > 0) {
2476
2448
  const areInstallmentsOfSameAmount = payment_plan == null ? void 0 : payment_plan.every((installment, index) => index === 0 || installment.total_amount === payment_plan[0].total_amount);
2477
2449
 
2478
- if (isP1X(payment)) {
2479
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, {
2480
- id: "payment-plan-strings.pay-now",
2481
- defaultMessage: "Payez maintenant {totalAmount}",
2482
- values: {
2483
- totalAmount: /*#__PURE__*/React.createElement(FormattedNumber, {
2484
- value: priceFromCents(payment_plan[0].total_amount),
2485
- style: "currency",
2486
- currency: "EUR"
2487
- }),
2488
- installmentsCount
2489
- }
2490
- }), withNoFee(payment));
2491
- }
2492
-
2493
2450
  if (areInstallmentsOfSameAmount) {
2494
2451
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, {
2495
2452
  id: "payment-plan-strings.multiple-installments-same-amount",
@@ -2785,12 +2742,7 @@ const Cards = ({
2785
2742
 
2786
2743
  var s$7 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
2787
2744
 
2788
- const Info = ({
2789
- isCurrentPlanP1X
2790
- }) =>
2791
- /*#__PURE__*/
2792
- // TODO: refactor this component into subcomponent to factorise code and be cleaner
2793
- React.createElement("div", {
2745
+ const Info = () => /*#__PURE__*/React.createElement("div", {
2794
2746
  className: cx(s$7.list, STATIC_CUSTOMISATION_CLASSES.info),
2795
2747
  "data-testid": "modal-info-element"
2796
2748
  }, /*#__PURE__*/React.createElement("div", {
@@ -2799,13 +2751,7 @@ React.createElement("div", {
2799
2751
  className: cx(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
2800
2752
  }, "1"), /*#__PURE__*/React.createElement("div", {
2801
2753
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2802
- }, isCurrentPlanP1X ? /*#__PURE__*/React.createElement(FormattedMessage, {
2803
- id: "eligibility-modal.p1x-bullet-1",
2804
- defaultMessage: "Choisissez <strong>Alma - 1X</strong> au moment du paiement.",
2805
- values: {
2806
- strong: (...chunks) => /*#__PURE__*/React.createElement("strong", null, chunks)
2807
- }
2808
- }) : /*#__PURE__*/React.createElement(FormattedMessage, {
2754
+ }, /*#__PURE__*/React.createElement(FormattedMessage, {
2809
2755
  id: "eligibility-modal.bullet-1",
2810
2756
  defaultMessage: "Choisissez <strong>Alma</strong> au moment du paiement.",
2811
2757
  values: {
@@ -2817,13 +2763,7 @@ React.createElement("div", {
2817
2763
  className: cx(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
2818
2764
  }, "2"), /*#__PURE__*/React.createElement("div", {
2819
2765
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2820
- }, isCurrentPlanP1X ? /*#__PURE__*/React.createElement(FormattedMessage, {
2821
- id: "eligibility-modal.p1x-bullet-2",
2822
- defaultMessage: "Renseignez les informations de votre <strong>carte bancaire.</strong>",
2823
- values: {
2824
- strong: (...chunks) => /*#__PURE__*/React.createElement("strong", null, chunks)
2825
- }
2826
- }) : /*#__PURE__*/React.createElement(FormattedMessage, {
2766
+ }, /*#__PURE__*/React.createElement(FormattedMessage, {
2827
2767
  id: "eligibility-modal.bullet-2",
2828
2768
  defaultMessage: "Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",
2829
2769
  values: {
@@ -2835,13 +2775,7 @@ React.createElement("div", {
2835
2775
  className: cx(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
2836
2776
  }, "3"), /*#__PURE__*/React.createElement("div", {
2837
2777
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2838
- }, isCurrentPlanP1X ? /*#__PURE__*/React.createElement(FormattedMessage, {
2839
- id: "eligibility-modal.p1x-bullet-3",
2840
- defaultMessage: "<strong>La validation </strong> de votre paiement est instantan\u00E9e !",
2841
- values: {
2842
- strong: (...chunks) => /*#__PURE__*/React.createElement("strong", null, chunks)
2843
- }
2844
- }) : /*#__PURE__*/React.createElement(FormattedMessage, {
2778
+ }, /*#__PURE__*/React.createElement(FormattedMessage, {
2845
2779
  id: "eligibility-modal.bullet-3",
2846
2780
  defaultMessage: "<strong>Gardez le contr\u00F4le</strong> en avan\u00E7ant ou reculant vos \u00E9ch\u00E9ances \u00E0 votre rythme.",
2847
2781
  values: {
@@ -2869,8 +2803,7 @@ var s$9 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC","logo":"_xW3wt"
2869
2803
  const DesktopModal = ({
2870
2804
  children,
2871
2805
  isSomePlanDeferred,
2872
- cards,
2873
- isCurrentPlanP1X
2806
+ cards
2874
2807
  }) => /*#__PURE__*/React.createElement("div", {
2875
2808
  className: cx(s$9.container, STATIC_CUSTOMISATION_CLASSES.desktopModal),
2876
2809
  "data-testid": "modal-container"
@@ -2878,9 +2811,7 @@ const DesktopModal = ({
2878
2811
  className: cx([s$9.block, s$9.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
2879
2812
  }, /*#__PURE__*/React.createElement(Title, {
2880
2813
  isSomePlanDeferred: isSomePlanDeferred
2881
- }), /*#__PURE__*/React.createElement(Info, {
2882
- isCurrentPlanP1X: isCurrentPlanP1X
2883
- }), cards && /*#__PURE__*/React.createElement(Cards, {
2814
+ }), /*#__PURE__*/React.createElement(Info, null), cards && /*#__PURE__*/React.createElement(Cards, {
2884
2815
  cards: cards
2885
2816
  }), /*#__PURE__*/React.createElement(AlmaLogo, {
2886
2817
  className: s$9.logo,
@@ -2896,16 +2827,13 @@ var s$b = {"container":"_2G7Ch","logo":"_2779r"};
2896
2827
  const MobileModal = ({
2897
2828
  children,
2898
2829
  isSomePlanDeferred,
2899
- cards,
2900
- isCurrentPlanP1X
2830
+ cards
2901
2831
  }) => /*#__PURE__*/React.createElement("div", {
2902
2832
  className: cx(s$b.container, STATIC_CUSTOMISATION_CLASSES.mobileModal),
2903
2833
  "data-testid": "modal-container"
2904
2834
  }, /*#__PURE__*/React.createElement(Title, {
2905
2835
  isSomePlanDeferred: isSomePlanDeferred
2906
- }), children, /*#__PURE__*/React.createElement(Info, {
2907
- isCurrentPlanP1X: isCurrentPlanP1X
2908
- }), cards && /*#__PURE__*/React.createElement(Cards, {
2836
+ }), children, /*#__PURE__*/React.createElement(Info, null), cards && /*#__PURE__*/React.createElement(Cards, {
2909
2837
  cards: cards
2910
2838
  }), /*#__PURE__*/React.createElement(AlmaLogo, {
2911
2839
  className: s$b.logo,
@@ -2934,8 +2862,7 @@ const EligibilityModal = ({
2934
2862
  isOpen: true
2935
2863
  }, /*#__PURE__*/React.createElement(ModalComponent, {
2936
2864
  isSomePlanDeferred: isSomePlanDeferred,
2937
- cards: cards,
2938
- isCurrentPlanP1X: isP1X(currentPlan)
2865
+ cards: cards
2939
2866
  }, status === apiStatus.PENDING && /*#__PURE__*/React.createElement("div", {
2940
2867
  className: s$a.loader
2941
2868
  }, /*#__PURE__*/React.createElement(LoadingIndicator, null)), status === apiStatus.SUCCESS && eligiblePlans.length === 0 && /*#__PURE__*/React.createElement("div", {
@@ -3045,9 +2972,7 @@ const getIndexOfActivePlan = ({
3045
2972
  for (const index in suggestedPaymentPlanArray) {
3046
2973
  const installmentsCount = suggestedPaymentPlanArray[index];
3047
2974
  const planFound = eligibilityPlans.findIndex(plan => {
3048
- return plan.installments_count === installmentsCount && plan.eligible && // Remove the PayLater plans from the plan to target, we will code a better solution later
3049
- // To differentiate P1X from PayLater while using the `suggestedPaymentPlan` property.
3050
- !plan.deferred_days && !plan.deferred_months;
2975
+ return plan.installments_count === installmentsCount && plan.eligible;
3051
2976
  });
3052
2977
 
3053
2978
  if (planFound !== -1) {
@@ -3078,7 +3003,7 @@ const STATIC_CUSTOMISATION_CLASSES$1 = {
3078
3003
 
3079
3004
  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"};
3080
3005
 
3081
- const VERY_LONG_TIME_IN_MS = 1000 * 3600;
3006
+ const VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
3082
3007
  const DEFAULT_TRANSITION_TIME = 5500;
3083
3008
 
3084
3009
  const PaymentPlanWidget = ({