PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 3.5.6.3
JetFormBuilder — Dynamic Blocks Form Builder v3.5.6.3
3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / modules / option-field / assets / build / radio.js
jetformbuilder / modules / option-field / assets / build Last commit date
checkbox.asset.php 7 months ago checkbox.css 1 year ago checkbox.js 7 months ago custom.options.restrictions.asset.php 2 years ago custom.options.restrictions.js 2 years ago editor.asset.php 6 months ago editor.css 7 months ago editor.js 6 months ago radio.asset.php 1 year ago radio.css 1 year ago radio.js 1 year ago select.asset.php 1 year ago select.css 1 year ago select.js 1 year ago
radio.js
1 lines
1 (()=>{"use strict";const{strict_mode:t=!1}=window?.JetFormBuilderSettings,e=Boolean(t),{InputData:s,ReactiveHook:i}=JetFormBuilderAbstract,{getParsedName:o}=JetFormBuilderFunctions;function r(){s.call(this),this.wrapper=null}r.prototype=Object.create(s.prototype),r.prototype.wrapper=null,r.prototype.isSupported=function(t){return t.classList.contains("checkradio-wrap")&&t.querySelector(".radio-wrap")},r.prototype.addListeners=function(){this.enterKey=new i,this.wrapper.addEventListener("change",this.onChangeValue.bind(this)),this.wrapper.addEventListener("keydown",this.handleEnterKey.bind(this));const t=this.getCustomInput();this.wrapper.addEventListener("focusout",(e=>{[...this.nodes].includes(e?.relatedTarget)||[e.relatedTarget,e.target].includes(t)||this.reportOnBlur()})),t?.addEventListener?.("blur",(t=>{const e=this.value.current;this.setValue(),e===this.value.current&&this.onChange(e)})),!e&&jQuery(this.wrapper).on("change",(t=>{this.value.current==t.target.value||t.target?.dataset?.custom||(this.callable.lockTrigger(),this.setValue(),this.callable.unlockTrigger())}))},r.prototype.setValue=function(){this.value.current=this.getActiveValue()},r.prototype.onChangeValue=function(t){t.target.dataset.custom?this.toggleCustomOption():this.setValue()},r.prototype.toggleCustomOption=function(){const t=this.lastNode(),e=this.getCustomInput();e.disabled===t.checked&&(e.disabled=!t.checked),t.checked&&e.focus()},r.prototype.getActiveValue=function(){for(const t of this.nodes)if(!t.dataset.custom&&t.checked)return t.value;return this.hasCustom?this.getCustomInput().value:""},r.prototype.setNode=function(t){t.jfbSync=this,this.nodes=t.getElementsByClassName("jet-form-builder__field radio-field"),this.rawName=this.nodes[0].name,this.name=o(this.rawName),this.inputType="radio",this.wrapper=t,this.hasCustom=!!this.lastNode()?.dataset?.custom},r.prototype.lastNode=function(){return this.nodes[this.nodes.length-1]},r.prototype.getCustomInput=function(){const t=this.lastNode().closest(".custom-option");return t?.querySelector?.("input.text-field")};const n=r,{BaseSignal:a}=JetFormBuilderAbstract;function u(){a.call(this),this.isSupported=function(t,e){return"radio"===t.type},this.runSignal=function(){this.input.calcValue=0;for(const e of this.input.nodes){var t;if(!e.dataset.custom&&(e.checked=this.input.value.current===e.value,e.checked)){this.input.calcValue+=parseFloat(null!==(t=e.dataset?.calculate)&&void 0!==t?t:e.value),this.triggerJQuery(e);break}}if(!this.input.hasCustom)return;const e=this.input.lastNode(),s=this.input.getCustomInput();s.disabled===e.checked&&(s.disabled=!e.checked);const i=this.input.value.current;e.checked&&s.value!==i&&(s.value=i)}}u.prototype=Object.create(a.prototype);const c=u,{addFilter:l}=JetPlugins.hooks;window.JetFormBuilderAbstract={...window.JetFormBuilderAbstract,RadioData:n,SignalRadio:c},l("jet.fb.inputs","jet-form-builder/radio-field",(function(t){return[n,...t]})),l("jet.fb.signals","jet-form-builder/radio-field",(function(t){return[c,...t]}))})();