PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 1.4.18
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v1.4.18
3.3.1 V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 All 138 releases
bit-form / assets / js / 5186.js

5186.js in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder 1.4.18, at assets/js/5186.js

1 lines 5.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 "use strict";(self.webpackChunk_bitforms=self.webpackChunk_bitforms||[]).push([[5186],{5186:(e,t,s)=>{s.r(t),s.d(t,{default:()=>b});var a=s(7462),n=s(7294),l=s(7707),r=s(7480),i=s(1238),c=s(9492),o=s(5637),d=s(9348),u=s(5257),m=s(3312),p=s(5893);function b(e){e.formID;var t,s=e.formFields,b=e.webHooks,f=e.setWebHooks,h=(e.step,e.setstep),x=e.setSnackbar,v=e.create,j=e.isInfo,N=function(e){return null==e?void 0:e.match(/(\?|&)([^=]+)=([^&]+|)/gi)},_=(0,n.useState)(!1),g=_[0],k=_[1],y=function(e,t,s){var n=(0,a.Z)({},b);""!==t?n.url="key"===e?n.url.replace(s,""+s.charAt(0)+t+"="+s.split("=")[1]):n.url.replace(s,s.split("=")[0]+"="+t):null===s.match(/\?/g)?n.url=n.url.replace(s,""):n.url=n.url.replace(s+"&","?"),f(n)},C=function(e){var t=(0,a.Z)({},b);t[e.target.name]=e.target.value,f((0,a.Z)({},t))};return(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)("div",{style:(0,a.Z)({},{width:j&&900}),children:[(0,p.jsx)("div",{className:"flx ",children:(0,p.jsxs)("div",{className:"w-7 mr-2 mb-4",children:[(0,p.jsx)("div",{className:"f-m",children:(0,o.__)("Integration name","bitform")}),(0,p.jsx)("input",{name:"name",onChange:function(e){return C(e)},className:"btcd-paper-inp mt-1",type:"text",value:b.name,disabled:j})]})}),(0,p.jsxs)("div",{className:"flx",children:[(0,p.jsxs)("div",{className:"w-7 mr-2",children:[(0,p.jsx)("div",{className:"f-m",children:(0,o.__)("Link:","bitform")}),(0,p.jsx)("input",{name:"url",onChange:function(e){return C(e)},className:"btcd-paper-inp mt-1",type:"text",value:b.url,disabled:j}),(null==b?void 0:b.apiConsole)&&(0,p.jsxs)("small",{className:"d-blk mt-2",children:[(0,o.__)("To got Webhook , Please Visit","bitform")," ",(0,p.jsx)("a",{className:"btcd-link",href:b.apiConsole,target:"_blank",rel:"noreferrer",children:(0,o.__)(b.type+" Dashboard","bitform")})]})]}),(0,p.jsxs)("div",{className:"w-3",children:[(0,p.jsx)("div",{className:"f-m",children:(0,o.__)("Method:","bitform")}),(0,p.jsx)("select",{name:"method",onChange:function(e){return C(e)},defaultValue:b.method,className:"btcd-paper-inp mt-1",disabled:j,children:["GET","POST","PUT","PATCH","OPTION","DELETE","TRACE","CONNECT"].map((function(e,t){return(0,p.jsx)("option",{value:e,children:e},"method-"+2*t)}))})]})]}),!j&&(0,p.jsxs)(d.Z,{onClick:function(){return e=b,k(!0),void(0,c.Z)({hookDetails:e},"bitforms_test_webhook").then((function(e){if(e&&e.success)x({show:!0,msg:""+e.data}),k(!1);else if(e&&e.data){var t="string"===typeof e.data?e.data:"Unknown error";x({show:!0,msg:t+". "+(0,o.__)("please try again","bitform")}),k(!1)}else x({show:!0,msg:(0,o.__)("Webhook tests failed. please try again","bitform")}),k(!1)}));var e},className:"btn btcd-btn-o-blue",children:[(0,o.__)("Test Webhook","bitform"),g&&(0,p.jsx)(u.Z,{size:14,clr:"#022217",className:"ml-2"})]}),(0,p.jsx)("br",{}),(0,p.jsx)("br",{}),(0,p.jsx)("div",{className:"f-m",children:(0,o.__)("Add Url Parameter: (optional)","bitform")}),(0,p.jsx)("div",{className:"btcd-param-t-wrp mt-1",children:(0,p.jsxs)("div",{className:"btcd-param-t",children:[(0,p.jsxs)("div",{className:"tr",children:[(0,p.jsx)("div",{className:"td",children:(0,o.__)("Key","bitform")}),(0,p.jsx)("div",{className:"td",children:(0,o.__)("Value","bitform")})]}),null!==N(b.url)&&(null==(t=N(b.url))?void 0:t.map((function(e,t){return(0,p.jsxs)("div",{className:"tr",children:[(0,p.jsx)("div",{className:"td",children:(0,p.jsx)("input",{className:"btcd-paper-inp p-i-sm",onChange:function(t){return y("key",t.target.value,e)},type:"text",value:e.split("=")[0].substr(1),disabled:j})}),(0,p.jsx)("div",{className:"td",children:(0,p.jsx)("input",{className:"btcd-paper-inp p-i-sm",onChange:function(t){return y("val",t.target.value,e)},type:"text",value:e.split("=")[1],disabled:j})}),!j&&(0,p.jsxs)("div",{className:"flx p-atn",children:[(0,p.jsx)(d.Z,{onClick:function(){return function(e){var t=(0,a.Z)({},b);t.url=t.url.replace(e,""),f(t)}(e)},icn:!0,children:(0,p.jsx)(m.Z,{size:16})}),(0,p.jsx)(l.Z,{options:s.map((function(e){return{label:e.name,value:"${"+e.key+"}"}})),className:"btcd-paper-drpdwn wdt-200 ml-2",singleSelect:!0,onChange:function(t){return function(e,t){var s=(0,a.Z)({},b),n=t.split("=");n[1]=e,s.url=s.url.replace(t,n.join("=")),f(s)}(t,e)},defaultValue:e.split("=")[1]})]})]},"fu-1"+3*t)}))),!j&&(0,p.jsx)(d.Z,{onClick:function(){return function(){var e=(0,a.Z)({},b);null!==e.url.match(/\?/g)?e.url+="&key=value":e.url+="?key=value",f(e)}()},className:"add-pram",icn:!0,children:(0,p.jsx)(r.Z,{size:"14",className:"icn-rotate-45"})})]})}),v&&(0,p.jsxs)("button",{onClick:function(){return setTimeout((function(){document.getElementById("btcd-settings-wrp").scrollTop=0}),300),void h(2)},className:"btn btcd-btn-lg green sh-sm flx",type:"button",children:[(0,o.__)("Next","bitform"),(0,p.jsx)(i.Z,{className:"ml-1 rev-icn"})]})]})})}},9348:(e,t,s)=>{s.d(t,{Z:()=>n});var a=s(5893);const n=function(e){var t=e.className,s=e.type,n=e.onClick,l=e.icn,r=e.children,i=e.style;return(0,a.jsx)("button",{style:i,className:(l?"icn-btn":"btn")+" "+t,type:s||"button",onClick:n,"aria-label":"btcd-button",children:r})}}}]);