@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
@@ -6296,7 +6296,7 @@
6296
6296
  "eligibility-modal.title": "<highlighted>Bezahlen Sie in Raten</highlighted> per Kreditkarte mit Alma.",
6297
6297
  "eligibility-modal.title-deferred": "<highlighted>Bezahlen Sie in Raten</highlighted> oder später per Kreditkarte mit Alma.",
6298
6298
  "eligibility-modal.total": "Insgesamt",
6299
- "installments.today": "Heutzutage",
6299
+ "installments.today": "Heute",
6300
6300
  "payment-plan-strings.day-abbreviation": "J{numberOfDeferredDays}",
6301
6301
  "payment-plan-strings.default-message": "Bezahlen Sie in Raten mit Alma",
6302
6302
  "payment-plan-strings.deferred": "{totalAmount} zu zahlen am {dueDate}",
@@ -6339,7 +6339,7 @@
6339
6339
  "eligibility-modal.credit-cost": "Coste de crédito (incl. en el total)",
6340
6340
  "eligibility-modal.credit-cost-amount": "{creditCost} (TAE {TAEG})",
6341
6341
  "eligibility-modal.no-eligibility": "Uy, parece que la simulación no ha funcionado.",
6342
- "eligibility-modal.title": "<highlighted>Paga a plazos</highlighted> con tarjeta de crédito con Alma.",
6342
+ "eligibility-modal.title": "<highlighted>Paga a plazos</highlighted> con tu tarjeta, a través de Alma.",
6343
6343
  "eligibility-modal.title-deferred": "<highlighted>Paga a plazos</highlighted> o más adelante con tu tarjeta, a través de Alma.",
6344
6344
  "eligibility-modal.total": "Total",
6345
6345
  "installments.today": "Hoy",
@@ -6385,8 +6385,8 @@
6385
6385
  "eligibility-modal.credit-cost": "Di cui commissioni",
6386
6386
  "eligibility-modal.credit-cost-amount": "{creditCost} (TAEG {TAEG})",
6387
6387
  "eligibility-modal.no-eligibility": "Ops, sembra che la simulazione non abbia funzionato.",
6388
- "eligibility-modal.title": "<highlighted>Paga a rate</highlighted> con carta di credito con Alma.",
6389
- "eligibility-modal.title-deferred": "<highlighted>Paga a rate</highlighted> e posticipa il pagamento con Alma, senza interessi.",
6388
+ "eligibility-modal.title": "<highlighted>Paga a rate</highlighted> con Alma, senza interessi.",
6389
+ "eligibility-modal.title-deferred": "<highlighted>Paga a rate</highlighted> o posticipa il pagamento con Alma, senza interessi.",
6390
6390
  "eligibility-modal.total": "Totale",
6391
6391
  "installments.today": "Oggi",
6392
6392
  "payment-plan-strings.day-abbreviation": "G{numberOfDeferredDays}",
@@ -6427,9 +6427,6 @@
6427
6427
  case Locale.fr:
6428
6428
  return messagesFR;
6429
6429
 
6430
- case Locale.en:
6431
- return messagesEN;
6432
-
6433
6430
  case Locale.es:
6434
6431
  return messagesES;
6435
6432
 
@@ -6444,6 +6441,7 @@
6444
6441
  case Locale['nl-NL']:
6445
6442
  return messagesNL;
6446
6443
 
6444
+ case Locale.en:
6447
6445
  default:
6448
6446
  return messagesEN;
6449
6447
  }
@@ -16780,7 +16778,9 @@
16780
16778
  closeButton: prefix + '-close-button',
16781
16779
  scheduleDetails: prefix + '-schedule-details',
16782
16780
  scheduleTotal: prefix + '-schedule-total',
16783
- scheduleCredit: prefix + '-schedule-credit'
16781
+ scheduleCredit: prefix + '-schedule-credit',
16782
+ cardContainer: prefix + '-card-logos',
16783
+ summary: prefix + '-summary'
16784
16784
  };
16785
16785
 
16786
16786
  var _excluded = ["children", "isOpen", "onClose", "className", "contentClassName", "scrollable"];
@@ -16797,6 +16797,7 @@
16797
16797
  scrollable = _ref$scrollable === void 0 ? false : _ref$scrollable,
