@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
@@ -319,7 +319,7 @@
319
319
 
320
320
  ._MPKjS {
321
321
  padding: 32px 24px;
322
- margin-bottom: 40px;
322
+ margin-bottom: 16px;
323
323
  border-top: 1px solid var(--gray-300);
324
324
  border-bottom: 1px solid var(--gray-300);
325
325
  }
@@ -337,6 +337,13 @@
337
337
  font-size: 18px;
338
338
  }
339
339
 
340
+ ._65ZpD {
341
+ background: var(--gray-200);
342
+ padding: 24px;
343
+ margin: 24px 0px;
344
+ border-radius: 8px;
345
+ }
346
+
340
347
  ._1ZIgu {
341
348
  font-family: 'Eina04', sans-serif;
342
349
  font-weight: 600;
@@ -344,6 +351,10 @@
344
351
  margin-bottom: 24px;
345
352
  }
346
353
 
354
+ ._tUTZp {
355
+ text-align: right;
356
+ }
357
+
347
358
  ._1BUr8 {
348
359
  margin-top: 8px;
349
360
  }
@@ -354,9 +365,20 @@
354
365
  margin: 0;
355
366
  border-bottom: 1px solid transparent;
356
367
  height: 100%;
368
+ max-height: 180px;
357
369
  }
358
370
  }
359
371
 
372
+ ._1N3yO {
373
+ display: flex;
374
+ flex-direction: row;
375
+ width: 100%;
376
+ justify-content: center;
377
+ }
378
+ ._83cGn {
379
+ margin: 8px 10px 0 0;
380
+ }
381
+
360
382
  ._180ro {
361
383
  display: flex;
362
384
  flex-direction: column;
@@ -440,7 +462,6 @@
440
462
  height: 100%;
441
463
  display: flex;
442
464
  flex-direction: column;
443
- justify-content: space-between;
444
465
  width: 100%;
445
466
  }
446
467
 
