From 8a6d94c32717b02df9989701468eb53286c63089 Mon Sep 17 00:00:00 2001 From: Oren Farhi Date: Wed, 15 Feb 2017 12:49:04 +0200 Subject: [PATCH] updated to ng version 2.3.1, updates in readme --- README.md | 20 +++++------ bundles/angular2-infinite-scroll.js | 54 ++++++++++++++--------------- package.json | 24 ++++++------- 3 files changed, 48 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index f786d3e8..7ecb215a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Inspired by [ng-infinite-scroll](https://github.com/sroze/ngInfiniteScroll) dire Supports in Angular - **Final - 2.x.x** ## Angular Consulting Services -I'm a Senior Javascript Engineer & A Front End Consultant at (Orizens)[http://orizens.com]. +I'm a Senior Javascript Engineer & A Front End Consultant at [Orizens](http://orizens.com). My services include: - consulting to companies and startups on how to approach code in their projects and keep it maintainable. - I provide project bootstrapping and development - while afterwards, I integrate it on site and guide the team on it. @@ -21,15 +21,15 @@ npm install angular2-infinite-scroll --save ## Supported API Currently supported attributes: -* "infiniteScrollDistance" - (number), (optional, default: **2**) - should get a number, the number of viewport lenghts from the bottom of the page at which the event will be triggered. -* "infiniteScrollUpDistance" - (number), (optional, default: **1.5**) - should get a number -* "infiniteScrollThrottle" - (number), (optional, default: **300**) - should get a number of **milliseconds** for throttle. The event will be triggered this many milliseconds after the user *stops* scrolling. -* "infiniteScrollContainer" (string|HTMLElement), (optional, default: null) - should get a html element or css selector for a scrollable element; window or current element will be used if this attribute is empty. -* "scrolled" - (function) - this will callback if the distance threshold has been reached on a scroll down. -* "scrolledUp" - (function) (event: InfiniteScrollEvent) - this will callback if the distance threshold has been reached on a scroll up. -* "scrollWindow" - (boolean), (optional, default: **true**) - listens to the window scroll instead of the actual element scroll. this allows to invoke a callback function in the scope of the element while listenning to the window scroll. -* "immediateCheck" - (boolean), (optional, default: **false**) - invokes the handler immediately to check if a scroll event has been already triggred when the page has been loaded (i.e. - when you refresh a page that has been scrolled). -* "infiniteScrollDisabled" - (boolean), (optional, default: **false**) - doesn't invoke the handler if set to true +* **infiniteScrollDistance**<_number_> - (optional, default: **2**) - should get a number, the number of viewport lenghts from the bottom of the page at which the event will be triggered. +* **infiniteScrollUpDistance**<_number_> - (optional, default: **1.5**) - should get a number +* **infiniteScrollThrottle**<_number_> - (optional, default: **300**) - should get a number of **milliseconds** for throttle. The event will be triggered this many milliseconds after the user *stops* scrolling. +* **infiniteScrollContainer**<_string|HTMLElement_> - (optional, default: null) - should get a html element or css selector for a scrollable element; window or current element will be used if this attribute is empty. +* **scrolled**<_function_> - this will callback if the distance threshold has been reached on a scroll down. +* **scrolledUp**<_function_> - (event: InfiniteScrollEvent) - this will callback if the distance threshold has been reached on a scroll up. +* **scrollWindow**<_boolean_> - (optional, default: **true**) - listens to the window scroll instead of the actual element scroll. this allows to invoke a callback function in the scope of the element while listenning to the window scroll. +* **immediateCheck**<_boolean_> - (optional, default: **false**) - invokes the handler immediately to check if a scroll event has been already triggred when the page has been loaded (i.e. - when you refresh a page that has been scrolled). +* **infiniteScrollDisabled**<_boolean_> - (optional, default: **false**) - doesn't invoke the handler if set to true ## Behavior By default, the directive listens to the **window scroll** event and invoked the callback. diff --git a/bundles/angular2-infinite-scroll.js b/bundles/angular2-infinite-scroll.js index c514a7cc..bd1a06e4 100644 --- a/bundles/angular2-infinite-scroll.js +++ b/bundles/angular2-infinite-scroll.js @@ -1,8 +1,7 @@ System.registerDynamic('src/infinite-scroll', ['@angular/core', './position-resolver', './scroll-register', './scroll-resolver'], true, function ($__require, exports, module) { "use strict"; - var define, - global = this || self, + var global = this || self, GLOBAL = global; var core_1 = $__require('@angular/core'); var position_resolver_1 = $__require('./position-resolver'); @@ -116,7 +115,9 @@ System.registerDynamic('src/infinite-scroll', ['@angular/core', './position-reso selector: '[infinite-scroll]' }] }]; /** @nocollapse */ - InfiniteScroll.ctorParameters = [{ type: core_1.ElementRef }, { type: core_1.NgZone }, { type: position_resolver_1.PositionResolverFactory }, { type: scroll_register_1.ScrollRegister }, { type: scroll_resolver_1.ScrollResolver }]; + InfiniteScroll.ctorParameters = function () { + return [{ type: core_1.ElementRef }, { type: core_1.NgZone }, { type: position_resolver_1.PositionResolverFactory }, { type: scroll_register_1.ScrollRegister }, { type: scroll_resolver_1.ScrollResolver }]; + }; InfiniteScroll.propDecorators = { 'scrolled': [{ type: core_1.Output }], 'scrolledUp': [{ type: core_1.Output }], @@ -134,13 +135,11 @@ System.registerDynamic('src/infinite-scroll', ['@angular/core', './position-reso return InfiniteScroll; }(); exports.InfiniteScroll = InfiniteScroll; - return module.exports; }); System.registerDynamic('src/axis-resolver', ['@angular/core'], true, function ($__require, exports, module) { "use strict"; - var define, - global = this || self, + var global = this || self, GLOBAL = global; var core_1 = $__require('@angular/core'); var AxisResolverFactory = function () { @@ -153,7 +152,9 @@ System.registerDynamic('src/axis-resolver', ['@angular/core'], true, function ($ }; AxisResolverFactory.decorators = [{ type: core_1.Injectable }]; /** @nocollapse */ - AxisResolverFactory.ctorParameters = []; + AxisResolverFactory.ctorParameters = function () { + return []; + }; return AxisResolverFactory; }(); exports.AxisResolverFactory = AxisResolverFactory; @@ -188,13 +189,11 @@ System.registerDynamic('src/axis-resolver', ['@angular/core'], true, function ($ return AxisResolver; }(); exports.AxisResolver = AxisResolver; - return module.exports; }); System.registerDynamic('src/position-resolver', ['@angular/core', './axis-resolver'], true, function ($__require, exports, module) { "use strict"; - var define, - global = this || self, + var global = this || self, GLOBAL = global; var core_1 = $__require('@angular/core'); var axis_resolver_1 = $__require('./axis-resolver'); @@ -207,7 +206,9 @@ System.registerDynamic('src/position-resolver', ['@angular/core', './axis-resolv }; PositionResolverFactory.decorators = [{ type: core_1.Injectable }]; /** @nocollapse */ - PositionResolverFactory.ctorParameters = [{ type: axis_resolver_1.AxisResolverFactory }]; + PositionResolverFactory.ctorParameters = function () { + return [{ type: axis_resolver_1.AxisResolverFactory }]; + }; return PositionResolverFactory; }(); exports.PositionResolverFactory = PositionResolverFactory; @@ -295,13 +296,11 @@ System.registerDynamic('src/position-resolver', ['@angular/core', './axis-resolv return PositionResolver; }(); exports.PositionResolver = PositionResolver; - return module.exports; }); System.registerDynamic('src/index', ['@angular/core', './infinite-scroll', './axis-resolver', './position-resolver', './scroll-register', './scroll-resolver'], true, function ($__require, exports, module) { "use strict"; - var define, - global = this || self, + var global = this || self, GLOBAL = global; var core_1 = $__require('@angular/core'); var infinite_scroll_1 = $__require('./infinite-scroll'); @@ -318,17 +317,17 @@ System.registerDynamic('src/index', ['@angular/core', './infinite-scroll', './ax providers: [axis_resolver_1.AxisResolverFactory, position_resolver_1.PositionResolverFactory, scroll_register_1.ScrollRegister, scroll_resolver_1.ScrollResolver] }] }]; /** @nocollapse */ - InfiniteScrollModule.ctorParameters = []; + InfiniteScrollModule.ctorParameters = function () { + return []; + }; return InfiniteScrollModule; }(); exports.InfiniteScrollModule = InfiniteScrollModule; - return module.exports; }); System.registerDynamic('src/scroll-register', ['@angular/core', 'rxjs/Rx', 'rxjs/add/observable/fromEvent', 'rxjs/add/observable/timer', 'rxjs/add/observable/of', 'rxjs/add/operator/debounce', 'rxjs/add/operator/throttle', 'rxjs/add/operator/filter'], true, function ($__require, exports, module) { "use strict"; - var define, - global = this || self, + var global = this || self, GLOBAL = global; var core_1 = $__require('@angular/core'); var Rx_1 = $__require('rxjs/Rx'); @@ -350,19 +349,19 @@ System.registerDynamic('src/scroll-register', ['@angular/core', 'rxjs/Rx', 'rxjs }; ScrollRegister.decorators = [{ type: core_1.Injectable }]; /** @nocollapse */ - ScrollRegister.ctorParameters = []; + ScrollRegister.ctorParameters = function () { + return []; + }; return ScrollRegister; }(); exports.ScrollRegister = ScrollRegister; - return module.exports; }); System.registerDynamic("src/scroll-resolver", ["@angular/core"], true, function ($__require, exports, module) { "use strict"; - var define, - global = this || self, + var global = this || self, GLOBAL = global; - var core_1 = $__require("@angular/core"); + var core_1 = $__require('@angular/core'); var ScrollResolver = function () { function ScrollResolver() { this.lastScrollPosition = 0; @@ -392,17 +391,17 @@ System.registerDynamic("src/scroll-resolver", ["@angular/core"], true, function }; ScrollResolver.decorators = [{ type: core_1.Injectable }]; /** @nocollapse */ - ScrollResolver.ctorParameters = []; + ScrollResolver.ctorParameters = function () { + return []; + }; return ScrollResolver; }(); exports.ScrollResolver = ScrollResolver; - return module.exports; }); System.registerDynamic('angular2-infinite-scroll', ['./src/infinite-scroll', './src/position-resolver', './src/axis-resolver', './src/index', './src/scroll-register', './src/scroll-resolver'], true, function ($__require, exports, module) { "use strict"; - var define, - global = this || self, + var global = this || self, GLOBAL = global; var infinite_scroll_1 = $__require('./src/infinite-scroll'); var position_resolver_1 = $__require('./src/position-resolver'); @@ -425,5 +424,4 @@ System.registerDynamic('angular2-infinite-scroll', ['./src/infinite-scroll', './ exports.default = { directives: [infinite_scroll_1.InfiniteScroll, axis_resolver_1.AxisResolver, position_resolver_1.PositionResolver] }; - return module.exports; }); \ No newline at end of file diff --git a/package.json b/package.json index 2976877d..fa855d05 100644 --- a/package.json +++ b/package.json @@ -32,19 +32,19 @@ "author": "Oren Farhi", "license": "MIT", "devDependencies": { - "@angular/common": "2.0.1", - "@angular/compiler": "2.0.1", - "@angular/compiler-cli": "^0.6.2", - "@angular/core": "2.0.1", - "@angular/platform-browser": "2.0.1", - "@angular/platform-browser-dynamic": "2.0.1", - "@types/core-js": "^0.9.32", - "@types/jasmine": "^2.2.33", - "@types/node": "^6.0.38", + "@angular/common": "2.3.1", + "@angular/compiler": "2.3.1", + "@angular/compiler-cli": "2.3.1", + "@angular/core": "2.3.1", + "@angular/platform-browser": "2.3.1", + "@angular/platform-browser-dynamic": "2.3.1", + "@types/core-js": "0.9.32", + "@types/jasmine": "2.2.33", + "@types/node": "6.0.38", "autodts": "0.0.6", - "awesome-typescript-loader": "^2.2.4", - "es6-promise": "^3.0.2", - "es6-shim": "^0.33.3", + "awesome-typescript-loader": "2.2.4", + "es6-promise": "3.0.2", + "es6-shim": "0.33.3", "istanbul-instrumenter-loader": "^1.0.0", "jasmine-core": "2.4.1", "karma": "^0.13.22",