16798
16798
  props = _objectWithoutPropertiesLoose(_ref, _excluded);
16799
16799
 
16800
+ /* istanbul ignore next */
16800
16801
  Modal.setAppElement('body');
16801
16802
  return /*#__PURE__*/react.createElement(Modal, Object.assign({
16802
16803
  className: classnames(s$1.modal, className),
@@ -18322,7 +18323,7 @@
18322
18323
  }));
18323
18324
  };
18324
18325
 
18325
- var s$3 = {"schedule":"_MPKjS","scheduleLine":"_1A7Qv","total":"_14Ejo","creditCost":"_1ZIgu","creditMessage":"_1BUr8"};
18326
+ var s$3 = {"schedule":"_MPKjS","scheduleLine":"_1A7Qv","total":"_14Ejo","summary":"_65ZpD","creditCost":"_1ZIgu","creditCostAmount":"_tUTZp","creditMessage":"_1BUr8"};
18326
18327
 
18327
18328
  var Schedule = function Schedule(_ref) {
18328
18329
  var currentPlan = _ref.currentPlan;
@@ -18332,9 +18333,29 @@
18332
18333
  var customerFees = priceFromCents(currentPlan ? currentPlan.customer_total_cost_amount : 0);
18333
18334
  var isCredit = currentPlan && currentPlan.installments_count > 4;
18334
18335
  var intl = useIntl();
18335
- return /*#__PURE__*/react.createElement("div", {
18336
+ return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
18336
18337
  className: classnames(s$3.schedule, STATIC_CUSTOMISATION_CLASSES.scheduleDetails),
18337
18338
  "data-testid": "modal-installments-element"
18339
+ }, ((currentPlan == null ? void 0 : currentPlan.payment_plan) || []).map(function (installment, index) {
18340
+ return /*#__PURE__*/react.createElement("div", {
18341
+ className: s$3.scheduleLine,
18342
+ key: index
18343
+ }, /*#__PURE__*/react.createElement("span", null, isToday(installment.due_date * 1000) ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
18344
+ id: "installments.today",
18345
+ defaultMessage: "Aujourd'hui"
18346
+ }) : /*#__PURE__*/react.createElement(FormattedDate, {
18347
+ value: installment.due_date * 1000,
18348
+ day: "numeric",
18349
+ month: "long",
18350
+ year: "numeric"
18351
+ })), /*#__PURE__*/react.createElement("span", null, /*#__PURE__*/react.createElement(FormattedNumber, {
18352
+ value: priceFromCents(installment.total_amount),
18353
+ style: "currency",
18354
+ currency: "EUR"
18355
+ })));
18356
+ })), /*#__PURE__*/react.createElement("div", {
18357
+ className: classnames(s$3.summary, STATIC_CUSTOMISATION_CLASSES.summary),
18358
+ "data-testid": "modal-summary"
18338
18359
  }, /*#__PURE__*/react.createElement("div", {
18339
18360
  className: classnames(s$3.scheduleLine, s$3.total, STATIC_CUSTOMISATION_CLASSES.scheduleTotal)
18340
18361
  }, /*#__PURE__*/react.createElement("span", null, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
@@ -18352,7 +18373,9 @@
18352
18373
  })) : /*#__PURE__*/react.createElement("span", null, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
18353
18374
  id: "eligibility-modal.cost",
18354
18375
  defaultMessage: "Dont frais"
18355
- })), /*#__PURE__*/react.createElement("span", null, isCredit ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
18376
+ })), /*#__PURE__*/react.createElement("span", {
18377
+ className: s$3.creditCostAmount
18378
+ }, isCredit ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
18356
18379
  id: "eligibility-modal.credit-cost-amount",
18357
18380
  defaultMessage: "{creditCost} (TAEG {TAEG})",
18358
18381
  values: {
@@ -18369,41 +18392,195 @@
18369
18392
  value: customerFees,
18370
18393
  style: "currency",
18371
18394
  currency: "EUR"
18372
- }))), ((currentPlan == null ? void 0 : currentPlan.payment_plan) || []).map(function (installment, index) {
18373
- return /*#__PURE__*/react.createElement("div", {
18374
- className: s$3.scheduleLine,
18375
- key: index
18376
- }, /*#__PURE__*/react.createElement("span", null, isToday(installment.due_date * 1000) ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
18377
- id: "installments.today",
18378
- defaultMessage: "Aujourd'hui"
18379
- }) : /*#__PURE__*/react.createElement(FormattedDate, {
18380
- value: installment.due_date * 1000,
18381
- day: "numeric",
18382
- month: "long",
18383
- year: "numeric"
18384
- })), /*#__PURE__*/react.createElement("span", null, /*#__PURE__*/react.createElement(FormattedNumber, {
18385
- value: priceFromCents(installment.total_amount),
18386
- style: "currency",
18387
- currency: "EUR"
18388
- })));
18389
- }), isCredit && /*#__PURE__*/react.createElement("p", {
18395
+ }))), isCredit && /*#__PURE__*/react.createElement("p", {
18390
18396
  className: s$3.creditMessage
18391
18397
  }, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
18392
18398
  id: "eligibility-modal.credit-commitment",
18393
18399
  defaultMessage: "Un cr\xE9dit vous engage et doit \xEAtre rembours\xE9. V\xE9rifiez vos capacit\xE9s de remboursement\n avant de vous engager."
18400
+ }))));
18401
+ };
18402
+
18403
+ var AmexCard = function AmexCard() {
18404
+ return /*#__PURE__*/react.createElement("svg", {
18405
+ xmlns: "http://www.w3.org/2000/svg",
18406
+ width: "24",
18407
+ height: "16",
18408
+ viewBox: "0 0 24 16"
18409
+ }, /*#__PURE__*/react.createElement("defs", null, /*#__PURE__*/react.createElement("linearGradient", {
18410
+ id: "cardamex",
18411
+ x1: "10.914%",
18412
+ x2: "87.432%",
18413
+ y1: "86.279%",
18414
+ y2: "15.035%"
18415
+ }, /*#__PURE__*/react.createElement("stop", {
18416
+ offset: "0%",
18417
+ stopColor: "#3FA9F5"
18418
+ }), /*#__PURE__*/react.createElement("stop", {
18419
+ offset: "100%",
18420
+ stopColor: "#0071BC"
18421
+ }))), /*#__PURE__*/react.createElement("g", {
18422
+ fill: "none",
18423
+ fillRule: "evenodd"
18424
+ }, /*#__PURE__*/react.createElement("path", {
18425
+ fill: "url(#cardamex)",
18426
+ fillRule: "nonzero",
18427
+ 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"
18428
+ }), /*#__PURE__*/react.createElement("g", {
18429
+ fill: "#FFF"
18430
+ }, /*#__PURE__*/react.createElement("path", {
18431
+ 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"
18432
+ }), /*#__PURE__*/react.createElement("path", {
18433
+ fillRule: "nonzero",
18434
+ 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"
18435
+ }))));
18436
+ };
18437
+
18438
+ var VisaCard = function VisaCard() {
18439
+ return /*#__PURE__*/react.createElement("svg", {
18440
+ xmlns: "http://www.w3.org/2000/svg",
18441
+ width: "24",
18442
+ height: "16",
18443
+ viewBox: "0 0 24 16"
18444
+ }, /*#__PURE__*/react.createElement("g", {
18445
+ fill: "none",
18446
+ fillRule: "nonzero"
18447
+ }, /*#__PURE__*/react.createElement("path", {
18448
+ fill: "#FCFCFC",
18449
+ 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"
18450
+ }), ' ', /*#__PURE__*/react.createElement("path", {
18451
+ fill: "#005098",
18452
+ 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"
18453
+ }), /*#__PURE__*/react.createElement("path", {
18454
+ fill: "#F6A500",
18455
+ 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"
18456
+ }), /*#__PURE__*/react.createElement("path", {
18457
+ fill: "#0A5296",
18458
+ d: "M23.937 3.23H0V1.316C0 .598.627 0 1.379 0H22.62C23.373 0 24 .598 24 1.316V3.23h-.063z"
18459
+ }), /*#__PURE__*/react.createElement("path", {
18460
+ fill: "#F4A428",
18461
+ d: "M.063 13H24v1.8c0 .655-.625 1.2-1.375 1.2H1.375C.625 16 0 15.455 0 14.8V13h.063z"
18394
18462
  })));
18395
18463
  };
18396
18464
 
18397
- var s$4 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
18465
+ var MasterCard = function MasterCard() {
18466
+ return /*#__PURE__*/react.createElement("svg", {
18467
+ width: "24px",
18468
+ height: "16px",
18469
+ viewBox: "0 0 24 16",
18470
+ version: "1.1",
18471
+ xmlns: "http://www.w3.org/2000/svg"
18472
+ }, /*#__PURE__*/react.createElement("g", {
18473
+ id: "Parcours-1C-B",
18474
+ stroke: "none",
18475
+ strokeWidth: "1",
18476
+ fill: "none",
18477
+ fillRule: "evenodd"
18478
+ }, /*#__PURE__*/react.createElement("g", {
18479
+ id: "mobile-1C-Paiement-V1",
18480
+ transform: "translate(-269.000000, -313.000000)"
18481
+ }, /*#__PURE__*/react.createElement("g", {
18482
+ id: "mastercard",
18483
+ transform: "translate(269.000000, 313.000000)"
18484
+ }, /*#__PURE__*/react.createElement("rect", {
18485
+ id: "Rectangle",
18486
+ fill: "#FFFFFF",
18487
+ x: "0",
18488
+ y: "0",
18489
+ width: "24",
18490
+ height: "16",
18491
+ rx: "1"
18492
+ }), /*#__PURE__*/react.createElement("g", {
18493
+ id: "Group-6",
18494
+ transform: "translate(4.000000, 3.000000)"
18495
+ }, /*#__PURE__*/react.createElement("circle", {
18496
+ id: "Oval-4-Copy",
18497
+ fill: "#EA001B",
18498
+ cx: "5.05263158",
18499
+ cy: "5.05263158",
18500
+ r: "5.05263158"
18501
+ }), /*#__PURE__*/react.createElement("circle", {
18502
+ id: "Oval-4",
18503
+ fillOpacity: "0.25",
18504
+ fill: "#F79F1A",
18505
+ cx: "10.9473684",
18506
+ cy: "5.05263158",
18507
+ r: "5.05263158"
18508
+ }), /*#__PURE__*/react.createElement("circle", {
18509
+ id: "Oval-4-Copy-2",
18510
+ fillOpacity: "0.9",
18511
+ fill: "#F79F1A",
18512
+ cx: "10.9473684",
18513
+ cy: "5.05263158",
18514
+ r: "5.05263158"
18515
+ }), /*#__PURE__*/react.createElement("circle", {
18516
+ id: "Oval-4-Copy-3",
18517
+ fillOpacity: "0.3",
18518
+ fill: "#EA001B",
18519
+ cx: "5.05263158",
18520
+ cy: "5.05263158",
18521
+ r: "5.05263158"
18522
+ }))))));
18523
+ };
18524
+
18525
+ var CbCard = function CbCard() {
18526
+ return /*#__PURE__*/react.createElement("svg", {
18527
+ xmlns: "http://www.w3.org/2000/svg",
18528
+ width: "24",
18529
+ height: "16",
18530
+ viewBox: "0 0 24 16"
18531
+ }, /*#__PURE__*/react.createElement("defs", null, /*#__PURE__*/react.createElement("linearGradient", {
18532
+ id: "cardcb",
18533
+ x1: "5.842%",
18534
+ x2: "95.393%",
18535
+ y1: "81.753%",
18536
+ y2: "17.344%"
18537
+ }, /*#__PURE__*/react.createElement("stop", {
18538
+ offset: "0%",
18539
+ stopColor: "#39B54A"
18540
+ }), ' ', /*#__PURE__*/react.createElement("stop", {
18541
+ offset: "100%",
18542
+ stopColor: "#0A5296"
18543
+ }))), /*#__PURE__*/react.createElement("g", {
18544
+ fill: "none",
18545
+ fillRule: "nonzero"
18546
+ }, /*#__PURE__*/react.createElement("path", {
18547
+ fill: "url(#cardcb)",
18548
+ 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"
18549
+ }), /*#__PURE__*/react.createElement("g", {
18550
+ fill: "#FFF"
18551
+ }, /*#__PURE__*/react.createElement("path", {
18552
+ 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"
18553
+ }))));
18554
+ };
18555
+
18556
+ var s$4 = {"cardContainer":"_1N3yO","card":"_83cGn"};
18557
+
18558
+ var Cards = function Cards(_ref) {
18559
+ var cards = _ref.cards;
18560
+ // We transform to a Set and back to avoid duplicate values (ex : amex, amex)
18561
+ var uniqueCards = Array.from(new Set(cards));
18562
+ return /*#__PURE__*/react.createElement("div", {
18563
+ "data-testid": "card-logos",
18564
+ className: classnames(s$4.cardContainer, STATIC_CUSTOMISATION_CLASSES.cardContainer)
18565
+ }, uniqueCards.map(function (card) {
18566
+ return /*#__PURE__*/react.createElement("div", {
18567
+ key: card,
18568
+ className: s$4.card,
18569
+ "data-testid": "card-logo-" + card
18570
+ }, 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));
18571
+ }));
18572
+ };
18573
+
18574
+ var s$5 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
18398
18575
 
