Socket
Socket
Sign inDemoInstall

@ng-web-apis/intersection-observer

Package Overview
Dependencies
Maintainers
3
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ng-web-apis/intersection-observer - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

esm2015/services/intersection-observer.service.js

133

bundles/ng-web-apis-intersection-observer.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@ng-web-apis/common')) :
typeof define === 'function' && define.amd ? define('@ng-web-apis/intersection-observer', ['exports', '@angular/common', '@angular/core', '@ng-web-apis/common'], factory) :
(factory((global['ng-web-apis'] = global['ng-web-apis'] || {}, global['ng-web-apis']['intersection-observer'] = {}),global.ng.common,global.ng.core,global.common$1));
}(this, (function (exports,common,core,common$1) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('@angular/core'), require('@ng-web-apis/common')) :
typeof define === 'function' && define.amd ? define('@ng-web-apis/intersection-observer', ['exports', 'rxjs', '@angular/core', '@ng-web-apis/common'], factory) :
(factory((global['ng-web-apis'] = global['ng-web-apis'] || {}, global['ng-web-apis']['intersection-observer'] = {}),global.rxjs,global.ng.core,global.common));
}(this, (function (exports,rxjs,core,common) { 'use strict';

@@ -48,21 +48,29 @@ /*! *****************************************************************************

/** @type {?} */
var DEFAULT_MARGIN = '0px 0px 0px 0px';
var INTERSECTION_ROOT_MARGIN = new core.InjectionToken('rootMargin for IntersectionObserver');
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var DEFAULT_THRESHOLD = 0;
// @dynamic
var IntersectionObserverDirective = /** @class */ (function (_super) {
__extends(IntersectionObserverDirective, _super);
function IntersectionObserverDirective(elementRef, root, documentRef, selector, margin, threshold) {
var _this = _super.call(this, function (entry) {
_this.waIntersectionObserver.emit(entry);
var INTERSECTION_THRESHOLD = new core.InjectionToken('threshold for IntersectionObserver');
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var IntersectionObserverService = /** @class */ (function (_super) {
__extends(IntersectionObserverService, _super);
function IntersectionObserverService(elementRef, root, rootMargin, threshold) {
var _this = _super.call(this, function (subscriber) { return _this.entries$.subscribe(subscriber); }) || this;
_this.elementRef = elementRef;
_this.entries$ = new rxjs.Subject();
_this.observer = new IntersectionObserver(function (entries) {
_this.entries$.next(entries);
}, {
root: selector ? documentRef.querySelector(selector) || root : root,
rootMargin: margin || DEFAULT_MARGIN,
threshold: threshold
? threshold.split(',').map(function (value) { return parseFloat(value); })
: DEFAULT_THRESHOLD,
}) || this;
_this.elementRef = elementRef;
_this.waIntersectionObserver = new core.EventEmitter();
_this.observe(_this.elementRef.nativeElement);
root: root ? root.nativeElement : undefined,
rootMargin: rootMargin ? rootMargin : undefined,
threshold: threshold ? threshold : undefined,
});
_this.observer.observe(_this.elementRef.nativeElement);
return _this;

@@ -73,11 +81,62 @@ }

*/
IntersectionObserverDirective.prototype.ngOnDestroy = /**
IntersectionObserverService.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.unobserve(this.elementRef.nativeElement);
this.observer.unobserve(this.elementRef.nativeElement);
this.entries$.complete();
};
IntersectionObserverService.decorators = [
{ type: core.Injectable }
];
/** @nocollapse */
IntersectionObserverService.ctorParameters = function () {
return [
{ type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] },
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [INTERSECTION_ROOT,] }] },
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [INTERSECTION_ROOT_MARGIN,] }] },
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [INTERSECTION_THRESHOLD,] }] }
];
};
return IntersectionObserverService;
}(rxjs.Observable));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} rootMargin
* @return {?}
*/
function rootMarginFactory(rootMargin) {
return rootMargin;
}
/**
* @param {?} threshold
* @return {?}
*/
function thresholdFactory(threshold) {
return threshold ? threshold.split(',').map(parseFloat) : null;
}
var IntersectionObserverDirective = /** @class */ (function () {
function IntersectionObserverDirective(entries$) {
this.waIntersectionObserver = entries$;
}
IntersectionObserverDirective.decorators = [
{ type: core.Directive, args: [{
selector: '[waIntersectionObserver]',
providers: [
IntersectionObserverService,
{
provide: INTERSECTION_ROOT_MARGIN,
deps: [[new core.Attribute('waIntersectionRootMargin')]],
useFactory: rootMarginFactory,
},
{
provide: INTERSECTION_THRESHOLD,
deps: [[new core.Attribute('waIntersectionThreshold')]],
useFactory: thresholdFactory,
},
],
},] }

@@ -88,8 +147,3 @@ ];

return [
{ type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] },
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [INTERSECTION_ROOT,] }] },
{ type: Document, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
{ type: undefined, decorators: [{ type: core.Attribute, args: ['waIntersectionRootSelector',] }] },
{ type: undefined, decorators: [{ type: core.Attribute, args: ['waIntersectionRootMargin',] }] },
{ type: undefined, decorators: [{ type: core.Attribute, args: ['waIntersectionThreshold',] }] }
{ type: rxjs.Observable, decorators: [{ type: core.Inject, args: [IntersectionObserverService,] }] }
];

@@ -101,3 +155,3 @@ };

return IntersectionObserverDirective;
}(IntersectionObserver));
}());

@@ -108,10 +162,2 @@ /**

*/
/**
* @param {?} __0
* @return {?}
*/
function intersectionRootFactory(_a) {
var nativeElement = _a.nativeElement;
return nativeElement;
}
var IntersectionRootDirective = /** @class */ (function () {

@@ -126,4 +172,3 @@ function IntersectionRootDirective() {

provide: INTERSECTION_ROOT,
deps: [core.ElementRef],
useFactory: intersectionRootFactory,
useExisting: core.ElementRef,
},

@@ -159,3 +204,3 @@ ],

providedIn: 'root',
factory: function () { return !!core.inject(common$1.WINDOW).IntersectionObserver; },
factory: function () { return !!core.inject(common.WINDOW).IntersectionObserver; },
});

@@ -173,7 +218,11 @@

exports.rootMarginFactory = rootMarginFactory;
exports.thresholdFactory = thresholdFactory;
exports.IntersectionObserverDirective = IntersectionObserverDirective;
exports.intersectionRootFactory = intersectionRootFactory;
exports.IntersectionRootDirective = IntersectionRootDirective;
exports.IntersectionObserverModule = IntersectionObserverModule;
exports.IntersectionObserverService = IntersectionObserverService;
exports.INTERSECTION_ROOT = INTERSECTION_ROOT;
exports.INTERSECTION_ROOT_MARGIN = INTERSECTION_ROOT_MARGIN;
exports.INTERSECTION_THRESHOLD = INTERSECTION_THRESHOLD;
exports.INTERSECTION_OBSERVER_SUPPORT = INTERSECTION_OBSERVER_SUPPORT;

