@ta-interaktiv/react-municipality-search 2.2.2 → 3.0.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.
- package/CHANGELOG.md +421 -0
- package/README.md +0 -2
- package/dist/index.js +252 -370
- package/dist/index.js.map +1 -1
- package/dist/municipalitySearch.d.ts +5 -46
- package/dist/municipalitySearch.d.ts.map +1 -1
- package/es/index.js +253 -371
- package/es/index.js.map +1 -1
- package/es/municipalitySearch.d.ts +5 -46
- package/es/municipalitySearch.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/municipalitySearch.tsx +309 -621
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React
|
|
2
|
-
interface Municipality {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface Municipality {
|
|
3
3
|
readonly GDENR: number;
|
|
4
4
|
readonly ORTNAME?: string;
|
|
5
5
|
readonly PLZ4?: number;
|
|
@@ -9,19 +9,15 @@ interface Municipality {
|
|
|
9
9
|
readonly NORMORTSNAME?: string;
|
|
10
10
|
readonly NORMGEMEINDE: string;
|
|
11
11
|
readonly URL?: string;
|
|
12
|
-
timestamp?: number;
|
|
13
12
|
[x: string]: any;
|
|
14
13
|
}
|
|
15
|
-
export type { Municipality };
|
|
16
14
|
export interface Props {
|
|
17
|
-
municipalityData
|
|
15
|
+
municipalityData?: string;
|
|
18
16
|
dedupe?: boolean;
|
|
19
17
|
resetOnSelect?: boolean;
|
|
20
18
|
onSelectionHandler: (municipality: Municipality) => void;
|
|
21
|
-
locale
|
|
19
|
+
locale?: 'de' | 'fr';
|
|
22
20
|
placeholder?: string;
|
|
23
|
-
showLastSelectedMunicipalities?: boolean;
|
|
24
|
-
numberOfLastSelectedMunicipalities?: number;
|
|
25
21
|
iconOnRightSide?: boolean;
|
|
26
22
|
maxResults?: number;
|
|
27
23
|
customMunicipalities?: Municipality[];
|
|
@@ -32,42 +28,5 @@ export interface Props {
|
|
|
32
28
|
resultBackgroundColor?: string;
|
|
33
29
|
propertyToSearch?: keyof Municipality;
|
|
34
30
|
}
|
|
35
|
-
|
|
36
|
-
isLoading: boolean;
|
|
37
|
-
results: Municipality[];
|
|
38
|
-
value: string;
|
|
39
|
-
error: null | 'error.noResultsByZip' | 'error.noResultsByName' | 'error.municipalitiesNotDownloaded';
|
|
40
|
-
municipalities: Municipality[];
|
|
41
|
-
}
|
|
42
|
-
export declare class MunicipalitySearch extends Component<Props, State> {
|
|
43
|
-
static defaultProps: {
|
|
44
|
-
municipalityData: string;
|
|
45
|
-
locale: string;
|
|
46
|
-
numberOfLastSelectedMunicipalities: number;
|
|
47
|
-
resultBackgroundColor: string;
|
|
48
|
-
inputBackgroundColor: string;
|
|
49
|
-
maxResults: number;
|
|
50
|
-
propertyToSearch: string;
|
|
51
|
-
};
|
|
52
|
-
state: {
|
|
53
|
-
isLoading: boolean;
|
|
54
|
-
results: never[];
|
|
55
|
-
value: string;
|
|
56
|
-
error: null;
|
|
57
|
-
municipalities: never[];
|
|
58
|
-
};
|
|
59
|
-
private resetComponent;
|
|
60
|
-
private filterList;
|
|
61
|
-
private removeDuplicates;
|
|
62
|
-
private handleSearchChange;
|
|
63
|
-
private sendToDataPipeline;
|
|
64
|
-
private getStoredMunicipalities;
|
|
65
|
-
private saveToSelectedMunicipalities;
|
|
66
|
-
private deduplicateMunicipalityArray;
|
|
67
|
-
private getMunicipalitiesData;
|
|
68
|
-
componentDidUpdate(prevProps: Props): void;
|
|
69
|
-
private muniToString;
|
|
70
|
-
componentDidMount(): void;
|
|
71
|
-
render(): React.JSX.Element;
|
|
72
|
-
}
|
|
31
|
+
export declare const MunicipalitySearch: ({ municipalityData, locale, resultBackgroundColor, inputBackgroundColor, maxResults, propertyToSearch, dedupe, resetOnSelect, onSelectionHandler, placeholder, iconOnRightSide, customMunicipalities, selectedMunicipality, selectedMunicipalityId, onCloseHandler, }: Props) => React.JSX.Element;
|
|
73
32
|
//# sourceMappingURL=municipalitySearch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"municipalitySearch.d.ts","sourceRoot":"","sources":["../src/municipalitySearch.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"municipalitySearch.d.ts","sourceRoot":"","sources":["../src/municipalitySearch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6D,MAAM,OAAO,CAAA;AAiBjF,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,C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