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

@ng-web-apis/geolocation

Package Overview
Dependencies
Maintainers
4
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ng-web-apis/geolocation - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

17

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

@@ -41,3 +41,3 @@ /*! *****************************************************************************

/** @type {?} */
var GEOLOCATION = new i0.InjectionToken('An abstract over window.navigator.geolocation object', {
var GEOLOCATION = new i0.InjectionToken('An abstraction over window.navigator.geolocation object', {
factory: function () { return i0.inject(common.NAVIGATOR).geolocation; },

@@ -58,7 +58,5 @@ });

/** @type {?} */
var GEOLOCATION_SUPPORT = new i0.InjectionToken('Is Geolocation Api supported?', {
var GEOLOCATION_SUPPORT = new i0.InjectionToken('Is Geolocation API supported?', {
factory: function () {
/** @type {?} */
var window = i0.inject(common.WINDOW);
return !!window.navigator && !!window.navigator.geolocation;
return !!i0.inject(GEOLOCATION);
},

@@ -71,2 +69,3 @@ });

*/
// TODO: Replace type with GeolocationPosition after bumping TS to 4.1.3+
// @dynamic

@@ -73,0 +72,0 @@ var GeolocationService = /** @class */ (function (_super) {

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

!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("rxjs"),require("rxjs/operators"),require("@angular/core"),require("@ng-web-apis/common")):"function"==typeof define&&define.amd?define("@ng-web-apis/geolocation",["exports","rxjs","rxjs/operators","@angular/core","@ng-web-apis/common"],o):o((e["ng-web-apis"]=e["ng-web-apis"]||{},e["ng-web-apis"].geolocation={}),e.rxjs,e.rxjs.operators,e.ng.core,e.common)}(this,function(e,o,i,n,t){"use strict";var r=function(e,o){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var n in o)o.hasOwnProperty(n)&&(e[n]=o[n])})(e,o)};var c,a=new n.InjectionToken("An abstract over window.navigator.geolocation object",{factory:function(){return n.inject(t.NAVIGATOR).geolocation}}),s=new n.InjectionToken("Token for an additional position options",{factory:function(){return{}}}),u=new n.InjectionToken("Is Geolocation Api supported?",{factory:function(){var e=n.inject(t.WINDOW);return!!e.navigator&&!!e.navigator.geolocation}}),p=(function d(e,o){function n(){this.constructor=e}r(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}(f,c=o.Observable),f.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],f.ctorParameters=function(){return[{type:undefined,decorators:[{type:n.Inject,args:[a]}]},{type:Boolean,decorators:[{type:n.Inject,args:[u]}]},{type:undefined,decorators:[{type:n.Inject,args:[s]}]}]},f.ngInjectableDef=n.defineInjectable({factory:function(){return new f(n.inject(a),n.inject(u),n.inject(s))},token:f,providedIn:"root"}),f);function f(e,n,t){var r=0;return(c.call(this,function(o){n||o.error("Geolocation is not supported in your browser"),r=e.watchPosition(function(e){return o.next(e)},function(e){return o.error(e)},t)})||this).pipe(i.finalize(function(){return e.clearWatch(r)}),i.shareReplay({bufferSize:1,refCount:!0}))}e.GeolocationService=p,e.GEOLOCATION=a,e.POSITION_OPTIONS=s,e.GEOLOCATION_SUPPORT=u,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("rxjs"),require("rxjs/operators"),require("@ng-web-apis/common"),require("@angular/core")):"function"==typeof define&&define.amd?define("@ng-web-apis/geolocation",["exports","rxjs","rxjs/operators","@ng-web-apis/common","@angular/core"],o):o((e["ng-web-apis"]=e["ng-web-apis"]||{},e["ng-web-apis"].geolocation={}),e.rxjs,e.rxjs.operators,e.common,e.ng.core)}(this,function(e,o,i,n,t){"use strict";var r=function(e,o){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var n in o)o.hasOwnProperty(n)&&(e[n]=o[n])})(e,o)};var c,a=new t.InjectionToken("An abstraction over window.navigator.geolocation object",{factory:function(){return t.inject(n.NAVIGATOR).geolocation}}),s=new t.InjectionToken("Token for an additional position options",{factory:function(){return{}}}),u=new t.InjectionToken("Is Geolocation API supported?",{factory:function(){return!!t.inject(a)}}),p=(function d(e,o){function n(){this.constructor=e}r(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}(f,c=o.Observable),f.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],f.ctorParameters=function(){return[{type:undefined,decorators:[{type:t.Inject,args:[a]}]},{type:Boolean,decorators:[{type:t.Inject,args:[u]}]},{type:undefined,decorators:[{type:t.Inject,args:[s]}]}]},f.ngInjectableDef=t.defineInjectable({factory:function(){return new f(t.inject(a),t.inject(u),t.inject(s))},token:f,providedIn:"root"}),f);function f(e,n,t){var r=0;return(c.call(this,function(o){n||o.error("Geolocation is not supported in your browser"),r=e.watchPosition(function(e){return o.next(e)},function(e){return o.error(e)},t)})||this).pipe(i.finalize(function(){return e.clearWatch(r)}),i.shareReplay({bufferSize:1,refCount:!0}))}e.GeolocationService=p,e.GEOLOCATION=a,e.POSITION_OPTIONS=s,e.GEOLOCATION_SUPPORT=u,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ng-web-apis-geolocation.umd.min.js.map