@@ -180,0 +229,0 @@

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("@ng-web-apis/common")):"function"==typeof define&&define.amd?define("@ng-web-apis/intersection-observer",["exports","@angular/common","@angular/core","@ng-web-apis/common"],t):t((e["ng-web-apis"]=e["ng-web-apis"]||{},e["ng-web-apis"]["intersection-observer"]={}),e.ng.common,e.ng.core,e.common$1)}(this,function(e,t,c,r){"use strict";var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};var a,o=new c.InjectionToken("Root element for IntersectionObserver"),i=(function y(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(s,a=IntersectionObserver),s.prototype.ngOnDestroy=function(){this.unobserve(this.elementRef.nativeElement)},s.decorators=[{type:c.Directive,args:[{selector:"[waIntersectionObserver]"}]}],s.ctorParameters=function(){return[{type:c.ElementRef,decorators:[{type:c.Inject,args:[c.ElementRef]}]},{type:undefined,decorators:[{type:c.Optional},{type:c.Inject,args:[o]}]},{type:Document,decorators:[{type:c.Inject,args:[t.DOCUMENT]}]},{type:undefined,decorators:[{type:c.Attribute,args:["waIntersectionRootSelector"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["waIntersectionRootMargin"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["waIntersectionThreshold"]}]}]},s.propDecorators={waIntersectionObserver:[{type:c.Output}]},s);function s(e,t,r,n,o,i){var s=a.call(this,function(e){s.waIntersectionObserver.emit(e)},{root:n&&r.querySelector(n)||t,rootMargin:o||"0px 0px 0px 0px",threshold:i?i.split(",").map(function(e){return parseFloat(e)}):0})||this;return s.elementRef=e,s.waIntersectionObserver=new c.EventEmitter,s.observe(s.elementRef.nativeElement),s}function p(e){return e.nativeElement}var u=(f.decorators=[{type:c.Directive,args:[{selector:"[waIntersectionRoot]",providers:[{provide:o,deps:[c.ElementRef],useFactory:p}]}]}],f);function f(){}var d=(l.decorators=[{type:c.NgModule,args:[{declarations:[i,u],exports:[i,u]}]}],l);function l(){}var v=new c.InjectionToken("Intersection Observer API support",{providedIn:"root",factory:function(){return!!c.inject(r.WINDOW).IntersectionObserver}});e.IntersectionObserverDirective=i,e.intersectionRootFactory=p,e.IntersectionRootDirective=u,e.IntersectionObserverModule=d,e.INTERSECTION_ROOT=o,e.INTERSECTION_OBSERVER_SUPPORT=v,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("rxjs"),require("@angular/core"),require("@ng-web-apis/common")):"function"==typeof define&&define.amd?define("@ng-web-apis/intersection-observer",["exports","rxjs","@angular/core","@ng-web-apis/common"],t):t((e["ng-web-apis"]=e["ng-web-apis"]||{},e["ng-web-apis"]["intersection-observer"]={}),e.rxjs,e.ng.core,e.common)}(this,function(e,i,t,r){"use strict";var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};var s,o=new t.InjectionToken("Root element for IntersectionObserver"),c=new t.InjectionToken("rootMargin for IntersectionObserver"),a=new t.InjectionToken("threshold for IntersectionObserver"),p=(function m(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(u,s=i.Observable),u.prototype.ngOnDestroy=function(){this.observer.unobserve(this.elementRef.nativeElement),this.entries$.complete()},u.decorators=[{type:t.Injectable}],u.ctorParameters=function(){return[{type:t.ElementRef,decorators:[{type:t.Inject,args:[t.ElementRef]}]},{type:undefined,decorators:[{type:t.Optional},{type:t.Inject,args:[o]}]},{type:undefined,decorators:[{type:t.Optional},{type:t.Inject,args:[c]}]},{type:undefined,decorators:[{type:t.Optional},{type:t.Inject,args:[a]}]}]},u);function u(e,t,r,n){var o=s.call(this,function(e){return o.entries$.subscribe(e)})||this;return o.elementRef=e,o.entries$=new i.Subject,o.observer=new IntersectionObserver(function(e){o.entries$.next(e)},{root:t?t.nativeElement:undefined,rootMargin:r||undefined,threshold:n||undefined}),o.observer.observe(o.elementRef.nativeElement),o}function f(e){return e}function d(e){return e?e.split(",").map(parseFloat):null}var v=(b.decorators=[{type:t.Directive,args:[{selector:"[waIntersectionObserver]",providers:[p,{provide:c,deps:[[new t.Attribute("waIntersectionRootMargin")]],useFactory:f},{provide:a,deps:[[new t.Attribute("waIntersectionThreshold")]],useFactory:d}]}]}],b.ctorParameters=function(){return[{type:i.Observable,decorators:[{type:t.Inject,args:[p]}]}]},b.propDecorators={waIntersectionObserver:[{type:t.Output}]},b);function b(e){this.waIntersectionObserver=e}var l=(I.decorators=[{type:t.Directive,args:[{selector:"[waIntersectionRoot]",providers:[{provide:o,useExisting:t.ElementRef}]}]}],I);function I(){}var O=(y.decorators=[{type:t.NgModule,args:[{declarations:[v,l],exports:[v,l]}]}],y);function y(){}var g=new t.InjectionToken("Intersection Observer API support",{providedIn:"root",factory:function(){return!!t.inject(r.WINDOW).IntersectionObserver}});e.rootMarginFactory=f,e.thresholdFactory=d,e.IntersectionObserverDirective=v,e.IntersectionRootDirective=l,e.IntersectionObserverModule=O,e.IntersectionObserverService=p,e.INTERSECTION_ROOT=o,e.INTERSECTION_ROOT_MARGIN=c,e.INTERSECTION_THRESHOLD=a,e.INTERSECTION_OBSERVER_SUPPORT=g,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ng-web-apis-intersection-observer.umd.min.js.map

@@ -1,7 +0,7 @@

import { ElementRef, EventEmitter, OnDestroy } from '@angular/core';
export declare class IntersectionObserverDirective extends IntersectionObserver implements OnDestroy {
private readonly elementRef;
readonly waIntersectionObserver: EventEmitter<IntersectionObserverEntry[]>;
constructor(elementRef: ElementRef<HTMLElement>, root: HTMLElement | null, documentRef: Document, selector: string | null, margin: string | null, threshold: string | null);
ngOnDestroy(): void;
import { Observable } from 'rxjs';
export declare function rootMarginFactory(rootMargin: string | null): string | null;
export declare function thresholdFactory(threshold: string | null): number[] | null;
export declare class IntersectionObserverDirective {
readonly waIntersectionObserver: Observable<IntersectionObserverEntry[]>;
constructor(entries$: Observable<IntersectionObserverEntry[]>);
}

@@ -1,4 +0,2 @@

import { ElementRef } from '@angular/core';
export declare function intersectionRootFactory({ nativeElement, }: ElementRef<HTMLElement>): HTMLElement;
export declare class IntersectionRootDirective {
}

@@ -5,39 +5,28 @@ /**

*/
import { DOCUMENT } from '@angular/common';
import { Attribute, Directive, ElementRef, EventEmitter, Inject, Optional, Output, } from '@angular/core';
import { INTERSECTION_ROOT } from '../tokens/intersection-root';
/** @type {?} */
const DEFAULT_MARGIN = '0px 0px 0px 0px';
/** @type {?} */
const DEFAULT_THRESHOLD = 0;
// @dynamic
export class IntersectionObserverDirective extends IntersectionObserver {
import { Attribute, Directive, Inject, Output } from '@angular/core';
import { Observable } from 'rxjs';
import { IntersectionObserverService } from '../services/intersection-observer.service';
import { INTERSECTION_ROOT_MARGIN } from '../tokens/intersection-root-margin';
import { INTERSECTION_THRESHOLD } from '../tokens/intersection-threshold';
/**
* @param {?} rootMargin
* @return {?}
*/
export function rootMarginFactory(rootMargin) {
return rootMargin;
}
/**
* @param {?} threshold
* @return {?}
*/
export function thresholdFactory(threshold) {
return threshold ? threshold.split(',').map(parseFloat) : null;
}
export class IntersectionObserverDirective {
/**
* @param {?} elementRef
* @param {?} root
* @param {?} documentRef
* @param {?} selector
* @param {?} margin
* @param {?} threshold
* @param {?} entries$
*/
constructor(elementRef, root, documentRef, selector, margin, threshold) {
super(entry => {
this.waIntersectionObserver.emit(entry);
}, {
root: selector ? documentRef.querySelector(selector) || root : root,
rootMargin: margin || DEFAULT_MARGIN,
threshold: threshold
? threshold.split(',').map(value => parseFloat(value))
: DEFAULT_THRESHOLD,
});
this.elementRef = elementRef;
this.waIntersectionObserver = new EventEmitter();
this.observe(this.elementRef.nativeElement);
constructor(entries$) {
this.waIntersectionObserver = entries$;
}
/**
* @return {?}
*/
ngOnDestroy() {
this.unobserve(this.elementRef.nativeElement);
}
}

@@ -47,2 +36,15 @@ IntersectionObserverDirective.decorators = [

selector: '[waIntersectionObserver]',
providers: [
IntersectionObserverService,
{
provide: INTERSECTION_ROOT_MARGIN,
deps: [[new Attribute('waIntersectionRootMargin')]],
useFactory: rootMarginFactory,
},
{
provide: INTERSECTION_THRESHOLD,
deps: [[new Attribute('waIntersectionThreshold')]],
useFactory: thresholdFactory,
},
],
},] }

@@ -52,8 +54,3 @@ ];

IntersectionObserverDirective.ctorParameters = () => [
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [INTERSECTION_ROOT,] }] },
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
{ type: undefined, decorators: [{ type: Attribute, args: ['waIntersectionRootSelector',] }] },
{ type: undefined, decorators: [{ type: Attribute, args: ['waIntersectionRootMargin',] }] },
{ type: undefined, decorators: [{ type: Attribute, args: ['waIntersectionThreshold',] }] }
{ type: Observable, decorators: [{ type: Inject, args: [IntersectionObserverService,] }] }
];

@@ -66,8 +63,3 @@ IntersectionObserverDirective.propDecorators = {

IntersectionObserverDirective.prototype.waIntersectionObserver;
/**
* @type {?}
* @private
*/
IntersectionObserverDirective.prototype.elementRef;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJzZWN0aW9uLW9ic2VydmVyLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5nLXdlYi1hcGlzL2ludGVyc2VjdGlvbi1vYnNlcnZlci8iLCJzb3VyY2VzIjpbImRpcmVjdGl2ZXMvaW50ZXJzZWN0aW9uLW9ic2VydmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUMsUUFBUSxFQUFDLE1BQU0saUJBQWlCLENBQUM7QUFDekMsT0FBTyxFQUNILFNBQVMsRUFDVCxTQUFTLEVBQ1QsVUFBVSxFQUNWLFlBQVksRUFDWixNQUFNLEVBRU4sUUFBUSxFQUNSLE1BQU0sR0FDVCxNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUMsaUJBQWlCLEVBQUMsTUFBTSw2QkFBNkIsQ0FBQzs7TUFFeEQsY0FBYyxHQUFHLGlCQUFpQjs7TUFDbEMsaUJBQWlCLEdBQUcsQ0FBQzs7QUFNM0IsTUFBTSxPQUFPLDZCQUE4QixTQUFRLG9CQUFvQjs7Ozs7Ozs7O0lBS25FLFlBQ3lDLFVBQW1DLEVBQ2pDLElBQXdCLEVBQzdDLFdBQXFCLEVBQ0UsUUFBdUIsRUFDekIsTUFBcUIsRUFDdEIsU0FBd0I7UUFFOUQsS0FBSyxDQUNELEtBQUssQ0FBQyxFQUFFO1lBQ0osSUFBSSxDQUFDLHNCQUFzQixDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUM1QyxDQUFDLEVBQ0Q7WUFDSSxJQUFJLE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UlNFQ1RJT05fUk9PVCkgcm9vdDogSFRNTEVsZW1lbnQgfCBudWxsLFxyXG4gICAgICAgIEBJbmplY3QoRE9DVU1FTlQpIGRvY3VtZW50UmVmOiBEb2N1bWVudCxcclxuICAgICAgICBAQXR0cmlidXRlKCd3YUludGVyc2VjdGlvblJvb3RTZWxlY3RvcicpIHNlbGVjdG9yOiBzdHJpbmcgfCBudWxsLFxyXG4gICAgICAgIEBBdHRyaWJ1dGUoJ3dhSW50ZXJzZWN0aW9uUm9vdE1hcmdpbicpIG1hcmdpbjogc3RyaW5nIHwgbnVsbCxcclxuICAgICAgICBAQXR0cmlidXRlKCd3YUludGVyc2VjdGlvblRocmVzaG9sZCcpIHRocmVzaG9sZDogc3RyaW5nIHwgbnVsbCxcclxuICAgICkge1xyXG4gICAgICAgIHN1cGVyKFxyXG4gICAgICAgICAgICBlbnRyeSA9PiB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLndhSW50ZXJzZWN0aW9uT2JzZXJ2ZXIuZW1pdChlbnRyeSk7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgIHJvb3Q6IHNlbGVjdG9yID8gZG9jdW1lbnRSZWYucXVlcnlTZWxlY3RvcihzZWxlY3RvcikgfHwgcm9vdCA6IHJvb3QsXHJcbiAgICAgICAgICAgICAgICByb290TWFyZ2luOiBtYXJnaW4gfHwgREVGQVVMVF9NQVJHSU4sXHJcbiAgICAgICAgICAgICAgICB0aHJlc2hvbGQ6IHRocmVzaG9sZFxyXG4gICAgICAgICAgICAgICAgICAgID8gdGhyZXNob2xkLnNwbGl0KCcsJykubWFwKHZhbHVlID0+IHBhcnNlRmxvYXQodmFsdWUpKVxyXG4gICAgICAgICAgICAgICAgICAgIDogREVGQVVMVF9USFJFU0hPTEQsXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgKTtcclxuXHJcbiAgICAgICAgdGhpcy5vYnNlcnZlKHRoaXMuZWxlbWV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YXJnaW4nO1xyXG5pbXBvcnQge0lOVEVSU0VDVElPTl9USFJFU0hPTER9IGZyb20gJy4uL3Rva2Vucy9pbnRlcnNlY3Rpb24tdGhyZXNob2xkJztcclxuXHJcbmV4cG9ydCBmdW5jdGlvbiByb290TWFyZ2luRmFjdG9yeShyb290TWFyZ2luOiBzdHJpbmcgfCBudWxsKTogc3RyaW5nIHwgbnVsbCB7XHJcbiAgICByZXR1cm4gcm9vdE1hcmdpbjtcclxufVxyXG5cclxuZXhwb3J0IGZ1bmN0aW9uIHRocmVzaG9sZEZhY3RvcnkodGhyZXNob2xkOiBzdHJpbmcgfCBudWxsKTogbnVtYmVyW10gfCBudWxsIHtcclxuICAgIHJldHVybiB0aHJlc2hvbGQgPyB0aHJlc2hvbGQuc3BsaXQoJywnKS5tYXAocGFyc2VGbG9hdCkgOiBudWxsO1xyXG59XHJcblxyXG5ARGlyZWN0aXZlKHtcclxuICAgIHNlbGVjdG9yOiAnW3dhSW50ZXJzZWN0aW9uT2JzZXJ2ZXJdJyxcclxuICAgIHByb3ZpZGVyczogW1xyXG4gICAgICAgIEludGVyc2VjdGlvbk9ic2VydmVyU2VydmljZSxcclxuICAgICAgICB7XHJcbiAgICAgICAgICAgIHByb3ZpZGU6IElOVEVSU0VDVElPTl9ST09UX01BUkdJTixcclxuICAgICAgICAgICAgZGVwczogW1tuZXcgQXR0cmlidXRlKCd3YUludGVyc2VjdGlvblJvb3RNYXJnaW4nKV1dLFxyXG4gICAgICAgICAgICB1c2VGYWN0b3J5OiByb290TWFyZ2luRmFjdG9yeSxcclxuICAgICAgICB9LFxyXG4gICAgICAgIHtcclxuICAgICAgICAgICAgcHJvdmlkZTogSU5URVJTRUNUSU9OX1RIUkVTSE9MRCxcclxuICAgICAgICAgICAgZGVwczogW1tuZXcgQXR0cmlidXRlKCd3YUludGVyc2VjdGlvblRocmVzaG9sZCcpXV0sXHJcbiAgICAgICAgICAgIHVzZUZhY3Rvcnk6IHRocmVzaG9sZEZhY3RvcnksXHJcbiAgICAgICAgfSxcclxuICAgIF0sXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBJbnRlcnNlY3Rpb25PYnNlcnZlckRpcmVjdGl2ZSB7XHJcbiAgICBAT3V0cHV0KClcclxuICAgIHJlYWRvbmx5IHdhSW50ZXJzZWN0aW9uT2JzZXJ2ZXI6IE9ic2VydmFibGU8SW50ZXJzZWN0aW9uT2JzZXJ2ZXJFbnRyeVtdPjtcclxuXHJcbiAgICBjb25zdHJ1Y3RvcihcclxuICAgICAgICBASW5qZWN0KEludGVyc2VjdGlvbk9ic2VydmVyU2VydmljZSlcclxuICAgICAgICBlbnRyaWVzJDogT2JzZXJ2YWJsZTxJbnRlcnNlY3Rpb25PYnNlcnZlckVudHJ5W10+LFxyXG4gICAgKSB7XHJcbiAgICAgICAgdGhpcy53YUludGVyc2VjdGlvbk9ic2VydmVyID0gZW50cmllcyQ7XHJcbiAgICB9XHJcbn1cclxuIl19

@@ -7,9 +7,2 @@ /**

import { INTERSECTION_ROOT } from '../tokens/intersection-root';
/**
* @param {?} __0
* @return {?}
*/
export function intersectionRootFactory({ nativeElement, }) {
return nativeElement;
}
export class IntersectionRootDirective {

@@ -23,4 +16,3 @@ }

provide: INTERSECTION_ROOT,
deps: [ElementRef],
useFactory: intersectionRootFactory,
useExisting: ElementRef,
},

@@ -30,2 +22,2 @@ ],

];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJzZWN0aW9uLXJvb3QuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmctd2ViLWFwaXMvaW50ZXJzZWN0aW9uLW9ic2VydmVyLyIsInNvdXJjZXMiOlsiZGlyZWN0aXZlcy9pbnRlcnNlY3Rpb24tcm9vdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFDLFNBQVMsRUFBRSxVQUFVLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDcEQsT0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AgICAgICAgICAgdXNlRXhpc3Rpbmc6IEVsZW1lbnRSZWYsXHJcbiAgICAgICAgfSxcclxuICAgIF0sXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBJbnRlcnNlY3Rpb25Sb290RGlyZWN0aXZlIHt9XHJcbiJdfQ==

