PluginProbe
seQura / 3.1.0
seQura v3.1.0
4.3.4 4.3.3 4.3.2 4.3.1 trunk 2.0.0 2.0.10 2.0.11 2.0.12 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 3.0.0 3.0.2 3.0.5 3.0.6 3.0.7 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 4.0.0 All 30 releases
sequra / assets / js / dist / page / checkout.min.js

checkout.min.js in seQura 3.1.0, at assets/js/dist/page/checkout.min.js

2 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 !function(){var e;e={SQ_PAYMENT_METHOD_ID:"payment_method_sequra",init:function(){var e=this;"undefined"!=typeof SeQuraCheckout&&SeQuraCheckout.isBlockCheckout||(this.bindEvents(),this.isJQueryActive()&&jQuery(document.body).on("updated_checkout",(function(t){e.bindEvents()})))},saveCheckedPaymentOpt:function(e){"undefined"!=typeof SeQuraCheckout&&(SeQuraCheckout.selectedPaymentMethod=e)},getCheckedPaymentOpt:function(){return"undefined"==typeof SeQuraCheckout?null:SeQuraCheckout.selectedPaymentMethod},checkSqProductOption:function(e){var t=this,n=this.getCheckedPaymentOpt();n&&!document.querySelector("#".concat(n))&&(n=null,this.saveCheckedPaymentOpt(n)),e.forEach((function(e,c){var o=e.id===n;0!==c||n||(o=!0,t.saveCheckedPaymentOpt(e.id)),e.checked=o}))},uncheckSqOptions:function(e){this.saveCheckedPaymentOpt(null),e.forEach((function(e){return e.checked=!1}))},maybeSelectSeQura:function(e,t,n){var c=e&&e.checked,o=this.getCheckedPaymentOpt();(c||o)&&(this.updateCheckedPaymentMethods(n),this.checkSqProductOption(t))},removeInputRadioClass:function(e){e&&e.classList.remove("input-radio")},addPaymentMethodChangeListener:function(e,t){var n=this;e.forEach((function(e){e.addEventListener("change",(function(e){e.target.id!==n.SQ_PAYMENT_METHOD_ID&&e.target.checked&&n.uncheckSqOptions(t)}))}))},updateCheckedPaymentMethods:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.forEach((function(e){var c=e.id===t.SQ_PAYMENT_METHOD_ID;c!==e.checked&&(e.checked=c,n&&(t.isJQueryActive()?(jQuery(e).trigger("change"),e.id===t.SQ_PAYMENT_METHOD_ID&&e.checked&&jQuery(e).trigger("click")):e.dispatchEvent(new Event("change"))))}))},addSqProductOptionChangeListener:function(e,t){var n=this;e.forEach((function(e){return e.addEventListener("change",(function(c){c.target.checked&&(n.saveCheckedPaymentOpt(e.id),n.updateCheckedPaymentMethods(t,!0),n.isJQueryActive()&&jQuery(document.body).trigger("payment_method_selected"))}))}))},bindEvents:function(){var e=document.querySelectorAll(".sequra-payment-method__input"),t=document.querySelectorAll('[name="payment_method"]'),n=document.getElementById(this.SQ_PAYMENT_METHOD_ID);this.removeInputRadioClass(n),this.maybeSelectSeQura(n,e,t),this.addPaymentMethodChangeListener(t,e),this.addSqProductOptionChangeListener(e,t),"undefined"!=typeof Sequra&&"function"==typeof Sequra.refreshComponents&&"function"==typeof Sequra.onLoad&&Sequra.onLoad((function(){return Sequra.refreshComponents()}))},isJQueryActive:function(){return"undefined"!=typeof jQuery}},document.addEventListener("DOMContentLoaded",(function(){return e.init()}))}();
2 //# sourceMappingURL=checkout.min.js.map