@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.js
CHANGED
|
@@ -1554,9 +1554,6 @@ function formatCents(cents) {
|
|
|
1554
1554
|
return String(priceFromCents(cents)).replace('.', ',');
|
|
1555
1555
|
}
|
|
1556
1556
|
var desktopWidth = 800;
|
|
1557
|
-
var isP1X = function isP1X(plan) {
|
|
1558
|
-
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;
|
|
1559
|
-
};
|
|
1560
1557
|
|
|
1561
1558
|
/* eslint-disable */
|
|
1562
1559
|
|
|
@@ -1891,9 +1888,6 @@ var messagesDE = {
|
|
|
1891
1888
|
"eligibility-modal.bullet-2": "Lassen Sie sich führen und bestätigen Sie Ihre Zahlung in <strong>2 Minuten.</strong>",
|
|
1892
1889
|
"eligibility-modal.bullet-3": "<strong>Behalten Sie die Kontrolle</strong> , indem Sie Ihre Fristen in Ihrem eigenen Tempo vor- oder zurückverlegen.",
|
|
1893
1890
|
"eligibility-modal.no-eligibility": "Ups, die Prüfung hat anscheinend nicht funktioniert.",
|
|
1894
|
-
"eligibility-modal.p1x-bullet-1": "Wählen Sie <strong>Alma - 1X</strong> bei der Bezahlung.",
|
|
1895
|
-
"eligibility-modal.p1x-bullet-2": "Füllen Sie die Informationen auf Ihrer <strong>Kreditkarte aus.</strong>",
|
|
1896
|
-
"eligibility-modal.p1x-bullet-3": "<strong>Die Bestätigung </strong> Ihrer Zahlung erfolgt sofort!",
|
|
1897
1891
|
"eligibility-modal.title-deferred-plan": "Zahlen Sie mit Alma in Raten oder später.",
|
|
1898
1892
|
"eligibility-modal.title-normal": "Zahlen Sie mit Alma in mehreren Raten.",
|
|
1899
1893
|
"installments.today": "Heute",
|
|
@@ -1906,8 +1900,7 @@ var messagesDE = {
|
|
|
1906
1900
|
"payment-plan-strings.ineligible-lower-than-min": "Ab {minAmount}",
|
|
1907
1901
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
1908
1902
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
1909
|
-
"payment-plan-strings.no-fee": "(0% Finanzierung)"
|
|
1910
|
-
"payment-plan-strings.pay-now": "Bezahlen Sie jetzt {totalAmount}"
|
|
1903
|
+
"payment-plan-strings.no-fee": "(0% Finanzierung)"
|
|
1911
1904
|
};
|
|
1912
1905
|
|
|
1913
1906
|
var messagesEN = {
|
|
@@ -1918,9 +1911,6 @@ var messagesEN = {
|
|
|
1918
1911
|
"eligibility-modal.bullet-2": "Let us guide you and validate your payment in <strong>2 minutes.</strong>",
|
|
1919
1912
|
"eligibility-modal.bullet-3": "<strong>Stay in control</strong> by moving your deadlines forward or backward at your own pace.",
|
|
1920
1913
|
"eligibility-modal.no-eligibility": "Oops, looks like the simulation didn't work.",
|
|
1921
|
-
"eligibility-modal.p1x-bullet-1": "Choose <strong>Alma - 1X</strong> at checkout.",
|
|
1922
|
-
"eligibility-modal.p1x-bullet-2": "Fill in your <strong>credit card information.</strong>",
|
|
1923
|
-
"eligibility-modal.p1x-bullet-3": "<strong>The validation </strong> of your payment is instantaneous!",
|
|
1924
1914
|
"eligibility-modal.title-deferred-plan": "Pay in installments or later by credit card with Alma.",
|
|
1925
1915
|
"eligibility-modal.title-normal": "Pay in installments by credit card with Alma.",
|
|
1926
1916
|
"installments.today": "Today",
|
|
@@ -1933,8 +1923,7 @@ var messagesEN = {
|
|
|
1933
1923
|
"payment-plan-strings.ineligible-lower-than-min": "From {minAmount}",
|
|
1934
1924
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
1935
1925
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
1936
|
-
"payment-plan-strings.no-fee": "(free of charge)"
|
|
1937
|
-
"payment-plan-strings.pay-now": "Pay now {totalAmount}"
|
|
1926
|
+
"payment-plan-strings.no-fee": "(free of charge)"
|
|
1938
1927
|
};
|
|
1939
1928
|
|
|
1940
1929
|
var messagesES = {
|
|
@@ -1945,9 +1934,6 @@ var messagesES = {
|
|
|
1945
1934
|
"eligibility-modal.bullet-2": "Déjese guiar y valide su pago en <strong>2 minutos.</strong>",
|
|
1946
1935
|
"eligibility-modal.bullet-3": "<strong>Mantenga el control</strong> adelantando o retrasando los plazos a su propio ritmo.",
|
|
1947
1936
|
"eligibility-modal.no-eligibility": "Uy, parece que la simulación no ha funcionado.",
|
|
1948
|
-
"eligibility-modal.p1x-bullet-1": "Elija <strong>Alma - 1X</strong> en la caja.",
|
|
1949
|
-
"eligibility-modal.p1x-bullet-2": "Introduzca los datos de su tarjeta de crédito en <strong>.</strong>",
|
|
1950
|
-
"eligibility-modal.p1x-bullet-3": "<strong>¡La validación </strong> de su pago es instantánea!",
|
|
1951
1937
|
"eligibility-modal.title-deferred-plan": "Paga a plazos o posteriormente con tarjeta bancaria con Alma.",
|
|
1952
1938
|
"eligibility-modal.title-normal": "Pagar a plazos con tarjeta bancaria con Alma.",
|
|
1953
1939
|
"installments.today": "Hoy",
|
|
@@ -1960,8 +1946,7 @@ var messagesES = {
|
|
|
1960
1946
|
"payment-plan-strings.ineligible-lower-than-min": "Desde {minAmount}",
|
|
1961
1947
|
"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}}}",
|
|
1962
1948
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} plazos de {totalAmount}",
|
|
1963
|
-
"payment-plan-strings.no-fee": "(sin intereses)"
|
|
1964
|
-
"payment-plan-strings.pay-now": "Pague ahora {totalAmount}"
|
|
1949
|
+
"payment-plan-strings.no-fee": "(sin intereses)"
|
|
1965
1950
|
};
|
|
1966
1951
|
|
|
1967
1952
|
var messagesFR = {
|
|
@@ -1972,9 +1957,6 @@ var messagesFR = {
|
|
|
1972
1957
|
"eligibility-modal.bullet-2": "Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",
|
|
1973
1958
|
"eligibility-modal.bullet-3": "<strong>Gardez le contrôle</strong> en avançant ou reculant vos échéances à votre rythme.",
|
|
1974
1959
|
"eligibility-modal.no-eligibility": "Oups, il semblerait que la simulation n'ait pas fonctionné.",
|
|
1975
|
-
"eligibility-modal.p1x-bullet-1": "Choisissez <strong>Alma - 1X</strong> au moment du paiement.",
|
|
1976
|
-
"eligibility-modal.p1x-bullet-2": "Renseignez les informations de votre <strong>carte bancaire.</strong>",
|
|
1977
|
-
"eligibility-modal.p1x-bullet-3": "<strong>La validation </strong> de votre paiement est instantanée !",
|
|
1978
1960
|
"eligibility-modal.title-deferred-plan": "Payez en plusieurs fois ou plus tard par carte bancaire avec Alma.",
|
|
1979
1961
|
"eligibility-modal.title-normal": "Payez en plusieurs fois par carte bancaire avec Alma.",
|
|
1980
1962
|
"installments.today": "Aujourd'hui",
|
|
@@ -1987,8 +1969,7 @@ var messagesFR = {
|
|
|
1987
1969
|
"payment-plan-strings.ineligible-lower-than-min": "À partir de {minAmount}",
|
|
1988
1970
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
1989
1971
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
1990
|
-
"payment-plan-strings.no-fee": "(sans frais)"
|
|
1991
|
-
"payment-plan-strings.pay-now": "Payez maintenant {totalAmount}"
|
|
1972
|
+
"payment-plan-strings.no-fee": "(sans frais)"
|
|
1992
1973
|
};
|
|
1993
1974
|
|
|
1994
1975
|
var messagesIT = {
|
|
@@ -1999,9 +1980,6 @@ var messagesIT = {
|
|
|
1999
1980
|
"eligibility-modal.bullet-2": "Lasciatevi guidare e convalidate il pagamento in <strong>2 minuti.</strong>",
|
|
2000
1981
|
"eligibility-modal.bullet-3": "<strong>Mantenete il controllo</strong> spostando le scadenze in avanti o indietro al vostro ritmo.",
|
|
2001
1982
|
"eligibility-modal.no-eligibility": "Ops, sembra che qualcosa non abbia funzionato.",
|
|
2002
|
-
"eligibility-modal.p1x-bullet-1": "Scegliere <strong>Alma - 1X</strong> alla cassa.",
|
|
2003
|
-
"eligibility-modal.p1x-bullet-2": "Compilare i dati della carta di credito <strong>.</strong>",
|
|
2004
|
-
"eligibility-modal.p1x-bullet-3": "<strong>La convalida </strong> del vostro pagamento è istantanea!",
|
|
2005
1983
|
"eligibility-modal.title-deferred-plan": "Paga a rate o posticipa il pagamento con Alma, senza registrazione.",
|
|
2006
1984
|
"eligibility-modal.title-normal": "Paga a rate con Alma, senza registrazione.",
|
|
2007
1985
|
"installments.today": "Oggi",
|
|
@@ -2014,8 +1992,7 @@ var messagesIT = {
|
|
|
2014
1992
|
"payment-plan-strings.ineligible-lower-than-min": "Pagamento rateale disponibile a partire da {minAmount}",
|
|
2015
1993
|
"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}}}",
|
|
2016
1994
|
"payment-plan-strings.multiple-installments-same-amount": "In {installmentsCount} rate mensili di {totalAmount}",
|
|
2017
|
-
"payment-plan-strings.no-fee": "(senza interessi)"
|
|
2018
|
-
"payment-plan-strings.pay-now": "Paga ora {totalAmount}"
|
|
1995
|
+
"payment-plan-strings.no-fee": "(senza interessi)"
|
|
2019
1996
|
};
|
|
2020
1997
|
|
|
2021
1998
|
var messagesNL = {
|
|
@@ -2026,9 +2003,6 @@ var messagesNL = {
|
|
|
2026
2003
|
"eligibility-modal.bullet-2": "Laat ons u begeleiden en uw betaling valideren in <strong>2 minuten.</strong>",
|
|
2027
2004
|
"eligibility-modal.bullet-3": "<strong>Houd de controle op</strong> door uw deadlines in uw eigen tempo vooruit of achteruit te schuiven.",
|
|
2028
2005
|
"eligibility-modal.no-eligibility": "Oeps, het lijkt erop dat de simulatie niet werkte.",
|
|
2029
|
-
"eligibility-modal.p1x-bullet-1": "Kies <strong>Alma - 1X</strong> bij het afrekenen.",
|
|
2030
|
-
"eligibility-modal.p1x-bullet-2": "Vul uw <strong>creditcardgegevens in.</strong>",
|
|
2031
|
-
"eligibility-modal.p1x-bullet-3": "<strong>De validatie </strong> van uw betaling is onmiddellijk!",
|
|
2032
2006
|
"eligibility-modal.title-deferred-plan": "Betaal in termijnen of later per creditcard met Alma.",
|
|
2033
2007
|
"eligibility-modal.title-normal": "Betaal in termijnen met een creditcard bij Alma.",
|
|
2034
2008
|
"installments.today": "Tegenwoordig",
|
|
@@ -2041,8 +2015,7 @@ var messagesNL = {
|
|
|
2041
2015
|
"payment-plan-strings.ineligible-lower-than-min": "Van {minAmount}",
|
|
2042
2016
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
2043
2017
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
2044
|
-
"payment-plan-strings.no-fee": "(zonder kosten)"
|
|
2045
|
-
"payment-plan-strings.pay-now": "Betaal nu {totalAmount}"
|
|
2018
|
+
"payment-plan-strings.no-fee": "(zonder kosten)"
|
|
2046
2019
|
};
|
|
2047
2020
|
|
|
2048
2021
|
var messagesPT = {
|
|
@@ -2053,9 +2026,6 @@ var messagesPT = {
|
|
|
2053
2026
|
"eligibility-modal.bullet-2": "Deixe-nos guiá-lo e validar o seu pagamento em <strong>2 minutos.</strong>",
|
|
2054
2027
|
"eligibility-modal.bullet-3": "<strong>Mantenha-se em controlo</strong> avançando ou recuando os seus prazos ao seu próprio ritmo.",
|
|
2055
2028
|
"eligibility-modal.no-eligibility": "Ups, parece que a simulação não funcionou.",
|
|
2056
|
-
"eligibility-modal.p1x-bullet-1": "Escolher <strong>Alma - 1X</strong> no checkout.",
|
|
2057
|
-
"eligibility-modal.p1x-bullet-2": "Preencha as informações do seu <strong>cartão de crédito.</strong>",
|
|
2058
|
-
"eligibility-modal.p1x-bullet-3": "<strong>A validação </strong> do seu pagamento é instantânea!",
|
|
2059
2029
|
"eligibility-modal.title-deferred-plan": "Pagar em prestações ou mais tarde por cartão de crédito com Alma.",
|
|
2060
2030
|
"eligibility-modal.title-normal": "Pagar em prestações por cartão de crédito com Alma.",
|
|
2061
2031
|
"installments.today": "Hoje",
|
|
@@ -2068,8 +2038,7 @@ var messagesPT = {
|
|
|
2068
2038
|
"payment-plan-strings.ineligible-lower-than-min": "A partir de {minAmount}",
|
|
2069
2039
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
2070
2040
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
2071
|
-
"payment-plan-strings.no-fee": "(sem encargos)"
|
|
2072
|
-
"payment-plan-strings.pay-now": "Pague agora {totalAmount}"
|
|
2041
|
+
"payment-plan-strings.no-fee": "(sem encargos)"
|
|
2073
2042
|
};
|
|
2074
2043
|
|
|
2075
2044
|
var getTranslationsByLocale = function getTranslationsByLocale(locale) {
|
|
@@ -2189,13 +2158,17 @@ var getPaymentPlanBoundaries = function getPaymentPlanBoundaries(plan, configPla
|
|
|
2189
2158
|
};
|
|
2190
2159
|
|
|
2191
2160
|
var filterELigibility = function filterELigibility(eligibilities, configPlans) {
|
|
2192
|
-
//
|
|
2161
|
+
// Remove p1x
|
|
2162
|
+
var filteredEligibilityPlans = eligibilities.filter(function (plan) {
|
|
2163
|
+
return !(plan.installments_count === 1 && plan.deferred_days === 0 && plan.deferred_months === 0);
|
|
2164
|
+
}); // If no configPlans was provided, return eligibility response
|
|
2165
|
+
|
|
2193
2166
|
if (!configPlans) {
|
|
2194
|
-
return
|
|
2167
|
+
return filteredEligibilityPlans;
|
|
2195
2168
|
} // Else check if the plan is eligible regarding the related configPlan
|
|
2196
2169
|
|
|
2197
2170
|
|
|
2198
|
-
return
|
|
2171
|
+
return filteredEligibilityPlans.map(function (plan) {
|
|
2199
2172
|
var eligibilityDeferredDays = (plan.deferred_months ? plan.deferred_months : 0) * 30 + (plan.deferred_days ? plan.deferred_days : 0); // find the related configPlan
|
|
2200
2173
|
|
|
2201
2174
|
var relatedConfigPlan = configPlans.find(function (configPlan) {
|
|
@@ -2429,8 +2402,7 @@ var paymentPlanShorthandName = function paymentPlanShorthandName(payment) {
|
|
|
2429
2402
|
installmentsCount = payment.installments_count;
|
|
2430
2403
|
var deferredDaysCount = deferred_days + deferred_months * 30;
|
|
2431
2404
|
|
|
2432
|
-
if (installmentsCount === 1
|
|
2433
|
-
// For now there is no distinction between deferred days and deferred months, it will be J+ anyway
|
|
2405
|
+
if (installmentsCount === 1) {
|
|
2434
2406
|
return /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2435
2407
|
id: "payment-plan-strings.day-abbreviation",
|
|
2436
2408
|
defaultMessage: "J{numberOfDeferredDays}",
|
|
@@ -2519,21 +2491,6 @@ var paymentPlanInfoText = function paymentPlanInfoText(payment) {
|
|
|
2519
2491
|
return index === 0 || installment.total_amount === payment_plan[0].total_amount;
|
|
2520
2492
|
});
|
|
2521
2493
|
|
|
2522
|
-
if (isP1X(payment)) {
|
|
2523
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2524
|
-
id: "payment-plan-strings.pay-now",
|
|
2525
|
-
defaultMessage: "Payez maintenant {totalAmount}",
|
|
2526
|
-
values: {
|
|
2527
|
-
totalAmount: /*#__PURE__*/React__default.createElement(reactIntl.FormattedNumber, {
|
|
2528
|
-
value: priceFromCents(payment_plan[0].total_amount),
|
|
2529
|
-
style: "currency",
|
|
2530
|
-
currency: "EUR"
|
|
2531
|
-
}),
|
|
2532
|
-
installmentsCount: installmentsCount
|
|
2533
|
-
}
|
|
2534
|
-
}), withNoFee(payment));
|
|
2535
|
-
}
|
|
2536
|
-
|
|
2537
2494
|
if (areInstallmentsOfSameAmount) {
|
|
2538
2495
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2539
2496
|
id: "payment-plan-strings.multiple-installments-same-amount",
|
|
@@ -2840,82 +2797,53 @@ var Cards = function Cards(_ref) {
|
|
|
2840
2797
|
|
|
2841
2798
|
var s$7 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
|
|
2842
2799
|
|
|
2843
|
-
var Info = function Info(
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
defaultMessage: "Choisissez <strong>Alma - 1X</strong> au moment du paiement.",
|
|
2860
|
-
values: {
|
|
2861
|
-
strong: function strong() {
|
|
2862
|
-
return /*#__PURE__*/React__default.createElement("strong", null, [].slice.call(arguments));
|
|
2863
|
-
}
|
|
2864
|
-
}
|
|
2865
|
-
}) : /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2866
|
-
id: "eligibility-modal.bullet-1",
|
|
2867
|
-
defaultMessage: "Choisissez <strong>Alma</strong> au moment du paiement.",
|
|
2868
|
-
values: {
|
|
2869
|
-
strong: function strong() {
|
|
2870
|
-
return /*#__PURE__*/React__default.createElement("strong", null, [].slice.call(arguments));
|
|
2871
|
-
}
|
|
2872
|
-
}
|
|
2873
|
-
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
2874
|
-
className: s$7.listItem
|
|
2875
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2876
|
-
className: cx(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
2877
|
-
}, "2"), /*#__PURE__*/React__default.createElement("div", {
|
|
2878
|
-
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2879
|
-
}, isCurrentPlanP1X ? /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2880
|
-
id: "eligibility-modal.p1x-bullet-2",
|
|
2881
|
-
defaultMessage: "Renseignez les informations de votre <strong>carte bancaire.</strong>",
|
|
2882
|
-
values: {
|
|
2883
|
-
strong: function strong() {
|
|
2884
|
-
return /*#__PURE__*/React__default.createElement("strong", null, [].slice.call(arguments));
|
|
2885
|
-
}
|
|
2886
|
-
}
|
|
2887
|
-
}) : /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2888
|
-
id: "eligibility-modal.bullet-2",
|
|
2889
|
-
defaultMessage: "Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",
|
|
2890
|
-
values: {
|
|
2891
|
-
strong: function strong() {
|
|
2892
|
-
return /*#__PURE__*/React__default.createElement("strong", null, [].slice.call(arguments));
|
|
2893
|
-
}
|
|
2800
|
+
var Info = function Info() {
|
|
2801
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
2802
|
+
className: cx(s$7.list, STATIC_CUSTOMISATION_CLASSES.info),
|
|
2803
|
+
"data-testid": "modal-info-element"
|
|
2804
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2805
|
+
className: s$7.listItem
|
|
2806
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2807
|
+
className: cx(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
2808
|
+
}, "1"), /*#__PURE__*/React__default.createElement("div", {
|
|
2809
|
+
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2810
|
+
}, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2811
|
+
id: "eligibility-modal.bullet-1",
|
|
2812
|
+
defaultMessage: "Choisissez <strong>Alma</strong> au moment du paiement.",
|
|
2813
|
+
values: {
|
|
2814
|
+
strong: function strong() {
|
|
2815
|
+
return /*#__PURE__*/React__default.createElement("strong", null, [].slice.call(arguments));
|
|
2894
2816
|
}
|
|
2895
|
-
}
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2817
|
+
}
|
|
2818
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
2819
|
+
className: s$7.listItem
|
|
2820
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2821
|
+
className: cx(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
2822
|
+
}, "2"), /*#__PURE__*/React__default.createElement("div", {
|
|
2823
|
+
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2824
|
+
}, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2825
|
+
id: "eligibility-modal.bullet-2",
|
|
2826
|
+
defaultMessage: "Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",
|
|
2827
|
+
values: {
|
|
2828
|
+
strong: function strong() {
|
|
2829
|
+
return /*#__PURE__*/React__default.createElement("strong", null, [].slice.call(arguments));
|
|
2908
2830
|
}
|
|
2909
|
-
}
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2831
|
+
}
|
|
2832
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
2833
|
+
className: s$7.listItem
|
|
2834
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2835
|
+
className: cx(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
2836
|
+
}, "3"), /*#__PURE__*/React__default.createElement("div", {
|
|
2837
|
+
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2838
|
+
}, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2839
|
+
id: "eligibility-modal.bullet-3",
|
|
2840
|
+
defaultMessage: "<strong>Gardez le contr\xF4le</strong> en avan\xE7ant ou reculant vos \xE9ch\xE9ances \xE0 votre rythme.",
|
|
2841
|
+
values: {
|
|
2842
|
+
strong: function strong() {
|
|
2843
|
+
return /*#__PURE__*/React__default.createElement("strong", null, [].slice.call(arguments));
|
|
2916
2844
|
}
|
|
2917
|
-
}
|
|
2918
|
-
);
|
|
2845
|
+
}
|
|
2846
|
+
}))));
|
|
2919
2847
|
};
|
|
2920
2848
|
|
|
2921
2849
|
var s$8 = {"title":"_3ERx-"};
|
|
@@ -2939,8 +2867,7 @@ var s$9 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC","logo":"_xW3wt"
|
|
|
2939
2867
|
var DesktopModal = function DesktopModal(_ref) {
|
|
2940
2868
|
var children = _ref.children,
|
|
2941
2869
|
isSomePlanDeferred = _ref.isSomePlanDeferred,
|
|
2942
|
-
cards = _ref.cards
|
|
2943
|
-
isCurrentPlanP1X = _ref.isCurrentPlanP1X;
|
|
2870
|
+
cards = _ref.cards;
|
|
2944
2871
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2945
2872
|
className: cx(s$9.container, STATIC_CUSTOMISATION_CLASSES.desktopModal),
|
|
2946
2873
|
"data-testid": "modal-container"
|
|
@@ -2948,9 +2875,7 @@ var DesktopModal = function DesktopModal(_ref) {
|
|
|
2948
2875
|
className: cx([s$9.block, s$9.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
|
|
2949
2876
|
}, /*#__PURE__*/React__default.createElement(Title, {
|
|
2950
2877
|
isSomePlanDeferred: isSomePlanDeferred
|
|
2951
|
-
}), /*#__PURE__*/React__default.createElement(Info, {
|
|
2952
|
-
isCurrentPlanP1X: isCurrentPlanP1X
|
|
2953
|
-
}), cards && /*#__PURE__*/React__default.createElement(Cards, {
|
|
2878
|
+
}), /*#__PURE__*/React__default.createElement(Info, null), cards && /*#__PURE__*/React__default.createElement(Cards, {
|
|
2954
2879
|
cards: cards
|
|
2955
2880
|
}), /*#__PURE__*/React__default.createElement(AlmaLogo, {
|
|
2956
2881
|
className: s$9.logo,
|
|
@@ -2967,16 +2892,13 @@ var s$b = {"container":"_2G7Ch","logo":"_2779r"};
|
|
|
2967
2892
|
var MobileModal = function MobileModal(_ref) {
|
|
2968
2893
|
var children = _ref.children,
|
|
2969
2894
|
isSomePlanDeferred = _ref.isSomePlanDeferred,
|
|
2970
|
-
cards = _ref.cards
|
|
2971
|
-
isCurrentPlanP1X = _ref.isCurrentPlanP1X;
|
|
2895
|
+
cards = _ref.cards;
|
|
2972
2896
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2973
2897
|
className: cx(s$b.container, STATIC_CUSTOMISATION_CLASSES.mobileModal),
|
|
2974
2898
|
"data-testid": "modal-container"
|
|
2975
2899
|
}, /*#__PURE__*/React__default.createElement(Title, {
|
|
2976
2900
|
isSomePlanDeferred: isSomePlanDeferred
|
|
2977
|
-
}), children, /*#__PURE__*/React__default.createElement(Info, {
|
|
2978
|
-
isCurrentPlanP1X: isCurrentPlanP1X
|
|
2979
|
-
}), cards && /*#__PURE__*/React__default.createElement(Cards, {
|
|
2901
|
+
}), children, /*#__PURE__*/React__default.createElement(Info, null), cards && /*#__PURE__*/React__default.createElement(Cards, {
|
|
2980
2902
|
cards: cards
|
|
2981
2903
|
}), /*#__PURE__*/React__default.createElement(AlmaLogo, {
|
|
2982
2904
|
className: s$b.logo,
|
|
@@ -3013,8 +2935,7 @@ var EligibilityModal = function EligibilityModal(_ref) {
|
|
|
3013
2935
|
isOpen: true
|
|
3014
2936
|
}, /*#__PURE__*/React__default.createElement(ModalComponent, {
|
|
3015
2937
|
isSomePlanDeferred: isSomePlanDeferred,
|
|
3016
|
-
cards: cards
|
|
3017
|
-
isCurrentPlanP1X: isP1X(currentPlan)
|
|
2938
|
+
cards: cards
|
|
3018
2939
|
}, status === apiStatus.PENDING && /*#__PURE__*/React__default.createElement("div", {
|
|
3019
2940
|
className: s$a.loader
|
|
3020
2941
|
}, /*#__PURE__*/React__default.createElement(LoadingIndicator, null)), status === apiStatus.SUCCESS && eligiblePlans.length === 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -3131,9 +3052,7 @@ var getIndexOfActivePlan = function getIndexOfActivePlan(_ref) {
|
|
|
3131
3052
|
var _loop = function _loop(index) {
|
|
3132
3053
|
var installmentsCount = suggestedPaymentPlanArray[index];
|
|
3133
3054
|
var planFound = eligibilityPlans.findIndex(function (plan) {
|
|
3134
|
-
return plan.installments_count === installmentsCount && plan.eligible
|
|
3135
|
-
// To differentiate P1X from PayLater while using the `suggestedPaymentPlan` property.
|
|
3136
|
-
!plan.deferred_days && !plan.deferred_months;
|
|
3055
|
+
return plan.installments_count === installmentsCount && plan.eligible;
|
|
3137
3056
|
});
|
|
3138
3057
|
|
|
3139
3058
|
if (planFound !== -1) {
|
|
@@ -3172,7 +3091,7 @@ var STATIC_CUSTOMISATION_CLASSES$1 = {
|
|
|
3172
3091
|
|
|
3173
3092
|
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"};
|
|
3174
3093
|
|
|
3175
|
-
var VERY_LONG_TIME_IN_MS = 1000 * 3600;
|
|
3094
|
+
var VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
|
|
3176
3095
|
var DEFAULT_TRANSITION_TIME = 5500;
|
|
3177
3096
|
|
|
3178
3097
|
var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|