@alma/widgets 3.3.12 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/raw/widgets-wc.umd.js +131 -67
- package/dist/raw/widgets-wc.umd.js.map +0 -0
- package/dist/raw/widgets.css +26 -6
- package/dist/raw/widgets.js +131 -67
- package/dist/raw/widgets.js.map +1 -1
- package/dist/raw/widgets.m.js +131 -67
- package/dist/raw/widgets.m.js.map +1 -1
- package/dist/raw/widgets.modern.js +138 -74
- package/dist/raw/widgets.modern.js.map +1 -1
- package/dist/raw/widgets.umd.js +131 -67
- package/dist/raw/widgets.umd.js.map +1 -1
- package/dist/widgets-wc.umd.js +1 -1
- package/dist/widgets-wc.umd.js.map +0 -1
- package/dist/widgets.css +4 -3
- 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.m.js
CHANGED
|
@@ -1752,7 +1752,9 @@ if (!''.trim) String.prototype.trim = function () {
|
|
|
1752
1752
|
|
|
1753
1753
|
var messagesDE = {
|
|
1754
1754
|
"credit-features.credit-cost-display": "{creditCost} (APR {taegPercentage})",
|
|
1755
|
-
"credit-features.information": "
|
|
1755
|
+
"credit-features.information": "Überprüfen Sie Ihre Rückzahlungsmöglichkeiten, bevor Sie eine Verpflichtung eingehen.",
|
|
1756
|
+
"credit-features.information.title": "Ein Kredit verpflichtet Sie und muss zurückgezahlt werden.",
|
|
1757
|
+
"credit-features.legal-text": "Kredit in Höhe von {totalWithoutFirstInstallment} zu einem festen Sollzinssatz von {taegPercentage} über eine Laufzeit von {installmeentsCountWithoutFirst} Monaten. Ermöglicht, zusätzlich zu einer Anzahlung von {firstInstallmentAmount}, die Finanzierung eines Kaufs in Höhe von {productPriceWithoutCreditCost}. Vorbehaltlich der Prüfung und Annahme durch Alma. Gesetzliche Widerrufsfrist von 14 Tagen. Simulation präsentiert von Alma, eingetragen im RCS Nanterre unter der Nummer 839 100 575, Zahlungsinstitut und Finanzierungsgesellschaft, zugelassen von der ACPR unter der Nummer 17408 (IPC-Nummer / Bankcode).",
|
|
1756
1758
|
"credit-features.total-credit-cost": "Davon Kreditkosten",
|
|
1757
1759
|
"eligibility-modal.bullet-1": "Wählen Sie <strong>Alma</strong> beim Check-out. ",
|
|
1758
1760
|
"eligibility-modal.bullet-2": "Lassen Sie sich führen und bestätigen Sie Ihre Zahlung in <strong>2 Minuten.</strong>",
|
|
@@ -1767,6 +1769,7 @@ var messagesDE = {
|
|
|
1767
1769
|
"installments.today": "Heute",
|
|
1768
1770
|
"installments.total-amount": "Gesamtsumme",
|
|
1769
1771
|
"installments.total-fees": "Davon Kosten",
|
|
1772
|
+
"payment-plan-strings.credit": "Klicken Sie, um mehr zu erfahren",
|
|
1770
1773
|
"payment-plan-strings.day-abbreviation": "T{deferredDays}",
|
|
1771
1774
|
"payment-plan-strings.default-message": "Bezahlen Sie zinsfrei in mehreren Raten mit Alma.",
|
|
1772
1775
|
"payment-plan-strings.deferred": "{totalAmount} zu zahlen am {dueDate}",
|
|
@@ -1782,7 +1785,9 @@ var messagesDE = {
|
|
|
1782
1785
|
|
|
1783
1786
|
var messagesEN = {
|
|
1784
1787
|
"credit-features.credit-cost-display": "{creditCost} (APR {taegPercentage})",
|
|
1785
|
-
"credit-features.information": "
|
|
1788
|
+
"credit-features.information": "Check your repayment capacity before committing yourself.",
|
|
1789
|
+
"credit-features.information.title": "Credit is a commitment and must be repaid.",
|
|
1790
|
+
"credit-features.legal-text": "Loan of {totalWithoutFirstInstallment} at a fixed interest rate of {taegPercentage} over a period of {installmeentsCountWithoutFirst} months. In addition to a down payment of {firstInstallmentAmount}, this loan can be used to finance a purchase of {productPriceWithoutCreditCost}. Subject to review and acceptance by Alma. Legal cooling-off period of 14 days. Simulation presented by Alma, registered with the RCS Nanterre under number 839 100 575, payment and finance company approved by the ACPR under number 17408 (CIB number / Bank code).",
|
|
1786
1791
|
"credit-features.total-credit-cost": "Of which cost of credit",
|
|
1787
1792
|
"eligibility-modal.bullet-1": "Choose <strong>Alma</strong> at checkout.",
|
|
1788
1793
|
"eligibility-modal.bullet-2": "Let us guide you and validate your payment in <strong>2 minutes.</strong>",
|
|
@@ -1797,6 +1802,7 @@ var messagesEN = {
|
|
|
1797
1802
|
"installments.today": "Today",
|
|
1798
1803
|
"installments.total-amount": "Total",
|
|
1799
1804
|
"installments.total-fees": "Of which costs (incl. VAT)",
|
|
1805
|
+
"payment-plan-strings.credit": "Click to find out more",
|
|
1800
1806
|
"payment-plan-strings.day-abbreviation": "D{deferredDays}",
|
|
1801
1807
|
"payment-plan-strings.default-message": "Pay in installments with Alma",
|
|
1802
1808
|
"payment-plan-strings.deferred": "{totalAmount} to pay the {dueDate}",
|
|
@@ -1812,7 +1818,9 @@ var messagesEN = {
|
|
|
1812
1818
|
|
|
1813
1819
|
var messagesES = {
|
|
1814
1820
|
"credit-features.credit-cost-display": "{creditCost} (TAE {taegPercentage})",
|
|
1815
|
-
"credit-features.information": "
|
|
1821
|
+
"credit-features.information": "Compruebe tu capacidad de reembolso antes de comprometerte.",
|
|
1822
|
+
"credit-features.information.title": "El crédito y/o pago a plazos es un compromiso y debe devolverse.",
|
|
1823
|
+
"credit-features.legal-text": "{totalWithoutFirstInstallment} {taegPercentage} {installmeentsCountWithoutFirst} Préstamo de a un tipo deudor fijo de a lo largo de un periodo de meses. {firstInstallmentAmount} {productPriceWithoutCreditCost}Además de un depósito de , esto le permitirá financiar una compra de . Sujeto a revisión y aceptación por parte de Alma. Plazo legal de retractación de 14 días. Simulación presentada por Alma, inscrita en el Registro Mercantil de Nanterre con el número 839 100 575, sociedad de pago y financiación autorizada por la ACPR con el número 17408 (número CIB / código bancario).",
|
|
1816
1824
|
"credit-features.total-credit-cost": "Coste de crédito (incl. en el total)",
|
|
1817
1825
|
"eligibility-modal.bullet-1": "Elige <strong>Alma</strong> como método de pago.",
|
|
1818
1826
|
"eligibility-modal.bullet-2": "Déjate guiar y válida tu pago en <strong>2 minutos.</strong>",
|
|
@@ -1827,6 +1835,7 @@ var messagesES = {
|
|
|
1827
1835
|
"installments.today": "Hoy",
|
|
1828
1836
|
"installments.total-amount": "Total",
|
|
1829
1837
|
"installments.total-fees": "De los cuales, costes (IVA incluido)",
|
|
1838
|
+
"payment-plan-strings.credit": "Haz click para más información",
|
|
1830
1839
|
"payment-plan-strings.day-abbreviation": "D{deferredDays}",
|
|
1831
1840
|
"payment-plan-strings.default-message": "Pagar a plazos con Alma",
|
|
1832
1841
|
"payment-plan-strings.deferred": "{totalAmount} a pagar el {dueDate}",
|
|
@@ -1842,7 +1851,9 @@ var messagesES = {
|
|
|
1842
1851
|
|
|
1843
1852
|
var messagesFR = {
|
|
1844
1853
|
"credit-features.credit-cost-display": "{creditCost} (TAEG {taegPercentage})",
|
|
1845
|
-
"credit-features.information": "
|
|
1854
|
+
"credit-features.information": "Vérifiez vos capacités de remboursement avant de vous engager.",
|
|
1855
|
+
"credit-features.information.title": "Un crédit vous engage et doit être remboursé.",
|
|
1856
|
+
"credit-features.legal-text": "Crédit d'un montant de {totalWithoutFirstInstallment} au taux débiteur fixe de {taegPercentage} sur une durée de {installmeentsCountWithoutFirst} mois. Permettant, en complément d'un acompte de {firstInstallmentAmount}, de financer un achat d'un montant de {productPriceWithoutCreditCost}. Sous réserve d'étude et d'acceptation par Alma. Délai légal de rétractation de 14 jours. Simulation présentée par Alma, immatriculée au RCS Nanterre sous le numéro 839 100 575, établissement de paiement et société de financement agréée par l’ACPR sous le n° 17408 (numéro CIB / Code banque).",
|
|
1846
1857
|
"credit-features.total-credit-cost": "Dont coût du crédit",
|
|
1847
1858
|
"eligibility-modal.bullet-1": "Choisissez <strong>Alma</strong> au moment du paiement.",
|
|
1848
1859
|
"eligibility-modal.bullet-2": "Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",
|
|
@@ -1857,6 +1868,7 @@ var messagesFR = {
|
|
|
1857
1868
|
"installments.today": "Aujourd'hui",
|
|
1858
1869
|
"installments.total-amount": "Total",
|
|
1859
1870
|
"installments.total-fees": "Dont frais (TTC)",
|
|
1871
|
+
"payment-plan-strings.credit": "Cliquez pour en savoir plus",
|
|
1860
1872
|
"payment-plan-strings.day-abbreviation": "J{deferredDays}",
|
|
1861
1873
|
"payment-plan-strings.default-message": "Payez en plusieurs fois avec Alma",
|
|
1862
1874
|
"payment-plan-strings.deferred": "{totalAmount} à payer le {dueDate}",
|
|
@@ -1872,7 +1884,9 @@ var messagesFR = {
|
|
|
1872
1884
|
|
|
1873
1885
|
var messagesIT = {
|
|
1874
1886
|
"credit-features.credit-cost-display": "{creditCost} (TAEG {taegPercentage})",
|
|
1875
|
-
"credit-features.information": "
|
|
1887
|
+
"credit-features.information": "Verificate la vostra capacità di rimborso prima di prendere un impegno.",
|
|
1888
|
+
"credit-features.information.title": "Il credito è un impegno e deve essere ripagato.",
|
|
1889
|
+
"credit-features.legal-text": "{totalWithoutFirstInstallment} {taegPercentage} {installmeentsCountWithoutFirst} Prestito a tasso fisso per un periodo di mesi. {firstInstallmentAmount} {productPriceWithoutCreditCost}Oltre a un deposito di , questo vi permetterà di finanziare un acquisto di . Soggetto a revisione e accettazione da parte di Alma. Periodo di recesso legale di 14 giorni. Simulazione presentata da Alma, iscritta al Registro del Commercio e delle Imprese di Nanterre con il numero 839 100 575, società di pagamento e di finanziamento approvata dall'ACPR con il numero 17408 (numero CIB / codice bancario).",
|
|
1876
1890
|
"credit-features.total-credit-cost": "Di cui commissioni",
|
|
1877
1891
|
"eligibility-modal.bullet-1": "Seleziona <strong>Alma</strong> come metodo di pagamento.",
|
|
1878
1892
|
"eligibility-modal.bullet-2": "Segui le istruzioni e completa l'acquisto <strong>in meno di 2 minuti.</strong>",
|
|
@@ -1887,6 +1901,7 @@ var messagesIT = {
|
|
|
1887
1901
|
"installments.today": "Oggi",
|
|
1888
1902
|
"installments.total-amount": "Totale",
|
|
1889
1903
|
"installments.total-fees": "Di cui commissioni",
|
|
1904
|
+
"payment-plan-strings.credit": "Clicca qui per saperne di più",
|
|
1890
1905
|
"payment-plan-strings.day-abbreviation": "G{deferredDays}",
|
|
1891
1906
|
"payment-plan-strings.default-message": "Paga a rate con Alma, senza registrazione.",
|
|
1892
1907
|
"payment-plan-strings.deferred": "{totalAmount} da pagare il {dueDate}",
|
|
@@ -1902,7 +1917,9 @@ var messagesIT = {
|
|
|
1902
1917
|
|
|
1903
1918
|
var messagesNL = {
|
|
1904
1919
|
"credit-features.credit-cost-display": "{creditCost} (gemiddeld rente percentage {taegPercentage})",
|
|
1905
|
-
"credit-features.information": "
|
|
1920
|
+
"credit-features.information": "Controleer uw terugbetalingscapaciteit voordat u een toezegging doet.",
|
|
1921
|
+
"credit-features.information.title": "Krediet is een verplichting en moet worden terugbetaald.",
|
|
1922
|
+
"credit-features.legal-text": "{totalWithoutFirstInstallment} {taegPercentage} {installmeentsCountWithoutFirst} Lening van tegen een vaste rentevoet van over een periode van maanden. {firstInstallmentAmount} {productPriceWithoutCreditCost}Naast een aanbetaling van , kun je hiermee een aankoop financieren van . Onder voorbehoud van beoordeling en aanvaarding door Alma. Wettelijke herroepingstermijn van 14 dagen. Simulatie aangeboden door Alma, ingeschreven in het handels- en bedrijvenregister van Nanterre onder nummer 839 100 575, betalings- en financieringsmaatschappij erkend door de ACPR onder nummer 17408 (CIB-nummer / bankcode).",
|
|
1906
1923
|
"credit-features.total-credit-cost": "Waarvan kredietkosten",
|
|
1907
1924
|
"eligibility-modal.bullet-1": "Kies <strong>Alma</strong> bij het afrekenen om de eerste termijnbetaling te voldoen. Dit kan gemakkelijk via jouw favoriete betaalmethode.",
|
|
1908
1925
|
"eligibility-modal.bullet-2": "Betaal gemakkelijk <strong>binnen 1 minuut </strong>. Je hebt hier geen account voor nodig.",
|
|
@@ -1917,6 +1934,7 @@ var messagesNL = {
|
|
|
1917
1934
|
"installments.today": "Vandaag",
|
|
1918
1935
|
"installments.total-amount": "Totaal",
|
|
1919
1936
|
"installments.total-fees": "Waarvan kosten (incl. BTW)",
|
|
1937
|
+
"payment-plan-strings.credit": "Klik hier voor meer informatie",
|
|
1920
1938
|
"payment-plan-strings.day-abbreviation": "D{deferredDays}",
|
|
1921
1939
|
"payment-plan-strings.default-message": "Betaal in termijnen bij Alma - helemaal rentevrij",
|
|
1922
1940
|
"payment-plan-strings.deferred": "{totalAmount} te betalen op {dueDate}",
|
|
@@ -1932,7 +1950,9 @@ var messagesNL = {
|
|
|
1932
1950
|
|
|
1933
1951
|
var messagesPT = {
|
|
1934
1952
|
"credit-features.credit-cost-display": "{creditCost} (TAEG {taegPercentage})",
|
|
1935
|
-
"credit-features.information": "
|
|
1953
|
+
"credit-features.information": "Verifique a sua capacidade de reembolso antes de assumir um compromisso.",
|
|
1954
|
+
"credit-features.information.title": "O crédito é um compromisso e deve ser reembolsado.",
|
|
1955
|
+
"credit-features.legal-text": "{totalWithoutFirstInstallment} {taegPercentage} {installmeentsCountWithoutFirst} Empréstimo de a uma taxa de juro fixa de durante um período de meses. {firstInstallmentAmount} {productPriceWithoutCreditCost}Para além de um depósito de , isto permitir-lhe-á financiar uma compra de . Sujeito a análise e aceitação pela Alma. Prazo legal de retratação de 14 dias. Simulação apresentada pela Alma, inscrita na Conservatória do Registo Comercial e das Sociedades de Nanterre sob o número 839 100 575, sociedade de pagamento e de financiamento aprovada pela ACPR sob o número 17408 (número CIB / código bancário).",
|
|
1936
1956
|
"credit-features.total-credit-cost": "Incluindo comissões de crédito",
|
|
1937
1957
|
"eligibility-modal.bullet-1": "Seleccionar <strong>Alma - Pay Now</strong> no final da compra.",
|
|
1938
1958
|
"eligibility-modal.bullet-2": "Siga as instruções e valide o seu pagamento em <strong>2 minutos.</strong>",
|
|
@@ -1947,6 +1967,7 @@ var messagesPT = {
|
|
|
1947
1967
|
"installments.today": "Hoje",
|
|
1948
1968
|
"installments.total-amount": "Total",
|
|
1949
1969
|
"installments.total-fees": "Das quais comissões (incl. IVA)",
|
|
1970
|
+
"payment-plan-strings.credit": "Clique aqui para saber mais",
|
|
1950
1971
|
"payment-plan-strings.day-abbreviation": "D{deferredDays}",
|
|
1951
1972
|
"payment-plan-strings.default-message": "Pagamento em prestações com a Alma",
|
|
1952
1973
|
"payment-plan-strings.deferred": "{totalAmount} a pagar em {dueDate}",
|
|
@@ -2192,7 +2213,7 @@ var useFetchEligibility = function useFetchEligibility(purchaseAmount, _ref, pla
|
|
|
2192
2213
|
shipping_address: shipping_address
|
|
2193
2214
|
}, {
|
|
2194
2215
|
Authorization: "Alma-Merchant-Auth " + merchantId,
|
|
2195
|
-
'X-Alma-Agent': "Alma Widget/" + "v3.
|
|
2216
|
+
'X-Alma-Agent': "Alma Widget/" + "v3.4.0"
|
|
2196
2217
|
}).then(function (res) {
|
|
2197
2218
|
setCache(key, res);
|
|
2198
2219
|
setEligibility(res);
|
|
@@ -2206,7 +2227,7 @@ var useFetchEligibility = function useFetchEligibility(purchaseAmount, _ref, pla
|
|
|
2206
2227
|
return [filterEligibility(eligibility, plans), status];
|
|
2207
2228
|
};
|
|
2208
2229
|
|
|
2209
|
-
var s = {"container":"_GTTk7","total":"_34s2g","fees":"_W7qIA","creditCost":"_24KmE"};
|
|
2230
|
+
var s = {"container":"_GTTk7","total":"_34s2g","creditInfo":"_15KNd","creditInfoTitle":"_3T0mA","fees":"_W7qIA","creditCost":"_24KmE","creditInfoLegalText":"_2e3lw"};
|
|
2210
2231
|
|
|
2211
2232
|
/**
|
|
2212
2233
|
* Prefix classes to avoid name collisions.
|
|
@@ -2236,6 +2257,7 @@ var STATIC_CUSTOMISATION_CLASSES = {
|
|
|
2236
2257
|
};
|
|
2237
2258
|
|
|
2238
2259
|
var TotalBlock = function TotalBlock(_ref) {
|
|
2260
|
+
var _currentPlan$payment_, _currentPlan$payment_2, _currentPlan$payment_3, _currentPlan$payment_4;
|
|
2239
2261
|
var currentPlan = _ref.currentPlan;
|
|
2240
2262
|
var intl = useIntl();
|
|
2241
2263
|
var total = priceFromCents(currentPlan.purchase_amount + currentPlan.customer_total_cost_amount);
|
|
@@ -2243,7 +2265,20 @@ var TotalBlock = function TotalBlock(_ref) {
|
|
|
2243
2265
|
var TAEG = (currentPlan == null ? void 0 : currentPlan.annual_interest_rate) && currentPlan.annual_interest_rate / 10000 || 0;
|
|
2244
2266
|
var customerFees = priceFromCents(currentPlan.customer_total_cost_amount);
|
|
2245
2267
|
var isCredit = currentPlan.installments_count > 4;
|
|
2246
|
-
|
|
2268
|
+
var firstInstallmentAmount = priceFromCents((_currentPlan$payment_ = (_currentPlan$payment_2 = currentPlan.payment_plan) == null || (_currentPlan$payment_2 = _currentPlan$payment_2[0]) == null ? void 0 : _currentPlan$payment_2.total_amount) != null ? _currentPlan$payment_ : 0);
|
|
2269
|
+
// For totalWithoutFirstInstallment, we need to get the total price and add the credit cost, before removing the first installment, to get the rest of the amount to pay.
|
|
2270
|
+
var totalWithoutFirstInstallment = priceFromCents(currentPlan.purchase_amount + currentPlan.customer_total_cost_amount - ((_currentPlan$payment_3 = (_currentPlan$payment_4 = currentPlan.payment_plan) == null || (_currentPlan$payment_4 = _currentPlan$payment_4[0]) == null ? void 0 : _currentPlan$payment_4.total_amount) != null ? _currentPlan$payment_3 : 0));
|
|
2271
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isCredit && ( /*#__PURE__*/React.createElement("div", {
|
|
2272
|
+
className: s.creditInfo
|
|
2273
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
2274
|
+
className: s.creditInfoTitle
|
|
2275
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2276
|
+
id: "credit-features.information.title",
|
|
2277
|
+
defaultMessage: "Un cr\xE9dit vous engage et doit \xEAtre rembours\xE9."
|
|
2278
|
+
})), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2279
|
+
id: "credit-features.information",
|
|
2280
|
+
defaultMessage: "V\xE9rifiez vos capacit\xE9s de remboursement avant de vous engager."
|
|
2281
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
2247
2282
|
className: cx(s.container, STATIC_CUSTOMISATION_CLASSES.summary),
|
|
2248
2283
|
"data-testid": "modal-summary"
|
|
2249
2284
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -2284,7 +2319,31 @@ var TotalBlock = function TotalBlock(_ref) {
|
|
|
2284
2319
|
value: customerFees,
|
|
2285
2320
|
style: "currency",
|
|
2286
2321
|
currency: "EUR"
|
|
2287
|
-
})))))
|
|
2322
|
+
}))))), isCredit && ( /*#__PURE__*/React.createElement("div", {
|
|
2323
|
+
className: s.creditInfoLegalText
|
|
2324
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2325
|
+
id: "credit-features.legal-text",
|
|
2326
|
+
defaultMessage: "Cr\xE9dit d'un montant de {totalWithoutFirstInstallment} au taux d\xE9biteur fixe de {taegPercentage} sur une dur\xE9e de {installmeentsCountWithoutFirst} mois. Permettant, en compl\xE9ment d'un acompte de {firstInstallmentAmount}, de financer un achat d'un montant de {productPriceWithoutCreditCost}. Sous r\xE9serve d'\xE9tude et d'acceptation par Alma. D\xE9lai l\xE9gal de r\xE9tractation de 14 jours. Simulation pr\xE9sent\xE9e par Alma, immatricul\xE9e au RCS Nanterre sous le num\xE9ro 839 100 575, \xE9tablissement de paiement\xA0et soci\xE9t\xE9 de financement agr\xE9\xE9e par l\u2019ACPR sous le n\xB0 17408 (num\xE9ro CIB / Code banque).",
|
|
2327
|
+
values: {
|
|
2328
|
+
totalWithoutFirstInstallment: intl.formatNumber(totalWithoutFirstInstallment, {
|
|
2329
|
+
style: 'currency',
|
|
2330
|
+
currency: 'EUR'
|
|
2331
|
+
}),
|
|
2332
|
+
taegPercentage: intl.formatNumber(TAEG, {
|
|
2333
|
+
style: 'percent',
|
|
2334
|
+
maximumFractionDigits: 2
|
|
2335
|
+
}),
|
|
2336
|
+
installmeentsCountWithoutFirst: currentPlan.installments_count - 1,
|
|
2337
|
+
firstInstallmentAmount: intl.formatNumber(firstInstallmentAmount, {
|
|
2338
|
+
style: 'currency',
|
|
2339
|
+
currency: 'EUR'
|
|
2340
|
+
}),
|
|
2341
|
+
productPriceWithoutCreditCost: intl.formatNumber(total - creditCost, {
|
|
2342
|
+
style: 'currency',
|
|
2343
|
+
currency: 'EUR'
|
|
2344
|
+
})
|
|
2345
|
+
}
|
|
2346
|
+
})))));
|
|
2288
2347
|
};
|
|
2289
2348
|
|
|
2290
2349
|
var s$1 = {"loadingIndicator":"_31lrj","bounce":"_3NtDa"};
|
|
@@ -2362,6 +2421,8 @@ var ControlledModal = function ControlledModal(_ref) {
|
|
|
2362
2421
|
}, children));
|
|
2363
2422
|
};
|
|
2364
2423
|
|
|
2424
|
+
var s$3 = {"openModalInfo":"_bplXm"};
|
|
2425
|
+
|
|
2365
2426
|
var paymentPlanShorthandName = function paymentPlanShorthandName(payment) {
|
|
2366
2427
|
var deferred_days = payment.deferred_days,
|
|
2367
2428
|
deferred_months = payment.deferred_months,
|
|
@@ -2465,6 +2526,15 @@ var paymentPlanInfoText = function paymentPlanInfoText(payment) {
|
|
|
2465
2526
|
var areInstallmentsOfSameAmount = payment_plan == null ? void 0 : payment_plan.every(function (installment, index) {
|
|
2466
2527
|
return index === 0 || installment.total_amount === payment_plan[0].total_amount;
|
|
2467
2528
|
});
|
|
2529
|
+
if (installmentsCount > 4) {
|
|
2530
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
2531
|
+
className: s$3.openModalInfo
|
|
2532
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2533
|
+
id: "payment-plan-strings.credit",
|
|
2534
|
+
defaultMessage: "Cliquez pour en savoir plus",
|
|
2535
|
+
description: "Link to credit details"
|
|
2536
|
+
}));
|
|
2537
|
+
}
|
|
2468
2538
|
if (isP1X(payment)) {
|
|
2469
2539
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2470
2540
|
id: "payment-plan-strings.pay-now",
|
|
@@ -2517,41 +2587,41 @@ var paymentPlanInfoText = function paymentPlanInfoText(payment) {
|
|
|
2517
2587
|
});
|
|
2518
2588
|
};
|
|
2519
2589
|
|
|
2520
|
-
var s$
|
|
2590
|
+
var s$4 = {"buttons":"_1l2Oa","active":"_3rue7","textButton":"_2T78a"};
|
|
2521
2591
|
|
|
2522
2592
|
var EligibilityPlansButtons = function EligibilityPlansButtons(_ref) {
|
|
2523
2593
|
var eligibilityPlans = _ref.eligibilityPlans,
|
|
2524
2594
|
currentPlanIndex = _ref.currentPlanIndex,
|
|
2525
2595
|
setCurrentPlanIndex = _ref.setCurrentPlanIndex;
|
|
2526
2596
|
return /*#__PURE__*/React.createElement("div", {
|
|
2527
|
-
className: cx(s$
|
|
2597
|
+
className: cx(s$4.buttons, STATIC_CUSTOMISATION_CLASSES.eligibilityOptions)
|
|
2528
2598
|
}, eligibilityPlans.map(function (eligibilityPlan, index) {
|
|
2529
2599
|
var _cx;
|
|
2530
2600
|
return /*#__PURE__*/React.createElement("button", {
|
|
2531
2601
|
key: index,
|
|
2532
|
-
className: cx((_cx = {}, _cx[cx(s$
|
|
2602
|
+
className: cx((_cx = {}, _cx[cx(s$4.active, STATIC_CUSTOMISATION_CLASSES.activeOption)] = index === currentPlanIndex, _cx)),
|
|
2533
2603
|
onClick: function onClick() {
|
|
2534
2604
|
return setCurrentPlanIndex(index);
|
|
2535
2605
|
}
|
|
2536
2606
|
}, /*#__PURE__*/React.createElement("span", {
|
|
2537
|
-
className: s$
|
|
2607
|
+
className: s$4.textButton
|
|
2538
2608
|
}, paymentPlanShorthandName(eligibilityPlan)));
|
|
2539
2609
|
}));
|
|
2540
2610
|
};
|
|
2541
2611
|
|
|
2542
|
-
var s$
|
|
2612
|
+
var s$5 = {"installment":"_z2Uiv","date":"_2lJQy","dot":"_1Z9wr","isCurrent":"_2Nmkl","bold":"_ezY-3"};
|
|
2543
2613
|
|
|
2544
2614
|
var Installment = function Installment(_ref) {
|
|
2545
2615
|
var _cx, _cx2;
|
|
2546
2616
|
var installment = _ref.installment,
|
|
2547
2617
|
index = _ref.index;
|
|
2548
2618
|
return /*#__PURE__*/React.createElement("div", {
|
|
2549
|
-
className: s$
|
|
2619
|
+
className: s$5.installment,
|
|
2550
2620
|
"data-testid": "installment-" + index
|
|
2551
2621
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2552
|
-
className: s$
|
|
2622
|
+
className: s$5.date
|
|
2553
2623
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2554
|
-
className: cx(s$
|
|
2624
|
+
className: cx(s$5.dot, (_cx = {}, _cx[s$5.isCurrent] = index === 0, _cx))
|
|
2555
2625
|
}), isToday(installment.due_date * 1000) ? ( /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2556
2626
|
id: "installments.today",
|
|
2557
2627
|
defaultMessage: "Aujourd'hui",
|
|
@@ -2562,7 +2632,7 @@ var Installment = function Installment(_ref) {
|
|
|
2562
2632
|
month: "long",
|
|
2563
2633
|
year: "numeric"
|
|
2564
2634
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
2565
|
-
className: cx((_cx2 = {}, _cx2[s$
|
|
2635
|
+
className: cx((_cx2 = {}, _cx2[s$5.bold] = index === 0, _cx2))
|
|
2566
2636
|
}, /*#__PURE__*/React.createElement(FormattedNumber, {
|
|
2567
2637
|
value: installment.total_amount / 100,
|
|
2568
2638
|
style: "currency",
|
|
@@ -2570,13 +2640,12 @@ var Installment = function Installment(_ref) {
|
|
|
2570
2640
|
})));
|
|
2571
2641
|
};
|
|
2572
2642
|
|
|
2573
|
-
var s$
|
|
2643
|
+
var s$6 = {"schedule":"_MPKjS"};
|
|
2574
2644
|
|
|
2575
2645
|
var Schedule = function Schedule(_ref) {
|
|
2576
2646
|
var currentPlan = _ref.currentPlan;
|
|
2577
|
-
var isCredit = currentPlan.installments_count > 4;
|
|
2578
2647
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2579
|
-
className: cx(s$
|
|
2648
|
+
className: cx(s$6.schedule, STATIC_CUSTOMISATION_CLASSES.scheduleDetails),
|
|
2580
2649
|
"data-testid": "modal-installments-element"
|
|
2581
2650
|
}, ((currentPlan == null ? void 0 : currentPlan.payment_plan) || []).map(function (installment, index) {
|
|
2582
2651
|
return /*#__PURE__*/React.createElement(Installment, {
|
|
@@ -2584,12 +2653,7 @@ var Schedule = function Schedule(_ref) {
|
|
|
2584
2653
|
installment: installment,
|
|
2585
2654
|
index: index
|
|
2586
2655
|
});
|
|
2587
|
-
})
|
|
2588
|
-
className: s$5.creditInfo
|
|
2589
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2590
|
-
id: "credit-features.information",
|
|
2591
|
-
defaultMessage: "Un cr\xE9dit vous engage et doit \xEAtre rembours\xE9. V\xE9rifiez vos capacit\xE9s de remboursement avant de vous engager."
|
|
2592
|
-
})))));
|
|
2656
|
+
})));
|
|
2593
2657
|
};
|
|
2594
2658
|
|
|
2595
2659
|
var _excluded$1 = ["color"];
|
|
@@ -2762,7 +2826,7 @@ var CbCard = function CbCard() {
|
|
|
2762
2826
|
}))));
|
|
2763
2827
|
};
|
|
2764
2828
|
|
|
2765
|
-
var s$
|
|
2829
|
+
var s$7 = {"cardContainer":"_1N3yO"};
|
|
2766
2830
|
|
|
2767
2831
|
var Cards = function Cards(_ref) {
|
|
2768
2832
|
var cards = _ref.cards;
|
|
@@ -2770,17 +2834,17 @@ var Cards = function Cards(_ref) {
|
|
|
2770
2834
|
var uniqueCards = Array.from(new Set(cards));
|
|
2771
2835
|
return /*#__PURE__*/React.createElement("div", {
|
|
2772
2836
|
"data-testid": "card-logos",
|
|
2773
|
-
className: cx(s$
|
|
2837
|
+
className: cx(s$7.cardContainer, STATIC_CUSTOMISATION_CLASSES.cardContainer)
|
|
2774
2838
|
}, uniqueCards.map(function (card) {
|
|
2775
2839
|
return /*#__PURE__*/React.createElement("div", {
|
|
2776
2840
|
key: card,
|
|
2777
|
-
className: s$
|
|
2841
|
+
className: s$7.card,
|
|
2778
2842
|
"data-testid": "card-logo-" + card
|
|
2779
2843
|
}, 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));
|
|
2780
2844
|
}));
|
|
2781
2845
|
};
|
|
2782
2846
|
|
|
2783
|
-
var s$
|
|
2847
|
+
var s$8 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
|
|
2784
2848
|
|
|
2785
2849
|
var Info = function Info(_ref) {
|
|
2786
2850
|
var isCurrentPlanP1X = _ref.isCurrentPlanP1X;
|
|
@@ -2788,12 +2852,12 @@ var Info = function Info(_ref) {
|
|
|
2788
2852
|
/*#__PURE__*/
|
|
2789
2853
|
// TODO: refactor this component into subcomponent to factorise code and be cleaner
|
|
2790
2854
|
React.createElement("div", {
|
|
2791
|
-
className: cx(s$
|
|
2855
|
+
className: cx(s$8.list, STATIC_CUSTOMISATION_CLASSES.info),
|
|
2792
2856
|
"data-testid": "modal-info-element"
|
|
2793
2857
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2794
|
-
className: s$
|
|
2858
|
+
className: s$8.listItem
|
|
2795
2859
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2796
|
-
className: cx(s$
|
|
2860
|
+
className: cx(s$8.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
2797
2861
|
}, "1"), /*#__PURE__*/React.createElement("div", {
|
|
2798
2862
|
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2799
2863
|
}, isCurrentPlanP1X ? ( /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
@@ -2813,9 +2877,9 @@ var Info = function Info(_ref) {
|
|
|
2813
2877
|
}
|
|
2814
2878
|
}
|
|
2815
2879
|
})))), /*#__PURE__*/React.createElement("div", {
|
|
2816
|
-
className: s$
|
|
2880
|
+
className: s$8.listItem
|
|
2817
2881
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2818
|
-
className: cx(s$
|
|
2882
|
+
className: cx(s$8.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
2819
2883
|
}, "2"), /*#__PURE__*/React.createElement("div", {
|
|
2820
2884
|
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2821
2885
|
}, isCurrentPlanP1X ? ( /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
@@ -2835,9 +2899,9 @@ var Info = function Info(_ref) {
|
|
|
2835
2899
|
}
|
|
2836
2900
|
}
|
|
2837
2901
|
})))), /*#__PURE__*/React.createElement("div", {
|
|
2838
|
-
className: s$
|
|
2902
|
+
className: s$8.listItem
|
|
2839
2903
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2840
|
-
className: cx(s$
|
|
2904
|
+
className: cx(s$8.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
2841
2905
|
}, "3"), /*#__PURE__*/React.createElement("div", {
|
|
2842
2906
|
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2843
2907
|
}, isCurrentPlanP1X ? ( /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
@@ -2860,13 +2924,13 @@ var Info = function Info(_ref) {
|
|
|
2860
2924
|
);
|
|
2861
2925
|
};
|
|
2862
2926
|
|
|
2863
|
-
var s$
|
|
2927
|
+
var s$9 = {"title":"_3ERx-"};
|
|
2864
2928
|
|
|
2865
2929
|
var Title = function Title(_ref) {
|
|
2866
2930
|
var isSomePlanDeferred = _ref.isSomePlanDeferred,
|
|
2867
2931
|
isCurrentPlanP1X = _ref.isCurrentPlanP1X;
|
|
2868
2932
|
return /*#__PURE__*/React.createElement("div", {
|
|
2869
|
-
className: cx(s$
|
|
2933
|
+
className: cx(s$9.title, STATIC_CUSTOMISATION_CLASSES.title),
|
|
2870
2934
|
"data-testid": "modal-title-element"
|
|
2871
2935
|
}, isSomePlanDeferred ? ( /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2872
2936
|
id: "eligibility-modal.title-deferred-plan",
|
|
@@ -2880,7 +2944,7 @@ var Title = function Title(_ref) {
|
|
|
2880
2944
|
})));
|
|
2881
2945
|
};
|
|
2882
2946
|
|
|
2883
|
-
var s$
|
|
2947
|
+
var s$a = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC","logo":"_xW3wt"};
|
|
2884
2948
|
|
|
2885
2949
|
var DesktopModal = function DesktopModal(_ref) {
|
|
2886
2950
|
var children = _ref.children,
|
|
@@ -2888,10 +2952,10 @@ var DesktopModal = function DesktopModal(_ref) {
|
|
|
2888
2952
|
cards = _ref.cards,
|
|
2889
2953
|
isCurrentPlanP1X = _ref.isCurrentPlanP1X;
|
|
2890
2954
|
return /*#__PURE__*/React.createElement("div", {
|
|
2891
|
-
className: cx(s$
|
|
2955
|
+
className: cx(s$a.container, STATIC_CUSTOMISATION_CLASSES.desktopModal),
|
|
2892
2956
|
"data-testid": "modal-container"
|
|
2893
2957
|
}, /*#__PURE__*/React.createElement("aside", {
|
|
2894
|
-
className: cx([s$
|
|
2958
|
+
className: cx([s$a.block, s$a.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
|
|
2895
2959
|
}, /*#__PURE__*/React.createElement(Title, {
|
|
2896
2960
|
isSomePlanDeferred: isSomePlanDeferred,
|
|
2897
2961
|
isCurrentPlanP1X: isCurrentPlanP1X
|
|
@@ -2900,16 +2964,16 @@ var DesktopModal = function DesktopModal(_ref) {
|
|
|
2900
2964
|
}), cards && /*#__PURE__*/React.createElement(Cards, {
|
|
2901
2965
|
cards: cards
|
|
2902
2966
|
}), /*#__PURE__*/React.createElement(AlmaLogo, {
|
|
2903
|
-
className: s$
|
|
2967
|
+
className: s$a.logo,
|
|
2904
2968
|
width: "75"
|
|
2905
2969
|
})), /*#__PURE__*/React.createElement("div", {
|
|
2906
|
-
className: cx(s$
|
|
2970
|
+
className: cx(s$a.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
|
|
2907
2971
|
}, children));
|
|
2908
2972
|
};
|
|
2909
2973
|
|
|
2910
|
-
var s$
|
|
2974
|
+
var s$b = {"noEligibility":"_17qNJ","loader":"_2oTJq","scheduleArea":"_2u9rj","verticalLine":"_VRdAU"};
|
|
2911
2975
|
|
|
2912
|
-
var s$
|
|
2976
|
+
var s$c = {"container":"_2G7Ch","logo":"_2779r"};
|
|
2913
2977
|
|
|
2914
2978
|
var MobileModal = function MobileModal(_ref) {
|
|
2915
2979
|
var children = _ref.children,
|
|
@@ -2917,7 +2981,7 @@ var MobileModal = function MobileModal(_ref) {
|
|
|
2917
2981
|
cards = _ref.cards,
|
|
2918
2982
|
isCurrentPlanP1X = _ref.isCurrentPlanP1X;
|
|
2919
2983
|
return /*#__PURE__*/React.createElement("div", {
|
|
2920
|
-
className: cx(s$
|
|
2984
|
+
className: cx(s$c.container, STATIC_CUSTOMISATION_CLASSES.mobileModal),
|
|
2921
2985
|
"data-testid": "modal-container"
|
|
2922
2986
|
}, /*#__PURE__*/React.createElement(Title, {
|
|
2923
2987
|
isSomePlanDeferred: isSomePlanDeferred,
|
|
@@ -2927,7 +2991,7 @@ var MobileModal = function MobileModal(_ref) {
|
|
|
2927
2991
|
}), cards && /*#__PURE__*/React.createElement(Cards, {
|
|
2928
2992
|
cards: cards
|
|
2929
2993
|
}), /*#__PURE__*/React.createElement(AlmaLogo, {
|
|
2930
|
-
className: s$
|
|
2994
|
+
className: s$c.logo,
|
|
2931
2995
|
width: "75"
|
|
2932
2996
|
}));
|
|
2933
2997
|
};
|
|
@@ -2962,9 +3026,9 @@ var EligibilityModal = function EligibilityModal(_ref) {
|
|
|
2962
3026
|
cards: cards,
|
|
2963
3027
|
isCurrentPlanP1X: isP1X(currentPlan)
|
|
2964
3028
|
}, status === statusResponse.PENDING && ( /*#__PURE__*/React.createElement("div", {
|
|
2965
|
-
className: s$
|
|
3029
|
+
className: s$b.loader
|
|
2966
3030
|
}, /*#__PURE__*/React.createElement(LoadingIndicator, null))), status === statusResponse.SUCCESS && eligiblePlans.length === 0 && ( /*#__PURE__*/React.createElement("div", {
|
|
2967
|
-
className: s$
|
|
3031
|
+
className: s$b.noEligibility
|
|
2968
3032
|
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2969
3033
|
id: "eligibility-modal.no-eligibility",
|
|
2970
3034
|
defaultMessage: "Oups, il semblerait que la simulation n'ait pas fonctionn\xE9."
|
|
@@ -2973,9 +3037,9 @@ var EligibilityModal = function EligibilityModal(_ref) {
|
|
|
2973
3037
|
currentPlanIndex: currentPlanIndex,
|
|
2974
3038
|
setCurrentPlanIndex: setCurrentPlanIndex
|
|
2975
3039
|
}), /*#__PURE__*/React.createElement("div", {
|
|
2976
|
-
className: s$
|
|
3040
|
+
className: s$b.scheduleArea
|
|
2977
3041
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2978
|
-
className: s$
|
|
3042
|
+
className: s$b.verticalLine
|
|
2979
3043
|
}), /*#__PURE__*/React.createElement(Schedule, {
|
|
2980
3044
|
currentPlan: currentPlan
|
|
2981
3045
|
}), /*#__PURE__*/React.createElement(TotalBlock, {
|
|
@@ -3006,17 +3070,17 @@ var ModalContainer = function ModalContainer(_ref) {
|
|
|
3006
3070
|
});
|
|
3007
3071
|
};
|
|
3008
3072
|
|
|
3009
|
-
var s$
|
|
3073
|
+
var s$d = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
|
|
3010
3074
|
|
|
3011
3075
|
var Loader = function Loader(_ref) {
|
|
3012
3076
|
var className = _ref.className;
|
|
3013
3077
|
return /*#__PURE__*/React.createElement("div", {
|
|
3014
|
-
className: cx(s$
|
|
3078
|
+
className: cx(s$d.loadingIndicator, className),
|
|
3015
3079
|
"data-testid": "loader"
|
|
3016
3080
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3017
|
-
className: s$
|
|
3081
|
+
className: s$d.line1
|
|
3018
3082
|
}), /*#__PURE__*/React.createElement("div", {
|
|
3019
|
-
className: s$
|
|
3083
|
+
className: s$d.line2
|
|
3020
3084
|
}));
|
|
3021
3085
|
};
|
|
3022
3086
|
|
|
@@ -3108,7 +3172,7 @@ var STATIC_CUSTOMISATION_CLASSES$1 = {
|
|
|
3108
3172
|
activeOption: prefix$1 + '-active-option'
|
|
3109
3173
|
};
|
|
3110
3174
|
|
|
3111
|
-
var s$
|
|
3175
|
+
var s$e = {"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"};
|
|
3112
3176
|
|
|
3113
3177
|
var VERY_LONG_TIME_IN_MS = 1000 * 3600;
|
|
3114
3178
|
var DEFAULT_TRANSITION_TIME = 5500;
|
|
@@ -3192,7 +3256,7 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|
|
|
3192
3256
|
};
|
|
3193
3257
|
if (status === statusResponse.PENDING) {
|
|
3194
3258
|
return /*#__PURE__*/React.createElement("div", {
|
|
3195
|
-
className: cx(s$
|
|
3259
|
+
className: cx(s$e.widgetButton, s$e.pending)
|
|
3196
3260
|
}, /*#__PURE__*/React.createElement(Loader, null));
|
|
3197
3261
|
}
|
|
3198
3262
|
if (hideIfNotEligible && eligiblePlans.length === 0 || eligibilityPlans.length === 0 || status === statusResponse.FAILED) {
|
|
@@ -3206,15 +3270,15 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|
|
|
3206
3270
|
};
|
|
3207
3271
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
3208
3272
|
onClick: handleOpenModal,
|
|
3209
|
-
className: cx(s$
|
|
3273
|
+
className: cx(s$e.widgetButton, (_cx = {}, _cx[s$e.clickable] = eligiblePlans.length > 0, _cx[s$e.unClickable] = eligiblePlans.length === 0, _cx[s$e.hideBorder] = hideBorder, _cx), STATIC_CUSTOMISATION_CLASSES$1.container),
|
|
3210
3274
|
"data-testid": "widget-button"
|
|
3211
3275
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3212
|
-
className: cx(s$
|
|
3276
|
+
className: cx(s$e.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
|
|
3213
3277
|
}, /*#__PURE__*/React.createElement(AlmaLogo, {
|
|
3214
|
-
className: s$
|
|
3278
|
+
className: s$e.logo,
|
|
3215
3279
|
color: monochrome ? 'var(--off-black)' : undefined
|
|
3216
3280
|
}), /*#__PURE__*/React.createElement("div", {
|
|
3217
|
-
className: cx(s$
|
|
3281
|
+
className: cx(s$e.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
|
|
3218
3282
|
}, eligibilityPlans.map(function (eligibilityPlan, key) {
|
|
3219
3283
|
var _cx2;
|
|
3220
3284
|
var isCurrent = key === current;
|
|
@@ -3228,10 +3292,10 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|
|
|
3228
3292
|
},
|
|
3229
3293
|
onMouseOut: onLeave,
|
|
3230
3294
|
onTouchEnd: onLeave,
|
|
3231
|
-
className: cx(s$
|
|
3295
|
+
className: cx(s$e.plan, (_cx2 = {}, _cx2[cx(s$e.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)] = isCurrent, _cx2[s$e.monochrome] = monochrome && isCurrent, _cx2[cx(s$e.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = !eligibilityPlan.eligible, _cx2))
|
|
3232
3296
|
}, paymentPlanShorthandName(eligibilityPlan));
|
|
3233
3297
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
3234
|
-
className: cx(s$
|
|
3298
|
+
className: cx(s$e.info, (_cx3 = {}, _cx3[cx(s$e.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = eligibilityPlans[current] && !eligibilityPlans[current].eligible, _cx3), STATIC_CUSTOMISATION_CLASSES$1.paymentInfo)
|
|
3235
3299
|
}, eligibilityPlans.length !== 0 && paymentPlanInfoText(eligibilityPlans[current]))), isOpen && ( /*#__PURE__*/React.createElement(EligibilityModal, {
|
|
3236
3300
|
initialPlanIndex: getIndexWithinEligiblePlans(current),
|
|
3237
3301
|
onClose: closeModal,
|