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