@@ -1842,7 +1842,7 @@ var messagesDE = {
1842
1842
  "eligibility-modal.title": "<highlighted>Bezahlen Sie in Raten</highlighted> per Kreditkarte mit Alma.",
1843
1843
  "eligibility-modal.title-deferred": "<highlighted>Bezahlen Sie in Raten</highlighted> oder später per Kreditkarte mit Alma.",
1844
1844
  "eligibility-modal.total": "Insgesamt",
1845
- "installments.today": "Heutzutage",
1845
+ "installments.today": "Heute",
1846
1846
  "payment-plan-strings.day-abbreviation": "J{numberOfDeferredDays}",
1847
1847
  "payment-plan-strings.default-message": "Bezahlen Sie in Raten mit Alma",
1848
1848
  "payment-plan-strings.deferred": "{totalAmount} zu zahlen am {dueDate}",
@@ -1885,7 +1885,7 @@ var messagesES = {
1885
1885
  "eligibility-modal.credit-cost": "Coste de crédito (incl. en el total)",
1886
1886
  "eligibility-modal.credit-cost-amount": "{creditCost} (TAE {TAEG})",
1887
1887
  "eligibility-modal.no-eligibility": "Uy, parece que la simulación no ha funcionado.",
1888
- "eligibility-modal.title": "<highlighted>Paga a plazos</highlighted> con tarjeta de crédito con Alma.",
1888
+ "eligibility-modal.title": "<highlighted>Paga a plazos</highlighted> con tu tarjeta, a través de Alma.",
1889
1889
  "eligibility-modal.title-deferred": "<highlighted>Paga a plazos</highlighted> o más adelante con tu tarjeta, a través de Alma.",
1890
1890
  "eligibility-modal.total": "Total",
1891
1891
  "installments.today": "Hoy",
@@ -1931,8 +1931,8 @@ var messagesIT = {
1931
1931
  "eligibility-modal.credit-cost": "Di cui commissioni",
1932
1932
  "eligibility-modal.credit-cost-amount": "{creditCost} (TAEG {TAEG})",
1933
1933
  "eligibility-modal.no-eligibility": "Ops, sembra che la simulazione non abbia funzionato.",
1934
- "eligibility-modal.title": "<highlighted>Paga a rate</highlighted> con carta di credito con Alma.",
1935
- "eligibility-modal.title-deferred": "<highlighted>Paga a rate</highlighted> e posticipa il pagamento con Alma, senza interessi.",
1934
+ "eligibility-modal.title": "<highlighted>Paga a rate</highlighted> con Alma, senza interessi.",
1935
+ "eligibility-modal.title-deferred": "<highlighted>Paga a rate</highlighted> o posticipa il pagamento con Alma, senza interessi.",
1936
1936
  "eligibility-modal.total": "Totale",
1937
1937
  "installments.today": "Oggi",
1938
1938
  "payment-plan-strings.day-abbreviation": "G{numberOfDeferredDays}",
@@ -1973,9 +1973,6 @@ var getTranslationsByLocale = function getTranslationsByLocale(locale) {
1973
1973
  case Locale.fr:
1974
1974
  return messagesFR;
1975
1975
 
1976
- case Locale.en:
1977
- return messagesEN;
1978
-
1979
1976
  case Locale.es:
1980
1977
  return messagesES;
1981
1978
 
@@ -1990,6 +1987,7 @@ var getTranslationsByLocale = function getTranslationsByLocale(locale) {
1990
1987
  case Locale['nl-NL']:
1991
1988
  return messagesNL;
1992
1989
 
1990
+ case Locale.en:
1993
1991
  default:
1994
1992
  return messagesEN;
1995
1993
  }
@@ -2196,7 +2194,9 @@ var STATIC_CUSTOMISATION_CLASSES = {
2196
2194
  closeButton: prefix + '-close-button',
2197
2195
  scheduleDetails: prefix + '-schedule-details',
2198
2196
  scheduleTotal: prefix + '-schedule-total',
2199
- scheduleCredit: prefix + '-schedule-credit'
2197
+ scheduleCredit: prefix + '-schedule-credit',
2198
+ cardContainer: prefix + '-card-logos',
2199
+ summary: prefix + '-summary'
2200
2200
  };
2201
2201
 
2202
2202
  var _excluded = ["children", "isOpen", "onClose", "className", "contentClassName", "scrollable"];
@@ -2213,6 +2213,7 @@ var ControlledModal = function ControlledModal(_ref) {
2213
2213
  scrollable = _ref$scrollable === void 0 ? false : _ref$scrollable,
2214
2214
  props = _objectWithoutPropertiesLoose(_ref, _excluded);
2215
2215
 
2216
+ /* istanbul ignore next */
2216
2217
  Modal.setAppElement('body');
2217
2218
  return /*#__PURE__*/React__default.createElement(Modal, Object.assign({
2218
2219
  className: cx(s$1.modal, className),
@@ -2394,7 +2395,7 @@ var EligibilityPlansButtons = function EligibilityPlansButtons(_ref) {
2394
2395
  }));
2395
2396
  };
2396
2397
 
2397
- var s$3 = {"schedule":"_MPKjS","scheduleLine":"_1A7Qv","total":"_14Ejo","creditCost":"_1ZIgu","creditMessage":"_1BUr8"};
2398
+ var s$3 = {"schedule":"_MPKjS","scheduleLine":"_1A7Qv","total":"_14Ejo","summary":"_65ZpD","creditCost":"_1ZIgu","creditCostAmount":"_tUTZp","creditMessage":"_1BUr8"};
2398
2399
 
2399
2400
  var Schedule = function Schedule(_ref) {
2400
2401
  var currentPlan = _ref.currentPlan;
@@ -2404,9 +2405,29 @@ var Schedule = function Schedule(_ref) {
2404
2405
  var customerFees = priceFromCents(currentPlan ? currentPlan.customer_total_cost_amount : 0);
2405
2406
  var isCredit = currentPlan && currentPlan.installments_count > 4;
2406
2407
  var intl = reactIntl.useIntl();
2407
- return /*#__PURE__*/React__default.createElement("div", {
2408
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
2408
2409
  className: cx(s$3.schedule, STATIC_CUSTOMISATION_CLASSES.scheduleDetails),
2409
2410
  "data-testid": "modal-installments-element"
2411
+ }, ((currentPlan == null ? void 0 : currentPlan.payment_plan) || []).map(function (installment, index) {
2412
+ return /*#__PURE__*/React__default.createElement("div", {
2413
+ className: s$3.scheduleLine,
2414
+ key: index
2415
+ }, /*#__PURE__*/React__default.createElement("span", null, dateFns.isToday(installment.due_date * 1000) ? /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2416
+ id: "installments.today",
2417
+ defaultMessage: "Aujourd'hui"
2418
+ }) : /*#__PURE__*/React__default.createElement(reactIntl.FormattedDate, {
2419
+ value: installment.due_date * 1000,
2420
+ day: "numeric",
2421
+ month: "long",
2422
+ year: "numeric"
2423
+ })), /*#__PURE__*/React__default.createElement("span", null, /*#__PURE__*/React__default.createElement(reactIntl.FormattedNumber, {
2424
+ value: priceFromCents(installment.total_amount),
2425
+ style: "currency",
2426
+ currency: "EUR"
2427
+ })));
2428
+ })), /*#__PURE__*/React__default.createElement("div", {
2429
+ className: cx(s$3.summary, STATIC_CUSTOMISATION_CLASSES.summary),
2430
+ "data-testid": "modal-summary"
2410
2431
  }, /*#__PURE__*/React__default.createElement("div", {
2411
2432
  className: cx(s$3.scheduleLine, s$3.total, STATIC_CUSTOMISATION_CLASSES.scheduleTotal)
2412
2433
  }, /*#__PURE__*/React__default.createElement("span", null, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
@@ -2424,7 +2445,9 @@ var Schedule = function Schedule(_ref) {
2424
2445
  })) : /*#__PURE__*/React__default.createElement("span", null, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2425
2446
  id: "eligibility-modal.cost",
2426
2447
  defaultMessage: "Dont frais"
2427
- })), /*#__PURE__*/React__default.createElement("span", null, isCredit ? /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2448
+ })), /*#__PURE__*/React__default.createElement("span", {
2449
+ className: s$3.creditCostAmount
2450
+ }, isCredit ? /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2428
2451
  id: "eligibility-modal.credit-cost-amount",
2429
2452
  defaultMessage: "{creditCost} (TAEG {TAEG})",
2430
2453
  values: {
@@ -2441,41 +2464,195 @@ var Schedule = function Schedule(_ref) {
2441
2464
  value: customerFees,
2442
2465
  style: "currency",
2443
2466
  currency: "EUR"
2444
- }))), ((currentPlan == null ? void 0 : currentPlan.payment_plan) || []).map(function (installment, index) {
2445
- return /*#__PURE__*/React__default.createElement("div", {
2446
- className: s$3.scheduleLine,
2447
- key: index
2448
- }, /*#__PURE__*/React__default.createElement("span", null, dateFns.isToday(installment.due_date * 1000) ? /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2449
- id: "installments.today",
2450
- defaultMessage: "Aujourd'hui"
2451
- }) : /*#__PURE__*/React__default.createElement(reactIntl.FormattedDate, {
2452
- value: installment.due_date * 1000,
2453
- day: "numeric",
2454
- month: "long",
2455
- year: "numeric"
2456
- })), /*#__PURE__*/React__default.createElement("span", null, /*#__PURE__*/React__default.createElement(reactIntl.FormattedNumber, {
2457
- value: priceFromCents(installment.total_amount),
2458
- style: "currency",
2459
- currency: "EUR"
2460
- })));
2461
- }), isCredit && /*#__PURE__*/React__default.createElement("p", {
2467
+ }))), isCredit && /*#__PURE__*/React__default.createElement("p", {
2462
2468
  className: s$3.creditMessage
2463
2469
  }, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2464
2470
  id: "eligibility-modal.credit-commitment",
2465
2471
  defaultMessage: "Un cr\xE9dit vous engage et doit \xEAtre rembours\xE9. V\xE9rifiez vos capacit\xE9s de remboursement\n avant de vous engager."
2472
+ }))));
2473
+ };
2474
+
2475
+ var AmexCard = function AmexCard() {
2476
+ return /*#__PURE__*/React__default.createElement("svg", {
2477
+ xmlns: "http://www.w3.org/2000/svg",
2478
+ width: "24",
2479
+ height: "16",
2480
+ viewBox: "0 0 24 16"
2481
+ }, /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("linearGradient", {
2482
+ id: "cardamex",
2483
+ x1: "10.914%",
2484
+ x2: "87.432%",
2485
+ y1: "86.279%",
2486
+ y2: "15.035%"
2487
+ }, /*#__PURE__*/React__default.createElement("stop", {
2488
+ offset: "0%",
2489
+ stopColor: "#3FA9F5"
2490
+ }), /*#__PURE__*/React__default.createElement("stop", {
2491
+ offset: "100%",
2492
+ stopColor: "#0071BC"
2493
+ }))), /*#__PURE__*/React__default.createElement("g", {
2494
+ fill: "none",
2495
+ fillRule: "evenodd"
2496
+ }, /*#__PURE__*/React__default.createElement("path", {
2497
+ fill: "url(#cardamex)",
2498
+ fillRule: "nonzero",
2499
+ 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"
2500
+ }), /*#__PURE__*/React__default.createElement("g", {
2501
+ fill: "#FFF"
2502
+ }, /*#__PURE__*/React__default.createElement("path", {
2503
+ 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"
2504
+ }), /*#__PURE__*/React__default.createElement("path", {
2505
+ fillRule: "nonzero",
2506
+ 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"
2507
+ }))));
2508
+ };
2509
+
2510
+ var VisaCard = function VisaCard() {
2511
+ return /*#__PURE__*/React__default.createElement("svg", {
2512
+ xmlns: "http://www.w3.org/2000/svg",
2513
+ width: "24",
2514
+ height: "16",
2515
+ viewBox: "0 0 24 16"
2516
+ }, /*#__PURE__*/React__default.createElement("g", {
2517
+ fill: "none",
2518
+ fillRule: "nonzero"
2519
+ }, /*#__PURE__*/React__default.createElement("path", {
2520
+ fill: "#FCFCFC",
2521
+ 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"
2522
+ }), ' ', /*#__PURE__*/React__default.createElement("path", {
2523
+ fill: "#005098",
2524
+ 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"
2525
+ }), /*#__PURE__*/React__default.createElement("path", {
2526
+ fill: "#F6A500",
2527
+ 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"
2528
+ }), /*#__PURE__*/React__default.createElement("path", {
2529
+ fill: "#0A5296",
2530
+ d: "M23.937 3.23H0V1.316C0 .598.627 0 1.379 0H22.62C23.373 0 24 .598 24 1.316V3.23h-.063z"
2531
+ }), /*#__PURE__*/React__default.createElement("path", {
2532
+ fill: "#F4A428",
2533
+ d: "M.063 13H24v1.8c0 .655-.625 1.2-1.375 1.2H1.375C.625 16 0 15.455 0 14.8V13h.063z"
2466
2534
  })));
2467
2535
  };
