wickes-css2 2.107.0-develop.3 → 2.107.0-develop.5
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/Readme.md +1 -0
- package/build/css/components/checkout-chip.css +1 -1
- package/build/css/components/checkout-payment-details-v2.css +1 -1
- package/build/css/main.css +1 -1
- package/build/js/page/checkout-payment-details.js +12 -1
- package/build/js/page/checkout.js +1 -1
- package/package.json +1 -1
- package/src/js/page/checkout-payment-details.js +12 -1
- package/src/js/page/checkout.js +1 -1
- package/src/scss/components/checkout-chip.scss +1 -0
- package/src/scss/components/checkout-payment-details-v2.scss +12 -0
|
@@ -13,6 +13,7 @@ Wick.CheckoutPaymentDetails = (function () {
|
|
|
13
13
|
const elements = {
|
|
14
14
|
$billieRepaymentTerms: $('.js-billie-repayment-terms'),
|
|
15
15
|
$billieInfoBlock: $('.checkout-payment-details__billie'),
|
|
16
|
+
$billieInfo: $('.checkout-payment-details__billie .billie-info'),
|
|
16
17
|
$wrapperPaymentInput: $('.checkout-payment-details__row'),
|
|
17
18
|
paymentInputName: '[name=payment-method]',
|
|
18
19
|
$cardDetails: $('.checkout-payment-details__card-details'),
|
|
@@ -103,7 +104,7 @@ Wick.CheckoutPaymentDetails = (function () {
|
|
|
103
104
|
|
|
104
105
|
function setBillieStepVisibility(isReady) {
|
|
105
106
|
setBillingDetailsRowVisibility(isReady);
|
|
106
|
-
elements.$
|
|
107
|
+
elements.$billieInfo.toggleClass(elements.hiddenClass, !isReady);
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
function resetBillieRepaymentSelection() {
|
|
@@ -239,6 +240,12 @@ Wick.CheckoutPaymentDetails = (function () {
|
|
|
239
240
|
});
|
|
240
241
|
}
|
|
241
242
|
|
|
243
|
+
function forceReflow($element) {
|
|
244
|
+
if (!$element.length) return;
|
|
245
|
+
void $element[0].offsetHeight;
|
|
246
|
+
$(window).trigger('resize');
|
|
247
|
+
}
|
|
248
|
+
|
|
242
249
|
function init() {
|
|
243
250
|
const paymentMethods = getPaymentMethods();
|
|
244
251
|
initBillieBusinessTypeToggle();
|
|
@@ -248,6 +255,10 @@ Wick.CheckoutPaymentDetails = (function () {
|
|
|
248
255
|
const currentMethod = $(elements.paymentInputName + ':checked').val();
|
|
249
256
|
if (currentMethod !== 'billie') return;
|
|
250
257
|
|
|
258
|
+
requestAnimationFrame(() => {
|
|
259
|
+
forceReflow(elements.$billieInfoBlock);
|
|
260
|
+
});
|
|
261
|
+
|
|
251
262
|
const hasSelection = $('input[name="repaymentTerms"]:checked').length > 0;
|
|
252
263
|
setBillieStepVisibility(hasSelection);
|
|
253
264
|
|
package/package.json
CHANGED
|
@@ -13,6 +13,7 @@ Wick.CheckoutPaymentDetails = (function () {
|
|
|
13
13
|
const elements = {
|
|
14
14
|
$billieRepaymentTerms: $('.js-billie-repayment-terms'),
|
|
15
15
|
$billieInfoBlock: $('.checkout-payment-details__billie'),
|
|
16
|
+
$billieInfo: $('.checkout-payment-details__billie .billie-info'),
|
|
16
17
|
$wrapperPaymentInput: $('.checkout-payment-details__row'),
|
|
17
18
|
paymentInputName: '[name=payment-method]',
|
|
18
19
|
$cardDetails: $('.checkout-payment-details__card-details'),
|
|
@@ -103,7 +104,7 @@ Wick.CheckoutPaymentDetails = (function () {
|
|
|
103
104
|
|
|
104
105
|
function setBillieStepVisibility(isReady) {
|
|
105
106
|
setBillingDetailsRowVisibility(isReady);
|
|
106
|
-
elements.$
|
|
107
|
+
elements.$billieInfo.toggleClass(elements.hiddenClass, !isReady);
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
function resetBillieRepaymentSelection() {
|
|
@@ -239,6 +240,12 @@ Wick.CheckoutPaymentDetails = (function () {
|
|
|
239
240
|
});
|
|
240
241
|
}
|
|
241
242
|
|
|
243
|
+
function forceReflow($element) {
|
|
244
|
+
if (!$element.length) return;
|
|
245
|
+
void $element[0].offsetHeight;
|
|
246
|
+
$(window).trigger('resize');
|
|
247
|
+
}
|
|
248
|
+
|
|
242
249
|
function init() {
|
|
243
250
|
const paymentMethods = getPaymentMethods();
|
|
244
251
|
initBillieBusinessTypeToggle();
|
|
@@ -248,6 +255,10 @@ Wick.CheckoutPaymentDetails = (function () {
|
|
|
248
255
|
const currentMethod = $(elements.paymentInputName + ':checked').val();
|
|
249
256
|
if (currentMethod !== 'billie') return;
|
|
250
257
|
|
|
258
|
+
requestAnimationFrame(() => {
|
|
259
|
+
forceReflow(elements.$billieInfoBlock);
|
|
260
|
+
});
|
|
261
|
+
|
|
251
262
|
const hasSelection = $('input[name="repaymentTerms"]:checked').length > 0;
|
|
252
263
|
setBillieStepVisibility(hasSelection);
|
|
253
264
|
|
package/src/js/page/checkout.js
CHANGED