UNPKG

@asoftwareworld/form-builder-pro

Version:

ASW Form Builder Pro helps you with rapid development and designed web forms which includes several controls. The key feature of Form Builder is to make your content attractive and effective. We can customize our control at run time and preview the same b

1 lines 63.1 kB
{"version":3,"file":"asoftwareworld-form-builder-pro-form-control-gps.mjs","sources":["../../src/components/form-control/gps/google-map.service.ts","../../src/components/form-control/gps/gps-dialog.ts","../../src/components/form-control/gps/gps-dialog.html","../../src/components/form-control/gps/gps.ts","../../src/components/form-control/gps/gps.html","../../src/components/form-control/gps/gps.module.ts","../../src/components/form-control/gps/public_api.ts","../../src/components/form-control/gps/asoftwareworld-form-builder-pro-form-control-gps.ts"],"sourcesContent":["/**\n * @license\n * Copyright ASW (A Software World) All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file\n */\nimport { Injectable } from '@angular/core';\ndeclare const google: any;\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GoogleMapService {\n autocompleteService: any;\n private geoCoder: any;\n searchedAddress: any[] = [];\n latitude!: number;\n longitude!: number;\n placesService: any;\n\n setCurrentLocation(): void {\n this.geoCoder = new google.maps.Geocoder();\n this.latitude = 31.67431470650697;\n this.longitude = 75.64344802329514;\n if ('geolocation' in navigator) {\n navigator.geolocation.getCurrentPosition((position) => {\n this.latitude = position.coords.latitude ? position.coords.latitude : 31.67431470650697;\n this.longitude = position.coords.longitude ? position.coords.longitude : 75.64344802329514;\n this.getAddress(this.latitude, this.longitude);\n });\n }\n }\n\n getNearestAddress(): Promise<any> {\n this.placesService = new google.maps.places.PlacesService(document.createElement('div'));\n this.setCurrentLocation();\n const nearestAddress: any[] = [];\n return new Promise((resolve, reject) => {\n const userLocation = new google.maps.LatLng(this.latitude, this.longitude);\n const request = {\n location: userLocation,\n radius: 1500,\n types: ['establishment'],\n rankby: 'distance'\n };\n this.placesService.nearbySearch(request, (options: any[], status: any) => {\n if (status === google.maps.places.PlacesServiceStatus.OK) {\n options.map((element) => {\n const address = {\n id: element.place_id,\n label: element.name + ', ' + element.vicinity,\n alias: element.name,\n addressName: element.vicinity,\n latitude: element.geometry.location.lat(),\n longitude: element.geometry.location.lng(),\n icon: 'https://maps.gstatic.com/consumer/images/icons/2x/place_grey650.png'\n };\n nearestAddress.push(address);\n });\n this.searchedAddress = nearestAddress;\n resolve(this.searchedAddress);\n } else {\n reject(status);\n }\n });\n }).then();\n }\n\n getQueryPredictions(query: string): Promise<any> {\n this.autocompleteService = new google.maps.places.AutocompleteService();\n const request = {\n input: query\n };\n let resultAddress: any[] = [];\n return new Promise((resolve, reject) => {\n this.autocompleteService.getQueryPredictions(request, (options: any[], status: any) => {\n if (status === google.maps.places.PlacesServiceStatus.OK && options.length > 0) {\n options.map((element) => {\n const address = {\n id: element.place_id,\n label: element.structured_formatting.main_text + ', ' + element.structured_formatting.secondary_text,\n alias: element.structured_formatting.main_text,\n addressName: element.structured_formatting.secondary_text,\n icon: 'https://maps.gstatic.com/consumer/images/icons/2x/place_grey650.png'\n };\n resultAddress.push(address);\n });\n this.searchedAddress = resultAddress;\n resolve(this.searchedAddress);\n } else if (status === google.maps.places.PlacesServiceStatus.ZERO_RESULTS) {\n resultAddress = [];\n resolve(resultAddress);\n }\n });\n }).then();\n }\n\n getAddress(latitude: number, longitude: number): Promise<any> {\n this.geoCoder = new google.maps.Geocoder();\n this.searchedAddress = [];\n return new Promise((resolve, reject) => {\n this.geoCoder.geocode(\n {\n location: {\n lat: latitude,\n lng: longitude\n }\n },\n (results: any[], status: string) => {\n if (status === google.maps.GeocoderStatus.OK) {\n const element = results[0];\n const address = {\n id: element.place_id,\n label: element.formatted_address,\n alias: element.formatted_address,\n addressName: element.formatted_address,\n icon: 'https://maps.gstatic.com/consumer/images/icons/2x/place_grey650.png',\n latitude,\n longitude\n };\n this.searchedAddress.push(address);\n resolve(this.searchedAddress);\n } else {\n reject(status);\n }\n }\n );\n }).then();\n }\n\n getDetails(data: any): Promise<any> {\n let lat;\n let lng;\n return new Promise((resolve, reject) => {\n this.placesService.getDetails({ placeId: data.id, fields: ['geometry', 'icon'] }, (details: { geometry: { location: { lat: () => any; lng: () => any } }; icon: any }, status: any) => {\n if (status === google.maps.places.PlacesServiceStatus.OK) {\n lat = details.geometry.location.lat();\n lng = details.geometry.location.lng();\n const address = {\n id: data.id,\n label: data.label,\n alias: data.alias,\n addressName: data.addressName,\n latitude: lat,\n longitude: lng,\n icon: data.icon\n };\n resolve(address);\n } else {\n reject(status);\n }\n });\n }).then();\n }\n\n isLetter(value: string): boolean {\n const letters = /[a-z A-Z]/g;\n if (value && value.match(letters)) {\n return false;\n }\n return true;\n }\n}\n","/**\n * @license\n * Copyright ASW (A Software World) All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file\n */\n\nimport { Component, Inject, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { Constants, Icons } from '@asoftwareworld/form-builder-pro/common';\nimport { map, startWith } from 'rxjs/operators';\nimport { GoogleMapService } from './google-map.service';\nimport { GpsControl } from './gps-control';\n\n@Component({\n selector: 'asw-gps-dialog',\n templateUrl: './gps-dialog.html'\n})\nexport class AswGpsDialog implements OnInit {\n constants: any = Constants;\n icons = Icons;\n aswEditGpsForm!: FormGroup;\n status!: boolean;\n disabled!: boolean;\n filteredAddress: any;\n searchedAddress: any[] = [];\n control: any;\n constructor(\n private formBuilder: FormBuilder,\n private googleMapService: GoogleMapService,\n public dialogRef: MatDialogRef<AswGpsDialog>,\n @Inject(MAT_DIALOG_DATA) public data: any\n ) {}\n\n async ngOnInit(): Promise<void> {\n this.control = this.data.control;\n this.validateFormBuilder();\n this.searchedAddress = await this.googleMapService.getNearestAddress();\n this.editProperty(this.control);\n this.aswEditGpsForm\n .get('value')\n ?.valueChanges.pipe(\n startWith(''),\n map((address) => address)\n )\n .subscribe(async (address) => {\n await this.searchAddressFromExitingData(address);\n });\n }\n\n validateFormBuilder(): void {\n this.aswEditGpsForm = this.formBuilder.group({\n id: ['', [Validators.required]],\n customClass: [],\n tooltip: ['', []],\n label: ['', [Validators.required, Validators.minLength(2)]],\n latitude: ['', []],\n longitude: ['', []],\n value: ['', []],\n style: ['', [Validators.required]],\n isRequired: [false],\n isDisabled: [false]\n });\n }\n\n editProperty(control: GpsControl): void {\n this.aswEditGpsForm.setValue({\n id: control.id,\n customClass: control.customClass ?? '',\n latitude: control.latitude,\n longitude: control.longitude,\n value: control.value ?? '',\n tooltip: control.tooltip,\n label: control.label,\n style: control.style,\n isRequired: control.isRequired,\n isDisabled: control.isDisabled\n });\n }\n\n onNoClick(): void {\n this.dialogRef.close();\n }\n\n onSubmit(): void {\n if (this.aswEditGpsForm.invalid) {\n return;\n }\n this.aswEditGpsForm.value.controlType = this.control.controlType;\n this.aswEditGpsForm.value.guid = this.control.guid;\n this.dialogRef.close(this.aswEditGpsForm.value);\n }\n\n onStatusChange(event: any): void {\n this.status = event.checked ? true : false;\n if (event.checked === undefined) {\n this.status = event.target.checked ? true : false;\n }\n }\n\n private async searchAddressFromExitingData(address: string): Promise<void> {\n const filteredAddress = this.searchedAddress.find((x) => x.label === address);\n if (filteredAddress) {\n await this.selectedAddress(filteredAddress);\n } else {\n await this.getAddressFromGoogleApi(address);\n }\n }\n\n private async selectedAddress(filteredAddress: any): Promise<void> {\n if (!filteredAddress?.latitude && !filteredAddress?.longitude) {\n filteredAddress = await this.googleMapService.getDetails(filteredAddress);\n }\n this.aswEditGpsForm.patchValue({\n latitude: filteredAddress.latitude,\n longitude: filteredAddress.longitude\n });\n }\n\n async getAddressFromGoogleApi(address: string): Promise<void> {\n if (address) {\n this.searchedAddress = await this.googleMapService.getQueryPredictions(address);\n if (this.searchedAddress.length === 0) {\n const isValidSearch = this.googleMapService.isLetter(address);\n if (isValidSearch) {\n const lat = address.split(',')[0].trim();\n const lng = address.split(',')[1].trim();\n this.searchedAddress = await this.googleMapService.getAddress(Number(lat), Number(lng));\n } else {\n this.searchedAddress = [];\n this.aswEditGpsForm.get('value')?.setErrors({ searchAddress: true });\n }\n }\n this.filteredAddress = this.searchedAddress;\n } else {\n this.filteredAddress = this.searchedAddress;\n }\n }\n}\n","<div class=\"asw-dialog-header\">\r\n <div class=\"asw-edit-row-dialog\">\r\n <div class=\"asw-dialog-header clearfix\">\r\n <div class=\"asw-dialog-about\">\r\n <h1 mat-dialog-title class=\"asw-m-0\">{{'FormControl.Edit' | aswTranslate}} {{control.label | aswTranslate}}</h1>\r\n </div>\r\n </div>\r\n </div>\r\n <button mat-icon-button (click)=\"onNoClick()\" aria-label=\"Close dialog\" class=\"asw-mt-2 asw-me-2\">\r\n <div [innerHTML]=\"icons.close | aswSafeHtml\"></div>\r\n </button>\r\n</div>\r\n<form [formGroup]=\"aswEditGpsForm\" (ngSubmit)=\"onSubmit()\">\r\n <mat-dialog-content class=\"mat-typography\">\r\n <div class=\"asw-row\">\r\n <ng-container *ngIf=\"data.CSSFramework === 'material'; else bootstrap\">\r\n <ng-container *ngIf=\"!data.propertyPersonalization.includes('uniqueId')\">\r\n <div class=\"asw-col-md-12\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.UniqueId' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"id\"\r\n placeholder=\"{{'FormControl.UniqueId' | aswTranslate}}\"\r\n matTooltip=\"{{'FormControl.UniqueId' | aswTranslate}}\"\r\n formControlName=\"id\" required>\r\n <mat-error *ngFor=\"let validation of constants.accountValidationMessages.id\">\r\n <ng-container *ngIf=\"aswEditGpsForm.get('id')?.hasError(validation.type) && (aswEditGpsForm.get('id')?.dirty || aswEditGpsForm.get('id')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </ng-container>\r\n <div class=\"asw-col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.Label' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n placeholder=\"{{'FormControl.Label' | aswTranslate}}\"\r\n matTooltip=\"{{'FormControl.Label' | aswTranslate}}\"\r\n formControlName=\"label\" required>\r\n <mat-error *ngFor=\"let validation of constants.accountValidationMessages.label\">\r\n <ng-container *ngIf=\"aswEditGpsForm.get('label')?.hasError(validation.type) && (aswEditGpsForm.get('label')?.dirty || aswEditGpsForm.get('label')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.Tooltip' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n placeholder=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n matTooltip=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n formControlName=\"tooltip\">\r\n </mat-form-field>\r\n </div>\r\n <ng-container *ngIf=\"!data.propertyPersonalization.includes('customCSSClass')\">\r\n <div class=\"asw-col-md-12\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.CustomCSSClass' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"customClass\"\r\n placeholder=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n matTooltip=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n formControlName=\"customClass\">\r\n </mat-form-field>\r\n </div>\r\n </ng-container>\r\n <div class=\"asw-col-md-12\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.Style' | aswTranslate}}</mat-label>\r\n <mat-select formControlName=\"style\" matTooltip=\"{{'FormControl.SelectStyle' | aswTranslate}}\">\r\n <mat-option value=\"legacy\">Legacy</mat-option>\r\n <mat-option value=\"standard\">Standard</mat-option>\r\n <mat-option value=\"fill\">Fill</mat-option>\r\n <mat-option value=\"outline\">Outline</mat-option> \r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.Latitude' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"latitude\"\r\n placeholder=\"{{'FormControl.Latitude' | aswTranslate}}\"\r\n matTooltip=\"{{'FormControl.Latitude' | aswTranslate}}\"\r\n formControlName=\"latitude\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.Longitude' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"longitude\"\r\n placeholder=\"{{'FormControl.Longitude' | aswTranslate}}\"\r\n matTooltip=\"{{'FormControl.Longitude' | aswTranslate}}\"\r\n formControlName=\"longitude\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"asw-col-md-12\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.SearchLocation' | aswTranslate}}</mat-label>\r\n <input matInput\r\n aria-label=\"location\"\r\n [matAutocomplete]=\"auto\"\r\n formControlName=\"value\">\r\n <mat-autocomplete #auto=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let address of filteredAddress\" [value]=\"address.label\">\r\n <img class=\"example-option-img\" aria-hidden [src]=\"address.icon\" height=\"20\">\r\n <span>{{address.alias}}</span> \r\n <small> {{address.addressName}}</small>\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-error *ngFor=\"let validation of constants.accountValidationMessages.searchAddress\">\r\n <ng-container *ngIf=\"aswEditGpsForm.get('value')?.errors?.searchAddress\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"asw-col-md-4\">\r\n <mat-slide-toggle color=\"primary\"\r\n #isActive\r\n formControlName=\"isRequired\"\r\n (change)=\"onStatusChange($event)\">\r\n {{(status ? 'FormControl.Required' : 'FormControl.NotRequired') | aswTranslate}}\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"asw-col-md-4\">\r\n <mat-slide-toggle color=\"primary\"\r\n #isDisable\r\n formControlName=\"isDisabled\">\r\n {{'FormControl.Readonly' | aswTranslate}}\r\n </mat-slide-toggle>\r\n </div>\r\n </ng-container>\r\n <ng-template #bootstrap>\r\n <ng-container *ngIf=\"!data.propertyPersonalization.includes('uniqueId')\">\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label asw-invalid-label {{(aswEditGpsForm.get('id')?.invalid && (aswEditGpsForm.get('id')?.dirty || aswEditGpsForm.get('id')?.touched)) ? 'asw-red-color' : ''}}\">{{'FormControl.UniqueId' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"id\"\r\n class=\"asw-input-control\"\r\n [class.asw-is-invalid]=\"(aswEditGpsForm.get('id')?.invalid && (aswEditGpsForm.get('id')?.dirty || aswEditGpsForm.get('id')?.touched))\"\r\n matTooltip=\"{{'FormControl.UniqueId' | aswTranslate}}\"\r\n formControlName=\"id\" required>\r\n <div *ngFor=\"let validation of constants.accountValidationMessages.id\" class=\"invalid-feedback\">\r\n <ng-container *ngIf=\"aswEditGpsForm.get('id')?.hasError(validation.type) && (aswEditGpsForm.get('id')?.dirty || aswEditGpsForm.get('id')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label asw-invalid-label {{(aswEditGpsForm.get('label')?.invalid && (aswEditGpsForm.get('label')?.dirty || aswEditGpsForm.get('label')?.touched)) ? 'asw-red-color' : ''}}\">{{'FormControl.Label' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n class=\"asw-input-control\"\r\n [class.asw-is-invalid]=\"(aswEditGpsForm.get('label')?.invalid && (aswEditGpsForm.get('label')?.dirty || aswEditGpsForm.get('label')?.touched))\"\r\n matTooltip=\"{{'FormControl.Label' | aswTranslate}}\"\r\n formControlName=\"label\" required>\r\n <div *ngFor=\"let validation of constants.accountValidationMessages.label\" class=\"invalid-feedback\">\r\n <ng-container *ngIf=\"aswEditGpsForm.get('label')?.hasError(validation.type) && (aswEditGpsForm.get('label')?.dirty || aswEditGpsForm.get('label')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"!data.propertyPersonalization.includes('customCSSClass')\">\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label\">{{'FormControl.CustomCSSClass' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"customClass\"\r\n class=\"asw-input-control\"\r\n matTooltip=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n formControlName=\"customClass\">\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label\">{{'FormControl.Tooltip' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n class=\"asw-input-control\"\r\n matTooltip=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n formControlName=\"tooltip\">\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label\">{{'FormControl.Latitude' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"latitude\"\r\n class=\"asw-input-control\"\r\n matTooltip=\"{{'FormControl.Latitude' | aswTranslate}}\"\r\n formControlName=\"latitude\">\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label\">{{'FormControl.Longitude' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"longitude\"\r\n class=\"asw-input-control\"\r\n matTooltip=\"{{'FormControl.Longitude' | aswTranslate}}\"\r\n formControlName=\"longitude\">\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-12\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label\">{{'FormControl.SearchLocation' | aswTranslate}}</label>\r\n <input class=\"asw-input-control\"\r\n aria-label=\"location\"\r\n [matAutocomplete]=\"auto\"\r\n formControlName=\"value\">\r\n <mat-autocomplete #auto=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let address of filteredAddress\" [value]=\"address.label\">\r\n <img class=\"example-option-img\" aria-hidden [src]=\"address.icon\" height=\"20\">\r\n <span>{{address.alias}}</span> \r\n <small> {{address.addressName}}</small>\r\n </mat-option>\r\n </mat-autocomplete>\r\n <div *ngFor=\"let validation of constants.accountValidationMessages.searchAddress\">\r\n <ng-container *ngIf=\"aswEditGpsForm.get('value')?.errors?.searchAddress\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-4\">\r\n <div class=\"asw-mb-3\">\r\n <div class=\"asw-form-check asw-form-switch\">\r\n <input class=\"asw-form-check-input\" \r\n type=\"checkbox\" \r\n #isActive\r\n id=\"isActive\" \r\n formControlName=\"isRequired\"\r\n (change)=\"onStatusChange($event)\">\r\n <label class=\"asw-form-check-label\" for=\"isActive\">\r\n {{(status ? 'FormControl.Required' : 'FormControl.NotRequired') | aswTranslate}}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-4\">\r\n <div class=\"asw-mb-3\">\r\n <div class=\"asw-form-check asw-form-switch\">\r\n <input class=\"asw-form-check-input\" \r\n type=\"checkbox\"\r\n id=\"isDisable\" \r\n #isDisable\r\n formControlName=\"isDisabled\"\r\n (change)=\"onStatusChange($event)\">\r\n <label class=\"asw-form-check-label\" for=\"isDisable\">\r\n {{'FormControl.Readonly' | aswTranslate}}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </mat-dialog-content>\r\n <mat-dialog-actions align=\"end\">\r\n <button type=\"button\"\r\n class=\"asw-button asw-button-danger asw-mb-1 asw-me-2\"\r\n (click)=\"onNoClick()\">\r\n {{'FormControl.No' | aswTranslate}}\r\n </button>\r\n <button type=\"submit\"\r\n class=\"asw-button asw-button-primary asw-mb-1\"\r\n cdkFocusInitial>\r\n {{'FormControl.Yes' | aswTranslate}}\r\n </button>\r\n </mat-dialog-actions>\r\n</form>\r\n\r\n","/**\n * @license\n * Copyright ASW (A Software World) All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file\n */\n\nimport { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { CSSFrameworkEnum } from '@asoftwareworld/form-builder-pro/api';\nimport { Constants, Icons } from '@asoftwareworld/form-builder-pro/common';\nimport { AswConfirmDialog } from '@asoftwareworld/form-builder-pro/form-control/confirm-dialog';\nimport { GoogleMapService } from './google-map.service';\nimport { GpsControl } from './gps-control';\nimport { AswGpsDialog } from './gps-dialog';\n\n@Component({\n selector: 'asw-gps',\n templateUrl: './gps.html'\n})\nexport class AswGps implements OnInit {\n searchedAddress: any[] = [];\n filteredAddress: any;\n constants: any = Constants;\n icons = Icons;\n @ViewChild('input') gpsForm!: HTMLFormElement;\n /**\n * Button control\n */\n @Input() control: GpsControl | null = null;\n @Input() CSSFramework: CSSFrameworkEnum = CSSFrameworkEnum.Material;\n @Input() isPreviewTemplate = false;\n @Input() propertyPersonalization: string[] = [];\n\n @Output() gpsUpdateEvent = new EventEmitter<GpsControl>();\n @Output() gpsDeleteEvent = new EventEmitter<GpsControl>();\n @Output() gpsAddressChange = new EventEmitter<GpsControl>();\n @Output() duplicateControl = new EventEmitter<GpsControl>();\n\n constructor(\n public dialog: MatDialog,\n private googleMapService: GoogleMapService\n ) {}\n\n async ngOnInit(): Promise<void> {\n if (this.control?.latitude && this.control.longitude && !this.control.value) {\n const searchedAddress = await this.googleMapService.getAddress(Number(this.control?.latitude), Number(this.control.longitude));\n this.control.value = searchedAddress[0].label;\n }\n this.searchedAddress = await this.googleMapService.getNearestAddress();\n this.filteredAddress = this.searchedAddress;\n }\n\n /**\n * Delete gps control based on control index\n * @param control gps control items\n */\n deleteGpsDialog(control: GpsControl): void {\n const dialogRef = this.dialog.open(AswConfirmDialog, {\n width: '350px',\n data: { name: control.controlType, message: this.constants.messages.waringMessage }\n });\n dialogRef.afterClosed().subscribe((result) => {\n if (result !== undefined) {\n this.gpsDeleteEvent.emit(control);\n }\n });\n }\n\n editGpsDialog(control: GpsControl): void {\n const dialogRef = this.dialog.open(AswGpsDialog, {\n width: '60%',\n disableClose: true,\n data: { control, CSSFramework: this.CSSFramework, propertyPersonalization: this.propertyPersonalization }\n });\n dialogRef.afterClosed().subscribe((result) => {\n if (result !== undefined) {\n this.gpsUpdateEvent.emit(result);\n }\n });\n }\n\n async onChange(address: string, control: GpsControl): Promise<void> {\n const filteredAddress = this.searchedAddress.find((x) => x.label === address);\n if (filteredAddress) {\n await this.selectedAddress(filteredAddress);\n } else {\n await this.getAddressFromGoogleApi(address);\n }\n this.gpsAddressChange.emit(control);\n }\n\n private async selectedAddress(filteredAddress: any): Promise<void> {\n if (!filteredAddress?.latitude && !filteredAddress?.longitude) {\n filteredAddress = await this.googleMapService.getDetails(filteredAddress);\n }\n if (this.control) {\n this.control.latitude = filteredAddress.latitude;\n this.control.longitude = filteredAddress.longitude;\n this.control.value = filteredAddress.label;\n }\n }\n\n async getAddressFromGoogleApi(address: string): Promise<void> {\n if (address) {\n this.searchedAddress = await this.googleMapService.getQueryPredictions(address);\n if (this.searchedAddress.length === 0) {\n const isValidSearch = this.googleMapService.isLetter(address);\n if (isValidSearch) {\n const lat = address.split(',')[0].trim();\n const lng = address.split(',')[1].trim();\n this.searchedAddress = await this.googleMapService.getAddress(Number(lat), Number(lng));\n } else {\n this.searchedAddress = [];\n this.gpsForm.control.setErrors({ searchAddress: true });\n }\n }\n this.filteredAddress = this.searchedAddress;\n } else {\n this.filteredAddress = this.searchedAddress;\n }\n }\n\n duplicateGpsControl(control: GpsControl): void {\n this.duplicateControl.emit(control);\n }\n}\n","<ng-container *ngIf=\"control as control\">\r\n <ng-container *ngIf=\"CSSFramework === 'material'; else bootstrap\">\r\n <mat-form-field [appearance]=\"control.style\" class=\"asw-width-100 {{control.customClass}}\">\r\n <mat-label>{{control.label | aswTranslate}}</mat-label>\r\n <input matInput\r\n [id]=\"control.id\"\r\n [placeholder]=\"control.label | aswTranslate\"\r\n [matAutocomplete]=\"auto\"\r\n [(ngModel)]=\"control.value\"\r\n #input=\"ngModel\"\r\n (ngModelChange)=\"onChange($event, control)\"\r\n [matTooltip]=\"control.tooltip | aswTranslate\"\r\n [required]=\"control.isRequired\"\r\n [disabled]=\"control.isDisabled ? true : false\">\r\n <mat-autocomplete #auto=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let address of filteredAddress\" [value]=\"address.label\">\r\n <img class=\"example-option-img\" aria-hidden [src]=\"address.icon\" height=\"20\">\r\n <span>{{address.alias}}</span> \r\n <small> {{address.addressName}}</small>\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-error *ngIf=\"input.invalid && (input.dirty || input.touched)\">\r\n <ng-container *ngIf=\"input?.errors?.required\">\r\n {{control.label | aswTranslate}} {{'FormControl.IsRequired' | aswTranslate}}\r\n </ng-container>\r\n <ng-container *ngIf=\"input?.errors?.searchAddress\">\r\n Sorry, {{control.value}} did not found.\r\n </ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </ng-container>\r\n <ng-template #bootstrap>\r\n <div class=\"asw-mb-3\">\r\n <label for=\"{{control.id}}\" \r\n class=\"asw-input-label {{(input.invalid && (input.dirty || input.touched)) ? 'asw-red-color' : ''}}\"\r\n [class.asw-invalid-label]=\"control.isRequired\">{{control.label | aswTranslate}}</label>\r\n <input\r\n [id]=\"control.id\"\r\n [placeholder]=\"control.label | aswTranslate\"\r\n [matAutocomplete]=\"auto\"\r\n [(ngModel)]=\"control.value\"\r\n #input=\"ngModel\"\r\n (ngModelChange)=\"onChange($event, control)\"\r\n [matTooltip]=\"control.tooltip | aswTranslate\"\r\n class=\"asw-input-control {{control.customClass}}\"\r\n [class.asw-is-invalid]=\"input.invalid && (input.dirty || input.touched)\"\r\n [required]=\"control.isRequired\"\r\n [disabled]=\"control.isDisabled ? true : false\">\r\n <mat-autocomplete #auto=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let address of filteredAddress\" [value]=\"address.label\">\r\n <img class=\"example-option-img\" aria-hidden [src]=\"address.icon\" height=\"20\">\r\n <span>{{address.alias}}</span> \r\n <small> {{address.addressName}}</small>\r\n </mat-option>\r\n </mat-autocomplete>\r\n <div *ngIf=\"input.invalid && (input.dirty || input.touched)\" class=\"invalid-feedback\">\r\n <ng-container *ngIf=\"input?.errors?.required\">\r\n {{control.label | aswTranslate}} {{'FormControl.IsRequired' | aswTranslate}}\r\n </ng-container>\r\n <ng-container *ngIf=\"input?.errors?.searchAddress\">\r\n Sorry, {{control.value}} did not found.\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <div class=\"asw-row\" *ngIf=\"isPreviewTemplate\">\r\n <div class=\"asw-col-md-12\" align=\"right\">\r\n <button mat-icon-button \r\n type=\"button\" \r\n matTooltip=\"{{'FormControl.Duplicate' | aswTranslate}}\" \r\n [matTooltipPosition]=\"'below'\" \r\n (click)=\"duplicateGpsControl(control)\">\r\n <div [innerHTML]=\"icons.contentCopy | aswSafeHtml\"></div>\r\n </button>\r\n <button mat-icon-button \r\n type=\"button\" \r\n matTooltip=\"{{'FormControl.Edit' | aswTranslate}}\" \r\n [matTooltipPosition]=\"'below'\" \r\n (click)=\"editGpsDialog(control)\">\r\n <div [innerHTML]=\"icons.edit | aswSafeHtml\"></div>\r\n </button>\r\n <button mat-icon-button \r\n type=\"button\" \r\n matTooltip=\"{{'FormControl.Delete' | aswTranslate}}\" \r\n [matTooltipPosition]=\"'below'\" \r\n (click)=\"deleteGpsDialog(control)\">\r\n <div [innerHTML]=\"icons.delete2 | aswSafeHtml\"></div>\r\n </button>\r\n </div>\r\n </div>\r\n</ng-container>","/**\n * @license\n * Copyright ASW (A Software World) All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file\n */\n\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { AswPipeModule, MaterialModule } from '@asoftwareworld/form-builder-pro/common';\nimport { AswTranslateModule } from '@asoftwareworld/form-builder-pro/core';\nimport { AswConfirmDialogModule } from '@asoftwareworld/form-builder-pro/form-control/confirm-dialog';\n\nimport { AswGps } from './gps';\nimport { AswGpsDialog } from './gps-dialog';\n\n@NgModule({\n imports: [CommonModule, FormsModule, ReactiveFormsModule, MaterialModule, AswConfirmDialogModule, AswTranslateModule, AswPipeModule],\n declarations: [AswGps, AswGpsDialog],\n exports: [AswGps, AswGpsDialog]\n})\nexport class AswGpsModule {}\n","/**\n * @license\n * Copyright ASW (A Software World) All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file\n */\n\nexport * from './gps';\nexport * from './gps-dialog';\nexport * from './gps-control';\nexport * from './google-map.service';\nexport * from './gps.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i2.GoogleMapService","i3","i4","i10","i11","i12"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAMG;MAOU,gBAAgB,CAAA;AACzB,IAAA,mBAAmB;AACX,IAAA,QAAQ;IAChB,eAAe,GAAU,EAAE;AAC3B,IAAA,QAAQ;AACR,IAAA,SAAS;AACT,IAAA,aAAa;IAEb,kBAAkB,GAAA;QACd,IAAI,CAAC,QAAQ,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE;AAC1C,QAAA,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