2468
2536
 
2469
- var s$4 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
2537
+ var MasterCard = function MasterCard() {
2538
+ return /*#__PURE__*/React__default.createElement("svg", {
2539
+ width: "24px",
2540
+ height: "16px",
2541
+ viewBox: "0 0 24 16",
2542
+ version: "1.1",
2543
+ xmlns: "http://www.w3.org/2000/svg"
2544
+ }, /*#__PURE__*/React__default.createElement("g", {
2545
+ id: "Parcours-1C-B",
2546
+ stroke: "none",
2547
+ strokeWidth: "1",
2548
+ fill: "none",
2549
+ fillRule: "evenodd"
2550
+ }, /*#__PURE__*/React__default.createElement("g", {
2551
+ id: "mobile-1C-Paiement-V1",
2552
+ transform: "translate(-269.000000, -313.000000)"
2553
+ }, /*#__PURE__*/React__default.createElement("g", {
2554
+ id: "mastercard",
2555
+ transform: "translate(269.000000, 313.000000)"
2556
+ }, /*#__PURE__*/React__default.createElement("rect", {
2557
+ id: "Rectangle",
2558
+ fill: "#FFFFFF",
2559
+ x: "0",
2560
+ y: "0",
2561
+ width: "24",
2562
+ height: "16",
2563
+ rx: "1"
2564
+ }), /*#__PURE__*/React__default.createElement("g", {
2565
+ id: "Group-6",
2566
+ transform: "translate(4.000000, 3.000000)"
2567
+ }, /*#__PURE__*/React__default.createElement("circle", {
2568
+ id: "Oval-4-Copy",
2569
+ fill: "#EA001B",
2570
+ cx: "5.05263158",
2571
+ cy: "5.05263158",
2572
+ r: "5.05263158"
2573
+ }), /*#__PURE__*/React__default.createElement("circle", {
2574
+ id: "Oval-4",
2575
+ fillOpacity: "0.25",
2576
+ fill: "#F79F1A",
2577
+ cx: "10.9473684",
2578
+ cy: "5.05263158",
2579
+ r: "5.05263158"
2580
+ }), /*#__PURE__*/React__default.createElement("circle", {
2581
+ id: "Oval-4-Copy-2",
2582
+ fillOpacity: "0.9",
2583
+ fill: "#F79F1A",
2584
+ cx: "10.9473684",
2585
+ cy: "5.05263158",
2586
+ r: "5.05263158"
2587
+ }), /*#__PURE__*/React__default.createElement("circle", {
2588
+ id: "Oval-4-Copy-3",
2589
+ fillOpacity: "0.3",
2590
+ fill: "#EA001B",
2591
+ cx: "5.05263158",
2592
+ cy: "5.05263158",
2593
+ r: "5.05263158"
2594
+ }))))));
2595
+ };
2596
+
2597
+ var CbCard = function CbCard() {
2598
+ return /*#__PURE__*/React__default.createElement("svg", {
2599
+ xmlns: "http://www.w3.org/2000/svg",
2600
+ width: "24",
2601
+ height: "16",
2602
+ viewBox: "0 0 24 16"
2603
+ }, /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("linearGradient", {
2604
+ id: "cardcb",
2605
+ x1: "5.842%",
2606
+ x2: "95.393%",
2607
+ y1: "81.753%",
2608
+ y2: "17.344%"
2609
+ }, /*#__PURE__*/React__default.createElement("stop", {
2610
+ offset: "0%",
2611
+ stopColor: "#39B54A"
2612
+ }), ' ', /*#__PURE__*/React__default.createElement("stop", {
2613
+ offset: "100%",
2614
+ stopColor: "#0A5296"
2615
+ }))), /*#__PURE__*/React__default.createElement("g", {
2616
+ fill: "none",
2617
+ fillRule: "nonzero"
2618
+ }, /*#__PURE__*/React__default.createElement("path", {
2619
+ fill: "url(#cardcb)",
2620
+ 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"
2621
+ }), /*#__PURE__*/React__default.createElement("g", {
2622
+ fill: "#FFF"
2623
+ }, /*#__PURE__*/React__default.createElement("path", {
2624
+ 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"
2625
+ }))));
2626
+ };
2627
+
2628
+ var s$4 = {"cardContainer":"_1N3yO","card":"_83cGn"};
2629
+
2630
+ var Cards = function Cards(_ref) {
2631
+ var cards = _ref.cards;
2632
+ // We transform to a Set and back to avoid duplicate values (ex : amex, amex)
2633
+ var uniqueCards = Array.from(new Set(cards));
2634
+ return /*#__PURE__*/React__default.createElement("div", {
2635
+ "data-testid": "card-logos",
2636
+ className: cx(s$4.cardContainer, STATIC_CUSTOMISATION_CLASSES.cardContainer)
2637
+ }, uniqueCards.map(function (card) {
2638
+ return /*#__PURE__*/React__default.createElement("div", {
2639
+ key: card,
2640
+ className: s$4.card,
2641
+ "data-testid": "card-logo-" + card
2642
+ }, card === 'cb' && /*#__PURE__*/React__default.createElement(CbCard, null), card === 'amex' && /*#__PURE__*/React__default.createElement(AmexCard, null), card === 'mastercard' && /*#__PURE__*/React__default.createElement(MasterCard, null), card === 'visa' && /*#__PURE__*/React__default.createElement(VisaCard, null));
2643
+ }));
2644
+ };
2645
+
2646
+ var s$5 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
2470
2647
 
