@alma/widgets 3.2.1 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/raw/widgets.js +183 -85
- package/dist/raw/widgets.js.map +1 -1
- package/dist/raw/widgets.m.js +183 -85
- package/dist/raw/widgets.m.js.map +1 -1
- package/dist/raw/widgets.modern.js +133 -43
- package/dist/raw/widgets.modern.js.map +1 -1
- package/dist/raw/widgets.umd.js +183 -85
- package/dist/raw/widgets.umd.js.map +1 -1
- package/dist/types/Widgets/EligibilityModal/DesktopModal/index.d.ts +4 -2
- package/dist/types/Widgets/EligibilityModal/MobileModal/index.d.ts +4 -2
- package/dist/types/Widgets/EligibilityModal/components/Info/index.d.ts +3 -1
- package/dist/types/utils/filterEligibility.d.ts +2 -2
- package/dist/types/utils/index.d.ts +2 -0
- 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
|
@@ -1551,6 +1551,9 @@ function formatCents(cents) {
|
|
|
1551
1551
|
return String(priceFromCents(cents)).replace('.', ',');
|
|
1552
1552
|
}
|
|
1553
1553
|
var desktopWidth = 800;
|
|
1554
|
+
var isP1X = function isP1X(plan) {
|
|
1555
|
+
return (plan == null ? void 0 : plan.installments_count) === 1 && (plan == null ? void 0 : plan.deferred_days) === 0 && (plan == null ? void 0 : plan.deferred_months) === 0;
|
|
1556
|
+
};
|
|
1554
1557
|
|
|
1555
1558
|
/* eslint-disable */
|
|
1556
1559
|
|
|
@@ -1883,21 +1886,26 @@ var messagesDE = {
|
|
|
1883
1886
|
"credit-features.total-credit-cost": "Davon Kreditkosten",
|
|
1884
1887
|
"eligibility-modal.bullet-1": "Wählen Sie <strong>Alma</strong> beim Check-out. ",
|
|
1885
1888
|
"eligibility-modal.bullet-2": "Lassen Sie sich führen und bestätigen Sie Ihre Zahlung in <strong>2 Minuten.</strong>",
|
|
1886
|
-
"eligibility-modal.bullet-3": "
|
|
1889
|
+
"eligibility-modal.bullet-3": "</strong>Verlieren Sie nicht die Kontrolle,</strong> indem Sie Ihre Fälligkeitstermine nach Ihrem eigenen Tempo vor- oder zurückverlegen.",
|
|
1887
1890
|
"eligibility-modal.no-eligibility": "Ups, die Prüfung hat anscheinend nicht funktioniert.",
|
|
1891
|
+
"eligibility-modal.p1x-bullet-1": "Wählen Sie <strong>Alma - 1X</strong> beim Check-out.",
|
|
1892
|
+
"eligibility-modal.p1x-bullet-2": "Tragen Sie Ihre <strong>Kreditkarteninformationen ein.</strong>",
|
|
1893
|
+
"eligibility-modal.p1x-bullet-3": "<strong> Ihre Zahlung wird sofort bestätigt! </strong>",
|
|
1888
1894
|
"eligibility-modal.title-deferred-plan": "Zahlen Sie mit Alma in Raten oder später.",
|
|
1889
1895
|
"eligibility-modal.title-normal": "Zahlen Sie mit Alma in mehreren Raten.",
|
|
1890
1896
|
"installments.today": "Heute",
|
|
1891
1897
|
"installments.total-amount": "Gesamtsumme",
|
|
1892
1898
|
"installments.total-fees": "Davon Kosten",
|
|
1893
|
-
"payment-plan-strings.day-abbreviation": "T{
|
|
1899
|
+
"payment-plan-strings.day-abbreviation": "T{deferredDays}",
|
|
1894
1900
|
"payment-plan-strings.default-message": "Bezahlen Sie zinsfrei in mehreren Raten mit Alma.",
|
|
1895
1901
|
"payment-plan-strings.deferred": "{totalAmount} zu zahlen am {dueDate}",
|
|
1896
1902
|
"payment-plan-strings.ineligible-greater-than-max": "Bis zu {maxAmount}",
|
|
1897
1903
|
"payment-plan-strings.ineligible-lower-than-min": "Ab {minAmount}",
|
|
1904
|
+
"payment-plan-strings.month-abbreviation": "M{deferredMonths}",
|
|
1898
1905
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
1899
1906
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
1900
|
-
"payment-plan-strings.no-fee": "(0% Finanzierung)"
|
|
1907
|
+
"payment-plan-strings.no-fee": "(0% Finanzierung)",
|
|
1908
|
+
"payment-plan-strings.pay-now": "Zahlen Sie jetzt {totalAmount}"
|
|
1901
1909
|
};
|
|
1902
1910
|
|
|
1903
1911
|
var messagesEN = {
|
|
@@ -1908,19 +1916,24 @@ var messagesEN = {
|
|
|
1908
1916
|
"eligibility-modal.bullet-2": "Let us guide you and validate your payment in <strong>2 minutes.</strong>",
|
|
1909
1917
|
"eligibility-modal.bullet-3": "<strong>Stay in control</strong> by moving your deadlines forward or backward at your own pace.",
|
|
1910
1918
|
"eligibility-modal.no-eligibility": "Oops, looks like the simulation didn't work.",
|
|
1919
|
+
"eligibility-modal.p1x-bullet-1": "Choose <strong>Alma - 1X</strong> at checkout.",
|
|
1920
|
+
"eligibility-modal.p1x-bullet-2": "Fill in your <strong>credit card information.</strong>",
|
|
1921
|
+
"eligibility-modal.p1x-bullet-3": "<strong>The validation </strong> of your payment is instantaneous!",
|
|
1911
1922
|
"eligibility-modal.title-deferred-plan": "Pay in installments or later by credit card with Alma.",
|
|
1912
1923
|
"eligibility-modal.title-normal": "Pay in installments by credit card with Alma.",
|
|
1913
1924
|
"installments.today": "Today",
|
|
1914
1925
|
"installments.total-amount": "Total",
|
|
1915
1926
|
"installments.total-fees": "Of which costs (incl. VAT)",
|
|
1916
|
-
"payment-plan-strings.day-abbreviation": "D{
|
|
1927
|
+
"payment-plan-strings.day-abbreviation": "D{deferredDays}",
|
|
1917
1928
|
"payment-plan-strings.default-message": "Pay in installments with Alma",
|
|
1918
|
-
"payment-plan-strings.deferred": "{totalAmount} to
|
|
1929
|
+
"payment-plan-strings.deferred": "{totalAmount} to pay the {dueDate}",
|
|
1919
1930
|
"payment-plan-strings.ineligible-greater-than-max": "Until {maxAmount}",
|
|
1920
1931
|
"payment-plan-strings.ineligible-lower-than-min": "From {minAmount}",
|
|
1932
|
+
"payment-plan-strings.month-abbreviation": "M{deferredMonths}",
|
|
1921
1933
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
1922
1934
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
1923
|
-
"payment-plan-strings.no-fee": "(free of charge)"
|
|
1935
|
+
"payment-plan-strings.no-fee": "(free of charge)",
|
|
1936
|
+
"payment-plan-strings.pay-now": "Pay now {totalAmount}"
|
|
1924
1937
|
};
|
|
1925
1938
|
|
|
1926
1939
|
var messagesES = {
|
|
@@ -1931,19 +1944,24 @@ var messagesES = {
|
|
|
1931
1944
|
"eligibility-modal.bullet-2": "Déjese guiar y valide su pago en <strong>2 minutos.</strong>",
|
|
1932
1945
|
"eligibility-modal.bullet-3": "<strong>Mantenga el control</strong> adelantando o retrasando los plazos a su propio ritmo.",
|
|
1933
1946
|
"eligibility-modal.no-eligibility": "Uy, parece que la simulación no ha funcionado.",
|
|
1947
|
+
"eligibility-modal.p1x-bullet-1": "Elija <strong>Alma - 1X</strong> en la caja.",
|
|
1948
|
+
"eligibility-modal.p1x-bullet-2": "Introduzca los datos de su tarjeta de crédito en <strong>.</strong>",
|
|
1949
|
+
"eligibility-modal.p1x-bullet-3": "<strong>¡La validación </strong> de su pago es instantánea!",
|
|
1934
1950
|
"eligibility-modal.title-deferred-plan": "Paga a plazos o posteriormente con tarjeta bancaria con Alma.",
|
|
1935
1951
|
"eligibility-modal.title-normal": "Pagar a plazos con tarjeta bancaria con Alma.",
|
|
1936
1952
|
"installments.today": "Hoy",
|
|
1937
1953
|
"installments.total-amount": "Total",
|
|
1938
1954
|
"installments.total-fees": "De los cuales, costes (IVA incluido)",
|
|
1939
|
-
"payment-plan-strings.day-abbreviation": "D{
|
|
1955
|
+
"payment-plan-strings.day-abbreviation": "D{deferredDays}",
|
|
1940
1956
|
"payment-plan-strings.default-message": "Pagar a plazos con Alma",
|
|
1941
1957
|
"payment-plan-strings.deferred": "{totalAmount} a pagar el {dueDate}",
|
|
1942
1958
|
"payment-plan-strings.ineligible-greater-than-max": "Hasta {maxAmount}",
|
|
1943
1959
|
"payment-plan-strings.ineligible-lower-than-min": "Desde {minAmount}",
|
|
1960
|
+
"payment-plan-strings.month-abbreviation": "M{deferredMonths}",
|
|
1944
1961
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} mensualidad de {othersInstallmentAmount}} other {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} mensualidades de {othersInstallmentAmount}}}",
|
|
1945
1962
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} plazos de {totalAmount}",
|
|
1946
|
-
"payment-plan-strings.no-fee": "(sin intereses)"
|
|
1963
|
+
"payment-plan-strings.no-fee": "(sin intereses)",
|
|
1964
|
+
"payment-plan-strings.pay-now": "Pague ahora {totalAmount}"
|
|
1947
1965
|
};
|
|
1948
1966
|
|
|
1949
1967
|
var messagesFR = {
|
|
@@ -1954,42 +1972,52 @@ var messagesFR = {
|
|
|
1954
1972
|
"eligibility-modal.bullet-2": "Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",
|
|
1955
1973
|
"eligibility-modal.bullet-3": "<strong>Gardez le contrôle</strong> en avançant ou reculant vos échéances à votre rythme.",
|
|
1956
1974
|
"eligibility-modal.no-eligibility": "Oups, il semblerait que la simulation n'ait pas fonctionné.",
|
|
1975
|
+
"eligibility-modal.p1x-bullet-1": "Choisissez <strong>Alma - 1X</strong> au moment du paiement.",
|
|
1976
|
+
"eligibility-modal.p1x-bullet-2": "Renseignez les informations de votre <strong>carte bancaire.</strong>",
|
|
1977
|
+
"eligibility-modal.p1x-bullet-3": "<strong>La validation </strong> de votre paiement est instantanée !",
|
|
1957
1978
|
"eligibility-modal.title-deferred-plan": "Payez en plusieurs fois ou plus tard par carte bancaire avec Alma.",
|
|
1958
1979
|
"eligibility-modal.title-normal": "Payez en plusieurs fois par carte bancaire avec Alma.",
|
|
1959
1980
|
"installments.today": "Aujourd'hui",
|
|
1960
1981
|
"installments.total-amount": "Total",
|
|
1961
1982
|
"installments.total-fees": "Dont frais (TTC)",
|
|
1962
|
-
"payment-plan-strings.day-abbreviation": "J{
|
|
1983
|
+
"payment-plan-strings.day-abbreviation": "J{deferredDays}",
|
|
1963
1984
|
"payment-plan-strings.default-message": "Payez en plusieurs fois avec Alma",
|
|
1964
1985
|
"payment-plan-strings.deferred": "{totalAmount} à payer le {dueDate}",
|
|
1965
1986
|
"payment-plan-strings.ineligible-greater-than-max": "Jusqu'à {maxAmount}",
|
|
1966
1987
|
"payment-plan-strings.ineligible-lower-than-min": "À partir de {minAmount}",
|
|
1988
|
+
"payment-plan-strings.month-abbreviation": "M{deferredMonths}",
|
|
1967
1989
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
1968
1990
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
1969
|
-
"payment-plan-strings.no-fee": "(sans frais)"
|
|
1991
|
+
"payment-plan-strings.no-fee": "(sans frais)",
|
|
1992
|
+
"payment-plan-strings.pay-now": "Payez maintenant {totalAmount}"
|
|
1970
1993
|
};
|
|
1971
1994
|
|
|
1972
1995
|
var messagesIT = {
|
|
1973
1996
|
"credit-features.credit-cost-display": "{creditCost} (TAEG {taegPercentage})",
|
|
1974
1997
|
"credit-features.information": "Un pagamento rateale ti impegna e deve essere ripagato. Verifica la tua disponibilità finanziaria prima di impegnarti.",
|
|
1975
1998
|
"credit-features.total-credit-cost": "Di cui commissioni",
|
|
1976
|
-
"eligibility-modal.bullet-1": "
|
|
1977
|
-
"eligibility-modal.bullet-2": "
|
|
1978
|
-
"eligibility-modal.bullet-3": "<strong>
|
|
1999
|
+
"eligibility-modal.bullet-1": "Seleziona <strong>Alma</strong> come metodo di pagamento.",
|
|
2000
|
+
"eligibility-modal.bullet-2": "Segui le istruzioni e completa l'acquisto <strong>in meno di 2 minuti.</strong>",
|
|
2001
|
+
"eligibility-modal.bullet-3": "<strong>Gestisci il tuo piano di pagamento</strong> e modifica le scadenze secondo le tue esigenze.",
|
|
1979
2002
|
"eligibility-modal.no-eligibility": "Ops, sembra che qualcosa non abbia funzionato.",
|
|
1980
|
-
"eligibility-modal.
|
|
2003
|
+
"eligibility-modal.p1x-bullet-1": "Scegli <strong>Alma - 1X</strong> alla cassa.",
|
|
2004
|
+
"eligibility-modal.p1x-bullet-2": "Inserisci i dati della tua <strong>carta bancaria.</strong>",
|
|
2005
|
+
"eligibility-modal.p1x-bullet-3": "Ricevi la conferma di pagamento <strong>istantaneamente!</strong>",
|
|
2006
|
+
"eligibility-modal.title-deferred-plan": "Paga a rate con Alma, senza registrazione.",
|
|
1981
2007
|
"eligibility-modal.title-normal": "Paga a rate con Alma, senza registrazione.",
|
|
1982
2008
|
"installments.today": "Oggi",
|
|
1983
2009
|
"installments.total-amount": "Totale",
|
|
1984
2010
|
"installments.total-fees": "Di cui commissioni",
|
|
1985
|
-
"payment-plan-strings.day-abbreviation": "G{
|
|
1986
|
-
"payment-plan-strings.default-message": "Paga a rate con Alma",
|
|
2011
|
+
"payment-plan-strings.day-abbreviation": "G{deferredDays}",
|
|
2012
|
+
"payment-plan-strings.default-message": "Paga a rate con Alma, senza registrazione.",
|
|
1987
2013
|
"payment-plan-strings.deferred": "{totalAmount} da pagare il {dueDate}",
|
|
1988
2014
|
"payment-plan-strings.ineligible-greater-than-max": "Disponibile fino a {maxAmount}",
|
|
1989
2015
|
"payment-plan-strings.ineligible-lower-than-min": "Pagamento rateale disponibile a partire da {minAmount}",
|
|
2016
|
+
"payment-plan-strings.month-abbreviation": "M{deferredMonths}",
|
|
1990
2017
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {Oggi paghi {firstInstallmentAmount} poi tra {numberOfRemainingInstallments} mese {othersInstallmentAmount}} other {Oggi paghi {firstInstallmentAmount} poi {numberOfRemainingInstallments} rate mensili di {othersInstallmentAmount}}}",
|
|
1991
2018
|
"payment-plan-strings.multiple-installments-same-amount": "In {installmentsCount} rate mensili di {totalAmount}",
|
|
1992
|
-
"payment-plan-strings.no-fee": "(senza interessi)"
|
|
2019
|
+
"payment-plan-strings.no-fee": "(senza interessi)",
|
|
2020
|
+
"payment-plan-strings.pay-now": "Paga ora {totalAmount}"
|
|
1993
2021
|
};
|
|
1994
2022
|
|
|
1995
2023
|
var messagesNL = {
|
|
@@ -2000,19 +2028,24 @@ var messagesNL = {
|
|
|
2000
2028
|
"eligibility-modal.bullet-2": "Laat ons u begeleiden en uw betaling valideren in <strong>2 minuten.</strong>",
|
|
2001
2029
|
"eligibility-modal.bullet-3": "<strong>Houd de controle op</strong> door uw deadlines in uw eigen tempo vooruit of achteruit te schuiven.",
|
|
2002
2030
|
"eligibility-modal.no-eligibility": "Oeps, het lijkt erop dat de simulatie niet werkte.",
|
|
2031
|
+
"eligibility-modal.p1x-bullet-1": "Kies <strong>Alma - 1X</strong> bij het afrekenen.",
|
|
2032
|
+
"eligibility-modal.p1x-bullet-2": "Vul uw <strong>creditcardgegevens in.</strong>",
|
|
2033
|
+
"eligibility-modal.p1x-bullet-3": "<strong>De validatie </strong> van uw betaling is onmiddellijk!",
|
|
2003
2034
|
"eligibility-modal.title-deferred-plan": "Betaal in termijnen of later per creditcard met Alma.",
|
|
2004
2035
|
"eligibility-modal.title-normal": "Betaal in termijnen met een creditcard bij Alma.",
|
|
2005
2036
|
"installments.today": "Tegenwoordig",
|
|
2006
2037
|
"installments.total-amount": "Totaal",
|
|
2007
2038
|
"installments.total-fees": "Waarvan kosten (incl. BTW)",
|
|
2008
|
-
"payment-plan-strings.day-abbreviation": "D{
|
|
2039
|
+
"payment-plan-strings.day-abbreviation": "D{deferredDays}",
|
|
2009
2040
|
"payment-plan-strings.default-message": "Betaal in termijnen met Alma",
|
|
2010
2041
|
"payment-plan-strings.deferred": "{totalAmount} te betalen op {dueDate}",
|
|
2011
2042
|
"payment-plan-strings.ineligible-greater-than-max": "Tot {maxAmount}",
|
|
2012
2043
|
"payment-plan-strings.ineligible-lower-than-min": "Van {minAmount}",
|
|
2044
|
+
"payment-plan-strings.month-abbreviation": "M{deferredMonths}",
|
|
2013
2045
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
2014
2046
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
2015
|
-
"payment-plan-strings.no-fee": "(zonder kosten)"
|
|
2047
|
+
"payment-plan-strings.no-fee": "(zonder kosten)",
|
|
2048
|
+
"payment-plan-strings.pay-now": "Betaal nu {totalAmount}"
|
|
2016
2049
|
};
|
|
2017
2050
|
|
|
2018
2051
|
var messagesPT = {
|
|
@@ -2023,19 +2056,24 @@ var messagesPT = {
|
|
|
2023
2056
|
"eligibility-modal.bullet-2": "Deixe-nos guiá-lo e validar o seu pagamento em <strong>2 minutos.</strong>",
|
|
2024
2057
|
"eligibility-modal.bullet-3": "<strong>Mantenha-se em controlo</strong> avançando ou recuando os seus prazos ao seu próprio ritmo.",
|
|
2025
2058
|
"eligibility-modal.no-eligibility": "Ups, parece que a simulação não funcionou.",
|
|
2059
|
+
"eligibility-modal.p1x-bullet-1": "Escolher <strong>Alma - 1X</strong> no checkout.",
|
|
2060
|
+
"eligibility-modal.p1x-bullet-2": "Preencha as informações do seu <strong>cartão de crédito.</strong>",
|
|
2061
|
+
"eligibility-modal.p1x-bullet-3": "<strong>A validação </strong> do seu pagamento é instantânea!",
|
|
2026
2062
|
"eligibility-modal.title-deferred-plan": "Pagar em prestações ou mais tarde por cartão de crédito com Alma.",
|
|
2027
2063
|
"eligibility-modal.title-normal": "Pagar em prestações por cartão de crédito com Alma.",
|
|
2028
2064
|
"installments.today": "Hoje",
|
|
2029
2065
|
"installments.total-amount": "Total",
|
|
2030
2066
|
"installments.total-fees": "Dos quais custos (incl. IVA)",
|
|
2031
|
-
"payment-plan-strings.day-abbreviation": "D{
|
|
2067
|
+
"payment-plan-strings.day-abbreviation": "D{deferredDays}",
|
|
2032
2068
|
"payment-plan-strings.default-message": "Pague em prestações através da Alma",
|
|
2033
2069
|
"payment-plan-strings.deferred": "{totalAmount} a pagar em {dueDate}",
|
|
2034
2070
|
"payment-plan-strings.ineligible-greater-than-max": "Até {maxAmount}",
|
|
2035
2071
|
"payment-plan-strings.ineligible-lower-than-min": "A partir de {minAmount}",
|
|
2072
|
+
"payment-plan-strings.month-abbreviation": "M{deferredMonths}",
|
|
2036
2073
|
"payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
2037
2074
|
"payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
|
|
2038
|
-
"payment-plan-strings.no-fee": "(sem encargos)"
|
|
2075
|
+
"payment-plan-strings.no-fee": "(sem encargos)",
|
|
2076
|
+
"payment-plan-strings.pay-now": "Pague agora {totalAmount}"
|
|
2039
2077
|
};
|
|
2040
2078
|
|
|
2041
2079
|
var getTranslationsByLocale = function getTranslationsByLocale(locale) {
|
|
@@ -2154,18 +2192,16 @@ var getPaymentPlanBoundaries = function getPaymentPlanBoundaries(plan, configPla
|
|
|
2154
2192
|
return configPlan != null ? configPlan : {};
|
|
2155
2193
|
};
|
|
2156
2194
|
|
|
2157
|
-
var
|
|
2158
|
-
// Remove
|
|
2159
|
-
var filteredEligibilityPlans = eligibilities.filter(function (plan) {
|
|
2160
|
-
return !(plan.installments_count === 1 && plan.deferred_days === 0 && plan.deferred_months === 0);
|
|
2161
|
-
}); // If no configPlans was provided, return eligibility response
|
|
2162
|
-
|
|
2195
|
+
var filterEligibility = function filterEligibility(eligibilities, configPlans) {
|
|
2196
|
+
// Remove P1X if no configuration is provided
|
|
2163
2197
|
if (!configPlans) {
|
|
2164
|
-
return
|
|
2198
|
+
return eligibilities.filter(function (plan) {
|
|
2199
|
+
return !(plan.installments_count === 1 && plan.deferred_days === 0 && plan.deferred_months === 0);
|
|
2200
|
+
});
|
|
2165
2201
|
} // Else check if the plan is eligible regarding the related configPlan
|
|
2166
2202
|
|
|
2167
2203
|
|
|
2168
|
-
return
|
|
2204
|
+
return eligibilities.map(function (plan) {
|
|
2169
2205
|
var eligibilityDeferredDays = (plan.deferred_months ? plan.deferred_months : 0) * 30 + (plan.deferred_days ? plan.deferred_days : 0); // find the related configPlan
|
|
2170
2206
|
|
|
2171
2207
|
var relatedConfigPlan = configPlans.find(function (configPlan) {
|
|
@@ -2230,7 +2266,7 @@ var useFetchEligibility = function useFetchEligibility(purchaseAmount, _ref, pla
|
|
|
2230
2266
|
});
|
|
2231
2267
|
}
|
|
2232
2268
|
}, [status]);
|
|
2233
|
-
return [
|
|
2269
|
+
return [filterEligibility(eligibility, plans), status];
|
|
2234
2270
|
};
|
|
2235
2271
|
|
|
2236
2272
|
var s = {"container":"_GTTk7","total":"_34s2g","fees":"_W7qIA","creditCost":"_24KmE"};
|
|
@@ -2397,14 +2433,23 @@ var paymentPlanShorthandName = function paymentPlanShorthandName(payment) {
|
|
|
2397
2433
|
var deferred_days = payment.deferred_days,
|
|
2398
2434
|
deferred_months = payment.deferred_months,
|
|
2399
2435
|
installmentsCount = payment.installments_count;
|
|
2400
|
-
var deferredDaysCount = deferred_days + deferred_months * 30;
|
|
2401
2436
|
|
|
2402
|
-
if (installmentsCount === 1) {
|
|
2437
|
+
if (installmentsCount === 1 && deferred_days) {
|
|
2403
2438
|
return /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2404
2439
|
id: "payment-plan-strings.day-abbreviation",
|
|
2405
|
-
defaultMessage: "J{
|
|
2440
|
+
defaultMessage: "J{deferredDays}",
|
|
2441
|
+
values: {
|
|
2442
|
+
deferredDays: "+" + deferred_days
|
|
2443
|
+
}
|
|
2444
|
+
});
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2447
|
+
if (installmentsCount === 1 && deferred_months) {
|
|
2448
|
+
return /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2449
|
+
id: "payment-plan-strings.month-abbreviation",
|
|
2450
|
+
defaultMessage: "M{deferredMonths}",
|
|
2406
2451
|
values: {
|
|
2407
|
-
|
|
2452
|
+
deferredMonths: "+" + deferred_months
|
|
2408
2453
|
}
|
|
2409
2454
|
});
|
|
2410
2455
|
} else {
|
|
@@ -2488,6 +2533,21 @@ var paymentPlanInfoText = function paymentPlanInfoText(payment) {
|
|
|
2488
2533
|
return index === 0 || installment.total_amount === payment_plan[0].total_amount;
|
|
2489
2534
|
});
|
|
2490
2535
|
|
|
2536
|
+
if (isP1X(payment)) {
|
|
2537
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2538
|
+
id: "payment-plan-strings.pay-now",
|
|
2539
|
+
defaultMessage: "Payez maintenant {totalAmount}",
|
|
2540
|
+
values: {
|
|
2541
|
+
totalAmount: /*#__PURE__*/React.createElement(FormattedNumber, {
|
|
2542
|
+
value: priceFromCents(payment_plan[0].total_amount),
|
|
2543
|
+
style: "currency",
|
|
2544
|
+
currency: "EUR"
|
|
2545
|
+
}),
|
|
2546
|
+
installmentsCount: installmentsCount
|
|
2547
|
+
}
|
|
2548
|
+
}), withNoFee(payment));
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2491
2551
|
if (areInstallmentsOfSameAmount) {
|
|
2492
2552
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2493
2553
|
id: "payment-plan-strings.multiple-installments-same-amount",
|
|
@@ -2794,53 +2854,82 @@ var Cards = function Cards(_ref) {
|
|
|
2794
2854
|
|
|
2795
2855
|
var s$7 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
|
|
2796
2856
|
|
|
2797
|
-
var Info = function Info() {
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2857
|
+
var Info = function Info(_ref) {
|
|
2858
|
+
var isCurrentPlanP1X = _ref.isCurrentPlanP1X;
|
|
2859
|
+
return (
|
|
2860
|
+
/*#__PURE__*/
|
|
2861
|
+
// TODO: refactor this component into subcomponent to factorise code and be cleaner
|
|
2862
|
+
React.createElement("div", {
|
|
2863
|
+
className: cx(s$7.list, STATIC_CUSTOMISATION_CLASSES.info),
|
|
2864
|
+
"data-testid": "modal-info-element"
|
|
2865
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2866
|
+
className: s$7.listItem
|
|
2867
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2868
|
+
className: cx(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
2869
|
+
}, "1"), /*#__PURE__*/React.createElement("div", {
|
|
2870
|
+
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2871
|
+
}, isCurrentPlanP1X ? /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2872
|
+
id: "eligibility-modal.p1x-bullet-1",
|
|
2873
|
+
defaultMessage: "Choisissez <strong>Alma - 1X</strong> au moment du paiement.",
|
|
2874
|
+
values: {
|
|
2875
|
+
strong: function strong() {
|
|
2876
|
+
return /*#__PURE__*/React.createElement("strong", null, [].slice.call(arguments));
|
|
2877
|
+
}
|
|
2813
2878
|
}
|
|
2814
|
-
}
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2822
|
-
id: "eligibility-modal.bullet-2",
|
|
2823
|
-
defaultMessage: "Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",
|
|
2824
|
-
values: {
|
|
2825
|
-
strong: function strong() {
|
|
2826
|
-
return /*#__PURE__*/React.createElement("strong", null, [].slice.call(arguments));
|
|
2879
|
+
}) : /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2880
|
+
id: "eligibility-modal.bullet-1",
|
|
2881
|
+
defaultMessage: "Choisissez <strong>Alma</strong> au moment du paiement.",
|
|
2882
|
+
values: {
|
|
2883
|
+
strong: function strong() {
|
|
2884
|
+
return /*#__PURE__*/React.createElement("strong", null, [].slice.call(arguments));
|
|
2885
|
+
}
|
|
2827
2886
|
}
|
|
2828
|
-
}
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2887
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
2888
|
+
className: s$7.listItem
|
|
2889
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2890
|
+
className: cx(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
2891
|
+
}, "2"), /*#__PURE__*/React.createElement("div", {
|
|
2892
|
+
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2893
|
+
}, isCurrentPlanP1X ? /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2894
|
+
id: "eligibility-modal.p1x-bullet-2",
|
|
2895
|
+
defaultMessage: "Renseignez les informations de votre <strong>carte bancaire.</strong>",
|
|
2896
|
+
values: {
|
|
2897
|
+
strong: function strong() {
|
|
2898
|
+
return /*#__PURE__*/React.createElement("strong", null, [].slice.call(arguments));
|
|
2899
|
+
}
|
|
2841
2900
|
}
|
|
2842
|
-
}
|
|
2843
|
-
|
|
2901
|
+
}) : /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2902
|
+
id: "eligibility-modal.bullet-2",
|
|
2903
|
+
defaultMessage: "Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",
|
|
2904
|
+
values: {
|
|
2905
|
+
strong: function strong() {
|
|
2906
|
+
return /*#__PURE__*/React.createElement("strong", null, [].slice.call(arguments));
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
2910
|
+
className: s$7.listItem
|
|
2911
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2912
|
+
className: cx(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
|
|
2913
|
+
}, "3"), /*#__PURE__*/React.createElement("div", {
|
|
2914
|
+
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2915
|
+
}, isCurrentPlanP1X ? /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2916
|
+
id: "eligibility-modal.p1x-bullet-3",
|
|
2917
|
+
defaultMessage: "<strong>La validation </strong> de votre paiement est instantan\xE9e !",
|
|
2918
|
+
values: {
|
|
2919
|
+
strong: function strong() {
|
|
2920
|
+
return /*#__PURE__*/React.createElement("strong", null, [].slice.call(arguments));
|
|
2921
|
+
}
|
|
2922
|
+
}
|
|
2923
|
+
}) : /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2924
|
+
id: "eligibility-modal.bullet-3",
|
|
2925
|
+
defaultMessage: "<strong>Gardez le contr\xF4le</strong> en avan\xE7ant ou reculant vos \xE9ch\xE9ances \xE0 votre rythme.",
|
|
2926
|
+
values: {
|
|
2927
|
+
strong: function strong() {
|
|
2928
|
+
return /*#__PURE__*/React.createElement("strong", null, [].slice.call(arguments));
|
|
2929
|
+
}
|
|
2930
|
+
}
|
|
2931
|
+
}))))
|
|
2932
|
+
);
|
|
2844
2933
|
};
|
|
2845
2934
|
|
|
2846
2935
|
var s$8 = {"title":"_3ERx-"};
|
|
@@ -2864,7 +2953,8 @@ var s$9 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC","logo":"_xW3wt"
|
|
|
2864
2953
|
var DesktopModal = function DesktopModal(_ref) {
|
|
2865
2954
|
var children = _ref.children,
|
|
2866
2955
|
isSomePlanDeferred = _ref.isSomePlanDeferred,
|
|
2867
|
-
cards = _ref.cards
|
|
2956
|
+
cards = _ref.cards,
|
|
2957
|
+
isCurrentPlanP1X = _ref.isCurrentPlanP1X;
|
|
2868
2958
|
return /*#__PURE__*/React.createElement("div", {
|
|
2869
2959
|
className: cx(s$9.container, STATIC_CUSTOMISATION_CLASSES.desktopModal),
|
|
2870
2960
|
"data-testid": "modal-container"
|
|
@@ -2872,7 +2962,9 @@ var DesktopModal = function DesktopModal(_ref) {
|
|
|
2872
2962
|
className: cx([s$9.block, s$9.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
|
|
2873
2963
|
}, /*#__PURE__*/React.createElement(Title, {
|
|
2874
2964
|
isSomePlanDeferred: isSomePlanDeferred
|
|
2875
|
-
}), /*#__PURE__*/React.createElement(Info,
|
|
2965
|
+
}), /*#__PURE__*/React.createElement(Info, {
|
|
2966
|
+
isCurrentPlanP1X: isCurrentPlanP1X
|
|
2967
|
+
}), cards && /*#__PURE__*/React.createElement(Cards, {
|
|
2876
2968
|
cards: cards
|
|
2877
2969
|
}), /*#__PURE__*/React.createElement(AlmaLogo, {
|
|
2878
2970
|
className: s$9.logo,
|
|
@@ -2889,13 +2981,16 @@ var s$b = {"container":"_2G7Ch","logo":"_2779r"};
|
|
|
2889
2981
|
var MobileModal = function MobileModal(_ref) {
|
|
2890
2982
|
var children = _ref.children,
|
|
2891
2983
|
isSomePlanDeferred = _ref.isSomePlanDeferred,
|
|
2892
|
-
cards = _ref.cards
|
|
2984
|
+
cards = _ref.cards,
|
|
2985
|
+
isCurrentPlanP1X = _ref.isCurrentPlanP1X;
|
|
2893
2986
|
return /*#__PURE__*/React.createElement("div", {
|
|
2894
2987
|
className: cx(s$b.container, STATIC_CUSTOMISATION_CLASSES.mobileModal),
|
|
2895
2988
|
"data-testid": "modal-container"
|
|
2896
2989
|
}, /*#__PURE__*/React.createElement(Title, {
|
|
2897
2990
|
isSomePlanDeferred: isSomePlanDeferred
|
|
2898
|
-
}), children, /*#__PURE__*/React.createElement(Info,
|
|
2991
|
+
}), children, /*#__PURE__*/React.createElement(Info, {
|
|
2992
|
+
isCurrentPlanP1X: isCurrentPlanP1X
|
|
2993
|
+
}), cards && /*#__PURE__*/React.createElement(Cards, {
|
|
2899
2994
|
cards: cards
|
|
2900
2995
|
}), /*#__PURE__*/React.createElement(AlmaLogo, {
|
|
2901
2996
|
className: s$b.logo,
|
|
@@ -2932,7 +3027,8 @@ var EligibilityModal = function EligibilityModal(_ref) {
|
|
|
2932
3027
|
isOpen: true
|
|
2933
3028
|
}, /*#__PURE__*/React.createElement(ModalComponent, {
|
|
2934
3029
|
isSomePlanDeferred: isSomePlanDeferred,
|
|
2935
|
-
cards: cards
|
|
3030
|
+
cards: cards,
|
|
3031
|
+
isCurrentPlanP1X: isP1X(currentPlan)
|
|
2936
3032
|
}, status === apiStatus.PENDING && /*#__PURE__*/React.createElement("div", {
|
|
2937
3033
|
className: s$a.loader
|
|
2938
3034
|
}, /*#__PURE__*/React.createElement(LoadingIndicator, null)), status === apiStatus.SUCCESS && eligiblePlans.length === 0 && /*#__PURE__*/React.createElement("div", {
|
|
@@ -3049,7 +3145,9 @@ var getIndexOfActivePlan = function getIndexOfActivePlan(_ref) {
|
|
|
3049
3145
|
var _loop = function _loop(index) {
|
|
3050
3146
|
var installmentsCount = suggestedPaymentPlanArray[index];
|
|
3051
3147
|
var planFound = eligibilityPlans.findIndex(function (plan) {
|
|
3052
|
-
return plan.installments_count === installmentsCount && plan.eligible
|
|
3148
|
+
return plan.installments_count === installmentsCount && plan.eligible && // Remove the PayLater plans from the plan to target, we will code a better solution later
|
|
3149
|
+
// To differentiate P1X from PayLater while using the `suggestedPaymentPlan` property.
|
|
3150
|
+
!plan.deferred_days && !plan.deferred_months;
|
|
3053
3151
|
});
|
|
3054
3152
|
|
|
3055
3153
|
if (planFound !== -1) {
|
|
@@ -3088,7 +3186,7 @@ var STATIC_CUSTOMISATION_CLASSES$1 = {
|
|
|
3088
3186
|
|
|
3089
3187
|
var s$d = {"widgetButton":"_TSkFv","logo":"_LJ4nZ","primaryContainer":"_bMClc","paymentPlans":"_17c_S","plan":"_2Kqjn","active":"_3dG_J","monochrome":"_2hx83","notEligible":"_3O1bg","hideBorder":"_3_qcn","info":"_25GrF","loader":"_30j1O","pending":"_1ZDMS","clickable":"_UksZa","unClickable":"_1lr-q"};
|
|
3090
3188
|
|
|
3091
|
-
var VERY_LONG_TIME_IN_MS = 1000 * 3600
|
|
3189
|
+
var VERY_LONG_TIME_IN_MS = 1000 * 3600;
|
|
3092
3190
|
var DEFAULT_TRANSITION_TIME = 5500;
|
|
3093
3191
|
|
|
3094
3192
|
var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|