@aofl/form-validate
Advanced tools
Comparing version 3.5.0-beta.8 to 3.5.0-beta.9
@@ -1,2 +0,2 @@ | ||
module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s="QfWi")}({"+IV6":function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},"5WRv":function(t,e,n){var r=n("iNmH"),i=n("Qatm"),o=n("kluZ");t.exports=function(t){return r(t)||i(t)||o()}},K4DB:function(t,e,n){var r=n("e+GP"),i=n("T1e2");t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?i(t):e}},NToG:function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}},Qatm:function(t,e){t.exports=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}},QfWi:function(t,e,n){"use strict";n.r(e);var r=n("SDJZ"),i=n.n(r),o=n("K4DB"),a=n.n(o),s=n("+IV6"),u=n.n(s),c=n("T1e2"),l=n.n(c),f=n("eef+"),p=n.n(f),h=n("5WRv"),v=n.n(h),d=n("NToG"),y=n.n(d),b=n("l3wB"),m=function(){function t(e,n,r){i()(this,t),Object.defineProperties(this,{target:{value:e},path:{value:r},propName:{value:r.split(".").slice(0,-1).join(".")},resolve:{writable:!0},cachedPromise:{writable:!0},validateCompletePromise:{writable:!0},valid:{writable:!0},observed:{writable:!0},pending:{writable:!0},validatorFn:{value:n}}),this.reset()}return y()(t,[{key:"reset",value:function(){this.cachedPromise=null,this.resolve=null,this.valid=!0,this.observed=!1,this.pending=!1,this.validateCompletePromise=null}},{key:"validate",value:function(){var t=this;this.observed=!0;var e=Object(b.get)(this.target,this.propName),n=Promise.resolve(this.validatorFn(e,this.target));this.cachedPromise=n,!1===this.pending&&(this.validateCompletePromise=new Promise((function(e){t.resolve=e}))),this.pending=!0,n.then((function(e){t.cachedPromise===n&&(t.valid=e,t.pending=!1,t.resolve(),t.target.requestUpdate())}))}},{key:"getKeys",value:function(){var t=["valid","pending","observed"];for(var e in this)Object.prototype.hasOwnProperty.call(this,e)&&t.push(e);return t}},{key:"toString",value:function(){var t=this.getKeys();return JSON.stringify(this,t,2)}},{key:"validateComplete",get:function(){return this.validateCompletePromise}}]),t}(),g=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";for(var o in i()(this,t),Object.defineProperty(this,"resolve",{writable:!0}),Object.defineProperty(this,"validateCompleteResolved",{writable:!0}),Object.defineProperty(this,"validateCompletePromise",{writable:!0}),n)if(Object.prototype.hasOwnProperty.call(n,o)){if(Object.prototype.hasOwnProperty.call(this,o))throw new Error("".concat(o," is a reserved keyword and cannot be used as a validator name."));var a=r;0===a.length?a=o:a+="."+o,"function"==typeof n[o]?this[o]=new m(e,n[o],a):this[o]=new t(e,n[o],a)}this.reset()}return y()(t,[{key:"reset",value:function(){var e=this;for(var n in this.validateCompletePromise=new Promise((function(t){e.resolve=t})),this.validateCompleteResolved=!1,this)Object.prototype.hasOwnProperty.call(this,n)&&(this[n]instanceof t||this[n]instanceof m)&&this[n].reset()}},{key:"validate",value:function(){for(var e in this)Object.prototype.hasOwnProperty.call(this,e)&&(this[e]instanceof t||this[e]instanceof m)&&this[e].validate()}},{key:"getKeys",value:function(){var t=["valid","pending","observed"];for(var e in this)Object.prototype.hasOwnProperty.call(this,e)&&(t.push(e),t.push.apply(t,v()(this[e].getKeys())));return t}},{key:"toString",value:function(){var t=this.getKeys();return JSON.stringify(this,t,2)}},{key:"valid",get:function(){for(var e in this)if(Object.prototype.hasOwnProperty.call(this,e)&&(this[e]instanceof t||this[e]instanceof m)&&!1===this[e].valid)return!1;return!0}},{key:"pending",get:function(){for(var e in this)if(Object.prototype.hasOwnProperty.call(this,e)&&(this[e]instanceof t||this[e]instanceof m)&&!0===this[e].pending)return!0;return!1}},{key:"observed",get:function(){for(var e in this)if(Object.prototype.hasOwnProperty.call(this,e)&&(this[e]instanceof t||this[e]instanceof m)&&!0===this[e].observed)return!0;return!1}},{key:"validateComplete",get:function(){var t=this;this.pending&&this.validateCompleteResolved&&(this.validateCompleteResolved=!1,this.validateCompletePromise=new Promise((function(e){t.resolve=e})));return function e(){var n=Object.keys(t).map((function(e){return t[e].validateComplete}));Promise.all(n).then((function(){if(t.pending)return e();t.resolve(),t.validateCompleteResolved=!0}))}(),this.validateCompletePromise}}]),t}(),O=function(t){return function(t){function e(){var t,n;i()(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];n=a()(this,(t=u()(e)).call.apply(t,[this].concat(o)));var c=void 0;return Object.defineProperties(l()(n),{validators:{get:function(){return c},set:function(t){void 0===c&&(c=t,this.form=new g(this,t))}},form:{writable:!0,enumerable:!0}}),n}return p()(e,t),e}(t)},w=/^[0-9]+$/,P=function(t){return"string"==typeof t&&w.test(t)},j=function(t,e){return function(n,r){var i=Object(b.get)(r,t);return void 0!==i&&e(n,i)}},x=function(t){return j(t,(function(t,e){return void 0!==e&&t===e}))},S=function(t){return function(e){return"string"==typeof e&&e.length>=t}},k=function(t){return function(e){return"string"==typeof e&&e.length<=t}};function C(t){return"string"==typeof t&&""!==t}var _=function(t,e){return t instanceof RegExp||(t=new RegExp(t,e)),function(e){return t.test(e)}};n.d(e,"validationMixin",(function(){return O})),n.d(e,"isAllDigits",(function(){return P})),n.d(e,"isEqual",(function(){return x})),n.d(e,"minLength",(function(){return S})),n.d(e,"maxLength",(function(){return k})),n.d(e,"isRequired",(function(){return C})),n.d(e,"ValidationFunction",(function(){return m})),n.d(e,"ValidationProperty",(function(){return g})),n.d(e,"pattern",(function(){return _})),n.d(e,"compare",(function(){return j}))},SDJZ:function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},T1e2:function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},WI9V:function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,r)}t.exports=n},"e+GP":function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(e)}t.exports=n},"eef+":function(t,e,n){var r=n("WI9V");t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}},iNmH:function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}},kluZ:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},l3wB:function(t,e){t.exports=require("@aofl/object-utils")}}); | ||
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return 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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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="QfWi")}({"86LY":function(e,t){e.exports=require("@babel/runtime/helpers/possibleConstructorReturn")},MmcY:function(e,t){e.exports=require("@babel/runtime/helpers/classCallCheck")},QfWi:function(e,t,n){"use strict";n.r(t);var r=n("MmcY"),i=n.n(r),o=n("86LY"),s=n.n(o),a=n("a4YD"),u=n.n(a),l=n("ZmRK"),c=n.n(l),f=n("cB7G"),p=n.n(f),h=n("mdGc"),d=n.n(h),v=n("iTvO"),b=n.n(v),y=n("l3wB"),m=function(){function e(t,n,r){i()(this,e),Object.defineProperties(this,{target:{value:t},path:{value:r},propName:{value:r.split(".").slice(0,-1).join(".")},resolve:{writable:!0},cachedPromise:{writable:!0},validateCompletePromise:{writable:!0},valid:{writable:!0},observed:{writable:!0},pending:{writable:!0},validatorFn:{value:n}}),this.reset()}return b()(e,[{key:"reset",value:function(){this.cachedPromise=null,this.resolve=null,this.valid=!0,this.observed=!1,this.pending=!1,this.validateCompletePromise=null}},{key:"validate",value:function(){var e=this;this.observed=!0;var t=Object(y.get)(this.target,this.propName),n=Promise.resolve(this.validatorFn(t,this.target));this.cachedPromise=n,!1===this.pending&&(this.validateCompletePromise=new Promise((function(t){e.resolve=t}))),this.pending=!0,n.then((function(t){e.cachedPromise===n&&(e.valid=t,e.pending=!1,e.resolve(),e.target.requestUpdate())}))}},{key:"getKeys",value:function(){var e=["valid","pending","observed"];for(var t in this)Object.prototype.hasOwnProperty.call(this,t)&&e.push(t);return e}},{key:"toString",value:function(){var e=this.getKeys();return JSON.stringify(this,e,2)}},{key:"validateComplete",get:function(){return this.validateCompletePromise}}]),e}(),g=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";for(var o in i()(this,e),Object.defineProperty(this,"resolve",{writable:!0}),Object.defineProperty(this,"validateCompleteResolved",{writable:!0}),Object.defineProperty(this,"validateCompletePromise",{writable:!0}),n)if(Object.prototype.hasOwnProperty.call(n,o)){if(Object.prototype.hasOwnProperty.call(this,o))throw new Error("".concat(o," is a reserved keyword and cannot be used as a validator name."));var s=r;0===s.length?s=o:s+="."+o,"function"==typeof n[o]?this[o]=new m(t,n[o],s):this[o]=new e(t,n[o],s)}this.reset()}return b()(e,[{key:"reset",value:function(){var t=this;for(var n in this.validateCompletePromise=new Promise((function(e){t.resolve=e})),this.validateCompleteResolved=!1,this)Object.prototype.hasOwnProperty.call(this,n)&&(this[n]instanceof e||this[n]instanceof m)&&this[n].reset()}},{key:"validate",value:function(){for(var t in this)Object.prototype.hasOwnProperty.call(this,t)&&(this[t]instanceof e||this[t]instanceof m)&&this[t].validate()}},{key:"getKeys",value:function(){var e=["valid","pending","observed"];for(var t in this)Object.prototype.hasOwnProperty.call(this,t)&&(e.push(t),e.push.apply(e,d()(this[t].getKeys())));return e}},{key:"toString",value:function(){var e=this.getKeys();return JSON.stringify(this,e,2)}},{key:"valid",get:function(){for(var t in this)if(Object.prototype.hasOwnProperty.call(this,t)&&(this[t]instanceof e||this[t]instanceof m)&&!1===this[t].valid)return!1;return!0}},{key:"pending",get:function(){for(var t in this)if(Object.prototype.hasOwnProperty.call(this,t)&&(this[t]instanceof e||this[t]instanceof m)&&!0===this[t].pending)return!0;return!1}},{key:"observed",get:function(){for(var t in this)if(Object.prototype.hasOwnProperty.call(this,t)&&(this[t]instanceof e||this[t]instanceof m)&&!0===this[t].observed)return!0;return!1}},{key:"validateComplete",get:function(){var e=this;this.pending&&this.validateCompleteResolved&&(this.validateCompleteResolved=!1,this.validateCompletePromise=new Promise((function(t){e.resolve=t})));return function t(){var n=Object.keys(e).map((function(t){return e[t].validateComplete}));Promise.all(n).then((function(){if(e.pending)return t();e.resolve(),e.validateCompleteResolved=!0}))}(),this.validateCompletePromise}}]),e}(),O=function(e){return function(e){function t(){var e,n;i()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];n=s()(this,(e=u()(t)).call.apply(e,[this].concat(o)));var l=void 0;return Object.defineProperties(c()(n),{validators:{get:function(){return l},set:function(e){void 0===l&&(l=e,this.form=new g(this,e))}},form:{writable:!0,enumerable:!0}}),n}return p()(t,e),t}(e)},P=/^[0-9]+$/,w=function(e){return"string"==typeof e&&P.test(e)},j=function(e,t){return function(n,r){var i=Object(y.get)(r,e);return void 0!==i&&t(n,i)}},C=function(e){return j(e,(function(e,t){return void 0!==t&&e===t}))},x=function(e){return function(t){return"string"==typeof t&&t.length>=e}},k=function(e){return function(t){return"string"==typeof t&&t.length<=e}};function q(e){return"string"==typeof e&&""!==e}var R=function(e,t){return e instanceof RegExp||(e=new RegExp(e,t)),function(t){return e.test(t)}};n.d(t,"validationMixin",(function(){return O})),n.d(t,"isAllDigits",(function(){return w})),n.d(t,"isEqual",(function(){return C})),n.d(t,"minLength",(function(){return x})),n.d(t,"maxLength",(function(){return k})),n.d(t,"isRequired",(function(){return q})),n.d(t,"ValidationFunction",(function(){return m})),n.d(t,"ValidationProperty",(function(){return g})),n.d(t,"pattern",(function(){return R})),n.d(t,"compare",(function(){return j}))},ZmRK:function(e,t){e.exports=require("@babel/runtime/helpers/assertThisInitialized")},a4YD:function(e,t){e.exports=require("@babel/runtime/helpers/getPrototypeOf")},cB7G:function(e,t){e.exports=require("@babel/runtime/helpers/inherits")},iTvO:function(e,t){e.exports=require("@babel/runtime/helpers/createClass")},l3wB:function(e,t){e.exports=require("@aofl/object-utils")},mdGc:function(e,t){e.exports=require("@babel/runtime/helpers/toConsumableArray")}}); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@aofl/form-validate", | ||
"version": "3.5.0-beta.8", | ||
"version": "3.5.0-beta.9", | ||
"description": "Form validation mixin for AoflElement", | ||
@@ -41,4 +41,4 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@aofl/cli": "^3.5.0-beta.8", | ||
"@aofl/object-utils": "^3.5.0-beta.8", | ||
"@aofl/cli": "^3.5.0-beta.9", | ||
"@aofl/object-utils": "^3.5.0-beta.9", | ||
"cross-env": "^6.0.3", | ||
@@ -45,0 +45,0 @@ "jsdoc": "^3.6.3", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38649
740