@better-scroll/pull-up
Advanced tools
Comparing version 2.4.2 to 2.5.0
/*! | ||
* better-scroll / pull-up | ||
* (c) 2016-2021 ustbhuangyi | ||
* (c) 2016-2022 ustbhuangyi | ||
* Released under the MIT License. | ||
@@ -251,2 +251,2 @@ */ | ||
export default PullUp; | ||
export { PullUp as default }; |
/*! | ||
* better-scroll / pull-up | ||
* (c) 2016-2021 ustbhuangyi | ||
* (c) 2016-2022 ustbhuangyi | ||
* Released under the MIT License. | ||
@@ -10,3 +10,3 @@ */ | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.PullUp = factory()); | ||
}(this, (function () { 'use strict'; | ||
})(this, (function () { 'use strict'; | ||
@@ -260,2 +260,2 @@ // ssr support | ||
}))); | ||
})); |
@@ -1,1 +0,1 @@ | ||
!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(t="undefined"!=typeof globalThis?globalThis:t||self).PullUp=o()}(this,function(){"use strict";var n="undefined"!=typeof window,o=n&&navigator.userAgent.toLowerCase();o&&/wechatdevtools/.test(o),o&&o.indexOf("android"),function(){if("string"==typeof o){var t=/os (\d\d?_\d(_\d)?)/.exec(o);if(!t)return;t=t[1].split("_").map(function(t){return parseInt(t,10)});13===t[0]&&t[1]}}();if(n)try{var t={};Object.defineProperty(t,"passive",{get:function(){}}),window.addEventListener("test-passive",function(){},t)}catch(t){}var s=n&&document.createElement("div").style,i=function(){if(!n)return!1;for(var t=0,o=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}];t<o.length;t++){var i=o[t];if(void 0!==s[i.value])return i.key}return!1}();function e(t){return!1===i?t:"standard"===i?"transitionEnd"===t?"transitionend":t:i+t.charAt(0).toUpperCase()+t.substr(1)}i&&"standard"!==i&&i.toLowerCase();e("transform"),e("transition");n&&e("perspective")in s,e("transitionTimingFunction"),e("transitionDuration"),e("transitionDelay"),e("transformOrigin"),e("transitionEnd"),e("transitionProperty");var l=[{key:"finishPullUp",name:"finishPullUp"},{key:"openPullUp",name:"openPullUp"},{key:"closePullUp",name:"closePullUp"},{key:"autoPullUpLoad",name:"autoPullUpLoad"}].map(function(t){return{key:t.key,sourceKey:"plugins.pullUpLoad."+t.name}}),r="pullingUp";function c(t){this.scroll=t,this.pulling=!1,this.watching=!1,this.init()}return c.prototype.init=function(){this.handleBScroll(),this.handleOptions(this.scroll.options.pullUpLoad),this.handleHooks(),this.watch()},c.prototype.handleBScroll=function(){this.scroll.registerType([r]),this.scroll.proxy(l)},c.prototype.handleOptions=function(t){this.options=function(t,o){for(var i in o)t[i]=o[i];return t}({threshold:0},t=!0===(t=void 0===t?{}:t)?{}:t),this.scroll.options.probeType=3},c.prototype.handleHooks=function(){var t=this;this.hooksFn=[];var o=this.scroll.scroller.scrollBehaviorY;this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.contentChanged,function(){t.finishPullUp()}),this.registerHooks(o.hooks,o.hooks.eventTypes.computeBoundary,function(t){0<t.maxScrollPos&&(t.maxScrollPos=-1)})},c.prototype.registerHooks=function(t,o,i){t.on(o,i,this),this.hooksFn.push([t,o,i])},c.prototype.watch=function(){this.watching||(this.watching=!0,this.registerHooks(this.scroll,this.scroll.eventTypes.scroll,this.checkPullUp))},c.prototype.unwatch=function(){this.watching=!1,this.scroll.off(this.scroll.eventTypes.scroll,this.checkPullUp)},c.prototype.checkPullUp=function(t){var o=this,i=this.options.threshold;1===this.scroll.movingDirectionY&&t.y<=this.scroll.maxScrollY+i&&(this.pulling=!0,this.scroll.once(this.scroll.eventTypes.scrollEnd,function(){o.pulling=!1}),this.unwatch(),this.scroll.trigger(r))},c.prototype.finishPullUp=function(){var t=this;this.scroll.scroller.scrollBehaviorY.setMovingDirection(0),this.pulling?this.scroll.once(this.scroll.eventTypes.scrollEnd,function(){t.watch()}):this.watch()},c.prototype.openPullUp=function(t){this.handleOptions(t=void 0===t?{}:t),this.watch()},c.prototype.closePullUp=function(){this.unwatch()},c.prototype.autoPullUpLoad=function(){var t=this.options.threshold,o=this.scroll.scroller.scrollBehaviorY;!this.pulling&&this.watching&&(t=o.maxScrollPos+t+-1,this.scroll.scroller.scrollBehaviorY.setMovingDirection(-1),this.scroll.scrollTo(this.scroll.x,t,this.scroll.options.bounceTime))},c.pluginName="pullUpLoad",c}); | ||
!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(t="undefined"!=typeof globalThis?globalThis:t||self).PullUp=o()}(this,function(){"use strict";var s="undefined"!=typeof window,t=s&&navigator.userAgent.toLowerCase();if(t&&/wechatdevtools/.test(t),t&&t.indexOf("android"),"string"==typeof t)(t=/os (\d\d?_\d(_\d)?)/.exec(t))&&(13===(t=t[1].split("_").map(function(t){return parseInt(t,10)}))[0]&&t[1]);if(s)try{var o={};Object.defineProperty(o,"passive",{get:function(){}}),window.addEventListener("test-passive",function(){},o)}catch(t){}var n=s&&document.createElement("div").style,i=function(){if(s)for(var t=0,o=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}];t<o.length;t++){var i=o[t];if(void 0!==n[i.value])return i.key}return!1}();function e(t){return!1===i?t:"standard"===i?"transitionEnd"===t?"transitionend":t:i+t.charAt(0).toUpperCase()+t.substr(1)}i&&"standard"!==i&&i.toLowerCase();e("transform"),e("transition"),s&&e("perspective")in n,e("transitionTimingFunction"),e("transitionDuration"),e("transitionDelay"),e("transformOrigin"),e("transitionEnd"),e("transitionProperty");var l=[{key:"finishPullUp",name:"finishPullUp"},{key:"openPullUp",name:"openPullUp"},{key:"closePullUp",name:"closePullUp"},{key:"autoPullUpLoad",name:"autoPullUpLoad"}].map(function(t){return{key:t.key,sourceKey:"plugins.pullUpLoad."+t.name}}),r="pullingUp";function c(t){this.scroll=t,this.pulling=!1,this.watching=!1,this.init()}return c.prototype.init=function(){this.handleBScroll(),this.handleOptions(this.scroll.options.pullUpLoad),this.handleHooks(),this.watch()},c.prototype.handleBScroll=function(){this.scroll.registerType([r]),this.scroll.proxy(l)},c.prototype.handleOptions=function(t){this.options=function(t,o){for(var i in o)t[i]=o[i];return t}({threshold:0},t=!0===(t=void 0===t?{}:t)?{}:t),this.scroll.options.probeType=3},c.prototype.handleHooks=function(){var t=this,o=(this.hooksFn=[],this.scroll.scroller.scrollBehaviorY);this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.contentChanged,function(){t.finishPullUp()}),this.registerHooks(o.hooks,o.hooks.eventTypes.computeBoundary,function(t){0<t.maxScrollPos&&(t.maxScrollPos=-1)})},c.prototype.registerHooks=function(t,o,i){t.on(o,i,this),this.hooksFn.push([t,o,i])},c.prototype.watch=function(){this.watching||(this.watching=!0,this.registerHooks(this.scroll,this.scroll.eventTypes.scroll,this.checkPullUp))},c.prototype.unwatch=function(){this.watching=!1,this.scroll.off(this.scroll.eventTypes.scroll,this.checkPullUp)},c.prototype.checkPullUp=function(t){var o=this,i=this.options.threshold;1===this.scroll.movingDirectionY&&t.y<=this.scroll.maxScrollY+i&&(this.pulling=!0,this.scroll.once(this.scroll.eventTypes.scrollEnd,function(){o.pulling=!1}),this.unwatch(),this.scroll.trigger(r))},c.prototype.finishPullUp=function(){var t=this;this.scroll.scroller.scrollBehaviorY.setMovingDirection(0),this.pulling?this.scroll.once(this.scroll.eventTypes.scrollEnd,function(){t.watch()}):this.watch()},c.prototype.openPullUp=function(t){this.handleOptions(t=void 0===t?{}:t),this.watch()},c.prototype.closePullUp=function(){this.unwatch()},c.prototype.autoPullUpLoad=function(){var t=this.options.threshold,o=this.scroll.scroller.scrollBehaviorY;!this.pulling&&this.watching&&(o=o.maxScrollPos+t+-1,this.scroll.scroller.scrollBehaviorY.setMovingDirection(-1),this.scroll.scrollTo(this.scroll.x,o,this.scroll.options.bounceTime))},c.pluginName="pullUpLoad",c}); |
{ | ||
"name": "@better-scroll/pull-up", | ||
"version": "2.4.2", | ||
"version": "2.5.0", | ||
"description": "pull up to load more data", | ||
@@ -33,5 +33,5 @@ "author": { | ||
"dependencies": { | ||
"@better-scroll/core": "^2.4.2" | ||
"@better-scroll/core": "^2.5.0" | ||
}, | ||
"gitHead": "c97e67ecf15e616d998e67aa4ce15a7c429691c3" | ||
"gitHead": "0313d72f89a7e928522210d814b9025baf0559cb" | ||
} |
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
35067
Updated@better-scroll/core@^2.5.0