Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

@egjs/deview-infinite

Package Overview
Dependencies
3
Maintainers
8
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.1 to 0.1.2

4

dist/infinite.cjs.js

@@ -7,3 +7,3 @@ /*

repository: git+https://github.com/NAVER-FEPlatform/deview2019-demo.git
version: 0.1.1
version: 0.1.2
*/

@@ -95,3 +95,3 @@ 'use strict';

overflow = _a.overflow;
var scrollTop = overflow ? _this.container.scrollTop : document.documentElement.scrollTop;
var scrollTop = overflow ? _this.container.scrollTop : window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
var relativeScrollTop = scrollTop - _this.containerOffset;

@@ -98,0 +98,0 @@

@@ -7,3 +7,3 @@ /*

repository: git+https://github.com/NAVER-FEPlatform/deview2019-demo.git
version: 0.1.1
version: 0.1.2
*/

@@ -93,3 +93,3 @@ import Component from '@egjs/component';

overflow = _a.overflow;
var scrollTop = overflow ? _this.container.scrollTop : document.documentElement.scrollTop;
var scrollTop = overflow ? _this.container.scrollTop : window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
var relativeScrollTop = scrollTop - _this.containerOffset;

@@ -96,0 +96,0 @@

@@ -7,3 +7,3 @@ /*

repository: git+https://github.com/NAVER-FEPlatform/deview2019-demo.git
version: 0.1.1
version: 0.1.2
*/