2471
2648
  var Info = function Info() {
2472
2649
  return /*#__PURE__*/React__default.createElement("div", {
2473
- className: cx(s$4.list, STATIC_CUSTOMISATION_CLASSES.info),
2650
+ className: cx(s$5.list, STATIC_CUSTOMISATION_CLASSES.info),
2474
2651
  "data-testid": "modal-info-element"
2475
2652
  }, /*#__PURE__*/React__default.createElement("div", {
2476
- className: s$4.listItem
2653
+ className: s$5.listItem
2477
2654
  }, /*#__PURE__*/React__default.createElement("div", {
2478
- className: s$4.bullet
2655
+ className: s$5.bullet
2479
2656
  }, "1"), /*#__PURE__*/React__default.createElement("div", {
2480
2657
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2481
2658
  }, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
@@ -2487,9 +2664,9 @@ var Info = function Info() {
2487
2664
  }
2488
2665
  }
2489
2666
  }))), /*#__PURE__*/React__default.createElement("div", {
2490
- className: s$4.listItem
2667
+ className: s$5.listItem
2491
2668
  }, /*#__PURE__*/React__default.createElement("div", {
2492
- className: s$4.bullet
2669
+ className: s$5.bullet
2493
2670
  }, "2"), /*#__PURE__*/React__default.createElement("div", {
2494
2671
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2495
2672
  }, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
@@ -2501,9 +2678,9 @@ var Info = function Info() {
2501
2678
  }
2502
2679
  }
2503
2680
  }))), /*#__PURE__*/React__default.createElement("div", {
2504
- className: s$4.listItem
2681
+ className: s$5.listItem
2505
2682
  }, /*#__PURE__*/React__default.createElement("div", {
2506
- className: s$4.bullet
2683
+ className: s$5.bullet
2507
2684
  }, "3"), /*#__PURE__*/React__default.createElement("div", {
2508
2685
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2509
2686
  }, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
@@ -2550,22 +2727,22 @@ function LogoIcon(_ref) {
2550
2727
  }));
2551
2728
  }
2552
2729
 
2553
- var s$5 = {"logo":"_3Oyv_"};
2730
+ var s$6 = {"logo":"_3Oyv_"};
2554
2731
 
2555
2732
  var Logo = function Logo() {
2556
2733
  return /*#__PURE__*/React__default.createElement("div", {
2557
- className: s$5.logo
2734
+ className: s$6.logo
2558
2735
  }, /*#__PURE__*/React__default.createElement(LogoIcon, {
2559
2736
  underlineColor: "#FF414D"
2560
2737
  }));
2561
2738
  };
2562
2739
 
2563
- var s$6 = {"title":"_3ERx-"};
2740
+ var s$7 = {"title":"_3ERx-"};
2564
2741
 
2565
2742
  var Title = function Title(_ref) {
2566
2743
  var isSomePlanDeferred = _ref.isSomePlanDeferred;
2567
2744
  return /*#__PURE__*/React__default.createElement("div", {
2568
- className: cx(s$6.title, STATIC_CUSTOMISATION_CLASSES.title),
2745
+ className: cx(s$7.title, STATIC_CUSTOMISATION_CLASSES.title),
2569
2746
  "data-testid": "modal-title-element"
2570
2747
  }, isSomePlanDeferred ? /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2571
2748
  id: 'eligibility-modal.title-deferred',
@@ -2586,43 +2763,50 @@ var Title = function Title(_ref) {
2586
2763
  }));