@@ -8,3 +8,3 @@ /**

*/
export { IntersectionObserverDirective, intersectionRootFactory, IntersectionRootDirective, IntersectionObserverModule, INTERSECTION_ROOT, INTERSECTION_OBSERVER_SUPPORT } from './public-api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmctd2ViLWFwaXMtaW50ZXJzZWN0aW9uLW9ic2VydmVyLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5nLXdlYi1hcGlzL2ludGVyc2VjdGlvbi1vYnNlcnZlci8iLCJzb3VyY2VzIjpbIm5nLXdlYi1hcGlzLWludGVyc2VjdGlvbi1vYnNlcnZlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEsZ0xBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19
export { rootMarginFactory, thresholdFactory, IntersectionObserverDirective, IntersectionRootDirective, IntersectionObserverModule, IntersectionObserverService, INTERSECTION_ROOT, INTERSECTION_ROOT_MARGIN, INTERSECTION_THRESHOLD, INTERSECTION_OBSERVER_SUPPORT } from './public-api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmctd2ViLWFwaXMtaW50ZXJzZWN0aW9uLW9ic2VydmVyLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5nLXdlYi1hcGlzL2ludGVyc2VjdGlvbi1vYnNlcnZlci8iLCJzb3VyY2VzIjpbIm5nLXdlYi1hcGlzLWludGVyc2VjdGlvbi1vYnNlcnZlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEsMlFBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19

