@alma/widgets 2.5.0 → 2.7.0

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 (43) hide show
  1. package/dist/raw/widgets.css +23 -2
  2. package/dist/raw/widgets.js +260 -69
  3. package/dist/raw/widgets.js.map +1 -1
  4. package/dist/raw/widgets.m.js +260 -69
  5. package/dist/raw/widgets.m.js.map +1 -1
  6. package/dist/raw/widgets.modern.js +255 -73
  7. package/dist/raw/widgets.modern.js.map +1 -1
  8. package/dist/raw/widgets.umd.js +260 -69
  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/ModalContainer.test.d.ts +1 -0
  14. package/dist/types/Widgets/EligibilityModal/classNames.const.d.ts +2 -0
  15. package/dist/types/Widgets/EligibilityModal/components/Cards/index.d.ts +7 -0
  16. package/dist/types/Widgets/EligibilityModal/index.d.ts +2 -1
  17. package/dist/types/Widgets/EligibilityModal/modal.test.d.ts +1 -0
  18. package/dist/types/Widgets/PaymentPlans/__tests__/Basics.test.d.ts +1 -0
  19. package/dist/types/Widgets/PaymentPlans/__tests__/Credit.test.d.ts +1 -0
  20. package/dist/types/Widgets/PaymentPlans/__tests__/CustomTransitionDelay.test.d.ts +1 -0
  21. package/dist/types/Widgets/PaymentPlans/__tests__/HideWidget.test.d.ts +1 -0
  22. package/dist/types/Widgets/PaymentPlans/__tests__/IneligibleOptions.test.d.ts +1 -0
  23. package/dist/types/Widgets/PaymentPlans/__tests__/LanguageCheck.test.d.ts +1 -0
  24. package/dist/types/Widgets/PaymentPlans/__tests__/LaunchModal.test.d.ts +1 -0
  25. package/dist/types/Widgets/PaymentPlans/__tests__/SuggestedPaymentPlan.test.d.ts +1 -0
  26. package/dist/types/Widgets/PaymentPlans/__tests__/WithoutPlans.test.d.ts +1 -0
  27. package/dist/types/Widgets/PaymentPlans/index.d.ts +2 -1
  28. package/dist/types/assets/cards/amex.d.ts +3 -0
  29. package/dist/types/assets/cards/cb.d.ts +3 -0
  30. package/dist/types/assets/cards/mastercard.d.ts +3 -0
  31. package/dist/types/assets/cards/visa.d.ts +3 -0
  32. package/dist/types/types.d.ts +3 -0
  33. package/dist/types/utils/index.test.d.ts +1 -0
  34. package/dist/widgets.css +3 -2
  35. package/dist/widgets.js +1 -1
  36. package/dist/widgets.js.map +1 -1
  37. package/dist/widgets.m.js +1 -1
  38. package/dist/widgets.m.js.map +1 -1
  39. package/dist/widgets.modern.js +1 -1
  40. package/dist/widgets.modern.js.map +1 -1
  41. package/dist/widgets.umd.js +1 -1
  42. package/dist/widgets.umd.js.map +1 -1
  43. package/package.json +1 -1
@@ -16780,7 +16780,9 @@
16780
16780
  closeButton: prefix + '-close-button',
16781
16781
  scheduleDetails: prefix + '-schedule-details',
16782
16782
  scheduleTotal: prefix + '-schedule-total',
16783
- scheduleCredit: prefix + '-schedule-credit'
16783
+ scheduleCredit: prefix + '-schedule-credit',
16784
+ cardContainer: prefix + '-card-logos',
16785
+ summary: prefix + '-summary'
16784
16786
  };
16785
16787
 
16786
16788
  var _excluded = ["children", "isOpen", "onClose", "className", "contentClassName", "scrollable"];
@@ -18322,7 +18324,7 @@
18322
18324
  }));
18323
18325
  };
18324
18326
 
18325
- var s$3 = {"schedule":"_MPKjS","scheduleLine":"_1A7Qv","total":"_14Ejo","creditCost":"_1ZIgu","creditMessage":"_1BUr8"};
18327
+ var s$3 = {"schedule":"_MPKjS","scheduleLine":"_1A7Qv","total":"_14Ejo","summary":"_65ZpD","creditCost":"_1ZIgu","creditCostAmount":"_tUTZp","creditMessage":"_1BUr8"};
18326
18328
 
18327
18329
  var Schedule = function Schedule(_ref) {
18328
18330
  var currentPlan = _ref.currentPlan;
@@ -18332,9 +18334,29 @@
18332
18334
  var customerFees = priceFromCents(currentPlan ? currentPlan.customer_total_cost_amount : 0);
18333
18335
  var isCredit = currentPlan && currentPlan.installments_count > 4;
18334
18336
  var intl = useIntl();
18335
- return /*#__PURE__*/react.createElement("div", {
18337
+ return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
18336
18338
  className: classnames(s$3.schedule, STATIC_CUSTOMISATION_CLASSES.scheduleDetails),
18337
18339
  "data-testid": "modal-installments-element"
18340
+ }, ((currentPlan == null ? void 0 : currentPlan.payment_plan) || []).map(function (installment, index) {
18341
+ return /*#__PURE__*/react.createElement("div", {
18342
+ className: s$3.scheduleLine,
18343
+ key: index
18344
+ }, /*#__PURE__*/react.createElement("span", null, isToday(installment.due_date * 1000) ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
18345
+ id: "installments.today",
18346
+ defaultMessage: "Aujourd'hui"
18347
+ }) : /*#__PURE__*/react.createElement(FormattedDate, {
18348
+ value: installment.due_date * 1000,
18349
+ day: "numeric",
18350
+ month: "long",
18351
+ year: "numeric"
18352
+ })), /*#__PURE__*/react.createElement("span", null, /*#__PURE__*/react.createElement(FormattedNumber, {
18353
+ value: priceFromCents(installment.total_amount),
18354
+ style: "currency",
18355
+ currency: "EUR"
18356
+ })));
18357
+ })), /*#__PURE__*/react.createElement("div", {
18358
+ className: classnames(s$3.summary, STATIC_CUSTOMISATION_CLASSES.summary),
18359
+ "data-testid": "modal-summary"
18338
18360
  }, /*#__PURE__*/react.createElement("div", {
18339
18361
  className: classnames(s$3.scheduleLine, s$3.total, STATIC_CUSTOMISATION_CLASSES.scheduleTotal)
18340
18362
  }, /*#__PURE__*/react.createElement("span", null, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
@@ -18352,7 +18374,9 @@
18352
18374
  })) : /*#__PURE__*/react.createElement("span", null, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
18353
18375
  id: "eligibility-modal.cost",
18354
18376
  defaultMessage: "Dont frais"
18355
- })), /*#__PURE__*/react.createElement("span", null, isCredit ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
18377
+ })), /*#__PURE__*/react.createElement("span", {
18378
+ className: s$3.creditCostAmount
18379
+ }, isCredit ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
18356
18380
  id: "eligibility-modal.credit-cost-amount",
18357
18381
  defaultMessage: "{creditCost} (TAEG {TAEG})",
18358
18382
  values: {
@@ -18369,41 +18393,192 @@
18369
18393
  value: customerFees,
18370
18394
  style: "currency",
18371
18395
  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", {
18396
+ }))), isCredit && /*#__PURE__*/react.createElement("p", {
18390
18397
  className: s$3.creditMessage
18391
18398
  }, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
18392
18399
  id: "eligibility-modal.credit-commitment",
18393
18400
  defaultMessage: "Un cr\xE9dit vous engage et doit \xEAtre rembours\xE9. V\xE9rifiez vos capacit\xE9s de remboursement\n avant de vous engager."
18401
+ }))));
18402
+ };
18403
+
18404
+ var AmexCard = function AmexCard() {
18405
+ return /*#__PURE__*/react.createElement("svg", {
18406
+ xmlns: "http://www.w3.org/2000/svg",
18407
+ width: "24",
18408
+ height: "16",
18409
+ viewBox: "0 0 24 16"
18410
+ }, /*#__PURE__*/react.createElement("defs", null, /*#__PURE__*/react.createElement("linearGradient", {
18411
+ id: "cardamex",
18412
+ x1: "10.914%",
18413
+ x2: "87.432%",
18414
+ y1: "86.279%",
18415
+ y2: "15.035%"
18416
+ }, /*#__PURE__*/react.createElement("stop", {
18417
+ offset: "0%",
18418
+ stopColor: "#3FA9F5"
18419
+ }), /*#__PURE__*/react.createElement("stop", {
18420
+ offset: "100%",
18421
+ stopColor: "#0071BC"
18422
+ }))), /*#__PURE__*/react.createElement("g", {
18423
+ fill: "none",
18424
+ fillRule: "evenodd"
18425
+ }, /*#__PURE__*/react.createElement("path", {
18426
+ fill: "url(#cardamex)",
18427
+ fillRule: "nonzero",
18428
+ 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"
18429
+ }), /*#__PURE__*/react.createElement("g", {
18430
+ fill: "#FFF"
18431
+ }, /*#__PURE__*/react.createElement("path", {
18432
+ 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"
18433
+ }), /*#__PURE__*/react.createElement("path", {
18434
+ fillRule: "nonzero",
18435
+ 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"
18436
+ }))));
18437
+ };
18438
+
18439
+ var VisaCard = function VisaCard() {
18440
+ return /*#__PURE__*/react.createElement("svg", {
18441
+ xmlns: "http://www.w3.org/2000/svg",
18442
+ width: "24",
18443
+ height: "16",
18444
+ viewBox: "0 0 24 16"
18445
+ }, /*#__PURE__*/react.createElement("g", {
18446
+ fill: "none",
18447
+ fillRule: "nonzero"
18448
+ }, /*#__PURE__*/react.createElement("path", {
18449
+ fill: "#FCFCFC",
18450
+ 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"
18451
+ }), ' ', /*#__PURE__*/react.createElement("path", {
18452
+ fill: "#005098",
18453
+ 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"
18454
+ }), /*#__PURE__*/react.createElement("path", {
18455
+ fill: "#F6A500",
18456
+ 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"
18457
+ }), /*#__PURE__*/react.createElement("path", {
18458
+ fill: "#0A5296",
18459
+ d: "M23.937 3.23H0V1.316C0 .598.627 0 1.379 0H22.62C23.373 0 24 .598 24 1.316V3.23h-.063z"
18460
+ }), /*#__PURE__*/react.createElement("path", {
18461
+ fill: "#F4A428",
18462
+ d: "M.063 13H24v1.8c0 .655-.625 1.2-1.375 1.2H1.375C.625 16 0 15.455 0 14.8V13h.063z"
18394
18463
  })));
18395
18464
  };
