Comparing version 1.13.3 to 1.13.4
'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var debounce = require('debounce'); | ||
var debounce = _interopDefault(require('debounce')); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var debounce__default = /*#__PURE__*/_interopDefaultLegacy(debounce); | ||
function _classCallCheck(instance, Constructor) { | ||
@@ -14,3 +16,3 @@ if (!(instance instanceof Constructor)) { | ||
function _slicedToArray(arr, i) { | ||
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); | ||
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); | ||
} | ||
@@ -23,13 +25,13 @@ | ||
function _iterableToArrayLimit(arr, i) { | ||
if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { | ||
return; | ||
} | ||
var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); | ||
if (_i == null) return; | ||
var _arr = []; | ||
var _n = true; | ||
var _d = false; | ||
var _e = undefined; | ||
var _s, _e; | ||
try { | ||
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { | ||
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { | ||
_arr.push(_s.value); | ||
@@ -53,4 +55,21 @@ | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) return; | ||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) n = o.constructor.name; | ||
if (n === "Map" || n === "Set") return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); | ||
} | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; | ||
return arr2; | ||
} | ||
function _nonIterableRest() { | ||
throw new TypeError("Invalid attempt to destructure non-iterable instance"); | ||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
@@ -114,3 +133,3 @@ | ||
var digest = debounce(function () { | ||
var digest = debounce__default['default'](function () { | ||
if (!state.initialised) { | ||
@@ -117,0 +136,0 @@ return; |
@@ -1,6 +0,6 @@ | ||
// Version 1.13.3 kapsule - https://github.com/vasturiano/kapsule | ||
// Version 1.13.4 kapsule - https://github.com/vasturiano/kapsule | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
(global = global || self, global.Kapsule = factory()); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Kapsule = factory()); | ||
}(this, (function () { 'use strict'; | ||
@@ -15,3 +15,3 @@ | ||
function _slicedToArray(arr, i) { | ||
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); | ||
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); | ||
} | ||
@@ -24,13 +24,13 @@ | ||
function _iterableToArrayLimit(arr, i) { | ||
if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { | ||
return; | ||
} | ||
var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); | ||
if (_i == null) return; | ||
var _arr = []; | ||
var _n = true; | ||
var _d = false; | ||
var _e = undefined; | ||
var _s, _e; | ||
try { | ||
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { | ||
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { | ||
_arr.push(_s.value); | ||
@@ -54,4 +54,21 @@ | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) return; | ||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) n = o.constructor.name; | ||
if (n === "Map" || n === "Set") return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); | ||
} | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; | ||
return arr2; | ||
} | ||
function _nonIterableRest() { | ||
throw new TypeError("Invalid attempt to destructure non-iterable instance"); | ||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
@@ -73,2 +90,3 @@ | ||
*/ | ||
function debounce(func, wait, immediate){ | ||
@@ -75,0 +93,0 @@ var timeout, args, context, timestamp, result; |
@@ -1,2 +0,2 @@ | ||
// Version 1.13.3 kapsule - https://github.com/vasturiano/kapsule | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n=n||self).Kapsule=t()}(this,(function(){"use strict";function n(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){if(!(Symbol.iterator in Object(n)||"[object Arguments]"===Object.prototype.toString.call(n)))return;var e=[],r=!0,i=!1,o=void 0;try{for(var u,a=n[Symbol.iterator]();!(r=(u=a.next()).done)&&(e.push(u.value),!t||e.length!==t);r=!0);}catch(n){i=!0,o=n}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return e}(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function t(n,t,e){var r,i,o,u,a;function l(){var c=Date.now()-u;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,e||(a=n.apply(o,i),o=i=null))}null==t&&(t=100);var c=function(){o=this,i=arguments,u=Date.now();var c=e&&!r;return r||(r=setTimeout(l,t)),c&&(a=n.apply(o,i),o=i=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=n.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}t.debounce=t;var e=t,r=function n(t,e){var r=e.default,i=void 0===r?null:r,o=e.triggerUpdate,u=void 0===o||o,a=e.onChange,l=void 0===a?function(n,t){}:a;!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),this.name=t,this.defaultVal=i,this.triggerUpdate=u,this.onChange=l};return function(t){var i=t.stateInit,o=void 0===i?function(){return{}}:i,u=t.props,a=void 0===u?{}:u,l=t.methods,c=void 0===l?{}:l,f=t.aliases,s=void 0===f?{}:f,d=t.init,v=void 0===d?function(){}:d,p=t.update,h=void 0===p?function(){}:p,y=Object.keys(a).map((function(n){return new r(n,a[n])}));return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=Object.assign({},o instanceof Function?o(t):o,{initialised:!1}),i={};function u(n){return a(n,t),l(),u}var a=function(n,t){v.call(u,n,r,t),r.initialised=!0},l=e((function(){r.initialised&&(h.call(u,r,i),i={})}),1);return y.forEach((function(n){u[n.name]=function(n){var t=n.name,e=n.triggerUpdate,o=void 0!==e&&e,a=n.onChange,c=void 0===a?function(n,t){}:a,f=n.defaultVal,s=void 0===f?null:f;return function(n){var e=r[t];if(!arguments.length)return e;var a=void 0===n?s:n;return r[t]=a,c.call(u,a,r,e),!i.hasOwnProperty(t)&&(i[t]=e),o&&l(),u}}(n)})),Object.keys(c).forEach((function(n){u[n]=function(){for(var t,e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];return(t=c[n]).call.apply(t,[u,r].concat(i))}})),Object.entries(s).forEach((function(t){var e=n(t,2),r=e[0],i=e[1];return u[r]=u[i]})),u.resetProps=function(){return y.forEach((function(n){u[n.name](n.defaultVal)})),u},u.resetProps(),r._rerender=l,u}}})); | ||
// Version 1.13.4 kapsule - https://github.com/vasturiano/kapsule | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).Kapsule=t()}(this,(function(){"use strict";function n(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){var e=n&&("undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"]);if(null==e)return;var r,i,o=[],a=!0,u=!1;try{for(e=e.call(n);!(a=(r=e.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(n){u=!0,i=n}finally{try{a||null==e.return||e.return()}finally{if(u)throw i}}return o}(n,e)||function(n,e){if(!n)return;if("string"==typeof n)return t(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);"Object"===r&&n.constructor&&(r=n.constructor.name);if("Map"===r||"Set"===r)return Array.from(n);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}function e(n,t,e){var r,i,o,a,u;function l(){var c=Date.now()-a;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,e||(u=n.apply(o,i),o=i=null))}null==t&&(t=100);var c=function(){o=this,i=arguments,a=Date.now();var c=e&&!r;return r||(r=setTimeout(l,t)),c&&(u=n.apply(o,i),o=i=null),u};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(u=n.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}e.debounce=e;var r=e,i=function n(t,e){var r=e.default,i=void 0===r?null:r,o=e.triggerUpdate,a=void 0===o||o,u=e.onChange,l=void 0===u?function(n,t){}:u;!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),this.name=t,this.defaultVal=i,this.triggerUpdate=a,this.onChange=l};return function(t){var e=t.stateInit,o=void 0===e?function(){return{}}:e,a=t.props,u=void 0===a?{}:a,l=t.methods,c=void 0===l?{}:l,f=t.aliases,s=void 0===f?{}:f,d=t.init,p=void 0===d?function(){}:d,v=t.update,h=void 0===v?function(){}:v,y=Object.keys(u).map((function(n){return new i(n,u[n])}));return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object.assign({},o instanceof Function?o(t):o,{initialised:!1}),i={};function a(n){return u(n,t),l(),a}var u=function(n,t){p.call(a,n,e,t),e.initialised=!0},l=r((function(){e.initialised&&(h.call(a,e,i),i={})}),1);return y.forEach((function(n){a[n.name]=function(n){var t=n.name,r=n.triggerUpdate,o=void 0!==r&&r,u=n.onChange,c=void 0===u?function(n,t){}:u,f=n.defaultVal,s=void 0===f?null:f;return function(n){var r=e[t];if(!arguments.length)return r;var u=void 0===n?s:n;return e[t]=u,c.call(a,u,e,r),!i.hasOwnProperty(t)&&(i[t]=r),o&&l(),a}}(n)})),Object.keys(c).forEach((function(n){a[n]=function(){for(var t,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(t=c[n]).call.apply(t,[a,e].concat(i))}})),Object.entries(s).forEach((function(t){var e=n(t,2),r=e[0],i=e[1];return a[r]=a[i]})),a.resetProps=function(){return y.forEach((function(n){a[n.name](n.defaultVal)})),a},a.resetProps(),e._rerender=l,a}}})); |
@@ -10,3 +10,3 @@ import debounce from 'debounce'; | ||
function _slicedToArray(arr, i) { | ||
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); | ||
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); | ||
} | ||
@@ -19,13 +19,13 @@ | ||
function _iterableToArrayLimit(arr, i) { | ||
if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { | ||
return; | ||
} | ||
var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); | ||
if (_i == null) return; | ||
var _arr = []; | ||
var _n = true; | ||
var _d = false; | ||
var _e = undefined; | ||
var _s, _e; | ||
try { | ||
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { | ||
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { | ||
_arr.push(_s.value); | ||
@@ -49,4 +49,21 @@ | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) return; | ||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) n = o.constructor.name; | ||
if (n === "Map" || n === "Set") return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); | ||
} | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; | ||
return arr2; | ||
} | ||
function _nonIterableRest() { | ||
throw new TypeError("Invalid attempt to destructure non-iterable instance"); | ||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
@@ -53,0 +70,0 @@ |
{ | ||
"name": "kapsule", | ||
"version": "1.13.3", | ||
"version": "1.13.4", | ||
"description": "A closure based Web Component library", | ||
@@ -40,18 +40,18 @@ "unpkg": "dist/kapsule.min.js", | ||
"dependencies": { | ||
"debounce": "^1.2.0" | ||
"debounce": "^1.2.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.8.7", | ||
"@babel/plugin-proposal-class-properties": "^7.8.3", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.8.3", | ||
"@babel/preset-env": "^7.8.7", | ||
"@rollup/plugin-commonjs": "^11.0.2", | ||
"@rollup/plugin-node-resolve": "^7.1.1", | ||
"@babel/core": "^7.14.0", | ||
"@babel/plugin-proposal-class-properties": "^7.13.0", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.13.8", | ||
"@babel/preset-env": "^7.14.1", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^19.0.0", | ||
"@rollup/plugin-node-resolve": "^13.0.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.0.6", | ||
"rollup-plugin-babel": "^4.4.0", | ||
"rollup-plugin-dts": "^1.3.0", | ||
"rollup-plugin-terser": "^5.3.0", | ||
"typescript": "^3.8.3" | ||
"rollup": "^2.47.0", | ||
"rollup-plugin-dts": "^3.0.1", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"typescript": "^4.2.4" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
47817
605
Updateddebounce@^1.2.1