@alma/widgets 2.6.0 → 2.8.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.
- package/dist/raw/widgets.css +14 -0
- package/dist/raw/widgets.js +267 -65
- package/dist/raw/widgets.js.map +1 -1
- package/dist/raw/widgets.m.js +267 -65
- package/dist/raw/widgets.m.js.map +1 -1
- package/dist/raw/widgets.modern.js +260 -67
- package/dist/raw/widgets.modern.js.map +1 -1
- package/dist/raw/widgets.umd.js +267 -65
- package/dist/raw/widgets.umd.js.map +1 -1
- package/dist/types/Widgets/EligibilityModal/DesktopModal/index.d.ts +2 -0
- package/dist/types/Widgets/EligibilityModal/MobileModal/index.d.ts +2 -0
- package/dist/types/Widgets/EligibilityModal/ModalContainer.d.ts +2 -1
- package/dist/types/Widgets/EligibilityModal/{modal.test.d.ts → __tests__/Basics.test.d.ts} +0 -0
- package/dist/types/Widgets/EligibilityModal/__tests__/Cards.test.d.ts +1 -0
- package/dist/types/Widgets/EligibilityModal/__tests__/ModalContainer.test.d.ts +1 -0
- package/dist/types/Widgets/EligibilityModal/__tests__/Plans.test.d.ts +1 -0
- package/dist/types/Widgets/EligibilityModal/classNames.const.d.ts +1 -0
- package/dist/types/Widgets/EligibilityModal/components/Cards/index.d.ts +7 -0
- package/dist/types/Widgets/EligibilityModal/index.d.ts +2 -1
- package/dist/types/Widgets/PaymentPlans/__tests__/Monochrome.test.d.ts +1 -0
- package/dist/types/Widgets/PaymentPlans/index.d.ts +3 -1
- package/dist/types/assets/Logo.d.ts +3 -2
- package/dist/types/assets/cards/amex.d.ts +3 -0
- package/dist/types/assets/cards/cb.d.ts +3 -0
- package/dist/types/assets/cards/mastercard.d.ts +3 -0
- package/dist/types/assets/cards/visa.d.ts +3 -0
- package/dist/types/types.d.ts +8 -4
- package/dist/types/widgets_controller.d.ts +1 -2
- package/dist/widgets.css +2 -1
- package/dist/widgets.js +1 -1
- package/dist/widgets.js.map +1 -1
- package/dist/widgets.m.js +1 -1
- package/dist/widgets.m.js.map +1 -1
- package/dist/widgets.modern.js +1 -1
- package/dist/widgets.modern.js.map +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/raw/widgets.css
CHANGED
|
@@ -369,6 +369,16 @@
|
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
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
|
+
|
|
372
382
|
._180ro {
|
|
373
383
|
display: flex;
|
|
374
384
|
flex-direction: column;
|
|
@@ -552,6 +562,10 @@
|
|
|
552
562
|
border-bottom: 3px solid var(--blue-300);
|
|
553
563
|
}
|
|
554
564
|
|
|
565
|
+
._2Kqjn._3dG_J._2icEF {
|
|
566
|
+
border-bottom-color: var(--red-600);
|
|
567
|
+
}
|
|
568
|
+
|
|
555
569
|
._2Kqjn._3dG_J._3O1bg {
|
|
556
570
|
border-bottom-color: var(--gray-600);
|
|
557
571
|
cursor: not-allowed;
|
package/dist/raw/widgets.js
CHANGED
|
@@ -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": "
|
|
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
|
|
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
|
|
1935
|
-
"eligibility-modal.title-deferred": "<highlighted>Paga a rate</highlighted>
|
|
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
|
}
|
|
@@ -2197,6 +2195,7 @@ var STATIC_CUSTOMISATION_CLASSES = {
|
|
|
2197
2195
|
scheduleDetails: prefix + '-schedule-details',
|
|
2198
2196
|
scheduleTotal: prefix + '-schedule-total',
|
|
2199
2197
|
scheduleCredit: prefix + '-schedule-credit',
|
|
2198
|
+
cardContainer: prefix + '-card-logos',
|
|
2200
2199
|
summary: prefix + '-summary'
|
|
2201
2200
|
};
|
|
2202
2201
|
|
|
@@ -2214,6 +2213,7 @@ var ControlledModal = function ControlledModal(_ref) {
|
|
|
2214
2213
|
scrollable = _ref$scrollable === void 0 ? false : _ref$scrollable,
|
|
2215
2214
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
2216
2215
|
|
|
2216
|
+
/* istanbul ignore next */
|
|
2217
2217
|
Modal.setAppElement('body');
|
|
2218
2218
|
return /*#__PURE__*/React__default.createElement(Modal, Object.assign({
|
|
2219
2219
|
className: cx(s$1.modal, className),
|
|
@@ -2472,16 +2472,187 @@ var Schedule = function Schedule(_ref) {
|
|
|
2472
2472
|
}))));
|
|
2473
2473
|
};
|
|
2474
2474
|
|
|
2475
|
-
var
|
|
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"
|
|
2534
|
+
})));
|
|
2535
|
+
};
|
|
2536
|
+
|
|
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"};
|
|
2476
2647
|
|
|
2477
2648
|
var Info = function Info() {
|
|
2478
2649
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2479
|
-
className: cx(s$
|
|
2650
|
+
className: cx(s$5.list, STATIC_CUSTOMISATION_CLASSES.info),
|
|
2480
2651
|
"data-testid": "modal-info-element"
|
|
2481
2652
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2482
|
-
className: s$
|
|
2653
|
+
className: s$5.listItem
|
|
2483
2654
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2484
|
-
className: s$
|
|
2655
|
+
className: s$5.bullet
|
|
2485
2656
|
}, "1"), /*#__PURE__*/React__default.createElement("div", {
|
|
2486
2657
|
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2487
2658
|
}, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
@@ -2493,9 +2664,9 @@ var Info = function Info() {
|
|
|
2493
2664
|
}
|
|
2494
2665
|
}
|
|
2495
2666
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
2496
|
-
className: s$
|
|
2667
|
+
className: s$5.listItem
|
|
2497
2668
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2498
|
-
className: s$
|
|
2669
|
+
className: s$5.bullet
|
|
2499
2670
|
}, "2"), /*#__PURE__*/React__default.createElement("div", {
|
|
2500
2671
|
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2501
2672
|
}, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
@@ -2507,9 +2678,9 @@ var Info = function Info() {
|
|
|
2507
2678
|
}
|
|
2508
2679
|
}
|
|
2509
2680
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
2510
|
-
className: s$
|
|
2681
|
+
className: s$5.listItem
|
|
2511
2682
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2512
|
-
className: s$
|
|
2683
|
+
className: s$5.bullet
|
|
2513
2684
|
}, "3"), /*#__PURE__*/React__default.createElement("div", {
|
|
2514
2685
|
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2515
2686
|
}, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
@@ -2523,12 +2694,21 @@ var Info = function Info() {
|
|
|
2523
2694
|
}))));
|
|
2524
2695
|
};
|
|
2525
2696
|
|
|
2697
|
+
var COLORS;
|
|
2698
|
+
|
|
2699
|
+
(function (COLORS) {
|
|
2700
|
+
COLORS["ALMA"] = "#FF414D";
|
|
2701
|
+
COLORS["MONOCHROME"] = "#00425D";
|
|
2702
|
+
})(COLORS || (COLORS = {}));
|
|
2703
|
+
|
|
2526
2704
|
function LogoIcon(_ref) {
|
|
2527
|
-
var
|
|
2528
|
-
|
|
2529
|
-
_ref$
|
|
2530
|
-
|
|
2531
|
-
|
|
2705
|
+
var className = _ref.className,
|
|
2706
|
+
_ref$color = _ref.color,
|
|
2707
|
+
color = _ref$color === void 0 ? COLORS.MONOCHROME : _ref$color,
|
|
2708
|
+
_ref$monochrome = _ref.monochrome,
|
|
2709
|
+
monochrome = _ref$monochrome === void 0 ? true : _ref$monochrome,
|
|
2710
|
+
underlineColor = _ref.underlineColor;
|
|
2711
|
+
var defaultUnderlineColor = monochrome ? COLORS.MONOCHROME : COLORS.ALMA;
|
|
2532
2712
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
2533
2713
|
className: className,
|
|
2534
2714
|
width: "35",
|
|
@@ -2552,26 +2732,26 @@ function LogoIcon(_ref) {
|
|
|
2552
2732
|
y: "20",
|
|
2553
2733
|
width: "40",
|
|
2554
2734
|
height: "3",
|
|
2555
|
-
fill: underlineColor
|
|
2735
|
+
fill: underlineColor || defaultUnderlineColor
|
|
2556
2736
|
}));
|
|
2557
2737
|
}
|
|
2558
2738
|
|
|
2559
|
-
var s$
|
|
2739
|
+
var s$6 = {"logo":"_3Oyv_"};
|
|
2560
2740
|
|
|
2561
2741
|
var Logo = function Logo() {
|
|
2562
2742
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2563
|
-
className: s$
|
|
2743
|
+
className: s$6.logo
|
|
2564
2744
|
}, /*#__PURE__*/React__default.createElement(LogoIcon, {
|
|
2565
2745
|
underlineColor: "#FF414D"
|
|
2566
2746
|
}));
|
|
2567
2747
|
};
|
|
2568
2748
|
|
|
2569
|
-
var s$
|
|
2749
|
+
var s$7 = {"title":"_3ERx-"};
|
|
2570
2750
|
|
|
2571
2751
|
var Title = function Title(_ref) {
|
|
2572
2752
|
var isSomePlanDeferred = _ref.isSomePlanDeferred;
|
|
2573
2753
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2574
|
-
className: cx(s$
|
|
2754
|
+
className: cx(s$7.title, STATIC_CUSTOMISATION_CLASSES.title),
|
|
2575
2755
|
"data-testid": "modal-title-element"
|
|
2576
2756
|
}, isSomePlanDeferred ? /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2577
2757
|
id: 'eligibility-modal.title-deferred',
|
|
@@ -2592,43 +2772,50 @@ var Title = function Title(_ref) {
|
|
|
2592
2772
|
}));
|
|
2593
2773
|
};
|
|
2594
2774
|
|
|
2595
|
-
var s$
|
|
2775
|
+
var s$8 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC"};
|
|
2596
2776
|
|
|
2597
2777
|
var DesktopModal = function DesktopModal(_ref) {
|
|
2598
2778
|
var children = _ref.children,
|
|
2599
|
-
isSomePlanDeferred = _ref.isSomePlanDeferred
|
|
2779
|
+
isSomePlanDeferred = _ref.isSomePlanDeferred,
|
|
2780
|
+
cards = _ref.cards;
|
|
2600
2781
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2601
|
-
className: s$
|
|
2782
|
+
className: s$8.container,
|
|
2602
2783
|
"data-testid": "modal-container"
|
|
2603
2784
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2604
|
-
className: cx([s$
|
|
2785
|
+
className: cx([s$8.block, s$8.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
|
|
2605
2786
|
}, /*#__PURE__*/React__default.createElement(Title, {
|
|
2606
2787
|
isSomePlanDeferred: isSomePlanDeferred
|
|
2607
|
-
}), /*#__PURE__*/React__default.createElement(Info, null),
|
|
2608
|
-
|
|
2788
|
+
}), /*#__PURE__*/React__default.createElement(Info, null), cards && /*#__PURE__*/React__default.createElement(Cards, {
|
|
2789
|
+
cards: cards
|
|
2790
|
+
}), /*#__PURE__*/React__default.createElement(Logo, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
2791
|
+
className: cx(s$8.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
|
|
2609
2792
|
}, children));
|
|
2610
2793
|
};
|
|
2611
2794
|
|
|
2612
|
-
var s$
|
|
2795
|
+
var s$9 = {"noEligibility":"_17qNJ","loader":"_2oTJq"};
|
|
2613
2796
|
|
|
2614
|
-
var s$
|
|
2797
|
+
var s$a = {"container":"_2G7Ch"};
|
|
2615
2798
|
|
|
2616
2799
|
var MobileModal = function MobileModal(_ref) {
|
|
2617
2800
|
var children = _ref.children,
|
|
2618
|
-
isSomePlanDeferred = _ref.isSomePlanDeferred
|
|
2801
|
+
isSomePlanDeferred = _ref.isSomePlanDeferred,
|
|
2802
|
+
cards = _ref.cards;
|
|
2619
2803
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2620
|
-
className: s$
|
|
2804
|
+
className: s$a.container,
|
|
2621
2805
|
"data-testid": "modal-container"
|
|
2622
2806
|
}, /*#__PURE__*/React__default.createElement(Title, {
|
|
2623
2807
|
isSomePlanDeferred: isSomePlanDeferred
|
|
2624
|
-
}), children, /*#__PURE__*/React__default.createElement(Info, null), /*#__PURE__*/React__default.createElement(
|
|
2808
|
+
}), children, /*#__PURE__*/React__default.createElement(Info, null), cards && /*#__PURE__*/React__default.createElement(Cards, {
|
|
2809
|
+
cards: cards
|
|
2810
|
+
}), /*#__PURE__*/React__default.createElement(Logo, null));
|
|
2625
2811
|
};
|
|
2626
2812
|
|
|
2627
2813
|
var EligibilityModal = function EligibilityModal(_ref) {
|
|
2628
2814
|
var initialPlanIndex = _ref.initialPlanIndex,
|
|
2629
2815
|
onClose = _ref.onClose,
|
|
2630
2816
|
eligibilityPlans = _ref.eligibilityPlans,
|
|
2631
|
-
status = _ref.status
|
|
2817
|
+
status = _ref.status,
|
|
2818
|
+
cards = _ref.cards;
|
|
2632
2819
|
|
|
2633
2820
|
var _useState = React.useState(initialPlanIndex || 0),
|
|
2634
2821
|
currentPlanIndex = _useState[0],
|
|
@@ -2651,11 +2838,12 @@ var EligibilityModal = function EligibilityModal(_ref) {
|
|
|
2651
2838
|
scrollable: true,
|
|
2652
2839
|
isOpen: true
|
|
2653
2840
|
}, /*#__PURE__*/React__default.createElement(ModalComponent, {
|
|
2654
|
-
isSomePlanDeferred: isSomePlanDeferred
|
|
2841
|
+
isSomePlanDeferred: isSomePlanDeferred,
|
|
2842
|
+
cards: cards
|
|
2655
2843
|
}, status === apiStatus.PENDING && /*#__PURE__*/React__default.createElement("div", {
|
|
2656
|
-
className: s$
|
|
2844
|
+
className: s$9.loader
|
|
2657
2845
|
}, /*#__PURE__*/React__default.createElement(LoadingIndicator, null)), status === apiStatus.SUCCESS && eligiblePlans.length === 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
2658
|
-
className: s$
|
|
2846
|
+
className: s$9.noEligibility
|
|
2659
2847
|
}, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2660
2848
|
id: "eligibility-modal.no-eligibility",
|
|
2661
2849
|
defaultMessage: "Oups, il semblerait que la simulation n'ait pas fonctionn\xE9."
|
|
@@ -2676,7 +2864,8 @@ var ModalContainer = function ModalContainer(_ref) {
|
|
|
2676
2864
|
var purchaseAmount = _ref.purchaseAmount,
|
|
2677
2865
|
apiData = _ref.apiData,
|
|
2678
2866
|
configPlans = _ref.configPlans,
|
|
2679
|
-
onClose = _ref.onClose
|
|
2867
|
+
onClose = _ref.onClose,
|
|
2868
|
+
cards = _ref.cards;
|
|
2680
2869
|
|
|
2681
2870
|
var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
|
|
2682
2871
|
eligibilityPlans = _useFetchEligibility[0],
|
|
@@ -2686,21 +2875,22 @@ var ModalContainer = function ModalContainer(_ref) {
|
|
|
2686
2875
|
initialPlanIndex: 0,
|
|
2687
2876
|
onClose: onClose,
|
|
2688
2877
|
eligibilityPlans: eligibilityPlans,
|
|
2689
|
-
status: status
|
|
2878
|
+
status: status,
|
|
2879
|
+
cards: cards
|
|
2690
2880
|
});
|
|
2691
2881
|
};
|
|
2692
2882
|
|
|
2693
|
-
var s$
|
|
2883
|
+
var s$b = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
|
|
2694
2884
|
|
|
2695
2885
|
var Loader = function Loader(_ref) {
|
|
2696
2886
|
var className = _ref.className;
|
|
2697
2887
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2698
|
-
className: cx(s$
|
|
2888
|
+
className: cx(s$b.loadingIndicator, className),
|
|
2699
2889
|
"data-testid": "loader"
|
|
2700
2890
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2701
|
-
className: s$
|
|
2891
|
+
className: s$b.line1
|
|
2702
2892
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
2703
|
-
className: s$
|
|
2893
|
+
className: s$b.line2
|
|
2704
2894
|
}));
|
|
2705
2895
|
};
|
|
2706
2896
|
|
|
@@ -2793,7 +2983,7 @@ var STATIC_CUSTOMISATION_CLASSES$1 = {
|
|
|
2793
2983
|
activeOption: prefix$1 + '-active-option'
|
|
2794
2984
|
};
|
|
2795
2985
|
|
|
2796
|
-
var s$
|
|
2986
|
+
var s$c = {"widgetButton":"_TSkFv","logo":"_LJ4nZ","primaryContainer":"_bMClc","paymentPlans":"_17c_S","plan":"_2Kqjn","active":"_3dG_J","polychrome":"_2icEF","notEligible":"_3O1bg","info":"_25GrF","loader":"_30j1O","error":"_R0YlN","errorText":"_2kGhu","errorButton":"_73d_Y","pending":"_1ZDMS","clickable":"_UksZa","unClickable":"_1lr-q"};
|
|
2797
2987
|
|
|
2798
2988
|
var VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
|
|
2799
2989
|
var DEFAULT_TRANSITION_TIME = 5500;
|
|
@@ -2801,12 +2991,14 @@ var DEFAULT_TRANSITION_TIME = 5500;
|
|
|
2801
2991
|
var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|
|
2802
2992
|
var _cx, _cx3;
|
|
2803
2993
|
|
|
2804
|
-
var
|
|
2805
|
-
apiData = _ref.apiData,
|
|
2994
|
+
var apiData = _ref.apiData,
|
|
2806
2995
|
configPlans = _ref.configPlans,
|
|
2807
|
-
transitionDelay = _ref.transitionDelay,
|
|
2808
2996
|
hideIfNotEligible = _ref.hideIfNotEligible,
|
|
2809
|
-
|
|
2997
|
+
monochrome = _ref.monochrome,
|
|
2998
|
+
purchaseAmount = _ref.purchaseAmount,
|
|
2999
|
+
suggestedPaymentPlan = _ref.suggestedPaymentPlan,
|
|
3000
|
+
cards = _ref.cards,
|
|
3001
|
+
transitionDelay = _ref.transitionDelay;
|
|
2810
3002
|
|
|
2811
3003
|
var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
|
|
2812
3004
|
eligibilityPlans = _useFetchEligibility[0],
|
|
@@ -2886,7 +3078,7 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|
|
|
2886
3078
|
|
|
2887
3079
|
if (status === apiStatus.PENDING) {
|
|
2888
3080
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2889
|
-
className: cx(s$
|
|
3081
|
+
className: cx(s$c.widgetButton, s$c.pending)
|
|
2890
3082
|
}, /*#__PURE__*/React__default.createElement(Loader, null));
|
|
2891
3083
|
}
|
|
2892
3084
|
|
|
@@ -2904,32 +3096,35 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|
|
|
2904
3096
|
|
|
2905
3097
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
2906
3098
|
onClick: handleOpenModal,
|
|
2907
|
-
className: cx(s$
|
|
3099
|
+
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),
|
|
2908
3100
|
"data-testid": "widget-button"
|
|
2909
3101
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2910
|
-
className: cx(s$
|
|
3102
|
+
className: cx(s$c.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
|
|
2911
3103
|
}, /*#__PURE__*/React__default.createElement(LogoIcon, {
|
|
2912
|
-
className: s$
|
|
3104
|
+
className: s$c.logo,
|
|
3105
|
+
monochrome: monochrome
|
|
2913
3106
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
2914
|
-
className: cx(s$
|
|
3107
|
+
className: cx(s$c.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
|
|
2915
3108
|
}, eligibilityPlans.map(function (eligibilityPlan, key) {
|
|
2916
3109
|
var _cx2;
|
|
2917
3110
|
|
|
3111
|
+
var isCurrent = key === current;
|
|
2918
3112
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2919
3113
|
key: key,
|
|
2920
3114
|
onMouseEnter: function onMouseEnter() {
|
|
2921
3115
|
return onHover(key);
|
|
2922
3116
|
},
|
|
2923
3117
|
onMouseOut: onLeave,
|
|
2924
|
-
className: cx(s$
|
|
3118
|
+
className: cx(s$c.plan, (_cx2 = {}, _cx2[cx(s$c.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)] = isCurrent, _cx2[s$c.polychrome] = !monochrome && isCurrent, _cx2[cx(s$c.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = !eligibilityPlan.eligible, _cx2))
|
|
2925
3119
|
}, paymentPlanShorthandName(eligibilityPlan));
|
|
2926
3120
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
2927
|
-
className: cx(s$
|
|
3121
|
+
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)
|
|
2928
3122
|
}, eligibilityPlans.length !== 0 && paymentPlanInfoText(eligibilityPlans[current]))), isOpen && /*#__PURE__*/React__default.createElement(EligibilityModal, {
|
|
2929
3123
|
initialPlanIndex: getIndexWithinEligiblePlans(current),
|
|
2930
3124
|
onClose: closeModal,
|
|
2931
3125
|
eligibilityPlans: eligiblePlans,
|
|
2932
|
-
status: status
|
|
3126
|
+
status: status,
|
|
3127
|
+
cards: cards
|
|
2933
3128
|
}));
|
|
2934
3129
|
};
|
|
2935
3130
|
|
|
@@ -2955,20 +3150,25 @@ var WidgetsController = /*#__PURE__*/function () {
|
|
|
2955
3150
|
plans = options.plans,
|
|
2956
3151
|
transitionDelay = options.transitionDelay,
|
|
2957
3152
|
hideIfNotEligible = options.hideIfNotEligible,
|
|
3153
|
+
_options$monochrome = options.monochrome,
|
|
3154
|
+
monochrome = _options$monochrome === void 0 ? true : _options$monochrome,
|
|
2958
3155
|
suggestedPaymentPlan = options.suggestedPaymentPlan,
|
|
2959
3156
|
_options$locale = options.locale,
|
|
2960
|
-
locale = _options$locale === void 0 ? Locale.en : _options$locale
|
|
3157
|
+
locale = _options$locale === void 0 ? Locale.en : _options$locale,
|
|
3158
|
+
cards = options.cards;
|
|
2961
3159
|
|
|
2962
3160
|
if (containerDiv) {
|
|
2963
3161
|
reactDom.render( /*#__PURE__*/React__default.createElement(Provider, {
|
|
2964
3162
|
locale: locale
|
|
2965
3163
|
}, /*#__PURE__*/React__default.createElement(PaymentPlanWidget, {
|
|
2966
|
-
purchaseAmount: purchaseAmount,
|
|
2967
3164
|
apiData: this.apiData,
|
|
2968
3165
|
configPlans: plans,
|
|
2969
|
-
transitionDelay: transitionDelay,
|
|
2970
3166
|
hideIfNotEligible: hideIfNotEligible,
|
|
2971
|
-
|
|
3167
|
+
monochrome: monochrome,
|
|
3168
|
+
purchaseAmount: purchaseAmount,
|
|
3169
|
+
suggestedPaymentPlan: suggestedPaymentPlan,
|
|
3170
|
+
cards: cards,
|
|
3171
|
+
transitionDelay: transitionDelay
|
|
2972
3172
|
})), document.querySelector(container));
|
|
2973
3173
|
}
|
|
2974
3174
|
}
|
|
@@ -2979,7 +3179,8 @@ var WidgetsController = /*#__PURE__*/function () {
|
|
|
2979
3179
|
_purchaseAmount = options.purchaseAmount,
|
|
2980
3180
|
_plans = options.plans,
|
|
2981
3181
|
_options$locale2 = options.locale,
|
|
2982
|
-
_locale = _options$locale2 === void 0 ? Locale.en : _options$locale2
|
|
3182
|
+
_locale = _options$locale2 === void 0 ? Locale.en : _options$locale2,
|
|
3183
|
+
_cards = options.cards;
|
|
2983
3184
|
|
|
2984
3185
|
var close = function close() {
|
|
2985
3186
|
return containerDiv && reactDom.unmountComponentAtNode(containerDiv);
|
|
@@ -2992,7 +3193,8 @@ var WidgetsController = /*#__PURE__*/function () {
|
|
|
2992
3193
|
purchaseAmount: _purchaseAmount,
|
|
2993
3194
|
apiData: _this.apiData,
|
|
2994
3195
|
configPlans: _plans,
|
|
2995
|
-
onClose: close
|
|
3196
|
+
onClose: close,
|
|
3197
|
+
cards: _cards
|
|
2996
3198
|
})), document.querySelector(_container));
|
|
2997
3199
|
}; // if clickableSelector is provided, add an onClick event handler to open the Modal.
|
|
2998
3200
|
|