@@ -15,2 +15,3 @@ /**

import * as i3 from "../tokens/geolocation-options";
// TODO: Replace type with GeolocationPosition after bumping TS to 4.1.3+
// @dynamic

@@ -47,2 +48,2 @@ export class GeolocationService extends Observable {

/** @nocollapse */ GeolocationService.ngInjectableDef = i0.defineInjectable({ factory: function GeolocationService_Factory() { return new GeolocationService(i0.inject(i1.GEOLOCATION), i0.inject(i2.GEOLOCATION_SUPPORT), i0.inject(i3.POSITION_OPTIONS)); }, token: GeolocationService, providedIn: "root" });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvbG9jYXRpb24uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZy13ZWItYXBpcy9nZW9sb2NhdGlvbi8iLCJzb3VyY2VzIjpbInNlcnZpY2VzL2dlb2xvY2F0aW9uLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBQyxNQUFNLEVBQUUsVUFBVSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ2pELE9BQU8sRUFBQyxVQUFVLEVBQUMsTUFBTSxNQUFNLENBQUM7QUFDaEMsT0FBTyxFQUFDLFFBQVEsRUFBRSxXQUFXLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUNyRCxPQUFPLEVBQUMsV0FBVyxFQUFDLE1BQU0sdUJBQXVCLENBQUM7QUFDbEQsT0FBTyxFQUFDLGdCQUFnQixFQUFDLE1BQU0sK0JBQStCLENBQUM7QUFDL0QsT0FBTyxFQUFDLG1CQUFtQixFQUFDLE1BQU0sK0JBQStCLENBQUM7Ozs7OztBQ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bnMsXG4gICAgKSB7XG4gICAgICAgIGxldCB3YXRjaFBvc2l0aW9uSWQgPSAwO1xuXG4gICAgICAgIHN1cGVyKHN1YnNjcmliZXIgPT4ge1xuICAgICAgICAgICAgaWYgKCFnZW9sb2NhdGlvblN1cHBvcnRlZCkge1xuICAgICAgICAgICAgICAgIHN1YnNjcmliZXIuZXJyb3IoJ0dlb2xvY2F0aW9uIGlzIG5vdCBzdXBwb3J0ZWQgaW4geW91ciBicm93c2VyJyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHdhdGNoUG9zaXRpb25JZCA9IGdlb2xvY2F0aW9uUmVmLndhdGNoUG9zaXRpb24oXG4gICAgICAgICAgICAgICAgcG9zaXRpb24gPT4gc3Vic2NyaWJlci5uZXh0KHBvc2l0aW9uKSxcbiAgICAgICAgICAgICAgICBwb3NpdGlvbkVycm9yID0+IHN1YnNjcmliZXIuZXJyb3IocG9zaXRpb25FcnJvciksXG4gICAgICAgICAgICAgICAgcG9zaXRpb25PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgcmV0dXJuIHRoaXMucGlwZShcbiAgICAgICAgICAgIGZpbmFsaXplKCgpID0+IGdlb2xvY2F0aW9uUmVmLmNsZWFyV2F0Y2god2F0Y2hQb3NpdGlvbklkKSksXG4gICAgICAgICAgICBzaGFyZVJlcGxheSh7YnVmZmVyU2l6ZTogMSwgcmVmQ291bnQ6IHRydWV9KSxcbiAgICAgICAgKSBhcyBHZW9sb2NhdGlvblNlcnZpY2U7XG4gICAgfVxufVxuIl19

