From 215a482024c75da16e5150147538d9663d96e0b2 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Mon, 13 Jul 2020 14:09:25 +0200 Subject: [PATCH] updated netteForms.min.js --- package.json | 2 +- src/assets/netteForms.min.js | 40 ++++++++++++++++++------------------ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index fee83958f..716ca39f3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nette-forms", - "version": "3.0.5", + "version": "3.0.6", "description": "Client side script for Nette Forms Component", "keywords": [ "nette", diff --git a/src/assets/netteForms.min.js b/src/assets/netteForms.min.js index bd80d3200..d0f35f123 100644 --- a/src/assets/netteForms.min.js +++ b/src/assets/netteForms.min.js @@ -1,23 +1,23 @@ /*! netteForms.js | (c) 2004 David Grudl (https://davidgrudl.com) */ -(function(e,d){if(e.JSON)if("function"===typeof define&&define.amd)define(function(){return d(e)});else if("object"===typeof module&&"object"===typeof module.exports)module.exports=d(e);else{var p=!e.Nette||!e.Nette.noInit;e.Nette=d(e);p&&e.Nette.initOnLoad()}})("undefined"!==typeof window?window:this,function(e){var d={},p={},r={};d.formErrors=[];d.version="3.0";d.onDocumentReady=function(a){"loading"!==document.readyState?a.call(this):document.addEventListener("DOMContentLoaded",a)};d.getValue= -function(a){var c;if(a){if(a.tagName){if("radio"===a.type){var b=a.form.elements;for(c=0;cc?null:b[c].value;for(c=0;cb.indexOf(e)&& -(b.push(e),!f&&g.focus&&(f=g))}b.length&&(alert(b.join("\n")),f&&f.focus())};d.validateRule=function(a,c,b,f){f=void 0===f?{value:d.getEffectiveValue(a,!0)}:f;":"===c.charAt(0)&&(c=c.substr(1));c=c.replace("::","_");c=c.replace(/\\/g,"");for(var k=Array.isArray(b)?b.slice(0):[b],g=0,e=k.length;g=c},maxLength:function(a,c,b){if("number"===a.type){if(a.validity.tooLong)return!1;if(a.validity.badInput)return null}return b.length<=c},length:function(a,c,b){if("number"===a.type){if(a.validity.tooShort|| +(function(p,e){if(p.JSON)if("function"===typeof define&&define.amd)define(function(){return e(p)});else if("object"===typeof module&&"object"===typeof module.exports)module.exports=e(p);else{var t=!p.Nette||!p.Nette.noInit;p.Nette=e(p);t&&p.Nette.initOnLoad()}})("undefined"!==typeof window?window:this,function(p){var e={},t={},u={},x=new WeakMap;e.formErrors=[];e.version="3.0";e.onDocumentReady=function(a){"loading"!==document.readyState?a.call(this):document.addEventListener("DOMContentLoaded",a)}; +e.getValue=function(a){var c;if(a){if(a.tagName){if("radio"===a.type){var b=a.form.elements;for(c=0;cc?null:b[c].value;for(c=0;cb.indexOf(k)&& +(b.push(k),!d&&g.focus&&(d=g))}b.length&&(alert(b.join("\n")),d&&d.focus())};e.validateRule=function(a,c,b,d){d=void 0===d?{value:e.getEffectiveValue(a,!0)}:d;":"===c.charAt(0)&&(c=c.substr(1));c=c.replace("::","_");c=c.replace(/\\/g,"");for(var f=Array.isArray(b)?b.slice(0):[b],g=0,k=f.length;g=c},maxLength:function(a,c,b){if("number"===a.type){if(a.validity.tooLong)return!1;if(a.validity.badInput)return null}return b.length<=c},length:function(a,c,b){if("number"===a.type){if(a.validity.tooShort|| a.validity.tooLong)return!1;if(a.validity.badInput)return null}c=Array.isArray(c)?c:[c,c];return(null===c[0]||b.length>=c[0])&&(null===c[1]||b.length<=c[1])},email:function(a,c,b){return/^("([ !#-[\]-~]|\\[ -~])+"|[-a-z0-9!#$%&'*+/=?^_`{|}~]+(\.[-a-z0-9!#$%&'*+/=?^_`{|}~]+)*)@([0-9a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,61}[0-9a-z\u00C0-\u02FF\u0370-\u1EFF])?\.)+[a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,17}[a-z\u00C0-\u02FF\u0370-\u1EFF])?$/i.test(b)}, -url:function(a,c,b,f){/^[a-z\d+.-]+:/.test(b)||(b="http://"+b);return/^https?:\/\/((([-_0-9a-z\u00C0-\u02FF\u0370-\u1EFF]+\.)*[0-9a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,61}[0-9a-z\u00C0-\u02FF\u0370-\u1EFF])?\.)?[a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,17}[a-z\u00C0-\u02FF\u0370-\u1EFF])?|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\[[0-9a-f:]{3,39}\])(:\d{1,5})?(\/\S*)?$/i.test(b)?(f.value=b,!0):!1},regexp:function(a,c,b){a="string"===typeof c?c.match(/^\/(.*)\/([imu]*)$/): -!1;try{return a&&(new RegExp(a[1],a[2].replace("u",""))).test(b)}catch(f){}},pattern:function(a,c,b,f,d){if("string"!==typeof c)return null;try{try{var k=new RegExp("^(?:"+c+")$",d?"ui":"u")}catch(t){k=new RegExp("^(?:"+c+")$",d?"i":"")}if(e.FileList&&b instanceof FileList){for(a=0;a=c},max:function(a,c,b){if("number"===a.type){if(a.validity.rangeOverflow)return!1; -if(a.validity.badInput)return null}return null===c||parseFloat(b)<=c},range:function(a,c,b){if("number"===a.type){if(a.validity.rangeUnderflow||a.validity.rangeOverflow)return!1;if(a.validity.badInput)return null}return Array.isArray(c)?(null===c[0]||parseFloat(b)>=c[0])&&(null===c[1]||parseFloat(b)<=c[1]):null},submitted:function(a){return a.form["nette-submittedBy"]===a},fileSize:function(a,c,b){if(e.FileList)for(a=0;ac)return!1;return!0},mimeType:function(a,c,b){c=Array.isArray(c)? -c:[c];for(var d=0,k=c.length,g=[];dh.indexOf(n[q])&&(n[q].addEventListener("change",p),h.push(n[q]))}for(var u in m.toggle||[])Object.prototype.hasOwnProperty.call(m.toggle, -u)&&(r[u]=r[u]||(m.toggle[u]?l:!l))}}}return k};d.toggle=function(a,c,b){/^\w[\w.:-]*$/.test(a)&&(a="#"+a);a=document.querySelectorAll(a);for(b=0;b=c[0])&&(null===c[1]||parseFloat(b)<=c[1]):null},submitted:function(a){return a.form["nette-submittedBy"]===a},fileSize:function(a,c,b){if(p.FileList)for(a=0;ac)return!1;return!0},mimeType:function(a,c,b){c=Array.isArray(c)? +c:[c];for(var d=0,f=c.length,g=[];d