18399
18576
  var Info = function Info() {
18400
18577
  return /*#__PURE__*/react.createElement("div", {
18401
- className: classnames(s$4.list, STATIC_CUSTOMISATION_CLASSES.info),
18578
+ className: classnames(s$5.list, STATIC_CUSTOMISATION_CLASSES.info),
18402
18579
  "data-testid": "modal-info-element"
18403
18580
  }, /*#__PURE__*/react.createElement("div", {
18404
- className: s$4.listItem
18581
+ className: s$5.listItem
18405
18582
  }, /*#__PURE__*/react.createElement("div", {
18406
- className: s$4.bullet
18583
+ className: s$5.bullet
18407
18584
  }, "1"), /*#__PURE__*/react.createElement("div", {
18408
18585
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
18409
18586
  }, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
@@ -18415,9 +18592,9 @@
18415
18592
  }
18416
18593
  }
18417
18594
  }))), /*#__PURE__*/react.createElement("div", {
18418
- className: s$4.listItem
18595
+ className: s$5.listItem
18419
18596
  }, /*#__PURE__*/react.createElement("div", {
18420
- className: s$4.bullet
18597
+ className: s$5.bullet
18421
18598
  }, "2"), /*#__PURE__*/react.createElement("div", {
18422
18599
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
18423
18600
  }, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
@@ -18429,9 +18606,9 @@
18429
18606
  }
18430
18607
  }
18431
18608
  }))), /*#__PURE__*/react.createElement("div", {
18432
- className: s$4.listItem
18609
+ className: s$5.listItem
18433
18610
  }, /*#__PURE__*/react.createElement("div", {
18434
- className: s$4.bullet
18611
+ className: s$5.bullet
18435
18612
  }, "3"), /*#__PURE__*/react.createElement("div", {
18436
18613
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
18437
18614
  }, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
@@ -18478,22 +18655,22 @@
18478
18655
  }));
18479
18656
  }
18480
18657
 
18481
- var s$5 = {"logo":"_3Oyv_"};
18658
+ var s$6 = {"logo":"_3Oyv_"};
18482
18659
 
18483
18660
  var Logo = function Logo() {
18484
18661
  return /*#__PURE__*/react.createElement("div", {
18485
- className: s$5.logo
18662
+ className: s$6.logo
18486
18663
  }, /*#__PURE__*/react.createElement(LogoIcon, {
18487
18664
  underlineColor: "#FF414D"
18488
18665
  }));
18489
18666
  };
18490
18667
 
18491
- var s$6 = {"title":"_3ERx-"};
18668
+ var s$7 = {"title":"_3ERx-"};
18492
18669
 
18493
18670
  var Title = function Title(_ref) {
18494
18671
  var isSomePlanDeferred = _ref.isSomePlanDeferred;
18495
18672
  return /*#__PURE__*/react.createElement("div", {
18496
- className: classnames(s$6.title, STATIC_CUSTOMISATION_CLASSES.title),
18673
+ className: classnames(s$7.title, STATIC_CUSTOMISATION_CLASSES.title),
18497
18674
  "data-testid": "modal-title-element"
18498
18675
  }, isSomePlanDeferred ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
18499
18676
  id: 'eligibility-modal.title-deferred',
@@ -18514,43 +18691,50 @@
18514
18691
  }));
18515
18692
  };
18516
18693
 
