@alma/widgets 4.1.2 → 4.3.5

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.
@@ -6,6 +6,7 @@ type Props = {
6
6
  configPlans?: ConfigPlan[];
7
7
  customerBillingCountry?: string;
8
8
  customerShippingCountry?: string;
9
+ merchantCoversAllFees?: boolean;
9
10
  onClose: (event: React.MouseEvent | React.KeyboardEvent) => void;
10
11
  cards?: Card[];
11
12
  };
@@ -7,6 +7,7 @@ type Props = {
7
7
  transitionDelay?: number;
8
8
  customerBillingCountry?: string;
9
9
  customerShippingCountry?: string;
10
+ merchantCoversAllFees?: boolean;
10
11
  hideIfNotEligible?: boolean;
11
12
  monochrome?: boolean;
12
13
  suggestedPaymentPlan?: number | number[];
@@ -1,3 +1,3 @@
1
1
  import { ApiConfig, ConfigPlan, EligibilityPlan, statusResponse } from '../types';
2
- declare const useFetchEligibility: (purchaseAmount: number, { domain, merchantId }: ApiConfig, plans?: ConfigPlan[], customerBillingCountry?: string, customerShippingCountry?: string) => [EligibilityPlan[], statusResponse];
2
+ declare const useFetchEligibility: (purchaseAmount: number, { domain, merchantId }: ApiConfig, plans?: ConfigPlan[], customerBillingCountry?: string, customerShippingCountry?: string, merchantCoversAllFees?: boolean) => [EligibilityPlan[], statusResponse];
3
3
  export default useFetchEligibility;
@@ -4,6 +4,7 @@ type CreateKeyType = {
4
4
  plans?: ConfigPlan[];
5
5
  customerBillingCountry?: string;
6
6
  customerShippingCountry?: string;
7
+ merchantCoversAllFees?: boolean;
7
8
  domain?: string;
8
9
  merchantId?: string;
9
10
  };
@@ -12,7 +12,7 @@ declare const _default: {
12
12
  "accessibility.payment-plans.section-title": "Verfügbare Zahlungsoptionen",
13
13
  "accessibility.payment-schedule-title": "Ratenplan für die Zahlung",
14
14
  "accessibility.payment-widget.main.aria-label": "Auswahl der Zahlungsoptionen Alma",
15
- "accessibility.payment-widget.open-button.aria-label": "Ouvrir les options de paiement Alma pour en savoir plus",
15
+ "accessibility.payment-widget.open-button.aria-label": "Öffne Almas Zahlungsoptionen, um mehr zu erfahren",
16
16
  "accessibility.plan-selection-changed": "Ausgewählter Plan: {planDescription}",
17
17
  "accessibility.skip-links.navigation.aria-label": "Schnelle Navigation",
18
18
  "accessibility.visa-card.aria-label": "Visa-Karte wird akzeptiert",
@@ -12,7 +12,7 @@ declare const _default: {
12
12
  "accessibility.payment-plans.section-title": "Available payment options",
13
13
  "accessibility.payment-schedule-title": "Payment schedule",
14
14
  "accessibility.payment-widget.main.aria-label": "Selecting Alma payment options",
15
- "accessibility.payment-widget.open-button.aria-label": "Ouvrir les options de paiement Alma pour en savoir plus",
15
+ "accessibility.payment-widget.open-button.aria-label": "Open Alma payment options to find out more",
16
16
  "accessibility.plan-selection-changed": "Selected plan: {planDescription}",
17
17
  "accessibility.skip-links.navigation.aria-label": "Quick navigation",
18
18
  "accessibility.visa-card.aria-label": "Visa card accepted",
@@ -6,18 +6,18 @@ declare const _default: {
6
6
  "accessibility.mastercard.aria-label": "Se acepta Mastercard",
7
7
  "accessibility.payment-info.section-title": "Información sobre el plan de pago seleccionado",
8
8
  "accessibility.payment-options.listbox.aria-label": "Formas de pago disponibles",
9
- "accessibility.payment-plan-button.aria-label": "Seleccione el plan de pago {planName}",
9
+ "accessibility.payment-plan-button.aria-label": "Selecciona el plan de pago {planName}",
10
10
  "accessibility.payment-plan.option.aria-label": "Forma de pago {planDescription}",
11
11
  "accessibility.payment-plans-title": "Formas de pago disponibles",
12
12
  "accessibility.payment-plans.section-title": "Formas de pago disponibles",
13
13
  "accessibility.payment-schedule-title": "Calendario de pagos",
14
14
  "accessibility.payment-widget.main.aria-label": "Selección de opciones de pago Alma",
15
- "accessibility.payment-widget.open-button.aria-label": "Ouvrir les options de paiement Alma pour en savoir plus",
15
+ "accessibility.payment-widget.open-button.aria-label": "Abre las opciones de pago de Alma para saber más",
16
16
  "accessibility.plan-selection-changed": "Plan seleccionado: {planDescription}",
17
17
  "accessibility.skip-links.navigation.aria-label": "Navegación rápida",
18
18
  "accessibility.visa-card.aria-label": "Se acepta tarjeta Visa",
19
19
  "credit-features.credit-cost-display": "{creditCost} (TAE {taegPercentage})",
20
- "credit-features.information": "Compruebe tu capacidad de reembolso antes de comprometerte.",
20
+ "credit-features.information": "Comprueba tu capacidad de reembolso antes de comprometerte.",
21
21
  "credit-features.information.title": "El crédito y/o pago a plazos es un compromiso y debe devolverse.",
22
22
  "credit-features.legal-text": " Préstamo de {totalWithoutFirstInstallment} a un tipo deudor fijo a {taegPercentage} a lo largo de un periodo de {installmeentsCountWithoutFirst} meses. Además de un depósito de {firstInstallmentAmount}, esto te permitirá financiar una compra de {productPriceWithoutCreditCost}. 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).",
23
23
  "credit-features.total-credit-cost": "Coste de crédito (incl. en el total)",
@@ -34,7 +34,7 @@ declare const _default: {
34
34
  "eligibility-modal.title-pay-now": "Paga de contado con tu tarjeta bancaria a través de alma.",
35
35
  "installments.today": "Hoy",
36
36
  "installments.total-amount": "Total",
37
- "installments.total-fees": "De los cuales, costes (IVA incluido)",
37
+ "installments.total-fees": "De los cuales, costes administativos (IVA incluido)",
38
38
  "payment-plan-strings.credit": "Pincha aqui para más información",
39
39
  "payment-plan-strings.day-abbreviation": "D{deferredDays}",
40
40
  "payment-plan-strings.default-message": "Pagar a plazos con Alma",
@@ -12,14 +12,14 @@ declare const _default: {
12
12
  "accessibility.payment-plans.section-title": "Opzioni di pagamento disponibili",
13
13
  "accessibility.payment-schedule-title": "Piano di pagamento",
14
14
  "accessibility.payment-widget.main.aria-label": "Selezione delle opzioni di pagamento Alma",
15
- "accessibility.payment-widget.open-button.aria-label": "Ouvrir les options de paiement Alma pour en savoir plus",
15
+ "accessibility.payment-widget.open-button.aria-label": "Aprire le opzioni di pagamento Alma per saperne di più",
16
16
  "accessibility.plan-selection-changed": "Piano selezionato: {planDescription}",
17
17
  "accessibility.skip-links.navigation.aria-label": "Navigazione rapida",
18
18
  "accessibility.visa-card.aria-label": "Carta Visa accettata",
19
19
  "credit-features.credit-cost-display": "{creditCost} (TAEG {taegPercentage})",
20
- "credit-features.information": "Verificate la vostra capacità di rimborso prima di prendere un impegno.",
21
- "credit-features.information.title": "Il credito è un impegno e deve essere ripagato.",
22
- "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).",
20
+ "credit-features.information": "Prima di procedere, assicurati di poter rispettare il tuo impegno finanziario.",
21
+ "credit-features.information.title": "Il credito è un impegno e deve essere rimborsato.",
22
+ "credit-features.legal-text": "Prestito a tasso fisso di un importo pari a {totalWithoutFirstInstallment} al tasso {taegPercentage} per un periodo di {installmeentsCountWithoutFirst} mesi. Oltre a un deposito di {firstInstallmentAmount}, questo vi permetterà di finanziare un acquisto di {productPriceWithoutCreditCost}. 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).",
23
23
  "credit-features.total-credit-cost": "Di cui commissioni",
24
24
  "eligibility-modal.bullet-1": "Seleziona <strong>Alma</strong> come metodo di pagamento.",
25
25
  "eligibility-modal.bullet-2": "Segui le istruzioni e completa l'acquisto <strong>in meno di 2 minuti.</strong>",
@@ -37,7 +37,7 @@ declare const _default: {
37
37
  "installments.total-fees": "Di cui commissioni",
38
38
  "payment-plan-strings.credit": "Clicca qui per saperne di più",
39
39
  "payment-plan-strings.day-abbreviation": "G{deferredDays}",
40
- "payment-plan-strings.default-message": "Paga a rate con Alma, senza registrazione.",
40
+ "payment-plan-strings.default-message": "Paga a rate con Alma",
41
41
  "payment-plan-strings.deferred": "{totalAmount} da pagare il {dueDate}",
42
42
  "payment-plan-strings.deferred.days": "{days, number} {days, plural, one {giorno} other {giorni}}",
43
43
  "payment-plan-strings.deferred.months": "{months, number} {months, plural, one {mesi} other {mesi}}",
@@ -12,7 +12,7 @@ declare const _default: {
12
12
  "accessibility.payment-plans.section-title": "Betalingsopties beschikbaar",
13
13
  "accessibility.payment-schedule-title": "Betalingsschema",
14
14
  "accessibility.payment-widget.main.aria-label": "Alma betalingsopties selecteren",
15
- "accessibility.payment-widget.open-button.aria-label": "Ouvrir les options de paiement Alma pour en savoir plus",
15
+ "accessibility.payment-widget.open-button.aria-label": "Open Alma betalingsopties voor meer informatie",
16
16
  "accessibility.plan-selection-changed": "Gekozen plan: {planDescription}",
17
17
  "accessibility.skip-links.navigation.aria-label": "Snelle navigatie",
18
18
  "accessibility.visa-card.aria-label": "Visa-kaart geaccepteerd",
@@ -44,9 +44,9 @@ declare const _default: {
44
44
  "payment-plan-strings.ineligible-greater-than-max": "Tot {maxAmount}",
45
45
  "payment-plan-strings.ineligible-lower-than-min": "Vanaf {minAmount}",
46
46
  "payment-plan-strings.month-abbreviation": "M{deferredMonths}",
47
- "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
47
+ "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural,\n one {Eerst {firstInstallmentAmount}, daarna {numberOfRemainingInstallments} x {othersInstallmentAmount}}\n other {Eerst {firstInstallmentAmount}, daarna {numberOfRemainingInstallments} x {othersInstallmentAmount}}\n}",
48
48
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
49
- "payment-plan-strings.no-fee": "(zonder kosten)",
49
+ "payment-plan-strings.no-fee": "(zonder extra kosten)",
50
50
  "payment-plan-strings.pay-now": "Betaal nu {totalAmount}",
51
51
  "payment-plan-strings.pay.deferred.button": "Betalen met uitgestelde betaling: {deferredTime}",
52
52
  "payment-plan-strings.pay.now.button": "Betaal nu",
@@ -12,7 +12,7 @@ declare const _default: {
12
12
  "accessibility.payment-plans.section-title": "Opções de pagamento disponíveis",
13
13
  "accessibility.payment-schedule-title": "Calendário de pagamento",
14
14
  "accessibility.payment-widget.main.aria-label": "Seleção das opções de pagamento da Alma",
15
- "accessibility.payment-widget.open-button.aria-label": "Ouvrir les options de paiement Alma pour en savoir plus",
15
+ "accessibility.payment-widget.open-button.aria-label": "Abrir as opções de pagamento da Alma para saber mais",
16
16
  "accessibility.plan-selection-changed": "Plano selecionado: {planDescription}",
17
17
  "accessibility.skip-links.navigation.aria-label": "Navegação rápida",
18
18
  "accessibility.visa-card.aria-label": "Aceita cartão Visa",
@@ -0,0 +1,79 @@
1
+ import { ConfigPlan, EligibilityPlan } from '../types';
2
+ export declare const mockPlansAllEligible: EligibilityPlan[];
3
+ export declare const mockButtonPlans: ({
4
+ customer_total_cost_amount: number;
5
+ customer_total_cost_bps: number;
6
+ deferred_days: number;
7
+ deferred_months: number;
8
+ eligible: boolean;
9
+ installments_count: number;
10
+ payment_plan: {
11
+ customer_fee: number;
12
+ customer_interest: number;
13
+ due_date: number;
14
+ purchase_amount: number;
15
+ total_amount: number;
16
+ }[];
17
+ purchase_amount: number;
18
+ annual_interest_rate?: undefined;
19
+ } | {
20
+ annual_interest_rate: number;
21
+ customer_total_cost_amount: number;
22
+ customer_total_cost_bps: number;
23
+ deferred_days: number;
24
+ deferred_months: number;
25
+ eligible: boolean;
26
+ installments_count: number;
27
+ payment_plan: {
28
+ customer_fee: number;
29
+ customer_interest: number;
30
+ due_date: number;
31
+ purchase_amount: number;
32
+ refunded_interest: number;
33
+ total_amount: number;
34
+ }[];
35
+ purchase_amount: number;
36
+ })[];
37
+ export declare const mockEligibilityPaymentPlanWithIneligiblePlan: ({
38
+ customer_fee: number;
39
+ customer_interest: number;
40
+ customer_total_cost_amount: number;
41
+ customer_total_cost_bps: number;
42
+ deferred_days: number;
43
+ deferred_months: number;
44
+ eligible: boolean;
45
+ installments_count: number;
46
+ payment_plan: {
47
+ customer_fee: number;
48
+ customer_interest: number;
49
+ due_date: number;
50
+ purchase_amount: number;
51
+ total_amount: number;
52
+ }[];
53
+ purchase_amount: number;
54
+ constraints?: undefined;
55
+ reasons?: undefined;
56
+ } | {
57
+ constraints: {
58
+ purchase_amount: {
59
+ maximum: number;
60
+ minimum: number;
61
+ };
62
+ };
63
+ deferred_days: number;
64
+ deferred_months: number;
65
+ eligible: boolean;
66
+ installments_count: number;
67
+ purchase_amount: number;
68
+ reasons: {
69
+ purchase_amount: string;
70
+ };
71
+ customer_fee?: undefined;
72
+ customer_interest?: undefined;
73
+ customer_total_cost_amount?: undefined;
74
+ customer_total_cost_bps?: undefined;
75
+ payment_plan?: undefined;
76
+ })[];
77
+ export declare const mockPlansWithoutDeferred: EligibilityPlan[];
78
+ export declare const mockPayNowPlan: EligibilityPlan[];
79
+ export declare const configPlans: ConfigPlan[];
@@ -0,0 +1,8 @@
1
+ import { default as React } from '../../preact/compat';
2
+ import { RenderResult } from '@testing-library/react';
3
+ import { Locale } from '../types';
4
+ type Props = {
5
+ locale: Locale;
6
+ };
7
+ declare const renderWithProviders: (ui: React.ReactNode, { locale }?: Props) => RenderResult;
8
+ export default renderWithProviders;
@@ -84,6 +84,7 @@ export type PaymentPlanWidgetOptions = {
84
84
  hideBorder?: boolean;
85
85
  customerBillingCountry?: string;
86
86
  customerShippingCountry?: string;
87
+ merchantCoversAllFees?: boolean;
87
88
  onModalClose?: (event: React.MouseEvent | React.KeyboardEvent) => void;
88
89
  };
89
90
  export type ModalOptions = {
@@ -92,6 +93,7 @@ export type ModalOptions = {
92
93
  purchaseAmount: number;
93
94
  customerBillingCountry?: string;
94
95
  customerShippingCountry?: string;
96
+ merchantCoversAllFees?: boolean;
95
97
  plans?: ConfigPlan[];
96
98
  locale?: Locale;
97
99
  cards?: Card[];