Skip to content

Commit

Permalink
docs(project): Updating CHANGELOG.md for v8.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyNahas committed Jun 2, 2022
1 parent 5fed9db commit 587cfdf
Show file tree
Hide file tree
Showing 26 changed files with 33 additions and 48 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
* fix(project): bug fixed with validation (5fed9db)
* fix(project): minor (5ddffb2)
* fix(project): upgraded universal (22221de)
* fix(project): upgraded angular material deps (4c898b3)
* fix(project): upgraded angular deps (0ac70db)
* fix(project): upgraded angular deps (ae74502)
* fix(project): minor (75aded9)
* fix(project): updated the lib (7432616)
* fix(project): updated the lib (22a13fb)
* fix(project): updated the lib (8f4d5da)

* fix(project): updated the lib (d69deb5)
* Merge pull request #326 from bittlerr/fix-address-components-error (4aaf185)
* fix(lib): safe access address components (03f8b42)
Expand Down

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@angular-material-extensions/google-maps-autocomplete",
"description": "Autocomplete input component and directive for google-maps built with angular and material design",
"version": "7.1.0",
"version": "8.0.0",
"homepage": "https://angular-material-extensions.github.io/google-maps-autocomplete",
"author": {
"name": "Anthony Nahas",
Expand Down Expand Up @@ -43,7 +43,7 @@
"release:patch": "../../../node_modules/.bin/release-it --patch --ci",
"release:minor": "../../../node_modules/.bin/release-it --minor --ci",
"release:major": "../../../node_modules/.bin/release-it --major --ci --no-git.requireCleanWorkingDir --dry-run",
"release:custom": "../../../node_modules/.bin/release-it 7.1.0 --ci --no-git.requireCleanWorkingDir",
"release:custom": "../../../node_modules/.bin/release-it 8.0.0 --ci --no-git.requireCleanWorkingDir",
"ng:test": "../../../node_modules/.bin/ng test @angular-material-extensions/google-maps-autocomplete",
"test": "../../../node_modules/.bin/jest --coverage",
"test:watch": "../../../node_modules/.bin/jest --coverage --watch"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import {
Output,
PLATFORM_ID
} from '@angular/core';
import {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';
import {ControlValueAccessor, FormControl, NG_VALIDATORS, Validators} from '@angular/forms';
import {MapsAPILoader} from '@agm/core';
import {isPlatformBrowser} from '@angular/common';
import {GermanAddress, Location} from '../interfaces';
import {isPlatformBrowser} from '@angular/common';
import PlaceResult = google.maps.places.PlaceResult;
import AutocompleteOptions = google.maps.places.AutocompleteOptions;

Expand All @@ -24,7 +24,7 @@ import AutocompleteOptions = google.maps.places.AutocompleteOptions;
exportAs: 'matGoogleMapsAutocomplete',
providers: [
{
provide: NG_VALUE_ACCESSOR,
provide: NG_VALIDATORS,
useExisting: forwardRef(() => MatGoogleMapsAutocompleteDirective),
multi: true
}
Expand Down Expand Up @@ -86,14 +86,14 @@ export class MatGoogleMapsAutocompleteDirective implements OnInit, ControlValueA
};

constructor(@Inject(PLATFORM_ID) public platformId: string,
// @Optional() @Self() public ngControl: NgControl,
public elemRef: ElementRef,
public mapsAPILoader: MapsAPILoader,
private cf: ChangeDetectorRef,
private ngZone: NgZone) {
}

ngOnInit(): void {
console.log('validator', this)
if (isPlatformBrowser(this.platformId)) {
const options: AutocompleteOptions = {
// types: ['address'],
Expand All @@ -114,6 +114,10 @@ export class MatGoogleMapsAutocompleteDirective implements OnInit, ControlValueA
}
}

validate(fc: FormControl) {
return fc.hasValidator(Validators.required) ? !!fc?.value : true;
}

@HostListener('change')
onChangeInputValue(): void {
const value = (this.elemRef.nativeElement as HTMLInputElement)?.value;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {forwardRef, NgModule} from '@angular/core';
import {FlexLayoutModule} from '@angular/flex-layout';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import {FormsModule, NG_VALUE_ACCESSOR, ReactiveFormsModule} from '@angular/forms';
import {MatIconModule} from '@angular/material/icon';
import {MatInputModule} from '@angular/material/input';
import {MatGoogleMapsAutocompleteDirective} from './directives/mat-google-maps-autocomplete.directive';
import {MatValidateAddressDirective} from './directives/address-validator/mat-address-validator.directive';
import {MatGoogleMapsAutocompleteComponent} from './component/mat-google-maps-autocomplete.component';
// tslint:disable-next-line:max-line-length
import {MatSearchGoogleMapsAutocompleteComponent} from './component/mat-search-google-maps-autocomplete/mat-search-google-maps-autocomplete.component';
import {MatGoogleMapsAutocompleteComponent, MatSearchGoogleMapsAutocompleteComponent} from './component';


@NgModule({
Expand All @@ -32,6 +31,13 @@ import {MatSearchGoogleMapsAutocompleteComponent} from './component/mat-search-g
MatGoogleMapsAutocompleteDirective,
MatValidateAddressDirective,
MatSearchGoogleMapsAutocompleteComponent
],
providers: [
// {
// provide: NG_VALUE_ACCESSOR,
// useExisting: forwardRef(() => MatGoogleMapsAutocompleteDirective),
// multi: true
// }
]
})
export class MatGoogleMapsAutocompleteModule {
Expand Down

0 comments on commit 587cfdf

Please sign in to comment.