18517
- var s$7 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC"};
18694
+ var s$8 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC"};
18518
18695
 
18519
18696
  var DesktopModal = function DesktopModal(_ref) {
18520
18697
  var children = _ref.children,
18521
- isSomePlanDeferred = _ref.isSomePlanDeferred;
18698
+ isSomePlanDeferred = _ref.isSomePlanDeferred,
18699
+ cards = _ref.cards;
18522
18700
  return /*#__PURE__*/react.createElement("div", {
18523
- className: s$7.container,
18701
+ className: s$8.container,
18524
18702
  "data-testid": "modal-container"
18525
18703
  }, /*#__PURE__*/react.createElement("div", {
18526
- className: classnames([s$7.block, s$7.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
18704
+ className: classnames([s$8.block, s$8.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
18527
18705
  }, /*#__PURE__*/react.createElement(Title, {
18528
18706
  isSomePlanDeferred: isSomePlanDeferred
18529
- }), /*#__PURE__*/react.createElement(Info, null), /*#__PURE__*/react.createElement(Logo, null)), /*#__PURE__*/react.createElement("div", {
18530
- className: classnames(s$7.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
18707
+ }), /*#__PURE__*/react.createElement(Info, null), cards && /*#__PURE__*/react.createElement(Cards, {
18708
+ cards: cards
18709
+ }), /*#__PURE__*/react.createElement(Logo, null)), /*#__PURE__*/react.createElement("div", {
18710
+ className: classnames(s$8.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
18531
18711
  }, children));
18532
18712
  };
18533
18713
 
18534
- var s$8 = {"noEligibility":"_17qNJ","loader":"_2oTJq"};
18714
+ var s$9 = {"noEligibility":"_17qNJ","loader":"_2oTJq"};
18535
18715
 
18536
- var s$9 = {"container":"_2G7Ch"};
18716
+ var s$a = {"container":"_2G7Ch"};
18537
18717
 
18538
18718
  var MobileModal = function MobileModal(_ref) {
18539
18719
  var children = _ref.children,
18540
- isSomePlanDeferred = _ref.isSomePlanDeferred;
18720
+ isSomePlanDeferred = _ref.isSomePlanDeferred,
18721
+ cards = _ref.cards;
18541
18722
  return /*#__PURE__*/react.createElement("div", {
18542
- className: s$9.container,
18723
+ className: s$a.container,
18543
18724
  "data-testid": "modal-container"
18544
18725
  }, /*#__PURE__*/react.createElement(Title, {
18545
18726
  isSomePlanDeferred: isSomePlanDeferred
18546
- }), children, /*#__PURE__*/react.createElement(Info, null), /*#__PURE__*/react.createElement(Logo, null));
18727
+ }), children, /*#__PURE__*/react.createElement(Info, null), cards && /*#__PURE__*/react.createElement(Cards, {
18728
+ cards: cards
18729
+ }), /*#__PURE__*/react.createElement(Logo, null));
18547
18730
  };
18548
18731
 
18549
18732
  var EligibilityModal = function EligibilityModal(_ref) {
18550
18733
  var initialPlanIndex = _ref.initialPlanIndex,
18551
18734
  onClose = _ref.onClose,
18552
18735
  eligibilityPlans = _ref.eligibilityPlans,
18553
- status = _ref.status;
18736
+ status = _ref.status,
18737
+ cards = _ref.cards;
18554
18738
 
18555
18739
  var _useState = react.useState(initialPlanIndex || 0),
18556
18740
  currentPlanIndex = _useState[0],
@@ -18573,11 +18757,12 @@
18573
18757
  scrollable: true,
18574
18758
  isOpen: true
18575
18759
  }, /*#__PURE__*/react.createElement(ModalComponent, {
18576
- isSomePlanDeferred: isSomePlanDeferred
18760
+ isSomePlanDeferred: isSomePlanDeferred,
18761
+ cards: cards
18577
18762
  }, status === apiStatus.PENDING && /*#__PURE__*/react.createElement("div", {
18578
- className: s$8.loader
18763
+ className: s$9.loader
18579
18764
  }, /*#__PURE__*/react.createElement(LoadingIndicator, null)), status === apiStatus.SUCCESS && eligiblePlans.length === 0 && /*#__PURE__*/react.createElement("div", {
18580
- className: s$8.noEligibility
18765
+ className: s$9.noEligibility
18581
18766
  }, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
18582
18767
  id: "eligibility-modal.no-eligibility",
18583
18768
  defaultMessage: "Oups, il semblerait que la simulation n'ait pas fonctionn\xE9."
@@ -18598,7 +18783,8 @@
18598
18783
  var purchaseAmount = _ref.purchaseAmount,
18599
18784
  apiData = _ref.apiData,
18600
18785
  configPlans = _ref.configPlans,
18601
- onClose = _ref.onClose;
18786
+ onClose = _ref.onClose,
18787
+ cards = _ref.cards;
18602
18788
 
18603
18789
  var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
18604
18790
  eligibilityPlans = _useFetchEligibility[0],
@@ -18608,21 +18794,22 @@
18608
18794
  initialPlanIndex: 0,
18609
18795
  onClose: onClose,
18610
18796
  eligibilityPlans: eligibilityPlans,
18611
- status: status
18797
+ status: status,
18798
+ cards: cards
18612
18799
  });
18613
18800
  };
18614
18801
 
18615
- var s$a = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
18802
+ var s$b = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
18616
18803
 
18617
18804
  var Loader = function Loader(_ref) {
18618
18805
  var className = _ref.className;
18619
18806
  return /*#__PURE__*/react.createElement("div", {
18620
- className: classnames(s$a.loadingIndicator, className),
18807
+ className: classnames(s$b.loadingIndicator, className),
18621
18808
  "data-testid": "loader"
18622
18809
  }, /*#__PURE__*/react.createElement("div", {
18623
- className: s$a.line1
18810
+ className: s$b.line1
18624
18811
  }), /*#__PURE__*/react.createElement("div", {
18625
- className: s$a.line2
18812
+ className: s$b.line2
18626
18813
  }));
18627
18814
  };
18628
18815
 
@@ -18715,7 +18902,7 @@
18715
18902
  activeOption: prefix$1 + '-active-option'
18716
18903
  };
18717
18904
 
18718
- 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"};
18905
+ 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"};
18719
18906
 
18720
18907
  var VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
18721
18908
  var DEFAULT_TRANSITION_TIME = 5500;
@@ -18728,7 +18915,8 @@
18728
18915
  configPlans = _ref.configPlans,
18729
18916
  transitionDelay = _ref.transitionDelay,
18730
18917
  hideIfNotEligible = _ref.hideIfNotEligible,
18731
- suggestedPaymentPlan = _ref.suggestedPaymentPlan;
18918
+ suggestedPaymentPlan = _ref.suggestedPaymentPlan,
18919
+ cards = _ref.cards;
18732
18920
 
18733
18921
  var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
18734
18922
  eligibilityPlans = _useFetchEligibility[0],
@@ -18808,7 +18996,7 @@
18808
18996
 
18809
18997
  if (status === apiStatus.PENDING) {
18810
18998
  return /*#__PURE__*/react.createElement("div", {
18811
- className: classnames(s$b.widgetButton, s$b.pending)
18999
+ className: classnames(s$c.widgetButton, s$c.pending)
18812
19000
  }, /*#__PURE__*/react.createElement(Loader, null));
18813
19001
  }
18814
19002
 
@@ -18826,14 +19014,14 @@
18826
19014
 
18827
19015
  return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
18828
19016
  onClick: handleOpenModal,
18829
- className: classnames(s$b.widgetButton, (_cx = {}, _cx[s$b.clickable] = eligiblePlans.length > 0, _cx[s$b.unClickable] = eligiblePlans.length === 0, _cx), STATIC_CUSTOMISATION_CLASSES$1.container),
19017
+ className: classnames(s$c.widgetButton, (_cx = {}, _cx[s$c.clickable] = eligiblePlans.length > 0, _cx[s$c.unClickable] = eligiblePlans.length === 0, _cx), STATIC_CUSTOMISATION_CLASSES$1.container),
18830
19018
  "data-testid": "widget-button"
