@alma/widgets 2.8.3 → 2.10.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 +4 -0
- package/dist/raw/widgets.js +16 -5
- package/dist/raw/widgets.js.map +1 -1
- package/dist/raw/widgets.m.js +16 -5
- package/dist/raw/widgets.m.js.map +1 -1
- package/dist/raw/widgets.modern.js +13 -5
- package/dist/raw/widgets.modern.js.map +1 -1
- package/dist/raw/widgets.umd.js +16 -5
- package/dist/raw/widgets.umd.js.map +1 -1
- package/dist/types/Widgets/PaymentPlans/__tests__/HideBorder.test.d.ts +1 -0
- package/dist/types/Widgets/PaymentPlans/index.d.ts +1 -0
- package/dist/types/hooks/useButtonAnimation.d.ts +2 -1
- package/dist/types/types.d.ts +1 -0
- package/dist/widgets.css +1 -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.umd.js
CHANGED
|
@@ -20356,11 +20356,12 @@
|
|
|
20356
20356
|
setUpdate = _useState2[1];
|
|
20357
20357
|
|
|
20358
20358
|
react.useEffect(function () {
|
|
20359
|
+
var timeout;
|
|
20359
20360
|
var isMounted = true;
|
|
20360
20361
|
|
|
20361
20362
|
if (iterateValues.length !== 0) {
|
|
20362
20363
|
if (!iterateValues.includes(current) && update) setCurrent(iterateValues[0]);
|
|
20363
|
-
setTimeout(function () {
|
|
20364
|
+
timeout = setTimeout(function () {
|
|
20364
20365
|
if (update && isMounted) {
|
|
20365
20366
|
setCurrent(iterateValues[iterateValues.includes(current) ? (iterateValues.indexOf(current) + 1) % iterateValues.length : 0]);
|
|
20366
20367
|
}
|
|
@@ -20369,6 +20370,7 @@
|
|
|
20369
20370
|
|
|
20370
20371
|
return function () {
|
|
20371
20372
|
isMounted = false;
|
|
20373
|
+
clearTimeout(timeout);
|
|
20372
20374
|
};
|
|
20373
20375
|
}, [iterateValues, current]);
|
|
20374
20376
|
return {
|
|
@@ -20435,7 +20437,7 @@
|
|
|
20435
20437
|
activeOption: prefix$1 + '-active-option'
|
|
20436
20438
|
};
|
|
20437
20439
|
|
|
20438
|
-
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"};
|
|
20440
|
+
var s$c = {"widgetButton":"_TSkFv","logo":"_LJ4nZ","primaryContainer":"_bMClc","paymentPlans":"_17c_S","plan":"_2Kqjn","active":"_3dG_J","polychrome":"_2icEF","notEligible":"_3O1bg","hideBorder":"_3_qcn","info":"_25GrF","loader":"_30j1O","error":"_R0YlN","errorText":"_2kGhu","errorButton":"_73d_Y","pending":"_1ZDMS","clickable":"_UksZa","unClickable":"_1lr-q"};
|
|
20439
20441
|
|
|
20440
20442
|
var VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
|
|
20441
20443
|
var DEFAULT_TRANSITION_TIME = 5500;
|
|
@@ -20450,7 +20452,9 @@
|
|
|
20450
20452
|
purchaseAmount = _ref.purchaseAmount,
|
|
20451
20453
|
suggestedPaymentPlan = _ref.suggestedPaymentPlan,
|
|
20452
20454
|
cards = _ref.cards,
|
|
20453
|
-
transitionDelay = _ref.transitionDelay
|
|
20455
|
+
transitionDelay = _ref.transitionDelay,
|
|
20456
|
+
_ref$hideBorder = _ref.hideBorder,
|
|
20457
|
+
hideBorder = _ref$hideBorder === void 0 ? false : _ref$hideBorder;
|
|
20454
20458
|
|
|
20455
20459
|
var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
|
|
20456
20460
|
eligibilityPlans = _useFetchEligibility[0],
|
|
@@ -20548,7 +20552,7 @@
|
|
|
20548
20552
|
|
|
20549
20553
|
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
|
20550
20554
|
onClick: handleOpenModal,
|
|
20551
|
-
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),
|
|
20555
|
+
className: classnames(s$c.widgetButton, (_cx = {}, _cx[s$c.clickable] = eligiblePlans.length > 0, _cx[s$c.unClickable] = eligiblePlans.length === 0, _cx[s$c.hideBorder] = hideBorder, _cx), STATIC_CUSTOMISATION_CLASSES$1.container),
|
|
20552
20556
|
"data-testid": "widget-button"
|
|
20553
20557
|
}, /*#__PURE__*/react.createElement("div", {
|
|
20554
20558
|
className: classnames(s$c.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
|
|
@@ -20566,7 +20570,11 @@
|
|
|
20566
20570
|
onMouseEnter: function onMouseEnter() {
|
|
20567
20571
|
return onHover(key);
|
|
20568
20572
|
},
|
|
20573
|
+
onTouchStart: function onTouchStart() {
|
|
20574
|
+
return onHover(key);
|
|
20575
|
+
},
|
|
20569
20576
|
onMouseOut: onLeave,
|
|
20577
|
+
onTouchEnd: onLeave,
|
|
20570
20578
|
className: classnames(s$c.plan, (_cx2 = {}, _cx2[classnames(s$c.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)] = isCurrent, _cx2[s$c.polychrome] = !monochrome && isCurrent, _cx2[classnames(s$c.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = !eligibilityPlan.eligible, _cx2))
|
|
20571
20579
|
}, paymentPlanShorthandName(eligibilityPlan));
|
|
20572
20580
|
}))), /*#__PURE__*/react.createElement("div", {
|
|
@@ -20602,6 +20610,8 @@
|
|
|
20602
20610
|
plans = options.plans,
|
|
20603
20611
|
transitionDelay = options.transitionDelay,
|
|
20604
20612
|
hideIfNotEligible = options.hideIfNotEligible,
|
|
20613
|
+
_options$hideBorder = options.hideBorder,
|
|
20614
|
+
hideBorder = _options$hideBorder === void 0 ? false : _options$hideBorder,
|
|
20605
20615
|
_options$monochrome = options.monochrome,
|
|
20606
20616
|
monochrome = _options$monochrome === void 0 ? true : _options$monochrome,
|
|
20607
20617
|
suggestedPaymentPlan = options.suggestedPaymentPlan,
|
|
@@ -20620,7 +20630,8 @@
|
|
|
20620
20630
|
purchaseAmount: purchaseAmount,
|
|
20621
20631
|
suggestedPaymentPlan: suggestedPaymentPlan,
|
|
20622
20632
|
cards: cards,
|
|
20623
|
-
transitionDelay: transitionDelay
|
|
20633
|
+
transitionDelay: transitionDelay,
|
|
20634
|
+
hideBorder: hideBorder
|
|
20624
20635
|
})), document.querySelector(container));
|
|
20625
20636
|
}
|
|
20626
20637
|
}
|