@bnsights/bbsf-controls 1.0.49 → 1.0.50

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.
@@ -5488,7 +5488,7 @@
5488
5488
  if (_this.CurrentLanguage == 'en')
5489
5489
  _this.mapsAPILoader["_config"]["localeId"] = "en-US";
5490
5490
  _this.mapsAPILoader["_scriptLoadingPromise"] = null;
5491
- _this.mapsAPILoader["_config"]["apiKey"] = "AIzaSyA75ojhZhEhDaO3vfn3mxTY32sq5flAwlY&language=" + _this.CurrentLanguage;
5491
+ _this.mapsAPILoader["_config"]["apiKey"] = bbsfUtilities.environment.BBSF_GoogleMapKey + "&language=" + _this.CurrentLanguage;
5492
5492
  var ScriptTag = document.getElementById(_this.mapsAPILoader["_SCRIPT_ID"]);
5493
5493
  if (ScriptTag)
5494
5494
  ScriptTag.remove();
@@ -5499,7 +5499,7 @@
5499
5499
  window.google = null;
5500
5500
  _this.LazyMapsAPILoader = new core.LazyMapsAPILoader({
5501
5501
  // &language=${UtilityService.CurrentLanguage}
5502
- apiKey: "AIzaSyA75ojhZhEhDaO3vfn3mxTY32sq5flAwlY&language=" + _this.CurrentLanguage,
5502
+ apiKey: bbsfUtilities.environment.BBSF_GoogleMapKey + "&language=" + _this.CurrentLanguage,
5503
5503
  libraries: ['places'],
5504
5504
  }, _this.mapsAPILoader["_windowRef"], _this.mapsAPILoader["_documentRef"], _this.mapsAPILoader["_config"]["localeId"]);
5505
5505
  _this.LazyMapsAPILoader.load().then(function () {
@@ -5595,18 +5595,17 @@
5595
5595
  }));
5596
5596
  });
5597
5597
  });
5598
- ;
5599
5598
  if (this.CurrentLanguage == 'ar')
5600
5599
  this.mapsAPILoader["_config"]["localeId"] = "ar-EG";
5601
5600
  if (this.CurrentLanguage == 'en')
5602
5601
  this.mapsAPILoader["_config"]["localeId"] = "en-US";
5603
5602
  this.mapsAPILoader["_scriptLoadingPromise"] = null;
5604
- this.mapsAPILoader["_config"]["apiKey"] = "AIzaSyA75ojhZhEhDaO3vfn3mxTY32sq5flAwlY&language=" + this.CurrentLanguage;
5603
+ this.mapsAPILoader["_config"]["apiKey"] = bbsfUtilities.environment.BBSF_GoogleMapKey + "&language=" + this.CurrentLanguage;
5605
5604
  var leftSection = document.getElementById(this.mapsAPILoader["_SCRIPT_ID"]);
5606
5605
  if (leftSection)
5607
5606
  leftSection.remove();
5608
5607
  this.LazyMapsAPILoader = new core.LazyMapsAPILoader({
5609
- apiKey: "AIzaSyA75ojhZhEhDaO3vfn3mxTY32sq5flAwlY&language=" + this.CurrentLanguage,
5608
+ apiKey: bbsfUtilities.environment.BBSF_GoogleMapKey + "&language=" + this.CurrentLanguage,
5610
5609
  libraries: ['places'],
5611
5610
  }, this.mapsAPILoader["_windowRef"], this.mapsAPILoader["_documentRef"], this.mapsAPILoader["_config"]["localeId"]);
5612
5611
  this.LazyMapsAPILoader.load();
@@ -5630,6 +5629,33 @@
5630
5629
  this.MapAutoCompleteFormControl.disable();
5631
5630
  }