18396
18465
 
18397
- var s$4 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
18466
+ var MasterCard = function MasterCard() {
18467
+ return /*#__PURE__*/react.createElement("svg", {
18468
+ width: "24px",
18469
+ height: "16px",
18470
+ viewBox: "0 0 24 16",
18471
+ version: "1.1",
18472
+ xmlns: "http://www.w3.org/2000/svg"
18473
+ }, /*#__PURE__*/react.createElement("g", {
18474
+ id: "Parcours-1C-B",
18475
+ stroke: "none",
18476
+ strokeWidth: "1",
18477
+ fill: "none",
18478
+ fillRule: "evenodd"
18479
+ }, /*#__PURE__*/react.createElement("g", {
18480
+ id: "mobile-1C-Paiement-V1",
18481
+ transform: "translate(-269.000000, -313.000000)"
18482
+ }, /*#__PURE__*/react.createElement("g", {
18483
+ id: "mastercard",
18484
+ transform: "translate(269.000000, 313.000000)"
18485
+ }, /*#__PURE__*/react.createElement("rect", {
18486
+ id: "Rectangle",
18487
+ fill: "#FFFFFF",
18488
+ x: "0",
18489
+ y: "0",
18490
+ width: "24",
18491
+ height: "16",
18492
+ rx: "1"
18493
+ }), /*#__PURE__*/react.createElement("g", {
18494
+ id: "Group-6",
18495
+ transform: "translate(4.000000, 3.000000)"
18496
+ }, /*#__PURE__*/react.createElement("circle", {
18497
+ id: "Oval-4-Copy",
18498
+ fill: "#EA001B",
18499
+ cx: "5.05263158",
18500
+ cy: "5.05263158",
18501
+ r: "5.05263158"
18502
+ }), /*#__PURE__*/react.createElement("circle", {
18503
+ id: "Oval-4",
18504
+ fillOpacity: "0.25",
18505
+ fill: "#F79F1A",
18506
+ cx: "10.9473684",
18507
+ cy: "5.05263158",
18508
+ r: "5.05263158"
18509
+ }), /*#__PURE__*/react.createElement("circle", {
18510
+ id: "Oval-4-Copy-2",
18511
+ fillOpacity: "0.9",
18512
+ fill: "#F79F1A",
18513
+ cx: "10.9473684",
18514
+ cy: "5.05263158",
18515
+ r: "5.05263158"
18516
+ }), /*#__PURE__*/react.createElement("circle", {
18517
+ id: "Oval-4-Copy-3",
18518
+ fillOpacity: "0.3",
18519
+ fill: "#EA001B",
18520
+ cx: "5.05263158",
18521
+ cy: "5.05263158",
18522
+ r: "5.05263158"
18523
+ }))))));
18524
+ };
18525
+
18526
+ var CbCard = function CbCard() {
18527
+ return /*#__PURE__*/react.createElement("svg", {
18528
+ xmlns: "http://www.w3.org/2000/svg",
18529
+ width: "24",
18530
+ height: "16",
18531
+ viewBox: "0 0 24 16"
18532
+ }, /*#__PURE__*/react.createElement("defs", null, /*#__PURE__*/react.createElement("linearGradient", {
18533
+ id: "cardcb",
18534
+ x1: "5.842%",
18535
+ x2: "95.393%",
18536
+ y1: "81.753%",
18537
+ y2: "17.344%"
18538
+ }, /*#__PURE__*/react.createElement("stop", {
18539
+ offset: "0%",
18540
+ stopColor: "#39B54A"
18541
+ }), ' ', /*#__PURE__*/react.createElement("stop", {
18542
+ offset: "100%",
18543
+ stopColor: "#0A5296"
18544
+ }))), /*#__PURE__*/react.createElement("g", {
18545
+ fill: "none",
18546
+ fillRule: "nonzero"
18547
+ }, /*#__PURE__*/react.createElement("path", {
18548
+ fill: "url(#cardcb)",
18549
+ 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"
18550
+ }), /*#__PURE__*/react.createElement("g", {
18551
+ fill: "#FFF"
18552
+ }, /*#__PURE__*/react.createElement("path", {
18553
+ 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"
18554
+ }))));
18555
+ };
18556
+
18557
+ var s$4 = {"cardContainer":"_1N3yO","card":"_83cGn"};
18558
+
18559
+ var Cards = function Cards(_ref) {
18560
+ var cards = _ref.cards;
18561
+ return /*#__PURE__*/react.createElement("div", {
18562
+ className: classnames(s$4.cardContainer, STATIC_CUSTOMISATION_CLASSES.cardContainer)
18563
+ }, cards.map(function (card) {
18564
+ return /*#__PURE__*/react.createElement("div", {
18565
+ key: card,
18566
+ className: s$4.card,
18567
+ "data-testid": "card-logo-" + card
18568
+ }, 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));
18569
+ }));
18570
+ };
18571
+
18572
+ var s$5 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
18398
18573
 
