@ta-interaktiv/react-municipality-search 2.2.0 → 2.2.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 CHANGED
@@ -1,11 +1,85 @@
1
1
  # `@ta-interaktiv/react-municipality-search`
2
2
 
3
- > TODO: description
3
+ A React component for searching Swiss municipalities by name or postal code (ZIP). The component provides autocomplete functionality with smart ranking, supports multiple locales (DE/FR), and can remember previously selected municipalities.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ bun add @ta-interaktiv/react-municipality-search
9
+ ```
4
10
 
5
11
  ## Usage
6
12
 
13
+ ```tsx
14
+ import { MunicipalitySearch } from '@ta-interaktiv/react-municipality-search';
15
+
16
+ function MyComponent() {
17
+ const handleSelection = (municipality) => {
18
+ console.log('Selected:', municipality.NORMGEMEINDE, municipality.PLZ4);
19
+ };
20
+
21
+ return (
22
+ <MunicipalitySearch
23
+ municipalityData="2021v3"
24
+ locale="de"
25
+ onSelectionHandler={handleSelection}
26
+ />
27
+ );
28
+ }
7
29
  ```
8
- const reactMunicipalitySearch = require('@ta-interaktiv/react-municipality-search');
9
30
 
10
- // TODO: DEMONSTRATE API
31
+ ## Props
32
+
33
+ | Prop | Type | Default | Description |
34
+ |------|------|---------|-------------|
35
+ | `municipalityData` | `string` | `"2021v3"` | Which year/version of municipality data to use (see [available data](https://tamedia-discovery-municipalities.s3.eu-central-1.amazonaws.com/index.html)) |
36
+ | `locale` | `"de" \| "fr"` | `"de"` | Locale for UI strings |
37
+ | `onSelectionHandler` | `(municipality: Municipality) => void` | *required* | Callback when user selects a municipality |
38
+ | `placeholder` | `string` | *(locale-based)* | Placeholder text for the search input |
39
+ | `dedupe` | `boolean` | `false` | Deduplicate municipalities by name (ignoring ZIP) |
40
+ | `resetOnSelect` | `boolean` | `false` | Reset the search after selection |
41
+ | `showLastSelectedMunicipalities` | `boolean` | `false` | Show previously selected municipalities on mount |
42
+ | `numberOfLastSelectedMunicipalities` | `number` | `1` | How many recent municipalities to show |
43
+ | `iconOnRightSide` | `boolean` | `false` | Position search icon on the right side |
44
+ | `maxResults` | `number` | `10` | Maximum number of results to display |
45
+ | `customMunicipalities` | `Municipality[]` | `undefined` | Use custom municipality data instead of fetching |
46
+ | `selectedMunicipality` | `Municipality` | `undefined` | Pre-selected municipality (read-only mode) |
47
+ | `selectedMunicipalityId` | `number` | `undefined` | GDENR of pre-selected municipality |
48
+ | `onCloseHandler` | `() => void` | `undefined` | Handler for close button in pre-selected mode |
49
+ | `inputBackgroundColor` | `string` | `"var(--site-background)"` | Background color of input field |
50
+ | `resultBackgroundColor` | `string` | `"var(--site-background)"` | Background color of results dropdown |
51
+ | `propertyToSearch` | `keyof Municipality` | `"NORMGEMEINDE"` | Which municipality property to search (must be string) |
52
+
53
+ ## Available Municipality Data
54
+
55
+ View all available municipality data files and versions at:
56
+ **https://tamedia-discovery-municipalities.s3.eu-central-1.amazonaws.com/index.html**
57
+
58
+ Available data includes:
59
+ - Year-specific datasets (e.g., `20230101_de`, `20240101_fr`)
60
+ - Latest versions (`latest_de`, `latest_fr`)
61
+ - Custom regional datasets (e.g., `24h_municipalities`, `zrz_municipalities`)
62
+ - Versions with/without ZIP codes (`_nozip` suffix)
63
+
64
+ ## Municipality Type
65
+
66
+ ```typescript
67
+ interface Municipality {
68
+ GDENR: number; // Municipality number (BFS-Nr)
69
+ ORTNAME?: string; // Place name
70
+ PLZ4?: number; // 4-digit postal code
71
+ PLZ6?: number; // 6-digit postal code
72
+ GDENAMK?: string; // Short municipality name
73
+ KTKZ: string; // Canton abbreviation
74
+ NORMORTSNAME?: string; // Normalized place name
75
+ NORMGEMEINDE: string; // Normalized municipality name
76
+ URL?: string; // Optional URL
77
+ }
11
78
  ```
79
+
80
+ ## Search Behavior
81
+
82
+ - **By ZIP code**: Enter numbers (e.g., "8000" or "3000") to search postal codes
83
+ - **By name**: Enter letters (e.g., "Zürich" or "Bern") to search municipality/place names
84
+ - Results are ranked by relevance: exact matches first, then word matches, then partial matches
85
+ - Minimum 2 characters required to trigger search
package/dist/index.js CHANGED
@@ -173,7 +173,7 @@ var MunicipalitySearch = (function (_super) {
173
173
  }
174
174
  }
175
175
  else if (startsWithNumber.test(searchTerm)) {
176
- results = municipalities.filter(function (municipality) { var _a; return RegExp("^" + searchTerm).test(((_a = municipality.PLZ4) !== null && _a !== void 0 ? _a : '').toString()); });
176
+ results = municipalities.filter(function (municipality) { var _a; return RegExp("^".concat(searchTerm)).test(((_a = municipality.PLZ4) !== null && _a !== void 0 ? _a : '').toString()); });
177
177
  if (results.length < 1) {
178
178
  _this.setState({ error: 'error.noResultsByZip' });
179
179
  }
@@ -181,7 +181,7 @@ var MunicipalitySearch = (function (_super) {
181
181
  else if (containsOnlyLetters.test(searchTerm)) {
182
182
  var sanitizedSearchTerm = searchTerm.replace('.', '\\.');
183
183
  var r_1 = RegExp(sanitizedSearchTerm, 'i');
184
- var exactWordRegex_1 = RegExp("\\b" + sanitizedSearchTerm + "\\b", 'i');
184
+ var exactWordRegex_1 = RegExp("\\b".concat(sanitizedSearchTerm, "\\b"), 'i');
185
185
  var rankResults = function (searchTerm, arrayToSort) {
186
186
  return arrayToSort.sort(function (a, b) {
187
187
  var _a, _b;
@@ -211,7 +211,7 @@ var MunicipalitySearch = (function (_super) {
211
211
  window.dataLayer.push({
212
212
  event: 'Interactions',
213
213
  event_action: 'input',
214
- event_label: "search:for_" + searchTerm + ":results_" + results.length,
214
+ event_label: "search:for_".concat(searchTerm, ":results_").concat(results.length),
215
215
  });
216
216
  }
217
217
  return _this.removeDuplicates(results, searchTerm);
@@ -265,7 +265,7 @@ var MunicipalitySearch = (function (_super) {
265
265
  console.log(e);
266
266
  console.warn('🍪 cookies of selectedMunicipalities is not available');
267
267
  }
268
- var ordered = __spreadArray(__spreadArray([], __read(munisFromLocalStorage)), __read(munisFromCookies)).sort(function (a, b) {
268
+ var ordered = __spreadArray(__spreadArray([], __read(munisFromLocalStorage), false), __read(munisFromCookies), false).sort(function (a, b) {
269
269
  if (b.timestamp && a.timestamp) {
270
270
  return b.timestamp - a.timestamp;
271
271
  }
@@ -309,7 +309,7 @@ var MunicipalitySearch = (function (_super) {
309
309
  (_this.props.dedupe ? '' : muni.PLZ4),
310
310
  muni,
311
311
  ];
312
- })).values())).reverse()
312
+ })).values()), false).reverse()
313
313
  .sort(function (a, b) {
314
314
  if (b.timestamp && a.timestamp) {
315
315
  return b.timestamp - a.timestamp;
@@ -337,11 +337,11 @@ var MunicipalitySearch = (function (_super) {
337
337
  useLegacy && console.log('Municipality search: using legacy endpoint 👴');
338
338
  var API_BASE_URL = useLegacy
339
339
  ? 'https://interaktiv.tagesanzeiger.ch/static/gemeindesuche/'
340
- : 'https://atm-municipality-search.s3.eu-west-1.amazonaws.com/';
341
- return fetch(API_BASE_URL + (_this.props.municipalityData + ".json"))
340
+ : 'https://tamedia-discovery-municipalities.s3.eu-central-1.amazonaws.com/';
341
+ return fetch(API_BASE_URL + "".concat(_this.props.municipalityData, ".json"))
342
342
  .then(function (res) {
343
343
  if (!res.ok) {
344
- throw new MunicipalityDownloadError("Download error: " + res.status + ": " + res.statusText + ".");
344
+ throw new MunicipalityDownloadError("Download error: ".concat(res.status, ": ").concat(res.statusText, "."));
345
345
  }
346
346
  return res.json();
347
347
  })
@@ -383,7 +383,7 @@ var MunicipalitySearch = (function (_super) {
383
383
  map.set(((_b = v.PLZ4) !== null && _b !== void 0 ? _b : '') + ((_c = v.ORTNAME) !== null && _c !== void 0 ? _c : '') + v.GDENR, v);
384
384
  }
385
385
  });
386
- var result = __spreadArray([], __read(map.values())).reduce(function (acc, cur) {
386
+ var result = __spreadArray([], __read(map.values()), false).reduce(function (acc, cur) {
387
387
  var _a, _b;
388
388
  if (((_a = cur.GDENAMK) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === searchTerm.toLowerCase() ||
389
389
  ((_b = cur.ORTNAME) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === searchTerm.toLowerCase()) {
@@ -500,17 +500,14 @@ var MunicipalitySearch = (function (_super) {
500
500
  var Icon = styled.i(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n cursor: ", ";\n position: absolute;\n top: 50%;\n ", "\n padding-left: 0.8em;\n transform: translateY(-50%);\n display: flex;\n opacity: 0.5;\n transition: opacity 0.5s ease-in-out;\n animation: fromLeft 0.3s ease-in-out;\n @keyframes fromLeft {\n 0% {\n transform: translateY(-50%) translateX(-10px);\n opacity: 0;\n }\n 100% {\n transform: translateY(-50%) translateX(0);\n }\n }\n &#search-closing-icon {\n &:hover {\n opacity: 1;\n }\n animation: fromRight 0.3s ease-in-out;\n @keyframes fromRight {\n 0% {\n transform: translateY(-50%) translateX(10px);\n opacity: 0;\n }\n 100% {\n transform: translateY(-50%) translateX(0);\n }\n }\n }\n"], ["\n cursor: ", ";\n position: absolute;\n top: 50%;\n ", "\n padding-left: 0.8em;\n transform: translateY(-50%);\n display: flex;\n opacity: 0.5;\n transition: opacity 0.5s ease-in-out;\n animation: fromLeft 0.3s ease-in-out;\n @keyframes fromLeft {\n 0% {\n transform: translateY(-50%) translateX(-10px);\n opacity: 0;\n }\n 100% {\n transform: translateY(-50%) translateX(0);\n }\n }\n &#search-closing-icon {\n &:hover {\n opacity: 1;\n }\n animation: fromRight 0.3s ease-in-out;\n @keyframes fromRight {\n 0% {\n transform: translateY(-50%) translateX(10px);\n opacity: 0;\n }\n 100% {\n transform: translateY(-50%) translateX(0);\n }\n }\n }\n"])), function (props) { return (props.$isClickable ? 'pointer' : 'default'); }, function (props) { return (props.$isRight ? 'right: 0; padding-right: 0.8em;' : ''); });
501
501
  var MunicipalitySearchContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n --border-radius: 0.3em;\n font-size: 18px;\n font-family: var(--font-plex);\n @media screen and (max-width: 599px) {\n max-width: 100%;\n }\n max-width: 300px;\n width: 100%;\n color: inherit;\n position: relative;\n"], ["\n --border-radius: 0.3em;\n font-size: 18px;\n font-family: var(--font-plex);\n @media screen and (max-width: 599px) {\n max-width: 100%;\n }\n max-width: 300px;\n width: 100%;\n color: inherit;\n position: relative;\n"])));
502
502
  var InputRow = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: center;\n input:focus ~ i {\n opacity: 1;\n }\n .ui.input {\n width: 100%;\n max-width: 100%;\n transition: all 0.5s ease-in-out;\n }\n"], ["\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: center;\n input:focus ~ i {\n opacity: 1;\n }\n .ui.input {\n width: 100%;\n max-width: 100%;\n transition: all 0.5s ease-in-out;\n }\n"])));
503
- var FlexInput = styled.input(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n // reset the default input styles\n color: inherit;\n background-color: ", ";\n border: solid 1px #7e7e7e7e;\n border-radius: var(--border-radius);\n box-shadow: none;\n font-size: 1em;\n outline: none;\n transition: all 0.3s ease-in-out;\n padding: 0.5em;\n padding-left: ", ";\n margin: 0;\n width: 100%;\n display: flex;\n &:disabled {\n opacity: 0.5;\n }\n &::placeholder {\n color: inherit;\n opacity: 0.5;\n }\n"], ["\n // reset the default input styles\n color: inherit;\n background-color: ",
504
- ";\n border: solid 1px #7e7e7e7e;\n border-radius: var(--border-radius);\n box-shadow: none;\n font-size: 1em;\n outline: none;\n transition: all 0.3s ease-in-out;\n padding: 0.5em;\n padding-left: ",
505
- ";\n margin: 0;\n width: 100%;\n display: flex;\n &:disabled {\n opacity: 0.5;\n }\n &::placeholder {\n color: inherit;\n opacity: 0.5;\n }\n"])), function (_a) {
503
+ var FlexInput = styled.input(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n // reset the default input styles\n color: inherit;\n background-color: ", ";\n border: solid 1px #7e7e7e7e;\n border-radius: var(--border-radius);\n box-shadow: none;\n font-size: 1em;\n outline: none;\n transition: all 0.3s ease-in-out;\n padding: 0.5em;\n padding-left: ", ";\n margin: 0;\n width: 100%;\n display: flex;\n &:disabled {\n opacity: 0.5;\n }\n &::placeholder {\n color: inherit;\n opacity: 0.5;\n }\n"], ["\n // reset the default input styles\n color: inherit;\n background-color: ", ";\n border: solid 1px #7e7e7e7e;\n border-radius: var(--border-radius);\n box-shadow: none;\n font-size: 1em;\n outline: none;\n transition: all 0.3s ease-in-out;\n padding: 0.5em;\n padding-left: ", ";\n margin: 0;\n width: 100%;\n display: flex;\n &:disabled {\n opacity: 0.5;\n }\n &::placeholder {\n color: inherit;\n opacity: 0.5;\n }\n"])), function (_a) {
506
504
  var backgroundColor = _a.$backgroundColor;
507
505
  return backgroundColor;
508
506
  }, function (_a) {
509
507
  var lessPaddingLeft = _a.$lessPaddingLeft;
510
508
  return lessPaddingLeft ? '1em' : '2.4em';
511
509
  });
512
- var Results = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n margin-top: 0.25em;\n display: grid;\n grid-template-columns: 1fr;\n grid-gap: 0;\n font-family: var(--font-plex);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n position: absolute;\n background-color: ", ";\n width: 100%;\n border-radius: var(--border-radius);\n @media screen and (min-width: 599px) {\n max-width: 300px;\n }\n .result {\n max-width: 100%;\n color: currentColor;\n padding: calc(11 / 16 * 1em) calc(14 / 16 * 1em);\n border-radius: var(--border-radius);\n box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);\n //border: 1px solid #007abf;\n color: inherit;\n line-height: 1.1em;\n cursor: pointer;\n transition: box-shadow 200ms ease-in-out;\n &:hover,\n &:focus {\n box-shadow:\n 0 0 0.5ex rgba(0, 0, 0, 0.2),\n 0 0 0 1px #007abf inset;\n }\n }\n"], ["\n margin-top: 0.25em;\n display: grid;\n grid-template-columns: 1fr;\n grid-gap: 0;\n font-family: var(--font-plex);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n position: absolute;\n background-color: ",
513
- ";\n width: 100%;\n border-radius: var(--border-radius);\n @media screen and (min-width: 599px) {\n max-width: 300px;\n }\n .result {\n max-width: 100%;\n color: currentColor;\n padding: calc(11 / 16 * 1em) calc(14 / 16 * 1em);\n border-radius: var(--border-radius);\n box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);\n //border: 1px solid #007abf;\n color: inherit;\n line-height: 1.1em;\n cursor: pointer;\n transition: box-shadow 200ms ease-in-out;\n &:hover,\n &:focus {\n box-shadow:\n 0 0 0.5ex rgba(0, 0, 0, 0.2),\n 0 0 0 1px #007abf inset;\n }\n }\n"])), function (_a) {
510
+ var Results = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n margin-top: 0.25em;\n display: grid;\n grid-template-columns: 1fr;\n grid-gap: 0;\n font-family: var(--font-plex);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n position: absolute;\n background-color: ", ";\n width: 100%;\n border-radius: var(--border-radius);\n @media screen and (min-width: 599px) {\n max-width: 300px;\n }\n .result {\n max-width: 100%;\n color: currentColor;\n padding: calc(11 / 16 * 1em) calc(14 / 16 * 1em);\n border-radius: var(--border-radius);\n box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);\n //border: 1px solid #007abf;\n color: inherit;\n line-height: 1.1em;\n cursor: pointer;\n transition: box-shadow 200ms ease-in-out;\n &:hover,\n &:focus {\n box-shadow:\n 0 0 0.5ex rgba(0, 0, 0, 0.2),\n 0 0 0 1px #007abf inset;\n }\n }\n"], ["\n margin-top: 0.25em;\n display: grid;\n grid-template-columns: 1fr;\n grid-gap: 0;\n font-family: var(--font-plex);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n position: absolute;\n background-color: ", ";\n width: 100%;\n border-radius: var(--border-radius);\n @media screen and (min-width: 599px) {\n max-width: 300px;\n }\n .result {\n max-width: 100%;\n color: currentColor;\n padding: calc(11 / 16 * 1em) calc(14 / 16 * 1em);\n border-radius: var(--border-radius);\n box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);\n //border: 1px solid #007abf;\n color: inherit;\n line-height: 1.1em;\n cursor: pointer;\n transition: box-shadow 200ms ease-in-out;\n &:hover,\n &:focus {\n box-shadow:\n 0 0 0.5ex rgba(0, 0, 0, 0.2),\n 0 0 0 1px #007abf inset;\n }\n }\n"])), function (_a) {
514
511
  var backgroundColor = _a.$backgroundColor;
515
512
  return backgroundColor;
516
513
  });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/es/index.js CHANGED
@@ -169,7 +169,7 @@ var MunicipalitySearch = (function (_super) {
169
169
  }
170
170
  }
171
171
  else if (startsWithNumber.test(searchTerm)) {
172
- results = municipalities.filter(function (municipality) { var _a; return RegExp("^" + searchTerm).test(((_a = municipality.PLZ4) !== null && _a !== void 0 ? _a : '').toString()); });
172
+ results = municipalities.filter(function (municipality) { var _a; return RegExp("^".concat(searchTerm)).test(((_a = municipality.PLZ4) !== null && _a !== void 0 ? _a : '').toString()); });
173
173
  if (results.length < 1) {
174
174
  _this.setState({ error: 'error.noResultsByZip' });
175
175
  }
@@ -177,7 +177,7 @@ var MunicipalitySearch = (function (_super) {
177
177
  else if (containsOnlyLetters.test(searchTerm)) {
178
178
  var sanitizedSearchTerm = searchTerm.replace('.', '\\.');
179
179
  var r_1 = RegExp(sanitizedSearchTerm, 'i');
180
- var exactWordRegex_1 = RegExp("\\b" + sanitizedSearchTerm + "\\b", 'i');
180
+ var exactWordRegex_1 = RegExp("\\b".concat(sanitizedSearchTerm, "\\b"), 'i');
181
181
  var rankResults = function (searchTerm, arrayToSort) {
182
182
  return arrayToSort.sort(function (a, b) {
183
183
  var _a, _b;
@@ -207,7 +207,7 @@ var MunicipalitySearch = (function (_super) {
207
207
  window.dataLayer.push({
208
208
  event: 'Interactions',
209
209
  event_action: 'input',
210
- event_label: "search:for_" + searchTerm + ":results_" + results.length,
210
+ event_label: "search:for_".concat(searchTerm, ":results_").concat(results.length),
211
211
  });
212
212
  }
213
213
  return _this.removeDuplicates(results, searchTerm);
@@ -261,7 +261,7 @@ var MunicipalitySearch = (function (_super) {
261
261
  console.log(e);
262
262
  console.warn('🍪 cookies of selectedMunicipalities is not available');
263
263
  }
264
- var ordered = __spreadArray(__spreadArray([], __read(munisFromLocalStorage)), __read(munisFromCookies)).sort(function (a, b) {
264
+ var ordered = __spreadArray(__spreadArray([], __read(munisFromLocalStorage), false), __read(munisFromCookies), false).sort(function (a, b) {
265
265
  if (b.timestamp && a.timestamp) {
266
266
  return b.timestamp - a.timestamp;
267
267
  }
@@ -305,7 +305,7 @@ var MunicipalitySearch = (function (_super) {
305
305
  (_this.props.dedupe ? '' : muni.PLZ4),
306
306
  muni,
307
307
  ];
308
- })).values())).reverse()
308
+ })).values()), false).reverse()
309
309
  .sort(function (a, b) {
310
310
  if (b.timestamp && a.timestamp) {
311
311
  return b.timestamp - a.timestamp;
@@ -333,11 +333,11 @@ var MunicipalitySearch = (function (_super) {
333
333
  useLegacy && console.log('Municipality search: using legacy endpoint 👴');
334
334
  var API_BASE_URL = useLegacy
335
335
  ? 'https://interaktiv.tagesanzeiger.ch/static/gemeindesuche/'
336
- : 'https://atm-municipality-search.s3.eu-west-1.amazonaws.com/';
337
- return fetch(API_BASE_URL + (_this.props.municipalityData + ".json"))
336
+ : 'https://tamedia-discovery-municipalities.s3.eu-central-1.amazonaws.com/';
337
+ return fetch(API_BASE_URL + "".concat(_this.props.municipalityData, ".json"))
338
338
  .then(function (res) {
339
339
  if (!res.ok) {
340
- throw new MunicipalityDownloadError("Download error: " + res.status + ": " + res.statusText + ".");
340
+ throw new MunicipalityDownloadError("Download error: ".concat(res.status, ": ").concat(res.statusText, "."));
341
341
  }
342
342
  return res.json();
343
343
  })
@@ -379,7 +379,7 @@ var MunicipalitySearch = (function (_super) {
379
379
  map.set(((_b = v.PLZ4) !== null && _b !== void 0 ? _b : '') + ((_c = v.ORTNAME) !== null && _c !== void 0 ? _c : '') + v.GDENR, v);
380
380
  }
381
381
  });
382
- var result = __spreadArray([], __read(map.values())).reduce(function (acc, cur) {
382
+ var result = __spreadArray([], __read(map.values()), false).reduce(function (acc, cur) {
383
383
  var _a, _b;
384
384
  if (((_a = cur.GDENAMK) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === searchTerm.toLowerCase() ||
385
385
  ((_b = cur.ORTNAME) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === searchTerm.toLowerCase()) {
@@ -496,17 +496,14 @@ var MunicipalitySearch = (function (_super) {
496
496
  var Icon = styled.i(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n cursor: ", ";\n position: absolute;\n top: 50%;\n ", "\n padding-left: 0.8em;\n transform: translateY(-50%);\n display: flex;\n opacity: 0.5;\n transition: opacity 0.5s ease-in-out;\n animation: fromLeft 0.3s ease-in-out;\n @keyframes fromLeft {\n 0% {\n transform: translateY(-50%) translateX(-10px);\n opacity: 0;\n }\n 100% {\n transform: translateY(-50%) translateX(0);\n }\n }\n &#search-closing-icon {\n &:hover {\n opacity: 1;\n }\n animation: fromRight 0.3s ease-in-out;\n @keyframes fromRight {\n 0% {\n transform: translateY(-50%) translateX(10px);\n opacity: 0;\n }\n 100% {\n transform: translateY(-50%) translateX(0);\n }\n }\n }\n"], ["\n cursor: ", ";\n position: absolute;\n top: 50%;\n ", "\n padding-left: 0.8em;\n transform: translateY(-50%);\n display: flex;\n opacity: 0.5;\n transition: opacity 0.5s ease-in-out;\n animation: fromLeft 0.3s ease-in-out;\n @keyframes fromLeft {\n 0% {\n transform: translateY(-50%) translateX(-10px);\n opacity: 0;\n }\n 100% {\n transform: translateY(-50%) translateX(0);\n }\n }\n &#search-closing-icon {\n &:hover {\n opacity: 1;\n }\n animation: fromRight 0.3s ease-in-out;\n @keyframes fromRight {\n 0% {\n transform: translateY(-50%) translateX(10px);\n opacity: 0;\n }\n 100% {\n transform: translateY(-50%) translateX(0);\n }\n }\n }\n"])), function (props) { return (props.$isClickable ? 'pointer' : 'default'); }, function (props) { return (props.$isRight ? 'right: 0; padding-right: 0.8em;' : ''); });
497
497
  var MunicipalitySearchContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n --border-radius: 0.3em;\n font-size: 18px;\n font-family: var(--font-plex);\n @media screen and (max-width: 599px) {\n max-width: 100%;\n }\n max-width: 300px;\n width: 100%;\n color: inherit;\n position: relative;\n"], ["\n --border-radius: 0.3em;\n font-size: 18px;\n font-family: var(--font-plex);\n @media screen and (max-width: 599px) {\n max-width: 100%;\n }\n max-width: 300px;\n width: 100%;\n color: inherit;\n position: relative;\n"])));
498
498
  var InputRow = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: center;\n input:focus ~ i {\n opacity: 1;\n }\n .ui.input {\n width: 100%;\n max-width: 100%;\n transition: all 0.5s ease-in-out;\n }\n"], ["\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: center;\n input:focus ~ i {\n opacity: 1;\n }\n .ui.input {\n width: 100%;\n max-width: 100%;\n transition: all 0.5s ease-in-out;\n }\n"])));
499
- var FlexInput = styled.input(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n // reset the default input styles\n color: inherit;\n background-color: ", ";\n border: solid 1px #7e7e7e7e;\n border-radius: var(--border-radius);\n box-shadow: none;\n font-size: 1em;\n outline: none;\n transition: all 0.3s ease-in-out;\n padding: 0.5em;\n padding-left: ", ";\n margin: 0;\n width: 100%;\n display: flex;\n &:disabled {\n opacity: 0.5;\n }\n &::placeholder {\n color: inherit;\n opacity: 0.5;\n }\n"], ["\n // reset the default input styles\n color: inherit;\n background-color: ",
500
- ";\n border: solid 1px #7e7e7e7e;\n border-radius: var(--border-radius);\n box-shadow: none;\n font-size: 1em;\n outline: none;\n transition: all 0.3s ease-in-out;\n padding: 0.5em;\n padding-left: ",
501
- ";\n margin: 0;\n width: 100%;\n display: flex;\n &:disabled {\n opacity: 0.5;\n }\n &::placeholder {\n color: inherit;\n opacity: 0.5;\n }\n"])), function (_a) {
499
+ var FlexInput = styled.input(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n // reset the default input styles\n color: inherit;\n background-color: ", ";\n border: solid 1px #7e7e7e7e;\n border-radius: var(--border-radius);\n box-shadow: none;\n font-size: 1em;\n outline: none;\n transition: all 0.3s ease-in-out;\n padding: 0.5em;\n padding-left: ", ";\n margin: 0;\n width: 100%;\n display: flex;\n &:disabled {\n opacity: 0.5;\n }\n &::placeholder {\n color: inherit;\n opacity: 0.5;\n }\n"], ["\n // reset the default input styles\n color: inherit;\n background-color: ", ";\n border: solid 1px #7e7e7e7e;\n border-radius: var(--border-radius);\n box-shadow: none;\n font-size: 1em;\n outline: none;\n transition: all 0.3s ease-in-out;\n padding: 0.5em;\n padding-left: ", ";\n margin: 0;\n width: 100%;\n display: flex;\n &:disabled {\n opacity: 0.5;\n }\n &::placeholder {\n color: inherit;\n opacity: 0.5;\n }\n"])), function (_a) {
502
500
  var backgroundColor = _a.$backgroundColor;
503
501
  return backgroundColor;
504
502
  }, function (_a) {
505
503
  var lessPaddingLeft = _a.$lessPaddingLeft;
506
504
  return lessPaddingLeft ? '1em' : '2.4em';
507
505
  });
508
- var Results = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n margin-top: 0.25em;\n display: grid;\n grid-template-columns: 1fr;\n grid-gap: 0;\n font-family: var(--font-plex);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n position: absolute;\n background-color: ", ";\n width: 100%;\n border-radius: var(--border-radius);\n @media screen and (min-width: 599px) {\n max-width: 300px;\n }\n .result {\n max-width: 100%;\n color: currentColor;\n padding: calc(11 / 16 * 1em) calc(14 / 16 * 1em);\n border-radius: var(--border-radius);\n box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);\n //border: 1px solid #007abf;\n color: inherit;\n line-height: 1.1em;\n cursor: pointer;\n transition: box-shadow 200ms ease-in-out;\n &:hover,\n &:focus {\n box-shadow:\n 0 0 0.5ex rgba(0, 0, 0, 0.2),\n 0 0 0 1px #007abf inset;\n }\n }\n"], ["\n margin-top: 0.25em;\n display: grid;\n grid-template-columns: 1fr;\n grid-gap: 0;\n font-family: var(--font-plex);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n position: absolute;\n background-color: ",
509
- ";\n width: 100%;\n border-radius: var(--border-radius);\n @media screen and (min-width: 599px) {\n max-width: 300px;\n }\n .result {\n max-width: 100%;\n color: currentColor;\n padding: calc(11 / 16 * 1em) calc(14 / 16 * 1em);\n border-radius: var(--border-radius);\n box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);\n //border: 1px solid #007abf;\n color: inherit;\n line-height: 1.1em;\n cursor: pointer;\n transition: box-shadow 200ms ease-in-out;\n &:hover,\n &:focus {\n box-shadow:\n 0 0 0.5ex rgba(0, 0, 0, 0.2),\n 0 0 0 1px #007abf inset;\n }\n }\n"])), function (_a) {
506
+ var Results = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n margin-top: 0.25em;\n display: grid;\n grid-template-columns: 1fr;\n grid-gap: 0;\n font-family: var(--font-plex);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n position: absolute;\n background-color: ", ";\n width: 100%;\n border-radius: var(--border-radius);\n @media screen and (min-width: 599px) {\n max-width: 300px;\n }\n .result {\n max-width: 100%;\n color: currentColor;\n padding: calc(11 / 16 * 1em) calc(14 / 16 * 1em);\n border-radius: var(--border-radius);\n box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);\n //border: 1px solid #007abf;\n color: inherit;\n line-height: 1.1em;\n cursor: pointer;\n transition: box-shadow 200ms ease-in-out;\n &:hover,\n &:focus {\n box-shadow:\n 0 0 0.5ex rgba(0, 0, 0, 0.2),\n 0 0 0 1px #007abf inset;\n }\n }\n"], ["\n margin-top: 0.25em;\n display: grid;\n grid-template-columns: 1fr;\n grid-gap: 0;\n font-family: var(--font-plex);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n position: absolute;\n background-color: ", ";\n width: 100%;\n border-radius: var(--border-radius);\n @media screen and (min-width: 599px) {\n max-width: 300px;\n }\n .result {\n max-width: 100%;\n color: currentColor;\n padding: calc(11 / 16 * 1em) calc(14 / 16 * 1em);\n border-radius: var(--border-radius);\n box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);\n //border: 1px solid #007abf;\n color: inherit;\n line-height: 1.1em;\n cursor: pointer;\n transition: box-shadow 200ms ease-in-out;\n &:hover,\n &:focus {\n box-shadow:\n 0 0 0.5ex rgba(0, 0, 0, 0.2),\n 0 0 0 1px #007abf inset;\n }\n }\n"])), function (_a) {
510
507
  var backgroundColor = _a.$backgroundColor;
511
508
  return backgroundColor;
512
509
  });
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ta-interaktiv/react-municipality-search",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "React component that allows searching for Swiss municipalities with either ZIP code or place names.",
5
5
  "keywords": [
6
6
  "react",
@@ -51,6 +51,5 @@
51
51
  "react": ">=16.8.0",
52
52
  "react-dom": ">=16.8.0",
53
53
  "styled-components": "^6.1.1"
54
- },
55
- "gitHead": "e14ed049579a8649fadbb1240d9226a5a9225296"
54
+ }
56
55
  }
@@ -468,7 +468,7 @@ export class MunicipalitySearch extends Component<Props, State> {
468
468
  useLegacy && console.log('Municipality search: using legacy endpoint 👴')
469
469
  const API_BASE_URL = useLegacy
470
470
  ? 'https://interaktiv.tagesanzeiger.ch/static/gemeindesuche/'
471
- : 'https://atm-municipality-search.s3.eu-west-1.amazonaws.com/'
471
+ : 'https://tamedia-discovery-municipalities.s3.eu-central-1.amazonaws.com/'
472
472
  return fetch(API_BASE_URL + `${this.props.municipalityData}.json`)
473
473
  .then((res) => {
474
474
  if (!res.ok) {
package/CHANGELOG.md DELETED
@@ -1,378 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [2.2.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@2.1.4...@ta-interaktiv/react-municipality-search@2.2.0) (2024-09-18)
7
-
8
-
9
- ### Features
10
-
11
- * new prop "propertyToSearch" ([8fb9fd5](https://gitlab.com/ta-interaktiv/packages/commit/8fb9fd58f37a0e7778634de5d84926d68143cae1))
12
-
13
-
14
-
15
-
16
-
17
- ## [2.1.4](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@2.1.3...@ta-interaktiv/react-municipality-search@2.1.4) (2024-05-27)
18
-
19
-
20
- ### Bug Fixes
21
-
22
- * don't show plz when plz empty ([0e52030](https://gitlab.com/ta-interaktiv/packages/commit/0e52030f54ba4e745a008cc026711d8c9d8750e3))
23
-
24
-
25
-
26
-
27
-
28
- ## [2.1.3](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@2.1.2...@ta-interaktiv/react-municipality-search@2.1.3) (2024-05-21)
29
-
30
- **Note:** Version bump only for package @ta-interaktiv/react-municipality-search
31
-
32
-
33
-
34
-
35
-
36
- ## [2.1.2](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@2.1.1...@ta-interaktiv/react-municipality-search@2.1.2) (2024-05-21)
37
-
38
-
39
- ### Bug Fixes
40
-
41
- * bring this repo to the 21st century ([38af4bf](https://gitlab.com/ta-interaktiv/packages/commit/38af4bfe550eb6ced0410012153e5a69e7fcb0d7))
42
-
43
-
44
-
45
-
46
-
47
- ## [2.1.1](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@2.1.0...@ta-interaktiv/react-municipality-search@2.1.1) (2024-02-19)
48
-
49
- ### Bug Fixes
50
-
51
- - able to search for wil ([92dd8e5](https://gitlab.com/ta-interaktiv/packages/commit/92dd8e59158c935e49c0d9aaeefb8156c377bdff))
52
-
53
- # [2.1.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@2.0.0...@ta-interaktiv/react-municipality-search@2.1.0) (2023-11-08)
54
-
55
- ### Features
56
-
57
- - selectedMunicipalityId ([ea50af2](https://gitlab.com/ta-interaktiv/packages/commit/ea50af2b76a6fe1dc82c334b9911c7013e0f5245))
58
-
59
- # [2.0.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.11.3...@ta-interaktiv/react-municipality-search@2.0.0) (2023-11-08)
60
-
61
- ### Features
62
-
63
- - upgrade to latest styled-components version ([a27639a](https://gitlab.com/ta-interaktiv/packages/commit/a27639a387a1188d5090b21e4d97f1f1815afc6b))
64
-
65
- ### BREAKING CHANGES
66
-
67
- - new version of styled-components
68
-
69
- ## [1.11.3](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.11.2...@ta-interaktiv/react-municipality-search@1.11.3) (2023-11-02)
70
-
71
- ### Bug Fixes
72
-
73
- - results same width as search ([e19a2e7](https://gitlab.com/ta-interaktiv/packages/commit/e19a2e7da39b4cca0f9301754aa0e49854b9b6d8))
74
-
75
- ## [1.11.2](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.11.1...@ta-interaktiv/react-municipality-search@1.11.2) (2023-11-02)
76
-
77
- ### Bug Fixes
78
-
79
- - mobile removode flex column ([b7a91d5](https://gitlab.com/ta-interaktiv/packages/commit/b7a91d524a08de824358c593954f131d13dbd552))
80
-
81
- ## [1.11.1](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.11.0...@ta-interaktiv/react-municipality-search@1.11.1) (2023-11-02)
82
-
83
- ### Bug Fixes
84
-
85
- - last selected munis for nozip ([cf680fd](https://gitlab.com/ta-interaktiv/packages/commit/cf680fda03321d45413748c5cc1587cd95e04e1a))
86
-
87
- # [1.11.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.10.0...@ta-interaktiv/react-municipality-search@1.11.0) (2023-11-01)
88
-
89
- ### Bug Fixes
90
-
91
- - typo ([5b5e922](https://gitlab.com/ta-interaktiv/packages/commit/5b5e922291b35aed88f8619f33ffbf5f1abfadc2))
92
-
93
- ### Features
94
-
95
- - removed deps and better style ([dcfea21](https://gitlab.com/ta-interaktiv/packages/commit/dcfea210dfcc2f5d72d82699c59bc1d042098f3c))
96
-
97
- # [1.10.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.9.3...@ta-interaktiv/react-municipality-search@1.10.0) (2023-10-31)
98
-
99
- ### Features
100
-
101
- - municipalitysearch with municipalities only ([4336e3e](https://gitlab.com/ta-interaktiv/packages/commit/4336e3ebd6e8a1718a9d09d437a9fd7842eafe89))
102
-
103
- ## [1.9.3](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.9.2...@ta-interaktiv/react-municipality-search@1.9.3) (2023-04-18)
104
-
105
- **Note:** Version bump only for package @ta-interaktiv/react-municipality-search
106
-
107
- ## [1.9.2](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.9.1...@ta-interaktiv/react-municipality-search@1.9.2) (2023-02-27)
108
-
109
- ### Bug Fixes
110
-
111
- - downgrade react-spring ([cc66923](https://gitlab.com/ta-interaktiv/packages/commit/cc66923dc36e08ae060a781694006ce60618be05))
112
-
113
- ## [1.9.1](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.9.0...@ta-interaktiv/react-municipality-search@1.9.1) (2023-02-27)
114
-
115
- ### Bug Fixes
116
-
117
- - updated react spring ([639fbe5](https://gitlab.com/ta-interaktiv/packages/commit/639fbe57e366bfb302e5f7a3b01b0ca6246102a6))
118
-
119
- # [1.9.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.8.1...@ta-interaktiv/react-municipality-search@1.9.0) (2023-02-14)
120
-
121
- ### Features
122
-
123
- - use new atm jsons if available ([70d5dae](https://gitlab.com/ta-interaktiv/packages/commit/70d5daed5294787f0fdf4c02bb94b440b1cfa7d6))
124
-
125
- ## [1.8.1](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.8.0...@ta-interaktiv/react-municipality-search@1.8.1) (2022-10-24)
126
-
127
- ### Bug Fixes
128
-
129
- - changed boldness ([ef331e0](https://gitlab.com/ta-interaktiv/packages/commit/ef331e0ac5346f5b5c36b1e6215f5cf3231897e9))
130
-
131
- # [1.8.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.7.1...@ta-interaktiv/react-municipality-search@1.8.0) (2022-10-17)
132
-
133
- ### Features
134
-
135
- - maxResults and icon on right side ([bd3a029](https://gitlab.com/ta-interaktiv/packages/commit/bd3a0295517f6dae73015fc1fb7c5a8634a388d3))
136
-
137
- ## [1.7.1](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.7.0...@ta-interaktiv/react-municipality-search@1.7.1) (2022-09-20)
138
-
139
- ### Bug Fixes
140
-
141
- - get data from cookies ([1a78a15](https://gitlab.com/ta-interaktiv/packages/commit/1a78a154c02f35b5213d1c7430817edf733854ae))
142
-
143
- # [1.7.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.6.0...@ta-interaktiv/react-municipality-search@1.7.0) (2022-09-20)
144
-
145
- ### Features
146
-
147
- - add scroller component ([3f854de](https://gitlab.com/ta-interaktiv/packages/commit/3f854deed1bc26c0801e26dafeeff871460bf1f8))
148
- - cookie support for municipalitySearch ([3afac60](https://gitlab.com/ta-interaktiv/packages/commit/3afac602ad546f478e4de1fea26ee29e9beb7c8d))
149
-
150
- # [1.6.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.5.4...@ta-interaktiv/react-municipality-search@1.6.0) (2022-08-17)
151
-
152
- ### Features
153
-
154
- - upgraded most dependencies ⭐️ ([2d16e51](https://gitlab.com/ta-interaktiv/packages/commit/2d16e515bd8ac761eee50477a3ae4ebd78a591a1))
155
-
156
- ## [1.5.4](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.5.3...@ta-interaktiv/react-municipality-search@1.5.4) (2022-06-23)
157
-
158
- ### Bug Fixes
159
-
160
- - dedupe lastSelected munis & suggeest Fetched munis ([e4b6ddc](https://gitlab.com/ta-interaktiv/packages/commit/e4b6ddc332f3656a92474262146b6e94eb46c522))
161
-
162
- ## [1.5.3](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.5.2...@ta-interaktiv/react-municipality-search@1.5.3) (2022-06-21)
163
-
164
- ### Bug Fixes
165
-
166
- - municipaltiy search common localStorageName ([dc7439d](https://gitlab.com/ta-interaktiv/packages/commit/dc7439df6a6d7946c3d393f53de2d3cc4e5a0d62))
167
-
168
- ## [1.5.2](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.5.1...@ta-interaktiv/react-municipality-search@1.5.2) (2022-06-20)
169
-
170
- ### Bug Fixes
171
-
172
- - try to publish ([55709f9](https://gitlab.com/ta-interaktiv/packages/commit/55709f97a752e5753430f8068e2edc858b22a84b))
173
-
174
- ### Reverts
175
-
176
- - Revert "Publish" ([627f67e](https://gitlab.com/ta-interaktiv/packages/commit/627f67ed0bb983a9213d344c699c6c1518f1a2a7))
177
- - Revert "Publish" ([5f254e3](https://gitlab.com/ta-interaktiv/packages/commit/5f254e3d553853fa050f2635afc8fa36186b517c))
178
-
179
- ## [1.5.1](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.5.1...@ta-interaktiv/react-municipality-search@1.5.1) (2022-06-20)
180
-
181
- ### Reverts
182
-
183
- - Revert "Publish" ([627f67e](https://gitlab.com/ta-interaktiv/packages/commit/627f67ed0bb983a9213d344c699c6c1518f1a2a7))
184
- - Revert "Publish" ([5f254e3](https://gitlab.com/ta-interaktiv/packages/commit/5f254e3d553853fa050f2635afc8fa36186b517c))
185
-
186
- # [1.5.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.4.1...@ta-interaktiv/react-municipality-search@1.5.0) (2022-06-01)
187
-
188
- ### Features
189
-
190
- - muniSearch refactor to styledComponents ([603fadd](https://gitlab.com/ta-interaktiv/packages/commit/603fadd02ff8280c20eab454d0cae28d88a505ba))
191
-
192
- ## [1.4.1](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.4.0...@ta-interaktiv/react-municipality-search@1.4.1) (2022-06-01)
193
-
194
- ### Bug Fixes
195
-
196
- - muniSearch switched to css module ([10dbc07](https://gitlab.com/ta-interaktiv/packages/commit/10dbc074f415bdd3fb1d1ab85d47d62eb57b93d5))
197
-
198
- # [1.4.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.3.0...@ta-interaktiv/react-municipality-search@1.4.0) (2022-05-18)
199
-
200
- ### Features
201
-
202
- - updated to react-spring ^9.4.5 ([2e1c8a1](https://gitlab.com/ta-interaktiv/packages/commit/2e1c8a19acc0963bae2feb563a90286d2e24168c))
203
-
204
- # [1.3.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.2.2...@ta-interaktiv/react-municipality-search@1.3.0) (2022-04-20)
205
-
206
- ### Bug Fixes
207
-
208
- - remove console log ([c3e2566](https://gitlab.com/ta-interaktiv/packages/commit/c3e25662da69d3671aade242e8d700a95c259984))
209
-
210
- ### Features
211
-
212
- - allow new municipalities data retrieval when the date prop is changed ([62e46d4](https://gitlab.com/ta-interaktiv/packages/commit/62e46d4ad710df131b44d8b1554bf89481bbd2b9))
213
-
214
- ## [1.2.2](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.2.1...@ta-interaktiv/react-municipality-search@1.2.2) (2022-04-19)
215
-
216
- ### Bug Fixes
217
-
218
- - correct order in ms ([44dc573](https://gitlab.com/ta-interaktiv/packages/commit/44dc573c1d4dae990ae3984f4cd9ea901a7f40d9))
219
-
220
- ## [1.2.1](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.2.0...@ta-interaktiv/react-municipality-search@1.2.1) (2022-04-14)
221
-
222
- ### Bug Fixes
223
-
224
- - show last selected municipalities ([adff1f9](https://gitlab.com/ta-interaktiv/packages/commit/adff1f9ec251be7ee948697dafbaf00ec3703ac9))
225
-
226
- # [1.2.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.1.3...@ta-interaktiv/react-municipality-search@1.2.0) (2022-02-03)
227
-
228
- ### Features
229
-
230
- - hideToooltip and resetOnSelect ([f5c1f8f](https://gitlab.com/ta-interaktiv/packages/commit/f5c1f8f9c6d6c86af1b82a995a2d8dcb98a8d87e))
231
-
232
- ## [1.1.3](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.1.2...@ta-interaktiv/react-municipality-search@1.1.3) (2021-09-17)
233
-
234
- ### Bug Fixes
235
-
236
- - add placeholder prop to municipality search ([08c6fca](https://gitlab.com/ta-interaktiv/packages/commit/08c6fcad43c6197d548c82e81da311f4022de74b))
237
-
238
- ## [1.1.2](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.1.1...@ta-interaktiv/react-municipality-search@1.1.2) (2021-08-19)
239
-
240
- ### Bug Fixes
241
-
242
- - add PLZ6 to municipality search results ([ec58935](https://gitlab.com/ta-interaktiv/packages/commit/ec58935f1f4b5e386fedb587e05888672fb381a0))
243
-
244
- ## [1.1.1](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.1.0...@ta-interaktiv/react-municipality-search@1.1.1) (2021-06-01)
245
-
246
- ### Bug Fixes
247
-
248
- - Add dedupe prop to municipality search ([7fdc442](https://gitlab.com/ta-interaktiv/packages/commit/7fdc4429138738466c8b2a58d85c8a3a92138ad2))
249
- - better source data set from swisstopo, added requirements ([1dda1df](https://gitlab.com/ta-interaktiv/packages/commit/1dda1df26342310bcf38ac80de6016cb1b656a1b))
250
- - remove erroneous dependency ([fe10dba](https://gitlab.com/ta-interaktiv/packages/commit/fe10dba0b6a2df20a1ea79a89d33ecc4a442d27f))
251
-
252
- # [1.1.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.0.1...@ta-interaktiv/react-municipality-search@1.1.0) (2021-04-08)
253
-
254
- ### Features
255
-
256
- - added 2021 data ([8043b68](https://gitlab.com/ta-interaktiv/packages/commit/8043b688432552a2a4c78e6a849ffda06d1d7fe9))
257
-
258
- ## [1.0.1](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@1.0.0...@ta-interaktiv/react-municipality-search@1.0.1) (2020-11-23)
259
-
260
- **Note:** Version bump only for package @ta-interaktiv/react-municipality-search
261
-
262
- # [1.0.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@0.2.14...@ta-interaktiv/react-municipality-search@1.0.0) (2020-03-13)
263
-
264
- ### Features
265
-
266
- - do not display paywall during development ([04801ff](https://gitlab.com/ta-interaktiv/packages/commit/04801ffe18498c9c1a4065b95cc66d2902fae448))
267
-
268
- * Merge branch 'master' into 144-upgrade-react-components-to-use-new-apis ([8f052df](https://gitlab.com/ta-interaktiv/packages/commit/8f052df9ba3932204382eb9bcedff517c9aaf316))
269
-
270
- ### BREAKING CHANGES
271
-
272
- - allow childs for image and svg, allow to place labels below image, oversized only via css, link with disco option, scrolltracking with multiple option
273
- - allow childs for image and svg, allow to place labels below image, oversized only via css, link with disco option, scrolltracking with multiple option fix: accept child elements between sub and image, option for placing title and sub below image Publish fix: remove special URL for Facebook feat: do not display paywall during development feat: add properties to scrolltracking
274
- - Rename Svg to InlineSvg
275
- - Add annotationLayer, change ChapterNavigation props, exchange ScrollTracking Component, stories in mdx feat: add AnnotationLayer
276
-
277
- ## [0.2.14](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@0.2.13...@ta-interaktiv/react-municipality-search@0.2.14) (2020-02-21)
278
-
279
- **Note:** Version bump only for package @ta-interaktiv/react-municipality-search
280
-
281
- ## [0.2.13](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@0.2.12...@ta-interaktiv/react-municipality-search@0.2.13) (2020-01-10)
282
-
283
- **Note:** Version bump only for package @ta-interaktiv/react-municipality-search
284
-
285
- ## [0.2.12](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@0.2.11...@ta-interaktiv/react-municipality-search@0.2.12) (2019-12-10)
286
-
287
- ### Bug Fixes
288
-
289
- - improve flexbox CSS so it works on iOS 10 ([26f9986](https://gitlab.com/ta-interaktiv/packages/commit/26f9986ccb4f8ba2810995c474e682f73635d2ea)), closes [#107](https://gitlab.com/ta-interaktiv/packages/issues/107)
290
- - remove duplicate Canonical URL ([7d54376](https://gitlab.com/ta-interaktiv/packages/commit/7d5437642e640cfdb8cb49e35a86f494fe7afbc6)), closes [#117](https://gitlab.com/ta-interaktiv/packages/issues/117)
291
-
292
- ## [0.2.11](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@0.2.9...@ta-interaktiv/react-municipality-search@0.2.11) (2019-10-07)
293
-
294
- **Note:** Version bump only for package @ta-interaktiv/react-municipality-search
295
-
296
- ## [0.2.10](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@0.2.9...@ta-interaktiv/react-municipality-search@0.2.10) (2019-10-07)
297
-
298
- **Note:** Version bump only for package @ta-interaktiv/react-municipality-search
299
-
300
- ## [0.2.9](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@0.2.8...@ta-interaktiv/react-municipality-search@0.2.9) (2019-09-04)
301
-
302
- ### Bug Fixes
303
-
304
- - localise input field placeholder text ([a536e26](https://gitlab.com/ta-interaktiv/packages/commit/a536e26))
305
-
306
- ## [0.2.8](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@0.2.7...@ta-interaktiv/react-municipality-search@0.2.8) (2019-06-24)
307
-
308
- ### Bug Fixes
309
-
310
- - localise input field placeholder text ([b33f598](https://gitlab.com/ta-interaktiv/packages/commit/b33f598))
311
-
312
- ## [0.2.7](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@0.2.6...@ta-interaktiv/react-municipality-search@0.2.7) (2019-06-14)
313
-
314
- **Note:** Version bump only for package @ta-interaktiv/react-municipality-search
315
-
316
- ## [0.2.6](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@0.2.5...@ta-interaktiv/react-municipality-search@0.2.6) (2019-06-05)
317
-
318
- ### Bug Fixes
319
-
320
- - hide border when no objects are above it ([48a0d6f](https://gitlab.com/ta-interaktiv/packages/commit/48a0d6f))
321
- - integration with other components ([0316883](https://gitlab.com/ta-interaktiv/packages/commit/0316883))
322
-
323
- ## [0.2.5](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@0.2.4...@ta-interaktiv/react-municipality-search@0.2.5) (2019-05-17)
324
-
325
- ### Bug Fixes
326
-
327
- - larger label ([c04fd37](https://gitlab.com/ta-interaktiv/packages/commit/c04fd37))
328
- - remove search type designation on input ([760464b](https://gitlab.com/ta-interaktiv/packages/commit/760464b))
329
-
330
- ## [0.2.4](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@0.2.3...@ta-interaktiv/react-municipality-search@0.2.4) (2019-05-15)
331
-
332
- ### Bug Fixes
333
-
334
- - hide results box when there are no results. ([4a1c885](https://gitlab.com/ta-interaktiv/packages/commit/4a1c885))
335
-
336
- ## [0.2.3](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@0.2.2...@ta-interaktiv/react-municipality-search@0.2.3) (2019-05-15)
337
-
338
- ### Bug Fixes
339
-
340
- - enhance background contrast of selected option ([796c114](https://gitlab.com/ta-interaktiv/packages/commit/796c114))
341
- - improve contrast of label on coloured backgrounds ([8964d6e](https://gitlab.com/ta-interaktiv/packages/commit/8964d6e))
342
- - remove white background from results ([a6d6534](https://gitlab.com/ta-interaktiv/packages/commit/a6d6534))
343
- - switch domain when downloading article data ([60f0acb](https://gitlab.com/ta-interaktiv/packages/commit/60f0acb))
344
-
345
- ## [0.2.2](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@0.2.1...@ta-interaktiv/react-municipality-search@0.2.2) (2019-05-08)
346
-
347
- ### Bug Fixes
348
-
349
- - remove Semantic UI icons ([80181e7](https://gitlab.com/ta-interaktiv/packages/commit/80181e7))
350
-
351
- ## [0.2.1](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@0.2.0...@ta-interaktiv/react-municipality-search@0.2.1) (2019-05-03)
352
-
353
- ### Bug Fixes
354
-
355
- - made the component cuter ([a7c03d5](https://gitlab.com/ta-interaktiv/packages/commit/a7c03d5))
356
- - reduce requirements of react peer dependencies ([b3fc7ba](https://gitlab.com/ta-interaktiv/packages/commit/b3fc7ba))
357
-
358
- # [0.2.0](https://gitlab.com/ta-interaktiv/packages/compare/@ta-interaktiv/react-municipality-search@0.1.0...@ta-interaktiv/react-municipality-search@0.2.0) (2019-05-03)
359
-
360
- ### Features
361
-
362
- - export Municipality type from index.ts ([ee9b5c6](https://gitlab.com/ta-interaktiv/packages/commit/ee9b5c6))
363
-
364
- # 0.1.0 (2019-05-02)
365
-
366
- ### Bug Fixes
367
-
368
- - add french translation ([7387c6a](https://gitlab.com/ta-interaktiv/packages/commit/7387c6a))
369
- - remove debouncing code ([fb503fa](https://gitlab.com/ta-interaktiv/packages/commit/fb503fa))
370
- - typescript errors and compiler warnings ([a295309](https://gitlab.com/ta-interaktiv/packages/commit/a295309))
371
- - use CommonJS import for IE11 compatibility ([144a240](https://gitlab.com/ta-interaktiv/packages/commit/144a240))
372
-
373
- ### Features
374
-
375
- - add first version of municipality search component ([5f1b4b2](https://gitlab.com/ta-interaktiv/packages/commit/5f1b4b2))
376
- - load the municipality list from remote ([5928941](https://gitlab.com/ta-interaktiv/packages/commit/5928941))
377
- - property to use a specific municipality list ([8debe51](https://gitlab.com/ta-interaktiv/packages/commit/8debe51))
378
- - return complete municipality object upon selection ([cdf0e4d](https://gitlab.com/ta-interaktiv/packages/commit/cdf0e4d))