@ng-web-apis/geolocation
Advanced tools
@@ -26,6 +26,6 @@ import * as i0 from '@angular/core'; | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WaGeolocationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WaGeolocationService, providedIn: 'root' }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: WaGeolocationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: WaGeolocationService, providedIn: 'root' }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WaGeolocationService, decorators: [{ | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: WaGeolocationService, decorators: [{ | ||
| type: Injectable, | ||
@@ -32,0 +32,0 @@ args: [{ providedIn: 'root' }] |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"ng-web-apis-geolocation.mjs","sources":["../../../libs/geolocation/src/tokens/geolocation.ts","../../../libs/geolocation/src/tokens/geolocation-options.ts","../../../libs/geolocation/src/tokens/geolocation-support.ts","../../../libs/geolocation/src/services/geolocation.service.ts","../../../libs/geolocation/src/ng-web-apis-geolocation.ts"],"sourcesContent":["import {inject, InjectionToken} from '@angular/core';\nimport {WA_NAVIGATOR} from '@ng-web-apis/common';\n\nexport const WA_GEOLOCATION = new InjectionToken<Geolocation>(\n ngDevMode ? '[WA_GEOLOCATION]' : '',\n {factory: () => inject(WA_NAVIGATOR).geolocation},\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const WA_POSITION_OPTIONS = new InjectionToken<PositionOptions>(\n ngDevMode ? '[WA_POSITION_OPTIONS]' : '',\n {factory: () => ({})},\n);\n","import {inject, InjectionToken} from '@angular/core';\n\nimport {WA_GEOLOCATION} from './geolocation';\n\nexport const WA_GEOLOCATION_SUPPORT = new InjectionToken<boolean>(\n ngDevMode ? '[WA_GEOLOCATION_SUPPORT]' : '',\n {factory: () => !!inject(WA_GEOLOCATION)},\n);\n","import {inject, Injectable} from '@angular/core';\nimport {finalize, Observable, shareReplay} from 'rxjs';\n\nimport {WA_GEOLOCATION} from '../tokens/geolocation';\nimport {WA_POSITION_OPTIONS} from '../tokens/geolocation-options';\nimport {WA_GEOLOCATION_SUPPORT} from '../tokens/geolocation-support';\n\n@Injectable({providedIn: 'root'})\nexport class WaGeolocationService extends Observable<GeolocationPosition> {\n constructor() {\n const geolocationRef = inject(WA_GEOLOCATION);\n const geolocationSupported = inject(WA_GEOLOCATION_SUPPORT);\n const positionOptions = inject(WA_POSITION_OPTIONS);\n\n let watchPositionId = 0;\n\n super((subscriber) => {\n if (!geolocationSupported) {\n subscriber.error('Geolocation is not supported in your browser');\n }\n\n watchPositionId = geolocationRef.watchPosition(\n (position) => subscriber.next(position),\n (positionError) => subscriber.error(positionError),\n positionOptions,\n );\n });\n\n return this.pipe(\n finalize(() => geolocationRef.clearWatch(watchPositionId)),\n shareReplay({bufferSize: 1, refCount: true}),\n ) as WaGeolocationService;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGO,MAAM,cAAc,GAAG,IAAI,cAAc,CAC5C,SAAS,GAAG,kBAAkB,GAAG,EAAE,EACnC,EAAC,OAAO,EAAE,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC,WAAW,EAAC;;ACH9C,MAAM,mBAAmB,GAAG,IAAI,cAAc,CACjD,SAAS,GAAG,uBAAuB,GAAG,EAAE,EACxC,EAAC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAC;;ACAlB,MAAM,sBAAsB,GAAG,IAAI,cAA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A,CAAA;kBADhC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;;ACPhC;;AAEG;;;;"} | ||
| {"version":3,"file":"ng-web-apis-geolocation.mjs","sources":["../../../libs/geolocation/src/tokens/geolocation.ts","../../../libs/geolocation/src/tokens/geolocation-options.ts","../../../libs/geolocation/src/tokens/geolocation-support.ts","../../../libs/geolocation/src/services/geolocation.service.ts","../../../libs/geolocation/src/ng-web-apis-geolocation.ts"],"sourcesContent":["import {inject, InjectionToken} from '@angular/core';\nimport {WA_NAVIGATOR} from '@ng-web-apis/common';\n\nexport const WA_GEOLOCATION = new InjectionToken<Geolocation>(\n ngDevMode ? '[WA_GEOLOCATION]' : '',\n {factory: () => inject(WA_NAVIGATOR).geolocation},\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const WA_POSITION_OPTIONS = new InjectionToken<PositionOptions>(\n ngDevMode ? '[WA_POSITION_OPTIONS]' : '',\n {factory: () => ({})},\n);\n","import {inject, InjectionToken} from '@angular/core';\n\nimport {WA_GEOLOCATION} from './geolocation';\n\nexport const WA_GEOLOCATION_SUPPORT = new InjectionToken<boolean>(\n ngDevMode ? '[WA_GEOLOCATION_SUPPORT]' : '',\n {factory: () => !!inject(WA_GEOLOCATION)},\n);\n","import {inject, Injectable} from '@angular/core';\nimport {finalize, Observable, shareReplay} from 'rxjs';\n\nimport {WA_GEOLOCATION} from '../tokens/geolocation';\nimport {WA_POSITION_OPTIONS} from '../tokens/geolocation-options';\nimport {WA_GEOLOCATION_SUPPORT} from '../tokens/geolocation-support';\n\n@Injectable({providedIn: 'root'})\nexport class WaGeolocationService extends Observable<GeolocationPosition> {\n constructor() {\n const geolocationRef = inject(WA_GEOLOCATION);\n const geolocationSupported = inject(WA_GEOLOCATION_SUPPORT);\n const positionOptions = inject(WA_POSITION_OPTIONS);\n let watchPositionId = 0;\n\n super((subscriber) => {\n if (!geolocationSupported) {\n subscriber.error('Geolocation is not supported in your browser');\n }\n\n watchPositionId = geolocationRef.watchPosition(\n (position) => subscriber.next(position),\n (positionError) => subscriber.error(positionError),\n positionOptions,\n );\n });\n\n return this.pipe(\n finalize(() => geolocationRef.clearWatch(watchPositionId)),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGO,MAAM,cAAc,GAAG,IAAI,cAAc,CAC5C,SAAS,GAAG,kBAAkB,GAAG,EAAE,EACnC,EAAC,OAAO,EAAE,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC,WAAW,EAAC;;ACH9C,MAAM,mBAAmB,GAAG,IAAI,cAAc,CACjD,SAAS,GAAG,uBAAuB,GAAG,EAAE,EACxC,EAAC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAC;;ACAlB,MAAM,sBAAsB,GAAG,IAAI,cAAc,CACpD,SAAS,GAAG,0BAA0B,GAAG,EAAE,EAC3C,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,EAAC;;ACEvC,MAAO,oBAAqB,SAAQ,UAA+B,CAAA;AACrE,IAAA,WAAA,GAAA;AACI,QAAA,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAC7C,QAAA,MAAM,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAC3D,QAAA,MAAM,eAAe,GAAG,MAAM,CAAC,mBAAmB,CAAC;QACnD,IAAI,eAAe,GAAG,CAAC;AAEvB,QAAA,KAAK,CAAC,CAAC,UAAU,KAAI;YACjB,IAAI,CAAC,oBAAoB,EAAE;AACvB,gBAAA,UAAU,CAAC,KAAK,CAAC,8CAA8C,CAAC;YACpE;AAEA,YAAA,eAAe,GAAG,cAAc,CAAC,aAAa,CAC1C,CAAC,QAAQ,KAAK,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,EACvC,CAAC,aAAa,KAAK,UAAU,CAAC,KAAK,CAAC,aAAa,CAAC,EAClD,eAAe,CAClB;AACL,QAAA,CAAC,CAAC;AAEF,QAAA,OAAO,IAAI,CAAC,IAAI,CACZ,QAAQ,CAAC,MAAM,cAAc,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,EAC1D,WAAW,CAAC,EAAC,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC,CAC/C;IACL;wGAvBS,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAApB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cADR,MAAM,EAAA,CAAA;;4FAClB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;;ACPhC;;AAEG;;;;"} |
+17
-4
@@ -1,4 +0,17 @@ | ||
| export * from './services/geolocation.service'; | ||
| export * from './tokens/geolocation'; | ||
| export * from './tokens/geolocation-options'; | ||
| export * from './tokens/geolocation-support'; | ||
| import { Observable } from 'rxjs'; | ||
| import * as i0 from '@angular/core'; | ||
| import { InjectionToken } from '@angular/core'; | ||
| declare class WaGeolocationService extends Observable<GeolocationPosition> { | ||
| constructor(); | ||
| static ɵfac: i0.ɵɵFactoryDeclaration<WaGeolocationService, never>; | ||
| static ɵprov: i0.ɵɵInjectableDeclaration<WaGeolocationService>; | ||
| } | ||
| declare const WA_GEOLOCATION: InjectionToken<Geolocation>; | ||
| declare const WA_POSITION_OPTIONS: InjectionToken<PositionOptions>; | ||
| declare const WA_GEOLOCATION_SUPPORT: InjectionToken<boolean>; | ||
| export { WA_GEOLOCATION, WA_GEOLOCATION_SUPPORT, WA_POSITION_OPTIONS, WaGeolocationService }; |
+8
-8
| { | ||
| "name": "@ng-web-apis/geolocation", | ||
| "version": "5.2.0", | ||
| "version": "5.3.0", | ||
| "description": "This is a library for declarative use of Geolocation API with Angular", | ||
@@ -21,13 +21,13 @@ "keywords": [ | ||
| "author": { | ||
| "name": "Vladimir Potekhin", | ||
| "email": "vladimir.potekh@gmail.com" | ||
| "email": "vladimir.potekh@gmail.com", | ||
| "name": "Vladimir Potekhin" | ||
| }, | ||
| "contributors": [ | ||
| { | ||
| "name": "Roman Sedov", | ||
| "email": "79601794011@ya.ru" | ||
| "email": "79601794011@ya.ru", | ||
| "name": "Roman Sedov" | ||
| }, | ||
| { | ||
| "name": "Alexander Inkin", | ||
| "email": "alexander@inkin.ru" | ||
| "email": "alexander@inkin.ru", | ||
| "name": "Alexander Inkin" | ||
| } | ||
@@ -41,3 +41,3 @@ ], | ||
| "@angular/core": ">=19.0.0", | ||
| "@ng-web-apis/common": "^5.2.0" | ||
| "@ng-web-apis/common": "^5.3.0" | ||
| }, | ||
@@ -44,0 +44,0 @@ "publishConfig": { |
| import { Observable } from 'rxjs'; | ||
| import * as i0 from "@angular/core"; | ||
| export declare class WaGeolocationService extends Observable<GeolocationPosition> { | ||
| constructor(); | ||
| static ɵfac: i0.ɵɵFactoryDeclaration<WaGeolocationService, never>; | ||
| static ɵprov: i0.ɵɵInjectableDeclaration<WaGeolocationService>; | ||
| } |
| import { InjectionToken } from '@angular/core'; | ||
| export declare const WA_POSITION_OPTIONS: InjectionToken<PositionOptions>; |
| import { InjectionToken } from '@angular/core'; | ||
| export declare const WA_GEOLOCATION_SUPPORT: InjectionToken<boolean>; |
| import { InjectionToken } from '@angular/core'; | ||
| export declare const WA_GEOLOCATION: InjectionToken<Geolocation>; |
28285
-0.81%7
-36.36%45
-10%