18399
18574
  var Info = function Info() {
18400
18575
  return /*#__PURE__*/react.createElement("div", {
18401
- className: classnames(s$4.list, STATIC_CUSTOMISATION_CLASSES.info),
18576
+ className: classnames(s$5.list, STATIC_CUSTOMISATION_CLASSES.info),
18402
18577
  "data-testid": "modal-info-element"
18403
18578
  }, /*#__PURE__*/react.createElement("div", {
18404
- className: s$4.listItem
18579
+ className: s$5.listItem
18405
18580
  }, /*#__PURE__*/react.createElement("div", {
18406
- className: s$4.bullet
18581
+ className: s$5.bullet
18407
18582
  }, "1"), /*#__PURE__*/react.createElement("div", {
18408
18583
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
18409
18584
  }, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
@@ -18415,9 +18590,9 @@
18415
18590
  }
18416
18591
  }
18417
18592
  }))), /*#__PURE__*/react.createElement("div", {
18418
- className: s$4.listItem
18593
+ className: s$5.listItem
18419
18594
  }, /*#__PURE__*/react.createElement("div", {
18420
- className: s$4.bullet
18595
+ className: s$5.bullet
18421
18596
  }, "2"), /*#__PURE__*/react.createElement("div", {
18422
18597
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
18423
18598
  }, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
@@ -18429,9 +18604,9 @@
18429
18604
  }
18430
18605
  }
18431
18606
  }))), /*#__PURE__*/react.createElement("div", {
18432
- className: s$4.listItem
18607
+ className: s$5.listItem
18433
18608
  }, /*#__PURE__*/react.createElement("div", {
18434
- className: s$4.bullet
18609
+ className: s$5.bullet
18435
18610
  }, "3"), /*#__PURE__*/react.createElement("div", {
18436
18611
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
18437
18612
  }, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
@@ -18478,22 +18653,22 @@
18478
18653
  }));
18479
18654
  }
18480
18655
 
18481
- var s$5 = {"logo":"_3Oyv_"};
18656
+ var s$6 = {"logo":"_3Oyv_"};
18482
18657
 
18483
18658
  var Logo = function Logo() {
18484
18659
  return /*#__PURE__*/react.createElement("div", {
18485
- className: s$5.logo
18660
+ className: s$6.logo
18486
18661
  }, /*#__PURE__*/react.createElement(LogoIcon, {
18487
18662
  underlineColor: "#FF414D"
18488
18663
  }));
18489
18664
  };
18490
18665
 
18491
- var s$6 = {"title":"_3ERx-"};
18666
+ var s$7 = {"title":"_3ERx-"};
18492
18667
 
18493
18668
  var Title = function Title(_ref) {
18494
18669
  var isSomePlanDeferred = _ref.isSomePlanDeferred;
18495
18670
  return /*#__PURE__*/react.createElement("div", {
18496
- className: classnames(s$6.title, STATIC_CUSTOMISATION_CLASSES.title),
18671
+ className: classnames(s$7.title, STATIC_CUSTOMISATION_CLASSES.title),
18497
18672
  "data-testid": "modal-title-element"
18498
18673
  }, isSomePlanDeferred ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
18499
18674
  id: 'eligibility-modal.title-deferred',
@@ -18514,43 +18689,50 @@
18514
18689
  }));
18515
18690
  };
18516
18691
 
18517
- var s$7 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC"};
18692
+ var s$8 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC"};
18518
18693
 
