PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 3.4.7
JetFormBuilder — Dynamic Blocks Form Builder v3.4.7
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 / assets / build / frontend / calculated.field.js
jetformbuilder / assets / build / frontend Last commit date
advanced.reporting.asset.php 1 year ago advanced.reporting.js 1 year ago calculated.field.asset.php 1 year ago calculated.field.js 1 year ago conditional.block.asset.php 1 year ago conditional.block.js 1 year ago dynamic.value.asset.php 1 year ago dynamic.value.js 1 year ago main.asset.php 1 year ago main.css 1 year ago main.js 1 year ago media.field.asset.php 1 year ago media.field.js 1 year ago media.field.restrictions.asset.php 1 year ago media.field.restrictions.js 1 year ago multi.step.asset.php 1 year ago multi.step.js 1 year ago
calculated.field.js
1 lines
1 (()=>{"use strict";function t(t){return t.closest(".jet-form-builder__calculated-field")}function e(e){var i;return!(null===(i=t(e)?.dataset?.formula?.length)||void 0===i||!i)}var i;const{InputData:s,CalculatedFormula:u}=window.JetFormBuilderAbstract,{applyFilters:n}=JetPlugins.hooks,{applyFilters:r=!1}=null!==(i=window?.JetFormBuilderMain?.filters)&&void 0!==i?i:{};function l(){s.call(this),this.formula="",this.precision=0,this.sepDecimal="",this.sepThousands="",this.visibleValNode=null,this.valueTypeProp="number",this.isSupported=function(t){return e(t)},this.setValue=function(){const t=new u(this,{forceFunction:!0});t.observe(this.formula),t.setResult=()=>{this.value.current=t.calculate()},t.relatedCallback=t=>{const e=n("jet.fb.calculated.callback",!1,t,this);if(!1!==e)return e;const i="number"===this.valueTypeProp?t.calcValue:t.value.current;if(!1===r)return i;const s=r("forms/calculated-field-value",t.value.current,jQuery(t.nodes[0]));return s===t.value.current?i:s},t.emptyValue=()=>"number"===this.valueTypeProp?0:"",t.setResult(),this.value.current=this.value.applySanitizers(this.value.current),this.beforeSubmit((e=>{this.value.silence(),this.value.current=null,this.value.silence(),t.setResult(),e()}),this)},this.setNode=function(e){s.prototype.setNode.call(this,e),s.prototype.reQueryValue=()=>{};const{formula:i,precision:u,sepDecimal:n,valueType:r,sepThousands:l}=t(e).dataset;this.formula=i,this.precision=+u,this.sepDecimal=null!=n?n:"",this.sepThousands=null!=l?l:"",this.visibleValNode=e.nextElementSibling,this.valueTypeProp=r,this.inputType="calculated"},this.addListeners=function(){},this.report=()=>{},this.reQueryValue=()=>{},this.revertValue=()=>{}}l.prototype=Object.create(s.prototype);const a=l,{BaseSignal:o}=window.JetFormBuilderAbstract;function c(){o.call(this),this.isSupported=function(t){return e(t)},this.baseSignal=function(){const[t]=this.input.nodes,e="number"===this.input.valueTypeProp;this.input.calcValue=e?this.withPrecision():this.input.value.current,this.input.value.silence(),this.input.value.current=e?this.convertValue():this.input.value.current,this.input.value.silence(),this.input.visibleValNode.textContent=this.input.value.current,t.value=this.input.calcValue},this.runSignal=function(){this.baseSignal();const[t]=this.input.nodes;this.triggerJQuery(t)}}c.prototype=Object.create(o.prototype),c.prototype.convertValue=function(){const t=this.input.value.current;if(Number.isNaN(Number(t)))return 0;const e=this.withPrecision().toString().split(".");return this.input.sepThousands&&(e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.input.sepThousands)),e.join(this.input.sepDecimal)},c.prototype.withPrecision=function(){return Number(this.input.value.current).toFixed(this.input.precision)};const p=c,{addFilter:h}=JetPlugins.hooks;h("jet.fb.inputs","jet-form-builder/calculated-field",(function(t){return[a,...t]})),h("jet.fb.signals","jet-form-builder/calculated-field",(function(t){return[p,...t]}))})();