2587
2764
  };
2588
2765
 
2589
- var s$7 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC"};
2766
+ var s$8 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC"};
2590
2767
 
2591
2768
  var DesktopModal = function DesktopModal(_ref) {
2592
2769
  var children = _ref.children,
2593
- isSomePlanDeferred = _ref.isSomePlanDeferred;
2770
+ isSomePlanDeferred = _ref.isSomePlanDeferred,
2771
+ cards = _ref.cards;
2594
2772
  return /*#__PURE__*/React__default.createElement("div", {
2595
- className: s$7.container,
2773
+ className: s$8.container,
2596
2774
  "data-testid": "modal-container"
2597
2775
  }, /*#__PURE__*/React__default.createElement("div", {
2598
- className: cx([s$7.block, s$7.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
2776
+ className: cx([s$8.block, s$8.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
2599
2777
  }, /*#__PURE__*/React__default.createElement(Title, {
2600
2778
  isSomePlanDeferred: isSomePlanDeferred
2601
- }), /*#__PURE__*/React__default.createElement(Info, null), /*#__PURE__*/React__default.createElement(Logo, null)), /*#__PURE__*/React__default.createElement("div", {
2602
- className: cx(s$7.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
2779
+ }), /*#__PURE__*/React__default.createElement(Info, null), cards && /*#__PURE__*/React__default.createElement(Cards, {
2780
+ cards: cards
2781
+ }), /*#__PURE__*/React__default.createElement(Logo, null)), /*#__PURE__*/React__default.createElement("div", {
2782
+ className: cx(s$8.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
2603
2783
  }, children));
2604
2784
  };
2605
2785
 
2606
- var s$8 = {"noEligibility":"_17qNJ","loader":"_2oTJq"};
2786
+ var s$9 = {"noEligibility":"_17qNJ","loader":"_2oTJq"};
2607
2787
 
2608
- var s$9 = {"container":"_2G7Ch"};
2788
+ var s$a = {"container":"_2G7Ch"};
2609
2789
 
2610
2790
  var MobileModal = function MobileModal(_ref) {
2611
2791
  var children = _ref.children,
2612
- isSomePlanDeferred = _ref.isSomePlanDeferred;
2792
+ isSomePlanDeferred = _ref.isSomePlanDeferred,
2793
+ cards = _ref.cards;
2613
2794
  return /*#__PURE__*/React__default.createElement("div", {
2614
- className: s$9.container,
2795
+ className: s$a.container,
2615
2796
  "data-testid": "modal-container"
2616
2797
  }, /*#__PURE__*/React__default.createElement(Title, {
2617
2798
  isSomePlanDeferred: isSomePlanDeferred
2618
- }), children, /*#__PURE__*/React__default.createElement(Info, null), /*#__PURE__*/React__default.createElement(Logo, null));
2799
+ }), children, /*#__PURE__*/React__default.createElement(Info, null), cards && /*#__PURE__*/React__default.createElement(Cards, {
2800
+ cards: cards
2801
+ }), /*#__PURE__*/React__default.createElement(Logo, null));
2619
2802
  };
2620
2803
 
2621
2804
  var EligibilityModal = function EligibilityModal(_ref) {
2622
2805
  var initialPlanIndex = _ref.initialPlanIndex,
2623
2806
  onClose = _ref.onClose,
2624
2807
  eligibilityPlans = _ref.eligibilityPlans,
2625
- status = _ref.status;
2808
+ status = _ref.status,
2809
+ cards = _ref.cards;
2626
2810
 
2627
2811
  var _useState = React.useState(initialPlanIndex || 0),
2628
2812
  currentPlanIndex = _useState[0],
@@ -2645,11 +2829,12 @@ var EligibilityModal = function EligibilityModal(_ref) {
2645
2829
  scrollable: true,
2646
2830
  isOpen: true
2647
2831
  }, /*#__PURE__*/React__default.createElement(ModalComponent, {
2648
- isSomePlanDeferred: isSomePlanDeferred
2832
+ isSomePlanDeferred: isSomePlanDeferred,
2833
+ cards: cards
2649
2834
  }, status === apiStatus.PENDING && /*#__PURE__*/React__default.createElement("div", {
2650
- className: s$8.loader
2835
+ className: s$9.loader
2651
2836
  }, /*#__PURE__*/React__default.createElement(LoadingIndicator, null)), status === apiStatus.SUCCESS && eligiblePlans.length === 0 && /*#__PURE__*/React__default.createElement("div", {
2652
- className: s$8.noEligibility
2837
+ className: s$9.noEligibility
2653
2838
  }, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2654
2839
  id: "eligibility-modal.no-eligibility",
2655
2840
  defaultMessage: "Oups, il semblerait que la simulation n'ait pas fonctionn\xE9."
@@ -2670,7 +2855,8 @@ var ModalContainer = function ModalContainer(_ref) {
2670
2855
  var purchaseAmount = _ref.purchaseAmount,
2671
2856
  apiData = _ref.apiData,
2672
2857
  configPlans = _ref.configPlans,
2673
- onClose = _ref.onClose;
2858
+ onClose = _ref.onClose,
2859
+ cards = _ref.cards;
2674
2860
 
2675
2861
  var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
2676
2862
  eligibilityPlans = _useFetchEligibility[0],
@@ -2680,21 +2866,22 @@ var ModalContainer = function ModalContainer(_ref) {
2680
2866
  initialPlanIndex: 0,
2681
2867
  onClose: onClose,
2682
2868
  eligibilityPlans: eligibilityPlans,
2683
- status: status
2869
+ status: status,
2870
+ cards: cards
2684
2871
  });
2685
2872
  };
2686
2873
 
2687
- var s$a = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
2874
+ var s$b = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
2688
2875
 
2689
2876
  var Loader = function Loader(_ref) {
2690
2877
  var className = _ref.className;
2691
2878
  return /*#__PURE__*/React__default.createElement("div", {
2692
- className: cx(s$a.loadingIndicator, className),
2879
+ className: cx(s$b.loadingIndicator, className),
2693
2880
  "data-testid": "loader"
2694
2881
  }, /*#__PURE__*/React__default.createElement("div", {
2695
- className: s$a.line1
2882
+ className: s$b.line1
2696
2883
  }), /*#__PURE__*/React__default.createElement("div", {
2697
- className: s$a.line2
2884
+ className: s$b.line2
2698
2885
  }));
2699
2886
  };
2700
2887
 
@@ -2787,7 +2974,7 @@ var STATIC_CUSTOMISATION_CLASSES$1 = {
2787
2974
  activeOption: prefix$1 + '-active-option'
2788
2975
  };
2789
2976
 
2790
- 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"};
2977
+ 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"};
2791
2978
 
2792
2979
  var VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
2793
2980
  var DEFAULT_TRANSITION_TIME = 5500;
@@ -2800,7 +2987,8 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
2800
2987
  configPlans = _ref.configPlans,
2801
2988
  transitionDelay = _ref.transitionDelay,
2802
2989
  hideIfNotEligible = _ref.hideIfNotEligible,
2803
- suggestedPaymentPlan = _ref.suggestedPaymentPlan;
2990
+ suggestedPaymentPlan = _ref.suggestedPaymentPlan,
2991
+ cards = _ref.cards;
2804
2992
 
2805
2993
  var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
2806
2994
  eligibilityPlans = _useFetchEligibility[0],
@@ -2880,7 +3068,7 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
2880
3068
 
2881
3069
  if (status === apiStatus.PENDING) {
2882
3070
  return /*#__PURE__*/React__default.createElement("div", {
2883
- className: cx(s$b.widgetButton, s$b.pending)
3071
+ className: cx(s$c.widgetButton, s$c.pending)
2884
3072
  }, /*#__PURE__*/React__default.createElement(Loader, null));
2885
3073
  }
2886
3074
 
@@ -2898,14 +3086,14 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
2898
3086
 
2899
3087
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
2900
3088
  onClick: handleOpenModal,
2901
- 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),
3089
+ 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),
2902
3090
  "data-testid": "widget-button"
2903
3091
  }, /*#__PURE__*/React__default.createElement("div", {
2904
- className: cx(s$b.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
3092
+ className: cx(s$c.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
2905
3093
  }, /*#__PURE__*/React__default.createElement(LogoIcon, {
2906
- className: s$b.logo
3094
+ className: s$c.logo
2907
3095
  }), /*#__PURE__*/React__default.createElement("div", {
2908
- className: cx(s$b.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
3096
+ className: cx(s$c.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
2909
3097
  }, eligibilityPlans.map(function (eligibilityPlan, key) {
2910
3098
  var _cx2;
2911
3099
 
@@ -2915,15 +3103,16 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
2915
3103
  return onHover(key);
2916
3104
  },
2917
3105
  onMouseOut: onLeave,
2918
- 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))
3106
+ 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))
2919
3107
  }, paymentPlanShorthandName(eligibilityPlan));
2920
3108
  }))), /*#__PURE__*/React__default.createElement("div", {
2921
- 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)
3109
+ 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)
2922
3110
  }, eligibilityPlans.length !== 0 && paymentPlanInfoText(eligibilityPlans[current]))), isOpen && /*#__PURE__*/React__default.createElement(EligibilityModal, {
2923
3111
  initialPlanIndex: getIndexWithinEligiblePlans(current),
2924
3112
  onClose: closeModal,
2925
3113
  eligibilityPlans: eligiblePlans,
2926
- status: status
3114
+ status: status,
3115
+ cards: cards
2927
3116
  }));
2928
3117
  };
2929
3118
 
@@ -2951,7 +3140,8 @@ var WidgetsController = /*#__PURE__*/function () {
2951
3140
  hideIfNotEligible = options.hideIfNotEligible,
2952
3141
  suggestedPaymentPlan = options.suggestedPaymentPlan,
2953
3142
  _options$locale = options.locale,
2954
- locale = _options$locale === void 0 ? Locale.en : _options$locale;
3143
+ locale = _options$locale === void 0 ? Locale.en : _options$locale,
3144
+ cards = options.cards;
2955
3145
 
2956
3146
  if (containerDiv) {
2957
3147
  reactDom.render( /*#__PURE__*/React__default.createElement(Provider, {
@@ -2962,7 +3152,8 @@ var WidgetsController = /*#__PURE__*/function () {
2962
3152
  configPlans: plans,
2963
3153
  transitionDelay: transitionDelay,
2964
3154
  hideIfNotEligible: hideIfNotEligible,
2965
- suggestedPaymentPlan: suggestedPaymentPlan
3155
+ suggestedPaymentPlan: suggestedPaymentPlan,
3156
+ cards: cards
2966
3157
  })), document.querySelector(container));
2967
3158
  }
2968
3159
  }
@@ -2973,7 +3164,8 @@ var WidgetsController = /*#__PURE__*/function () {
2973
3164
  _purchaseAmount = options.purchaseAmount,
2974
3165
  _plans = options.plans,
2975
3166
  _options$locale2 = options.locale,
2976
- _locale = _options$locale2 === void 0 ? Locale.en : _options$locale2;
3167
+ _locale = _options$locale2 === void 0 ? Locale.en : _options$locale2,
3168
+ _cards = options.cards;
2977
3169
 
2978
3170
  var close = function close() {
2979
3171
  return containerDiv && reactDom.unmountComponentAtNode(containerDiv);
@@ -2986,7 +3178,8 @@ var WidgetsController = /*#__PURE__*/function () {
2986
3178
  purchaseAmount: _purchaseAmount,
2987
3179
  apiData: _this.apiData,
2988
3180
  configPlans: _plans,
2989
- onClose: close
3181
+ onClose: close,
3182
+ cards: _cards
2990
3183
  })), document.querySelector(_container));
2991
3184
  }; // if clickableSelector is provided, add an onClick event handler to open the Modal.
2992
3185