novo-elements 13.1.0-next.3 → 13.1.0-next.5

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.
@@ -14,10 +14,14 @@ declare class GooglePlacesService {
14
14
  private platformId;
15
15
  private _global;
16
16
  private _localStorageService;
17
+ private mapsLoad?;
18
+ private mapsLoadKey?;
17
19
  constructor(_http: HttpClient, platformId: Object, _global: GlobalRef, _localStorageService: LocalStorageService);
18
- getPredictions(url: string, query: string): Promise<any>;
20
+ loadGoogleMaps(settings: PlacesSettings): Promise<void>;
21
+ private injectGoogleMapsScript;
22
+ getPredictions(url: string, query: string, sessionToken?: string): Promise<any>;
19
23
  getLatLngDetail(url: string, lat: number, lng: number): Promise<any>;
20
- getPlaceDetails(url: string, placeId: string): Promise<any>;
24
+ getPlaceDetails(url: string, placeId: string, sessionToken?: string): Promise<any>;
21
25
  getGeoCurrentLocation(): Promise<any>;
22
26
  getGeoLatLngDetail(latlng: any): Promise<any>;
23
27
  getGeoPrediction(params: any): Promise<any>;
@@ -55,6 +59,10 @@ interface PlacesSettings {
55
59
  currentLocIconUrl?: string;
56
60
  searchIconUrl?: string;
57
61
  locationIconUrl?: string;
62
+ /** Bullhorn-managed key; when set, the library lazy-loads the Maps JS SDK with it instead of relying on a host script tag. */
63
+ googleApiKey?: string;
64
+ /** Extra Maps JS loader query params, merged over the defaults (libraries=places, loading=async). */
65
+ googleMapsLoaderParams?: Record<string, string>;
58
66
  }
59
67
  /** Normalized address prediction; raw provider records are mapped into this via normalizePrediction. */
60
68
  interface AddressLookupPrediction {
@@ -72,6 +80,8 @@ declare class PlacesListComponent extends BasePickerResults implements OnInit, O
72
80
  private _global;
73
81
  private _googlePlacesService;
74
82
  private cdr;
83
+ private addressConfig;
84
+ private static readonly SESSION_TOKEN_TIMEOUT_MS;
75
85
  userSettings: PlacesSettings;
76
86
  termChange: EventEmitter<any>;
77
87
  select: EventEmitter<any>;
@@ -87,11 +97,13 @@ declare class PlacesListComponent extends BasePickerResults implements OnInit, O
87
97
  private selectedDataIndex;
88
98
  private recentSearchData;
89
99
  private userSelectedOption;
100
+ private sessionToken;
101
+ private sessionTokenStartedAt;
90
102
  private defaultSettings;
91
103
  model: any;
92
104
  onModelChange: Function;
93
105
  onModelTouched: Function;
94
- constructor(platformId: Object, _elmRef: ElementRef, _global: GlobalRef, _googlePlacesService: GooglePlacesService, cdr: ChangeDetectorRef);
106
+ constructor(platformId: Object, _elmRef: ElementRef, _global: GlobalRef, _googlePlacesService: GooglePlacesService, cdr: ChangeDetectorRef, addressConfig?: PlacesSettings);
95
107
  ngOnInit(): any;
96
108
  ngOnChanges(): any;
97
109
  writeValue(model: any): void;
@@ -105,10 +117,16 @@ declare class PlacesListComponent extends BasePickerResults implements OnInit, O
105
117
  closeAutocomplete(event: any): any;
106
118
  userQuerySubmit(selectedOption?: any): any;
107
119
  currentLocationSelected(): any;
120
+ normalizePrediction(raw: any): AddressLookupPrediction;
121
+ onKeyDown(event: KeyboardEvent): void;
122
+ search(term: any, mode?: any): Observable<any>;
108
123
  private moduleInit;
109
124
  private processSearchQuery;
110
125
  private setUserSettings;
111
126
  private getListQuery;
127
+ private ensureSessionToken;
128
+ private generateSessionToken;
129
+ private clearSessionToken;
112
130
  private extractServerList;
113
131
  private updateListItem;
114
132
  private showRecentSearch;
@@ -116,10 +134,7 @@ declare class PlacesListComponent extends BasePickerResults implements OnInit, O
116
134
  private getPlaceLocationInfo;
117
135
  private setRecentLocation;
118
136
  private getRecentLocations;
119
- normalizePrediction(raw: any): AddressLookupPrediction;
120
- onKeyDown(event: KeyboardEvent): void;
121
- search(term: any, mode?: any): Observable<any>;
122
- static ɵfac: i0.ɵɵFactoryDeclaration<PlacesListComponent, never>;
137
+ static ɵfac: i0.ɵɵFactoryDeclaration<PlacesListComponent, [null, null, null, null, null, { optional: true; }]>;
123
138
  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
139
  }
125
140
 
@@ -1,40 +1,40 @@
1
1
  import * as i0 from '@angular/core';
2
- import { TemplateRef, ViewContainerRef, OnInit, OnChanges, AfterContentInit, AfterViewInit, OnDestroy, ElementRef, ChangeDetectorRef, SimpleChanges, QueryList, InputSignal, Signal, AfterContentChecked, InjectionToken } from '@angular/core';
3
- import * as i15 from '@angular/forms';
2
+ import { TemplateRef, ViewContainerRef, OnInit, OnChanges, AfterContentInit, AfterViewInit, OnDestroy, ElementRef, ChangeDetectorRef, SimpleChanges, QueryList, InputSignal, Signal, AfterContentChecked, PipeTransform, InjectionToken } from '@angular/core';
3
+ import * as i16 from '@angular/forms';
4
4
  import { FormGroup, FormControl, ControlContainer, FormControlName, UntypedFormGroup, AbstractControl, FormBuilder, FormArray } from '@angular/forms';
5
5
  import { NovoLabelService } from 'novo-elements/services';
6
6
  import { Subject, Subscription } from 'rxjs';
7
7
  import { Day } from 'date-fns';
8
- import * as i25 from 'novo-elements/elements/field';
8
+ import * as i26 from 'novo-elements/elements/field';
9
9
  import { NovoPickerToggleElement } from 'novo-elements/elements/field';
10
- import * as i18 from 'novo-elements/elements/places';
11
- import { PlacesListComponent } from 'novo-elements/elements/places';
12
- import * as i23 from 'novo-elements/elements/select';
10
+ import * as i19 from 'novo-elements/elements/places';
11
+ import { PlacesListComponent, PlacesSettings } from 'novo-elements/elements/places';
12
+ import * as i24 from 'novo-elements/elements/select';
13
13
  import { NovoSelectElement } from 'novo-elements/elements/select';
14
- import * as i28 from 'novo-elements/elements/tabbed-group-picker';
14
+ import * as i29 from 'novo-elements/elements/tabbed-group-picker';
15
15
  import { NovoTabbedGroupPickerElement, TabbedGroupPickerTab, TabbedGroupPickerButtonConfig } from 'novo-elements/elements/tabbed-group-picker';
16
- import * as i14 from '@angular/common';
17
- import * as i16 from '@angular/cdk/drag-drop';
18
- import * as i17 from '@angular/cdk/table';
19
- import * as i19 from 'novo-elements/elements/autocomplete';
20
- import * as i20 from 'novo-elements/elements/button';
21
- import * as i21 from 'novo-elements/elements/common';
22
- import * as i22 from 'novo-elements/elements/form';
23
- import * as i24 from 'novo-elements/elements/non-ideal-state';
24
- import * as i26 from 'novo-elements/elements/flex';
25
- import * as i27 from 'novo-elements/elements/tabs';
26
- import * as i29 from 'novo-elements/elements/loading';
27
- import * as i30 from 'novo-elements/elements/card';
28
- import * as i31 from 'novo-elements/elements/date-picker';
29
- import * as i32 from 'novo-elements/elements/date-time-picker';
30
- import * as i33 from 'novo-elements/elements/icon';
31
- import * as i34 from 'novo-elements/elements/radio';
32
- import * as i35 from 'novo-elements/elements/search';
33
- import * as i36 from 'novo-elements/elements/switch';
34
- import * as i37 from 'novo-elements/elements/chips';
35
- import * as i38 from 'novo-elements/elements/select-search';
36
- import * as i39 from 'novo-elements/elements/dropdown';
37
- import * as i40 from 'novo-elements/elements/tooltip';
16
+ import * as i15 from '@angular/common';
17
+ import * as i17 from '@angular/cdk/drag-drop';
18
+ import * as i18 from '@angular/cdk/table';
19
+ import * as i20 from 'novo-elements/elements/autocomplete';
20
+ import * as i21 from 'novo-elements/elements/button';
21
+ import * as i22 from 'novo-elements/elements/common';
22
+ import * as i23 from 'novo-elements/elements/form';
23
+ import * as i25 from 'novo-elements/elements/non-ideal-state';
24
+ import * as i27 from 'novo-elements/elements/flex';
25
+ import * as i28 from 'novo-elements/elements/tabs';
26
+ import * as i30 from 'novo-elements/elements/loading';
27
+ import * as i31 from 'novo-elements/elements/card';
28
+ import * as i32 from 'novo-elements/elements/date-picker';
29
+ import * as i33 from 'novo-elements/elements/date-time-picker';
30
+ import * as i34 from 'novo-elements/elements/icon';
31
+ import * as i35 from 'novo-elements/elements/radio';
32
+ import * as i36 from 'novo-elements/elements/search';
33
+ import * as i37 from 'novo-elements/elements/switch';
34
+ import * as i38 from 'novo-elements/elements/chips';
35
+ import * as i39 from 'novo-elements/elements/select-search';
36
+ import * as i40 from 'novo-elements/elements/dropdown';
37
+ import * as i41 from 'novo-elements/elements/tooltip';
38
38
 
39
39
  /** Base interface for a condidation template directives. */
40
40
  interface ConditionDef {
@@ -176,15 +176,35 @@ interface FieldConfig<T extends BaseFieldDef> {
176
176
  find: (name: string) => T;
177
177
  }
178
178
  interface AddressData {
179
- address_components: AddressComponent[];
180
- formatted_address: string;
181
- geometry: AddressGeometry;
179
+ address_components?: AddressComponent[];
180
+ formatted_address?: string;
181
+ geometry?: AddressGeometry;
182
182
  name?: string;
183
- place_id: string;
183
+ place_id?: string;
184
+ address1?: string;
185
+ address2?: string;
186
+ city?: string;
187
+ state?: string;
188
+ zip?: string;
189
+ countryName?: string;
190
+ countryCode?: string;
191
+ formattedAddress?: string;
192
+ location?: AddressGeoPoint;
193
+ viewport?: AddressDetailViewport;
194
+ referenceId?: string;
195
+ postalCodes?: string[];
184
196
  radius?: AddressRadius;
185
197
  postal_codes?: string[];
186
198
  types?: string[];
187
199
  }
200
+ interface AddressGeoPoint {
201
+ latitude: number;
202
+ longitude: number;
203
+ }
204
+ interface AddressDetailViewport {
205
+ northeast: AddressGeoPoint;
206
+ southwest: AddressGeoPoint;
207
+ }
188
208
  interface AddressRadius {
189
209
  value: number;
190
210
  units: AddressRadiusUnitsName;
@@ -431,6 +451,7 @@ declare class NovoDefaultAddressConditionDef extends AbstractConditionFieldDef i
431
451
  term: string;
432
452
  private _addressChangesSubscription;
433
453
  element: ElementRef<any>;
454
+ protected readonly addressConfig: PlacesSettings;
434
455
  constructor(labelService: NovoLabelService);
435
456
  ngOnDestroy(): void;
436
457
  onKeyup(event: any, viewIndex: any): void;
@@ -629,9 +650,19 @@ declare class CriteriaBuilderComponent implements OnInit, OnDestroy, AfterConten
629
650
  static ɵcmp: i0.ɵɵComponentDeclaration<CriteriaBuilderComponent, "novo-criteria-builder", never, { "config": { "alias": "config"; "required": false; }; "controlName": { "alias": "controlName"; "required": false; }; "allowedGroupings": { "alias": "allowedGroupings"; "required": false; }; "editTypeFn": { "alias": "editTypeFn"; "required": false; }; "addressConfig": { "alias": "addressConfig"; "required": false; }; "dateConfig": { "alias": "dateConfig"; "required": false; }; "canBeEmpty": { "alias": "canBeEmpty"; "required": false; }; "HideFirstOperator": { "alias": "hideFirstOperator"; "required": false; }; }, {}, ["_contentFieldDefs"], never, false, never>;
630
651
  }
631
652
 
653
+ /**
654
+ * Resolves a display label from an address value. Google client-SDK results use formatted_address;
655
+ * address-search-service results use formattedAddress.
656
+ */
657
+ declare class AddressLabelPipe implements PipeTransform {
658
+ transform(item: AddressData): string;
659
+ static ɵfac: i0.ɵɵFactoryDeclaration<AddressLabelPipe, never>;
660
+ static ɵpipe: i0.ɵɵPipeDeclaration<AddressLabelPipe, "addressLabel", false>;
661
+ }
662
+
632
663
  declare class NovoQueryBuilderModule {
633
664
  static ɵfac: i0.ɵɵFactoryDeclaration<NovoQueryBuilderModule, never>;
634
- static ɵmod: i0.ɵɵNgModuleDeclaration<NovoQueryBuilderModule, [typeof CriteriaBuilderComponent, typeof ConditionBuilderComponent, typeof ConditionInputOutlet, typeof ConditionOperatorOutlet, typeof ConditionGroupComponent, typeof NovoDefaultAddressConditionDef, typeof NovoDefaultBooleanConditionDef, typeof NovoDefaultDateConditionDef, typeof NovoDefaultDateTimeConditionDef, typeof NovoConditionOperatorsDef, typeof NovoConditionInputDef, typeof NovoConditionFieldDef, typeof NovoDefaultStringConditionDef, typeof NovoDefaultNumberConditionDef, typeof NovoDefaultIdConditionDef, typeof NovoDefaultPickerConditionDef, typeof NovoConditionTemplatesComponent], [typeof i14.CommonModule, typeof i15.FormsModule, typeof i15.ReactiveFormsModule, typeof i16.DragDropModule, typeof i17.CdkTableModule, typeof i18.GooglePlacesModule, typeof i19.NovoAutoCompleteModule, typeof i20.NovoButtonModule, typeof i21.NovoCommonModule, typeof i22.NovoFormModule, typeof i23.NovoSelectModule, typeof i24.NovoNonIdealStateModule, typeof i25.NovoFieldModule, typeof i21.NovoOptionModule, typeof i26.NovoFlexModule, typeof i27.NovoTabModule, typeof i28.NovoTabbedGroupPickerModule, typeof i29.NovoLoadingModule, typeof i30.NovoCardModule, typeof i31.NovoDatePickerModule, typeof i32.NovoDateTimePickerModule, typeof i33.NovoIconModule, typeof i21.NovoOverlayModule, typeof i34.NovoRadioModule, typeof i35.NovoSearchBoxModule, typeof i36.NovoSwitchModule, typeof i37.NovoChipsModule, typeof i38.NovoSelectSearchModule, typeof i39.NovoDropdownModule, typeof i22.NovoFormExtrasModule, typeof i40.NovoTooltipModule], [typeof CriteriaBuilderComponent, typeof ConditionBuilderComponent, typeof NovoDefaultAddressConditionDef, typeof NovoDefaultBooleanConditionDef, typeof NovoDefaultDateConditionDef, typeof NovoDefaultDateTimeConditionDef, typeof NovoConditionOperatorsDef, typeof NovoConditionInputDef, typeof NovoConditionFieldDef, typeof NovoDefaultStringConditionDef, typeof NovoDefaultNumberConditionDef, typeof NovoDefaultIdConditionDef, typeof NovoDefaultPickerConditionDef, typeof NovoConditionTemplatesComponent]>;
665
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NovoQueryBuilderModule, [typeof AddressLabelPipe, typeof CriteriaBuilderComponent, typeof ConditionBuilderComponent, typeof ConditionInputOutlet, typeof ConditionOperatorOutlet, typeof ConditionGroupComponent, typeof NovoDefaultAddressConditionDef, typeof NovoDefaultBooleanConditionDef, typeof NovoDefaultDateConditionDef, typeof NovoDefaultDateTimeConditionDef, typeof NovoConditionOperatorsDef, typeof NovoConditionInputDef, typeof NovoConditionFieldDef, typeof NovoDefaultStringConditionDef, typeof NovoDefaultNumberConditionDef, typeof NovoDefaultIdConditionDef, typeof NovoDefaultPickerConditionDef, typeof NovoConditionTemplatesComponent], [typeof i15.CommonModule, typeof i16.FormsModule, typeof i16.ReactiveFormsModule, typeof i17.DragDropModule, typeof i18.CdkTableModule, typeof i19.GooglePlacesModule, typeof i20.NovoAutoCompleteModule, typeof i21.NovoButtonModule, typeof i22.NovoCommonModule, typeof i23.NovoFormModule, typeof i24.NovoSelectModule, typeof i25.NovoNonIdealStateModule, typeof i26.NovoFieldModule, typeof i22.NovoOptionModule, typeof i27.NovoFlexModule, typeof i28.NovoTabModule, typeof i29.NovoTabbedGroupPickerModule, typeof i30.NovoLoadingModule, typeof i31.NovoCardModule, typeof i32.NovoDatePickerModule, typeof i33.NovoDateTimePickerModule, typeof i34.NovoIconModule, typeof i22.NovoOverlayModule, typeof i35.NovoRadioModule, typeof i36.NovoSearchBoxModule, typeof i37.NovoSwitchModule, typeof i38.NovoChipsModule, typeof i39.NovoSelectSearchModule, typeof i40.NovoDropdownModule, typeof i23.NovoFormExtrasModule, typeof i41.NovoTooltipModule], [typeof CriteriaBuilderComponent, typeof ConditionBuilderComponent, typeof NovoDefaultAddressConditionDef, typeof NovoDefaultBooleanConditionDef, typeof NovoDefaultDateConditionDef, typeof NovoDefaultDateTimeConditionDef, typeof NovoConditionOperatorsDef, typeof NovoConditionInputDef, typeof NovoConditionFieldDef, typeof NovoDefaultStringConditionDef, typeof NovoDefaultNumberConditionDef, typeof NovoDefaultIdConditionDef, typeof NovoDefaultPickerConditionDef, typeof NovoConditionTemplatesComponent]>;
635
666
  static ɵinj: i0.ɵɵInjectorDeclaration<NovoQueryBuilderModule>;
636
667
  }
637
668
 
@@ -640,4 +671,4 @@ declare const NOVO_CRITERIA_BUILDER: InjectionToken<any>;
640
671
  declare const NOVO_CONDITION_BUILDER: InjectionToken<any>;
641
672
 
642
673
  export { AbstractConditionFieldDef, BaseConditionFieldDef, ConditionBuilderComponent, ConditionInputOutlet, ConditionOperatorOutlet, Conjunction, CriteriaBuilderComponent, NOVO_CONDITION_BUILDER, NOVO_CRITERIA_BUILDER, NOVO_QUERY_BUILDER, NovoConditionFieldDef, NovoConditionInputDef, NovoConditionOperatorsDef, NovoConditionTemplatesComponent, NovoDefaultAddressConditionDef, NovoDefaultBooleanConditionDef, NovoDefaultDateConditionDef, NovoDefaultDateTimeConditionDef, NovoDefaultIdConditionDef, NovoDefaultNumberConditionDef, NovoDefaultPickerConditionDef, NovoDefaultStringConditionDef, NovoQueryBuilderModule, Operator, RadiusUnits };
643
- export type { AddressComponent, AddressCriteriaConfig, AddressData, AddressGeometry, AddressGeometryLocation, AddressGeometryViewport, AddressRadius, AddressRadiusUnitsName, BaseFieldDef, Condition, ConditionDef, ConditionGroup, ConditionOrConditionGroup, ConditionType, Criteria, DateCriteriaConfig, FieldConfig, NestedConditionGroup, NestedCriteria, OperatorName, QueryBuilderConfig, QueryFilterOutlet };
674
+ export type { AddressComponent, AddressCriteriaConfig, AddressData, AddressDetailViewport, AddressGeoPoint, AddressGeometry, AddressGeometryLocation, AddressGeometryViewport, AddressRadius, AddressRadiusUnitsName, BaseFieldDef, Condition, ConditionDef, ConditionGroup, ConditionOrConditionGroup, ConditionType, Criteria, DateCriteriaConfig, FieldConfig, NestedConditionGroup, NestedCriteria, OperatorName, QueryBuilderConfig, QueryFilterOutlet };