@@ -6,11 +6,9 @@ /**

import { inject, InjectionToken } from '@angular/core';
import { WINDOW } from '@ng-web-apis/common';
import { GEOLOCATION } from './geolocation';
/** @type {?} */
export const GEOLOCATION_SUPPORT = new InjectionToken('Is Geolocation Api supported?', {
export const GEOLOCATION_SUPPORT = new InjectionToken('Is Geolocation API supported?', {
factory: () => {
/** @type {?} */
const window = inject(WINDOW);
return !!window.navigator && !!window.navigator.geolocation;
return !!inject(GEOLOCATION);
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvbG9jYXRpb24tc3VwcG9ydC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZy13ZWItYXBpcy9nZW9sb2NhdGlvbi8iLCJzb3VyY2VzIjpbInRva2Vucy9nZW9sb2NhdGlvbi1zdXBwb3J0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUMsTUFBTSxFQUFFLGNBQWMsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUNyRCxPQUFPLEVBQUMsTUFBTSxFQUFDLE1BQU0scUJBQXFCLENBQUM7O0FBRTNDLE1BQU0sT0FBTyxtQkFBbUIsR0FBRyxJQUFJLGNBQWMsQ0FDakQsK0JBQStCLEVBQy9CO0lBQ0ksT0FBTyxFQUFFLEdBQUcsRUFBRTs7Y0FDSixNQUFNLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FBQztRQUU3QixPQUFPLENBQUMsQ0FBQyxNQUFNLENBQUMsU0FBUyxJQUFJLENBQUMsQ0FBQyxNQUFNLENBQUMsU0FBUyxDQUFDLFdBQVcsQ0FBQztJQUNoRSxDQUFDO0NBQ0osQ0FDSiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7aW5qZWN0LCBJbmplY3Rpb25Ub2tlbn0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQge1dJTkRPV30gZnJvbSAnQG5nLXdlYi1hcGlzL2NvbW1vbic7XG5cbmV4cG9ydCBjb25zdCBHRU9MT0NBVElPTl9TVVBQT1JUID0gbmV3IEluamVjdGlvblRva2VuPGJvb2xlYW4+KFxuICAgICdJcyBHZW9sb2NhdGlvbiBBcGkgc3VwcG9ydGVkPycsXG4gICAge1xuICAgICAgICBmYWN0b3J5OiAoKSA9PiB7XG4gICAgICAgICAgICBjb25zdC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G4gICAgICAgICAgICByZXR1cm4gISFpbmplY3QoR0VPTE9DQVRJT04pO1xuICAgICAgICB9LFxuICAgIH0sXG4pO1xuIl19

@@ -8,5 +8,5 @@ /**

/** @type {?} */
export const GEOLOCATION = new InjectionToken('An abstract over window.navigator.geolocation object', {
export const GEOLOCATION = new InjectionToken('An abstraction over window.navigator.geolocation object', {
factory: () => inject(NAVIGATOR).geolocation,
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvbG9jYXRpb24uanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmctd2ViLWFwaXMvZ2VvbG9jYXRpb24vIiwic291cmNlcyI6WyJ0b2tlbnMvZ2VvbG9jYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBQyxNQUFNLEVBQUUsY0FBYyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ3JELE9BQU8sRUFBQyxTQUFTLEVBQUMsTUFBTSxxQkFBcUIsQ0FBQzs7QUFFOUMsTUFBTSxPQUFPLFdBQVcsR0FBRyxJQUFJLGNBQWMsQ0FDekMsc0RBQXNELEVBQ3REO0lBQ0ksT0FBTyxFQUFFLEdBQUcsRUFBRSxDQUFDLE1BQU0sQ0FBQyxTQUFTLENBQUMsQ0FBQyxXQUFXO0NBQy9DLENBQ0oiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge2luamVjdCwgSW5qZWN0aW9uVG9rZW59IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHtOQVZJR0FUT1J9IGZyb20gJ0BuZy13ZWItYXBpcy9jb21tb24nO1xuXG5leHBvcnQgY29uc3QgR0VPTE9DQVRJT04gPSBuZXcgSW5qZWN0aW9uVG9rZW48R2VvbG9jYXRpb24+KFxuICAgICdBbiBhYnN0cmFjdCBvdmVyIHdpbmRvdy5uYXZpZ2F0b3IuZ2VvbG9jYXRpb24gb2JqZW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16,2 +16,3 @@ /**

import * as i3 from "../tokens/geolocation-options";
// TODO: Replace type with GeolocationPosition after bumping TS to 4.1.3+
// @dynamic

@@ -47,2 +48,2 @@ var GeolocationService = /** @class */ (function (_super) {

export { GeolocationService };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvbG9jYXRpb24uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZy13ZWItYXBpcy9nZW9sb2NhdGlvbi8iLCJzb3VyY2VzIjpbInNlcnZpY2VzL2dlb2xvY2F0aW9uLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxPQUFPLEVBQUMsTUFBTSxFQUFFLFVBQVUsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUNqRCxPQUFPLEVBQUMsVUFBVSxFQUFDLE1BQU0sTUFBTSxDQUFDO0FBQ2hDLE9BQU8sRUFBQyxRQUFRLEVBQUUsV0FBVyxFQUFDLE1BQU0sZ0JBQWdCLENBQUM7QUFDckQsT0FBTyxFQUFDLFdBQVcsRUFBQyxNQUFNLHVCQUF1QixDQUFDO0FBQ2xELE9BQU8sRUFBQyxnQkFBZ0IsRUFBQyxNQUFNLCtCQUErQixDQUFDO0FBQy9ELE9BQU8sRUFBQyxtQkFBbUIsRUFBQyxNQUFNLCtCQUErQixDQUFDOzs7Ozs7QUFHbEU7SUFHd0MsOENBQW9CO0lBQ3hELDRCQUN5QixjQUEyQixFQUNuQixvQkFBNkIsRUFFMUQsZUFBZ0M7UUFKcEMsaUJBd0JDOztZQWxCTyxlQUFlLEdBQUcsQ0FBQztRQUV2QixRQUFBLGtCQUFNLFVBQUEsVUFBVTtZQUNaLElBQUksQ0FBQyxvQkFBb0IsRUFBRTtnQkFDdkIsVUFBVSxDQUFDLEtBQUssQ0FBQyw4Q0FBOEMsQ0FBQyxDQUFDO2FBQ3BFO1lBRUQsZUFBZSxHQUFHLGNBQWMs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HtcbiAgICAgICAgICAgIGlmICghZ2VvbG9jYXRpb25TdXBwb3J0ZWQpIHtcbiAgICAgICAgICAgICAgICBzdWJzY3JpYmVyLmVycm9yKCdHZW9sb2NhdGlvbiBpcyBub3Qgc3VwcG9ydGVkIGluIHlvdXIgYnJvd3NlcicpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB3YXRjaFBvc2l0aW9uSWQgPSBnZW9sb2NhdGlvblJlZi53YXRjaFBvc2l0aW9uKFxuICAgICAgICAgICAgICAgIHBvc2l0aW9uID0+IHN1YnNjcmliZXIubmV4dChwb3NpdGlvbiksXG4gICAgICAgICAgICAgICAgcG9zaXRpb25FcnJvciA9PiBzdWJzY3JpYmVyLmVycm9yKHBvc2l0aW9uRXJyb3IpLFxuICAgICAgICAgICAgICAgIHBvc2l0aW9uT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiB0aGlzLnBpcGUoXG4gICAgICAgICAgICBmaW5hbGl6ZSgoKSA9PiBnZW9sb2NhdGlvblJlZi5jbGVhcldhdGNoKHdhdGNoUG9zaXRpb25JZCkpLFxuICAgICAgICAgICAgc2hhcmVSZXBsYXkoe2J1ZmZlclNpemU6IDEsIHJlZkNvdW50OiB0cnVlfSksXG4gICAgICAgICkgYXMgR2VvbG9jYXRpb25TZXJ2aWNlO1xuICAgIH1cbn1cbiJdfQ==

@@ -6,11 +6,9 @@ /**

import { inject, InjectionToken } from '@angular/core';
import { WINDOW } from '@ng-web-apis/common';
import { GEOLOCATION } from './geolocation';
/** @type {?} */
export var GEOLOCATION_SUPPORT = new InjectionToken('Is Geolocation Api supported?', {
export var GEOLOCATION_SUPPORT = new InjectionToken('Is Geolocation API supported?', {
factory: function () {
/** @type {?} */
var window = inject(WINDOW);
return !!window.navigator && !!window.navigator.geolocation;
return !!inject(GEOLOCATION);
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoi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,5 +8,5 @@ /**

/** @type {?} */
export var GEOLOCATION = new InjectionToken('An abstract over window.navigator.geolocation object', {
export var GEOLOCATION = new InjectionToken('An abstraction over window.navigator.geolocation object', {
factory: function () { return inject(NAVIGATOR).geolocation; },
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvbG9jYXRpb24uanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmctd2ViLWFwaXMvZ2VvbG9jYXRpb24vIiwic291cmNlcyI6WyJ0b2tlbnMvZ2VvbG9jYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBQyxNQUFNLEVBQUUsY0FBYyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ3JELE9BQU8sRUFBQyxTQUFTLEVBQUMsTUFBTSxxQkFBcUIsQ0FBQzs7QUFFOUMsTUFBTSxLQUFPLFdBQVcsR0FBRyxJQUFJLGNBQWMsQ0FDekMsc0RBQXNELEVBQ3REO0lBQ0ksT0FBTyxFQUFFLGNBQU0sT0FBQSxNQUFNLENBQUMsU0FBUyxDQUFDLENBQUMsV0FBVyxFQUE3QixDQUE2QjtDQUMvQyxDQUNKIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtpbmplY3QsIEluamVjdGlvblRva2VufSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7TkFWSUdBVE9SfSBmcm9tICdAbmctd2ViLWFwaXMvY29tbW9uJztcblxuZXhwb3J0IGNvbnN0IEdFT0xPQ0FUSU9OID0gbmV3IEluamVjdGlvblRva2VuPEdlb2xvY2F0aW9uPihcbiAgICAnQW4gYWJzdHJhY3Qgb3ZlciB3aW5kb3cubmF2aWdhdG9yLmdlb2xvY2F0aW9uIG9iamVjdCcsXG4gICAge1xuICAgICAgICBmYWN0b3J5OiAoKSA9PiBpbmplY3QoTkFWSUdBVE9SKS5nZW9sb2NhdGlvbixcbiAgICB9LFxuKTtcbiJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvbG9jYXRpb24uanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmctd2ViLWFwaXMvZ2VvbG9jYXRpb24vIiwic291cmNlcyI6WyJ0b2tlbnMvZ2VvbG9jYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBQyxNQUFNLEVBQUUsY0FBYyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ3JELE9BQU8sRUFBQyxTQUFTLEVBQUMsTUFBTSxxQkFBcUIsQ0FBQzs7QUFFOUMsTUFBTSxLQUFPLFdBQVcsR0FBRyxJQUFJLGNBQWMsQ0FDekMseURBQXlELEVBQ3pEO0lBQ0ksT0FBTyxFQUFFLGNBQU0sT0FBQSxNQUFNLENBQUMsU0FBUyxDQUFDLENBQUMsV0FBVyxFQUE3QixDQUE2QjtDQUMvQyxDQUNKIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtpbmplY3QsIEluamVjdGlvblRva2VufSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7TkFWSUdBVE9SfSBmcm9tICdAbmctd2ViLWFwaXMvY29tbW9uJztcblxuZXhwb3J0IGNvbnN0IEdFT0xPQ0FUSU9OID0gbmV3IEluamVjdGlvblRva2VuPEdlb2xvY2F0aW9uPihcbiAgICAnQW4gYWJzdHJhY3Rpb24gb3ZlciB3aW5kb3cubmF2aWdhdG9yLmdlb2xvY2F0aW9uIG9iamVjdCcsXG4gICAge1xuICAgICAgICBmYWN0b3J5OiAoKSA9PiBpbmplY3QoTkFWSUdBVE9SKS5nZW9sb2NhdGlvbixcbiAgICB9LFxuKTtcbiJdfQ==
import { Observable } from 'rxjs';
import { finalize, shareReplay } from 'rxjs/operators';
import { NAVIGATOR } from '@ng-web-apis/common';
import { inject, InjectionToken, Inject, Injectable, defineInjectable } from '@angular/core';
import { NAVIGATOR, WINDOW } from '@ng-web-apis/common';

@@ -11,3 +11,3 @@ /**

/** @type {?} */
const GEOLOCATION = new InjectionToken('An abstract over window.navigator.geolocation object', {
const GEOLOCATION = new InjectionToken('An abstraction over window.navigator.geolocation object', {
factory: () => inject(NAVIGATOR).geolocation,

@@ -28,7 +28,5 @@ });

/** @type {?} */
const GEOLOCATION_SUPPORT = new InjectionToken('Is Geolocation Api supported?', {
const GEOLOCATION_SUPPORT = new InjectionToken('Is Geolocation API supported?', {
factory: () => {
/** @type {?} */
const window = inject(WINDOW);
return !!window.navigator && !!window.navigator.geolocation;
return !!inject(GEOLOCATION);
},

@@ -41,2 +39,3 @@ });

*/
// TODO: Replace type with GeolocationPosition after bumping TS to 4.1.3+
// @dynamic

@@ -43,0 +42,0 @@ class GeolocationService extends Observable {

import { __extends } from 'tslib';
import { Observable } from 'rxjs';
import { finalize, shareReplay } from 'rxjs/operators';
import { NAVIGATOR } from '@ng-web-apis/common';
import { inject, InjectionToken, Inject, Injectable, defineInjectable } from '@angular/core';
import { NAVIGATOR, WINDOW } from '@ng-web-apis/common';

@@ -12,3 +12,3 @@ /**

/** @type {?} */
var GEOLOCATION = new InjectionToken('An abstract over window.navigator.geolocation object', {
var GEOLOCATION = new InjectionToken('An abstraction over window.navigator.geolocation object', {
factory: function () { return inject(NAVIGATOR).geolocation; },

@@ -29,7 +29,5 @@ });

/** @type {?} */
var GEOLOCATION_SUPPORT = new InjectionToken('Is Geolocation Api supported?', {
var GEOLOCATION_SUPPORT = new InjectionToken('Is Geolocation API supported?', {
factory: function () {
/** @type {?} */
var window = inject(WINDOW);
return !!window.navigator && !!window.navigator.geolocation;
return !!inject(GEOLOCATION);
},

@@ -42,2 +40,3 @@ });

*/
// TODO: Replace type with GeolocationPosition after bumping TS to 4.1.3+
// @dynamic

@@ -44,0 +43,0 @@ var GeolocationService = /** @class */ (function (_super) {

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

{"__symbolic":"module","version":4,"metadata":{"GeolocationService":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"rxjs","name":"Observable","line":11,"character":40},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":8,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":13,"character":9},"arguments":[{"__symbolic":"reference","name":"GEOLOCATION"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":14,"character":9},"arguments":[{"__symbolic":"reference","name":"GEOLOCATION_SUPPORT"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":15,"character":9},"arguments":[{"__symbolic":"reference","name":"POSITION_OPTIONS"}]}]],"parameters":[{"__symbolic":"error","message":"Could not resolve type","line":13,"character":45,"context":{"typeName":"Geolocation"},"module":"./services/geolocation.service"},{"__symbolic":"reference","name":"boolean"},{"__symbolic":"error","message":"Could not resolve type","line":16,"character":25,"context":{"typeName":"PositionOptions"},"module":"./services/geolocation.service"}]}]},"statics":{"ngInjectableDef":{}}},"GEOLOCATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":31},"arguments":["An abstract over window.navigator.geolocation object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/geolocation"}]},"POSITION_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":36},"arguments":["Token for an additional position options",{"__symbolic":"error","message":"Lambda not supported","line":4,"character":14,"module":"./tokens/geolocation-options"}]},"GEOLOCATION_SUPPORT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":39},"arguments":["Is Geolocation Api supported?",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/geolocation-support"}]}},"origins":{"GeolocationService":"./services/geolocation.service","GEOLOCATION":"./tokens/geolocation","POSITION_OPTIONS":"./tokens/geolocation-options","GEOLOCATION_SUPPORT":"./tokens/geolocation-support"},"importAs":"@ng-web-apis/geolocation"}
{"__symbolic":"module","version":4,"metadata":{"GeolocationService":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"rxjs","name":"Observable","line":12,"character":40},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":9,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":14,"character":9},"arguments":[{"__symbolic":"reference","name":"GEOLOCATION"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":15,"character":9},"arguments":[{"__symbolic":"reference","name":"GEOLOCATION_SUPPORT"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":16,"character":9},"arguments":[{"__symbolic":"reference","name":"POSITION_OPTIONS"}]}]],"parameters":[{"__symbolic":"error","message":"Could not resolve type","line":14,"character":45,"context":{"typeName":"Geolocation"},"module":"./services/geolocation.service"},{"__symbolic":"reference","name":"boolean"},{"__symbolic":"error","message":"Could not resolve type","line":17,"character":25,"context":{"typeName":"PositionOptions"},"module":"./services/geolocation.service"}]}]},"statics":{"ngInjectableDef":{}}},"GEOLOCATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":31},"arguments":["An abstraction over window.navigator.geolocation object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/geolocation"}]},"POSITION_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":36},"arguments":["Token for an additional position options",{"__symbolic":"error","message":"Lambda not supported","line":4,"character":14,"module":"./tokens/geolocation-options"}]},"GEOLOCATION_SUPPORT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":39},"arguments":["Is Geolocation API supported?",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/geolocation-support"}]}},"origins":{"GeolocationService":"./services/geolocation.service","GEOLOCATION":"./tokens/geolocation","POSITION_OPTIONS":"./tokens/geolocation-options","GEOLOCATION_SUPPORT":"./tokens/geolocation-support"},"importAs":"@ng-web-apis/geolocation"}
{
"name": "@ng-web-apis/geolocation",
"version": "1.0.3",
"version": "1.0.4",
"peerDependencies": {

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

@@ -99,2 +99,8 @@ # Geolocation API for Angular

## Browser support
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/> | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/> | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/> | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/> | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari-ios/safari-ios_48x48.png" alt="iOS Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/> |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 9+ | 3.5+ | 5+ | 5+ | 3.2+ |
## Demo

@@ -101,0 +107,0 @@

import { Observable } from 'rxjs';
export declare class GeolocationService extends Observable<Position> {
export declare class GeolocationService extends Observable<Parameters<PositionCallback>[0]> {
constructor(geolocationRef: Geolocation, geolocationSupported: boolean, positionOptions: PositionOptions);
}

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