18831
19019
  }, /*#__PURE__*/react.createElement("div", {
18832
- className: classnames(s$b.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
19020
+ className: classnames(s$c.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
18833
19021
  }, /*#__PURE__*/react.createElement(LogoIcon, {
18834
- className: s$b.logo
19022
+ className: s$c.logo
18835
19023
  }), /*#__PURE__*/react.createElement("div", {
18836
- className: classnames(s$b.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
19024
+ className: classnames(s$c.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
18837
19025
  }, eligibilityPlans.map(function (eligibilityPlan, key) {
18838
19026
  var _cx2;
18839
19027
 
@@ -18843,15 +19031,16 @@
18843
19031
  return onHover(key);
18844
19032
  },
18845
19033
  onMouseOut: onLeave,
18846
- className: classnames(s$b.plan, (_cx2 = {}, _cx2[classnames(s$b.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)] = current === key, _cx2[classnames(s$b.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = !eligibilityPlan.eligible, _cx2))
19034
+ className: classnames(s$c.plan, (_cx2 = {}, _cx2[classnames(s$c.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)] = current === key, _cx2[classnames(s$c.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = !eligibilityPlan.eligible, _cx2))
18847
19035
  }, paymentPlanShorthandName(eligibilityPlan));
18848
19036
  }))), /*#__PURE__*/react.createElement("div", {
18849
- className: classnames(s$b.info, (_cx3 = {}, _cx3[classnames(s$b.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = eligibilityPlans[current] && !eligibilityPlans[current].eligible, _cx3), STATIC_CUSTOMISATION_CLASSES$1.paymentInfo)
19037
+ className: classnames(s$c.info, (_cx3 = {}, _cx3[classnames(s$c.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = eligibilityPlans[current] && !eligibilityPlans[current].eligible, _cx3), STATIC_CUSTOMISATION_CLASSES$1.paymentInfo)
18850
19038
  }, eligibilityPlans.length !== 0 && paymentPlanInfoText(eligibilityPlans[current]))), isOpen && /*#__PURE__*/react.createElement(EligibilityModal, {
18851
19039
  initialPlanIndex: getIndexWithinEligiblePlans(current),
18852
19040
  onClose: closeModal,
18853
19041
  eligibilityPlans: eligiblePlans,
18854
- status: status
19042
+ status: status,
19043
+ cards: cards
18855
19044
  }));
18856
19045
  };
18857
19046
 
@@ -18879,7 +19068,8 @@
18879
19068
  hideIfNotEligible = options.hideIfNotEligible,
18880
19069
  suggestedPaymentPlan = options.suggestedPaymentPlan,
18881
19070
  _options$locale = options.locale,
18882
- locale = _options$locale === void 0 ? Locale.en : _options$locale;
19071
+ locale = _options$locale === void 0 ? Locale.en : _options$locale,
19072
+ cards = options.cards;
18883
19073
 
18884
19074
  if (containerDiv) {
18885
19075
  reactDom.render( /*#__PURE__*/react.createElement(Provider$1, {
@@ -18890,7 +19080,8 @@
18890
19080
  configPlans: plans,
18891
19081
  transitionDelay: transitionDelay,
18892
19082
  hideIfNotEligible: hideIfNotEligible,
18893
- suggestedPaymentPlan: suggestedPaymentPlan
19083
+ suggestedPaymentPlan: suggestedPaymentPlan,
19084
+ cards: cards
18894
19085
  })), document.querySelector(container));
18895
19086
  }
18896
19087
  }
@@ -18901,7 +19092,8 @@
18901
19092
  _purchaseAmount = options.purchaseAmount,
18902
19093
  _plans = options.plans,
18903
19094
  _options$locale2 = options.locale,
18904
- _locale = _options$locale2 === void 0 ? Locale.en : _options$locale2;
19095
+ _locale = _options$locale2 === void 0 ? Locale.en : _options$locale2,
19096
+ _cards = options.cards;
18905
19097
 
18906
19098
  var close = function close() {
18907
19099
  return containerDiv && reactDom.unmountComponentAtNode(containerDiv);
@@ -18914,7 +19106,8 @@
18914
19106
  purchaseAmount: _purchaseAmount,
18915
19107
  apiData: _this.apiData,
18916
19108
  configPlans: _plans,
18917
- onClose: close
19109
+ onClose: close,
19110
+ cards: _cards
18918
19111
  })), document.querySelector(_container));
18919
19112
  }; // if clickableSelector is provided, add an onClick event handler to open the Modal.
18920
19113