@alma/widgets 2.12.2 → 3.0.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/README.md +2 -2
- package/dist/assets/fonts/ArgentCF-DemiBold.eot +0 -0
- package/dist/assets/fonts/ArgentCF-DemiBold.ttf +0 -0
- package/dist/assets/fonts/ArgentCF-DemiBold.woff +0 -0
- package/dist/assets/fonts/ArgentCF-DemiBold.woff2 +0 -0
- package/dist/assets/fonts/Venn-Bold.eot +0 -0
- package/dist/assets/fonts/Venn-Bold.ttf +0 -0
- package/dist/assets/fonts/Venn-Bold.woff +0 -0
- package/dist/assets/fonts/Venn-Bold.woff2 +0 -0
- package/dist/assets/fonts/Venn-Regular.eot +0 -0
- package/dist/assets/fonts/Venn-Regular.ttf +0 -0
- package/dist/assets/fonts/Venn-Regular.woff +0 -0
- package/dist/assets/fonts/Venn-Regular.woff2 +0 -0
- package/dist/raw/widgets.css +260 -293
- package/dist/raw/widgets.js +269 -265
- package/dist/raw/widgets.js.map +1 -1
- package/dist/raw/widgets.m.js +270 -266
- package/dist/raw/widgets.m.js.map +1 -1
- package/dist/raw/widgets.modern.js +278 -264
- package/dist/raw/widgets.modern.js.map +1 -1
- package/dist/raw/widgets.umd.js +273 -269
- package/dist/raw/widgets.umd.js.map +1 -1
- package/dist/types/assets/almaLogo.d.ts +6 -0
- package/dist/types/components/Installments/Installment/index.d.ts +8 -0
- package/dist/types/components/Installments/TotalBlock/index.d.ts +6 -0
- package/dist/types/components/LoadingIndicator/LoadingIndicator.d.ts +4 -0
- package/dist/widgets.css +15 -14
- 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/assets/fonts/Eina04-Bold.ttf +0 -0
- package/dist/assets/fonts/Eina04-Bold.woff +0 -0
- package/dist/assets/fonts/PublicSans-VariableFont_wght.ttf +0 -0
- package/dist/types/Widgets/EligibilityModal/components/Logo/index.d.ts +0 -3
- package/dist/types/assets/Logo.d.ts +0 -9
- package/dist/types/components/LoadingIndicator/index.d.ts +0 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import { IntlProvider, FormattedMessage, FormattedNumber, FormattedDate
|
|
2
|
+
import { IntlProvider, useIntl, FormattedMessage, FormattedNumber, FormattedDate } from 'react-intl';
|
|
3
3
|
import { unmountComponentAtNode, render } from 'react-dom';
|
|
4
4
|
import cx from 'classnames';
|
|
5
5
|
import Modal from 'react-modal';
|
|
@@ -1853,18 +1853,18 @@ if (!''.trim) String.prototype.trim = function () {
|
|
|
1853
1853
|
})(window);
|
|
1854
1854
|
|
|
1855
1855
|
var messagesDE = {
|
|
1856
|
-
"
|
|
1856
|
+
"credit-features.credit-cost-display": "{creditCost} (APR {taegPercentage})",
|
|
1857
|
+
"credit-features.information": "Ein Kredit verpflichtet Sie und muss zurückgezahlt werden. Prüfen Sie Ihre Rückzahlungsfähigkeit, bevor Sie sich verpflichten.",
|
|
1858
|
+
"credit-features.total-credit-cost": "Davon Kreditkosten",
|
|
1859
|
+
"eligibility-modal.bullet-1": "Wählen Sie <strong>Alma</strong> bei der Bezahlung.",
|
|
1857
1860
|
"eligibility-modal.bullet-2": "Füllen Sie die <strong>angeforderten</strong> Informationen aus.",
|
|
1858
|
-
"eligibility-modal.bullet-3": "
|
|
1859
|
-
"eligibility-modal.cost": "Davon Kosten",
|
|
1860
|
-
"eligibility-modal.credit-commitment": "Ein Kredit verpflichtet Sie und muss zurückgezahlt werden. Prüfen Sie Ihre Rückzahlungsfähigkeit, bevor Sie sich verpflichten.",
|
|
1861
|
-
"eligibility-modal.credit-cost": "Davon Kreditkosten",
|
|
1862
|
-
"eligibility-modal.credit-cost-amount": "{creditCost} (APR {TAEG})",
|
|
1861
|
+
"eligibility-modal.bullet-3": "Ihre Zahlung wird <strong>sofort</strong> bestätigt!",
|
|
1863
1862
|
"eligibility-modal.no-eligibility": "Ups, die Simulation hat anscheinend nicht funktioniert.",
|
|
1864
|
-
"eligibility-modal.title": "
|
|
1865
|
-
"eligibility-modal.title-
|
|
1866
|
-
"eligibility-modal.total": "Insgesamt",
|
|
1863
|
+
"eligibility-modal.title-deferred-plan": "Bezahlen Sie mit Alma in Raten oder später per Kreditkarte.",
|
|
1864
|
+
"eligibility-modal.title-normal": "Bezahlen Sie mit Alma in mehreren Raten per Kreditkarte.",
|
|
1867
1865
|
"installments.today": "Heute",
|
|
1866
|
+
"installments.total-amount": "Gesamtsumme",
|
|
1867
|
+
"installments.total-fees": "Davon Kosten (inkl. MwSt.)",
|
|
1868
1868
|
"payment-plan-strings.day-abbreviation": "T{numberOfDeferredDays}",
|
|
1869
1869
|
"payment-plan-strings.default-message": "Bezahlen Sie in Raten mit Alma",
|
|
1870
1870
|
"payment-plan-strings.deferred": "{totalAmount} zu zahlen am {dueDate}",
|
|
@@ -1876,18 +1876,18 @@ var messagesDE = {
|
|
|
1876
1876
|
};
|
|
1877
1877
|
|
|
1878
1878
|
var messagesEN = {
|
|
1879
|
+
"credit-features.credit-cost-display": "{creditCost} (APR {taegPercentage})",
|
|
1880
|
+
"credit-features.information": "A loan commits you and must be repaid. Check your ability to repay before committing yourself.",
|
|
1881
|
+
"credit-features.total-credit-cost": "Of which cost of credit",
|
|
1879
1882
|
"eligibility-modal.bullet-1": "Choose <strong>Alma</strong> at checkout.",
|
|
1880
1883
|
"eligibility-modal.bullet-2": "Fill in the <strong>information</strong> requested.",
|
|
1881
1884
|
"eligibility-modal.bullet-3": "The validation of your payment is <strong>instantaneous</strong> !",
|
|
1882
|
-
"eligibility-modal.cost": "Of which costs",
|
|
1883
|
-
"eligibility-modal.credit-commitment": "A loan commits you and must be repaid. Check your ability to repay before committing yourself.",
|
|
1884
|
-
"eligibility-modal.credit-cost": "Of which cost of credit",
|
|
1885
|
-
"eligibility-modal.credit-cost-amount": "{creditCost} (APR {TAEG})",
|
|
1886
1885
|
"eligibility-modal.no-eligibility": "Oops, looks like the simulation didn't work.",
|
|
1887
|
-
"eligibility-modal.title": "
|
|
1888
|
-
"eligibility-modal.title-
|
|
1889
|
-
"eligibility-modal.total": "Total",
|
|
1886
|
+
"eligibility-modal.title-deferred-plan": "Pay in installments or later by credit card with Alma.",
|
|
1887
|
+
"eligibility-modal.title-normal": "Pay in installments by credit card with Alma.",
|
|
1890
1888
|
"installments.today": "Today",
|
|
1889
|
+
"installments.total-amount": "Total",
|
|
1890
|
+
"installments.total-fees": "Of which costs (incl. VAT)",
|
|
1891
1891
|
"payment-plan-strings.day-abbreviation": "D{numberOfDeferredDays}",
|
|
1892
1892
|
"payment-plan-strings.default-message": "Pay in installments with Alma",
|
|
1893
1893
|
"payment-plan-strings.deferred": "{totalAmount} to be paid on {dueDate}",
|
|
@@ -1899,18 +1899,18 @@ var messagesEN = {
|
|
|
1899
1899
|
};
|
|
1900
1900
|
|
|
1901
1901
|
var messagesES = {
|
|
1902
|
+
"credit-features.credit-cost-display": "{creditCost} (TAE {taegPercentage})",
|
|
1903
|
+
"credit-features.information": "Un préstamo te compromete y debe ser devuelto. Comprueba tu capacidad financiera antes de comprometerte.",
|
|
1904
|
+
"credit-features.total-credit-cost": "Coste de crédito (incl. en el total)",
|
|
1902
1905
|
"eligibility-modal.bullet-1": "Elige <strong>Alma</strong> como método de pago.",
|
|
1903
1906
|
"eligibility-modal.bullet-2": "Completa la <strong>información</strong> solicitada.",
|
|
1904
1907
|
"eligibility-modal.bullet-3": "¡La validación de tu pago es <strong>instantánea</strong> !",
|
|
1905
|
-
"eligibility-modal.cost": "Gastos (incl. en el total)",
|
|
1906
|
-
"eligibility-modal.credit-commitment": "Un préstamo te compromete y debe ser devuelto. Comprueba tu capacidad financiera antes de comprometerte.",
|
|
1907
|
-
"eligibility-modal.credit-cost": "Coste de crédito (incl. en el total)",
|
|
1908
|
-
"eligibility-modal.credit-cost-amount": "{creditCost} (TAE {TAEG})",
|
|
1909
1908
|
"eligibility-modal.no-eligibility": "Uy, parece que la simulación no ha funcionado.",
|
|
1910
|
-
"eligibility-modal.title": "
|
|
1911
|
-
"eligibility-modal.title-
|
|
1912
|
-
"eligibility-modal.total": "Total",
|
|
1909
|
+
"eligibility-modal.title-deferred-plan": "Pague a plazos o posteriormente con tarjeta de crédito con Alma.",
|
|
1910
|
+
"eligibility-modal.title-normal": "Pagar a plazos con tarjeta de crédito con Alma.",
|
|
1913
1911
|
"installments.today": "Hoy",
|
|
1912
|
+
"installments.total-amount": "Total",
|
|
1913
|
+
"installments.total-fees": "De los cuales, costes (IVA incluido)",
|
|
1914
1914
|
"payment-plan-strings.day-abbreviation": "D{numberOfDeferredDays}",
|
|
1915
1915
|
"payment-plan-strings.default-message": "Pagar a plazos con Alma",
|
|
1916
1916
|
"payment-plan-strings.deferred": "{totalAmount} a pagar el {dueDate}",
|
|
@@ -1922,18 +1922,18 @@ var messagesES = {
|
|
|
1922
1922
|
};
|
|
1923
1923
|
|
|
1924
1924
|
var messagesFR = {
|
|
1925
|
+
"credit-features.credit-cost-display": "{creditCost} (TAEG {taegPercentage})",
|
|
1926
|
+
"credit-features.information": "Un crédit vous engage et doit être remboursé. Vérifiez vos capacités de remboursement avant de vous engager.",
|
|
1927
|
+
"credit-features.total-credit-cost": "Dont coût du crédit",
|
|
1925
1928
|
"eligibility-modal.bullet-1": "Choisissez <strong>Alma</strong> au moment du paiement.",
|
|
1926
1929
|
"eligibility-modal.bullet-2": "Renseignez les <strong>informations</strong> demandées.",
|
|
1927
1930
|
"eligibility-modal.bullet-3": "La validation de votre paiement est <strong>instantanée</strong> !",
|
|
1928
|
-
"eligibility-modal.cost": "Dont frais",
|
|
1929
|
-
"eligibility-modal.credit-commitment": "Un crédit vous engage et doit être remboursé. Vérifiez vos capacités de remboursement avant de vous engager.",
|
|
1930
|
-
"eligibility-modal.credit-cost": "Dont coût du crédit",
|
|
1931
|
-
"eligibility-modal.credit-cost-amount": "{creditCost} (TAEG {TAEG})",
|
|
1932
1931
|
"eligibility-modal.no-eligibility": "Oups, il semblerait que la simulation n'ait pas fonctionné.",
|
|
1933
|
-
"eligibility-modal.title": "
|
|
1934
|
-
"eligibility-modal.title-
|
|
1935
|
-
"eligibility-modal.total": "Total",
|
|
1932
|
+
"eligibility-modal.title-deferred-plan": "Payez en plusieurs fois ou plus tard par carte bancaire avec Alma.",
|
|
1933
|
+
"eligibility-modal.title-normal": "Payez en plusieurs fois par carte bancaire avec Alma.",
|
|
1936
1934
|
"installments.today": "Aujourd'hui",
|
|
1935
|
+
"installments.total-amount": "Total",
|
|
1936
|
+
"installments.total-fees": "Dont frais (TTC)",
|
|
1937
1937
|
"payment-plan-strings.day-abbreviation": "J{numberOfDeferredDays}",
|
|
1938
1938
|
"payment-plan-strings.default-message": "Payez en plusieurs fois avec Alma",
|
|
1939
1939
|
"payment-plan-strings.deferred": "{totalAmount} à payer le {dueDate}",
|
|
@@ -1945,18 +1945,18 @@ var messagesFR = {
|
|
|
1945
1945
|
};
|
|
1946
1946
|
|
|
1947
1947
|
var messagesIT = {
|
|
1948
|
+
"credit-features.credit-cost-display": "{creditCost} (TAEG {taegPercentage})",
|
|
1949
|
+
"credit-features.information": "Un pagamento rateale ti impegna e deve essere ripagato. Verifica la tua capacità di rimborso prima di impegnarti.",
|
|
1950
|
+
"credit-features.total-credit-cost": "Di cui commissioni",
|
|
1948
1951
|
"eligibility-modal.bullet-1": "Scegli <strong>Alma</strong> alla cassa.",
|
|
1949
1952
|
"eligibility-modal.bullet-2": "Compila le informazioni <strong></strong> richieste.",
|
|
1950
|
-
"eligibility-modal.bullet-3": "La convalida del pagamento è <strong>istantanea</strong
|
|
1951
|
-
"eligibility-modal.
|
|
1952
|
-
"eligibility-modal.
|
|
1953
|
-
"eligibility-modal.
|
|
1954
|
-
"eligibility-modal.credit-cost-amount": "{creditCost} (TAEG {TAEG})",
|
|
1955
|
-
"eligibility-modal.no-eligibility": "Ops, sembra che la simulazione non abbia funzionato.",
|
|
1956
|
-
"eligibility-modal.title": "<highlighted>Paga a rate</highlighted> con Alma, senza interessi.",
|
|
1957
|
-
"eligibility-modal.title-deferred": "<highlighted>Paga a rate</highlighted> o posticipa il pagamento con Alma, senza interessi.",
|
|
1958
|
-
"eligibility-modal.total": "Totale",
|
|
1953
|
+
"eligibility-modal.bullet-3": "La convalida del pagamento è <strong>istantanea</strong>!",
|
|
1954
|
+
"eligibility-modal.no-eligibility": "Ops, sembra che qualcosa non abbia funzionato.",
|
|
1955
|
+
"eligibility-modal.title-deferred-plan": "Pagate a rate o in seguito con carta di credito con Alma.",
|
|
1956
|
+
"eligibility-modal.title-normal": "Pagamenti rateali con carta di credito con Alma.",
|
|
1959
1957
|
"installments.today": "Oggi",
|
|
1958
|
+
"installments.total-amount": "Totale",
|
|
1959
|
+
"installments.total-fees": "Di cui costi (IVA inclusa)",
|
|
1960
1960
|
"payment-plan-strings.day-abbreviation": "G{numberOfDeferredDays}",
|
|
1961
1961
|
"payment-plan-strings.default-message": "Paga a rate con Alma",
|
|
1962
1962
|
"payment-plan-strings.deferred": "{totalAmount} da pagare il {dueDate}",
|
|
@@ -1968,18 +1968,18 @@ var messagesIT = {
|
|
|
1968
1968
|
};
|
|
1969
1969
|
|
|
1970
1970
|
var messagesNL = {
|
|
1971
|
+
"credit-features.credit-cost-display": "{creditCost} (gemiddeld rente percentage {taegPercentage})",
|
|
1972
|
+
"credit-features.information": "Een lening bindt je en moet worden terugbetaald. Ga na of u kunt terugbetalen voordat u zich vastlegt.",
|
|
1973
|
+
"credit-features.total-credit-cost": "Waarvan kosten van krediet",
|
|
1971
1974
|
"eligibility-modal.bullet-1": "Kies <strong>Alma</strong> bij het afrekenen.",
|
|
1972
1975
|
"eligibility-modal.bullet-2": "Vul de <strong>gevraagde informatie</strong> in.",
|
|
1973
1976
|
"eligibility-modal.bullet-3": "De validatie van uw betaling is <strong>onmiddellijk</strong> !",
|
|
1974
|
-
"eligibility-modal.cost": "Waarvan kosten",
|
|
1975
|
-
"eligibility-modal.credit-commitment": "Een lening bindt je en moet worden terugbetaald. Ga na of u kunt terugbetalen voordat u zich vastlegt.",
|
|
1976
|
-
"eligibility-modal.credit-cost": "Waarvan kosten van krediet",
|
|
1977
|
-
"eligibility-modal.credit-cost-amount": "{creditCost} (gemiddeld rente percentage {TAEG})",
|
|
1978
1977
|
"eligibility-modal.no-eligibility": "Oeps, het lijkt erop dat de simulatie niet werkte.",
|
|
1979
|
-
"eligibility-modal.title": "
|
|
1980
|
-
"eligibility-modal.title-
|
|
1981
|
-
"eligibility-modal.total": "Totaal",
|
|
1978
|
+
"eligibility-modal.title-deferred-plan": "Betaal in termijnen of later per creditcard met Alma.",
|
|
1979
|
+
"eligibility-modal.title-normal": "Betaal in termijnen met een creditcard bij Alma.",
|
|
1982
1980
|
"installments.today": "Tegenwoordig",
|
|
1981
|
+
"installments.total-amount": "Totaal",
|
|
1982
|
+
"installments.total-fees": "Waarvan kosten (incl. BTW)",
|
|
1983
1983
|
"payment-plan-strings.day-abbreviation": "D{numberOfDeferredDays}",
|
|
1984
1984
|
"payment-plan-strings.default-message": "Betaal in termijnen met Alma",
|
|
1985
1985
|
"payment-plan-strings.deferred": "{totalAmount} te betalen op {dueDate}",
|
|
@@ -1991,18 +1991,18 @@ var messagesNL = {
|
|
|
1991
1991
|
};
|
|
1992
1992
|
|
|
1993
1993
|
var messagesPT = {
|
|
1994
|
+
"credit-features.credit-cost-display": "{creditCost} (TAEG {taegPercentage})",
|
|
1995
|
+
"credit-features.information": "Um crédito é um compromisso e deve ser reembolsado. Verifique a sua capacidade de pagar antes de se comprometer.",
|
|
1996
|
+
"credit-features.total-credit-cost": "Incluindo custo do crédito",
|
|
1994
1997
|
"eligibility-modal.bullet-1": "Escolha a <strong>Alma</strong> no checkout.",
|
|
1995
1998
|
"eligibility-modal.bullet-2": "Preencha os <strong>dados</strong> solicitados.",
|
|
1996
1999
|
"eligibility-modal.bullet-3": "A validação do seu pagamento é <strong>instantaneamente</strong> !",
|
|
1997
|
-
"eligibility-modal.cost": "Incluindo encargos",
|
|
1998
|
-
"eligibility-modal.credit-commitment": "Um crédito é um compromisso e deve ser reembolsado. Verifique a sua capacidade de pagar antes de se comprometer.",
|
|
1999
|
-
"eligibility-modal.credit-cost": "Incluindo custo do crédito",
|
|
2000
|
-
"eligibility-modal.credit-cost-amount": "{creditCost} (TAEG {TAEG})",
|
|
2001
2000
|
"eligibility-modal.no-eligibility": "Ups, parece que a simulação não funcionou.",
|
|
2002
|
-
"eligibility-modal.title": "
|
|
2003
|
-
"eligibility-modal.title-
|
|
2004
|
-
"eligibility-modal.total": "Total",
|
|
2001
|
+
"eligibility-modal.title-deferred-plan": "Pagar em prestações ou mais tarde por cartão de crédito com Alma.",
|
|
2002
|
+
"eligibility-modal.title-normal": "Pagar em prestações por cartão de crédito com Alma.",
|
|
2005
2003
|
"installments.today": "Hoje",
|
|
2004
|
+
"installments.total-amount": "Total",
|
|
2005
|
+
"installments.total-fees": "Dos quais custos (incl. IVA)",
|
|
2006
2006
|
"payment-plan-strings.day-abbreviation": "D{numberOfDeferredDays}",
|
|
2007
2007
|
"payment-plan-strings.default-message": "Pague em prestações através da Alma",
|
|
2008
2008
|
"payment-plan-strings.deferred": "{totalAmount} a pagar em {dueDate}",
|
|
@@ -2168,39 +2168,7 @@ const useFetchEligibility = (purchaseAmount, {
|
|
|
2168
2168
|
return [filterELigibility(eligibility, plans), status];
|
|
2169
2169
|
};
|
|
2170
2170
|
|
|
2171
|
-
var s = {"
|
|
2172
|
-
|
|
2173
|
-
const LoadingIndicator = ({
|
|
2174
|
-
className
|
|
2175
|
-
}) => {
|
|
2176
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2177
|
-
className: cx(s.loadingIndicator, className),
|
|
2178
|
-
"data-testid": "loader"
|
|
2179
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2180
|
-
className: s.letter
|
|
2181
|
-
}, "a"), /*#__PURE__*/React.createElement("div", {
|
|
2182
|
-
className: s.bar
|
|
2183
|
-
}));
|
|
2184
|
-
};
|
|
2185
|
-
|
|
2186
|
-
var s$1 = {"modal":"_D8SjB","content":"_ocM9x","contentScrollable":"_1GP2F","overlay":"_1yxCb","header":"_12LLh","closeButton":"_3YRro"};
|
|
2187
|
-
|
|
2188
|
-
function CrossIcon({
|
|
2189
|
-
color = '#fff',
|
|
2190
|
-
className
|
|
2191
|
-
}) {
|
|
2192
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
2193
|
-
className: className,
|
|
2194
|
-
width: "16",
|
|
2195
|
-
height: "16",
|
|
2196
|
-
viewBox: "0 0 16 16",
|
|
2197
|
-
fill: "none",
|
|
2198
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
2199
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
2200
|
-
d: "M12.5964 11.404L9.41445 8.22205L12.5964 5.04007C12.7732 4.86329 12.7732 4.50974 12.5964 4.33296L11.8893 3.62585C11.6904 3.42698 11.359 3.44908 11.1822 3.62585L8.00023 6.80783L4.81825 3.62585C4.61938 3.42698 4.28792 3.44908 4.11114 3.62585L3.40404 4.33296C3.20516 4.53183 3.20516 4.84119 3.40404 5.04007L6.58602 8.22205L3.40404 11.404C3.20516 11.6029 3.20517 11.9123 3.40404 12.1111L4.11115 12.8182C4.28792 12.995 4.61938 13.0171 4.81825 12.8182L8.00023 9.63626L11.1822 12.8182C11.359 12.995 11.6904 13.0171 11.8893 12.8182L12.5964 12.1111C12.7732 11.9344 12.7732 11.5808 12.5964 11.404Z",
|
|
2201
|
-
fill: color
|
|
2202
|
-
}));
|
|
2203
|
-
}
|
|
2171
|
+
var s = {"container":"_GTTk7","total":"_34s2g","fees":"_W7qIA","creditCost":"_24KmE"};
|
|
2204
2172
|
|
|
2205
2173
|
/**
|
|
2206
2174
|
* Prefix classes to avoid name collisions.
|
|
@@ -2230,6 +2198,96 @@ const STATIC_CUSTOMISATION_CLASSES = {
|
|
|
2230
2198
|
summary: prefix + '-summary'
|
|
2231
2199
|
};
|
|
2232
2200
|
|
|
2201
|
+
const TotalBlock = ({
|
|
2202
|
+
currentPlan
|
|
2203
|
+
}) => {
|
|
2204
|
+
const intl = useIntl();
|
|
2205
|
+
const total = priceFromCents(currentPlan.purchase_amount + currentPlan.customer_total_cost_amount);
|
|
2206
|
+
const creditCost = priceFromCents(currentPlan.customer_total_cost_amount);
|
|
2207
|
+
const TAEG = (currentPlan == null ? void 0 : currentPlan.annual_interest_rate) && currentPlan.annual_interest_rate / 10000 || 0;
|
|
2208
|
+
const customerFees = priceFromCents(currentPlan.customer_total_cost_amount);
|
|
2209
|
+
const isCredit = currentPlan.installments_count > 4;
|
|
2210
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2211
|
+
className: cx(s.container, STATIC_CUSTOMISATION_CLASSES.summary),
|
|
2212
|
+
"data-testid": "modal-summary"
|
|
2213
|
+
}, /*#__PURE__*/React.createElement("h3", {
|
|
2214
|
+
className: cx(s.total, STATIC_CUSTOMISATION_CLASSES.scheduleTotal)
|
|
2215
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2216
|
+
tagName: "div",
|
|
2217
|
+
id: "installments.total-amount",
|
|
2218
|
+
defaultMessage: "Total"
|
|
2219
|
+
}), /*#__PURE__*/React.createElement(FormattedNumber, {
|
|
2220
|
+
value: total || 0,
|
|
2221
|
+
style: "currency",
|
|
2222
|
+
currency: "EUR"
|
|
2223
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
2224
|
+
className: cx(s.fees, STATIC_CUSTOMISATION_CLASSES.scheduleCredit)
|
|
2225
|
+
}, isCredit ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2226
|
+
id: "credit-features.total-credit-cost",
|
|
2227
|
+
defaultMessage: "Dont co\u00FBt du cr\u00E9dit"
|
|
2228
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
2229
|
+
className: s.creditCost
|
|
2230
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2231
|
+
id: "credit-features.credit-cost-display",
|
|
2232
|
+
defaultMessage: "{creditCost} (TAEG {taegPercentage})",
|
|
2233
|
+
values: {
|
|
2234
|
+
creditCost: intl.formatNumber(creditCost, {
|
|
2235
|
+
style: 'currency',
|
|
2236
|
+
currency: 'EUR'
|
|
2237
|
+
}),
|
|
2238
|
+
taegPercentage: intl.formatNumber(TAEG, {
|
|
2239
|
+
style: 'percent',
|
|
2240
|
+
maximumFractionDigits: 2
|
|
2241
|
+
})
|
|
2242
|
+
}
|
|
2243
|
+
}))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2244
|
+
id: "installments.total-fees",
|
|
2245
|
+
defaultMessage: "Dont frais (TTC)",
|
|
2246
|
+
tagName: "div"
|
|
2247
|
+
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(FormattedNumber, {
|
|
2248
|
+
value: customerFees,
|
|
2249
|
+
style: "currency",
|
|
2250
|
+
currency: "EUR"
|
|
2251
|
+
})))));
|
|
2252
|
+
};
|
|
2253
|
+
|
|
2254
|
+
var s$1 = {"loadingIndicator":"_31lrj","bounce":"_3NtDa"};
|
|
2255
|
+
|
|
2256
|
+
const LoadingIndicator = ({
|
|
2257
|
+
className
|
|
2258
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
2259
|
+
className: cx(s$1.loadingIndicator, className),
|
|
2260
|
+
"data-testid": "loader"
|
|
2261
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
2262
|
+
width: "120",
|
|
2263
|
+
height: "134",
|
|
2264
|
+
viewBox: "0 0 120 134",
|
|
2265
|
+
fill: "none",
|
|
2266
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2267
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
2268
|
+
d: "M83.8164 41.0325C79.1708 22.8241 69.3458 17 59.9939 17C50.642 17 40.8171 22.8241 36.1715 41.0325L16 117H35.8804C39.119 104.311 49.1016 97.2436 59.9939 97.2436C70.8863 97.2436 80.8689 104.324 84.1075 117H104L83.8164 41.0325ZM59.9939 79.5428C53.6623 79.5428 47.925 82.0552 43.6918 86.1283L55.0936 41.9207C56.1853 37.6953 57.7985 36.3503 60.0061 36.3503C62.2136 36.3503 63.8269 37.6953 64.9185 41.9207L76.3082 86.1283C72.075 82.0552 66.3256 79.5428 59.9939 79.5428Z",
|
|
2269
|
+
fill: "#FA5022"
|
|
2270
|
+
})));
|
|
2271
|
+
|
|
2272
|
+
var s$2 = {"modal":"_D8SjB","content":"_ocM9x","contentScrollable":"_1GP2F","overlay":"_1yxCb","header":"_12LLh","closeButton":"_3YRro"};
|
|
2273
|
+
|
|
2274
|
+
function CrossIcon({
|
|
2275
|
+
color = '#fff',
|
|
2276
|
+
className
|
|
2277
|
+
}) {
|
|
2278
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
2279
|
+
className: className,
|
|
2280
|
+
width: "16",
|
|
2281
|
+
height: "16",
|
|
2282
|
+
viewBox: "0 0 16 16",
|
|
2283
|
+
fill: "none",
|
|
2284
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2285
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
2286
|
+
d: "M12.5964 11.404L9.41445 8.22205L12.5964 5.04007C12.7732 4.86329 12.7732 4.50974 12.5964 4.33296L11.8893 3.62585C11.6904 3.42698 11.359 3.44908 11.1822 3.62585L8.00023 6.80783L4.81825 3.62585C4.61938 3.42698 4.28792 3.44908 4.11114 3.62585L3.40404 4.33296C3.20516 4.53183 3.20516 4.84119 3.40404 5.04007L6.58602 8.22205L3.40404 11.404C3.20516 11.6029 3.20517 11.9123 3.40404 12.1111L4.11115 12.8182C4.28792 12.995 4.61938 13.0171 4.81825 12.8182L8.00023 9.63626L11.1822 12.8182C11.359 12.995 11.6904 13.0171 11.8893 12.8182L12.5964 12.1111C12.7732 11.9344 12.7732 11.5808 12.5964 11.404Z",
|
|
2287
|
+
fill: color
|
|
2288
|
+
}));
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2233
2291
|
const _excluded = ["children", "isOpen", "onClose", "className", "contentClassName", "scrollable"];
|
|
2234
2292
|
|
|
2235
2293
|
const ControlledModal = _ref => {
|
|
@@ -2246,8 +2304,8 @@ const ControlledModal = _ref => {
|
|
|
2246
2304
|
/* istanbul ignore next */
|
|
2247
2305
|
Modal.setAppElement('body');
|
|
2248
2306
|
return /*#__PURE__*/React.createElement(Modal, Object.assign({
|
|
2249
|
-
className: cx(s$
|
|
2250
|
-
overlayClassName: s$
|
|
2307
|
+
className: cx(s$2.modal, className),
|
|
2308
|
+
overlayClassName: s$2.overlay,
|
|
2251
2309
|
onAfterOpen: () => {
|
|
2252
2310
|
noScroll.on();
|
|
2253
2311
|
},
|
|
@@ -2259,14 +2317,14 @@ const ControlledModal = _ref => {
|
|
|
2259
2317
|
shouldCloseOnOverlayClick: true,
|
|
2260
2318
|
shouldCloseOnEsc: true
|
|
2261
2319
|
}, props), /*#__PURE__*/React.createElement("div", {
|
|
2262
|
-
className: s$
|
|
2320
|
+
className: s$2.header
|
|
2263
2321
|
}, /*#__PURE__*/React.createElement("button", {
|
|
2264
2322
|
onClick: onClose,
|
|
2265
|
-
className: cx(s$
|
|
2323
|
+
className: cx(s$2.closeButton, STATIC_CUSTOMISATION_CLASSES.closeButton),
|
|
2266
2324
|
"data-testid": "modal-close-button"
|
|
2267
2325
|
}, /*#__PURE__*/React.createElement(CrossIcon, null))), /*#__PURE__*/React.createElement("div", {
|
|
2268
|
-
className: cx(s$
|
|
2269
|
-
[s$
|
|
2326
|
+
className: cx(s$2.content, contentClassName, {
|
|
2327
|
+
[s$2.contentScrollable]: scrollable
|
|
2270
2328
|
})
|
|
2271
2329
|
}, children));
|
|
2272
2330
|
};
|
|
@@ -2404,98 +2462,97 @@ const paymentPlanInfoText = payment => {
|
|
|
2404
2462
|
});
|
|
2405
2463
|
};
|
|
2406
2464
|
|
|
2407
|
-
var s$
|
|
2465
|
+
var s$3 = {"buttons":"_1l2Oa","active":"_3rue7"};
|
|
2408
2466
|
|
|
2409
2467
|
const EligibilityPlansButtons = ({
|
|
2410
2468
|
eligibilityPlans,
|
|
2411
2469
|
currentPlanIndex,
|
|
2412
2470
|
setCurrentPlanIndex
|
|
2413
2471
|
}) => /*#__PURE__*/React.createElement("div", {
|
|
2414
|
-
className: cx(s$
|
|
2472
|
+
className: cx(s$3.buttons, STATIC_CUSTOMISATION_CLASSES.eligibilityOptions)
|
|
2415
2473
|
}, eligibilityPlans.map((eligibilityPlan, index) => /*#__PURE__*/React.createElement("button", {
|
|
2416
2474
|
key: index,
|
|
2417
2475
|
className: cx({
|
|
2418
|
-
[cx(s$
|
|
2476
|
+
[cx(s$3.active, STATIC_CUSTOMISATION_CLASSES.activeOption)]: index === currentPlanIndex
|
|
2419
2477
|
}),
|
|
2420
2478
|
onClick: () => setCurrentPlanIndex(index)
|
|
2421
2479
|
}, paymentPlanShorthandName(eligibilityPlan))));
|
|
2422
2480
|
|
|
2423
|
-
var s$
|
|
2481
|
+
var s$4 = {"installment":"_z2Uiv","date":"_2lJQy","dot":"_1Z9wr","isCurrent":"_2Nmkl","bold":"_ezY-3"};
|
|
2424
2482
|
|
|
2425
|
-
const
|
|
2426
|
-
|
|
2483
|
+
const Installment = ({
|
|
2484
|
+
installment,
|
|
2485
|
+
index
|
|
2427
2486
|
}) => {
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
}, (
|
|
2438
|
-
className: s$3.scheduleLine,
|
|
2439
|
-
key: index
|
|
2440
|
-
}, /*#__PURE__*/React.createElement("span", null, isToday(installment.due_date * 1000) ? /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2487
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2488
|
+
className: s$4.installment,
|
|
2489
|
+
"data-testid": `installment-${index}`
|
|
2490
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2491
|
+
className: s$4.date
|
|
2492
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2493
|
+
className: cx(s$4.dot, {
|
|
2494
|
+
[s$4.isCurrent]: index === 0
|
|
2495
|
+
})
|
|
2496
|
+
}), isToday(installment.due_date * 1000) ? /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2441
2497
|
id: "installments.today",
|
|
2442
|
-
defaultMessage: "Aujourd'hui"
|
|
2498
|
+
defaultMessage: "Aujourd'hui",
|
|
2499
|
+
tagName: "strong"
|
|
2443
2500
|
}) : /*#__PURE__*/React.createElement(FormattedDate, {
|
|
2444
2501
|
value: installment.due_date * 1000,
|
|
2445
2502
|
day: "numeric",
|
|
2446
2503
|
month: "long",
|
|
2447
2504
|
year: "numeric"
|
|
2448
|
-
})), /*#__PURE__*/React.createElement("
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
}
|
|
2453
|
-
|
|
2454
|
-
"data-testid": "modal-summary"
|
|
2455
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2456
|
-
className: cx(s$3.scheduleLine, s$3.total, STATIC_CUSTOMISATION_CLASSES.scheduleTotal)
|
|
2457
|
-
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2458
|
-
id: "eligibility-modal.total",
|
|
2459
|
-
defaultMessage: "Total"
|
|
2460
|
-
})), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedNumber, {
|
|
2461
|
-
value: total,
|
|
2462
|
-
style: "currency",
|
|
2463
|
-
currency: "EUR"
|
|
2464
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
2465
|
-
className: cx(s$3.scheduleLine, s$3.creditCost, STATIC_CUSTOMISATION_CLASSES.scheduleCredit)
|
|
2466
|
-
}, isCredit ? /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2467
|
-
id: "eligibility-modal.credit-cost",
|
|
2468
|
-
defaultMessage: "Dont co\u00FBt du cr\u00E9dit"
|
|
2469
|
-
})) : /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2470
|
-
id: "eligibility-modal.cost",
|
|
2471
|
-
defaultMessage: "Dont frais"
|
|
2472
|
-
})), /*#__PURE__*/React.createElement("span", {
|
|
2473
|
-
className: s$3.creditCostAmount
|
|
2474
|
-
}, isCredit ? /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2475
|
-
id: "eligibility-modal.credit-cost-amount",
|
|
2476
|
-
defaultMessage: "{creditCost} (TAEG {TAEG})",
|
|
2477
|
-
values: {
|
|
2478
|
-
creditCost: intl.formatNumber(creditCost, {
|
|
2479
|
-
style: 'currency',
|
|
2480
|
-
currency: 'EUR'
|
|
2481
|
-
}),
|
|
2482
|
-
TAEG: intl.formatNumber(TAEG != null ? TAEG : 0, {
|
|
2483
|
-
style: 'percent',
|
|
2484
|
-
maximumFractionDigits: 2
|
|
2485
|
-
})
|
|
2486
|
-
}
|
|
2487
|
-
}) : /*#__PURE__*/React.createElement(FormattedNumber, {
|
|
2488
|
-
value: customerFees,
|
|
2505
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
2506
|
+
className: cx({
|
|
2507
|
+
[s$4.bold]: index === 0
|
|
2508
|
+
})
|
|
2509
|
+
}, /*#__PURE__*/React.createElement(FormattedNumber, {
|
|
2510
|
+
value: installment.purchase_amount / 100,
|
|
2489
2511
|
style: "currency",
|
|
2490
2512
|
currency: "EUR"
|
|
2491
|
-
})))
|
|
2492
|
-
|
|
2513
|
+
})));
|
|
2514
|
+
};
|
|
2515
|
+
|
|
2516
|
+
var s$5 = {"schedule":"_MPKjS","creditInfo":"_3a7er"};
|
|
2517
|
+
|
|
2518
|
+
const Schedule = ({
|
|
2519
|
+
currentPlan
|
|
2520
|
+
}) => {
|
|
2521
|
+
const isCredit = currentPlan.installments_count > 4;
|
|
2522
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2523
|
+
className: cx(s$5.schedule, STATIC_CUSTOMISATION_CLASSES.scheduleDetails),
|
|
2524
|
+
"data-testid": "modal-installments-element"
|
|
2525
|
+
}, ((currentPlan == null ? void 0 : currentPlan.payment_plan) || []).map((installment, index) => /*#__PURE__*/React.createElement(Installment, {
|
|
2526
|
+
key: installment.due_date * 1000,
|
|
2527
|
+
installment: installment,
|
|
2528
|
+
index: index
|
|
2529
|
+
})), isCredit && /*#__PURE__*/React.createElement("div", {
|
|
2530
|
+
className: s$5.creditInfo
|
|
2493
2531
|
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2494
|
-
id: "
|
|
2495
|
-
defaultMessage: "Un cr\u00E9dit vous engage et doit \u00EAtre rembours\u00E9. V\u00E9rifiez vos capacit\u00E9s de remboursement
|
|
2532
|
+
id: "credit-features.information",
|
|
2533
|
+
defaultMessage: "Un cr\u00E9dit vous engage et doit \u00EAtre rembours\u00E9. V\u00E9rifiez vos capacit\u00E9s de remboursement avant de vous engager."
|
|
2496
2534
|
}))));
|
|
2497
2535
|
};
|
|
2498
2536
|
|
|
2537
|
+
const _excluded$1 = ["color"];
|
|
2538
|
+
const AlmaLogo = _ref => {
|
|
2539
|
+
let {
|
|
2540
|
+
color = '#FA5022'
|
|
2541
|
+
} = _ref,
|
|
2542
|
+
svgProps = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
2543
|
+
|
|
2544
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
2545
|
+
width: "50",
|
|
2546
|
+
height: "25",
|
|
2547
|
+
viewBox: "0 0 360 109",
|
|
2548
|
+
fill: "none",
|
|
2549
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2550
|
+
}, svgProps), /*#__PURE__*/React.createElement("path", {
|
|
2551
|
+
d: "M333.24 28.3462V38.4459C327.504 31.1018 319.176 26.5132 309.288 26.5132C290.208 26.5132 275.424 43.5497 275.424 64.5757C275.424 85.6018 290.208 102.638 309.288 102.638C319.872 102.638 328.668 97.3908 334.416 89.1241V100.817H352.668V28.3462H333.24ZM314.028 84.4876C303.42 84.4876 294.828 75.574 294.828 64.5757C294.828 53.5775 303.42 44.6639 314.028 44.6639C324.636 44.6639 333.228 53.5775 333.228 64.5757C333.228 75.574 324.636 84.4876 314.028 84.4876ZM109.5 8.23073H128.916V100.805H109.5V8.23073ZM151.248 59.7356C151.248 39.8117 163.5 26.5252 180.468 26.5252C191.004 26.5252 199.332 31.1976 204.348 39.1648C209.376 31.1976 217.692 26.5252 228.228 26.5252C245.196 26.5252 257.448 39.8117 257.448 59.7356V100.817H238.032V57.639C238.032 49.8635 232.872 44.7957 226.044 44.7957C219.216 44.7957 214.056 49.8755 214.056 57.639V100.817H194.64V57.639C194.64 49.8635 189.48 44.7957 182.652 44.7957C175.824 44.7957 170.664 49.8755 170.664 57.639V100.817H151.248V59.7356ZM74.34 29.101C69.744 11.9088 60.0241 6.40967 50.772 6.40967C41.5201 6.40967 31.8 11.9088 27.204 29.101L7.24805 100.829H26.916C30.12 88.8485 39.996 82.1753 50.772 82.1753C61.548 82.1753 71.424 88.8605 74.6281 100.829H94.3081L74.34 29.101ZM50.772 65.4623C44.508 65.4623 38.8321 67.8345 34.6441 71.6803L45.924 29.9397C47.0041 25.9501 48.6001 24.6802 50.784 24.6802C52.9681 24.6802 54.5641 25.9501 55.6441 29.9397L66.912 71.6803C62.724 67.8345 57.036 65.4623 50.772 65.4623Z",
|
|
2552
|
+
fill: color
|
|
2553
|
+
}));
|
|
2554
|
+
};
|
|
2555
|
+
|
|
2499
2556
|
const AmexCard = () => /*#__PURE__*/React.createElement("svg", {
|
|
2500
2557
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2501
2558
|
width: "24",
|
|
@@ -2641,7 +2698,7 @@ const CbCard = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
2641
2698
|
d: "M19.094 4.03h-6.437V8h6.498c1.165 0 2.084-.889 2.084-2.015-.06-1.066-.98-1.955-2.145-1.955zM19.094 8.593h-6.437v3.97h6.498c1.165 0 2.084-.889 2.084-2.015-.06-1.067-.98-1.955-2.145-1.955zM7.017 8.06h4.966c-.245-2.371-2.391-4.267-4.966-4.267-2.758 0-5.027 2.074-5.027 4.681s2.269 4.682 5.027 4.682c2.698 0 4.904-2.015 5.027-4.563H7.017v-.534z"
|
|
2642
2699
|
}))));
|
|
2643
2700
|
|
|
2644
|
-
var s$
|
|
2701
|
+
var s$6 = {"cardContainer":"_1N3yO"};
|
|
2645
2702
|
|
|
2646
2703
|
const Cards = ({
|
|
2647
2704
|
cards
|
|
@@ -2650,23 +2707,23 @@ const Cards = ({
|
|
|
2650
2707
|
const uniqueCards = Array.from(new Set(cards));
|
|
2651
2708
|
return /*#__PURE__*/React.createElement("div", {
|
|
2652
2709
|
"data-testid": "card-logos",
|
|
2653
|
-
className: cx(s$
|
|
2710
|
+
className: cx(s$6.cardContainer, STATIC_CUSTOMISATION_CLASSES.cardContainer)
|
|
2654
2711
|
}, uniqueCards.map(card => /*#__PURE__*/React.createElement("div", {
|
|
2655
2712
|
key: card,
|
|
2656
|
-
className: s$
|
|
2713
|
+
className: s$6.card,
|
|
2657
2714
|
"data-testid": `card-logo-${card}`
|
|
2658
2715
|
}, card === 'cb' && /*#__PURE__*/React.createElement(CbCard, null), card === 'amex' && /*#__PURE__*/React.createElement(AmexCard, null), card === 'mastercard' && /*#__PURE__*/React.createElement(MasterCard, null), card === 'visa' && /*#__PURE__*/React.createElement(VisaCard, null))));
|
|
2659
2716
|
};
|
|
2660
2717
|
|
|
2661
|
-
var s$
|
|
2718
|
+
var s$7 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
|
|
2662
2719
|
|
|
2663
2720
|
const Info = () => /*#__PURE__*/React.createElement("div", {
|
|
2664
|
-
className: cx(s$
|
|
2721
|
+
className: cx(s$7.list, STATIC_CUSTOMISATION_CLASSES.info),
|
|
2665
2722
|
"data-testid": "modal-info-element"
|
|
2666
2723
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2667
|
-
className: s$
|
|
2724
|
+
className: s$7.listItem
|
|
2668
2725
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2669
|
-
className: cx(s$
|
|
2726
|
+
className: cx(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
2670
2727
|
}, "1"), /*#__PURE__*/React.createElement("div", {
|
|
2671
2728
|
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2672
2729
|
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
@@ -2676,9 +2733,9 @@ const Info = () => /*#__PURE__*/React.createElement("div", {
|
|
|
2676
2733
|
strong: (...chunks) => /*#__PURE__*/React.createElement("strong", null, chunks)
|
|
2677
2734
|
}
|
|
2678
2735
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
2679
|
-
className: s$
|
|
2736
|
+
className: s$7.listItem
|
|
2680
2737
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2681
|
-
className: cx(s$
|
|
2738
|
+
className: cx(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
2682
2739
|
}, "2"), /*#__PURE__*/React.createElement("div", {
|
|
2683
2740
|
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2684
2741
|
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
@@ -2688,9 +2745,9 @@ const Info = () => /*#__PURE__*/React.createElement("div", {
|
|
|
2688
2745
|
strong: (...chunks) => /*#__PURE__*/React.createElement("strong", null, chunks)
|
|
2689
2746
|
}
|
|
2690
2747
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
2691
|
-
className: s$
|
|
2748
|
+
className: s$7.listItem
|
|
2692
2749
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2693
|
-
className: cx(s$
|
|
2750
|
+
className: cx(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
2694
2751
|
}, "3"), /*#__PURE__*/React.createElement("div", {
|
|
2695
2752
|
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2696
2753
|
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
@@ -2701,111 +2758,62 @@ const Info = () => /*#__PURE__*/React.createElement("div", {
|
|
|
2701
2758
|
}
|
|
2702
2759
|
}))));
|
|
2703
2760
|
|
|
2704
|
-
var
|
|
2705
|
-
|
|
2706
|
-
(function (COLORS) {
|
|
2707
|
-
COLORS["ALMA"] = "#FF414D";
|
|
2708
|
-
COLORS["MONOCHROME"] = "#00425D";
|
|
2709
|
-
})(COLORS || (COLORS = {}));
|
|
2710
|
-
|
|
2711
|
-
function LogoIcon({
|
|
2712
|
-
className,
|
|
2713
|
-
color = COLORS.MONOCHROME,
|
|
2714
|
-
monochrome = true,
|
|
2715
|
-
underlineColor
|
|
2716
|
-
}) {
|
|
2717
|
-
const defaultUnderlineColor = monochrome ? COLORS.MONOCHROME : COLORS.ALMA;
|
|
2718
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
2719
|
-
className: className,
|
|
2720
|
-
width: "35",
|
|
2721
|
-
height: "23",
|
|
2722
|
-
viewBox: "0 0 40 23",
|
|
2723
|
-
fill: "none",
|
|
2724
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
2725
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
2726
|
-
d: "M6.38546 10.1313V10.029H4.92542C4.23835 10.029 3.72877 10.0972 3.39668 10.2337C3.07605 10.3587 2.91573 10.6374 2.91573 11.0695C2.91573 11.7177 3.37378 12.0418 4.28988 12.0418C5.05711 12.0418 5.59532 11.8826 5.9045 11.5642C6.22514 11.2344 6.38546 10.7568 6.38546 10.1313ZM3.72304 13.9182C2.64663 13.9182 1.85076 13.6567 1.33546 13.1335C0.820153 12.599 0.5625 11.911 0.5625 11.0695C0.5625 10.0574 0.894586 9.32958 1.55876 8.88606C2.22293 8.43118 3.23636 8.20374 4.59906 8.20374H6.38546V7.82846C6.38546 6.98693 5.84725 6.56616 4.77083 6.56616C3.80893 6.56616 3.27644 6.93007 3.17338 7.65788H0.768622C0.848781 6.78223 1.21522 6.04873 1.86794 5.45738C2.52066 4.86603 3.50547 4.57036 4.82236 4.57036C6.1278 4.57036 7.11261 4.86035 7.77678 5.44032C8.44095 6.0203 8.77304 6.83909 8.77304 7.89669V13.7135H6.60875V12.7241C6.09345 13.5202 5.13155 13.9182 3.72304 13.9182Z",
|
|
2727
|
-
fill: color
|
|
2728
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
2729
|
-
d: "M14.2554 11.6324V13.6965C14.0149 13.7306 13.763 13.7476 13.4996 13.7476C12.5492 13.7476 11.8736 13.5486 11.4728 13.1506C11.072 12.7412 10.8716 12.0873 10.8716 11.1889V0.919922H13.3107V11.0183C13.3107 11.2344 13.3508 11.3936 13.4309 11.496C13.5111 11.5983 13.6771 11.6495 13.929 11.6495C13.9863 11.6495 14.0493 11.6495 14.118 11.6495C14.1982 11.6381 14.244 11.6324 14.2554 11.6324Z",
|
|
2730
|
-
fill: color
|
|
2731
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
2732
|
-
d: "M23.8943 8.63019V13.7135H21.4552V8.40844C21.4552 7.23711 20.9742 6.65145 20.0123 6.65145C19.4512 6.65145 19.0161 6.82203 18.7069 7.16319C18.4092 7.50436 18.2603 7.9763 18.2603 8.57902V13.7135H15.8212V4.77506H18.0714V5.86678C18.5409 5.0025 19.4054 4.57036 20.6651 4.57036C21.856 4.57036 22.7263 4.99113 23.2759 5.83266C24.0432 4.99113 25.0394 4.57036 26.2647 4.57036C27.3182 4.57036 28.1255 4.89446 28.6867 5.54267C29.2478 6.19088 29.5283 7.05516 29.5283 8.13551V13.7135H27.0892V8.40844C27.0892 7.23711 26.6083 6.65145 25.6464 6.65145C25.0738 6.65145 24.6386 6.82772 24.3409 7.18025C24.0432 7.52141 23.8943 8.00473 23.8943 8.63019Z",
|
|
2733
|
-
fill: color
|
|
2734
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
2735
|
-
d: "M37.0321 10.1313V10.029H35.572C34.885 10.029 34.3754 10.0972 34.0433 10.2337C33.7227 10.3587 33.5623 10.6374 33.5623 11.0695C33.5623 11.7177 34.0204 12.0418 34.9365 12.0418C35.7037 12.0418 36.2419 11.8826 36.5511 11.5642C36.8717 11.2344 37.0321 10.7568 37.0321 10.1313ZM34.3696 13.9182C33.2932 13.9182 32.4974 13.6567 31.9821 13.1335C31.4668 12.599 31.2091 11.911 31.2091 11.0695C31.2091 10.0574 31.5412 9.32958 32.2054 8.88606C32.8695 8.43118 33.883 8.20374 35.2457 8.20374H37.0321V7.82846C37.0321 6.98693 36.4939 6.56616 35.4174 6.56616C34.4555 6.56616 33.923 6.93007 33.82 7.65788H31.4152C31.4954 6.78223 31.8618 6.04873 32.5145 5.45738C33.1673 4.86603 34.1521 4.57036 35.469 4.57036C36.7744 4.57036 37.7592 4.86035 38.4234 5.44032C39.0876 6.0203 39.4196 6.83909 39.4196 7.89669V13.7135H37.2554V12.7241C36.7401 13.5202 35.7781 13.9182 34.3696 13.9182Z",
|
|
2736
|
-
fill: color
|
|
2737
|
-
}), /*#__PURE__*/React.createElement("rect", {
|
|
2738
|
-
y: "20",
|
|
2739
|
-
width: "40",
|
|
2740
|
-
height: "3",
|
|
2741
|
-
fill: underlineColor || defaultUnderlineColor
|
|
2742
|
-
}));
|
|
2743
|
-
}
|
|
2744
|
-
|
|
2745
|
-
var s$6 = {"logo":"_3Oyv_"};
|
|
2746
|
-
|
|
2747
|
-
const Logo = () => /*#__PURE__*/React.createElement("div", {
|
|
2748
|
-
className: s$6.logo
|
|
2749
|
-
}, /*#__PURE__*/React.createElement(LogoIcon, {
|
|
2750
|
-
underlineColor: "#FF414D"
|
|
2751
|
-
}));
|
|
2752
|
-
|
|
2753
|
-
var s$7 = {"title":"_3ERx-"};
|
|
2761
|
+
var s$8 = {"title":"_3ERx-"};
|
|
2754
2762
|
|
|
2755
2763
|
const Title = ({
|
|
2756
2764
|
isSomePlanDeferred
|
|
2757
2765
|
}) => /*#__PURE__*/React.createElement("div", {
|
|
2758
|
-
className: cx(s$
|
|
2766
|
+
className: cx(s$8.title, STATIC_CUSTOMISATION_CLASSES.title),
|
|
2759
2767
|
"data-testid": "modal-title-element"
|
|
2760
2768
|
}, isSomePlanDeferred ? /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2761
|
-
id:
|
|
2762
|
-
defaultMessage: "
|
|
2763
|
-
values: {
|
|
2764
|
-
highlighted: (...chunks) => /*#__PURE__*/React.createElement("span", null, chunks)
|
|
2765
|
-
}
|
|
2769
|
+
id: "eligibility-modal.title-deferred-plan",
|
|
2770
|
+
defaultMessage: "Payez en plusieurs fois ou plus tard par carte bancaire avec Alma."
|
|
2766
2771
|
}) : /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2767
|
-
id:
|
|
2768
|
-
defaultMessage: "
|
|
2769
|
-
values: {
|
|
2770
|
-
highlighted: (...chunks) => /*#__PURE__*/React.createElement("span", null, chunks)
|
|
2771
|
-
}
|
|
2772
|
+
id: "eligibility-modal.title-normal",
|
|
2773
|
+
defaultMessage: "Payez en plusieurs fois par carte bancaire avec Alma."
|
|
2772
2774
|
}));
|
|
2773
2775
|
|
|
2774
|
-
var s$
|
|
2776
|
+
var s$9 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC","logo":"_xW3wt"};
|
|
2775
2777
|
|
|
2776
2778
|
const DesktopModal = ({
|
|
2777
2779
|
children,
|
|
2778
2780
|
isSomePlanDeferred,
|
|
2779
2781
|
cards
|
|
2780
2782
|
}) => /*#__PURE__*/React.createElement("div", {
|
|
2781
|
-
className: cx(s$
|
|
2783
|
+
className: cx(s$9.container, STATIC_CUSTOMISATION_CLASSES.desktopModal),
|
|
2782
2784
|
"data-testid": "modal-container"
|
|
2783
|
-
}, /*#__PURE__*/React.createElement("
|
|
2784
|
-
className: cx([s$
|
|
2785
|
+
}, /*#__PURE__*/React.createElement("aside", {
|
|
2786
|
+
className: cx([s$9.block, s$9.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
|
|
2785
2787
|
}, /*#__PURE__*/React.createElement(Title, {
|
|
2786
2788
|
isSomePlanDeferred: isSomePlanDeferred
|
|
2787
2789
|
}), /*#__PURE__*/React.createElement(Info, null), cards && /*#__PURE__*/React.createElement(Cards, {
|
|
2788
2790
|
cards: cards
|
|
2789
|
-
}), /*#__PURE__*/React.createElement(
|
|
2790
|
-
className:
|
|
2791
|
+
}), /*#__PURE__*/React.createElement(AlmaLogo, {
|
|
2792
|
+
className: s$9.logo,
|
|
2793
|
+
width: "75"
|
|
2794
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
2795
|
+
className: cx(s$9.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
|
|
2791
2796
|
}, children));
|
|
2792
2797
|
|
|
2793
|
-
var s$
|
|
2798
|
+
var s$a = {"noEligibility":"_17qNJ","loader":"_2oTJq","scheduleArea":"_2u9rj","verticalLine":"_VRdAU"};
|
|
2794
2799
|
|
|
2795
|
-
var s$
|
|
2800
|
+
var s$b = {"container":"_2G7Ch","logo":"_2779r"};
|
|
2796
2801
|
|
|
2797
2802
|
const MobileModal = ({
|
|
2798
2803
|
children,
|
|
2799
2804
|
isSomePlanDeferred,
|
|
2800
2805
|
cards
|
|
2801
2806
|
}) => /*#__PURE__*/React.createElement("div", {
|
|
2802
|
-
className: cx(s$
|
|
2807
|
+
className: cx(s$b.container, STATIC_CUSTOMISATION_CLASSES.mobileModal),
|
|
2803
2808
|
"data-testid": "modal-container"
|
|
2804
2809
|
}, /*#__PURE__*/React.createElement(Title, {
|
|
2805
2810
|
isSomePlanDeferred: isSomePlanDeferred
|
|
2806
2811
|
}), children, /*#__PURE__*/React.createElement(Info, null), cards && /*#__PURE__*/React.createElement(Cards, {
|
|
2807
2812
|
cards: cards
|
|
2808
|
-
}), /*#__PURE__*/React.createElement(
|
|
2813
|
+
}), /*#__PURE__*/React.createElement(AlmaLogo, {
|
|
2814
|
+
className: s$b.logo,
|
|
2815
|
+
width: "75"
|
|
2816
|
+
}));
|
|
2809
2817
|
|
|
2810
2818
|
const EligibilityModal = ({
|
|
2811
2819
|
initialPlanIndex,
|
|
@@ -2831,9 +2839,9 @@ const EligibilityModal = ({
|
|
|
2831
2839
|
isSomePlanDeferred: isSomePlanDeferred,
|
|
2832
2840
|
cards: cards
|
|
2833
2841
|
}, status === apiStatus.PENDING && /*#__PURE__*/React.createElement("div", {
|
|
2834
|
-
className: s$
|
|
2842
|
+
className: s$a.loader
|
|
2835
2843
|
}, /*#__PURE__*/React.createElement(LoadingIndicator, null)), status === apiStatus.SUCCESS && eligiblePlans.length === 0 && /*#__PURE__*/React.createElement("div", {
|
|
2836
|
-
className: s$
|
|
2844
|
+
className: s$a.noEligibility
|
|
2837
2845
|
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2838
2846
|
id: "eligibility-modal.no-eligibility",
|
|
2839
2847
|
defaultMessage: "Oups, il semblerait que la simulation n'ait pas fonctionn\u00E9."
|
|
@@ -2841,9 +2849,15 @@ const EligibilityModal = ({
|
|
|
2841
2849
|
eligibilityPlans: eligiblePlans,
|
|
2842
2850
|
currentPlanIndex: currentPlanIndex,
|
|
2843
2851
|
setCurrentPlanIndex: setCurrentPlanIndex
|
|
2852
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
2853
|
+
className: s$a.scheduleArea
|
|
2854
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2855
|
+
className: s$a.verticalLine
|
|
2844
2856
|
}), /*#__PURE__*/React.createElement(Schedule, {
|
|
2845
2857
|
currentPlan: currentPlan
|
|
2846
|
-
})
|
|
2858
|
+
}), /*#__PURE__*/React.createElement(TotalBlock, {
|
|
2859
|
+
currentPlan: currentPlan
|
|
2860
|
+
})))));
|
|
2847
2861
|
};
|
|
2848
2862
|
|
|
2849
2863
|
/**
|
|
@@ -2867,18 +2881,18 @@ const ModalContainer = ({
|
|
|
2867
2881
|
});
|
|
2868
2882
|
};
|
|
2869
2883
|
|
|
2870
|
-
var s$
|
|
2884
|
+
var s$c = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
|
|
2871
2885
|
|
|
2872
2886
|
const Loader = ({
|
|
2873
2887
|
className
|
|
2874
2888
|
}) => {
|
|
2875
2889
|
return /*#__PURE__*/React.createElement("div", {
|
|
2876
|
-
className: cx(s$
|
|
2890
|
+
className: cx(s$c.loadingIndicator, className),
|
|
2877
2891
|
"data-testid": "loader"
|
|
2878
2892
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2879
|
-
className: s$
|
|
2893
|
+
className: s$c.line1
|
|
2880
2894
|
}), /*#__PURE__*/React.createElement("div", {
|
|
2881
|
-
className: s$
|
|
2895
|
+
className: s$c.line2
|
|
2882
2896
|
}));
|
|
2883
2897
|
};
|
|
2884
2898
|
|
|
@@ -2960,7 +2974,7 @@ const STATIC_CUSTOMISATION_CLASSES$1 = {
|
|
|
2960
2974
|
activeOption: prefix$1 + '-active-option'
|
|
2961
2975
|
};
|
|
2962
2976
|
|
|
2963
|
-
var s$
|
|
2977
|
+
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","error":"_R0YlN","errorText":"_2kGhu","errorButton":"_73d_Y","pending":"_1ZDMS","clickable":"_UksZa","unClickable":"_1lr-q"};
|
|
2964
2978
|
|
|
2965
2979
|
const VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
|
|
2966
2980
|
const DEFAULT_TRANSITION_TIME = 5500;
|
|
@@ -3039,7 +3053,7 @@ const PaymentPlanWidget = ({
|
|
|
3039
3053
|
|
|
3040
3054
|
if (status === apiStatus.PENDING) {
|
|
3041
3055
|
return /*#__PURE__*/React.createElement("div", {
|
|
3042
|
-
className: cx(s$
|
|
3056
|
+
className: cx(s$d.widgetButton, s$d.pending)
|
|
3043
3057
|
}, /*#__PURE__*/React.createElement(Loader, null));
|
|
3044
3058
|
}
|
|
3045
3059
|
|
|
@@ -3057,19 +3071,19 @@ const PaymentPlanWidget = ({
|
|
|
3057
3071
|
|
|
3058
3072
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
3059
3073
|
onClick: handleOpenModal,
|
|
3060
|
-
className: cx(s$
|
|
3061
|
-
[s$
|
|
3062
|
-
[s$
|
|
3063
|
-
[s$
|
|
3074
|
+
className: cx(s$d.widgetButton, {
|
|
3075
|
+
[s$d.clickable]: eligiblePlans.length > 0,
|
|
3076
|
+
[s$d.unClickable]: eligiblePlans.length === 0,
|
|
3077
|
+
[s$d.hideBorder]: _hideBorder
|
|
3064
3078
|
}, STATIC_CUSTOMISATION_CLASSES$1.container),
|
|
3065
3079
|
"data-testid": "widget-button"
|
|
3066
3080
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3067
|
-
className: cx(s$
|
|
3068
|
-
}, /*#__PURE__*/React.createElement(
|
|
3069
|
-
className: s$
|
|
3070
|
-
monochrome:
|
|
3081
|
+
className: cx(s$d.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
|
|
3082
|
+
}, /*#__PURE__*/React.createElement(AlmaLogo, {
|
|
3083
|
+
className: s$d.logo,
|
|
3084
|
+
color: monochrome ? 'var(--off-black)' : undefined
|
|
3071
3085
|
}), /*#__PURE__*/React.createElement("div", {
|
|
3072
|
-
className: cx(s$
|
|
3086
|
+
className: cx(s$d.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
|
|
3073
3087
|
}, eligibilityPlans.map((eligibilityPlan, key) => {
|
|
3074
3088
|
const isCurrent = key === current;
|
|
3075
3089
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -3078,15 +3092,15 @@ const PaymentPlanWidget = ({
|
|
|
3078
3092
|
onTouchStart: () => onHover(key),
|
|
3079
3093
|
onMouseOut: onLeave,
|
|
3080
3094
|
onTouchEnd: onLeave,
|
|
3081
|
-
className: cx(s$
|
|
3082
|
-
[cx(s$
|
|
3083
|
-
[s$
|
|
3084
|
-
[cx(s$
|
|
3095
|
+
className: cx(s$d.plan, {
|
|
3096
|
+
[cx(s$d.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)]: isCurrent,
|
|
3097
|
+
[s$d.monochrome]: monochrome && isCurrent,
|
|
3098
|
+
[cx(s$d.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)]: !eligibilityPlan.eligible
|
|
3085
3099
|
})
|
|
3086
3100
|
}, paymentPlanShorthandName(eligibilityPlan));
|
|
3087
3101
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
3088
|
-
className: cx(s$
|
|
3089
|
-
[cx(s$
|
|
3102
|
+
className: cx(s$d.info, {
|
|
3103
|
+
[cx(s$d.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)]: eligibilityPlans[current] && !eligibilityPlans[current].eligible
|
|
3090
3104
|
}, STATIC_CUSTOMISATION_CLASSES$1.paymentInfo)
|
|
3091
3105
|
}, eligibilityPlans.length !== 0 && paymentPlanInfoText(eligibilityPlans[current]))), isOpen && /*#__PURE__*/React.createElement(EligibilityModal, {
|
|
3092
3106
|
initialPlanIndex: getIndexWithinEligiblePlans(current),
|