novo-elements 13.1.0-next.2 → 13.1.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,9 +15,9 @@ declare class GooglePlacesService {
|
|
|
15
15
|
private _global;
|
|
16
16
|
private _localStorageService;
|
|
17
17
|
constructor(_http: HttpClient, platformId: Object, _global: GlobalRef, _localStorageService: LocalStorageService);
|
|
18
|
-
getPredictions(url: string, query: string): Promise<any>;
|
|
18
|
+
getPredictions(url: string, query: string, sessionToken?: string): Promise<any>;
|
|
19
19
|
getLatLngDetail(url: string, lat: number, lng: number): Promise<any>;
|
|
20
|
-
getPlaceDetails(url: string, placeId: string): Promise<any>;
|
|
20
|
+
getPlaceDetails(url: string, placeId: string, sessionToken?: string): Promise<any>;
|
|
21
21
|
getGeoCurrentLocation(): Promise<any>;
|
|
22
22
|
getGeoLatLngDetail(latlng: any): Promise<any>;
|
|
23
23
|
getGeoPrediction(params: any): Promise<any>;
|
|
@@ -72,6 +72,7 @@ declare class PlacesListComponent extends BasePickerResults implements OnInit, O
|
|
|
72
72
|
private _global;
|
|
73
73
|
private _googlePlacesService;
|
|
74
74
|
private cdr;
|
|
75
|
+
private static readonly SESSION_TOKEN_TIMEOUT_MS;
|
|
75
76
|
userSettings: PlacesSettings;
|
|
76
77
|
termChange: EventEmitter<any>;
|
|
77
78
|
select: EventEmitter<any>;
|
|
@@ -87,6 +88,8 @@ declare class PlacesListComponent extends BasePickerResults implements OnInit, O
|
|
|
87
88
|
private selectedDataIndex;
|
|
88
89
|
private recentSearchData;
|
|
89
90
|
private userSelectedOption;
|
|
91
|
+
private sessionToken;
|
|
92
|
+
private sessionTokenStartedAt;
|
|
90
93
|
private defaultSettings;
|
|
91
94
|
model: any;
|
|
92
95
|
onModelChange: Function;
|
|
@@ -105,10 +108,16 @@ declare class PlacesListComponent extends BasePickerResults implements OnInit, O
|
|
|
105
108
|
closeAutocomplete(event: any): any;
|
|
106
109
|
userQuerySubmit(selectedOption?: any): any;
|
|
107
110
|
currentLocationSelected(): any;
|
|
111
|
+
normalizePrediction(raw: any): AddressLookupPrediction;
|
|
112
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
113
|
+
search(term: any, mode?: any): Observable<any>;
|
|
108
114
|
private moduleInit;
|
|
109
115
|
private processSearchQuery;
|
|
110
116
|
private setUserSettings;
|
|
111
117
|
private getListQuery;
|
|
118
|
+
private ensureSessionToken;
|
|
119
|
+
private generateSessionToken;
|
|
120
|
+
private clearSessionToken;
|
|
112
121
|
private extractServerList;
|
|
113
122
|
private updateListItem;
|
|
114
123
|
private showRecentSearch;
|
|
@@ -116,9 +125,6 @@ declare class PlacesListComponent extends BasePickerResults implements OnInit, O
|
|
|
116
125
|
private getPlaceLocationInfo;
|
|
117
126
|
private setRecentLocation;
|
|
118
127
|
private getRecentLocations;
|
|
119
|
-
normalizePrediction(raw: any): AddressLookupPrediction;
|
|
120
|
-
onKeyDown(event: KeyboardEvent): void;
|
|
121
|
-
search(term: any, mode?: any): Observable<any>;
|
|
122
128
|
static ɵfac: i0.ɵɵFactoryDeclaration<PlacesListComponent, never>;
|
|
123
129
|
static ɵcmp: i0.ɵɵComponentDeclaration<PlacesListComponent, "google-places-list", never, { "userSettings": { "alias": "userSettings"; "required": false; }; }, { "termChange": "termChange"; "select": "select"; "matchesUpdated": "matchesUpdated"; }, never, never, false, never>;
|
|
124
130
|
}
|
|
@@ -5,7 +5,7 @@ import { PLATFORM_ID, Inject, Injectable, forwardRef, EventEmitter, Output, Inpu
|
|
|
5
5
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
6
6
|
import { BasePickerResults } from 'novo-elements/elements/picker';
|
|
7
7
|
import * as i2 from 'novo-elements/services';
|
|
8
|
-
import {
|
|
8
|
+
import { NEVER } from 'rxjs';
|
|
9
9
|
import * as i1 from '@angular/common/http';
|
|
10
10
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
11
11
|
import * as i4 from 'novo-elements/elements/list';
|
|
@@ -18,10 +18,11 @@ class GooglePlacesService {
|
|
|
18
18
|
this._global = _global;
|
|
19
19
|
this._localStorageService = _localStorageService;
|
|
20
20
|
}
|
|
21
|
-
getPredictions(url, query) {
|
|
21
|
+
getPredictions(url, query, sessionToken) {
|
|
22
22
|
return new Promise((resolve) => {
|
|
23
23
|
const separator = url.includes('?') ? '&' : '?';
|
|
24
|
-
|
|
24
|
+
const sessionParam = sessionToken ? '&sessionToken=' + sessionToken : '';
|
|
25
|
+
this._http.get(url + separator + 'query=' + query + sessionParam).subscribe((data) => {
|
|
25
26
|
if (data) {
|
|
26
27
|
resolve(data);
|
|
27
28
|
}
|
|
@@ -44,10 +45,11 @@ class GooglePlacesService {
|
|
|
44
45
|
});
|
|
45
46
|
});
|
|
46
47
|
}
|
|
47
|
-
getPlaceDetails(url, placeId) {
|
|
48
|
+
getPlaceDetails(url, placeId, sessionToken) {
|
|
48
49
|
return new Promise((resolve) => {
|
|
49
50
|
const separator = url.includes('?') ? '&' : '?';
|
|
50
|
-
|
|
51
|
+
const sessionParam = sessionToken ? '&sessionToken=' + sessionToken : '';
|
|
52
|
+
this._http.get(url + separator + 'query=' + placeId + sessionParam).subscribe((data) => {
|
|
51
53
|
if (data) {
|
|
52
54
|
resolve(data);
|
|
53
55
|
}
|
|
@@ -241,7 +243,7 @@ class GooglePlacesService {
|
|
|
241
243
|
geocoder.geocode({ location: placeDetail.geometry.location }, (results, status) => {
|
|
242
244
|
if (status === 'OK' && results.length) {
|
|
243
245
|
resolve(results.reduce((postalCodes, result) => {
|
|
244
|
-
const postalCodeComponent = result.address_components.find(item => item.types.includes('postal_code'));
|
|
246
|
+
const postalCodeComponent = result.address_components.find((item) => item.types.includes('postal_code'));
|
|
245
247
|
if (postalCodeComponent && !postalCodes.includes(postalCodeComponent.long_name)) {
|
|
246
248
|
postalCodes.push(postalCodeComponent.long_name);
|
|
247
249
|
}
|
|
@@ -288,6 +290,7 @@ const PLACES_VALUE_ACCESSOR = {
|
|
|
288
290
|
multi: true,
|
|
289
291
|
};
|
|
290
292
|
class PlacesListComponent extends BasePickerResults {
|
|
293
|
+
static { this.SESSION_TOKEN_TIMEOUT_MS = 3 * 60 * 1000; }
|
|
291
294
|
constructor(platformId, _elmRef, _global, _googlePlacesService, cdr) {
|
|
292
295
|
super(_elmRef, cdr);
|
|
293
296
|
this.platformId = platformId;
|
|
@@ -309,6 +312,8 @@ class PlacesListComponent extends BasePickerResults {
|
|
|
309
312
|
this.selectedDataIndex = -1;
|
|
310
313
|
this.recentSearchData = [];
|
|
311
314
|
this.userSelectedOption = '';
|
|
315
|
+
this.sessionToken = '';
|
|
316
|
+
this.sessionTokenStartedAt = 0;
|
|
312
317
|
this.defaultSettings = {
|
|
313
318
|
geoPredictionServerUrl: '',
|
|
314
319
|
geoLatLangServiceUrl: '',
|
|
@@ -369,6 +374,7 @@ class PlacesListComponent extends BasePickerResults {
|
|
|
369
374
|
}
|
|
370
375
|
else {
|
|
371
376
|
this.matches = [];
|
|
377
|
+
this.clearSessionToken();
|
|
372
378
|
if (this.userSelectedOption) {
|
|
373
379
|
this.userQuerySubmit('false');
|
|
374
380
|
}
|
|
@@ -440,6 +446,40 @@ class PlacesListComponent extends BasePickerResults {
|
|
|
440
446
|
});
|
|
441
447
|
}
|
|
442
448
|
}
|
|
449
|
+
// Fold a raw Google/REST/recent record into the internal AddressLookupPrediction shape.
|
|
450
|
+
normalizePrediction(raw) {
|
|
451
|
+
return {
|
|
452
|
+
placeId: raw?.placeId || raw?.place_id,
|
|
453
|
+
primaryText: raw?.primaryText || raw?.structured_formatting?.main_text || raw?.displayAddress || raw?.description || '',
|
|
454
|
+
secondaryText: raw?.secondaryText || raw?.structured_formatting?.secondary_text || '',
|
|
455
|
+
displayAddress: raw?.displayAddress || raw?.description,
|
|
456
|
+
types: raw?.types,
|
|
457
|
+
raw,
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
onKeyDown(event) {
|
|
461
|
+
if (this.dropdownOpen) {
|
|
462
|
+
if (event.key === "ArrowUp" /* Key.ArrowUp */) {
|
|
463
|
+
this.prevActiveMatch();
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
if (event.key === "ArrowDown" /* Key.ArrowDown */) {
|
|
467
|
+
this.nextActiveMatch();
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
if (event.key === "Enter" /* Key.Enter */) {
|
|
471
|
+
// Only select when a prediction is highlighted.
|
|
472
|
+
if (this.activeMatch) {
|
|
473
|
+
this.selectMatch(this.activeMatch);
|
|
474
|
+
}
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
search(term, mode) {
|
|
480
|
+
// Disable the base search term functionality here since it is handled by the places picker separately
|
|
481
|
+
return NEVER;
|
|
482
|
+
}
|
|
443
483
|
// module initialization happens. function called by ngOninit and ngOnChange
|
|
444
484
|
moduleInit() {
|
|
445
485
|
this.settings = this.setUserSettings();
|
|
@@ -520,12 +560,41 @@ class PlacesListComponent extends BasePickerResults {
|
|
|
520
560
|
});
|
|
521
561
|
}
|
|
522
562
|
else {
|
|
523
|
-
this._googlePlacesService.getPredictions(this.settings.geoPredictionServerUrl, value).then((result) => {
|
|
563
|
+
this._googlePlacesService.getPredictions(this.settings.geoPredictionServerUrl, value, this.ensureSessionToken()).then((result) => {
|
|
524
564
|
result = this.extractServerList(this.settings.serverResponseListHierarchy, result);
|
|
525
565
|
this.updateListItem(result);
|
|
526
566
|
});
|
|
527
567
|
}
|
|
528
568
|
}
|
|
569
|
+
// Returns the active billing-session token for prediction calls, minting a fresh UUID v4 when
|
|
570
|
+
// none exists or the previous one has gone stale (~3 min of inactivity). Each call refreshes the
|
|
571
|
+
// inactivity window.
|
|
572
|
+
ensureSessionToken() {
|
|
573
|
+
const now = Date.now();
|
|
574
|
+
if (!this.sessionToken || now - this.sessionTokenStartedAt > PlacesListComponent.SESSION_TOKEN_TIMEOUT_MS) {
|
|
575
|
+
this.sessionToken = this.generateSessionToken();
|
|
576
|
+
}
|
|
577
|
+
this.sessionTokenStartedAt = now;
|
|
578
|
+
return this.sessionToken;
|
|
579
|
+
}
|
|
580
|
+
// Mints a v4 UUID for the Google Places billing session. Prefers the built-in crypto.randomUUID(),
|
|
581
|
+
// which exists only in secure contexts (HTTPS / localhost). Falls back to a locally generated UUID for
|
|
582
|
+
// insecure-context local development (e.g. localhost development); the token only needs to be a unique
|
|
583
|
+
// opaque string, so Math.random() is acceptable there.
|
|
584
|
+
generateSessionToken() {
|
|
585
|
+
if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {
|
|
586
|
+
return crypto.randomUUID();
|
|
587
|
+
}
|
|
588
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (char) => {
|
|
589
|
+
const random = (Math.random() * 16) | 0;
|
|
590
|
+
const value = char === 'x' ? random : (random & 0x3) | 0x8;
|
|
591
|
+
return value.toString(16);
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
clearSessionToken() {
|
|
595
|
+
this.sessionToken = '';
|
|
596
|
+
this.sessionTokenStartedAt = 0;
|
|
597
|
+
}
|
|
529
598
|
// function to extratc custom data which is send by the server.
|
|
530
599
|
extractServerList(arrayList, data) {
|
|
531
600
|
if (arrayList.length) {
|
|
@@ -577,28 +646,33 @@ class PlacesListComponent extends BasePickerResults {
|
|
|
577
646
|
}
|
|
578
647
|
}
|
|
579
648
|
// function to retrieve the location info based on google place id.
|
|
580
|
-
getPlaceLocationInfo(selectedData) {
|
|
649
|
+
async getPlaceLocationInfo(selectedData) {
|
|
581
650
|
const placeId = selectedData.placeId;
|
|
582
651
|
if (this.settings.useGoogleGeoApi) {
|
|
583
|
-
this._googlePlacesService.getGeoPlaceDetail(placeId)
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
});
|
|
652
|
+
const data = await this._googlePlacesService.getGeoPlaceDetail(placeId);
|
|
653
|
+
if (data) {
|
|
654
|
+
this.setRecentLocation(data);
|
|
655
|
+
}
|
|
588
656
|
}
|
|
589
657
|
else {
|
|
590
|
-
|
|
658
|
+
try {
|
|
659
|
+
let result = await this._googlePlacesService.getPlaceDetails(this.settings.geoLocDetailServerUrl, placeId, this.sessionToken);
|
|
591
660
|
if (result) {
|
|
592
661
|
result = this.extractServerList(this.settings.serverResponseDetailHierarchy, result);
|
|
593
662
|
this.setRecentLocation(result);
|
|
594
663
|
}
|
|
595
|
-
}
|
|
664
|
+
}
|
|
665
|
+
finally {
|
|
666
|
+
// The details call ends the Google billing session; clear the token even if the request
|
|
667
|
+
// failed so the next interaction starts a fresh session.
|
|
668
|
+
this.clearSessionToken();
|
|
669
|
+
}
|
|
596
670
|
}
|
|
597
671
|
}
|
|
598
672
|
// function to store the selected user search in the localstorage.
|
|
599
673
|
setRecentLocation(data) {
|
|
600
674
|
data = JSON.parse(JSON.stringify(data));
|
|
601
|
-
data.description = data.description ? data.description :
|
|
675
|
+
data.description = data.description ? data.description : data.formattedAddress || data.formatted_address;
|
|
602
676
|
data.active = false;
|
|
603
677
|
this.selectedDataIndex = -1;
|
|
604
678
|
this.locationInput = data.description;
|
|
@@ -619,66 +693,12 @@ class PlacesListComponent extends BasePickerResults {
|
|
|
619
693
|
this.recentSearchData = data && data.length ? data : [];
|
|
620
694
|
});
|
|
621
695
|
}
|
|
622
|
-
// Fold a raw Google/REST/recent record into the internal AddressLookupPrediction shape.
|
|
623
|
-
normalizePrediction(raw) {
|
|
624
|
-
return {
|
|
625
|
-
placeId: raw?.placeId || raw?.place_id,
|
|
626
|
-
primaryText: raw?.primaryText || raw?.structured_formatting?.main_text || raw?.displayAddress || raw?.description || '',
|
|
627
|
-
secondaryText: raw?.secondaryText || raw?.structured_formatting?.secondary_text || '',
|
|
628
|
-
displayAddress: raw?.displayAddress || raw?.description,
|
|
629
|
-
types: raw?.types,
|
|
630
|
-
raw,
|
|
631
|
-
};
|
|
632
|
-
}
|
|
633
|
-
onKeyDown(event) {
|
|
634
|
-
if (this.dropdownOpen) {
|
|
635
|
-
if (event.key === "ArrowUp" /* Key.ArrowUp */) {
|
|
636
|
-
this.prevActiveMatch();
|
|
637
|
-
return;
|
|
638
|
-
}
|
|
639
|
-
if (event.key === "ArrowDown" /* Key.ArrowDown */) {
|
|
640
|
-
this.nextActiveMatch();
|
|
641
|
-
return;
|
|
642
|
-
}
|
|
643
|
-
if (event.key === "Enter" /* Key.Enter */) {
|
|
644
|
-
// Only select when a prediction is highlighted.
|
|
645
|
-
if (this.activeMatch) {
|
|
646
|
-
this.selectMatch(this.activeMatch);
|
|
647
|
-
}
|
|
648
|
-
return;
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
search(term, mode) {
|
|
653
|
-
// Disable the base search term functionality here since it is handled by the places picker separately
|
|
654
|
-
return new Observable();
|
|
655
|
-
}
|
|
656
696
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PlacesListComponent, deps: [{ token: PLATFORM_ID }, { token: i0.ElementRef }, { token: i2.GlobalRef }, { token: GooglePlacesService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
657
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
658
|
-
<novo-list direction="vertical">
|
|
659
|
-
<novo-list-item *ngFor="let data of matches; let $index = index" (click)="selectedListNode($event, $index)" [ngClass]="{ active: data === activeMatch }">
|
|
660
|
-
<item-header>
|
|
661
|
-
<item-avatar icon="location"></item-avatar>
|
|
662
|
-
<item-title>{{ data.primaryText }}</item-title>
|
|
663
|
-
</item-header>
|
|
664
|
-
<item-content>{{ data.secondaryText }}</item-content>
|
|
665
|
-
</novo-list-item>
|
|
666
|
-
</novo-list>
|
|
667
|
-
`, isInline: true, styles: [":host{display:grid}:host novo-list{border:1px solid #4a89dc;background-color:#fff}:host novo-list novo-list-item{cursor:pointer;flex:0 0;transition:background-color .25s}:host novo-list novo-list-item>div{width:100%}:host novo-list novo-list-item.active{background-color:#e0ebf9}:host novo-list novo-list-item:hover{background-color:#f1f6fc}:host novo-list novo-list-item item-content{flex-flow:row wrap}:host novo-list novo-list-item item-content>*{flex:0 0 33%;white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i4.NovoListElement, selector: "novo-list", inputs: ["theme", "direction"] }, { kind: "component", type: i4.NovoListItemElement, selector: "novo-list-item, a[list-item], button[list-item]" }, { kind: "component", type: i4.NovoItemAvatarElement, selector: "item-avatar, novo-item-avatar", inputs: ["icon", "color"] }, { kind: "component", type: i4.NovoItemTitleElement, selector: "item-title, novo-item-title" }, { kind: "component", type: i4.NovoItemHeaderElement, selector: "item-header, novo-item-header" }, { kind: "component", type: i4.NovoItemContentElement, selector: "item-content, novo-item-content", inputs: ["direction"] }] }); }
|
|
697
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: PlacesListComponent, isStandalone: false, selector: "google-places-list", inputs: { userSettings: "userSettings" }, outputs: { termChange: "termChange", select: "select", matchesUpdated: "matchesUpdated" }, providers: [PLACES_VALUE_ACCESSOR], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<novo-list direction=\"vertical\">\n @for (data of matches; track $index) {\n <novo-list-item (click)=\"selectedListNode($event, $index)\" [ngClass]=\"{ active: data === activeMatch }\">\n <item-header>\n <item-avatar icon=\"location\"></item-avatar>\n <item-title>{{ data.primaryText }}</item-title>\n </item-header>\n <item-content>{{ data.secondaryText }}</item-content>\n </novo-list-item>\n }\n</novo-list>\n", styles: [":host{display:grid}:host novo-list{border:1px solid #4a89dc;background-color:#fff}:host novo-list novo-list-item{cursor:pointer;flex:0 0;transition:background-color .25s}:host novo-list novo-list-item>div{width:100%}:host novo-list novo-list-item.active{background-color:#e0ebf9}:host novo-list novo-list-item:hover{background-color:#f1f6fc}:host novo-list novo-list-item item-content{flex-flow:row wrap}:host novo-list novo-list-item item-content>*{flex:0 0 33%;white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i4.NovoListElement, selector: "novo-list", inputs: ["theme", "direction"] }, { kind: "component", type: i4.NovoListItemElement, selector: "novo-list-item, a[list-item], button[list-item]" }, { kind: "component", type: i4.NovoItemAvatarElement, selector: "item-avatar, novo-item-avatar", inputs: ["icon", "color"] }, { kind: "component", type: i4.NovoItemTitleElement, selector: "item-title, novo-item-title" }, { kind: "component", type: i4.NovoItemHeaderElement, selector: "item-header, novo-item-header" }, { kind: "component", type: i4.NovoItemContentElement, selector: "item-content, novo-item-content", inputs: ["direction"] }] }); }
|
|
668
698
|
}
|
|
669
699
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PlacesListComponent, decorators: [{
|
|
670
700
|
type: Component,
|
|
671
|
-
args: [{ selector: 'google-places-list', providers: [PLACES_VALUE_ACCESSOR], template:
|
|
672
|
-
<novo-list direction="vertical">
|
|
673
|
-
<novo-list-item *ngFor="let data of matches; let $index = index" (click)="selectedListNode($event, $index)" [ngClass]="{ active: data === activeMatch }">
|
|
674
|
-
<item-header>
|
|
675
|
-
<item-avatar icon="location"></item-avatar>
|
|
676
|
-
<item-title>{{ data.primaryText }}</item-title>
|
|
677
|
-
</item-header>
|
|
678
|
-
<item-content>{{ data.secondaryText }}</item-content>
|
|
679
|
-
</novo-list-item>
|
|
680
|
-
</novo-list>
|
|
681
|
-
`, standalone: false, styles: [":host{display:grid}:host novo-list{border:1px solid #4a89dc;background-color:#fff}:host novo-list novo-list-item{cursor:pointer;flex:0 0;transition:background-color .25s}:host novo-list novo-list-item>div{width:100%}:host novo-list novo-list-item.active{background-color:#e0ebf9}:host novo-list novo-list-item:hover{background-color:#f1f6fc}:host novo-list novo-list-item item-content{flex-flow:row wrap}:host novo-list novo-list-item item-content>*{flex:0 0 33%;white-space:nowrap}\n"] }]
|
|
701
|
+
args: [{ selector: 'google-places-list', providers: [PLACES_VALUE_ACCESSOR], standalone: false, template: "<novo-list direction=\"vertical\">\n @for (data of matches; track $index) {\n <novo-list-item (click)=\"selectedListNode($event, $index)\" [ngClass]=\"{ active: data === activeMatch }\">\n <item-header>\n <item-avatar icon=\"location\"></item-avatar>\n <item-title>{{ data.primaryText }}</item-title>\n </item-header>\n <item-content>{{ data.secondaryText }}</item-content>\n </novo-list-item>\n }\n</novo-list>\n", styles: [":host{display:grid}:host novo-list{border:1px solid #4a89dc;background-color:#fff}:host novo-list novo-list-item{cursor:pointer;flex:0 0;transition:background-color .25s}:host novo-list novo-list-item>div{width:100%}:host novo-list novo-list-item.active{background-color:#e0ebf9}:host novo-list novo-list-item:hover{background-color:#f1f6fc}:host novo-list novo-list-item item-content{flex-flow:row wrap}:host novo-list novo-list-item item-content>*{flex:0 0 33%;white-space:nowrap}\n"] }]
|
|
682
702
|
}], ctorParameters: () => [{ type: Object, decorators: [{
|
|
683
703
|
type: Inject,
|
|
684
704
|
args: [PLATFORM_ID]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"novo-elements-elements-places.mjs","sources":["../../../projects/novo-elements/src/elements/places/places.service.ts","../../../projects/novo-elements/src/elements/places/places.component.ts","../../../projects/novo-elements/src/elements/places/places.module.ts","../../../projects/novo-elements/src/elements/places/places.tokens.ts","../../../projects/novo-elements/src/elements/places/novo-elements-elements-places.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { HttpClient } from '@angular/common/http';\nimport { Inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { GlobalRef, LocalStorageService } from 'novo-elements/services';\n\n@Injectable()\nexport class GooglePlacesService {\n constructor(\n private _http: HttpClient,\n @Inject(PLATFORM_ID) private platformId: Object,\n private _global: GlobalRef,\n private _localStorageService: LocalStorageService,\n ) {}\n\n getPredictions(url: string, query: string): Promise<any> {\n return new Promise((resolve) => {\n const separator = url.includes('?') ? '&' : '?';\n this._http.get(url + separator + 'query=' + query).subscribe((data: any) => {\n if (data) {\n resolve(data);\n } else {\n resolve(false);\n }\n });\n });\n }\n\n getLatLngDetail(url: string, lat: number, lng: number): Promise<any> {\n return new Promise((resolve) => {\n const separator = url.includes('?') ? '&' : '?';\n this._http.get(url + separator + 'lat=' + lat + '&lng=' + lng).subscribe((data: any) => {\n if (data) {\n resolve(data);\n } else {\n resolve(false);\n }\n });\n });\n }\n\n getPlaceDetails(url: string, placeId: string): Promise<any> {\n return new Promise((resolve) => {\n const separator = url.includes('?') ? '&' : '?';\n this._http.get(url + separator + 'query=' + placeId).subscribe((data: any) => {\n if (data) {\n resolve(data);\n } else {\n resolve(false);\n }\n });\n });\n }\n\n getGeoCurrentLocation(): Promise<any> {\n return new Promise((resolve) => {\n if (isPlatformBrowser(this.platformId)) {\n const _window: any = this._global.nativeGlobal;\n if (_window.navigator.geolocation) {\n _window.navigator.geolocation.getCurrentPosition((pos) => {\n const latlng: any = { lat: parseFloat(pos.coords.latitude + ''), lng: parseFloat(pos.coords.longitude + '') };\n resolve(latlng);\n });\n } else {\n resolve(false);\n }\n } else {\n resolve(false);\n }\n });\n }\n\n getGeoLatLngDetail(latlng: any): Promise<any> {\n return new Promise((resolve) => {\n if (isPlatformBrowser(this.platformId)) {\n const _window: any = this._global.nativeGlobal;\n const geocoder: any = new _window.google.maps.Geocoder();\n geocoder.geocode({ location: latlng }, (results, status) => {\n if (status === 'OK') {\n this.getGeoPlaceDetail(results[0].place_id).then((result) => {\n if (result) {\n resolve(result);\n } else {\n resolve(false);\n }\n });\n } else {\n resolve(false);\n }\n });\n } else {\n resolve(false);\n }\n });\n }\n\n getGeoPrediction(params: any): Promise<any> {\n return new Promise((resolve) => {\n if (isPlatformBrowser(this.platformId)) {\n const _window: any = this._global.nativeGlobal;\n const placesService: any = new _window.google.maps.places.AutocompleteService();\n let queryInput: any = {};\n const promiseArr: any = [];\n if (params.countryRestriction.length) {\n queryInput = {\n input: params.query,\n componentRestrictions: { country: params.countryRestriction },\n };\n } else {\n queryInput = {\n input: params.query,\n };\n }\n if (params.geoLocation) {\n queryInput.location = new _window.google.maps.LatLng(parseFloat(params.geoLocation[0]), parseFloat(params.geoLocation[1]));\n queryInput.radius = params.radius;\n }\n if (params.geoTypes.length) {\n for (let i: number = 0; i < params.geoTypes.length; i++) {\n const _tempQuery: any = queryInput;\n _tempQuery.types = new Array(params.geoTypes[i]);\n promiseArr.push(this.geoPredictionCall(placesService, _tempQuery));\n }\n } else {\n promiseArr.push(this.geoPredictionCall(placesService, queryInput));\n }\n\n Promise.all(promiseArr).then((values) => {\n const val: any = values;\n if (val.length > 1) {\n let _tempArr: any = [];\n for (let j: number = 0; j < val.length; j++) {\n if (val[j] && val[j].length) {\n _tempArr = _tempArr.concat(val[j]);\n }\n }\n _tempArr = this.getUniqueResults(_tempArr);\n resolve(_tempArr);\n } else {\n resolve(values[0]);\n }\n });\n } else {\n resolve(false);\n }\n });\n }\n\n async getGeoPlaceDetail(placeId: string): Promise<any> {\n const placeDetail: any = await new Promise((resolve) => {\n if (isPlatformBrowser(this.platformId)) {\n const _window: any = this._global.nativeGlobal;\n const placesService: any = new _window.google.maps.places.PlacesService(document.createElement('div'));\n placesService.getDetails({ placeId }, (result: any) => {\n if (result === null || result.length === 0) {\n this.getGeoPaceDetailByReferance(result.referance).then((referanceData: any) => {\n if (!referanceData) {\n resolve(false);\n } else {\n resolve(referanceData);\n }\n });\n } else {\n resolve(result);\n }\n });\n } else {\n resolve(false);\n }\n });\n\n if (placeDetail?.types?.includes('locality')) {\n placeDetail.postal_codes = await this.getPostalCodes(placeDetail);\n }\n\n return placeDetail;\n }\n\n getGeoPaceDetailByReferance(referance: string): Promise<any> {\n return new Promise((resolve) => {\n if (isPlatformBrowser(this.platformId)) {\n const _window: any = this._global.nativeGlobal;\n const placesService: any = new _window.google.maps.places.PlacesService();\n placesService.getDetails({ reference: referance }, (result: any, status: any) => {\n if (status === _window.google.maps.places.PlacesServiceStatus.OK) {\n resolve(result);\n } else {\n resolve(false);\n }\n });\n } else {\n resolve(false);\n }\n });\n }\n\n addRecentList(localStorageName: string, result: any, itemSavedLength: number): any {\n this.getRecentList(localStorageName).then((data: any) => {\n if (data) {\n for (let i: number = 0; i < data.length; i++) {\n if (data[i].description === result.description) {\n data.splice(i, 1);\n break;\n }\n }\n data.unshift(result);\n if (data.length > itemSavedLength) {\n data.pop();\n }\n this._localStorageService.setItem(localStorageName, JSON.stringify(data));\n }\n });\n }\n\n getRecentList(localStorageName: string): Promise<any> {\n return new Promise((resolve) => {\n let value: any = this._localStorageService.getItem(localStorageName);\n if (value) {\n value = JSON.parse(value);\n } else {\n value = [];\n }\n resolve(value);\n });\n }\n\n getPostalCodes(placeDetail: any): Promise<string> {\n const _window: any = this._global.nativeGlobal;\n const geocoder: any = new _window.google.maps.Geocoder();\n return new Promise((resolve) => {\n geocoder.geocode({ location: placeDetail.geometry.location }, (results, status) => {\n if (status === 'OK' && results.length) {\n resolve(\n results.reduce(\n (postalCodes: string[], result: any) => {\n const postalCodeComponent = result.address_components.find(item => item.types.includes('postal_code'));\n if (postalCodeComponent && !postalCodes.includes(postalCodeComponent.long_name)) {\n postalCodes.push(postalCodeComponent.long_name);\n }\n return postalCodes;\n },\n [],\n ),\n );\n } else {\n resolve(null);\n }\n });\n });\n }\n\n private getUniqueResults(arr: any): any {\n return Array.from(arr.reduce((m, t) => m.set(t.place_id, t), new Map()).values());\n }\n\n private geoPredictionCall(placesService: any, queryInput: any): Promise<any> {\n const _window: any = this._global.nativeGlobal;\n return new Promise((resolve) => {\n placesService.getPlacePredictions(queryInput, (result: any, status: any) => {\n if (status === _window.google.maps.places.PlacesServiceStatus.OK) {\n resolve(result);\n } else {\n resolve(false);\n }\n });\n });\n }\n}\n","// NG2\nimport { isPlatformBrowser } from '@angular/common';\nimport { ChangeDetectorRef, Component, ElementRef, EventEmitter, forwardRef, Inject, Input, OnChanges, OnInit, Output, PLATFORM_ID } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BasePickerResults } from 'novo-elements/elements/picker';\nimport { GlobalRef } from 'novo-elements/services';\nimport { Key } from 'novo-elements/utils';\nimport { Observable } from 'rxjs';\nimport { GooglePlacesService } from './places.service';\n\nexport interface PlacesSettings {\n geoPredictionServerUrl?: string;\n geoLatLangServiceUrl?: string;\n geoLocDetailServerUrl?: string;\n geoCountryRestriction?: any;\n geoTypes?: any;\n geoLocation?: any;\n geoRadius?: number;\n serverResponseListHierarchy?: any;\n serverResponseatLangHierarchy?: any;\n serverResponseDetailHierarchy?: any;\n resOnSearchButtonClickOnly?: boolean;\n useGoogleGeoApi?: boolean;\n inputPlaceholderText?: string;\n inputString?: string;\n showSearchButton?: boolean;\n showRecentSearch?: boolean;\n showCurrentLocation?: boolean;\n recentStorageName?: string;\n noOfRecentSearchSave?: number;\n currentLocIconUrl?: string;\n searchIconUrl?: string;\n locationIconUrl?: string;\n}\n\n/** Normalized address prediction; raw provider records are mapped into this via normalizePrediction. */\nexport interface AddressLookupPrediction {\n placeId?: string;\n primaryText?: string;\n secondaryText?: string;\n displayAddress?: string;\n types?: string[];\n /** Original provider record, retained so recent-search selection re-emits full detail. */\n raw?: any;\n}\n\n// Value accessor for the component (supports ngModel)\nconst PLACES_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => PlacesListComponent),\n multi: true,\n};\n\n@Component({\n selector: 'google-places-list',\n providers: [PLACES_VALUE_ACCESSOR],\n template: `\n <novo-list direction=\"vertical\">\n <novo-list-item *ngFor=\"let data of matches; let $index = index\" (click)=\"selectedListNode($event, $index)\" [ngClass]=\"{ active: data === activeMatch }\">\n <item-header>\n <item-avatar icon=\"location\"></item-avatar>\n <item-title>{{ data.primaryText }}</item-title>\n </item-header>\n <item-content>{{ data.secondaryText }}</item-content>\n </novo-list-item>\n </novo-list>\n `,\n styleUrls: ['./places.component.scss'],\n standalone: false,\n})\nexport class PlacesListComponent extends BasePickerResults implements OnInit, OnChanges, ControlValueAccessor {\n @Input()\n userSettings: PlacesSettings;\n @Output()\n termChange: EventEmitter<any> = new EventEmitter<any>();\n @Output()\n select: EventEmitter<any> = new EventEmitter<any>();\n @Output()\n matchesUpdated: EventEmitter<AddressLookupPrediction[]> = new EventEmitter<AddressLookupPrediction[]>();\n\n public locationInput: string = '';\n public gettingCurrentLocationFlag: boolean = false;\n public dropdownOpen: boolean = false;\n public recentDropdownOpen: boolean = false;\n public isSettingsError: boolean = false;\n public settingsErrorMsg: string = '';\n public settings: PlacesSettings = {};\n private moduleinit: boolean = false;\n private selectedDataIndex: number = -1;\n private recentSearchData: any = [];\n private userSelectedOption: any = '';\n private defaultSettings: PlacesSettings = {\n geoPredictionServerUrl: '',\n geoLatLangServiceUrl: '',\n geoLocDetailServerUrl: '',\n geoCountryRestriction: [],\n geoTypes: [],\n geoLocation: [],\n geoRadius: 0,\n serverResponseListHierarchy: [],\n serverResponseatLangHierarchy: [],\n serverResponseDetailHierarchy: [],\n resOnSearchButtonClickOnly: false,\n useGoogleGeoApi: true,\n inputPlaceholderText: 'Enter Area Name',\n inputString: '',\n showSearchButton: true,\n showRecentSearch: true,\n showCurrentLocation: true,\n recentStorageName: 'recentSearches',\n noOfRecentSearchSave: 5,\n currentLocIconUrl: '',\n searchIconUrl: '',\n locationIconUrl: '',\n };\n\n model: any;\n onModelChange: Function = () => {};\n onModelTouched: Function = () => {};\n\n constructor(\n @Inject(PLATFORM_ID) private platformId: Object,\n private _elmRef: ElementRef,\n private _global: GlobalRef,\n private _googlePlacesService: GooglePlacesService,\n private cdr: ChangeDetectorRef,\n ) {\n super(_elmRef, cdr);\n this.config = {};\n }\n\n ngOnInit(): any {\n if (!this.moduleinit) {\n this.moduleInit();\n }\n }\n\n ngOnChanges(): any {\n this.moduleinit = true;\n this.moduleInit();\n this.searchinputCallback(null);\n }\n\n writeValue(model: any): void {\n this.model = model;\n }\n\n registerOnChange(fn: Function): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function): void {\n this.onModelTouched = fn;\n }\n\n // function called when click event happens in input box. (Binded with view)\n searchinputClickCallback(event: any): any {\n event.target.select();\n this.searchinputCallback(event);\n }\n\n // function called when there is a change in input. (Binded with view)\n searchinputCallback(event: any): any {\n const inputVal: any = this.locationInput;\n if (inputVal) {\n this.getListQuery(inputVal);\n } else {\n this.matches = [];\n if (this.userSelectedOption) {\n this.userQuerySubmit('false');\n }\n this.userSelectedOption = '';\n if (this.settings.showRecentSearch) {\n this.showRecentSearch();\n } else {\n this.dropdownOpen = false;\n }\n }\n }\n\n // function to execute when user hover over autocomplete list. (binded with view)\n activeListNode(index: number): any {\n for (let i: number = 0; i < this.matches.length; i++) {\n if (index === i) {\n this.matches[i].active = true;\n this.selectedDataIndex = index;\n } else {\n this.matches[i].active = false;\n }\n }\n }\n\n // function to execute when user selects a match from the autocomplete list. (binded with view)\n selectedListNode(event: MouseEvent, index: number): any {\n this.selectMatch(this.matches[index]);\n }\n\n // function to execute when user selects a match.\n selectMatch(match: AddressLookupPrediction): any {\n this.dropdownOpen = false;\n if (this.recentDropdownOpen) {\n // Recent items carry full detail on `raw`, which downstream consumers need.\n this.setRecentLocation(match.raw ?? match);\n } else {\n this.getPlaceLocationInfo(match);\n }\n }\n\n // function to close the autocomplete list when clicked outside. (binded with view)\n closeAutocomplete(event: any): any {\n if (!this._elmRef.nativeElement.contains(event.target)) {\n this.selectedDataIndex = -1;\n this.dropdownOpen = false;\n }\n }\n\n // function to manually trigger the callback to parent component when clicked search button.\n userQuerySubmit(selectedOption?: any): any {\n const _userOption: any = selectedOption === 'false' ? '' : this.userSelectedOption;\n if (_userOption) {\n this.select.emit(this.userSelectedOption);\n } else {\n // this.select.emit(false);\n }\n }\n\n // function to get user current location from the device.\n currentLocationSelected(): any {\n if (isPlatformBrowser(this.platformId)) {\n this.gettingCurrentLocationFlag = true;\n this.dropdownOpen = false;\n this._googlePlacesService.getGeoCurrentLocation().then((result: any) => {\n if (!result) {\n this.gettingCurrentLocationFlag = false;\n } else {\n this.getCurrentLocationInfo(result);\n }\n });\n }\n }\n\n // module initialization happens. function called by ngOninit and ngOnChange\n private moduleInit(): any {\n this.settings = this.setUserSettings();\n // condition to check if Radius is set without location detail.\n if (this.settings.geoRadius) {\n if (this.settings.geoLocation.length !== 2) {\n this.isSettingsError = true;\n this.settingsErrorMsg =\n this.settingsErrorMsg + 'Radius should be used with GeoLocation. Please use \"geoLocation\" key to set lat and lng. ';\n }\n }\n\n // condition to check if lat and lng is set and radious is not set then it will set to 20,000KM by default\n if (this.settings.geoLocation.length === 2 && !this.settings.geoRadius) {\n this.settings.geoRadius = 20000000;\n }\n if (this.settings.showRecentSearch) {\n this.getRecentLocations();\n }\n if (!this.settings.useGoogleGeoApi) {\n if (!this.settings.geoPredictionServerUrl) {\n this.isSettingsError = true;\n this.settingsErrorMsg =\n this.settingsErrorMsg + 'Prediction custom server url is not defined. Please use \"geoPredictionServerUrl\" key to set. ';\n }\n if (!this.settings.geoLatLangServiceUrl) {\n this.isSettingsError = true;\n this.settingsErrorMsg =\n this.settingsErrorMsg + 'Latitude and longitude custom server url is not defined. Please use \"geoLatLangServiceUrl\" key to set. ';\n }\n if (!this.settings.geoLocDetailServerUrl) {\n this.isSettingsError = true;\n this.settingsErrorMsg =\n this.settingsErrorMsg + 'Location detail custom server url is not defined. Please use \"geoLocDetailServerUrl\" key to set. ';\n }\n }\n this.locationInput = this.term;\n }\n\n // function to process the search query when pressed enter.\n private processSearchQuery(): any {\n if (this.matches.length) {\n if (this.selectedDataIndex > -1) {\n this.selectedListNode(null, this.selectedDataIndex);\n } else {\n this.selectedListNode(null, 0);\n }\n }\n }\n\n // function to set user settings if it is available.\n private setUserSettings(): PlacesSettings {\n const _tempObj: any = {};\n if (this.userSettings && typeof this.userSettings === 'object') {\n const keys: string[] = Object.keys(this.defaultSettings);\n for (const value of keys) {\n _tempObj[value] = this.userSettings[value] !== undefined ? this.userSettings[value] : this.defaultSettings[value];\n }\n return _tempObj;\n } else {\n return this.defaultSettings;\n }\n }\n\n // function to get the autocomplete list based on user input.\n private getListQuery(value: string): any {\n this.recentDropdownOpen = false;\n if (this.settings.useGoogleGeoApi) {\n const _tempParams: any = {\n query: value,\n countryRestriction: this.settings.geoCountryRestriction,\n geoTypes: this.settings.geoTypes,\n };\n if (this.settings.geoLocation.length === 2) {\n _tempParams.geoLocation = this.settings.geoLocation;\n _tempParams.radius = this.settings.geoRadius;\n }\n this._googlePlacesService.getGeoPrediction(_tempParams).then((result) => {\n this.updateListItem(result);\n });\n } else {\n this._googlePlacesService.getPredictions(this.settings.geoPredictionServerUrl, value).then((result) => {\n result = this.extractServerList(this.settings.serverResponseListHierarchy, result);\n this.updateListItem(result);\n });\n }\n }\n\n // function to extratc custom data which is send by the server.\n private extractServerList(arrayList: any, data: any): any {\n if (arrayList.length) {\n let _tempData: any = data;\n for (const key of arrayList) {\n _tempData = _tempData[key];\n }\n return _tempData;\n } else {\n return data;\n }\n }\n\n // function to update the predicted list.\n private updateListItem(listData: any): any {\n this.matches = (listData || []).map((item: any) => this.normalizePrediction(item));\n // Reset highlight so Enter can't act on a stale prediction.\n this.activeMatch = undefined;\n this.dropdownOpen = true;\n this.cdr.detectChanges();\n this.matchesUpdated.emit(this.matches);\n }\n\n // function to show the recent search result.\n private showRecentSearch(): any {\n this.recentDropdownOpen = true;\n this.dropdownOpen = true;\n this._googlePlacesService.getRecentList(this.settings.recentStorageName).then((result: any) => {\n this.matches = (result || []).map((item: any) => this.normalizePrediction(item));\n });\n }\n\n // function to execute to get location detail based on latitude and longitude.\n private getCurrentLocationInfo(latlng: any): any {\n if (this.settings.useGoogleGeoApi) {\n this._googlePlacesService.getGeoLatLngDetail(latlng).then((result: any) => {\n if (result) {\n this.setRecentLocation(result);\n }\n this.gettingCurrentLocationFlag = false;\n });\n } else {\n this._googlePlacesService.getLatLngDetail(this.settings.geoLatLangServiceUrl, latlng.lat, latlng.lng).then((result: any) => {\n if (result) {\n result = this.extractServerList(this.settings.serverResponseatLangHierarchy, result);\n this.setRecentLocation(result);\n }\n this.gettingCurrentLocationFlag = false;\n });\n }\n }\n\n // function to retrieve the location info based on google place id.\n private getPlaceLocationInfo(selectedData: AddressLookupPrediction): any {\n const placeId = selectedData.placeId;\n if (this.settings.useGoogleGeoApi) {\n this._googlePlacesService.getGeoPlaceDetail(placeId).then((data: any) => {\n if (data) {\n this.setRecentLocation(data);\n }\n });\n } else {\n this._googlePlacesService.getPlaceDetails(this.settings.geoLocDetailServerUrl, placeId).then((result: any) => {\n if (result) {\n result = this.extractServerList(this.settings.serverResponseDetailHierarchy, result);\n this.setRecentLocation(result);\n }\n });\n }\n }\n\n // function to store the selected user search in the localstorage.\n private setRecentLocation(data: any): any {\n data = JSON.parse(JSON.stringify(data));\n data.description = data.description ? data.description : (data.formattedAddress || data.formatted_address);\n data.active = false;\n this.selectedDataIndex = -1;\n this.locationInput = data.description;\n if (this.settings.showRecentSearch) {\n this._googlePlacesService.addRecentList(this.settings.recentStorageName, data, this.settings.noOfRecentSearchSave);\n this.getRecentLocations();\n }\n this.userSelectedOption = data;\n // below code will execute only when user press enter or select any option selection and it emit a callback to the parent component.\n if (!this.settings.resOnSearchButtonClickOnly) {\n this.select.emit(data);\n this.termChange.emit(data);\n }\n }\n\n // function to retrive the stored recent user search from the localstorage.\n private getRecentLocations(): any {\n this._googlePlacesService.getRecentList(this.settings.recentStorageName).then((data: any) => {\n this.recentSearchData = data && data.length ? data : [];\n });\n }\n\n // Fold a raw Google/REST/recent record into the internal AddressLookupPrediction shape.\n normalizePrediction(raw: any): AddressLookupPrediction {\n return {\n placeId: raw?.placeId || raw?.place_id,\n primaryText: raw?.primaryText || raw?.structured_formatting?.main_text || raw?.displayAddress || raw?.description || '',\n secondaryText: raw?.secondaryText || raw?.structured_formatting?.secondary_text || '',\n displayAddress: raw?.displayAddress || raw?.description,\n types: raw?.types,\n raw,\n };\n }\n\n onKeyDown(event: KeyboardEvent) {\n if (this.dropdownOpen) {\n if (event.key === Key.ArrowUp) {\n this.prevActiveMatch();\n return;\n }\n if (event.key === Key.ArrowDown) {\n this.nextActiveMatch();\n return;\n }\n if (event.key === Key.Enter) {\n // Only select when a prediction is highlighted.\n if (this.activeMatch) {\n this.selectMatch(this.activeMatch);\n }\n return;\n }\n }\n }\n\n search(term, mode?): Observable<any> {\n // Disable the base search term functionality here since it is handled by the places picker separately\n return new Observable();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { NovoListModule } from 'novo-elements/elements/list';\nimport { PlacesListComponent } from './places.component';\nimport { GooglePlacesService } from './places.service';\n\n@NgModule({ declarations: [PlacesListComponent],\n exports: [PlacesListComponent], imports: [CommonModule, FormsModule, NovoListModule], providers: [GooglePlacesService, provideHttpClient(withInterceptorsFromDi())] })\nexport class GooglePlacesModule {}\n","import { InjectionToken } from '@angular/core';\nimport type { PlacesSettings } from './places.component';\n\n/** App-wide address-lookup config; when provided, every novo-address enables autocomplete on Address 1. */\nexport const NOVO_ADDRESS_CONFIG = new InjectionToken<PlacesSettings>('NOVO_ADDRESS_CONFIG');\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.GooglePlacesService"],"mappings":";;;;;;;;;;;;;MAMa,mBAAmB,CAAA;AAC9B,IAAA,WAAA,CACU,KAAiB,EACI,UAAkB,EACvC,OAAkB,EAClB,oBAAyC,EAAA;QAHzC,IAAA,CAAA,KAAK,GAAL,KAAK;QACgB,IAAA,CAAA,UAAU,GAAV,UAAU;QAC/B,IAAA,CAAA,OAAO,GAAP,OAAO;QACP,IAAA,CAAA,oBAAoB,GAApB,oBAAoB;I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QAAA,EAAA,CAAA,CAAA;gHAAlB,kBAAkB,EAAA,YAAA,EAAA,CAFJ,mBAAmB,CAAA,EAAA,OAAA,EAAA,CACA,YAAY,EAAE,WAAW,EAAE,cAAc,CAAA,EAAA,OAAA,EAAA,CAAzE,mBAAmB,CAAA,EAAA,CAAA,CAAA;AACpB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAAA,SAAA,EADsE,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,sBAAsB,EAAE,CAAC,CAAC,EAAA,OAAA,EAAA,CAAzH,YAAY,EAAE,WAAW,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;;4FAC1E,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAF9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBAC3C,OAAO,EAAE,CAAC,mBAAmB,CAAC,EAAE,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,sBAAsB,EAAE,CAAC,CAAC,EAAE;;;ACNzK;MACa,mBAAmB,GAAG,IAAI,cAAc,CAAiB,qBAAqB;;ACJ3F;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"novo-elements-elements-places.mjs","sources":["../../../projects/novo-elements/src/elements/places/places.service.ts","../../../projects/novo-elements/src/elements/places/places.component.ts","../../../projects/novo-elements/src/elements/places/places.component.html","../../../projects/novo-elements/src/elements/places/places.module.ts","../../../projects/novo-elements/src/elements/places/places.tokens.ts","../../../projects/novo-elements/src/elements/places/novo-elements-elements-places.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { HttpClient } from '@angular/common/http';\nimport { Inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { GlobalRef, LocalStorageService } from 'novo-elements/services';\n\n@Injectable()\nexport class GooglePlacesService {\n constructor(\n private _http: HttpClient,\n @Inject(PLATFORM_ID) private platformId: Object,\n private _global: GlobalRef,\n private _localStorageService: LocalStorageService,\n ) {}\n\n getPredictions(url: string, query: string, sessionToken?: string): Promise<any> {\n return new Promise((resolve) => {\n const separator = url.includes('?') ? '&' : '?';\n const sessionParam = sessionToken ? '&sessionToken=' + sessionToken : '';\n this._http.get(url + separator + 'query=' + query + sessionParam).subscribe((data: any) => {\n if (data) {\n resolve(data);\n } else {\n resolve(false);\n }\n });\n });\n }\n\n getLatLngDetail(url: string, lat: number, lng: number): Promise<any> {\n return new Promise((resolve) => {\n const separator = url.includes('?') ? '&' : '?';\n this._http.get(url + separator + 'lat=' + lat + '&lng=' + lng).subscribe((data: any) => {\n if (data) {\n resolve(data);\n } else {\n resolve(false);\n }\n });\n });\n }\n\n getPlaceDetails(url: string, placeId: string, sessionToken?: string): Promise<any> {\n return new Promise((resolve) => {\n const separator = url.includes('?') ? '&' : '?';\n const sessionParam = sessionToken ? '&sessionToken=' + sessionToken : '';\n this._http.get(url + separator + 'query=' + placeId + sessionParam).subscribe((data: any) => {\n if (data) {\n resolve(data);\n } else {\n resolve(false);\n }\n });\n });\n }\n\n getGeoCurrentLocation(): Promise<any> {\n return new Promise((resolve) => {\n if (isPlatformBrowser(this.platformId)) {\n const _window: any = this._global.nativeGlobal;\n if (_window.navigator.geolocation) {\n _window.navigator.geolocation.getCurrentPosition((pos) => {\n const latlng: any = { lat: parseFloat(pos.coords.latitude + ''), lng: parseFloat(pos.coords.longitude + '') };\n resolve(latlng);\n });\n } else {\n resolve(false);\n }\n } else {\n resolve(false);\n }\n });\n }\n\n getGeoLatLngDetail(latlng: any): Promise<any> {\n return new Promise((resolve) => {\n if (isPlatformBrowser(this.platformId)) {\n const _window: any = this._global.nativeGlobal;\n const geocoder: any = new _window.google.maps.Geocoder();\n geocoder.geocode({ location: latlng }, (results, status) => {\n if (status === 'OK') {\n this.getGeoPlaceDetail(results[0].place_id).then((result) => {\n if (result) {\n resolve(result);\n } else {\n resolve(false);\n }\n });\n } else {\n resolve(false);\n }\n });\n } else {\n resolve(false);\n }\n });\n }\n\n getGeoPrediction(params: any): Promise<any> {\n return new Promise((resolve) => {\n if (isPlatformBrowser(this.platformId)) {\n const _window: any = this._global.nativeGlobal;\n const placesService: any = new _window.google.maps.places.AutocompleteService();\n let queryInput: any = {};\n const promiseArr: any = [];\n if (params.countryRestriction.length) {\n queryInput = {\n input: params.query,\n componentRestrictions: { country: params.countryRestriction },\n };\n } else {\n queryInput = {\n input: params.query,\n };\n }\n if (params.geoLocation) {\n queryInput.location = new _window.google.maps.LatLng(parseFloat(params.geoLocation[0]), parseFloat(params.geoLocation[1]));\n queryInput.radius = params.radius;\n }\n if (params.geoTypes.length) {\n for (let i: number = 0; i < params.geoTypes.length; i++) {\n const _tempQuery: any = queryInput;\n _tempQuery.types = new Array(params.geoTypes[i]);\n promiseArr.push(this.geoPredictionCall(placesService, _tempQuery));\n }\n } else {\n promiseArr.push(this.geoPredictionCall(placesService, queryInput));\n }\n\n Promise.all(promiseArr).then((values) => {\n const val: any = values;\n if (val.length > 1) {\n let _tempArr: any = [];\n for (let j: number = 0; j < val.length; j++) {\n if (val[j] && val[j].length) {\n _tempArr = _tempArr.concat(val[j]);\n }\n }\n _tempArr = this.getUniqueResults(_tempArr);\n resolve(_tempArr);\n } else {\n resolve(values[0]);\n }\n });\n } else {\n resolve(false);\n }\n });\n }\n\n async getGeoPlaceDetail(placeId: string): Promise<any> {\n const placeDetail: any = await new Promise((resolve) => {\n if (isPlatformBrowser(this.platformId)) {\n const _window: any = this._global.nativeGlobal;\n const placesService: any = new _window.google.maps.places.PlacesService(document.createElement('div'));\n placesService.getDetails({ placeId }, (result: any) => {\n if (result === null || result.length === 0) {\n this.getGeoPaceDetailByReferance(result.referance).then((referanceData: any) => {\n if (!referanceData) {\n resolve(false);\n } else {\n resolve(referanceData);\n }\n });\n } else {\n resolve(result);\n }\n });\n } else {\n resolve(false);\n }\n });\n\n if (placeDetail?.types?.includes('locality')) {\n placeDetail.postal_codes = await this.getPostalCodes(placeDetail);\n }\n\n return placeDetail;\n }\n\n getGeoPaceDetailByReferance(referance: string): Promise<any> {\n return new Promise((resolve) => {\n if (isPlatformBrowser(this.platformId)) {\n const _window: any = this._global.nativeGlobal;\n const placesService: any = new _window.google.maps.places.PlacesService();\n placesService.getDetails({ reference: referance }, (result: any, status: any) => {\n if (status === _window.google.maps.places.PlacesServiceStatus.OK) {\n resolve(result);\n } else {\n resolve(false);\n }\n });\n } else {\n resolve(false);\n }\n });\n }\n\n addRecentList(localStorageName: string, result: any, itemSavedLength: number): any {\n this.getRecentList(localStorageName).then((data: any) => {\n if (data) {\n for (let i: number = 0; i < data.length; i++) {\n if (data[i].description === result.description) {\n data.splice(i, 1);\n break;\n }\n }\n data.unshift(result);\n if (data.length > itemSavedLength) {\n data.pop();\n }\n this._localStorageService.setItem(localStorageName, JSON.stringify(data));\n }\n });\n }\n\n getRecentList(localStorageName: string): Promise<any> {\n return new Promise((resolve) => {\n let value: any = this._localStorageService.getItem(localStorageName);\n if (value) {\n value = JSON.parse(value);\n } else {\n value = [];\n }\n resolve(value);\n });\n }\n\n getPostalCodes(placeDetail: any): Promise<string> {\n const _window: any = this._global.nativeGlobal;\n const geocoder: any = new _window.google.maps.Geocoder();\n return new Promise((resolve) => {\n geocoder.geocode({ location: placeDetail.geometry.location }, (results, status) => {\n if (status === 'OK' && results.length) {\n resolve(\n results.reduce((postalCodes: string[], result: any) => {\n const postalCodeComponent = result.address_components.find((item) => item.types.includes('postal_code'));\n if (postalCodeComponent && !postalCodes.includes(postalCodeComponent.long_name)) {\n postalCodes.push(postalCodeComponent.long_name);\n }\n return postalCodes;\n }, []),\n );\n } else {\n resolve(null);\n }\n });\n });\n }\n\n private getUniqueResults(arr: any): any {\n return Array.from(arr.reduce((m, t) => m.set(t.place_id, t), new Map()).values());\n }\n\n private geoPredictionCall(placesService: any, queryInput: any): Promise<any> {\n const _window: any = this._global.nativeGlobal;\n return new Promise((resolve) => {\n placesService.getPlacePredictions(queryInput, (result: any, status: any) => {\n if (status === _window.google.maps.places.PlacesServiceStatus.OK) {\n resolve(result);\n } else {\n resolve(false);\n }\n });\n });\n }\n}\n","// NG2\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n OnChanges,\n OnInit,\n Output,\n PLATFORM_ID,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BasePickerResults } from 'novo-elements/elements/picker';\nimport { GlobalRef } from 'novo-elements/services';\nimport { Key } from 'novo-elements/utils';\nimport { NEVER, Observable } from 'rxjs';\nimport { GooglePlacesService } from './places.service';\n\nexport interface PlacesSettings {\n geoPredictionServerUrl?: string;\n geoLatLangServiceUrl?: string;\n geoLocDetailServerUrl?: string;\n geoCountryRestriction?: any;\n geoTypes?: any;\n geoLocation?: any;\n geoRadius?: number;\n serverResponseListHierarchy?: any;\n serverResponseatLangHierarchy?: any;\n serverResponseDetailHierarchy?: any;\n resOnSearchButtonClickOnly?: boolean;\n useGoogleGeoApi?: boolean;\n inputPlaceholderText?: string;\n inputString?: string;\n showSearchButton?: boolean;\n showRecentSearch?: boolean;\n showCurrentLocation?: boolean;\n recentStorageName?: string;\n noOfRecentSearchSave?: number;\n currentLocIconUrl?: string;\n searchIconUrl?: string;\n locationIconUrl?: string;\n}\n\n/** Normalized address prediction; raw provider records are mapped into this via normalizePrediction. */\nexport interface AddressLookupPrediction {\n placeId?: string;\n primaryText?: string;\n secondaryText?: string;\n displayAddress?: string;\n types?: string[];\n /** Original provider record, retained so recent-search selection re-emits full detail. */\n raw?: any;\n}\n\n// Value accessor for the component (supports ngModel)\nconst PLACES_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => PlacesListComponent),\n multi: true,\n};\n\n@Component({\n selector: 'google-places-list',\n providers: [PLACES_VALUE_ACCESSOR],\n templateUrl: './places.component.html',\n styleUrls: ['./places.component.scss'],\n standalone: false,\n})\nexport class PlacesListComponent extends BasePickerResults implements OnInit, OnChanges, ControlValueAccessor {\n private static readonly SESSION_TOKEN_TIMEOUT_MS: number = 3 * 60 * 1000;\n\n @Input()\n userSettings: PlacesSettings;\n @Output()\n termChange: EventEmitter<any> = new EventEmitter<any>();\n @Output()\n select: EventEmitter<any> = new EventEmitter<any>();\n @Output()\n matchesUpdated: EventEmitter<AddressLookupPrediction[]> = new EventEmitter<AddressLookupPrediction[]>();\n\n public locationInput: string = '';\n public gettingCurrentLocationFlag: boolean = false;\n public dropdownOpen: boolean = false;\n public recentDropdownOpen: boolean = false;\n public isSettingsError: boolean = false;\n public settingsErrorMsg: string = '';\n public settings: PlacesSettings = {};\n private moduleinit: boolean = false;\n private selectedDataIndex: number = -1;\n private recentSearchData: any = [];\n private userSelectedOption: any = '';\n private sessionToken: string = '';\n private sessionTokenStartedAt: number = 0;\n private defaultSettings: PlacesSettings = {\n geoPredictionServerUrl: '',\n geoLatLangServiceUrl: '',\n geoLocDetailServerUrl: '',\n geoCountryRestriction: [],\n geoTypes: [],\n geoLocation: [],\n geoRadius: 0,\n serverResponseListHierarchy: [],\n serverResponseatLangHierarchy: [],\n serverResponseDetailHierarchy: [],\n resOnSearchButtonClickOnly: false,\n useGoogleGeoApi: true,\n inputPlaceholderText: 'Enter Area Name',\n inputString: '',\n showSearchButton: true,\n showRecentSearch: true,\n showCurrentLocation: true,\n recentStorageName: 'recentSearches',\n noOfRecentSearchSave: 5,\n currentLocIconUrl: '',\n searchIconUrl: '',\n locationIconUrl: '',\n };\n\n model: any;\n onModelChange: Function = () => {};\n onModelTouched: Function = () => {};\n\n constructor(\n @Inject(PLATFORM_ID) private platformId: Object,\n private _elmRef: ElementRef,\n private _global: GlobalRef,\n private _googlePlacesService: GooglePlacesService,\n private cdr: ChangeDetectorRef,\n ) {\n super(_elmRef, cdr);\n this.config = {};\n }\n\n ngOnInit(): any {\n if (!this.moduleinit) {\n this.moduleInit();\n }\n }\n\n ngOnChanges(): any {\n this.moduleinit = true;\n this.moduleInit();\n this.searchinputCallback(null);\n }\n\n writeValue(model: any): void {\n this.model = model;\n }\n\n registerOnChange(fn: Function): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function): void {\n this.onModelTouched = fn;\n }\n\n // function called when click event happens in input box. (Binded with view)\n searchinputClickCallback(event: any): any {\n event.target.select();\n this.searchinputCallback(event);\n }\n\n // function called when there is a change in input. (Binded with view)\n searchinputCallback(event: any): any {\n const inputVal: any = this.locationInput;\n if (inputVal) {\n this.getListQuery(inputVal);\n } else {\n this.matches = [];\n this.clearSessionToken();\n if (this.userSelectedOption) {\n this.userQuerySubmit('false');\n }\n this.userSelectedOption = '';\n if (this.settings.showRecentSearch) {\n this.showRecentSearch();\n } else {\n this.dropdownOpen = false;\n }\n }\n }\n\n // function to execute when user hover over autocomplete list. (binded with view)\n activeListNode(index: number): any {\n for (let i: number = 0; i < this.matches.length; i++) {\n if (index === i) {\n this.matches[i].active = true;\n this.selectedDataIndex = index;\n } else {\n this.matches[i].active = false;\n }\n }\n }\n\n // function to execute when user selects a match from the autocomplete list. (binded with view)\n selectedListNode(event: MouseEvent, index: number): any {\n this.selectMatch(this.matches[index]);\n }\n\n // function to execute when user selects a match.\n selectMatch(match: AddressLookupPrediction): any {\n this.dropdownOpen = false;\n if (this.recentDropdownOpen) {\n // Recent items carry full detail on `raw`, which downstream consumers need.\n this.setRecentLocation(match.raw ?? match);\n } else {\n this.getPlaceLocationInfo(match);\n }\n }\n\n // function to close the autocomplete list when clicked outside. (binded with view)\n closeAutocomplete(event: any): any {\n if (!this._elmRef.nativeElement.contains(event.target)) {\n this.selectedDataIndex = -1;\n this.dropdownOpen = false;\n }\n }\n\n // function to manually trigger the callback to parent component when clicked search button.\n userQuerySubmit(selectedOption?: any): any {\n const _userOption: any = selectedOption === 'false' ? '' : this.userSelectedOption;\n if (_userOption) {\n this.select.emit(this.userSelectedOption);\n } else {\n // this.select.emit(false);\n }\n }\n\n // function to get user current location from the device.\n currentLocationSelected(): any {\n if (isPlatformBrowser(this.platformId)) {\n this.gettingCurrentLocationFlag = true;\n this.dropdownOpen = false;\n this._googlePlacesService.getGeoCurrentLocation().then((result: any) => {\n if (!result) {\n this.gettingCurrentLocationFlag = false;\n } else {\n this.getCurrentLocationInfo(result);\n }\n });\n }\n }\n\n // Fold a raw Google/REST/recent record into the internal AddressLookupPrediction shape.\n normalizePrediction(raw: any): AddressLookupPrediction {\n return {\n placeId: raw?.placeId || raw?.place_id,\n primaryText: raw?.primaryText || raw?.structured_formatting?.main_text || raw?.displayAddress || raw?.description || '',\n secondaryText: raw?.secondaryText || raw?.structured_formatting?.secondary_text || '',\n displayAddress: raw?.displayAddress || raw?.description,\n types: raw?.types,\n raw,\n };\n }\n\n onKeyDown(event: KeyboardEvent) {\n if (this.dropdownOpen) {\n if (event.key === Key.ArrowUp) {\n this.prevActiveMatch();\n return;\n }\n if (event.key === Key.ArrowDown) {\n this.nextActiveMatch();\n return;\n }\n if (event.key === Key.Enter) {\n // Only select when a prediction is highlighted.\n if (this.activeMatch) {\n this.selectMatch(this.activeMatch);\n }\n return;\n }\n }\n }\n\n override search(term, mode?): Observable<any> {\n // Disable the base search term functionality here since it is handled by the places picker separately\n return NEVER;\n }\n\n // module initialization happens. function called by ngOninit and ngOnChange\n private moduleInit(): any {\n this.settings = this.setUserSettings();\n // condition to check if Radius is set without location detail.\n if (this.settings.geoRadius) {\n if (this.settings.geoLocation.length !== 2) {\n this.isSettingsError = true;\n this.settingsErrorMsg =\n this.settingsErrorMsg + 'Radius should be used with GeoLocation. Please use \"geoLocation\" key to set lat and lng. ';\n }\n }\n\n // condition to check if lat and lng is set and radious is not set then it will set to 20,000KM by default\n if (this.settings.geoLocation.length === 2 && !this.settings.geoRadius) {\n this.settings.geoRadius = 20000000;\n }\n if (this.settings.showRecentSearch) {\n this.getRecentLocations();\n }\n if (!this.settings.useGoogleGeoApi) {\n if (!this.settings.geoPredictionServerUrl) {\n this.isSettingsError = true;\n this.settingsErrorMsg =\n this.settingsErrorMsg + 'Prediction custom server url is not defined. Please use \"geoPredictionServerUrl\" key to set. ';\n }\n if (!this.settings.geoLatLangServiceUrl) {\n this.isSettingsError = true;\n this.settingsErrorMsg =\n this.settingsErrorMsg + 'Latitude and longitude custom server url is not defined. Please use \"geoLatLangServiceUrl\" key to set. ';\n }\n if (!this.settings.geoLocDetailServerUrl) {\n this.isSettingsError = true;\n this.settingsErrorMsg =\n this.settingsErrorMsg + 'Location detail custom server url is not defined. Please use \"geoLocDetailServerUrl\" key to set. ';\n }\n }\n this.locationInput = this.term;\n }\n\n // function to process the search query when pressed enter.\n private processSearchQuery(): any {\n if (this.matches.length) {\n if (this.selectedDataIndex > -1) {\n this.selectedListNode(null, this.selectedDataIndex);\n } else {\n this.selectedListNode(null, 0);\n }\n }\n }\n\n // function to set user settings if it is available.\n private setUserSettings(): PlacesSettings {\n const _tempObj: any = {};\n if (this.userSettings && typeof this.userSettings === 'object') {\n const keys: string[] = Object.keys(this.defaultSettings);\n for (const value of keys) {\n _tempObj[value] = this.userSettings[value] !== undefined ? this.userSettings[value] : this.defaultSettings[value];\n }\n return _tempObj;\n } else {\n return this.defaultSettings;\n }\n }\n\n // function to get the autocomplete list based on user input.\n private getListQuery(value: string): any {\n this.recentDropdownOpen = false;\n if (this.settings.useGoogleGeoApi) {\n const _tempParams: any = {\n query: value,\n countryRestriction: this.settings.geoCountryRestriction,\n geoTypes: this.settings.geoTypes,\n };\n if (this.settings.geoLocation.length === 2) {\n _tempParams.geoLocation = this.settings.geoLocation;\n _tempParams.radius = this.settings.geoRadius;\n }\n this._googlePlacesService.getGeoPrediction(_tempParams).then((result) => {\n this.updateListItem(result);\n });\n } else {\n this._googlePlacesService.getPredictions(this.settings.geoPredictionServerUrl, value, this.ensureSessionToken()).then((result) => {\n result = this.extractServerList(this.settings.serverResponseListHierarchy, result);\n this.updateListItem(result);\n });\n }\n }\n\n // Returns the active billing-session token for prediction calls, minting a fresh UUID v4 when\n // none exists or the previous one has gone stale (~3 min of inactivity). Each call refreshes the\n // inactivity window.\n private ensureSessionToken(): string {\n const now = Date.now();\n if (!this.sessionToken || now - this.sessionTokenStartedAt > PlacesListComponent.SESSION_TOKEN_TIMEOUT_MS) {\n this.sessionToken = this.generateSessionToken();\n }\n this.sessionTokenStartedAt = now;\n return this.sessionToken;\n }\n\n // Mints a v4 UUID for the Google Places billing session. Prefers the built-in crypto.randomUUID(),\n // which exists only in secure contexts (HTTPS / localhost). Falls back to a locally generated UUID for\n // insecure-context local development (e.g. localhost development); the token only needs to be a unique\n // opaque string, so Math.random() is acceptable there.\n private generateSessionToken(): string {\n if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {\n return crypto.randomUUID();\n }\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (char) => {\n const random: number = (Math.random() * 16) | 0;\n const value: number = char === 'x' ? random : (random & 0x3) | 0x8;\n return value.toString(16);\n });\n }\n\n private clearSessionToken(): void {\n this.sessionToken = '';\n this.sessionTokenStartedAt = 0;\n }\n\n // function to extratc custom data which is send by the server.\n private extractServerList(arrayList: any, data: any): any {\n if (arrayList.length) {\n let _tempData: any = data;\n for (const key of arrayList) {\n _tempData = _tempData[key];\n }\n return _tempData;\n } else {\n return data;\n }\n }\n\n // function to update the predicted list.\n private updateListItem(listData: any): any {\n this.matches = (listData || []).map((item: any) => this.normalizePrediction(item));\n // Reset highlight so Enter can't act on a stale prediction.\n this.activeMatch = undefined;\n this.dropdownOpen = true;\n this.cdr.detectChanges();\n this.matchesUpdated.emit(this.matches);\n }\n\n // function to show the recent search result.\n private showRecentSearch(): any {\n this.recentDropdownOpen = true;\n this.dropdownOpen = true;\n this._googlePlacesService.getRecentList(this.settings.recentStorageName).then((result: any) => {\n this.matches = (result || []).map((item: any) => this.normalizePrediction(item));\n });\n }\n\n // function to execute to get location detail based on latitude and longitude.\n private getCurrentLocationInfo(latlng: any): any {\n if (this.settings.useGoogleGeoApi) {\n this._googlePlacesService.getGeoLatLngDetail(latlng).then((result: any) => {\n if (result) {\n this.setRecentLocation(result);\n }\n this.gettingCurrentLocationFlag = false;\n });\n } else {\n this._googlePlacesService.getLatLngDetail(this.settings.geoLatLangServiceUrl, latlng.lat, latlng.lng).then((result: any) => {\n if (result) {\n result = this.extractServerList(this.settings.serverResponseatLangHierarchy, result);\n this.setRecentLocation(result);\n }\n this.gettingCurrentLocationFlag = false;\n });\n }\n }\n\n // function to retrieve the location info based on google place id.\n private async getPlaceLocationInfo(selectedData: AddressLookupPrediction): Promise<void> {\n const placeId = selectedData.placeId;\n if (this.settings.useGoogleGeoApi) {\n const data = await this._googlePlacesService.getGeoPlaceDetail(placeId);\n if (data) {\n this.setRecentLocation(data);\n }\n } else {\n try {\n let result = await this._googlePlacesService.getPlaceDetails(this.settings.geoLocDetailServerUrl, placeId, this.sessionToken);\n if (result) {\n result = this.extractServerList(this.settings.serverResponseDetailHierarchy, result);\n this.setRecentLocation(result);\n }\n } finally {\n // The details call ends the Google billing session; clear the token even if the request\n // failed so the next interaction starts a fresh session.\n this.clearSessionToken();\n }\n }\n }\n\n // function to store the selected user search in the localstorage.\n private setRecentLocation(data: any): any {\n data = JSON.parse(JSON.stringify(data));\n data.description = data.description ? data.description : data.formattedAddress || data.formatted_address;\n data.active = false;\n this.selectedDataIndex = -1;\n this.locationInput = data.description;\n if (this.settings.showRecentSearch) {\n this._googlePlacesService.addRecentList(this.settings.recentStorageName, data, this.settings.noOfRecentSearchSave);\n this.getRecentLocations();\n }\n this.userSelectedOption = data;\n // below code will execute only when user press enter or select any option selection and it emit a callback to the parent component.\n if (!this.settings.resOnSearchButtonClickOnly) {\n this.select.emit(data);\n this.termChange.emit(data);\n }\n }\n\n // function to retrive the stored recent user search from the localstorage.\n private getRecentLocations(): any {\n this._googlePlacesService.getRecentList(this.settings.recentStorageName).then((data: any) => {\n this.recentSearchData = data && data.length ? data : [];\n });\n }\n}\n","<novo-list direction=\"vertical\">\n @for (data of matches; track $index) {\n <novo-list-item (click)=\"selectedListNode($event, $index)\" [ngClass]=\"{ active: data === activeMatch }\">\n <item-header>\n <item-avatar icon=\"location\"></item-avatar>\n <item-title>{{ data.primaryText }}</item-title>\n </item-header>\n <item-content>{{ data.secondaryText }}</item-content>\n </novo-list-item>\n }\n</novo-list>\n","import { CommonModule } from '@angular/common';\nimport { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { NovoListModule } from 'novo-elements/elements/list';\nimport { PlacesListComponent } from './places.component';\nimport { GooglePlacesService } from './places.service';\n\n@NgModule({ declarations: [PlacesListComponent],\n exports: [PlacesListComponent], imports: [CommonModule, FormsModule, NovoListModule], providers: [GooglePlacesService, provideHttpClient(withInterceptorsFromDi())] })\nexport class GooglePlacesModule {}\n","import { InjectionToken } from '@angular/core';\nimport type { PlacesSettings } from './places.component';\n\n/** App-wide address-lookup config; when provided, every novo-address enables autocomplete on Address 1. */\nexport const NOVO_ADDRESS_CONFIG = new InjectionToken<PlacesSettings>('NOVO_ADDRESS_CONFIG');\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.GooglePlacesService"],"mappings":";;;;;;;;;;;;;MAMa,mBAAmB,CAAA;AAC9B,IAAA,WAAA,CACU,KAAiB,EACI,UAAkB,EACvC,OAAkB,EAClB,oBAAyC,EAAA;QAHzC,IAAA,CAAA,KAAK,GAAL,KAAK;QACgB,IAAA,CAAA,UAAU,GAAV,UAAU;QAC/B,IAAA,CAAA,OAAO,GAAP,OAAO;QACP,IAAA,CAAA,oBAAoB,GAApB,oBAAoB;IAC3B;AAEH,IAAA,cAAc,CAAC,GAAW,EAAE,KA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