@pretto/places 0.9.0 → 0.10.0

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.
@@ -10,10 +10,11 @@ interface AddressSearchResult {
10
10
  export interface AddressApiResult {
11
11
  properties: {
12
12
  label: string;
13
+ name: string;
13
14
  postcode: string;
14
15
  city: string;
15
- housenumber: string;
16
- street: string;
16
+ housenumber?: string;
17
+ street?: string;
17
18
  };
18
19
  }
19
20
  interface Options {
@@ -1 +1 @@
1
- {"version":3,"file":"addressSearch.d.ts","sourceRoot":"","sources":["../src/addressSearch.ts"],"names":[],"mappings":"AAAA,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;QACf,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE;QACV,KAAK,EAAE,MAAM,CAAA;QACb,QAAQ,EAAE,MAAM,CAAA;QAChB,IAAI,EAAE,MAAM,CAAA;QACZ,WAAW,EAAE,MAAM,CAAA;QACnB,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;CACF;AAED,UAAU,OAAO;IACf,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd;AAED,aAAK,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,mBAAmB,EAAE,GAAG,MAAM,CAAC,CAAA;AAEnG,eAAO,MAAM,GAAG,EAAE,aAiCjB,CAAA"}
1
+ {"version":3,"file":"addressSearch.d.ts","sourceRoot":"","sources":["../src/addressSearch.ts"],"names":[],"mappings":"AAAA,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;QACf,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE;QACV,KAAK,EAAE,MAAM,CAAA;QACb,IAAI,EAAE,MAAM,CAAA;QACZ,QAAQ,EAAE,MAAM,CAAA;QAChB,IAAI,EAAE,MAAM,CAAA;QACZ,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;CACF;AAED,UAAU,OAAO;IACf,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd;AAED,aAAK,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,mBAAmB,EAAE,GAAG,MAAM,CAAC,CAAA;AAEnG,eAAO,MAAM,GAAG,EAAE,aA+BjB,CAAA"}
package/dist/index.js CHANGED
@@ -150,16 +150,14 @@ const get$1 = (search, options) => __awaiter(void 0, void 0, void 0, function* (
150
150
  return Promise.reject(response);
151
151
  const result = yield response.json();
152
152
  return result.features.reduce((acc, { properties }) => {
153
- if (!properties.street)
154
- return acc;
155
153
  return [
156
154
  ...acc,
157
155
  {
158
- label: `${properties.label} (${properties.postcode})`,
156
+ label: `${properties.name} (${properties.postcode})`,
159
157
  value: {
160
158
  city: properties.city,
161
159
  country,
162
- street: `${properties.housenumber || ''} ${properties.street}`,
160
+ street: `${properties.name}`,
163
161
  zipcode: properties.postcode,
164
162
  },
165
163
  },
package/dist/module.js CHANGED
@@ -140,16 +140,14 @@ const get$1 = (search, options) => __awaiter(void 0, void 0, void 0, function* (
140
140
  return Promise.reject(response);
141
141
  const result = yield response.json();
142
142
  return result.features.reduce((acc, { properties }) => {
143
- if (!properties.street)
144
- return acc;
145
143
  return [
146
144
  ...acc,
147
145
  {
148
- label: `${properties.label} (${properties.postcode})`,
146
+ label: `${properties.name} (${properties.postcode})`,
149
147
  value: {
150
148
  city: properties.city,
151
149
  country,
152
- street: `${properties.housenumber || ''} ${properties.street}`,
150
+ street: `${properties.name}`,
153
151
  zipcode: properties.postcode,
154
152
  },
155
153
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pretto/places",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",