Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular2-infinite-scroll

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-infinite-scroll - npm Package Compare versions

Comparing version 0.1.5 to 0.1.7

src/axis-resolver.js

106

bundles/angular2-infinite-scroll.js

@@ -33,2 +33,4 @@ System.registerDynamic("src/infinite-scroll", ["@angular/core", "./scroller"], true, function($__require, exports, module) {

this._immediate = false;
this._horizontal = false;
this._alwaysCallback = false;
this.scrolled = new core_1.EventEmitter();

@@ -39,3 +41,3 @@ this.scrolledUp = new core_1.EventEmitter();

var containerElement = this.scrollWindow ? window : this.element;
this.scroller = new scroller_1.Scroller(containerElement, setInterval, this.element, this.onScrollDown.bind(this), this.onScrollUp.bind(this), this._distanceDown, this._distanceUp, {}, this._throttle, this._immediate);
this.scroller = new scroller_1.Scroller(containerElement, setInterval, this.element, this.onScrollDown.bind(this), this.onScrollUp.bind(this), this._distanceDown, this._distanceUp, {}, this._throttle, this._immediate, this._horizontal, this._alwaysCallback);
};

@@ -45,7 +47,13 @@ InfiniteScroll.prototype.ngOnDestroy = function() {

};
InfiniteScroll.prototype.onScrollDown = function() {
this.scrolled.next({});
InfiniteScroll.prototype.onScrollDown = function(data) {
if (data === void 0) {
data = {};
}
this.scrolled.next(data);
};
InfiniteScroll.prototype.onScrollUp = function() {
this.scrolledUp.next({});
InfiniteScroll.prototype.onScrollUp = function(data) {
if (data === void 0) {
data = {};
}
this.scrolledUp.next(data);
};

@@ -60,7 +68,10 @@ InfiniteScroll.prototype.handleScroll = function(event) {

__decorate([core_1.Input('immediateCheck'), __metadata('design:type', Boolean)], InfiniteScroll.prototype, "_immediate", void 0);
__decorate([core_1.Input('horizontal'), __metadata('design:type', Boolean)], InfiniteScroll.prototype, "_horizontal", void 0);
__decorate([core_1.Input('alwaysCallback'), __metadata('design:type', Boolean)], InfiniteScroll.prototype, "_alwaysCallback", void 0);
__decorate([core_1.Output(), __metadata('design:type', Object)], InfiniteScroll.prototype, "scrolled", void 0);
__decorate([core_1.Output(), __metadata('design:type', Object)], InfiniteScroll.prototype, "scrolledUp", void 0);
__decorate([core_1.HostListener('scroll', ['$event']), __metadata('design:type', Function), __metadata('design:paramtypes', [Object]), __metadata('design:returntype', void 0)], InfiniteScroll.prototype, "handleScroll", null);
InfiniteScroll = __decorate([core_1.Directive({selector: '[infinite-scroll]'}), __metadata('design:paramtypes', [core_1.ElementRef])], InfiniteScroll);
InfiniteScroll = __decorate([core_1.Directive({selector: '[infinite-scroll]'}), __metadata('design:paramtypes', [(typeof(_a = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _a) || Object])], InfiniteScroll);
return InfiniteScroll;
var _a;
}());

@@ -71,3 +82,3 @@ exports.InfiniteScroll = InfiniteScroll;

System.registerDynamic("src/scroller", ["rxjs/Rx"], true, function($__require, exports, module) {
System.registerDynamic("src/axis-resolver", [], true, function($__require, exports, module) {
"use strict";

@@ -78,5 +89,47 @@ ;

GLOBAL = this;
var AxisResolver = (function() {
function AxisResolver(vertical) {}
AxisResolver.prototype.clientHeightKey = function() {
return this.vertical ? 'clientHeight' : 'clientWidth';
};
AxisResolver.prototype.offsetHeightKey = function() {
return this.vertical ? 'offsetHeight' : 'offsetWidth';
};
AxisResolver.prototype.scrollHeightKey = function() {
return this.vertical ? 'scrollHeight' : 'scrollWidth';
};
AxisResolver.prototype.pageYOffsetKey = function() {
return this.vertical ? 'pageYOffset' : 'pageXOffset';
};
AxisResolver.prototype.offsetTopKey = function() {
return this.vertical ? 'offsetTop' : 'offsetLeft';
};
AxisResolver.prototype.scrollTopKey = function() {
return this.vertical ? 'scrollTop' : 'scrollLeft';
};
AxisResolver.prototype.topKey = function() {
return this.vertical ? 'top' : 'left';
};
return AxisResolver;
}());
exports.AxisResolver = AxisResolver;
return module.exports;
});
System.registerDynamic("src/scroller", ["rxjs/Rx", "./axis-resolver"], true, function($__require, exports, module) {
"use strict";
;
var define,
global = this,
GLOBAL = this;
var Rx_1 = $__require('rxjs/Rx');
var axis_resolver_1 = $__require('./axis-resolver');
var Scroller = (function() {
function Scroller(windowElement, $interval, $elementRef, infiniteScrollDownCallback, infiniteScrollUpCallback, infiniteScrollDownDistance, infiniteScrollUpDistance, infiniteScrollParent, infiniteScrollThrottle, isImmediate) {
function Scroller(windowElement, $interval, $elementRef, infiniteScrollDownCallback, infiniteScrollUpCallback, infiniteScrollDownDistance, infiniteScrollUpDistance, infiniteScrollParent, infiniteScrollThrottle, isImmediate, horizontal, alwaysCallback) {
if (horizontal === void 0) {
horizontal = false;
}
if (alwaysCallback === void 0) {
alwaysCallback = false;
}
this.windowElement = windowElement;

@@ -89,2 +142,4 @@ this.$interval = $interval;

this.isImmediate = isImmediate;
this.horizontal = horizontal;
this.alwaysCallback = alwaysCallback;
this.lastScrollPosition = 0;

@@ -97,2 +152,3 @@ this.isContainerWindow = toString.call(this.windowElement).includes('Window');

this.createInterval();
this.axis = new axis_resolver_1.AxisResolver(!this.horizontal);
}

@@ -115,21 +171,27 @@ Scroller.prototype.defineContainer = function() {

Scroller.prototype.height = function(elem) {
if (isNaN(elem.offsetHeight)) {
return this.documentElement.clientHeight;
var offsetHeight = this.axis.offsetHeightKey();
var clientHeight = this.axis.clientHeightKey();
if (isNaN(elem[offsetHeight])) {
return this.documentElement[clientHeight];
} else {
return elem.offsetHeight;
return elem[offsetHeight];
}
};
Scroller.prototype.offsetTop = function(elem) {
var top = this.axis.topKey();
if (!elem.getBoundingClientRect) {
return;
}
return elem.getBoundingClientRect().top + this.pageYOffset(elem);
return elem.getBoundingClientRect()[top] + this.pageYOffset(elem);
};
Scroller.prototype.pageYOffset = function(elem) {
if (isNaN(window.pageYOffset)) {
return this.documentElement.scrollTop;
var pageYOffset = this.axis.pageYOffsetKey();
var scrollTop = this.axis.scrollTopKey();
var offsetTop = this.axis.offsetTopKey();
if (isNaN(window[pageYOffset])) {
return this.documentElement[scrollTop];
} else if (elem.ownerDocument) {
return elem.ownerDocument.defaultView.pageYOffset;
return elem.ownerDocument.defaultView[pageYOffset];
} else {
elem.offsetTop;
return elem[offsetTop];
}

@@ -151,3 +213,3 @@ };

var shouldScroll = remaining <= containerBreakpoint;
var triggerCallback = shouldScroll && this.scrollEnabled;
var triggerCallback = (this.alwaysCallback || shouldScroll) && this.scrollEnabled;
var shouldClearInterval = shouldScroll && this.checkInterval;

@@ -157,5 +219,5 @@ this.checkWhenEnabled = shouldScroll;

if (scrollingDown) {
this.infiniteScrollDownCallback();
this.infiniteScrollDownCallback({currentScrollPosition: container.scrolledUntilNow});
} else {
this.infiniteScrollUpCallback();
this.infiniteScrollUpCallback({currentScrollPosition: container.scrolledUntilNow});
}

@@ -181,4 +243,6 @@ }

Scroller.prototype.calculatePointsForElement = function() {
var scrollTop = this.axis.scrollTopKey();
var scrollHeight = this.axis.scrollHeightKey();
var height = this.height(this.container);
var scrolledUntilNow = this.container.scrollTop;
var scrolledUntilNow = this.container[scrollTop];
var containerTopOffset = 0;

@@ -189,3 +253,3 @@ var offsetTop = this.offsetTop(this.container);

}
var totalToScroll = this.container.scrollHeight;
var totalToScroll = this.container[scrollHeight];
return {

@@ -192,0 +256,0 @@ height: height,

2

karma.conf.js

@@ -46,3 +46,3 @@ const isDebug = process.env.DEBUG || false;

// paths to support debugging with source maps in dev tools
{pattern: 'src/**/*.ts', included: false, watched: false},
{pattern: 'src/**/*.ts', included: false, watched: false}
// if we swtich to sourcemap files

@@ -49,0 +49,0 @@ // {pattern: 'src/**/*.js.map', included: false, watched: false},

{
"name": "angular2-infinite-scroll",
"version": "0.1.5",
"version": "0.1.7",
"description": "An infinite scroll directive for angular2",

@@ -28,7 +28,7 @@ "main": "angular2-infinite-scroll.js",

"devDependencies": {
"@angular/common": "2.0.0-rc.1",
"@angular/compiler": "2.0.0-rc.1",
"@angular/core": "^2.0.0-rc.1",
"@angular/platform-browser": "2.0.0-rc.1",
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
"@angular/common": "^2.0.0-rc.2",
"@angular/compiler": "^2.0.0-rc.2",
"@angular/core": "^2.0.0-rc.2",
"@angular/platform-browser": "^2.0.0-rc.2",
"@angular/platform-browser-dynamic": "^2.0.0-rc.2",
"autodts": "0.0.6",

@@ -35,0 +35,0 @@ "es6-promise": "^3.0.2",

@@ -21,2 +21,4 @@ "use strict";

this._immediate = false;
this._horizontal = false;
this._alwaysCallback = false;
this.scrolled = new core_1.EventEmitter();

@@ -27,3 +29,3 @@ this.scrolledUp = new core_1.EventEmitter();

var containerElement = this.scrollWindow ? window : this.element;
this.scroller = new scroller_1.Scroller(containerElement, setInterval, this.element, this.onScrollDown.bind(this), this.onScrollUp.bind(this), this._distanceDown, this._distanceUp, {}, this._throttle, this._immediate);
this.scroller = new scroller_1.Scroller(containerElement, setInterval, this.element, this.onScrollDown.bind(this), this.onScrollUp.bind(this), this._distanceDown, this._distanceUp, {}, this._throttle, this._immediate, this._horizontal, this._alwaysCallback);
};

@@ -33,7 +35,9 @@ InfiniteScroll.prototype.ngOnDestroy = function () {

};
InfiniteScroll.prototype.onScrollDown = function () {
this.scrolled.next({});
InfiniteScroll.prototype.onScrollDown = function (data) {
if (data === void 0) { data = {}; }
this.scrolled.next(data);
};
InfiniteScroll.prototype.onScrollUp = function () {
this.scrolledUp.next({});
InfiniteScroll.prototype.onScrollUp = function (data) {
if (data === void 0) { data = {}; }
this.scrolledUp.next(data);
};

@@ -64,2 +68,10 @@ InfiniteScroll.prototype.handleScroll = function (event) {

__decorate([
core_1.Input('horizontal'),
__metadata('design:type', Boolean)
], InfiniteScroll.prototype, "_horizontal", void 0);
__decorate([
core_1.Input('alwaysCallback'),
__metadata('design:type', Boolean)
], InfiniteScroll.prototype, "_alwaysCallback", void 0);
__decorate([
core_1.Output(),

@@ -87,2 +99,2 @@ __metadata('design:type', Object)

exports.InfiniteScroll = InfiniteScroll;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW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RydWN0b3IocHJpdmF0ZSBlbGVtZW50OiBFbGVtZW50UmVmKSB7fVxuXG4gIG5nT25Jbml0KCkge1xuICAgIGNvbnN0IGNvbnRhaW5lckVsZW1lbnQgPSB0aGlzLnNjcm9sbFdpbmRvdyA/IHdpbmRvdyA6IHRoaXMuZWxlbWVudDtcbiAgICB0aGlzLnNjcm9sbGVyID0gbmV3IFNjcm9sbGVyKGNvbnRhaW5lckVsZW1lbnQsIHNldEludGVydmFsLCB0aGlzLmVsZW1lbnQsXG4gICAgICAgIHRoaXMub25TY3JvbGxEb3duLmJpbmQodGhpcyksIHRoaXMub25TY3JvbGxVcC5iaW5kKHRoaXMpLFxuICAgICAgICB0aGlzLl9kaXN0YW5jZURvd24sIHRoaXMuX2Rpc3RhbmNlVXAsIHt9LCB0aGlzLl90aHJvdHRsZSxcbiAgICAgICAgdGhpcy5faW1tZWRpYXRlLCB0aGlzLl9ob3Jpem9udGFsLCB0aGlzLl9hbHdheXNDYWxsYmFjayk7XG4gIH1cblxuICBuZ09uRGVzdHJveSAoKSB7XG4gICAgdGhpcy5zY3JvbGxlci5jbGVhbigpO1xuICB9XG5cbiAgb25TY3JvbGxEb3duKGRhdGEgPSB7fSkge1xuICAgIHRoaXMuc2Nyb2xsZWQubmV4dChkYXRhKTtcbiAgfVxuXG4gIG9uU2Nyb2xsVXAoZGF0YSA9IHt9KSB7XG4gICAgdGhpcy5zY3JvbGxlZFVwLm5leHQoZGF0YSk7XG4gIH1cblxuICBASG9zdExpc3RlbmVyKCdzY3JvbGwnLCBbJyRldmVudCddKVxuICBoYW5kbGVTY3JvbGwoZXZlbnQ6IGFueSkge1xuICAgIHRoaXMuc2Nyb2xsZXIuaGFuZGxlcigpO1xuICB9XG59XG4iXX0=
"use strict";
var Rx_1 = require('rxjs/Rx');
var axis_resolver_1 = require('./axis-resolver');
var Scroller = (function () {
function Scroller(windowElement, $interval, $elementRef, infiniteScrollDownCallback, infiniteScrollUpCallback, infiniteScrollDownDistance, infiniteScrollUpDistance, infiniteScrollParent, infiniteScrollThrottle, isImmediate) {
function Scroller(windowElement, $interval, $elementRef, infiniteScrollDownCallback, infiniteScrollUpCallback, infiniteScrollDownDistance, infiniteScrollUpDistance, infiniteScrollParent, infiniteScrollThrottle, isImmediate, horizontal, alwaysCallback) {
if (horizontal === void 0) { horizontal = false; }
if (alwaysCallback === void 0) { alwaysCallback = false; }
this.windowElement = windowElement;

@@ -12,2 +15,4 @@ this.$interval = $interval;

this.isImmediate = isImmediate;
this.horizontal = horizontal;
this.alwaysCallback = alwaysCallback;
this.lastScrollPosition = 0;

@@ -23,2 +28,3 @@ this.isContainerWindow = toString.call(this.windowElement).includes('Window');

this.createInterval();
this.axis = new axis_resolver_1.AxisResolver(!this.horizontal);
}

@@ -42,11 +48,14 @@ Scroller.prototype.defineContainer = function () {

Scroller.prototype.height = function (elem) {
var offsetHeight = this.axis.offsetHeightKey();
var clientHeight = this.axis.clientHeightKey();
// elem = elem.nativeElement;
if (isNaN(elem.offsetHeight)) {
return this.documentElement.clientHeight;
if (isNaN(elem[offsetHeight])) {
return this.documentElement[clientHeight];
}
else {
return elem.offsetHeight;
return elem[offsetHeight];
}
};
Scroller.prototype.offsetTop = function (elem) {
var top = this.axis.topKey();
// elem = elem.nativeElement;

@@ -56,14 +65,17 @@ if (!elem.getBoundingClientRect) {

}
return elem.getBoundingClientRect().top + this.pageYOffset(elem);
return elem.getBoundingClientRect()[top] + this.pageYOffset(elem);
};
Scroller.prototype.pageYOffset = function (elem) {
var pageYOffset = this.axis.pageYOffsetKey();
var scrollTop = this.axis.scrollTopKey();
var offsetTop = this.axis.offsetTopKey();
// elem = elem.nativeElement;
if (isNaN(window.pageYOffset)) {
return this.documentElement.scrollTop;
if (isNaN(window[pageYOffset])) {
return this.documentElement[scrollTop];
}
else if (elem.ownerDocument) {
return elem.ownerDocument.defaultView.pageYOffset;
return elem.ownerDocument.defaultView[pageYOffset];
}
else {
elem.offsetTop;
return elem[offsetTop];
}

@@ -86,3 +98,3 @@ };

var shouldScroll = remaining <= containerBreakpoint;
var triggerCallback = shouldScroll && this.scrollEnabled;
var triggerCallback = (this.alwaysCallback || shouldScroll) && this.scrollEnabled;
var shouldClearInterval = shouldScroll && this.checkInterval;

@@ -95,6 +107,6 @@ // if (this.useDocumentBottom) {

if (scrollingDown) {
this.infiniteScrollDownCallback();
this.infiniteScrollDownCallback({ currentScrollPosition: container.scrolledUntilNow });
}
else {
this.infiniteScrollUpCallback();
this.infiniteScrollUpCallback({ currentScrollPosition: container.scrolledUntilNow });
}

@@ -121,5 +133,7 @@ }

Scroller.prototype.calculatePointsForElement = function () {
var scrollTop = this.axis.scrollTopKey();
var scrollHeight = this.axis.scrollHeightKey();
var height = this.height(this.container);
// perhaps use this.container.offsetTop instead of 'scrollTop'
var scrolledUntilNow = this.container.scrollTop;
var scrolledUntilNow = this.container[scrollTop];
var containerTopOffset = 0;

@@ -130,3 +144,3 @@ var offsetTop = this.offsetTop(this.container);

}
var totalToScroll = this.container.scrollHeight;
var totalToScroll = this.container[scrollHeight];
// const totalToScroll = this.offsetTop(this.$elementRef.nativeElement) - containerTopOffset + this.height(this.$elementRef.nativeElement);

@@ -165,2 +179,2 @@ return { height: height, scrolledUntilNow: scrolledUntilNow, totalToScroll: totalToScroll };

exports.Scroller = Scroller;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Nyb2xsZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzY3JvbGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0EsbUJBQXlDLFNBQVMsQ0FBQyxDQUFBO0FBRW5EO0lBY0Msa0JBQ1MsYUFBd0MsRUFDeEMsU0FBbUIsRUFDbkIsV0FBdUIsRUFDdkIsMEJBQW9DLEVBQ3BDLHdCQUFrQyxFQUMxQywwQkFBa0MsRUFDbEMsd0JBQWdDLEVBQ2hDLG9CQUErQyxFQUN2QyxzQkFBOEIsRUFDO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JsZVNjcm9sbDogYm9vbGVhbikge1xuXHRcdHRoaXMuc2Nyb2xsRW5hYmxlZCA9ICFlbmFibGVTY3JvbGw7XG5cdFx0Ly8gaWYgKHRoaXMuc2Nyb2xsRW5hYmxlZCAmJiBjaGVja1doZW5FbmFibGVkKSB7XG5cdFx0Ly8gXHRjaGVja1doZW5FbmFibGVkID0gZmFsc2U7XG5cdFx0Ly8gXHRyZXR1cm4gaGFuZGxlcigpO1xuXHRcdC8vIH1cblx0fVxufVxuIl19

@@ -22,4 +22,6 @@ {

"./infinite-scroll.spec.ts",
"./scroller.ts"
"./scroller.ts",
"./axis-resolver.ts",
"./axis-resolver.spec.ts"
]
}
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc