Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dpc-sdp/myvic-addresssearch

Package Overview
Dependencies
Maintainers
4
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dpc-sdp/myvic-addresssearch - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

0

__tests__/AddressSearch.test.js

@@ -0,0 +0,0 @@ import { mount } from '@vue/test-utils'

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [1.4.2](https://github.com/dpc-sdp/myvictoria-vic-gov-au/tree/master/packages/AddressSearch/compare/v1.4.0...v1.4.2) (2020-10-07)
**Note:** Version bump only for package @dpc-sdp/myvic-addresssearch
## [1.4.1](https://github.com/dpc-sdp/myvictoria-vic-gov-au/tree/master/packages/AddressSearch/compare/v1.4.0...v1.4.1) (2020-09-25)

@@ -8,0 +16,0 @@

@@ -0,0 +0,0 @@ import AddressSearch from './index.vue'

6

package.json
{
"name": "@dpc-sdp/myvic-addresssearch",
"version": "1.4.1",
"version": "1.4.2",
"description": "An address search component for Victoria.",

@@ -13,6 +13,6 @@ "license": "Apache-2.0",

"dependencies": {
"@dpc-sdp/myvic-autocomplete": "1.4.1",
"@dpc-sdp/myvic-autocomplete": "1.4.2",
"axios": "^0.19.2"
},
"gitHead": "0e30b4c647e4238783318428b50867b365a9b44a"
"gitHead": "3895f043c6625cbd56d41fd601d675c1ddcba49c"
}

@@ -0,0 +0,0 @@ # @dpc-sdp/myvic-addresssearch

@@ -0,0 +0,0 @@ export const addressSearchTemplate = `

@@ -10,8 +10,10 @@ import axios from 'axios'

const fetchData = async (request) => {
const response = await axios.get(request)
const VICMAP_ADDRESS_API = 'https://api.vic.gov.au:443/delwp/address/v1/suggestions?query='
const fetchData = async (request, headers) => {
const response = await axios.get(request, headers)
return response
}
export const getAddressSuggestions = async (provider, query, mapboxGeocoderParams) => {
export const getAddressSuggestions = async (provider, query, mapboxGeocoderParams, vicmapAddressAPIKey) => {
if (provider === 'DELWP') {

@@ -35,2 +37,13 @@ const response = await fetchData(SUGGEST_REQUEST + encodeURIComponent(query))

return addresses
} else if (provider === 'VicmapAddressAPI') {
const response = await fetchData(VICMAP_ADDRESS_API + encodeURIComponent(query), {
headers: { 'apiKey': vicmapAddressAPIKey }
})
const addresses = response.data.suggestions.map(x => (
{
...x,
name: capitalize(x.label)
}
))
return addresses
} else {

@@ -54,2 +67,11 @@ return []

}
} else if (provider === 'VicmapAddressAPI') {
return {
...item,
address: item.label,
location: {
x: item.longitude,
y: item.latitude
}
}
} else {

@@ -56,0 +78,0 @@ return {}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc