@alma/widgets 2.5.1 → 2.7.1

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.
Files changed (36) hide show
  1. package/dist/raw/widgets.css +23 -2
  2. package/dist/raw/widgets.js +269 -76
  3. package/dist/raw/widgets.js.map +1 -1
  4. package/dist/raw/widgets.m.js +269 -76
  5. package/dist/raw/widgets.m.js.map +1 -1
  6. package/dist/raw/widgets.modern.js +264 -80
  7. package/dist/raw/widgets.modern.js.map +1 -1
  8. package/dist/raw/widgets.umd.js +269 -76
  9. package/dist/raw/widgets.umd.js.map +1 -1
  10. package/dist/types/Widgets/EligibilityModal/DesktopModal/index.d.ts +2 -0
  11. package/dist/types/Widgets/EligibilityModal/MobileModal/index.d.ts +2 -0
  12. package/dist/types/Widgets/EligibilityModal/ModalContainer.d.ts +2 -1
  13. package/dist/types/Widgets/EligibilityModal/{modal.test.d.ts → __tests__/Basics.test.d.ts} +0 -0
  14. package/dist/types/Widgets/EligibilityModal/__tests__/Cards.test.d.ts +1 -0
  15. package/dist/types/Widgets/EligibilityModal/__tests__/ModalContainer.test.d.ts +1 -0
  16. package/dist/types/Widgets/EligibilityModal/__tests__/Plans.test.d.ts +1 -0
  17. package/dist/types/Widgets/EligibilityModal/classNames.const.d.ts +2 -0
  18. package/dist/types/Widgets/EligibilityModal/components/Cards/index.d.ts +7 -0
  19. package/dist/types/Widgets/EligibilityModal/index.d.ts +2 -1
  20. package/dist/types/Widgets/PaymentPlans/index.d.ts +2 -1
  21. package/dist/types/assets/cards/amex.d.ts +3 -0
  22. package/dist/types/assets/cards/cb.d.ts +3 -0
  23. package/dist/types/assets/cards/mastercard.d.ts +3 -0
  24. package/dist/types/assets/cards/visa.d.ts +3 -0
  25. package/dist/types/types.d.ts +3 -0
  26. package/dist/types/widgets_controller.d.ts +1 -2
  27. package/dist/widgets.css +3 -2
  28. package/dist/widgets.js +1 -1
  29. package/dist/widgets.js.map +1 -1
  30. package/dist/widgets.m.js +1 -1
  31. package/dist/widgets.m.js.map +1 -1
  32. package/dist/widgets.modern.js +1 -1
  33. package/dist/widgets.modern.js.map +1 -1
  34. package/dist/widgets.umd.js +1 -1
  35. package/dist/widgets.umd.js.map +1 -1
  36. package/package.json +1 -1
@@ -1839,7 +1839,7 @@ var messagesDE = {
1839
1839
  "eligibility-modal.title": "<highlighted>Bezahlen Sie in Raten</highlighted> per Kreditkarte mit Alma.",
1840
1840
  "eligibility-modal.title-deferred": "<highlighted>Bezahlen Sie in Raten</highlighted> oder später per Kreditkarte mit Alma.",
1841
1841
  "eligibility-modal.total": "Insgesamt",
1842
- "installments.today": "Heutzutage",
1842
+ "installments.today": "Heute",
1843
1843
  "payment-plan-strings.day-abbreviation": "J{numberOfDeferredDays}",
1844
1844
  "payment-plan-strings.default-message": "Bezahlen Sie in Raten mit Alma",
1845
1845
  "payment-plan-strings.deferred": "{totalAmount} zu zahlen am {dueDate}",
@@ -1882,7 +1882,7 @@ var messagesES = {
1882
1882
  "eligibility-modal.credit-cost": "Coste de crédito (incl. en el total)",
1883
1883
  "eligibility-modal.credit-cost-amount": "{creditCost} (TAE {TAEG})",
1884
1884
  "eligibility-modal.no-eligibility": "Uy, parece que la simulación no ha funcionado.",
1885
- "eligibility-modal.title": "<highlighted>Paga a plazos</highlighted> con tarjeta de crédito con Alma.",
1885
+ "eligibility-modal.title": "<highlighted>Paga a plazos</highlighted> con tu tarjeta, a través de Alma.",
1886
1886
  "eligibility-modal.title-deferred": "<highlighted>Paga a plazos</highlighted> o más adelante con tu tarjeta, a través de Alma.",
1887
1887
  "eligibility-modal.total": "Total",
1888
1888
  "installments.today": "Hoy",
@@ -1928,8 +1928,8 @@ var messagesIT = {
1928
1928
  "eligibility-modal.credit-cost": "Di cui commissioni",
1929
1929
  "eligibility-modal.credit-cost-amount": "{creditCost} (TAEG {TAEG})",
1930
1930
  "eligibility-modal.no-eligibility": "Ops, sembra che la simulazione non abbia funzionato.",
1931
- "eligibility-modal.title": "<highlighted>Paga a rate</highlighted> con carta di credito con Alma.",
1932
- "eligibility-modal.title-deferred": "<highlighted>Paga a rate</highlighted> e posticipa il pagamento con Alma, senza interessi.",
1931
+ "eligibility-modal.title": "<highlighted>Paga a rate</highlighted> con Alma, senza interessi.",
1932
+ "eligibility-modal.title-deferred": "<highlighted>Paga a rate</highlighted> o posticipa il pagamento con Alma, senza interessi.",
1933
1933
  "eligibility-modal.total": "Totale",
1934
1934
  "installments.today": "Oggi",
1935
1935
  "payment-plan-strings.day-abbreviation": "G{numberOfDeferredDays}",
@@ -1970,9 +1970,6 @@ var getTranslationsByLocale = function getTranslationsByLocale(locale) {
1970
1970
  case Locale.fr:
1971
1971
  return messagesFR;
1972
1972
 
1973
- case Locale.en:
1974
- return messagesEN;
1975
-
1976
1973
  case Locale.es:
1977
1974
  return messagesES;
1978
1975
 
@@ -1987,6 +1984,7 @@ var getTranslationsByLocale = function getTranslationsByLocale(locale) {
1987
1984
  case Locale['nl-NL']:
1988
1985
  return messagesNL;
1989
1986
 
1987
+ case Locale.en:
1990
1988
  default:
1991
1989
  return messagesEN;
1992
1990
  }
@@ -2193,7 +2191,9 @@ var STATIC_CUSTOMISATION_CLASSES = {
2193
2191
  closeButton: prefix + '-close-button',
2194
2192
  scheduleDetails: prefix + '-schedule-details',
2195
2193
  scheduleTotal: prefix + '-schedule-total',
2196
- scheduleCredit: prefix + '-schedule-credit'
2194
+ scheduleCredit: prefix + '-schedule-credit',
2195
+ cardContainer: prefix + '-card-logos',
2196
+ summary: prefix + '-summary'
2197
2197
  };
2198
2198
 
2199
2199
  var _excluded = ["children", "isOpen", "onClose", "className", "contentClassName", "scrollable"];
@@ -2210,6 +2210,7 @@ var ControlledModal = function ControlledModal(_ref) {
2210
2210
  scrollable = _ref$scrollable === void 0 ? false : _ref$scrollable,
2211
2211
  props = _objectWithoutPropertiesLoose(_ref, _excluded);
2212
2212
 
2213
+ /* istanbul ignore next */
2213
2214
  Modal.setAppElement('body');
2214
2215
  return /*#__PURE__*/React.createElement(Modal, Object.assign({
2215
2216
  className: cx(s$1.modal, className),
@@ -2391,7 +2392,7 @@ var EligibilityPlansButtons = function EligibilityPlansButtons(_ref) {
2391
2392
  }));
2392
2393
  };
2393
2394
 
2394
- var s$3 = {"schedule":"_MPKjS","scheduleLine":"_1A7Qv","total":"_14Ejo","creditCost":"_1ZIgu","creditMessage":"_1BUr8"};
2395
+ var s$3 = {"schedule":"_MPKjS","scheduleLine":"_1A7Qv","total":"_14Ejo","summary":"_65ZpD","creditCost":"_1ZIgu","creditCostAmount":"_tUTZp","creditMessage":"_1BUr8"};
2395
2396
 
2396
2397
  var Schedule = function Schedule(_ref) {
2397
2398
  var currentPlan = _ref.currentPlan;
@@ -2401,9 +2402,29 @@ var Schedule = function Schedule(_ref) {
2401
2402
  var customerFees = priceFromCents(currentPlan ? currentPlan.customer_total_cost_amount : 0);
2402
2403
  var isCredit = currentPlan && currentPlan.installments_count > 4;
2403
2404
  var intl = useIntl();
2404
- return /*#__PURE__*/React.createElement("div", {
2405
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
2405
2406
  className: cx(s$3.schedule, STATIC_CUSTOMISATION_CLASSES.scheduleDetails),
2406
2407
  "data-testid": "modal-installments-element"
2408
+ }, ((currentPlan == null ? void 0 : currentPlan.payment_plan) || []).map(function (installment, index) {
2409
+ return /*#__PURE__*/React.createElement("div", {
2410
+ className: s$3.scheduleLine,
2411
+ key: index
2412
+ }, /*#__PURE__*/React.createElement("span", null, isToday(installment.due_date * 1000) ? /*#__PURE__*/React.createElement(FormattedMessage, {
2413
+ id: "installments.today",
2414
+ defaultMessage: "Aujourd'hui"
2415
+ }) : /*#__PURE__*/React.createElement(FormattedDate, {
2416
+ value: installment.due_date * 1000,
2417
+ day: "numeric",
2418
+ month: "long",
2419
+ year: "numeric"
2420
+ })), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedNumber, {
2421
+ value: priceFromCents(installment.total_amount),
2422
+ style: "currency",
2423
+ currency: "EUR"
2424
+ })));
2425
+ })), /*#__PURE__*/React.createElement("div", {
2426
+ className: cx(s$3.summary, STATIC_CUSTOMISATION_CLASSES.summary),
2427
+ "data-testid": "modal-summary"
2407
2428
  }, /*#__PURE__*/React.createElement("div", {
2408
2429
  className: cx(s$3.scheduleLine, s$3.total, STATIC_CUSTOMISATION_CLASSES.scheduleTotal)
2409
2430
  }, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedMessage, {
@@ -2421,7 +2442,9 @@ var Schedule = function Schedule(_ref) {
2421
2442
  })) : /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedMessage, {
2422
2443
  id: "eligibility-modal.cost",
2423
2444
  defaultMessage: "Dont frais"
2424
- })), /*#__PURE__*/React.createElement("span", null, isCredit ? /*#__PURE__*/React.createElement(FormattedMessage, {
2445
+ })), /*#__PURE__*/React.createElement("span", {
2446
+ className: s$3.creditCostAmount
2447
+ }, isCredit ? /*#__PURE__*/React.createElement(FormattedMessage, {
2425
2448
  id: "eligibility-modal.credit-cost-amount",
2426
2449
  defaultMessage: "{creditCost} (TAEG {TAEG})",
2427
2450
  values: {
@@ -2438,41 +2461,195 @@ var Schedule = function Schedule(_ref) {
2438
2461
  value: customerFees,
2439
2462
  style: "currency",
2440
2463
  currency: "EUR"
2441
- }))), ((currentPlan == null ? void 0 : currentPlan.payment_plan) || []).map(function (installment, index) {
2442
- return /*#__PURE__*/React.createElement("div", {
2443
- className: s$3.scheduleLine,
2444
- key: index
2445
- }, /*#__PURE__*/React.createElement("span", null, isToday(installment.due_date * 1000) ? /*#__PURE__*/React.createElement(FormattedMessage, {
2446
- id: "installments.today",
2447
- defaultMessage: "Aujourd'hui"
2448
- }) : /*#__PURE__*/React.createElement(FormattedDate, {
2449
- value: installment.due_date * 1000,
2450
- day: "numeric",
2451
- month: "long",
2452
- year: "numeric"
2453
- })), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedNumber, {
2454
- value: priceFromCents(installment.total_amount),
2455
- style: "currency",
2456
- currency: "EUR"
2457
- })));
2458
- }), isCredit && /*#__PURE__*/React.createElement("p", {
2464
+ }))), isCredit && /*#__PURE__*/React.createElement("p", {
2459
2465
  className: s$3.creditMessage
2460
2466
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
2461
2467
  id: "eligibility-modal.credit-commitment",
2462
2468
  defaultMessage: "Un cr\xE9dit vous engage et doit \xEAtre rembours\xE9. V\xE9rifiez vos capacit\xE9s de remboursement\n avant de vous engager."
2469
+ }))));
2470
+ };
2471
+
2472
+ var AmexCard = function AmexCard() {
2473
+ return /*#__PURE__*/React.createElement("svg", {
2474
+ xmlns: "http://www.w3.org/2000/svg",
2475
+ width: "24",
2476
+ height: "16",
2477
+ viewBox: "0 0 24 16"
2478
+ }, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
2479
+ id: "cardamex",
2480
+ x1: "10.914%",
2481
+ x2: "87.432%",
2482
+ y1: "86.279%",
2483
+ y2: "15.035%"
2484
+ }, /*#__PURE__*/React.createElement("stop", {
2485
+ offset: "0%",
2486
+ stopColor: "#3FA9F5"
2487
+ }), /*#__PURE__*/React.createElement("stop", {
2488
+ offset: "100%",
2489
+ stopColor: "#0071BC"
2490
+ }))), /*#__PURE__*/React.createElement("g", {
2491
+ fill: "none",
2492
+ fillRule: "evenodd"
2493
+ }, /*#__PURE__*/React.createElement("path", {
2494
+ fill: "url(#cardamex)",
2495
+ fillRule: "nonzero",
2496
+ d: "M22.559 16H1.379C.627 16 0 15.392 0 14.662V1.338C0 .608.627 0 1.379 0H22.62C23.373 0 24 .608 24 1.338v13.324c-.063.73-.627 1.338-1.441 1.338z"
2497
+ }), /*#__PURE__*/React.createElement("g", {
2498
+ fill: "#FFF"
2499
+ }, /*#__PURE__*/React.createElement("path", {
2500
+ d: "M10.115 8.711L8.889 6.044H7.295v3.852L5.517 6.044H4.17l-1.778 4.03h1.103l.368-.889h2.023l.368.89h2.084V7.11l1.349 2.963h.92l1.348-2.904v2.904h.98v-4.03H11.28l-1.165 2.667zm-5.272-.474H4.23l.613-1.422v.06l.613 1.362h-.613z"
2501
+ }), /*#__PURE__*/React.createElement("path", {
2502
+ fillRule: "nonzero",
2503
+ d: "M19.372 7.94l.735-.77 1.042-1.185h-1.287L18.697 7.23l-1.164-1.245h-3.985v3.97h3.923l1.226-1.303 1.165 1.304h1.287L20.107 8.71l-.735-.77zM16.92 9.186h-2.33v-.77h2.268v-.77H14.59v-.712h2.33L18.084 8 16.92 9.185z"
2504
+ }))));
2505
+ };
2506
+
2507
+ var VisaCard = function VisaCard() {
2508
+ return /*#__PURE__*/React.createElement("svg", {
2509
+ xmlns: "http://www.w3.org/2000/svg",
2510
+ width: "24",
2511
+ height: "16",
2512
+ viewBox: "0 0 24 16"
2513
+ }, /*#__PURE__*/React.createElement("g", {
2514
+ fill: "none",
2515
+ fillRule: "nonzero"
2516
+ }, /*#__PURE__*/React.createElement("path", {
2517
+ fill: "#FCFCFC",
2518
+ d: "M22.684 16H1.38C.627 16 0 15.39 0 14.656V1.344C0 .61.627 0 1.379 0H22.62C23.373 0 24 .61 24 1.344v13.374c0 .671-.564 1.282-1.316 1.282z"
2519
+ }), ' ', /*#__PURE__*/React.createElement("path", {
2520
+ fill: "#005098",
2521
+ d: "M8.889 10.726l.948-5.393h1.482l-.949 5.393zM15.704 5.452a3.658 3.658 0 0 0-1.304-.237c-1.481 0-2.489.71-2.489 1.778 0 .77.711 1.185 1.304 1.481.592.237.77.415.77.652 0 .355-.474.533-.889.533-.592 0-.889-.059-1.363-.296l-.177-.06-.178 1.186c.355.178 1.007.296 1.659.296 1.54 0 2.548-.71 2.548-1.837 0-.592-.415-1.067-1.244-1.481-.534-.237-.83-.415-.83-.652 0-.237.237-.474.83-.474.474 0 .83.118 1.126.178l.118.059.119-1.126M19.496 5.333H18.37c-.355 0-.592.119-.77.474l-2.193 4.919h1.541s.237-.652.296-.83h1.897c.059.178.178.83.178.83h1.362l-1.185-5.393zM17.66 8.77l.593-1.481s.118-.296.178-.533l.118.474s.296 1.303.356 1.54h-1.245zM7.644 5.333L6.222 9.007l-.178-.77C5.748 7.348 4.92 6.459 4.03 5.985l1.303 4.682h1.541l2.311-5.393h-1.54"
2522
+ }), /*#__PURE__*/React.createElement("path", {
2523
+ fill: "#F6A500",
2524
+ d: "M4.919 5.333h-2.37v.119c1.836.474 3.08 1.54 3.555 2.844L5.57 5.807c-.118-.414-.355-.474-.651-.474"
2525
+ }), /*#__PURE__*/React.createElement("path", {
2526
+ fill: "#0A5296",
2527
+ d: "M23.937 3.23H0V1.316C0 .598.627 0 1.379 0H22.62C23.373 0 24 .598 24 1.316V3.23h-.063z"
2528
+ }), /*#__PURE__*/React.createElement("path", {
2529
+ fill: "#F4A428",
2530
+ d: "M.063 13H24v1.8c0 .655-.625 1.2-1.375 1.2H1.375C.625 16 0 15.455 0 14.8V13h.063z"
2463
2531
  })));
2464
2532
  };
2465
2533
 
2466
- var s$4 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
2534
+ var MasterCard = function MasterCard() {
2535
+ return /*#__PURE__*/React.createElement("svg", {
2536
+ width: "24px",
2537
+ height: "16px",
2538
+ viewBox: "0 0 24 16",
2539
+ version: "1.1",
2540
+ xmlns: "http://www.w3.org/2000/svg"
2541
+ }, /*#__PURE__*/React.createElement("g", {
2542
+ id: "Parcours-1C-B",
2543
+ stroke: "none",
2544
+ strokeWidth: "1",
2545
+ fill: "none",
2546
+ fillRule: "evenodd"
2547
+ }, /*#__PURE__*/React.createElement("g", {
2548
+ id: "mobile-1C-Paiement-V1",
2549
+ transform: "translate(-269.000000, -313.000000)"
2550
+ }, /*#__PURE__*/React.createElement("g", {
2551
+ id: "mastercard",
2552
+ transform: "translate(269.000000, 313.000000)"
2553
+ }, /*#__PURE__*/React.createElement("rect", {
2554
+ id: "Rectangle",
2555
+ fill: "#FFFFFF",
2556
+ x: "0",
2557
+ y: "0",
2558
+ width: "24",
2559
+ height: "16",
2560
+ rx: "1"
2561
+ }), /*#__PURE__*/React.createElement("g", {
2562
+ id: "Group-6",
2563
+ transform: "translate(4.000000, 3.000000)"
2564
+ }, /*#__PURE__*/React.createElement("circle", {
2565
+ id: "Oval-4-Copy",
2566
+ fill: "#EA001B",
2567
+ cx: "5.05263158",
2568
+ cy: "5.05263158",
2569
+ r: "5.05263158"
2570
+ }), /*#__PURE__*/React.createElement("circle", {
2571
+ id: "Oval-4",
2572
+ fillOpacity: "0.25",
2573
+ fill: "#F79F1A",
2574
+ cx: "10.9473684",
2575
+ cy: "5.05263158",
2576
+ r: "5.05263158"
2577
+ }), /*#__PURE__*/React.createElement("circle", {
2578
+ id: "Oval-4-Copy-2",
2579
+ fillOpacity: "0.9",
2580
+ fill: "#F79F1A",
2581
+ cx: "10.9473684",
2582
+ cy: "5.05263158",
2583
+ r: "5.05263158"
2584
+ }), /*#__PURE__*/React.createElement("circle", {
2585
+ id: "Oval-4-Copy-3",
2586
+ fillOpacity: "0.3",
2587
+ fill: "#EA001B",
2588
+ cx: "5.05263158",
2589
+ cy: "5.05263158",
2590
+ r: "5.05263158"
2591
+ }))))));
2592
+ };
2593
+
2594
+ var CbCard = function CbCard() {
2595
+ return /*#__PURE__*/React.createElement("svg", {
2596
+ xmlns: "http://www.w3.org/2000/svg",
2597
+ width: "24",
2598
+ height: "16",
2599
+ viewBox: "0 0 24 16"
2600
+ }, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
2601
+ id: "cardcb",
2602
+ x1: "5.842%",
2603
+ x2: "95.393%",
2604
+ y1: "81.753%",
2605
+ y2: "17.344%"
2606
+ }, /*#__PURE__*/React.createElement("stop", {
2607
+ offset: "0%",
2608
+ stopColor: "#39B54A"
2609
+ }), ' ', /*#__PURE__*/React.createElement("stop", {
2610
+ offset: "100%",
2611
+ stopColor: "#0A5296"
2612
+ }))), /*#__PURE__*/React.createElement("g", {
2613
+ fill: "none",
2614
+ fillRule: "nonzero"
2615
+ }, /*#__PURE__*/React.createElement("path", {
2616
+ fill: "url(#cardcb)",
2617
+ d: "M22.621 16H1.38C.627 16 0 15.392 0 14.662V1.338C0 .608.627 0 1.379 0H22.62C23.373 0 24 .608 24 1.338v13.324c-.063.73-.627 1.338-1.379 1.338z"
2618
+ }), /*#__PURE__*/React.createElement("g", {
2619
+ fill: "#FFF"
2620
+ }, /*#__PURE__*/React.createElement("path", {
2621
+ d: "M19.094 4.03h-6.437V8h6.498c1.165 0 2.084-.889 2.084-2.015-.06-1.066-.98-1.955-2.145-1.955zM19.094 8.593h-6.437v3.97h6.498c1.165 0 2.084-.889 2.084-2.015-.06-1.067-.98-1.955-2.145-1.955zM7.017 8.06h4.966c-.245-2.371-2.391-4.267-4.966-4.267-2.758 0-5.027 2.074-5.027 4.681s2.269 4.682 5.027 4.682c2.698 0 4.904-2.015 5.027-4.563H7.017v-.534z"
2622
+ }))));
2623
+ };
2624
+
2625
+ var s$4 = {"cardContainer":"_1N3yO","card":"_83cGn"};
2626
+
2627
+ var Cards = function Cards(_ref) {
2628
+ var cards = _ref.cards;
2629
+ // We transform to a Set and back to avoid duplicate values (ex : amex, amex)
2630
+ var uniqueCards = Array.from(new Set(cards));
2631
+ return /*#__PURE__*/React.createElement("div", {
2632
+ "data-testid": "card-logos",
2633
+ className: cx(s$4.cardContainer, STATIC_CUSTOMISATION_CLASSES.cardContainer)
2634
+ }, uniqueCards.map(function (card) {
2635
+ return /*#__PURE__*/React.createElement("div", {
2636
+ key: card,
2637
+ className: s$4.card,
2638
+ "data-testid": "card-logo-" + card
2639
+ }, 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));
2640
+ }));
2641
+ };
2642
+
2643
+ var s$5 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
2467
2644
 
2468
2645
  var Info = function Info() {
2469
2646
  return /*#__PURE__*/React.createElement("div", {
2470
- className: cx(s$4.list, STATIC_CUSTOMISATION_CLASSES.info),
2647
+ className: cx(s$5.list, STATIC_CUSTOMISATION_CLASSES.info),
2471
2648
  "data-testid": "modal-info-element"
2472
2649
  }, /*#__PURE__*/React.createElement("div", {
2473
- className: s$4.listItem
2650
+ className: s$5.listItem
2474
2651
  }, /*#__PURE__*/React.createElement("div", {
2475
- className: s$4.bullet
2652
+ className: s$5.bullet
2476
2653
  }, "1"), /*#__PURE__*/React.createElement("div", {
2477
2654
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2478
2655
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
@@ -2484,9 +2661,9 @@ var Info = function Info() {
2484
2661
  }
2485
2662
  }
2486
2663
  }))), /*#__PURE__*/React.createElement("div", {
2487
- className: s$4.listItem
2664
+ className: s$5.listItem
2488
2665
  }, /*#__PURE__*/React.createElement("div", {
2489
- className: s$4.bullet
2666
+ className: s$5.bullet
2490
2667
  }, "2"), /*#__PURE__*/React.createElement("div", {
2491
2668
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2492
2669
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
@@ -2498,9 +2675,9 @@ var Info = function Info() {
2498
2675
  }
2499
2676
  }
2500
2677
  }))), /*#__PURE__*/React.createElement("div", {
2501
- className: s$4.listItem
2678
+ className: s$5.listItem
2502
2679
  }, /*#__PURE__*/React.createElement("div", {
2503
- className: s$4.bullet
2680
+ className: s$5.bullet
2504
2681
  }, "3"), /*#__PURE__*/React.createElement("div", {
2505
2682
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2506
2683
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
@@ -2547,22 +2724,22 @@ function LogoIcon(_ref) {
2547
2724
  }));
2548
2725
  }
2549
2726
 
2550
- var s$5 = {"logo":"_3Oyv_"};
2727
+ var s$6 = {"logo":"_3Oyv_"};
2551
2728
 
2552
2729
  var Logo = function Logo() {
2553
2730
  return /*#__PURE__*/React.createElement("div", {
2554
- className: s$5.logo
2731
+ className: s$6.logo
2555
2732
  }, /*#__PURE__*/React.createElement(LogoIcon, {
2556
2733
  underlineColor: "#FF414D"
2557
2734
  }));
2558
2735
  };
2559
2736
 
2560
- var s$6 = {"title":"_3ERx-"};
2737
+ var s$7 = {"title":"_3ERx-"};
2561
2738
 
2562
2739
  var Title = function Title(_ref) {
2563
2740
  var isSomePlanDeferred = _ref.isSomePlanDeferred;
2564
2741
  return /*#__PURE__*/React.createElement("div", {
2565
- className: cx(s$6.title, STATIC_CUSTOMISATION_CLASSES.title),
2742
+ className: cx(s$7.title, STATIC_CUSTOMISATION_CLASSES.title),
2566
2743
  "data-testid": "modal-title-element"
2567
2744
  }, isSomePlanDeferred ? /*#__PURE__*/React.createElement(FormattedMessage, {
2568
2745
  id: 'eligibility-modal.title-deferred',
@@ -2583,43 +2760,50 @@ var Title = function Title(_ref) {
2583
2760
  }));
2584
2761
  };
2585
2762
 
2586
- var s$7 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC"};
2763
+ var s$8 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC"};
2587
2764
 
2588
2765
  var DesktopModal = function DesktopModal(_ref) {
2589
2766
  var children = _ref.children,
2590
- isSomePlanDeferred = _ref.isSomePlanDeferred;
2767
+ isSomePlanDeferred = _ref.isSomePlanDeferred,
2768
+ cards = _ref.cards;
2591
2769
  return /*#__PURE__*/React.createElement("div", {
2592
- className: s$7.container,
2770
+ className: s$8.container,
2593
2771
  "data-testid": "modal-container"
2594
2772
  }, /*#__PURE__*/React.createElement("div", {
2595
- className: cx([s$7.block, s$7.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
2773
+ className: cx([s$8.block, s$8.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
2596
2774
  }, /*#__PURE__*/React.createElement(Title, {
2597
2775
  isSomePlanDeferred: isSomePlanDeferred
2598
- }), /*#__PURE__*/React.createElement(Info, null), /*#__PURE__*/React.createElement(Logo, null)), /*#__PURE__*/React.createElement("div", {
2599
- className: cx(s$7.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
2776
+ }), /*#__PURE__*/React.createElement(Info, null), cards && /*#__PURE__*/React.createElement(Cards, {
2777
+ cards: cards
2778
+ }), /*#__PURE__*/React.createElement(Logo, null)), /*#__PURE__*/React.createElement("div", {
2779
+ className: cx(s$8.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
2600
2780
  }, children));
2601
2781
  };
2602
2782
 
2603
- var s$8 = {"noEligibility":"_17qNJ","loader":"_2oTJq"};
2783
+ var s$9 = {"noEligibility":"_17qNJ","loader":"_2oTJq"};
2604
2784
 
2605
- var s$9 = {"container":"_2G7Ch"};
2785
+ var s$a = {"container":"_2G7Ch"};
2606
2786
 
2607
2787
  var MobileModal = function MobileModal(_ref) {
2608
2788
  var children = _ref.children,
2609
- isSomePlanDeferred = _ref.isSomePlanDeferred;
2789
+ isSomePlanDeferred = _ref.isSomePlanDeferred,
2790
+ cards = _ref.cards;
2610
2791
  return /*#__PURE__*/React.createElement("div", {
2611
- className: s$9.container,
2792
+ className: s$a.container,
2612
2793
  "data-testid": "modal-container"
2613
2794
  }, /*#__PURE__*/React.createElement(Title, {
2614
2795
  isSomePlanDeferred: isSomePlanDeferred
2615
- }), children, /*#__PURE__*/React.createElement(Info, null), /*#__PURE__*/React.createElement(Logo, null));
2796
+ }), children, /*#__PURE__*/React.createElement(Info, null), cards && /*#__PURE__*/React.createElement(Cards, {
2797
+ cards: cards
2798
+ }), /*#__PURE__*/React.createElement(Logo, null));
2616
2799
  };
2617
2800
 
2618
2801
  var EligibilityModal = function EligibilityModal(_ref) {
2619
2802
  var initialPlanIndex = _ref.initialPlanIndex,
2620
2803
  onClose = _ref.onClose,
2621
2804
  eligibilityPlans = _ref.eligibilityPlans,
2622
- status = _ref.status;
2805
+ status = _ref.status,
2806
+ cards = _ref.cards;
2623
2807
 
2624
2808
  var _useState = useState(initialPlanIndex || 0),
2625
2809
  currentPlanIndex = _useState[0],
@@ -2642,11 +2826,12 @@ var EligibilityModal = function EligibilityModal(_ref) {
2642
2826
  scrollable: true,
2643
2827
  isOpen: true
2644
2828
  }, /*#__PURE__*/React.createElement(ModalComponent, {
2645
- isSomePlanDeferred: isSomePlanDeferred
2829
+ isSomePlanDeferred: isSomePlanDeferred,
2830
+ cards: cards
2646
2831
  }, status === apiStatus.PENDING && /*#__PURE__*/React.createElement("div", {
2647
- className: s$8.loader
2832
+ className: s$9.loader
2648
2833
  }, /*#__PURE__*/React.createElement(LoadingIndicator, null)), status === apiStatus.SUCCESS && eligiblePlans.length === 0 && /*#__PURE__*/React.createElement("div", {
2649
- className: s$8.noEligibility
2834
+ className: s$9.noEligibility
2650
2835
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
2651
2836
  id: "eligibility-modal.no-eligibility",
2652
2837
  defaultMessage: "Oups, il semblerait que la simulation n'ait pas fonctionn\xE9."
@@ -2667,7 +2852,8 @@ var ModalContainer = function ModalContainer(_ref) {
2667
2852
  var purchaseAmount = _ref.purchaseAmount,
2668
2853
  apiData = _ref.apiData,
2669
2854
  configPlans = _ref.configPlans,
2670
- onClose = _ref.onClose;
2855
+ onClose = _ref.onClose,
2856
+ cards = _ref.cards;
2671
2857
 
2672
2858
  var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
2673
2859
  eligibilityPlans = _useFetchEligibility[0],
@@ -2677,21 +2863,22 @@ var ModalContainer = function ModalContainer(_ref) {
2677
2863
  initialPlanIndex: 0,
2678
2864
  onClose: onClose,
2679
2865
  eligibilityPlans: eligibilityPlans,
2680
- status: status
2866
+ status: status,
2867
+ cards: cards
2681
2868
  });
2682
2869
  };
2683
2870
 
2684
- var s$a = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
2871
+ var s$b = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
2685
2872
 
2686
2873
  var Loader = function Loader(_ref) {
2687
2874
  var className = _ref.className;
2688
2875
  return /*#__PURE__*/React.createElement("div", {
2689
- className: cx(s$a.loadingIndicator, className),
2876
+ className: cx(s$b.loadingIndicator, className),
2690
2877
  "data-testid": "loader"
2691
2878
  }, /*#__PURE__*/React.createElement("div", {
2692
- className: s$a.line1
2879
+ className: s$b.line1
2693
2880
  }), /*#__PURE__*/React.createElement("div", {
2694
- className: s$a.line2
2881
+ className: s$b.line2
2695
2882
  }));
2696
2883
  };
2697
2884
 
@@ -2784,7 +2971,7 @@ var STATIC_CUSTOMISATION_CLASSES$1 = {
2784
2971
  activeOption: prefix$1 + '-active-option'
2785
2972
  };
2786
2973
 
2787
- var s$b = {"widgetButton":"_TSkFv","logo":"_LJ4nZ","primaryContainer":"_bMClc","paymentPlans":"_17c_S","plan":"_2Kqjn","active":"_3dG_J","notEligible":"_3O1bg","info":"_25GrF","loader":"_30j1O","error":"_R0YlN","errorText":"_2kGhu","errorButton":"_73d_Y","pending":"_1ZDMS","clickable":"_UksZa","unClickable":"_1lr-q"};
2974
+ var s$c = {"widgetButton":"_TSkFv","logo":"_LJ4nZ","primaryContainer":"_bMClc","paymentPlans":"_17c_S","plan":"_2Kqjn","active":"_3dG_J","notEligible":"_3O1bg","info":"_25GrF","loader":"_30j1O","error":"_R0YlN","errorText":"_2kGhu","errorButton":"_73d_Y","pending":"_1ZDMS","clickable":"_UksZa","unClickable":"_1lr-q"};
2788
2975
 
2789
2976
  var VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
2790
2977
  var DEFAULT_TRANSITION_TIME = 5500;
@@ -2797,7 +2984,8 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
2797
2984
  configPlans = _ref.configPlans,
2798
2985
  transitionDelay = _ref.transitionDelay,
2799
2986
  hideIfNotEligible = _ref.hideIfNotEligible,
2800
- suggestedPaymentPlan = _ref.suggestedPaymentPlan;
2987
+ suggestedPaymentPlan = _ref.suggestedPaymentPlan,
2988
+ cards = _ref.cards;
2801
2989
 
2802
2990
  var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
2803
2991
  eligibilityPlans = _useFetchEligibility[0],
@@ -2877,7 +3065,7 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
2877
3065
 
2878
3066
  if (status === apiStatus.PENDING) {
2879
3067
  return /*#__PURE__*/React.createElement("div", {
2880
- className: cx(s$b.widgetButton, s$b.pending)
3068
+ className: cx(s$c.widgetButton, s$c.pending)
2881
3069
  }, /*#__PURE__*/React.createElement(Loader, null));
2882
3070
  }
2883
3071
 
@@ -2895,14 +3083,14 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
2895
3083
 
2896
3084
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
2897
3085
  onClick: handleOpenModal,
2898
- className: cx(s$b.widgetButton, (_cx = {}, _cx[s$b.clickable] = eligiblePlans.length > 0, _cx[s$b.unClickable] = eligiblePlans.length === 0, _cx), STATIC_CUSTOMISATION_CLASSES$1.container),
3086
+ className: cx(s$c.widgetButton, (_cx = {}, _cx[s$c.clickable] = eligiblePlans.length > 0, _cx[s$c.unClickable] = eligiblePlans.length === 0, _cx), STATIC_CUSTOMISATION_CLASSES$1.container),
2899
3087
  "data-testid": "widget-button"
2900
3088
  }, /*#__PURE__*/React.createElement("div", {
2901
- className: cx(s$b.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
3089
+ className: cx(s$c.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
2902
3090
  }, /*#__PURE__*/React.createElement(LogoIcon, {
2903
- className: s$b.logo
3091
+ className: s$c.logo
2904
3092
  }), /*#__PURE__*/React.createElement("div", {
2905
- className: cx(s$b.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
3093
+ className: cx(s$c.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
2906
3094
  }, eligibilityPlans.map(function (eligibilityPlan, key) {
2907
3095
  var _cx2;
2908
3096
 
@@ -2912,15 +3100,16 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
2912
3100
  return onHover(key);
2913
3101
  },
2914
3102
  onMouseOut: onLeave,
2915
- className: cx(s$b.plan, (_cx2 = {}, _cx2[cx(s$b.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)] = current === key, _cx2[cx(s$b.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = !eligibilityPlan.eligible, _cx2))
3103
+ className: cx(s$c.plan, (_cx2 = {}, _cx2[cx(s$c.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)] = current === key, _cx2[cx(s$c.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = !eligibilityPlan.eligible, _cx2))
2916
3104
  }, paymentPlanShorthandName(eligibilityPlan));
2917
3105
  }))), /*#__PURE__*/React.createElement("div", {
2918
- className: cx(s$b.info, (_cx3 = {}, _cx3[cx(s$b.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = eligibilityPlans[current] && !eligibilityPlans[current].eligible, _cx3), STATIC_CUSTOMISATION_CLASSES$1.paymentInfo)
3106
+ className: cx(s$c.info, (_cx3 = {}, _cx3[cx(s$c.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = eligibilityPlans[current] && !eligibilityPlans[current].eligible, _cx3), STATIC_CUSTOMISATION_CLASSES$1.paymentInfo)
2919
3107
  }, eligibilityPlans.length !== 0 && paymentPlanInfoText(eligibilityPlans[current]))), isOpen && /*#__PURE__*/React.createElement(EligibilityModal, {
2920
3108
  initialPlanIndex: getIndexWithinEligiblePlans(current),
2921
3109
  onClose: closeModal,
2922
3110
  eligibilityPlans: eligiblePlans,
2923
- status: status
3111
+ status: status,
3112
+ cards: cards
2924
3113
  }));
2925
3114
  };
2926
3115
 
@@ -2948,7 +3137,8 @@ var WidgetsController = /*#__PURE__*/function () {
2948
3137
  hideIfNotEligible = options.hideIfNotEligible,
2949
3138
  suggestedPaymentPlan = options.suggestedPaymentPlan,
2950
3139
  _options$locale = options.locale,
2951
- locale = _options$locale === void 0 ? Locale.en : _options$locale;
3140
+ locale = _options$locale === void 0 ? Locale.en : _options$locale,
3141
+ cards = options.cards;
2952
3142
 
2953
3143
  if (containerDiv) {
2954
3144
  render( /*#__PURE__*/React.createElement(Provider, {
@@ -2959,7 +3149,8 @@ var WidgetsController = /*#__PURE__*/function () {
2959
3149
  configPlans: plans,
2960
3150
  transitionDelay: transitionDelay,
2961
3151
  hideIfNotEligible: hideIfNotEligible,
2962
- suggestedPaymentPlan: suggestedPaymentPlan
3152
+ suggestedPaymentPlan: suggestedPaymentPlan,
3153
+ cards: cards
2963
3154
  })), document.querySelector(container));
2964
3155
  }
2965
3156
  }
@@ -2970,7 +3161,8 @@ var WidgetsController = /*#__PURE__*/function () {
2970
3161
  _purchaseAmount = options.purchaseAmount,
2971
3162
  _plans = options.plans,
2972
3163
  _options$locale2 = options.locale,
2973
- _locale = _options$locale2 === void 0 ? Locale.en : _options$locale2;
3164
+ _locale = _options$locale2 === void 0 ? Locale.en : _options$locale2,
3165
+ _cards = options.cards;
2974
3166
 
2975
3167
  var close = function close() {
2976
3168
  return containerDiv && unmountComponentAtNode(containerDiv);
@@ -2983,7 +3175,8 @@ var WidgetsController = /*#__PURE__*/function () {
2983
3175
  purchaseAmount: _purchaseAmount,
2984
3176
  apiData: _this.apiData,
2985
3177
  configPlans: _plans,
2986
- onClose: close
3178
+ onClose: close,
3179
+ cards: _cards
2987
3180
  })), document.querySelector(_container));
2988
3181
  }; // if clickableSelector is provided, add an onClick event handler to open the Modal.
2989
3182