@@ -9,9 +9,13 @@ /**

/* Directives */
export { IntersectionObserverDirective } from './directives/intersection-observer';
export { intersectionRootFactory, IntersectionRootDirective } from './directives/intersection-root';
export { rootMarginFactory, thresholdFactory, IntersectionObserverDirective } from './directives/intersection-observer';
export { IntersectionRootDirective } from './directives/intersection-root';
/* Modules */
export { IntersectionObserverModule } from './module';
/* Services */
export { IntersectionObserverService } from './services/intersection-observer.service';
/* Tokens */
export { INTERSECTION_ROOT } from './tokens/intersection-root';
export { INTERSECTION_ROOT_MARGIN } from './tokens/intersection-root-margin';
export { INTERSECTION_THRESHOLD } from './tokens/intersection-threshold';
export { INTERSECTION_OBSERVER_SUPPORT } from './tokens/support';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZy13ZWItYXBpcy9pbnRlcnNlY3Rpb24tb2JzZXJ2ZXIvIiwic291cmNlcyI6WyJwdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBS0EsOENBQWMsb0NBQW9DLENBQUM7QUFDbkQsbUVBQWMsZ0NBQWdDLENBQUM7O0FBRy9DLDJDQUFjLFVBQVUsQ0FBQzs7QUFHekIsa0NBQWMsNEJBQTRCLENBQUM7QUFDM0MsOENBQWMsa0JBQWtCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcclxuICogUHVibGljIEFQSSBTdXJmYW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LyogRGlyZWN0aXZlcyAqL1xyXG5leHBvcnQgKiBmcm9tICcuL2RpcmVjdGl2ZXMvaW50ZXJzZWN0aW9uLW9ic2VydmVyJztcclxuZXhwb3J0ICogZnJvbSAnLi9kaXJlY3RpdmVzL2ludGVyc2VjdGlvbi1yb290JztcclxuXHJcbi8qIE1vZHVsZXMgKi9cclxuZXhwb3J0ICogZnJvbSAnLi9tb2R1bGUnO1xyXG5cclxuLyogU2VydmljZXMgKi9cclxuZXhwb3J0ICogZnJvbSAnLi9zZXJ2aWNlcy9pbnRlcnNlY3Rpb24tb2JzZXJ2ZXIuc2VydmljZSc7XHJcblxyXG4vKiBUb2tlbnMgKi9cclxuZXhwb3J0ICogZnJvbSAnLi90b2tlbnMvaW50ZXJzZWN0aW9uLXJvb3QnO1xyXG5leHBvcnQgKiBmcm9tICcuL3Rva2Vucy9pbnRlcnNlY3Rpb24tcm9vdC1tYXJnaW4nO1xyXG5leHBvcnQgKiBmcm9tICcuL3Rva2Vucy9pbnRlcnNlY3Rpb24tdGhyZXNob2xkJztcclxuZXhwb3J0ICogZnJvbSAnLi90b2tlbnMvc3VwcG9ydCc7XHJcbiJdfQ==

@@ -8,2 +8,2 @@ /**

export const INTERSECTION_ROOT = new InjectionToken('Root element for IntersectionObserver');
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJzZWN0aW9uLXJvb3QuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmctd2ViLWFwaXMvaW50ZXJzZWN0aW9uLW9ic2VydmVyLyIsInNvdXJjZXMiOlsidG9rZW5zL2ludGVyc2VjdGlvbi1yb290LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUMsY0FBYyxFQUFDLE1BQU0sZUFBZSxDQUFDOztBQUU3QyxNQUFNLE9BQU8saUJBQWlCLEdBQUcsSUFBSSxjQUFjLENBQy9DLHVDQUF1QyxDQUMxQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7SW5qZWN0aW9uVG9rZW59IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5cclxuZXhwb3J0IGNvbnN0IElOVEVSU0VDVElPTl9ST09UID0gbmV3IEluamVjdGlvblRva2VuPEhUTUxFbGVtZW50PihcclxuICAgICdSb290IGVsZW1lbnQgZm9yIEludGVyc2VjdGlvbk9ic2VydmVyJyxcclxuKTtcclxuIl19
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJzZWN0aW9uLXJvb3QuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmctd2ViLWFwaXMvaW50ZXJzZWN0aW9uLW9ic2VydmVyLyIsInNvdXJjZXMiOlsidG9rZW5zL2ludGVyc2VjdGlvbi1yb290LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQWEsY0FBYyxFQUFDLE1BQU0sZUFBZSxDQUFDOztBQUV6RCxNQUFNLE9BQU8saUJBQWlCLEdBQUcsSUFBSSxjQUFjLENBQy9DLHVDQUF1QyxDQUMxQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7RWxlbWVudFJlZiwgSW5qZWN0aW9uVG9rZW59IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5cclxuZXhwb3J0IGNvbnN0IElOVEVSU0VDVElPTl9ST09UID0gbmV3IEluamVjdGlvblRva2VuPEVsZW1lbnRSZWY8RWxlbWVudD4+KFxyXG4gICAgJ1Jvb3QgZWxlbWVudCBmb3IgSW50ZXJzZWN0aW9uT2JzZXJ2ZXInLFxyXG4pO1xyXG4iXX0=

@@ -5,40 +5,41 @@ /**

*/
import * as tslib_1 from "tslib";
import { DOCUMENT } from '@angular/common';
import { Attribute, Directive, ElementRef, EventEmitter, Inject, Optional, Output, } from '@angular/core';
import { INTERSECTION_ROOT } from '../tokens/intersection-root';
/** @type {?} */
var DEFAULT_MARGIN = '0px 0px 0px 0px';
/** @type {?} */
var DEFAULT_THRESHOLD = 0;
// @dynamic
var IntersectionObserverDirective = /** @class */ (function (_super) {
tslib_1.__extends(IntersectionObserverDirective, _super);
function IntersectionObserverDirective(elementRef, root, documentRef, selector, margin, threshold) {
var _this = _super.call(this, function (entry) {
_this.waIntersectionObserver.emit(entry);
}, {
root: selector ? documentRef.querySelector(selector) || root : root,
rootMargin: margin || DEFAULT_MARGIN,
threshold: threshold
? threshold.split(',').map(function (value) { return parseFloat(value); })
: DEFAULT_THRESHOLD,
}) || this;
_this.elementRef = elementRef;
_this.waIntersectionObserver = new EventEmitter();
_this.observe(_this.elementRef.nativeElement);
return _this;
import { Attribute, Directive, Inject, Output } from '@angular/core';
import { Observable } from 'rxjs';
import { IntersectionObserverService } from '../services/intersection-observer.service';
import { INTERSECTION_ROOT_MARGIN } from '../tokens/intersection-root-margin';
import { INTERSECTION_THRESHOLD } from '../tokens/intersection-threshold';
/**
* @param {?} rootMargin
* @return {?}
*/
export function rootMarginFactory(rootMargin) {
return rootMargin;
}
/**
* @param {?} threshold
* @return {?}
*/
export function thresholdFactory(threshold) {
return threshold ? threshold.split(',').map(parseFloat) : null;
}
var IntersectionObserverDirective = /** @class */ (function () {
function IntersectionObserverDirective(entries$) {
this.waIntersectionObserver = entries$;
}
/**
* @return {?}
*/
IntersectionObserverDirective.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.unobserve(this.elementRef.nativeElement);
};
IntersectionObserverDirective.decorators = [
{ type: Directive, args: [{
selector: '[waIntersectionObserver]',
providers: [
IntersectionObserverService,
{
provide: INTERSECTION_ROOT_MARGIN,
deps: [[new Attribute('waIntersectionRootMargin')]],
useFactory: rootMarginFactory,
},
{
provide: INTERSECTION_THRESHOLD,
deps: [[new Attribute('waIntersectionThreshold')]],
useFactory: thresholdFactory,
},
],
},] }

@@ -48,8 +49,3 @@ ];

IntersectionObserverDirective.ctorParameters = function () { return [
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [INTERSECTION_ROOT,] }] },
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
{ type: undefined, decorators: [{ type: Attribute, args: ['waIntersectionRootSelector',] }] },
{ type: undefined, decorators: [{ type: Attribute, args: ['waIntersectionRootMargin',] }] },
{ type: undefined, decorators: [{ type: Attribute, args: ['waIntersectionThreshold',] }] }
{ type: Observable, decorators: [{ type: Inject, args: [IntersectionObserverService,] }] }
]; };

@@ -60,3 +56,3 @@ IntersectionObserverDirective.propDecorators = {

return IntersectionObserverDirective;
}(IntersectionObserver));
}());
export { IntersectionObserverDirective };

@@ -66,8 +62,3 @@ if (false) {

IntersectionObserverDirective.prototype.waIntersectionObserver;
/**
* @type {?}
* @private
*/
IntersectionObserverDirective.prototype.elementRef;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJzZWN0aW9uLW9ic2VydmVyLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5nLXdlYi1hcGlzL2ludGVyc2VjdGlvbi1vYnNlcnZlci8iLCJzb3VyY2VzIjpbImRpcmVjdGl2ZXMvaW50ZXJzZWN0aW9uLW9ic2VydmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFDLFFBQVEsRUFBQyxNQUFNLGlCQUFpQixDQUFDO0FBQ3pDLE9BQU8sRUFDSCxTQUFTLEVBQ1QsU0FBUyxFQUNULFVBQVUsRUFDVixZQUFZLEVBQ1osTUFBTSxFQUVOLFFBQVEsRUFDUixNQUFNLEdBQ1QsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFDLGlCQUFpQixFQUFDLE1BQU0sNkJBQTZCLENBQUM7O0lBRXhELGNBQWMsR0FBRyxpQkFBaUI7O0lBQ2xDLGlCQUFpQixHQUFHLENBQUM7O0FBRzNCO0lBR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NlbGVjdG9yKSB8fCByb290IDogcm9vdCxcclxuICAgICAgICAgICAgICAgIHJvb3RNYXJnaW46IG1hcmdpbiB8fCBERUZBVUxUX01BUkdJTixcclxuICAgICAgICAgICAgICAgIHRocmVzaG9sZDogdGhyZXNob2xkXHJcbiAgICAgICAgICAgICAgICAgICAgPyB0aHJlc2hvbGQuc3BsaXQoJywnKS5tYXAodmFsdWUgPT4gcGFyc2VGbG9hdCh2YWx1ZSkpXHJcbiAgICAgICAgICAgICAgICAgICAgOiBERUZBVUxUX1RIUkVTSE9MRCxcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICApO1xyXG5cclxuICAgICAgICB0aGlzLm9ic2VydmUodGhpcy5lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQpO1xyXG4gICAgfVxyXG5cclxuICAgIG5nT25EZXN0cm95KCkge1xyXG4gICAgICAgIHRoaXMudW5vYnNlcnZlKHRoaXMuZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50KTtcclxuICAgIH1cclxufVxyXG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJzZWN0aW9uLW9ic2VydmVyLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5nLXdlYi1hcGlzL2ludGVyc2VjdGlvbi1vYnNlcnZlci8iLCJzb3VyY2VzIjpbImRpcmVjdGl2ZXMvaW50ZXJzZWN0aW9uLW9ic2VydmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUMsU0FBUyxFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ25FLE9BQU8sRUFBQyxVQUFVLEVBQUMsTUFBTSxNQUFNLENBQUM7QUFDaEMsT0FBTyxFQUFDLDJCQUEyQixFQUFDLE1BQU0sMkNBQTJDLENBQUM7QUFDdEYsT0FBTyxFQUFDLHdCQUF3Qix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ICAgICAgIHtcclxuICAgICAgICAgICAgcHJvdmlkZTogSU5URVJTRUNUSU9OX1JPT1RfTUFSR0lOLFxyXG4gICAgICAgICAgICBkZXBzOiBbW25ldyBBdHRyaWJ1dGUoJ3dhSW50ZXJzZWN0aW9uUm9vdE1hcmdpbicpXV0sXHJcbiAgICAgICAgICAgIHVzZUZhY3Rvcnk6IHJvb3RNYXJnaW5GYWN0b3J5LFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAge1xyXG4gICAgICAgICAgICBwcm92aWRlOiBJTlRFUlNFQ1RJT05fVEhSRVNIT0xELFxyXG4gICAgICAgICAgICBkZXBzOiBbW25ldyBBdHRyaWJ1dGUoJ3dhSW50ZXJzZWN0aW9uVGhyZXNob2xkJyldXSxcclxuICAgICAgICAgICAgdXNlRmFjdG9yeTogdGhyZXNob2xkRmFjdG9yeSxcclxuICAgICAgICB9LFxyXG4gICAgXSxcclxufSlcclxuZXhwb3J0IGNsYXNzIEludGVyc2VjdGlvbk9ic2VydmVyRGlyZWN0aXZlIHtcclxuICAgIEBPdXRwdXQoKVxyXG4gICAgcmVhZG9ubHkgd2FJbnRlcnNlY3Rpb25PYnNlcnZlcjogT2JzZXJ2YWJsZTxJbnRlcnNlY3Rpb25PYnNlcnZlckVudHJ5W10+O1xyXG5cclxuICAgIGNvbnN0cnVjdG9yKFxyXG4gICAgICAgIEBJbmplY3QoSW50ZXJzZWN0aW9uT2JzZXJ2ZXJTZXJ2aWNlKVxyXG4gICAgICAgIGVudHJpZXMkOiBPYnNlcnZhYmxlPEludGVyc2VjdGlvbk9ic2VydmVyRW50cnlbXT4sXHJcbiAgICApIHtcclxuICAgICAgICB0aGlzLndhSW50ZXJzZWN0aW9uT2JzZXJ2ZXIgPSBlbnRyaWVzJDtcclxuICAgIH1cclxufVxyXG4iXX0=

@@ -7,10 +7,2 @@ /**

import { INTERSECTION_ROOT } from '../tokens/intersection-root';
/**
* @param {?} __0
* @return {?}
*/
export function intersectionRootFactory(_a) {
var nativeElement = _a.nativeElement;
return nativeElement;
}
var IntersectionRootDirective = /** @class */ (function () {

@@ -25,4 +17,3 @@ function IntersectionRootDirective() {

provide: INTERSECTION_ROOT,
deps: [ElementRef],
useFactory: intersectionRootFactory,
useExisting: ElementRef,
},

@@ -35,2 +26,2 @@ ],

export { IntersectionRootDirective };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJzZWN0aW9uLXJvb3QuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmctd2ViLWFwaXMvaW50ZXJzZWN0aW9uLW9ic2VydmVyLyIsInNvdXJjZXMiOlsiZGlyZWN0aXZlcy9pbnRlcnNlY3Rpb24tcm9vdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFDLFNBQVMsRUFBRSxVQUFVLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDcEQsT0FBTyxFQUFDLGlCQUFpQixFQUFDLE1BQU0sNkJBQTZCLENBQUM7Ozs7O0FBRTlELE1BQU0sVUFBVSx1QkFBdUIsQ0FBQyxFQUVkO1FBRHRCLGdDQUFhO0lBRWIsT0FBTyxhQUFhLENBQUM7QUFDekIsQ0FBQztBQUVEO0lBQUE7SUFVd0MsQ0FBQzs7Z0JBVnhDLFNBQVMsU0FBQztvQkFDUCxRQUFRLEVBQUUsc0JBQXNCO29CQUNoQyxTQUFTLEVBQUU7d0JBQ1A7NEJBQ0ksT0FBTyxFQUFFLGlCQUFpQjs0QkFDMUIsSUFBSSxFQUFFLENBQUMsVUFBVSxDQUFDOzRCQUNsQixVQUFVLEVBQUUsdUJBQXVCO3lCQUN0QztxQkFDSjtpQkFDSjs7SUFDdUMsZ0NBQUM7Q0FBQSxBQVZ6QyxJQVV5QztTQUE1Qix5QkFBeUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge0RpcmVjdGl2ZSwgRWxlbWVudFJlZn0gZnJvbSAnQGFuZ3Vs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QUM7QUFFOUQ7SUFBQTtJQVN3QyxDQUFDOztnQkFUeEMsU0FBUyxTQUFDO29CQUNQLFFBQVEsRUFBRSxzQkFBc0I7b0JBQ2hDLFNBQVMsRUFBRTt3QkFDUDs0QkFDSSxPQUFPLEVBQUUsaUJBQWlCOzRCQUMxQixXQUFXLEVBQUUsVUFBVTt5QkFDMUI7cUJBQ0o7aUJBQ0o7O0lBQ3VDLGdDQUFDO0NBQUEsQUFUekMsSUFTeUM7U0FBNUIseUJBQXlCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtEaXJlY3RpdmUsIEVsZW1lbnRSZWZ9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5pbXBvcnQge0lOVEVSU0VDVElPTl9ST09UfSBmcm9tICcuLi90b2tlbnMvaW50ZXJzZWN0aW9uLXJvb3QnO1xyXG5cclxuQERpcmVjdGl2ZSh7XHJcbiAgICBzZWxlY3RvcjogJ1t3YUludGVyc2VjdGlvblJvb3RdJyxcclxuICAgIHByb3ZpZGVyczogW1xyXG4gICAgICAgIHtcclxuICAgICAgICAgICAgcHJvdmlkZTogSU5URVJTRUNUSU9OX1JPT1QsXHJcbiAgICAgICAgICAgIHVzZUV4aXN0aW5nOiBFbGVtZW50UmVmLFxyXG4gICAgICAgIH0sXHJcbiAgICBdLFxyXG59KVxyXG5leHBvcnQgY2xhc3MgSW50ZXJzZWN0aW9uUm9vdERpcmVjdGl2ZSB7fVxyXG4iXX0=

@@ -8,3 +8,3 @@ /**

*/
export { IntersectionObserverDirective, intersectionRootFactory, IntersectionRootDirective, IntersectionObserverModule, INTERSECTION_ROOT, INTERSECTION_OBSERVER_SUPPORT } from './public-api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmctd2ViLWFwaXMtaW50ZXJzZWN0aW9uLW9ic2VydmVyLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5nLXdlYi1hcGlzL2ludGVyc2VjdGlvbi1vYnNlcnZlci8iLCJzb3VyY2VzIjpbIm5nLXdlYi1hcGlzLWludGVyc2VjdGlvbi1vYnNlcnZlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEsZ0xBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19
export { rootMarginFactory, thresholdFactory, IntersectionObserverDirective, IntersectionRootDirective, IntersectionObserverModule, IntersectionObserverService, INTERSECTION_ROOT, INTERSECTION_ROOT_MARGIN, INTERSECTION_THRESHOLD, INTERSECTION_OBSERVER_SUPPORT } from './public-api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmctd2ViLWFwaXMtaW50ZXJzZWN0aW9uLW9ic2VydmVyLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5nLXdlYi1hcGlzL2ludGVyc2VjdGlvbi1vYnNlcnZlci8iLCJzb3VyY2VzIjpbIm5nLXdlYi1hcGlzLWludGVyc2VjdGlvbi1vYnNlcnZlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEsMlFBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19

@@ -9,9 +9,13 @@ /**

/* Directives */
export { IntersectionObserverDirective } from './directives/intersection-observer';
export { intersectionRootFactory, IntersectionRootDirective } from './directives/intersection-root';
export { rootMarginFactory, thresholdFactory, IntersectionObserverDirective } from './directives/intersection-observer';
export { IntersectionRootDirective } from './directives/intersection-root';
/* Modules */
export { IntersectionObserverModule } from './module';
/* Services */
export { IntersectionObserverService } from './services/intersection-observer.service';
/* Tokens */
export { INTERSECTION_ROOT } from './tokens/intersection-root';
export { INTERSECTION_ROOT_MARGIN } from './tokens/intersection-root-margin';
export { INTERSECTION_THRESHOLD } from './tokens/intersection-threshold';
export { INTERSECTION_OBSERVER_SUPPORT } from './tokens/support';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZy13ZWItYXBpcy9pbnRlcnNlY3Rpb24tb2JzZXJ2ZXIvIiwic291cmNlcyI6WyJwdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBS0EsOENBQWMsb0NBQW9DLENBQUM7QUFDbkQsbUVBQWMsZ0NBQWdDLENBQUM7O0FBRy9DLDJDQUFjLFVBQVUsQ0FBQzs7QUFHekIsa0NBQWMsNEJBQTRCLENBQUM7QUFDM0MsOENBQWMsa0JBQWtCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcclxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIEBuZy13ZWItYXBpcy9pbnRlcnNlY3Rpb24tb2JzZXJ2ZXJcclxuICovXHJcblxyXG4vKiBEaXJlY3RpdmVzICovXHJcbmV4cG9ydCAqIGZyb20gJy4vZGlyZWN0aXZlcy9pbnRlcnNlY3Rpb24tb2JzZXJ2ZXInO1xyXG5leHBvcnQgKiBmcm9tICcuL2RpcmVjdGl2ZXMvaW50ZXJzZWN0aW9uLXJvb3QnO1xyXG5cclxuLyogTW9kdWxlcyAqL1xyXG5leHBvcnQgKiBmcm9tICcuL21vZHVsZSc7XHJcblxyXG4vKiBUb2tlbnMgKi9cclxuZXhwb3J0ICogZnJvbSAnLi90b2tlbnMvaW50ZXJzZWN0aW9uLXJvb3QnO1xyXG5leHBvcnQgKiBmcm9tICcuL3Rva2Vucy9zdXB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vcnQgKiBmcm9tICcuL3Rva2Vucy9pbnRlcnNlY3Rpb24tcm9vdC1tYXJnaW4nO1xyXG5leHBvcnQgKiBmcm9tICcuL3Rva2Vucy9pbnRlcnNlY3Rpb24tdGhyZXNob2xkJztcclxuZXhwb3J0ICogZnJvbSAnLi90b2tlbnMvc3VwcG9ydCc7XHJcbiJdfQ==

@@ -8,2 +8,2 @@ /**

export var INTERSECTION_ROOT = new InjectionToken('Root element for IntersectionObserver');
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJzZWN0aW9uLXJvb3QuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmctd2ViLWFwaXMvaW50ZXJzZWN0aW9uLW9ic2VydmVyLyIsInNvdXJjZXMiOlsidG9rZW5zL2ludGVyc2VjdGlvbi1yb290LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUMsY0FBYyxFQUFDLE1BQU0sZUFBZSxDQUFDOztBQUU3QyxNQUFNLEtBQU8saUJBQWlCLEdBQUcsSUFBSSxjQUFjLENBQy9DLHVDQUF1QyxDQUMxQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7SW5qZWN0aW9uVG9rZW59IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5cclxuZXhwb3J0IGNvbnN0IElOVEVSU0VDVElPTl9ST09UID0gbmV3IEluamVjdGlvblRva2VuPEhUTUxFbGVtZW50PihcclxuICAgICdSb290IGVsZW1lbnQgZm9yIEludGVyc2VjdGlvbk9ic2VydmVyJyxcclxuKTtcclxuIl19
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJzZWN0aW9uLXJvb3QuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmctd2ViLWFwaXMvaW50ZXJzZWN0aW9uLW9ic2VydmVyLyIsInNvdXJjZXMiOlsidG9rZW5zL2ludGVyc2VjdGlvbi1yb290LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQWEsY0FBYyxFQUFDLE1BQU0sZUFBZSxDQUFDOztBQUV6RCxNQUFNLEtBQU8saUJBQWlCLEdBQUcsSUFBSSxjQUFjLENBQy9DLHVDQUF1QyxDQUMxQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7RWxlbWVudFJlZiwgSW5qZWN0aW9uVG9rZW59IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5cclxuZXhwb3J0IGNvbnN0IElOVEVSU0VDVElPTl9ST09UID0gbmV3IEluamVjdGlvblRva2VuPEVsZW1lbnRSZWY8RWxlbWVudD4+KFxyXG4gICAgJ1Jvb3QgZWxlbWVudCBmb3IgSW50ZXJzZWN0aW9uT2JzZXJ2ZXInLFxyXG4pO1xyXG4iXX0=

@@ -1,3 +0,3 @@

import { DOCUMENT } from '@angular/common';
import { InjectionToken, Attribute, Directive, ElementRef, EventEmitter, Inject, Optional, Output, NgModule, inject } from '@angular/core';
import { Observable, Subject } from 'rxjs';
import { InjectionToken, ElementRef, Inject, Injectable, Optional, Attribute, Directive, Output, NgModule, inject } from '@angular/core';
import { WINDOW } from '@ng-web-apis/common';

@@ -17,28 +17,34 @@

/** @type {?} */
const DEFAULT_MARGIN = '0px 0px 0px 0px';
const INTERSECTION_ROOT_MARGIN = new InjectionToken('rootMargin for IntersectionObserver');
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
const DEFAULT_THRESHOLD = 0;
// @dynamic
class IntersectionObserverDirective extends IntersectionObserver {
const INTERSECTION_THRESHOLD = new InjectionToken('threshold for IntersectionObserver');
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class IntersectionObserverService extends Observable {
/**
* @param {?} elementRef
* @param {?} root
* @param {?} documentRef
* @param {?} selector
* @param {?} margin
* @param {?} rootMargin
* @param {?} threshold
*/
constructor(elementRef, root, documentRef, selector, margin, threshold) {
super(entry => {
this.waIntersectionObserver.emit(entry);
constructor(elementRef, root, rootMargin, threshold) {
super(subscriber => this.entries$.subscribe(subscriber));
this.elementRef = elementRef;
this.entries$ = new Subject();
this.observer = new IntersectionObserver(entries => {
this.entries$.next(entries);
}, {
root: selector ? documentRef.querySelector(selector) || root : root,
rootMargin: margin || DEFAULT_MARGIN,
threshold: threshold
? threshold.split(',').map(value => parseFloat(value))
: DEFAULT_THRESHOLD,
root: root ? root.nativeElement : undefined,
rootMargin: rootMargin ? rootMargin : undefined,
threshold: threshold ? threshold : undefined,
});
this.elementRef = elementRef;
this.waIntersectionObserver = new EventEmitter();
this.observe(this.elementRef.nativeElement);
this.observer.observe(this.elementRef.nativeElement);
}

@@ -49,8 +55,59 @@ /**

ngOnDestroy() {
this.unobserve(this.elementRef.nativeElement);
this.observer.unobserve(this.elementRef.nativeElement);
this.entries$.complete();
}
}
IntersectionObserverService.decorators = [
{ type: Injectable }
];
/** @nocollapse */
IntersectionObserverService.ctorParameters = () => [
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [INTERSECTION_ROOT,] }] },
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [INTERSECTION_ROOT_MARGIN,] }] },
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [INTERSECTION_THRESHOLD,] }] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} rootMargin
* @return {?}
*/
function rootMarginFactory(rootMargin) {
return rootMargin;
}
/**
* @param {?} threshold
* @return {?}
*/
function thresholdFactory(threshold) {
return threshold ? threshold.split(',').map(parseFloat) : null;
}
class IntersectionObserverDirective {
/**
* @param {?} entries$
*/
constructor(entries$) {
this.waIntersectionObserver = entries$;
}
}
IntersectionObserverDirective.decorators = [
{ type: Directive, args: [{
selector: '[waIntersectionObserver]',
providers: [
IntersectionObserverService,
{
provide: INTERSECTION_ROOT_MARGIN,
deps: [[new Attribute('waIntersectionRootMargin')]],
useFactory: rootMarginFactory,
},
{
provide: INTERSECTION_THRESHOLD,
deps: [[new Attribute('waIntersectionThreshold')]],
useFactory: thresholdFactory,
},
],
},] }

@@ -60,8 +117,3 @@ ];