@@ -777,3 +777,3 @@ (function (global, factory) {

overflow = _a.overflow;
var scrollTop = overflow ? _this.container.scrollTop : document.documentElement.scrollTop;
var scrollTop = overflow ? _this.container.scrollTop : window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
var relativeScrollTop = scrollTop - _this.containerOffset;

@@ -780,0 +780,0 @@

@@ -7,5 +7,5 @@ /*

repository: git+https://github.com/NAVER-FEPlatform/deview2019-demo.git
version: 0.1.1
version: 0.1.2
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Infinite=e()}(this,function(){"use strict";var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function c(t){return void 0===t}var t=function(){var t=function(){function t(){this._eventHandler={},this.options={}}var e=t.prototype;return e.trigger=function(t,e){void 0===e&&(e={});var n=this._eventHandler[t]||[];if(!(0<n.length))return!0;n=n.concat(),e.eventType=t;var r=!1,i=[e],o=0;e.stop=function(){r=!0},e.currentTarget=this;for(var s=arguments.length,c=new Array(2<s?s-2:0),f=2;f<s;f++)c[f-2]=arguments[f];for(1<=c.length&&(i=i.concat(c)),o=0;n[o];o++)n[o].apply(this,i);return!r},e.once=function(i,o){if("object"==typeof i&&c(o)){var t,e=i;for(t in e)this.once(t,e[t]);return this}if("string"==typeof i&&"function"==typeof o){var s=this;this.on(i,function t(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];o.apply(s,n),s.off(i,t)})}return this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&c(e)){var n,r=t;for(n in r)this.on(n,r[n]);return this}if("string"==typeof t&&"function"==typeof e){var i=this._eventHandler[t];c(i)&&(this._eventHandler[t]=[],i=this._eventHandler[t]),i.push(e)}return this},e.off=function(t,e){if(c(t))return this._eventHandler={},this;if(c(e)){if("string"==typeof t)return this._eventHandler[t]=void 0,this;var n,r=t;for(n in r)this.off(n,r[n]);return this}var i,o,s=this._eventHandler[t];if(s)for(i=0;void 0!==(o=s[i]);i++)if(o===e){s=s.splice(i,1);break}return this},t}();return t.VERSION="2.1.2",t}(),m=function(){function t(){this.keys=[],this.values=[]}var e=t.prototype;return e.get=function(t){return this.values[this.keys.indexOf(t)]},e.set=function(t,e){var n=this.keys,r=this.values,i=n.indexOf(t),o=-1===i?n.length:i;n[o]=t,r[o]=e},t}(),w=function(){function t(){this.object={}}var e=t.prototype;return e.get=function(t){return this.object[t]},e.set=function(t,e){this.object[t]=e},t}(),_="function"==typeof Map,s=function(){function t(){}var e=t.prototype;return e.connect=function(t,e){this.prev=t,this.next=e,t&&(t.next=this),e&&(e.prev=this)},e.disconnect=function(){var t=this.prev,e=this.next;t&&(t.next=e),e&&(e.prev=t)},e.getIndex=function(){for(var t=this,e=-1;t;)t=t.prev,++e;return e},t}();var E=function(){function t(t,e,n,r,i,o,s,c){this.prevList=t,this.list=e,this.added=n,this.removed=r,this.changed=i,this.maintained=o,this.changedBeforeAdded=s,this.fixed=c}var e=t.prototype;return Object.defineProperty(e,"ordered",{get:function(){return this.cacheOrdered||this.caculateOrdered(),this.cacheOrdered},enumerable:!0,configurable:!0}),Object.defineProperty(e,"pureChanged",{get:function(){return this.cachePureChanged||this.caculateOrdered(),this.cachePureChanged},enumerable:!0,configurable:!0}),e.caculateOrdered=function(){var t=function(t,n){var c=[],f=[];return t.forEach(function(t){var e=t[0],n=t[1],r=new s;c[e]=r,f[n]=r}),c.forEach(function(t,e){t.connect(c[e-1])}),t.filter(function(t,e){return!n[e]}).map(function(t,e){var n=t[0],r=t[1];if(n===r)return[0,0];var i=c[n],o=f[r-1],s=i.getIndex();return i.disconnect(),o?i.connect(o,o.next):i.connect(void 0,c[0]),[s,i.getIndex()]})}(this.changedBeforeAdded,this.fixed),c=this.changed,f=[];this.cacheOrdered=t.filter(function(t,e){var n=t[0],r=t[1],i=c[e],o=i[0],s=i[1];if(n!==r)return f.push([o,s]),!0}),this.cachePureChanged=f},t}();var e,n="function"==typeof Map?void 0:(e=0,function(t){return t.__DIFF_KEY__||(t.__DIFF_KEY__=++e)});function f(t,e){return function(t,e,n){var r=_?Map:n?w:m,i=n||function(t){return t},o=[],s=[],c=[],f=t.map(i),u=e.map(i),a=new r,h=new r,l=[],d=[],v={},p=[],g=0,y=0;return f.forEach(function(t,e){a.set(t,e)}),u.forEach(function(t,e){h.set(t,e)}),f.forEach(function(t,e){var n=h.get(t);void 0===n?(++y,s.push(e)):v[n]=y}),u.forEach(function(t,e){var n=a.get(t);void 0===n?(o.push(e),++g):(c.push([n,e]),y=v[e]||0,l.push([n-y,e-g]),d.push(e===n),n!==e&&p.push([n,e]))}),s.reverse(),new E(t,e,o,s,p,c,l,d)}(t,e,n)}var r=function(r){function t(t,e){void 0===e&&(e={});var n=r.call(this)||this;return n.container=t,n.items=[],n.containerOffset=0,n.containerHeight=0,n.scrollHeight=0,n.timer=0,n.onScroll=function(){var t=n.options,e=t.threshold;(t.overflow?n.container.scrollTop:document.documentElement.scrollTop)-n.containerOffset>n.scrollHeight-n.containerHeight-e&&(clearTimeout(n.timer),n.timer=window.setTimeout(function(){n.trigger("append",{requestIndex:n.items.length})},60))},n.onResize=function(){var t=n.options.overflow;n.containerOffset=t?0:n.container.getBoundingClientRect().top-document.body.getBoundingClientRect().top,n.containerHeight=t?n.container.offsetHeight:window.innerHeight,n.items.forEach(function(t){t.size=0}),n.layout()},n.options=o({threshold:100,margin:0,renderExternal:!1,overflow:!1},e),e.overflow&&(t.style.overflow="scroll"),(e.overflow?t:window).addEventListener("scroll",n.onScroll),window.addEventListener("resize",n.onResize),n.onResize(),n.onScroll(),n}!function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(t,r);var e=t.prototype;return e.insert=function(t,e){var n=this.options,r=this.items,i={el:"object"==typeof e?e:function(t){var e=document.createElement("div");return e.innerHTML=t,e.children[0]}(e),size:0,pos:0};if(r.splice(t,0,i),!n.renderExternal){var o=r[t+1];this.container.insertBefore(i.el,o?o.el:null),this.layout()}return i},e.remove=function(t){var e=this.options,n=this.items.splice(t,1)[0];return e.renderExternal||(this.container.removeChild(n.el),this.layout()),n},e.layout=function(){var t=this.options,e=t.overflow,n=t.margin,r=void 0===n?0:n,i=0;return this.items.forEach(function(t){t.size||(t.size=t.el.offsetHeight),t.pos=i,i+=t.size+r}),e||(this.container.style.height=i+"px"),this.scrollHeight=i,this.items.forEach(function(t){t.el.style.cssText+="position: absolute;top: "+t.pos+"px;"}),this.onScroll(),this},e.sync=function(t){var i=this,e=f(this.items.map(function(t){return t.el}),t),n=e.removed,r=e.ordered,o=e.added,s=e.list;return n.forEach(function(t){i.remove(t)}),r.forEach(function(t){var e=t[0],n=t[1],r=i.remove(e);i.insert(n,r.el).size=r.size}),o.forEach(function(t){i.insert(t,s[t])}),this.layout(),this},e.append=function(t){return this.insert(this.items.length,t),this},e.destroy=function(){(this.options.overflow?this.container:window).removeEventListener("scroll",this.onScroll),window.removeEventListener("resize",this.onResize)},t}(t);return r.DEFAULT_OPTIONS={threshold:100,margin:0,renderExternal:!1,overflow:!1},r});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Infinite=e()}(this,function(){"use strict";var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function c(t){return void 0===t}var t=function(){var t=function(){function t(){this._eventHandler={},this.options={}}var e=t.prototype;return e.trigger=function(t,e){void 0===e&&(e={});var n=this._eventHandler[t]||[];if(!(0<n.length))return!0;n=n.concat(),e.eventType=t;var r=!1,i=[e],o=0;e.stop=function(){r=!0},e.currentTarget=this;for(var s=arguments.length,c=new Array(2<s?s-2:0),f=2;f<s;f++)c[f-2]=arguments[f];for(1<=c.length&&(i=i.concat(c)),o=0;n[o];o++)n[o].apply(this,i);return!r},e.once=function(i,o){if("object"==typeof i&&c(o)){var t,e=i;for(t in e)this.once(t,e[t]);return this}if("string"==typeof i&&"function"==typeof o){var s=this;this.on(i,function t(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];o.apply(s,n),s.off(i,t)})}return this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&c(e)){var n,r=t;for(n in r)this.on(n,r[n]);return this}if("string"==typeof t&&"function"==typeof e){var i=this._eventHandler[t];c(i)&&(this._eventHandler[t]=[],i=this._eventHandler[t]),i.push(e)}return this},e.off=function(t,e){if(c(t))return this._eventHandler={},this;if(c(e)){if("string"==typeof t)return this._eventHandler[t]=void 0,this;var n,r=t;for(n in r)this.off(n,r[n]);return this}var i,o,s=this._eventHandler[t];if(s)for(i=0;void 0!==(o=s[i]);i++)if(o===e){s=s.splice(i,1);break}return this},t}();return t.VERSION="2.1.2",t}(),m=function(){function t(){this.keys=[],this.values=[]}var e=t.prototype;return e.get=function(t){return this.values[this.keys.indexOf(t)]},e.set=function(t,e){var n=this.keys,r=this.values,i=n.indexOf(t),o=-1===i?n.length:i;n[o]=t,r[o]=e},t}(),w=function(){function t(){this.object={}}var e=t.prototype;return e.get=function(t){return this.object[t]},e.set=function(t,e){this.object[t]=e},t}(),_="function"==typeof Map,s=function(){function t(){}var e=t.prototype;return e.connect=function(t,e){this.prev=t,this.next=e,t&&(t.next=this),e&&(e.prev=this)},e.disconnect=function(){var t=this.prev,e=this.next;t&&(t.next=e),e&&(e.prev=t)},e.getIndex=function(){for(var t=this,e=-1;t;)t=t.prev,++e;return e},t}();var E=function(){function t(t,e,n,r,i,o,s,c){this.prevList=t,this.list=e,this.added=n,this.removed=r,this.changed=i,this.maintained=o,this.changedBeforeAdded=s,this.fixed=c}var e=t.prototype;return Object.defineProperty(e,"ordered",{get:function(){return this.cacheOrdered||this.caculateOrdered(),this.cacheOrdered},enumerable:!0,configurable:!0}),Object.defineProperty(e,"pureChanged",{get:function(){return this.cachePureChanged||this.caculateOrdered(),this.cachePureChanged},enumerable:!0,configurable:!0}),e.caculateOrdered=function(){var t=function(t,n){var c=[],f=[];return t.forEach(function(t){var e=t[0],n=t[1],r=new s;c[e]=r,f[n]=r}),c.forEach(function(t,e){t.connect(c[e-1])}),t.filter(function(t,e){return!n[e]}).map(function(t,e){var n=t[0],r=t[1];if(n===r)return[0,0];var i=c[n],o=f[r-1],s=i.getIndex();return i.disconnect(),o?i.connect(o,o.next):i.connect(void 0,c[0]),[s,i.getIndex()]})}(this.changedBeforeAdded,this.fixed),c=this.changed,f=[];this.cacheOrdered=t.filter(function(t,e){var n=t[0],r=t[1],i=c[e],o=i[0],s=i[1];if(n!==r)return f.push([o,s]),!0}),this.cachePureChanged=f},t}();var e,n="function"==typeof Map?void 0:(e=0,function(t){return t.__DIFF_KEY__||(t.__DIFF_KEY__=++e)});function f(t,e){return function(t,e,n){var r=_?Map:n?w:m,i=n||function(t){return t},o=[],s=[],c=[],f=t.map(i),u=e.map(i),a=new r,h=new r,l=[],d=[],p={},v=[],g=0,y=0;return f.forEach(function(t,e){a.set(t,e)}),u.forEach(function(t,e){h.set(t,e)}),f.forEach(function(t,e){var n=h.get(t);void 0===n?(++y,s.push(e)):p[n]=y}),u.forEach(function(t,e){var n=a.get(t);void 0===n?(o.push(e),++g):(c.push([n,e]),y=p[e]||0,l.push([n-y,e-g]),d.push(e===n),n!==e&&v.push([n,e]))}),s.reverse(),new E(t,e,o,s,v,c,l,d)}(t,e,n)}var r=function(r){function t(t,e){void 0===e&&(e={});var n=r.call(this)||this;return n.container=t,n.items=[],n.containerOffset=0,n.containerHeight=0,n.scrollHeight=0,n.timer=0,n.onScroll=function(){var t=n.options,e=t.threshold;(t.overflow?n.container.scrollTop:window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop)-n.containerOffset>n.scrollHeight-n.containerHeight-e&&(clearTimeout(n.timer),n.timer=window.setTimeout(function(){n.trigger("append",{requestIndex:n.items.length})},60))},n.onResize=function(){var t=n.options.overflow;n.containerOffset=t?0:n.container.getBoundingClientRect().top-document.body.getBoundingClientRect().top,n.containerHeight=t?n.container.offsetHeight:window.innerHeight,n.items.forEach(function(t){t.size=0}),n.layout()},n.options=o({threshold:100,margin:0,renderExternal:!1,overflow:!1},e),e.overflow&&(t.style.overflow="scroll"),(e.overflow?t:window).addEventListener("scroll",n.onScroll),window.addEventListener("resize",n.onResize),n.onResize(),n.onScroll(),n}!function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(t,r);var e=t.prototype;return e.insert=function(t,e){var n=this.options,r=this.items,i={el:"object"==typeof e?e:function(t){var e=document.createElement("div");return e.innerHTML=t,e.children[0]}(e),size:0,pos:0};if(r.splice(t,0,i),!n.renderExternal){var o=r[t+1];this.container.insertBefore(i.el,o?o.el:null),this.layout()}return i},e.remove=function(t){var e=this.options,n=this.items.splice(t,1)[0];return e.renderExternal||(this.container.removeChild(n.el),this.layout()),n},e.layout=function(){var t=this.options,e=t.overflow,n=t.margin,r=void 0===n?0:n,i=0;return this.items.forEach(function(t){t.size||(t.size=t.el.offsetHeight),t.pos=i,i+=t.size+r}),e||(this.container.style.height=i+"px"),this.scrollHeight=i,this.items.forEach(function(t){t.el.style.cssText+="position: absolute;top: "+t.pos+"px;"}),this.onScroll(),this},e.sync=function(t){var i=this,e=f(this.items.map(function(t){return t.el}),t),n=e.removed,r=e.ordered,o=e.added,s=e.list;return n.forEach(function(t){i.remove(t)}),r.forEach(function(t){var e=t[0],n=t[1],r=i.remove(e);i.insert(n,r.el).size=r.size}),o.forEach(function(t){i.insert(t,s[t])}),this.layout(),this},e.append=function(t){return this.insert(this.items.length,t),this},e.destroy=function(){(this.options.overflow?this.container:window).removeEventListener("scroll",this.onScroll),window.removeEventListener("resize",this.onResize)},t}(t);return r.DEFAULT_OPTIONS={threshold:100,margin:0,renderExternal:!1,overflow:!1},r});
//# sourceMappingURL=infinite.min.js.map
{
"name": "@egjs/deview-infinite",
"version": "0.1.1",
"version": "0.1.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "./dist/infinite.cjs.js",

@@ -127,3 +127,5 @@ import Component from "@egjs/component";

} = this.options;
const scrollTop = overflow ? this.container.scrollTop : document.documentElement.scrollTop;
const scrollTop = overflow
? this.container.scrollTop
: window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
const relativeScrollTop = scrollTop - this.containerOffset;

@@ -130,0 +132,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc