places-autocomplete-svelte 2.1.1 → 2.1.2
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.
- package/README.md +10 -8
- package/dist/PlaceAutocomplete.svelte +6 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -116,10 +116,12 @@ const fetchFields = ['formattedAddress', 'addressComponents'];
|
|
|
116
116
|
{onError}
|
|
117
117
|
{onResponse}
|
|
118
118
|
{PUBLIC_GOOGLE_MAPS_API_KEY}
|
|
119
|
-
|
|
119
|
+
{requestParams}
|
|
120
120
|
{placeholder}
|
|
121
121
|
{autocompete}
|
|
122
|
-
{fetchFields}
|
|
122
|
+
{fetchFields}
|
|
123
|
+
bind:countries
|
|
124
|
+
/>
|
|
123
125
|
|
|
124
126
|
```
|
|
125
127
|
|
|
@@ -144,13 +146,13 @@ The `onError` event will be dispatched if there is an issue with the Google Maps
|
|
|
144
146
|
|
|
145
147
|
```svelte
|
|
146
148
|
<script>
|
|
147
|
-
|
|
149
|
+
// ... other imports
|
|
148
150
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
// Error handler
|
|
152
|
+
let pacError = '';
|
|
153
|
+
let onError = (error: string) => {
|
|
154
|
+
console.error(error);
|
|
155
|
+
pacError = error;
|
|
154
156
|
};
|
|
155
157
|
</script>
|
|
156
158
|
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
}
|
|
180
180
|
</script>
|
|
181
181
|
|
|
182
|
-
<svelte:window
|
|
182
|
+
<svelte:window onkeydown={onKeyDown} />
|
|
183
183
|
|
|
184
184
|
<section class="my-10">
|
|
185
185
|
<div class="grid grid-cols-1 lg:grid-cols-6 gap-x-4">
|
|
@@ -209,6 +209,11 @@
|
|
|
209
209
|
{placeholder}
|
|
210
210
|
autocomplete={autocompete}
|
|
211
211
|
aria-controls="options"
|
|
212
|
+
aria-autocomplete="list"
|
|
213
|
+
aria-owns="options"
|
|
214
|
+
aria-labelledby="search"
|
|
215
|
+
aria-label="Search"
|
|
216
|
+
aria-haspopup="listbox"
|
|
212
217
|
bind:value={request.input}
|
|
213
218
|
oninput={makeAcRequest}
|
|
214
219
|
/>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "places-autocomplete-svelte",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.2",
|
|
5
5
|
"description": "A lightweight and customizable Svelte component for easy integration of Google Maps Places Autocomplete (New API) in your Svelte/SvelteKit applications. Provides accessible autocomplete suggestions and detailed address retrieval.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"svelte",
|
|
@@ -68,27 +68,27 @@
|
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@sveltejs/adapter-auto": "^3.3.1",
|
|
71
|
-
"@sveltejs/adapter-cloudflare": "^4.
|
|
72
|
-
"@sveltejs/kit": "^2.
|
|
71
|
+
"@sveltejs/adapter-cloudflare": "^4.8.0",
|
|
72
|
+
"@sveltejs/kit": "^2.9.0",
|
|
73
73
|
"@sveltejs/package": "^2.3.7",
|
|
74
74
|
"@sveltejs/vite-plugin-svelte": "^4.0.1",
|
|
75
75
|
"@tailwindcss/typography": "^0.5.15",
|
|
76
76
|
"@types/eslint": "^9.6.1",
|
|
77
77
|
"autoprefixer": "^10.4.20",
|
|
78
|
-
"eslint": "^9.
|
|
78
|
+
"eslint": "^9.16.0",
|
|
79
79
|
"eslint-config-prettier": "^9.1.0",
|
|
80
|
-
"eslint-plugin-svelte": "^2.46.
|
|
80
|
+
"eslint-plugin-svelte": "^2.46.1",
|
|
81
81
|
"globals": "^15.12.0",
|
|
82
82
|
"postcss": "^8.4.49",
|
|
83
|
-
"prettier": "^3.
|
|
83
|
+
"prettier": "^3.4.1",
|
|
84
84
|
"prettier-plugin-svelte": "^3.3.2",
|
|
85
85
|
"publint": "^0.2.12",
|
|
86
|
-
"svelte": "^5.2.
|
|
86
|
+
"svelte": "^5.2.11",
|
|
87
87
|
"svelte-check": "^4.1.0",
|
|
88
88
|
"tailwindcss": "^3.4.15",
|
|
89
89
|
"tslib": "^2.8.1",
|
|
90
90
|
"typescript": "^5.7.2",
|
|
91
|
-
"typescript-eslint": "^8.
|
|
91
|
+
"typescript-eslint": "^8.16.0",
|
|
92
92
|
"vite": "^5.4.11"
|
|
93
93
|
},
|
|
94
94
|
"svelte": "./dist/index.js",
|