IntersectionObserverDirective.ctorParameters = () => [
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [INTERSECTION_ROOT,] }] },
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
{ type: undefined, decorators: [{ type: Attribute, args: ['waIntersectionRootSelector',] }] },
{ type: undefined, decorators: [{ type: Attribute, args: ['waIntersectionRootMargin',] }] },
{ type: undefined, decorators: [{ type: Attribute, args: ['waIntersectionThreshold',] }] }
{ type: Observable, decorators: [{ type: Inject, args: [IntersectionObserverService,] }] }
];

@@ -76,9 +128,2 @@ IntersectionObserverDirective.propDecorators = {

*/
/**
* @param {?} __0
* @return {?}
*/
function intersectionRootFactory({ nativeElement, }) {
return nativeElement;
}
class IntersectionRootDirective {

@@ -92,4 +137,3 @@ }

provide: INTERSECTION_ROOT,
deps: [ElementRef],
useFactory: intersectionRootFactory,
useExisting: ElementRef,
},

@@ -133,4 +177,4 @@ ],

export { IntersectionObserverDirective, intersectionRootFactory, IntersectionRootDirective, IntersectionObserverModule, INTERSECTION_ROOT, INTERSECTION_OBSERVER_SUPPORT };
export { rootMarginFactory, thresholdFactory, IntersectionObserverDirective, IntersectionRootDirective, IntersectionObserverModule, IntersectionObserverService, INTERSECTION_ROOT, INTERSECTION_ROOT_MARGIN, INTERSECTION_THRESHOLD, INTERSECTION_OBSERVER_SUPPORT };
//# sourceMappingURL=ng-web-apis-intersection-observer.js.map
import { __extends } from 'tslib';
import { DOCUMENT } from '@angular/common';
import { InjectionToken, Attribute, Directive, ElementRef, EventEmitter, Inject, Optional, Output, NgModule, inject } from '@angular/core';
import { Observable, Subject } from 'rxjs';
import { InjectionToken, ElementRef, Inject, Injectable, Optional, Attribute, Directive, Output, NgModule, inject } from '@angular/core';
import { WINDOW } from '@ng-web-apis/common';