18519
18694
  var DesktopModal = function DesktopModal(_ref) {
18520
18695
  var children = _ref.children,
18521
- isSomePlanDeferred = _ref.isSomePlanDeferred;
18696
+ isSomePlanDeferred = _ref.isSomePlanDeferred,
18697
+ cards = _ref.cards;
18522
18698
  return /*#__PURE__*/react.createElement("div", {
18523
- className: s$7.container,
18699
+ className: s$8.container,
18524
18700
  "data-testid": "modal-container"
18525
18701
  }, /*#__PURE__*/react.createElement("div", {
18526
- className: classnames([s$7.block, s$7.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
18702
+ className: classnames([s$8.block, s$8.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
18527
18703
  }, /*#__PURE__*/react.createElement(Title, {
18528
18704
  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)
18705
+ }), /*#__PURE__*/react.createElement(Info, null), cards && /*#__PURE__*/react.createElement(Cards, {
18706
+ cards: cards
18707
+ }), /*#__PURE__*/react.createElement(Logo, null)), /*#__PURE__*/react.createElement("div", {
18708
+ className: classnames(s$8.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
18531
18709
  }, children));
18532
18710
  };
18533
18711
 
18534
- var s$8 = {"noEligibility":"_17qNJ","loader":"_2oTJq"};
18712
+ var s$9 = {"noEligibility":"_17qNJ","loader":"_2oTJq"};
18535
18713
 
18536
- var s$9 = {"container":"_2G7Ch"};
18714
+ var s$a = {"container":"_2G7Ch"};
18537
18715
 
18538
18716
  var MobileModal = function MobileModal(_ref) {
18539
18717
  var children = _ref.children,
18540
- isSomePlanDeferred = _ref.isSomePlanDeferred;
18718
+ isSomePlanDeferred = _ref.isSomePlanDeferred,
18719
+ cards = _ref.cards;
18541
18720
  return /*#__PURE__*/react.createElement("div", {
18542
- className: s$9.container,
18721
+ className: s$a.container,
18543
18722
  "data-testid": "modal-container"
18544
18723
  }, /*#__PURE__*/react.createElement(Title, {
18545
18724
  isSomePlanDeferred: isSomePlanDeferred
18546
- }), children, /*#__PURE__*/react.createElement(Info, null), /*#__PURE__*/react.createElement(Logo, null));
18725
+ }), children, /*#__PURE__*/react.createElement(Info, null), cards && /*#__PURE__*/react.createElement(Cards, {
18726
+ cards: cards
18727
+ }), /*#__PURE__*/react.createElement(Logo, null));
18547
18728
  };
18548
18729
 
18549
18730
  var EligibilityModal = function EligibilityModal(_ref) {
18550
18731
  var initialPlanIndex = _ref.initialPlanIndex,
18551
18732
  onClose = _ref.onClose,
18552
18733
  eligibilityPlans = _ref.eligibilityPlans,
18553
- status = _ref.status;
18734
+ status = _ref.status,
18735
+ cards = _ref.cards;
18554
18736
 
18555
18737
  var _useState = react.useState(initialPlanIndex || 0),
18556
18738
  currentPlanIndex = _useState[0],
@@ -18573,11 +18755,12 @@
18573
18755
  scrollable: true,
18574
18756
  isOpen: true
18575
18757
  }, /*#__PURE__*/react.createElement(ModalComponent, {
18576
- isSomePlanDeferred: isSomePlanDeferred
18758
+ isSomePlanDeferred: isSomePlanDeferred,
18759
+ cards: cards
18577
18760
  }, status === apiStatus.PENDING && /*#__PURE__*/react.createElement("div", {
18578
- className: s$8.loader
18761
+ className: s$9.loader
18579
18762
  }, /*#__PURE__*/react.createElement(LoadingIndicator, null)), status === apiStatus.SUCCESS && eligiblePlans.length === 0 && /*#__PURE__*/react.createElement("div", {
18580
- className: s$8.noEligibility
18763
+ className: s$9.noEligibility
18581
18764
  }, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
18582
18765
  id: "eligibility-modal.no-eligibility",
18583
18766
  defaultMessage: "Oups, il semblerait que la simulation n'ait pas fonctionn\xE9."
@@ -18598,7 +18781,8 @@
18598
18781
  var purchaseAmount = _ref.purchaseAmount,
18599
18782
  apiData = _ref.apiData,
18600
18783
  configPlans = _ref.configPlans,
18601
- onClose = _ref.onClose;
18784
+ onClose = _ref.onClose,
18785
+ cards = _ref.cards;
18602
18786
 
18603
18787
  var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
18604
18788
  eligibilityPlans = _useFetchEligibility[0],
@@ -18608,21 +18792,22 @@
18608
18792
  initialPlanIndex: 0,
18609
18793
  onClose: onClose,
18610
18794
  eligibilityPlans: eligibilityPlans,
18611
- status: status
18795
+ status: status,
18796
+ cards: cards
18612
18797
  });
18613
18798
  };
18614
18799
 
18615
- var s$a = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
18800
+ var s$b = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
18616
18801
 
18617
18802
  var Loader = function Loader(_ref) {
18618
18803
  var className = _ref.className;
18619
18804
  return /*#__PURE__*/react.createElement("div", {
18620
- className: classnames(s$a.loadingIndicator, className),
18805
+ className: classnames(s$b.loadingIndicator, className),
18621
18806
  "data-testid": "loader"
18622
18807
  }, /*#__PURE__*/react.createElement("div", {
18623
- className: s$a.line1
18808
+ className: s$b.line1
18624
18809
  }), /*#__PURE__*/react.createElement("div", {
18625
- className: s$a.line2
18810
+ className: s$b.line2
18626
18811
  }));
18627
18812
  };
18628
18813
 
@@ -18715,7 +18900,7 @@
18715
18900
  activeOption: prefix$1 + '-active-option'
18716
18901
  };
18717
18902
 
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"};
18903
+ 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
18904
 
18720
18905
  var VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
18721
18906
  var DEFAULT_TRANSITION_TIME = 5500;
@@ -18728,7 +18913,8 @@
18728
18913
  configPlans = _ref.configPlans,
18729
18914
  transitionDelay = _ref.transitionDelay,
18730
18915
  hideIfNotEligible = _ref.hideIfNotEligible,
18731
- suggestedPaymentPlan = _ref.suggestedPaymentPlan;
18916
+ suggestedPaymentPlan = _ref.suggestedPaymentPlan,
18917
+ cards = _ref.cards;
18732
18918
 
18733
18919
  var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
18734
18920
  eligibilityPlans = _useFetchEligibility[0],
@@ -18808,7 +18994,7 @@
18808
18994
 
18809
18995
  if (status === apiStatus.PENDING) {
18810
18996
  return /*#__PURE__*/react.createElement("div", {
18811
- className: classnames(s$b.widgetButton, s$b.pending)
18997
+ className: classnames(s$c.widgetButton, s$c.pending)
18812
18998
  }, /*#__PURE__*/react.createElement(Loader, null));
18813
18999
  }
18814
19000
 
@@ -18826,14 +19012,14 @@
18826
19012
 
18827
19013
  return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
18828
19014
  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),
19015
+ 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
19016
  "data-testid": "widget-button"
18831
19017
  }, /*#__PURE__*/react.createElement("div", {
18832
- className: classnames(s$b.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
19018
+ className: classnames(s$c.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
18833
19019
  }, /*#__PURE__*/react.createElement(LogoIcon, {
18834
- className: s$b.logo
19020
+ className: s$c.logo
18835
19021
  }), /*#__PURE__*/react.createElement("div", {
18836
- className: classnames(s$b.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
19022
+ className: classnames(s$c.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
18837
19023
  }, eligibilityPlans.map(function (eligibilityPlan, key) {
18838
19024
  var _cx2;
18839
19025
 
@@ -18843,15 +19029,16 @@
18843
19029
  return onHover(key);
18844
19030
  },
18845
19031
  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))
19032
+ 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
19033
  }, paymentPlanShorthandName(eligibilityPlan));
18848
19034
  }))), /*#__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)
19035
+ 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
19036
  }, eligibilityPlans.length !== 0 && paymentPlanInfoText(eligibilityPlans[current]))), isOpen && /*#__PURE__*/react.createElement(EligibilityModal, {
18851
19037
  initialPlanIndex: getIndexWithinEligiblePlans(current),
18852
19038
  onClose: closeModal,
18853
19039
  eligibilityPlans: eligiblePlans,
18854
- status: status
19040
+ status: status,
19041
+ cards: cards
18855
19042
  }));
18856
19043
  };
18857
19044
 
@@ -18879,7 +19066,8 @@
18879
19066
  hideIfNotEligible = options.hideIfNotEligible,
18880
19067
  suggestedPaymentPlan = options.suggestedPaymentPlan,
18881
19068
  _options$locale = options.locale,
18882
- locale = _options$locale === void 0 ? Locale.en : _options$locale;
19069
+ locale = _options$locale === void 0 ? Locale.en : _options$locale,
19070
+ cards = options.cards;
18883
19071
 
18884
19072
  if (containerDiv) {
18885
19073
  reactDom.render( /*#__PURE__*/react.createElement(Provider$1, {
@@ -18890,7 +19078,8 @@
18890
19078
  configPlans: plans,
18891
19079
  transitionDelay: transitionDelay,
18892
19080
  hideIfNotEligible: hideIfNotEligible,
18893
- suggestedPaymentPlan: suggestedPaymentPlan
19081
+ suggestedPaymentPlan: suggestedPaymentPlan,
19082
+ cards: cards
18894
19083
  })), document.querySelector(container));
18895
19084
  }
18896
19085
  }
@@ -18901,7 +19090,8 @@
18901
19090
  _purchaseAmount = options.purchaseAmount,
18902
19091
  _plans = options.plans,
18903
19092
  _options$locale2 = options.locale,
18904
- _locale = _options$locale2 === void 0 ? Locale.en : _options$locale2;
19093
+ _locale = _options$locale2 === void 0 ? Locale.en : _options$locale2,
19094
+ _cards = options.cards;
18905
19095
 
18906
19096
  var close = function close() {
18907
19097
  return containerDiv && reactDom.unmountComponentAtNode(containerDiv);
@@ -18914,7 +19104,8 @@
18914
19104
  purchaseAmount: _purchaseAmount,
18915
19105
  apiData: _this.apiData,
18916
19106
  configPlans: _plans,
18917
- onClose: close
19107
+ onClose: close,
19108
+ cards: _cards
18918
19109
  })), document.querySelector(_container));
18919
19110
  }; // if clickableSelector is provided, add an onClick event handler to open the Modal.
18920
19111