5632
5631
  if (this.options.Value != null) {
5632
+ var germanAddress = {
5633
+ url: this.options.Value.GoogleMapsURL,
5634
+ placeID: this.options.Value.PlaceID,
5635
+ displayAddress: this.options.Value.Text,
5636
+ name: this.options.Value.Text,
5637
+ locality: {},
5638
+ state: {},
5639
+ country: {},
5640
+ geoLocation: { latitude: -1, longitude: -1 },
5641
+ };
5642
+ germanAddress.geoLocation.latitude = this.options.Value.Latitude;
5643
+ germanAddress.geoLocation.longitude = this.options.Value.Longitude;
5644
+ this.onGermanAddressMapped.emit(germanAddress);
5645
+ this.GermanAddressMapped(germanAddress);
5646
+ this.place = {
5647
+ url: this.options.Value.GoogleMapsURL,
5648
+ place_id: this.options.Value.PlaceID,
5649
+ formatted_address: this.options.Value.Text,
5650
+ name: this.options.Value.Text,
5651
+ };
5652
+ this.onAutocompleteSelected.emit(this.place);
5653
+ this.AutocompleteSelected(this.place);
5654
+ this.onLocationSelected.emit({
5655
+ latitude: this.options.Value.Latitude,
5656
+ longitude: this.options.Value.Longitude
5657
+ });
5658
+ this.group.controls[this.options.Name].setValue(this.MapAutoCompleteModel);
5633
5659
  this.MapAutoCompleteFormControl.setValue(this.options.Value);
5634
5660
  }
5635
5661
  if (this.options.CustomValidation.length > 0) {
@@ -5651,6 +5677,8 @@
5651
5677
  element.setAttribute(this.options.AttributeList[index].Key, this.options.AttributeList[index].value);
5652
5678
  }
5653
5679
  }
5680
+ var elementHTML = document.getElementById(this.options.Name);
5681
+ elementHTML.value = this.MapAutoCompleteModel.Text;
5654
5682
  };
5655
5683
  MapAutoCompleteComponent.prototype.showGlobalError = function () {
5656
5684
  this.controlUtility.showGlobalError();
@@ -5695,7 +5723,7 @@
5695
5723
  MapAutoCompleteComponent.decorators = [
5696
5724
  { type: i0.Component, args: [{
5697
5725
  selector: 'BBSF-MapAutoComplete',
5698
- template: "<div class=\"b-control b-map-auto-complete\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" [hidden]=\"options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <input class=\"form-control bnsights-control {{options.ExtraClasses}} \"\r\n value=\"{{MapAutoCompleteModel}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n \r\n [class.is-invalid]=\"MapAutoCompleteFormControl.invalid && MapAutoCompleteFormControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\"\r\n matGoogleMapsAutocomplete #search\r\n (onAutocompleteSelected)=\"AutocompleteSelected($event)\"\r\n (onLocationSelected)=\"LocationSelected($event)\"\r\n (onGermanAddressMapped)=\"GermanAddressMapped($event)\" />\r\n\r\n \r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(MapAutoCompleteFormControl.invalid && MapAutoCompleteFormControl.touched)\">\r\n {{getErrorValidation(MapAutoCompleteFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"control-desc text-dark\">{{options.LabelDescription}}</div>\r\n </div>\r\n\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n",
5726
+ template: "<div class=\"b-control b-map-auto-complete\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" [hidden]=\"options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <input class=\"form-control bnsights-control {{options.ExtraClasses}} \"\r\n [value]=\"MapAutoCompleteModel.Text\"\r\n [address]=\"MapAutoCompleteModel.Text\"\r\n value=\"{{MapAutoCompleteModel.Text}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n [class.is-invalid]=\"MapAutoCompleteFormControl.invalid && MapAutoCompleteFormControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\"\r\n matGoogleMapsAutocomplete #search\r\n (onAutocompleteSelected)=\"AutocompleteSelected($event)\"\r\n (onLocationSelected)=\"LocationSelected($event)\"\r\n (onGermanAddressMapped)=\"GermanAddressMapped($event)\"/>\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(MapAutoCompleteFormControl.invalid && MapAutoCompleteFormControl.touched)\">\r\n {{getErrorValidation(MapAutoCompleteFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"control-desc text-dark\">{{options.LabelDescription}}</div>\r\n </div>\r\n\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n",
5699
5727
  styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
5700
5728
  },] }
5701
5729
  ];
@@ -7634,7 +7662,7 @@
7634
7662
  ngxTypeahead.NgxTypeaheadModule,
7635
7663
  core.AgmCoreModule.forRoot({
7636
7664
  // &language=${UtilityService.CurrentLanguage}
7637
- apiKey: "AIzaSyA75ojhZhEhDaO3vfn3mxTY32sq5flAwlY",
7665
+ apiKey: bbsfUtilities.environment.BBSF_GoogleMapKey,
7638
7666
  libraries: ['places'],
7639
7667
  }),
7640
7668
  googleMapsAutocomplete.MatGoogleMapsAutocompleteModule,