@@ -18,21 +18,29 @@

/** @type {?} */
var DEFAULT_MARGIN = '0px 0px 0px 0px';
var INTERSECTION_ROOT_MARGIN = new InjectionToken('rootMargin for IntersectionObserver');
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var DEFAULT_THRESHOLD = 0;
// @dynamic
var IntersectionObserverDirective = /** @class */ (function (_super) {
__extends(IntersectionObserverDirective, _super);
function IntersectionObserverDirective(elementRef, root, documentRef, selector, margin, threshold) {
var _this = _super.call(this, function (entry) {
_this.waIntersectionObserver.emit(entry);
var INTERSECTION_THRESHOLD = new InjectionToken('threshold for IntersectionObserver');
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var IntersectionObserverService = /** @class */ (function (_super) {
__extends(IntersectionObserverService, _super);
function IntersectionObserverService(elementRef, root, rootMargin, threshold) {
var _this = _super.call(this, function (subscriber) { return _this.entries$.subscribe(subscriber); }) || this;
_this.elementRef = elementRef;
_this.entries$ = new Subject();
_this.observer = new IntersectionObserver(function (entries) {
_this.entries$.next(entries);
}, {
root: selector ? documentRef.querySelector(selector) || root : root,
rootMargin: margin || DEFAULT_MARGIN,
threshold: threshold
? threshold.split(',').map(function (value) { return parseFloat(value); })
: DEFAULT_THRESHOLD,
}) || this;
_this.elementRef = elementRef;
_this.waIntersectionObserver = new EventEmitter();
_this.observe(_this.elementRef.nativeElement);
root: root ? root.nativeElement : undefined,
rootMargin: rootMargin ? rootMargin : undefined,
threshold: threshold ? threshold : undefined,
});
_this.observer.observe(_this.elementRef.nativeElement);
return _this;

@@ -43,11 +51,60 @@ }

*/
IntersectionObserverDirective.prototype.ngOnDestroy = /**
IntersectionObserverService.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.unobserve(this.elementRef.nativeElement);
this.observer.unobserve(this.elementRef.nativeElement);
this.entries$.complete();
};
IntersectionObserverService.decorators = [
{ type: Injectable }
];
/** @nocollapse */
IntersectionObserverService.ctorParameters = function () { return [
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [INTERSECTION_ROOT,] }] },
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [INTERSECTION_ROOT_MARGIN,] }] },
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [INTERSECTION_THRESHOLD,] }] }
]; };
return IntersectionObserverService;
}(Observable));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} rootMargin
* @return {?}
*/
function rootMarginFactory(rootMargin) {
return rootMargin;
}
/**
* @param {?} threshold
* @return {?}
*/
function thresholdFactory(threshold) {
return threshold ? threshold.split(',').map(parseFloat) : null;
}
var IntersectionObserverDirective = /** @class */ (function () {
function IntersectionObserverDirective(entries$) {
this.waIntersectionObserver = entries$;
}
IntersectionObserverDirective.decorators = [
{ type: Directive, args: [{
selector: '[waIntersectionObserver]',
providers: [
IntersectionObserverService,
{
provide: INTERSECTION_ROOT_MARGIN,
deps: [[new Attribute('waIntersectionRootMargin')]],
useFactory: rootMarginFactory,
},
{
provide: INTERSECTION_THRESHOLD,
deps: [[new Attribute('waIntersectionThreshold')]],
useFactory: thresholdFactory,
},
],
},] }

@@ -57,8 +114,3 @@ ];

IntersectionObserverDirective.ctorParameters = function () { return [
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [INTERSECTION_ROOT,] }] },
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
{ type: undefined, decorators: [{ type: Attribute, args: ['waIntersectionRootSelector',] }] },
{ type: undefined, decorators: [{ type: Attribute, args: ['waIntersectionRootMargin',] }] },
{ type: undefined, decorators: [{ type: Attribute, args: ['waIntersectionThreshold',] }] }
{ type: Observable, decorators: [{ type: Inject, args: [IntersectionObserverService,] }] }
]; };

@@ -69,3 +121,3 @@ IntersectionObserverDirective.propDecorators = {

return IntersectionObserverDirective;
}(IntersectionObserver));
}());

