diff --git a/.travis.yml b/.travis.yml index ea3450862..a7ce64cda 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,6 +42,7 @@ jobs: skip_cleanup: true after_deploy: - yarn deploy + - git clone --depth 1 "https://${GH_TOKEN}:@github.com/${SITE_REPO}" "$SITE_DIR" 2> /dev/null || (cd "$SITE_DIR" ; git pull; cd ../) - ls -l - yarn deploy:site env: diff --git a/demo/assets/js/demo.min.js b/demo/assets/js/demo.min.js index cc41f0b30..de28b7a66 100644 --- a/demo/assets/js/demo.min.js +++ b/demo/assets/js/demo.min.js @@ -1,6 +1,6 @@ /*! * jQuery demo: https://formbuilder.online/ - * Version: 2.10.6 + * Version: 2.10.7 * Author: Kevin Chappell */ !function(e){"use strict";!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=29)}({1:function(t,r,n){r.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}window.fbLoaded={js:[],css:[]},window.fbEditors={quill:{},tinymce:{}};var s=r.trimObj=function(e){var t=[null,void 0,"",!1,"false"];for(var r in e)t.includes(e[r])?delete e[r]:Array.isArray(e[r])&&(e[r].length||delete e[r]);return e},u=r.validAttr=function(e){return!["values","enableOther","other","label","subtype"].includes(e)},c=r.attrString=function(e){return Object.entries(e).map(function(e){var t=i(e,2),r=t[0],n=t[1];return u(r)&&Object.values(f(r,n)).join("")}).filter(Boolean).join(" ")},f=r.safeAttr=function(e,t){e=d(e);var r=void 0;return t&&(Array.isArray(t)?r=E(t.join(" ")):("boolean"==typeof t&&(t=t.toString()),r=E(t.trim()))),{name:e,value:t=t?'="'+r+'"':""}},d=r.safeAttrName=function(e){return{className:"class"}[e]||p(e)},p=r.hyphenCase=function(e){return(e=(e=e.replace(/[^\w\s\-]/gi,"")).replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})).replace(/\s/g,"-").replace(/^-+/g,"")},m=r.camelCase=function(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})},b=r.bindEvents=function(e,t){if(t){var r=function(r){t.hasOwnProperty(r)&&e.addEventListener(r,function(e){return t[r](e)})};for(var n in t)r(n)}},y=r.nameAttr=function(e){var t=(new Date).getTime();return(e.type||p(e.label))+"-"+t},v=r.getContentType=function(e){return void 0===e?e:[["array",function(e){return Array.isArray(e)}],["node",function(e){return e instanceof window.Node||e instanceof window.HTMLElement}],["component",function(){return e&&e.dom}],[void 0===e?"undefined":a(e),function(){return!0}]].find(function(t){return t[1](e)})[0]},g=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=v(r),a=n.events,i=l(n,["events"]),s=document.createElement(t),u={string:function(e){s.innerHTML+=e},object:function(t){var r=t.tag,n=t.content,o=l(t,["tag","content"]);return s.appendChild(e(r,n,o))},node:function(e){return s.appendChild(e)},array:function(e){for(var t=0;t":">"};return"string"==typeof e?e.replace(/["&<>]/g,function(e){return t[e]||e}):e},O=r.escapeAttrs=function(e){for(var t in e)e.hasOwnProperty(t)&&(e[t]=E(e[t]));return e},B=r.forEach=function(e,t,r){for(var n=0;n-1&&t.splice(r,1)},N=r.getScripts=function(e,t){var r,n=jQuery,o=[];return Array.isArray(e)||(e=[e]),T(e)||(o=jQuery.map(e,function(e){var r={dataType:"script",cache:!0,url:(t||"")+e};return jQuery.ajax(r).done(function(){return window.fbLoaded.js.push(e)})})),o.push(jQuery.Deferred(function(e){return n(e.resolve)})),(r=jQuery).when.apply(r,o)},T=r.isCached=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"js",r=!1,n=window.fbLoaded[t];return r=Array.isArray(e)?e.every(function(e){return n.includes(e)}):n.includes(e),r},C=r.getStyles=function(t,r){Array.isArray(t)||(t=[t]),t.forEach(function(t){var n="href",o=t,i="";if("object"==(void 0===t?"undefined":a(t))&&(n=t.type||(t.style?"inline":"href"),i=t.id,t="inline"==n?t.style:t.href,o=i||t.href||t.style),!T(o,"css")){if("href"==n){var l=document.createElement("link");l.type="text/css",l.rel="stylesheet",l.href=(r||"")+t,document.head.appendChild(l)}else e('").attr("id",i).appendTo(e(document.head));window.fbLoaded.css.push(o)}})},F=r.capitalize=function(e){return e.replace(/\b\w/g,function(e){return e.toUpperCase()})},U=r.merge=function e(t,r){var n=Object.assign({},t,r);for(var o in r)n.hasOwnProperty(o)&&(Array.isArray(r[o])?n[o]=Array.isArray(t[o])?j(t[o].concat(r[o])):r[o]:"object"===a(r[o])?n[o]=e(t[o],r[o]):n[o]=r[o]);return n},k=r.addEventListeners=function(e,t,r){return t.split(" ").forEach(function(t){return e.addEventListener(t,r,!1)})},L=r.closest=function(e,t){for(var r=t.replace(".","");(e=e.parentElement)&&!e.classList.contains(r););return e},M=r.mobileClass=function(){var e="";return function(t){/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&(e="fb-mobile")}(navigator.userAgent||navigator.vendor||window.opera),e},R=r.safename=function(e){return e.replace(/\s/g,"-").replace(/[^a-zA-Z0-9[\]_-]/g,"")},I=r.forceNumber=function(e){return e.replace(/[^0-9]/g,"")},q=r.subtract=function(e,t){return t.filter(function(e){return!~this.indexOf(e)},e)},W=(r.insertStyle=function(e){var t=(e=Array.isArray(e)?e:[e]).map(function(e){var t=e.src,r=e.id;return new Promise(function(e,n){if(window.fbLoaded.css.includes(t))return e(t);var o=g("link",null,{href:t,rel:"stylesheet",id:r});document.head.insertBefore(o,document.head.firstChild)})});return Promise.all(t)},r.removeStyle=function(e){var t=document.getElementById(e);return t.parentElement.removeChild(t)},{addEventListeners:k,attrString:c,camelCase:m,capitalize:F,closest:L,getContentType:v,escapeAttr:E,escapeAttrs:O,escapeHtml:S,forceNumber:I,forEach:B,getScripts:N,getStyles:C,hyphenCase:p,isCached:T,markup:g,merge:U,mobileClass:M,nameAttr:y,parseAttrs:h,parsedHtml:x,parseOptions:w,parseXML:A,removeFromArray:D,safeAttr:f,safeAttrName:d,safename:R,subtract:q,trimObj:s,unique:j,validAttr:u});r.default=W},26:function(t,r,n){r.__esModule=!0;var o=document.getElementById("currentFieldId");r.builderActions={showData:function(){return e(".build-wrap").formBuilder("showData")},clearFields:function(){return e(".build-wrap").formBuilder("clearFields")},getData:function(){console.log(e(".build-wrap").formBuilder("getData"))},setData:function(){e(".build-wrap").formBuilder("setData",'[{"type":"text","label":"Full Name","subtype":"text","className":"form-control","name":"text-1476748004559"},{"type":"select","label":"Occupation","className":"form-control","name":"select-1476748006618","values":[{"label":"Street Sweeper","value":"option-1","selected":true},{"label":"Moth Man","value":"option-2"},{"label":"Chemist","value":"option-3"}]},{"type":"textarea","label":"Short Bio","rows":"5","className":"form-control","name":"textarea-1476748007461"}]')},addField:function(){var t={type:"text",class:"form-control",label:"Text Field added at: "+(new Date).getTime()};e(".build-wrap").formBuilder("addField",t)},removeField:function(){var t=o.value;e(".build-wrap").formBuilder("removeField",t)},getXML:function(){alert(e(".build-wrap").formBuilder("getData","xml"))},getJSON:function(){alert(e(".build-wrap").formBuilder("getData","json",!0))},getJS:function(){alert("check console"),console.log(e(".build-wrap").formBuilder("getData"))},toggleEdit:function(){e(".build-wrap").formBuilder("toggleFieldEdit",o.value)},toggleAllEdit:function(){return e(".build-wrap").formBuilder("toggleAllFieldEdit")},getFieldTypes:function(){return console.log(e(".build-wrap").formBuilder("getFieldTypes"))}},r.renderActions={loadUserForm:function(){e(".render-wrap").formRender({controlConfig:{"textarea.tinymce":{branding:!1,encoding:"xml",menubar:"edit insert format table",plugins:"preview searchreplace autolink link table lists textcolor colorpicker",toolbar:"formatselect | bold italic forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | preview"}},formData:'[{"type":"autocomplete","label":"Autocomplete","className":"form-control","name":"autocomplete-1526094918549","requireValidOption":true,"values":[{"label":"Option 1","value":"option-1"},{"label":"Option 2","value":"option-2"},{"label":"Option 3","value":"option-3"}],"userData":["option-1"]},{"type":"checkbox-group","label":"Checkbox Group","name":"checkbox-group-1526095813035","other":true,"values":[{"label":"Option 1","value":"option-1"},{"label":"Option 2","value":"option-2"}],"userData":["option-1","Bilbo \\"baggins\\""]},{"type":"text","label":"Color Field","name":"text-1526099104236","subtype":"color","userData":["#00ff00"]},{"type":"text","label":"Text Field","name":"text-1526099104236","subtype":"tel","userData":["123-456-7890"]},{"type":"date","label":"Date Field","className":"form-control","name":"date-1526096579821","userData":["2018-01-01"]},{"type":"number","label":"Number","className":"form-control","name":"number-1526099204594","min":"1","max":"3","step":".2","userData":["1.1"]},{"type":"textarea","label":"Text Area","className":"form-control","name":"textarea-1526099273610","subtype":"textarea","userData":["Tennessee Welcomes You!"]},{"type":"textarea","subtype":"tinymce","label":"TinyMCE","className":"form-control","name":"textarea-1526099273610","userData":["<p><span style="color: #339966;">It's a great place</span></p>"]}]'})},clearUserForm:function(){e(".render-wrap").formRender("clear")},renderUserForm:function(){e(".render-wrap").formRender("render",'[{"type":"text","label":"Color picker","name":"text-1526099104236","subtype":"color","userData":["#00ff00"]},{"type":"text","label":"Text Field","name":"text-1526099104236","subtype":"tel","userData":["123-456-7890"]},{"type":"date","label":"Date Field","className":"form-control","name":"date-1526096579821","userData":["2018-01-01"]},{"type":"number","label":"Number","className":"form-control","name":"number-1526099204594","min":"1","max":"3","step":".2","userData":["1.1"]},{"type":"textarea","label":"Text Area","className":"form-control","name":"textarea-1526099273610","subtype":"textarea","userData":["Tennessee Welcomes You!"]},{"type":"textarea","subtype":"tinymce","label":"TinyMCE","className":"form-control","name":"textarea-1526099273610","userData":["<p><span style="color: #339966;">It's a great place</span></p>"]}]')},getHTML:function(){console.log(e(".render-wrap").formRender("html"))},showUserData:function(){alert(JSON.stringify(e(".render-wrap").formRender("userData")))}},r.demoActions={testSubmit:function(){var e=new FormData(document.forms[0]);console.log("Can submit: ",document.forms[0].checkValidity()),console.log("FormData:",e)},resetDemo:function(){window.sessionStorage.removeItem("formData"),location.reload()}}},27:function(e,t,r){(e.exports=r(9)(!1)).push([e.i,"body,html{height:100%}body{background-color:#f2f2f2;background-image:url(data:image/png;base64,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);font-family:Helvetica,Helvetica Neue,Arial,sans-serif}.form-rendered .build-wrap,.form-rendered .formbuilder-actions,.form-rendered .formbuilder-title,.formrender-actions,.formrender-title,.render-wrap{display:none}.form-rendered .formrender-actions,.form-rendered .formrender-title,.form-rendered .render-wrap{display:block}",""])},28:function(e,t,r){var n=r(27);"string"==typeof n&&(n=[[e.i,n,""]]);var o={attrs:{class:"formBuilder-injected-style"},sourceMap:!1,hmr:!0,transform:void 0,insertInto:void 0};r(8)(n,o);n.locals&&(e.exports=n.locals)},29:function(e,t,r){var n=Object.assign||function(e){for(var t=1;t',onRender:function(){e(document.getElementById(t.name)).rateYo({rating:3.6})}}}},o={disabledSubtypes:{text:["password"]},disabledAttrs:["placeholder","name"],dataType:i,subtypes:{text:["datetime-local"]},onSave:function(e,t){window.sessionStorage.setItem("formData",JSON.stringify(t)),u()},onAddField:function(e){document.getElementById("currentFieldId").value=e},onClearAll:function(){return window.sessionStorage.removeItem("formData")},stickyControls:{enable:!0},sortableControls:!0,fields:[{type:"autocomplete",label:"Custom Autocomplete",required:!0,values:[{label:"SQL"},{label:"C#"},{label:"JavaScript"},{label:"Java"},{label:"Python"},{label:"C++"},{label:"PHP"},{label:"Swift"},{label:"Ruby"}]},{label:"Star Rating",attrs:{type:"starRating"},icon:"🌟"}],templates:r,inputSets:[{label:"User Details",icon:"👨",name:"user-details",showHeader:!0,fields:[{type:"text",label:"First Name",className:"form-control"},{type:"select",label:"Profession",className:"form-control",values:[{label:"Street Sweeper",value:"option-2",selected:!1},{label:"Brain Surgeon",value:"option-3",selected:!1}]},{type:"textarea",label:"Short Bio:",className:"form-control"}]},{label:"User Agreement",fields:[{type:"header",subtype:"h3",label:"Terms & Conditions",className:"header"},{type:"paragraph",label:"Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment."},{type:"paragraph",label:"Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring."},{type:"checkbox",label:"Do you agree to the terms and conditions?"}]}],typeUserDisabledAttrs:{autocomplete:["access"]},typeUserAttrs:{text:{shape:{label:"Class",multiple:!0,options:{"red form-control":"Red","green form-control":"Green","blue form-control":"Blue"},style:"border: 1px solid red"},readonly:{label:"readonly",value:!1}}},disableInjectedStyle:!1,actionButtons:[{id:"smile",className:"btn btn-success",label:"😁",type:"button",events:{click:function(){alert("😁😁😁 !SMILE! 😁😁😁")}}},"save"],disableFields:["autocomplete","custom-tinymce"],replaceFields:[{type:"textarea",subtype:"tinymce",datatype:"custom-tinymce",label:"tinyMCE",required:!0}],disabledFieldButtons:{text:["copy"]},controlPosition:"right",i18n:{override:(t={},t["en-US"]={number:"Big Numbers"},t)}},l=window.sessionStorage.getItem("formData"),s=!0;function u(){if(document.body.classList.toggle("form-rendered",s),s){var t=e(".build-wrap").formBuilder("getData");e(".render-wrap").formRender({formData:t,templates:r,dataType:i}),window.sessionStorage.setItem("formData",JSON.stringify(t))}else e(".build-wrap").formBuilder("setData",e(".render-wrap").formRender("userData"));return s=!s}l&&(o.formData=JSON.parse(l)),e(".build-wrap").formBuilder(o).promise.then(function(e){var t=n({},a.builderActions,a.renderActions,a.demoActions);Object.keys(t).forEach(function(e){document.getElementById(e).addEventListener("click",function(r){t[e]()})}),document.querySelectorAll(".editForm").forEach(function(e){return e.addEventListener("click",u)},!1);var r=document.getElementById("setLanguage"),o=window.sessionStorage.getItem("formBuilder-locale");o&&"en-US"!==o&&(r.value=o,e.actions.setLang(o)),r.addEventListener("change",function(t){var r=t.target.value;window.sessionStorage.setItem("formBuilder-locale",r),e.actions.setLang(r)},!1)})})},7:function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var r=t.protocol+"//"+t.host,n=r+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var o,a=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?e:(o=0===a.indexOf("//")?a:0===a.indexOf("/")?r+a:n+a.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},8:function(e,t,r){var n={},o=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),a=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var r=function(e){return document.querySelector(e)}.call(this,e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}}(),i=null,l=0,s=[],u=r(7);function c(e,t){for(var r=0;r=0&&s.splice(t,1)}function m(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),b(t,e.attrs),d(e,t),t}function b(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})}function y(e,t){var r,n,o,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var s=l++;r=i||(i=m(t)),n=g.bind(null,r,s,!1),o=g.bind(null,r,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",b(t,e.attrs),d(e,t),t}(t),n=function(e,t,r){var n=r.css,o=r.sourceMap,a=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||a)&&(n=u(n));o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([n],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(i),l&&URL.revokeObjectURL(l)}.bind(null,r,t),o=function(){p(r),r.href&&URL.revokeObjectURL(r.href)}):(r=m(t),n=function(e,t){var r=t.css,n=t.media;n&&e.setAttribute("media",n);if(e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}.bind(null,r),o=function(){p(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var r=f(e,t);return c(r,t),function(e){for(var o=[],a=0;a */ !function(e){"use strict";!function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=48)}([function(e,t,r){t.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],o=!0,n=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(r.push(a.value),!t||r.length!==t);o=!0);}catch(e){n=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(n)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var r=0;r=o.length)break;a=o[i++]}else{if((i=o.next()).done)break;a=i.value}var l=a;this[l]=t[l],delete t[l]}t.id||(t.name?t.id=t.name:t.id="control-"+Math.floor(1e7*Math.random()+1)),this.id=t.id,this.type=t.type,this.description&&(t.title=this.description),e.controlConfig||(e.controlConfig={});var s=this.subtype?this.type+"."+this.subtype:this.type;this.classConfig=jQuery.extend({},e.controlConfig[s]||{}),this.subtype&&(t.type=this.subtype),this.required&&(t.required="required",t["aria-required"]="true"),this.disabled&&(t.disabled="disabled"),this.config=t,this.configure()}return e.register=function(t,r,o){var n=o?o+".":"";e.classRegister||(e.classRegister={}),Array.isArray(t)||(t=[t]);var i=t,a=Array.isArray(i),l=0;for(i=a?i:i[Symbol.iterator]();;){var s;if(a){if(l>=i.length)break;s=i[l++]}else{if((l=i.next()).done)break;s=l.value}var u=s;-1===u.indexOf(".")?e.classRegister[n+u]=r:e.error("Ignoring type "+u+". Cannot use the character '.' in a type name.")}},e.getRegistered=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=Object.keys(e.classRegister);return r.length?r.filter(function(e){return t?e.indexOf(t+".")>-1:-1==e.indexOf(".")}):r},e.getRegisteredSubtypes=function(){var t={};for(var r in e.classRegister)if(e.classRegister.hasOwnProperty(r)){var o=r.split("."),i=n(o,2),a=i[0],l=i[1];if(!l)continue;t[a]||(t[a]=[]),t[a].push(l)}return t},e.getClass=function(t,r){var o=r?t+"."+r:t,n=e.classRegister[o]||e.classRegister[t];return n||e.error("Invalid control type. (Type: "+t+", Subtype: "+r+"). Please ensure you have registered it, and imported it correctly.")},e.loadCustom=function(t){var r=[];if(t&&(r=r.concat(t)),window.fbControls&&(r=r.concat(window.fbControls)),!this.fbControlsLoaded){var o=r,n=Array.isArray(o),i=0;for(o=n?o:o[Symbol.iterator]();;){var a;if(n){if(i>=o.length)break;a=o[i++]}else{if((i=o.next()).done)break;a=i.value}a(e,e.classRegister)}this.fbControlsLoaded=!0}},e.mi18n=function(e,t){var r=this.definition,n=r.i18n||{};n=n[l.default.locale]||n.default||n;var i=this.camelCase(e),a="object"==(void 0===n?"undefined":o(n))?n[i]||n[e]:n;if(a)return a;var s=r.mi18n;return"object"===(void 0===s?"undefined":o(s))&&(s=s[i]||s[e]),s||(s=i),l.default.get(s,t)},e.active=function(e){return!Array.isArray(this.definition.inactive)||-1==this.definition.inactive.indexOf(e)},e.label=function(e){return this.mi18n(e)},e.icon=function(e){var t=this.definition;return t&&"object"===o(t.icon)?t.icon[e]:t.icon},e.prototype.configure=function(){},e.prototype.build=function(){var e=this.config,t=e.label,r=e.type,o=function(e,t){var r={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r}(e,["label","type"]);return this.markup(r,(0,a.parsedHtml)(t),o)},e.prototype.on=function(e){var t=this,r={prerender:function(e){},render:function(e){var r=function(){t.onRender&&t.onRender()};t.css&&(0,a.getStyles)(t.css),t.js&&!(0,a.isCached)(t.js)?(0,a.getScripts)(t.js).done(r):r()}};return e?r[e]:r},e.error=function(e){throw new Error(e)},e.prototype.markup=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.element=(0,a.markup)(e,t,r),this.element},e.prototype.parsedHtml=function(e){return(0,a.parsedHtml)(e)},e.camelCase=function(e){return(0,a.camelCase)(e)},i(e,null,[{key:"definition",get:function(){return{}}}]),e}();t.default=s},function(t,r,o){r.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r}window.fbLoaded={js:[],css:[]},window.fbEditors={quill:{},tinymce:{}};var s=r.trimObj=function(e){var t=[null,void 0,"",!1,"false"];for(var r in e)t.includes(e[r])?delete e[r]:Array.isArray(e[r])&&(e[r].length||delete e[r]);return e},u=r.validAttr=function(e){return!["values","enableOther","other","label","subtype"].includes(e)},f=r.attrString=function(e){return Object.entries(e).map(function(e){var t=a(e,2),r=t[0],o=t[1];return u(r)&&Object.values(c(r,o)).join("")}).filter(Boolean).join(" ")},c=r.safeAttr=function(e,t){e=d(e);var r=void 0;return t&&(Array.isArray(t)?r=O(t.join(" ")):("boolean"==typeof t&&(t=t.toString()),r=O(t.trim()))),{name:e,value:t=t?'="'+r+'"':""}},d=r.safeAttrName=function(e){return{className:"class"}[e]||p(e)},p=r.hyphenCase=function(e){return(e=(e=e.replace(/[^\w\s\-]/gi,"")).replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})).replace(/\s/g,"-").replace(/^-+/g,"")},m=r.camelCase=function(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})},b=r.bindEvents=function(e,t){if(t){var r=function(r){t.hasOwnProperty(r)&&e.addEventListener(r,function(e){return t[r](e)})};for(var o in t)r(o)}},h=r.nameAttr=function(e){var t=(new Date).getTime();return(e.type||p(e.label))+"-"+t},g=r.getContentType=function(e){return void 0===e?e:[["array",function(e){return Array.isArray(e)}],["node",function(e){return e instanceof window.Node||e instanceof window.HTMLElement}],["component",function(){return e&&e.dom}],[void 0===e?"undefined":i(e),function(){return!0}]].find(function(t){return t[1](e)})[0]},v=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=g(r),i=o.events,a=l(o,["events"]),s=document.createElement(t),u={string:function(e){s.innerHTML+=e},object:function(t){var r=t.tag,o=t.content,n=l(t,["tag","content"]);return s.appendChild(e(r,o,n))},node:function(e){return s.appendChild(e)},array:function(e){for(var t=0;t":">"};return"string"==typeof e?e.replace(/["&<>]/g,function(e){return t[e]||e}):e},q=r.escapeAttrs=function(e){for(var t in e)e.hasOwnProperty(t)&&(e[t]=O(e[t]));return e},E=r.forEach=function(e,t,r){for(var o=0;o-1&&t.splice(r,1)},S=r.getScripts=function(e,t){var r,o=jQuery,n=[];return Array.isArray(e)||(e=[e]),T(e)||(n=jQuery.map(e,function(e){var r={dataType:"script",cache:!0,url:(t||"")+e};return jQuery.ajax(r).done(function(){return window.fbLoaded.js.push(e)})})),n.push(jQuery.Deferred(function(e){return o(e.resolve)})),(r=jQuery).when.apply(r,n)},T=r.isCached=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"js",r=!1,o=window.fbLoaded[t];return r=Array.isArray(e)?e.every(function(e){return o.includes(e)}):o.includes(e),r},L=r.getStyles=function(t,r){Array.isArray(t)||(t=[t]),t.forEach(function(t){var o="href",n=t,a="";if("object"==(void 0===t?"undefined":i(t))&&(o=t.type||(t.style?"inline":"href"),a=t.id,t="inline"==o?t.style:t.href,n=a||t.href||t.style),!T(n,"css")){if("href"==o){var l=document.createElement("link");l.type="text/css",l.rel="stylesheet",l.href=(r||"")+t,document.head.appendChild(l)}else e('").attr("id",a).appendTo(e(document.head));window.fbLoaded.css.push(n)}})},N=r.capitalize=function(e){return e.replace(/\b\w/g,function(e){return e.toUpperCase()})},D=r.merge=function e(t,r){var o=Object.assign({},t,r);for(var n in r)o.hasOwnProperty(n)&&(Array.isArray(r[n])?o[n]=Array.isArray(t[n])?j(t[n].concat(r[n])):r[n]:"object"===i(r[n])?o[n]=e(t[n],r[n]):o[n]=r[n]);return o},R=r.addEventListeners=function(e,t,r){return t.split(" ").forEach(function(t){return e.addEventListener(t,r,!1)})},M=r.closest=function(e,t){for(var r=t.replace(".","");(e=e.parentElement)&&!e.classList.contains(r););return e},B=r.mobileClass=function(){var e="";return function(t){/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&(e="fb-mobile")}(navigator.userAgent||navigator.vendor||window.opera),e},F=r.safename=function(e){return e.replace(/\s/g,"-").replace(/[^a-zA-Z0-9[\]_-]/g,"")},I=r.forceNumber=function(e){return e.replace(/[^0-9]/g,"")},P=r.subtract=function(e,t){return t.filter(function(e){return!~this.indexOf(e)},e)},z=(r.insertStyle=function(e){var t=(e=Array.isArray(e)?e:[e]).map(function(e){var t=e.src,r=e.id;return new Promise(function(e,o){if(window.fbLoaded.css.includes(t))return e(t);var n=v("link",null,{href:t,rel:"stylesheet",id:r});document.head.insertBefore(n,document.head.firstChild)})});return Promise.all(t)},r.removeStyle=function(e){var t=document.getElementById(e);return t.parentElement.removeChild(t)},{addEventListeners:R,attrString:f,camelCase:m,capitalize:N,closest:M,getContentType:g,escapeAttr:O,escapeAttrs:q,escapeHtml:k,forceNumber:I,forEach:E,getScripts:S,getStyles:L,hyphenCase:p,isCached:T,markup:v,merge:D,mobileClass:B,nameAttr:h,parseAttrs:y,parsedHtml:A,parseOptions:w,parseXML:x,removeFromArray:C,safeAttr:c,safeAttrName:d,safename:F,subtract:P,trimObj:s,unique:j,validAttr:u});r.default=z},function(e,t){ diff --git a/demo/assets/js/form-builder.min.js.gz b/demo/assets/js/form-builder.min.js.gz index 905c5ef4f..e08c782dc 100644 Binary files a/demo/assets/js/form-builder.min.js.gz and b/demo/assets/js/form-builder.min.js.gz differ diff --git a/demo/assets/js/form-render.min.js b/demo/assets/js/form-render.min.js index 038a47f79..bc6580f0e 100644 --- a/demo/assets/js/form-render.min.js +++ b/demo/assets/js/form-render.min.js @@ -1,6 +1,6 @@ /*! * jQuery formRender: https://formbuilder.online/ - * Version: 2.10.6 + * Version: 2.10.7 * Author: Kevin Chappell */ !function(e){"use strict";!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=32)}([function(e,t,n){t.__esModule=!0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var n=0;n=r.length)break;a=r[i++]}else{if((i=r.next()).done)break;a=i.value}var s=a;this[s]=t[s],delete t[s]}t.id||(t.name?t.id=t.name:t.id="control-"+Math.floor(1e7*Math.random()+1)),this.id=t.id,this.type=t.type,this.description&&(t.title=this.description),e.controlConfig||(e.controlConfig={});var l=this.subtype?this.type+"."+this.subtype:this.type;this.classConfig=jQuery.extend({},e.controlConfig[l]||{}),this.subtype&&(t.type=this.subtype),this.required&&(t.required="required",t["aria-required"]="true"),this.disabled&&(t.disabled="disabled"),this.config=t,this.configure()}return e.register=function(t,n,r){var o=r?r+".":"";e.classRegister||(e.classRegister={}),Array.isArray(t)||(t=[t]);var i=t,a=Array.isArray(i),s=0;for(i=a?i:i[Symbol.iterator]();;){var l;if(a){if(s>=i.length)break;l=i[s++]}else{if((s=i.next()).done)break;l=s.value}var u=l;-1===u.indexOf(".")?e.classRegister[o+u]=n:e.error("Ignoring type "+u+". Cannot use the character '.' in a type name.")}},e.getRegistered=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=Object.keys(e.classRegister);return n.length?n.filter(function(e){return t?e.indexOf(t+".")>-1:-1==e.indexOf(".")}):n},e.getRegisteredSubtypes=function(){var t={};for(var n in e.classRegister)if(e.classRegister.hasOwnProperty(n)){var r=n.split("."),i=o(r,2),a=i[0],s=i[1];if(!s)continue;t[a]||(t[a]=[]),t[a].push(s)}return t},e.getClass=function(t,n){var r=n?t+"."+n:t,o=e.classRegister[r]||e.classRegister[t];return o||e.error("Invalid control type. (Type: "+t+", Subtype: "+n+"). Please ensure you have registered it, and imported it correctly.")},e.loadCustom=function(t){var n=[];if(t&&(n=n.concat(t)),window.fbControls&&(n=n.concat(window.fbControls)),!this.fbControlsLoaded){var r=n,o=Array.isArray(r),i=0;for(r=o?r:r[Symbol.iterator]();;){var a;if(o){if(i>=r.length)break;a=r[i++]}else{if((i=r.next()).done)break;a=i.value}a(e,e.classRegister)}this.fbControlsLoaded=!0}},e.mi18n=function(e,t){var n=this.definition,o=n.i18n||{};o=o[s.default.locale]||o.default||o;var i=this.camelCase(e),a="object"==(void 0===o?"undefined":r(o))?o[i]||o[e]:o;if(a)return a;var l=n.mi18n;return"object"===(void 0===l?"undefined":r(l))&&(l=l[i]||l[e]),l||(l=i),s.default.get(l,t)},e.active=function(e){return!Array.isArray(this.definition.inactive)||-1==this.definition.inactive.indexOf(e)},e.label=function(e){return this.mi18n(e)},e.icon=function(e){var t=this.definition;return t&&"object"===r(t.icon)?t.icon[e]:t.icon},e.prototype.configure=function(){},e.prototype.build=function(){var e=this.config,t=e.label,n=e.type,r=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["label","type"]);return this.markup(n,(0,a.parsedHtml)(t),r)},e.prototype.on=function(e){var t=this,n={prerender:function(e){},render:function(e){var n=function(){t.onRender&&t.onRender()};t.css&&(0,a.getStyles)(t.css),t.js&&!(0,a.isCached)(t.js)?(0,a.getScripts)(t.js).done(n):n()}};return e?n[e]:n},e.error=function(e){throw new Error(e)},e.prototype.markup=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.element=(0,a.markup)(e,t,n),this.element},e.prototype.parsedHtml=function(e){return(0,a.parsedHtml)(e)},e.camelCase=function(e){return(0,a.camelCase)(e)},i(e,null,[{key:"definition",get:function(){return{}}}]),e}();t.default=l},function(t,n,r){n.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}window.fbLoaded={js:[],css:[]},window.fbEditors={quill:{},tinymce:{}};var l=n.trimObj=function(e){var t=[null,void 0,"",!1,"false"];for(var n in e)t.includes(e[n])?delete e[n]:Array.isArray(e[n])&&(e[n].length||delete e[n]);return e},u=n.validAttr=function(e){return!["values","enableOther","other","label","subtype"].includes(e)},c=n.attrString=function(e){return Object.entries(e).map(function(e){var t=a(e,2),n=t[0],r=t[1];return u(n)&&Object.values(f(n,r)).join("")}).filter(Boolean).join(" ")},f=n.safeAttr=function(e,t){e=d(e);var n=void 0;return t&&(Array.isArray(t)?n=j(t.join(" ")):("boolean"==typeof t&&(t=t.toString()),n=j(t.trim()))),{name:e,value:t=t?'="'+n+'"':""}},d=n.safeAttrName=function(e){return{className:"class"}[e]||p(e)},p=n.hyphenCase=function(e){return(e=(e=e.replace(/[^\w\s\-]/gi,"")).replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})).replace(/\s/g,"-").replace(/^-+/g,"")},h=n.camelCase=function(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})},m=n.bindEvents=function(e,t){if(t){var n=function(n){t.hasOwnProperty(n)&&e.addEventListener(n,function(e){return t[n](e)})};for(var r in t)n(r)}},b=n.nameAttr=function(e){var t=(new Date).getTime();return(e.type||p(e.label))+"-"+t},y=n.getContentType=function(e){return void 0===e?e:[["array",function(e){return Array.isArray(e)}],["node",function(e){return e instanceof window.Node||e instanceof window.HTMLElement}],["component",function(){return e&&e.dom}],[void 0===e?"undefined":i(e),function(){return!0}]].find(function(t){return t[1](e)})[0]},g=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=y(n),i=r.events,a=s(r,["events"]),l=document.createElement(t),u={string:function(e){l.innerHTML+=e},object:function(t){var n=t.tag,r=t.content,o=s(t,["tag","content"]);return l.appendChild(e(n,r,o))},node:function(e){return l.appendChild(e)},array:function(e){for(var t=0;t":">"};return"string"==typeof e?e.replace(/["&<>]/g,function(e){return t[e]||e}):e},k=n.escapeAttrs=function(e){for(var t in e)e.hasOwnProperty(t)&&(e[t]=j(e[t]));return e},C=n.forEach=function(e,t,n){for(var r=0;r-1&&t.splice(n,1)},A=n.getScripts=function(e,t){var n,r=jQuery,o=[];return Array.isArray(e)||(e=[e]),T(e)||(o=jQuery.map(e,function(e){var n={dataType:"script",cache:!0,url:(t||"")+e};return jQuery.ajax(n).done(function(){return window.fbLoaded.js.push(e)})})),o.push(jQuery.Deferred(function(e){return r(e.resolve)})),(n=jQuery).when.apply(n,o)},T=n.isCached=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"js",n=!1,r=window.fbLoaded[t];return n=Array.isArray(e)?e.every(function(e){return r.includes(e)}):r.includes(e),n},_=n.getStyles=function(t,n){Array.isArray(t)||(t=[t]),t.forEach(function(t){var r="href",o=t,a="";if("object"==(void 0===t?"undefined":i(t))&&(r=t.type||(t.style?"inline":"href"),a=t.id,t="inline"==r?t.style:t.href,o=a||t.href||t.style),!T(o,"css")){if("href"==r){var s=document.createElement("link");s.type="text/css",s.rel="stylesheet",s.href=(n||"")+t,document.head.appendChild(s)}else e('").attr("id",a).appendTo(e(document.head));window.fbLoaded.css.push(o)}})},R=n.capitalize=function(e){return e.replace(/\b\w/g,function(e){return e.toUpperCase()})},L=n.merge=function e(t,n){var r=Object.assign({},t,n);for(var o in n)r.hasOwnProperty(o)&&(Array.isArray(n[o])?r[o]=Array.isArray(t[o])?E(t[o].concat(n[o])):n[o]:"object"===i(n[o])?r[o]=e(t[o],n[o]):r[o]=n[o]);return r},M=n.addEventListeners=function(e,t,n){return t.split(" ").forEach(function(t){return e.addEventListener(t,n,!1)})},P=n.closest=function(e,t){for(var n=t.replace(".","");(e=e.parentElement)&&!e.classList.contains(n););return e},N=n.mobileClass=function(){var e="";return function(t){/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&(e="fb-mobile")}(navigator.userAgent||navigator.vendor||window.opera),e},D=n.safename=function(e){return e.replace(/\s/g,"-").replace(/[^a-zA-Z0-9[\]_-]/g,"")},F=n.forceNumber=function(e){return e.replace(/[^0-9]/g,"")},U=n.subtract=function(e,t){return t.filter(function(e){return!~this.indexOf(e)},e)},B=(n.insertStyle=function(e){var t=(e=Array.isArray(e)?e:[e]).map(function(e){var t=e.src,n=e.id;return new Promise(function(e,r){if(window.fbLoaded.css.includes(t))return e(t);var o=g("link",null,{href:t,rel:"stylesheet",id:n});document.head.insertBefore(o,document.head.firstChild)})});return Promise.all(t)},n.removeStyle=function(e){var t=document.getElementById(e);return t.parentElement.removeChild(t)},{addEventListeners:M,attrString:c,camelCase:h,capitalize:R,closest:P,getContentType:y,escapeAttr:j,escapeAttrs:k,escapeHtml:O,forceNumber:F,forEach:C,getScripts:A,getStyles:_,hyphenCase:p,isCached:T,markup:g,merge:L,mobileClass:N,nameAttr:b,parseAttrs:v,parsedHtml:q,parseOptions:w,parseXML:x,removeFromArray:S,safeAttr:f,safeAttrName:d,safename:D,subtract:U,trimObj:l,unique:E,validAttr:u});n.default=B},function(e,t){ diff --git a/demo/assets/js/form-render.min.js.gz b/demo/assets/js/form-render.min.js.gz index 692af7777..17f71d9d3 100644 Binary files a/demo/assets/js/form-render.min.js.gz and b/demo/assets/js/form-render.min.js.gz differ