@alma/widgets 2.6.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.
- package/dist/raw/widgets.css +10 -0
- package/dist/raw/widgets.js +232 -47
- package/dist/raw/widgets.js.map +1 -1
- package/dist/raw/widgets.m.js +232 -47
- package/dist/raw/widgets.m.js.map +1 -1
- package/dist/raw/widgets.modern.js +228 -52
- package/dist/raw/widgets.modern.js.map +1 -1
- package/dist/raw/widgets.umd.js +232 -47
- 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/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/index.d.ts +2 -1
- 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 +3 -0
- package/dist/widgets.css +1 -0
- 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.umd.js
CHANGED
|
@@ -16781,6 +16781,7 @@
|
|
|
16781
16781
|
scheduleDetails: prefix + '-schedule-details',
|
|
16782
16782
|
scheduleTotal: prefix + '-schedule-total',
|
|
16783
16783
|
scheduleCredit: prefix + '-schedule-credit',
|
|
16784
|
+
cardContainer: prefix + '-card-logos',
|
|
16784
16785
|
summary: prefix + '-summary'
|
|
16785
16786
|
};
|
|
16786
16787
|
|
|
@@ -18400,16 +18401,184 @@
|
|
|
18400
18401
|
}))));
|
|
18401
18402
|
};
|
|
18402
18403
|
|
|
18403
|
-
var
|
|
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"
|
|
18463
|
+
})));
|
|
18464
|
+
};
|
|
18465
|
+
|
|
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"};
|
|
18404
18573
|
|
|
18405
18574
|
var Info = function Info() {
|
|
18406
18575
|
return /*#__PURE__*/react.createElement("div", {
|
|
18407
|
-
className: classnames(s$
|
|
18576
|
+
className: classnames(s$5.list, STATIC_CUSTOMISATION_CLASSES.info),
|
|
18408
18577
|
"data-testid": "modal-info-element"
|
|
18409
18578
|
}, /*#__PURE__*/react.createElement("div", {
|
|
18410
|
-
className: s$
|
|
18579
|
+
className: s$5.listItem
|
|
18411
18580
|
}, /*#__PURE__*/react.createElement("div", {
|
|
18412
|
-
className: s$
|
|
18581
|
+
className: s$5.bullet
|
|
18413
18582
|
}, "1"), /*#__PURE__*/react.createElement("div", {
|
|
18414
18583
|
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
18415
18584
|
}, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
@@ -18421,9 +18590,9 @@
|
|
|
18421
18590
|
}
|
|
18422
18591
|
}
|
|
18423
18592
|
}))), /*#__PURE__*/react.createElement("div", {
|
|
18424
|
-
className: s$
|
|
18593
|
+
className: s$5.listItem
|
|
18425
18594
|
}, /*#__PURE__*/react.createElement("div", {
|
|
18426
|
-
className: s$
|
|
18595
|
+
className: s$5.bullet
|
|
18427
18596
|
}, "2"), /*#__PURE__*/react.createElement("div", {
|
|
18428
18597
|
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
18429
18598
|
}, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
@@ -18435,9 +18604,9 @@
|
|
|
18435
18604
|
}
|
|
18436
18605
|
}
|
|
18437
18606
|
}))), /*#__PURE__*/react.createElement("div", {
|
|
18438
|
-
className: s$
|
|
18607
|
+
className: s$5.listItem
|
|
18439
18608
|
}, /*#__PURE__*/react.createElement("div", {
|
|
18440
|
-
className: s$
|
|
18609
|
+
className: s$5.bullet
|
|
18441
18610
|
}, "3"), /*#__PURE__*/react.createElement("div", {
|
|
18442
18611
|
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
18443
18612
|
}, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
@@ -18484,22 +18653,22 @@
|
|
|
18484
18653
|
}));
|
|
18485
18654
|
}
|
|
18486
18655
|
|
|
18487
|
-
var s$
|
|
18656
|
+
var s$6 = {"logo":"_3Oyv_"};
|
|
18488
18657
|
|
|
18489
18658
|
var Logo = function Logo() {
|
|
18490
18659
|
return /*#__PURE__*/react.createElement("div", {
|
|
18491
|
-
className: s$
|
|
18660
|
+
className: s$6.logo
|
|
18492
18661
|
}, /*#__PURE__*/react.createElement(LogoIcon, {
|
|
18493
18662
|
underlineColor: "#FF414D"
|
|
18494
18663
|
}));
|
|
18495
18664
|
};
|
|
18496
18665
|
|
|
18497
|
-
var s$
|
|
18666
|
+
var s$7 = {"title":"_3ERx-"};
|
|
18498
18667
|
|
|
18499
18668
|
var Title = function Title(_ref) {
|
|
18500
18669
|
var isSomePlanDeferred = _ref.isSomePlanDeferred;
|
|
18501
18670
|
return /*#__PURE__*/react.createElement("div", {
|
|
18502
|
-
className: classnames(s$
|
|
18671
|
+
className: classnames(s$7.title, STATIC_CUSTOMISATION_CLASSES.title),
|
|
18503
18672
|
"data-testid": "modal-title-element"
|
|
18504
18673
|
}, isSomePlanDeferred ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
18505
18674
|
id: 'eligibility-modal.title-deferred',
|
|
@@ -18520,43 +18689,50 @@
|
|
|
18520
18689
|
}));
|
|
18521
18690
|
};
|
|
18522
18691
|
|
|
18523
|
-
var s$
|
|
18692
|
+
var s$8 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC"};
|
|
18524
18693
|
|
|
18525
18694
|
var DesktopModal = function DesktopModal(_ref) {
|
|
18526
18695
|
var children = _ref.children,
|
|
18527
|
-
isSomePlanDeferred = _ref.isSomePlanDeferred
|
|
18696
|
+
isSomePlanDeferred = _ref.isSomePlanDeferred,
|
|
18697
|
+
cards = _ref.cards;
|
|
18528
18698
|
return /*#__PURE__*/react.createElement("div", {
|
|
18529
|
-
className: s$
|
|
18699
|
+
className: s$8.container,
|
|
18530
18700
|
"data-testid": "modal-container"
|
|
18531
18701
|
}, /*#__PURE__*/react.createElement("div", {
|
|
18532
|
-
className: classnames([s$
|
|
18702
|
+
className: classnames([s$8.block, s$8.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
|
|
18533
18703
|
}, /*#__PURE__*/react.createElement(Title, {
|
|
18534
18704
|
isSomePlanDeferred: isSomePlanDeferred
|
|
18535
|
-
}), /*#__PURE__*/react.createElement(Info, null),
|
|
18536
|
-
|
|
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)
|
|
18537
18709
|
}, children));
|
|
18538
18710
|
};
|
|
18539
18711
|
|
|
18540
|
-
var s$
|
|
18712
|
+
var s$9 = {"noEligibility":"_17qNJ","loader":"_2oTJq"};
|
|
18541
18713
|
|
|
18542
|
-
var s$
|
|
18714
|
+
var s$a = {"container":"_2G7Ch"};
|
|
18543
18715
|
|
|
18544
18716
|
var MobileModal = function MobileModal(_ref) {
|
|
18545
18717
|
var children = _ref.children,
|
|
18546
|
-
isSomePlanDeferred = _ref.isSomePlanDeferred
|
|
18718
|
+
isSomePlanDeferred = _ref.isSomePlanDeferred,
|
|
18719
|
+
cards = _ref.cards;
|
|
18547
18720
|
return /*#__PURE__*/react.createElement("div", {
|
|
18548
|
-
className: s$
|
|
18721
|
+
className: s$a.container,
|
|
18549
18722
|
"data-testid": "modal-container"
|
|
18550
18723
|
}, /*#__PURE__*/react.createElement(Title, {
|
|
18551
18724
|
isSomePlanDeferred: isSomePlanDeferred
|
|
18552
|
-
}), children, /*#__PURE__*/react.createElement(Info, null), /*#__PURE__*/react.createElement(
|
|
18725
|
+
}), children, /*#__PURE__*/react.createElement(Info, null), cards && /*#__PURE__*/react.createElement(Cards, {
|
|
18726
|
+
cards: cards
|
|
18727
|
+
}), /*#__PURE__*/react.createElement(Logo, null));
|
|
18553
18728
|
};
|
|
18554
18729
|
|
|
18555
18730
|
var EligibilityModal = function EligibilityModal(_ref) {
|
|
18556
18731
|
var initialPlanIndex = _ref.initialPlanIndex,
|
|
18557
18732
|
onClose = _ref.onClose,
|
|
18558
18733
|
eligibilityPlans = _ref.eligibilityPlans,
|
|
18559
|
-
status = _ref.status
|
|
18734
|
+
status = _ref.status,
|
|
18735
|
+
cards = _ref.cards;
|
|
18560
18736
|
|
|
18561
18737
|
var _useState = react.useState(initialPlanIndex || 0),
|
|
18562
18738
|
currentPlanIndex = _useState[0],
|
|
@@ -18579,11 +18755,12 @@
|
|
|
18579
18755
|
scrollable: true,
|
|
18580
18756
|
isOpen: true
|
|
18581
18757
|
}, /*#__PURE__*/react.createElement(ModalComponent, {
|
|
18582
|
-
isSomePlanDeferred: isSomePlanDeferred
|
|
18758
|
+
isSomePlanDeferred: isSomePlanDeferred,
|
|
18759
|
+
cards: cards
|
|
18583
18760
|
}, status === apiStatus.PENDING && /*#__PURE__*/react.createElement("div", {
|
|
18584
|
-
className: s$
|
|
18761
|
+
className: s$9.loader
|
|
18585
18762
|
}, /*#__PURE__*/react.createElement(LoadingIndicator, null)), status === apiStatus.SUCCESS && eligiblePlans.length === 0 && /*#__PURE__*/react.createElement("div", {
|
|
18586
|
-
className: s$
|
|
18763
|
+
className: s$9.noEligibility
|
|
18587
18764
|
}, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
|
|
18588
18765
|
id: "eligibility-modal.no-eligibility",
|
|
18589
18766
|
defaultMessage: "Oups, il semblerait que la simulation n'ait pas fonctionn\xE9."
|
|
@@ -18604,7 +18781,8 @@
|
|
|
18604
18781
|
var purchaseAmount = _ref.purchaseAmount,
|
|
18605
18782
|
apiData = _ref.apiData,
|
|
18606
18783
|
configPlans = _ref.configPlans,
|
|
18607
|
-
onClose = _ref.onClose
|
|
18784
|
+
onClose = _ref.onClose,
|
|
18785
|
+
cards = _ref.cards;
|
|
18608
18786
|
|
|
18609
18787
|
var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
|
|
18610
18788
|
eligibilityPlans = _useFetchEligibility[0],
|
|
@@ -18614,21 +18792,22 @@
|
|
|
18614
18792
|
initialPlanIndex: 0,
|
|
18615
18793
|
onClose: onClose,
|
|
18616
18794
|
eligibilityPlans: eligibilityPlans,
|
|
18617
|
-
status: status
|
|
18795
|
+
status: status,
|
|
18796
|
+
cards: cards
|
|
18618
18797
|
});
|
|
18619
18798
|
};
|
|
18620
18799
|
|
|
18621
|
-
var s$
|
|
18800
|
+
var s$b = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
|
|
18622
18801
|
|
|
18623
18802
|
var Loader = function Loader(_ref) {
|
|
18624
18803
|
var className = _ref.className;
|
|
18625
18804
|
return /*#__PURE__*/react.createElement("div", {
|
|
18626
|
-
className: classnames(s$
|
|
18805
|
+
className: classnames(s$b.loadingIndicator, className),
|
|
18627
18806
|
"data-testid": "loader"
|
|
18628
18807
|
}, /*#__PURE__*/react.createElement("div", {
|
|
18629
|
-
className: s$
|
|
18808
|
+
className: s$b.line1
|
|
18630
18809
|
}), /*#__PURE__*/react.createElement("div", {
|
|
18631
|
-
className: s$
|
|
18810
|
+
className: s$b.line2
|
|
18632
18811
|
}));
|
|
18633
18812
|
};
|
|
18634
18813
|
|
|
@@ -18721,7 +18900,7 @@
|
|
|
18721
18900
|
activeOption: prefix$1 + '-active-option'
|
|
18722
18901
|
};
|
|
18723
18902
|
|
|
18724
|
-
var s$
|
|
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"};
|
|
18725
18904
|
|
|
18726
18905
|
var VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
|
|
18727
18906
|
var DEFAULT_TRANSITION_TIME = 5500;
|
|
@@ -18734,7 +18913,8 @@
|
|
|
18734
18913
|
configPlans = _ref.configPlans,
|
|
18735
18914
|
transitionDelay = _ref.transitionDelay,
|
|
18736
18915
|
hideIfNotEligible = _ref.hideIfNotEligible,
|
|
18737
|
-
suggestedPaymentPlan = _ref.suggestedPaymentPlan
|
|
18916
|
+
suggestedPaymentPlan = _ref.suggestedPaymentPlan,
|
|
18917
|
+
cards = _ref.cards;
|
|
18738
18918
|
|
|
18739
18919
|
var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
|
|
18740
18920
|
eligibilityPlans = _useFetchEligibility[0],
|
|
@@ -18814,7 +18994,7 @@
|
|
|
18814
18994
|
|
|
18815
18995
|
if (status === apiStatus.PENDING) {
|
|
18816
18996
|
return /*#__PURE__*/react.createElement("div", {
|
|
18817
|
-
className: classnames(s$
|
|
18997
|
+
className: classnames(s$c.widgetButton, s$c.pending)
|
|
18818
18998
|
}, /*#__PURE__*/react.createElement(Loader, null));
|
|
18819
18999
|
}
|
|
18820
19000
|
|
|
@@ -18832,14 +19012,14 @@
|
|
|
18832
19012
|
|
|
18833
19013
|
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
|
18834
19014
|
onClick: handleOpenModal,
|
|
18835
|
-
className: classnames(s$
|
|
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),
|
|
18836
19016
|
"data-testid": "widget-button"
|
|
18837
19017
|
}, /*#__PURE__*/react.createElement("div", {
|
|
18838
|
-
className: classnames(s$
|
|
19018
|
+
className: classnames(s$c.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
|
|
18839
19019
|
}, /*#__PURE__*/react.createElement(LogoIcon, {
|
|
18840
|
-
className: s$
|
|
19020
|
+
className: s$c.logo
|
|
18841
19021
|
}), /*#__PURE__*/react.createElement("div", {
|
|
18842
|
-
className: classnames(s$
|
|
19022
|
+
className: classnames(s$c.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
|
|
18843
19023
|
}, eligibilityPlans.map(function (eligibilityPlan, key) {
|
|
18844
19024
|
var _cx2;
|
|
18845
19025
|
|
|
@@ -18849,15 +19029,16 @@
|
|
|
18849
19029
|
return onHover(key);
|
|
18850
19030
|
},
|
|
18851
19031
|
onMouseOut: onLeave,
|
|
18852
|
-
className: classnames(s$
|
|
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))
|
|
18853
19033
|
}, paymentPlanShorthandName(eligibilityPlan));
|
|
18854
19034
|
}))), /*#__PURE__*/react.createElement("div", {
|
|
18855
|
-
className: classnames(s$
|
|
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)
|
|
18856
19036
|
}, eligibilityPlans.length !== 0 && paymentPlanInfoText(eligibilityPlans[current]))), isOpen && /*#__PURE__*/react.createElement(EligibilityModal, {
|
|
18857
19037
|
initialPlanIndex: getIndexWithinEligiblePlans(current),
|
|
18858
19038
|
onClose: closeModal,
|
|
18859
19039
|
eligibilityPlans: eligiblePlans,
|
|
18860
|
-
status: status
|
|
19040
|
+
status: status,
|
|
19041
|
+
cards: cards
|
|
18861
19042
|
}));
|
|
18862
19043
|
};
|
|
18863
19044
|
|
|
@@ -18885,7 +19066,8 @@
|
|
|
18885
19066
|
hideIfNotEligible = options.hideIfNotEligible,
|
|
18886
19067
|
suggestedPaymentPlan = options.suggestedPaymentPlan,
|
|
18887
19068
|
_options$locale = options.locale,
|
|
18888
|
-
locale = _options$locale === void 0 ? Locale.en : _options$locale
|
|
19069
|
+
locale = _options$locale === void 0 ? Locale.en : _options$locale,
|
|
19070
|
+
cards = options.cards;
|
|
18889
19071
|
|
|
18890
19072
|
if (containerDiv) {
|
|
18891
19073
|
reactDom.render( /*#__PURE__*/react.createElement(Provider$1, {
|
|
@@ -18896,7 +19078,8 @@
|
|
|
18896
19078
|
configPlans: plans,
|
|
18897
19079
|
transitionDelay: transitionDelay,
|
|
18898
19080
|
hideIfNotEligible: hideIfNotEligible,
|
|
18899
|
-
suggestedPaymentPlan: suggestedPaymentPlan
|
|
19081
|
+
suggestedPaymentPlan: suggestedPaymentPlan,
|
|
19082
|
+
cards: cards
|
|
18900
19083
|
})), document.querySelector(container));
|
|
18901
19084
|
}
|
|
18902
19085
|
}
|
|
@@ -18907,7 +19090,8 @@
|
|
|
18907
19090
|
_purchaseAmount = options.purchaseAmount,
|
|
18908
19091
|
_plans = options.plans,
|
|
18909
19092
|
_options$locale2 = options.locale,
|
|
18910
|
-
_locale = _options$locale2 === void 0 ? Locale.en : _options$locale2
|
|
19093
|
+
_locale = _options$locale2 === void 0 ? Locale.en : _options$locale2,
|
|
19094
|
+
_cards = options.cards;
|
|
18911
19095
|
|
|
18912
19096
|
var close = function close() {
|
|
18913
19097
|
return containerDiv && reactDom.unmountComponentAtNode(containerDiv);
|
|
@@ -18920,7 +19104,8 @@
|
|
|
18920
19104
|
purchaseAmount: _purchaseAmount,
|
|
18921
19105
|
apiData: _this.apiData,
|
|
18922
19106
|
configPlans: _plans,
|
|
18923
|
-
onClose: close
|
|
19107
|
+
onClose: close,
|
|
19108
|
+
cards: _cards
|
|
18924
19109
|
})), document.querySelector(_container));
|
|
18925
19110
|
}; // if clickableSelector is provided, add an onClick event handler to open the Modal.
|
|
18926
19111
|
|