@@ -76,10 +128,2 @@ /**

*/
/**
* @param {?} __0
* @return {?}
*/
function intersectionRootFactory(_a) {
var nativeElement = _a.nativeElement;
return nativeElement;
}
var IntersectionRootDirective = /** @class */ (function () {

@@ -94,4 +138,3 @@ function IntersectionRootDirective() {

provide: INTERSECTION_ROOT,
deps: [ElementRef],
useFactory: intersectionRootFactory,
useExisting: ElementRef,
},

@@ -140,4 +183,4 @@ ],

export { IntersectionObserverDirective, intersectionRootFactory, IntersectionRootDirective, IntersectionObserverModule, INTERSECTION_ROOT, INTERSECTION_OBSERVER_SUPPORT };
export { rootMarginFactory, thresholdFactory, IntersectionObserverDirective, IntersectionRootDirective, IntersectionObserverModule, IntersectionObserverService, INTERSECTION_ROOT, INTERSECTION_ROOT_MARGIN, INTERSECTION_THRESHOLD, INTERSECTION_OBSERVER_SUPPORT };
//# sourceMappingURL=ng-web-apis-intersection-observer.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":4,"metadata":{"IntersectionObserverDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"IntersectionObserver"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":17,"character":1},"arguments":[{"selector":"[waIntersectionObserver]"}]}],"members":{"waIntersectionObserver":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":22,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":26,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":26,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":27,"character":9}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":27,"character":21},"arguments":[{"__symbolic":"reference","name":"INTERSECTION_ROOT"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":28,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":28,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute","line":29,"character":9},"arguments":["waIntersectionRootSelector"]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute","line":30,"character":9},"arguments":["waIntersectionRootMargin"]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute","line":31,"character":9},"arguments":["waIntersectionThreshold"]}]],"parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":26,"character":68,"context":{"typeName":"HTMLElement"},"module":"./directives/intersection-observer"}]},{"__symbolic":"error","message":"Could not resolve type","line":27,"character":53,"context":{"typeName":"HTMLElement"},"module":"./directives/intersection-observer"},{"__symbolic":"error","message":"Could not resolve type","line":28,"character":39,"context":{"typeName":"Document"},"module":"./directives/intersection-observer"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"}]}],"ngOnDestroy":[{"__symbolic":"method"}]}},"intersectionRootFactory":{"__symbolic":"function","parameters":["nativeElement"],"value":{"__symbolic":"reference","name":"nativeElement"}},"IntersectionRootDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":9,"character":1},"arguments":[{"selector":"[waIntersectionRoot]","providers":[{"provide":{"__symbolic":"reference","name":"INTERSECTION_ROOT"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":14,"character":19}],"useFactory":{"__symbolic":"reference","name":"intersectionRootFactory"}}]}]}],"members":{}},"IntersectionObserverModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":4,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"IntersectionObserverDirective"},{"__symbolic":"reference","name":"IntersectionRootDirective"}],"exports":[{"__symbolic":"reference","name":"IntersectionObserverDirective"},{"__symbolic":"reference","name":"IntersectionRootDirective"}]}]}],"members":{}},"INTERSECTION_ROOT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":37},"arguments":["Root element for IntersectionObserver"]},"INTERSECTION_OBSERVER_SUPPORT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":10,"character":49},"arguments":["Intersection Observer API support",{"__symbolic":"error","message":"Lambda not supported","line":14,"character":17,"module":"./tokens/support"}]}},"origins":{"IntersectionObserverDirective":"./directives/intersection-observer","intersectionRootFactory":"./directives/intersection-root","IntersectionRootDirective":"./directives/intersection-root","IntersectionObserverModule":"./module","INTERSECTION_ROOT":"./tokens/intersection-root","INTERSECTION_OBSERVER_SUPPORT":"./tokens/support"},"importAs":"@ng-web-apis/intersection-observer"}
{"__symbolic":"module","version":4,"metadata":{"rootMarginFactory":{"__symbolic":"function","parameters":["rootMargin"],"value":{"__symbolic":"reference","name":"rootMargin"}},"thresholdFactory":{"__symbolic":"function","parameters":["threshold"],"value":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"threshold"},"thenExpression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"threshold"},"member":"split"},"arguments":[","]},"member":"map"},"arguments":[{"__symbolic":"reference","name":"parseFloat"}]},"elseExpression":null}},"IntersectionObserverDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":14,"character":1},"arguments":[{"selector":"[waIntersectionObserver]","providers":[{"__symbolic":"reference","name":"IntersectionObserverService"},{"provide":{"__symbolic":"reference","name":"INTERSECTION_ROOT_MARGIN"},"deps":[[{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute","line":20,"character":24},"arguments":["waIntersectionRootMargin"]}]],"useFactory":{"__symbolic":"reference","name":"rootMarginFactory"}},{"provide":{"__symbolic":"reference","name":"INTERSECTION_THRESHOLD"},"deps":[[{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute","line":25,"character":24},"arguments":["waIntersectionThreshold"]}]],"useFactory":{"__symbolic":"reference","name":"thresholdFactory"}}]}]}],"members":{"waIntersectionObserver":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":31,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":35,"character":9},"arguments":[{"__symbolic":"reference","name":"IntersectionObserverService"}]}]],"parameters":[{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":36,"character":29,"context":{"typeName":"IntersectionObserverEntry"},"module":"./directives/intersection-observer"}]}]}]}]}},"IntersectionRootDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":3,"character":1},"arguments":[{"selector":"[waIntersectionRoot]","providers":[{"provide":{"__symbolic":"reference","name":"INTERSECTION_ROOT"},"useExisting":{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":8,"character":25}}]}]}],"members":{}},"IntersectionObserverModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":4,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"IntersectionObserverDirective"},{"__symbolic":"reference","name":"IntersectionRootDirective"}],"exports":[{"__symbolic":"reference","name":"IntersectionObserverDirective"},{"__symbolic":"reference","name":"IntersectionRootDirective"}]}]}],"members":{}},"IntersectionObserverService":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"rxjs","name":"Observable","line":7,"character":49},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":14,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":14,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":15,"character":9}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":15,"character":21},"arguments":[{"__symbolic":"reference","name":"INTERSECTION_ROOT"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":16,"character":9}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":16,"character":21},"arguments":[{"__symbolic":"reference","name":"INTERSECTION_ROOT_MARGIN"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":17,"character":9}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":17,"character":21},"arguments":[{"__symbolic":"reference","name":"INTERSECTION_THRESHOLD"}]}]],"parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":15,"character":64,"context":{"typeName":"Element"},"module":"./services/intersection-observer.service"}]},{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":15,"character":64,"context":{"typeName":"Element"},"module":"./services/intersection-observer.service"}]},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"number"}]}],"ngOnDestroy":[{"__symbolic":"method"}]}},"INTERSECTION_ROOT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":37},"arguments":["Root element for IntersectionObserver"]},"INTERSECTION_ROOT_MARGIN":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":44},"arguments":["rootMargin for IntersectionObserver"]},"INTERSECTION_THRESHOLD":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":42},"arguments":["threshold for IntersectionObserver"]},"INTERSECTION_OBSERVER_SUPPORT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":10,"character":49},"arguments":["Intersection Observer API support",{"__symbolic":"error","message":"Lambda not supported","line":14,"character":17,"module":"./tokens/support"}]}},"origins":{"rootMarginFactory":"./directives/intersection-observer","thresholdFactory":"./directives/intersection-observer","IntersectionObserverDirective":"./directives/intersection-observer","IntersectionRootDirective":"./directives/intersection-root","IntersectionObserverModule":"./module","IntersectionObserverService":"./services/intersection-observer.service","INTERSECTION_ROOT":"./tokens/intersection-root","INTERSECTION_ROOT_MARGIN":"./tokens/intersection-root-margin","INTERSECTION_THRESHOLD":"./tokens/intersection-threshold","INTERSECTION_OBSERVER_SUPPORT":"./tokens/support"},"importAs":"@ng-web-apis/intersection-observer"}
{
"name": "@ng-web-apis/intersection-observer",
"version": "1.0.0",
"version": "1.1.0",
"peerDependencies": {

@@ -5,0 +5,0 @@ "@angular/core": ">=6.0.0",

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

export * from './module';
export * from './services/intersection-observer.service';
export * from './tokens/intersection-root';
export * from './tokens/intersection-root-margin';
export * from './tokens/intersection-threshold';
export * from './tokens/support';

@@ -43,6 +43,2 @@ # Intersection Observer API for Angular

Alternatively you can use `waIntersectionRootSelector` attribute
to pass CSS selector to `waIntersectionObserver` directive to look
for a root element.
Use `waIntersectionThreshold` and `waIntersectionRootMargin` attributes to configure

@@ -54,2 +50,33 @@ [IntersectionObserver options](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/IntersectionObserver)

## Service
Alternatively you can use `Observable`-based `IntersectionObserverService` and provide tokens
`INTERSECTION_ROOT_MARGIN` and `INTERSECTION_THRESHOLD` manually:
```typescript
@Component({
selector: 'my-component',
providers: [
IntersectionObserverService,
{
provide: INTERSECTION_THRESHOLD,
useValue: 0.5,
},
],
})
export class MyComponent {
constructor(
@Inject(IntersectionObserverService) entries$: IntersectionObserverService,
) {
entries$.subscribe(entries => {
// This will trigger once my-component becomes half way visible
// in parent element designated with waIntersectionRoot directive
console.log(entries);
});
}
}
```
> No need to unsubscribe, service extends `Observable` and completes on destroy
## Browser support

@@ -56,0 +83,0 @@

@@ -1,2 +0,2 @@

import { InjectionToken } from '@angular/core';
export declare const INTERSECTION_ROOT: InjectionToken<HTMLElement>;
import { ElementRef, InjectionToken } from '@angular/core';
export declare const INTERSECTION_ROOT: InjectionToken<ElementRef<Element>>;

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc