@open-pioneer/coordinate-search 0.8.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/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,7 @@
1
+ import { ProjectionItem } from "./CoordinateInput";
2
+ export declare const ProjectionSelect: import("react").NamedExoticComponent<{
3
+ currentProjection: ProjectionItem;
4
+ projections: ProjectionItem[];
5
+ portalElement: React.RefObject<HTMLDivElement>;
6
+ onProjectionChange: (proj: ProjectionItem) => void;
7
+ }>;
@@ -0,0 +1,112 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useEvent } from '@open-pioneer/react-utils';
3
+ import { Select } from 'chakra-react-select';
4
+ import { useIntl } from './_virtual/_virtual-pioneer-module_react-hooks.js';
5
+ import { memo, useState, useMemo } from 'react';
6
+
7
+ const ProjectionSelect = memo(function ProjectionSelect2(props) {
8
+ const { currentProjection, projections, portalElement, onProjectionChange } = props;
9
+ const intl = useIntl();
10
+ const ariaMessages = useAriaMessages(intl);
11
+ const [isOpen, setIsOpen] = useState(false);
12
+ const keyDown = useEvent((event) => {
13
+ if (!isOpen && event.key === "Enter") {
14
+ setIsOpen(true);
15
+ }
16
+ });
17
+ return /* @__PURE__ */ jsx(
18
+ Select,
19
+ {
20
+ value: currentProjection,
21
+ defaultValue: currentProjection,
22
+ options: projections,
23
+ menuPlacement: "auto",
24
+ menuPortalTarget: portalElement.current,
25
+ "aria-label": intl.formatMessage({
26
+ id: "coordinateInput.ariaLabel"
27
+ }),
28
+ classNamePrefix: "coordinate-input-select",
29
+ isSearchable: false,
30
+ chakraStyles: {
31
+ menu: (base) => {
32
+ return {
33
+ ...base,
34
+ width: "max-content",
35
+ minWidth: "100%"
36
+ };
37
+ },
38
+ control: (base, { selectProps: { menuIsOpen } }) => ({
39
+ ...base,
40
+ width: "max-content",
41
+ minWidth: "100%",
42
+ color: "white",
43
+ borderLeftStyle: "none",
44
+ borderLeftRadius: 0,
45
+ padding: 0,
46
+ backgroundColor: `${menuIsOpen ? "rgb(27, 75, 95)" : "var(--chakra-colors-background_primary)"}`,
47
+ _focus: {
48
+ boxShadow: "var(--chakra-shadows-outline)"
49
+ }
50
+ }),
51
+ valueContainer: (base) => ({
52
+ ...base,
53
+ paddingEnd: 0,
54
+ cursor: "pointer"
55
+ }),
56
+ dropdownIndicator: (base, { selectProps: { menuIsOpen } }) => ({
57
+ ...base,
58
+ paddingStart: 0,
59
+ backgroundColor: `${menuIsOpen ? "rgb(27, 75, 95)" : "var(--chakra-colors-background_primary)"}`
60
+ }),
61
+ option: (base) => ({
62
+ ...base,
63
+ _focus: {
64
+ background: "var(--chakra-colors-trails-300)"
65
+ }
66
+ }),
67
+ indicatorSeparator: (base, { selectProps: { menuIsOpen } }) => ({
68
+ ...base,
69
+ backgroundColor: `${menuIsOpen ? "rgb(27, 75, 95)" : "var(--chakra-colors-background_primary)"}`,
70
+ borderColor: `${menuIsOpen ? "rgb(27, 75, 95)" : "var(--chakra-colors-background_primary)"}`
71
+ })
72
+ },
73
+ ariaLiveMessages: ariaMessages,
74
+ onChange: (e) => {
75
+ if (e?.value !== void 0) {
76
+ onProjectionChange(e);
77
+ }
78
+ },
79
+ onKeyDown: keyDown,
80
+ menuIsOpen: isOpen,
81
+ onMenuOpen: () => setIsOpen(true),
82
+ onMenuClose: () => setIsOpen(false)
83
+ }
84
+ );
85
+ });
86
+ function useAriaMessages(intl) {
87
+ return useMemo(() => {
88
+ const onFocus = () => {
89
+ return "";
90
+ };
91
+ const onChange = (props) => {
92
+ if (props.action == "select-option" || props.action == "initial-input-focus")
93
+ return props.label + " " + intl.formatMessage({ id: "selected" });
94
+ else return "";
95
+ };
96
+ const guidance = () => {
97
+ return "";
98
+ };
99
+ const onFilter = () => {
100
+ return "";
101
+ };
102
+ return {
103
+ onFocus,
104
+ onChange,
105
+ guidance,
106
+ onFilter
107
+ };
108
+ }, [intl]);
109
+ }
110
+
111
+ export { ProjectionSelect };
112
+ //# sourceMappingURL=ProjectionSelect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectionSelect.js","sources":["ProjectionSelect.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { useEvent } from \"@open-pioneer/react-utils\";\nimport { PackageIntl } from \"@open-pioneer/runtime\";\nimport { AriaLiveMessages, AriaOnChange, AriaOnFocus, Select } from \"chakra-react-select\";\nimport { useIntl } from \"open-pioneer:react-hooks\";\nimport { KeyboardEvent, memo, useMemo, useState } from \"react\";\nimport { ProjectionItem } from \"./CoordinateInput\";\n\nexport const ProjectionSelect = memo(function ProjectionSelect(props: {\n currentProjection: ProjectionItem;\n projections: ProjectionItem[];\n portalElement: React.RefObject<HTMLDivElement>;\n onProjectionChange: (proj: ProjectionItem) => void;\n}) {\n const { currentProjection, projections, portalElement, onProjectionChange } = props;\n const intl = useIntl();\n const ariaMessages = useAriaMessages(intl);\n const [isOpen, setIsOpen] = useState(false);\n\n const keyDown = useEvent((event: KeyboardEvent<HTMLDivElement>) => {\n // if the menu is already open, do nothing\n if (!isOpen && event.key === \"Enter\") {\n setIsOpen(true);\n }\n });\n\n return (\n <Select<ProjectionItem>\n value={currentProjection}\n defaultValue={currentProjection}\n options={projections}\n menuPlacement=\"auto\"\n menuPortalTarget={portalElement.current}\n aria-label={intl.formatMessage({\n id: \"coordinateInput.ariaLabel\"\n })}\n classNamePrefix=\"coordinate-input-select\"\n isSearchable={false}\n chakraStyles={{\n menu: (base) => {\n return {\n ...base,\n width: \"max-content\",\n minWidth: \"100%\"\n };\n },\n control: (base, { selectProps: { menuIsOpen } }) => ({\n ...base,\n width: \"max-content\",\n minWidth: \"100%\",\n color: \"white\",\n borderLeftStyle: \"none\",\n borderLeftRadius: 0,\n padding: 0,\n backgroundColor: `${menuIsOpen ? \"rgb(27, 75, 95)\" : \"var(--chakra-colors-background_primary)\"}`,\n _focus: {\n boxShadow: \"var(--chakra-shadows-outline)\"\n }\n }),\n valueContainer: (base) => ({\n ...base,\n paddingEnd: 0,\n cursor: \"pointer\"\n }),\n dropdownIndicator: (base, { selectProps: { menuIsOpen } }) => ({\n ...base,\n paddingStart: 0,\n backgroundColor: `${menuIsOpen ? \"rgb(27, 75, 95)\" : \"var(--chakra-colors-background_primary)\"}`\n }),\n option: (base) => ({\n ...base,\n _focus: {\n background: \"var(--chakra-colors-trails-300)\"\n }\n }),\n indicatorSeparator: (base, { selectProps: { menuIsOpen } }) => ({\n ...base,\n backgroundColor: `${menuIsOpen ? \"rgb(27, 75, 95)\" : \"var(--chakra-colors-background_primary)\"}`,\n borderColor: `${menuIsOpen ? \"rgb(27, 75, 95)\" : \"var(--chakra-colors-background_primary)\"}`\n })\n }}\n ariaLiveMessages={ariaMessages}\n onChange={(e) => {\n if (e?.value !== undefined) {\n onProjectionChange(e);\n }\n }}\n onKeyDown={keyDown}\n menuIsOpen={isOpen}\n onMenuOpen={() => setIsOpen(true)}\n onMenuClose={() => setIsOpen(false)}\n />\n );\n});\n\n/**\n * Provides custom aria messages for select of the coordinate input component.\n */\nfunction useAriaMessages(\n intl: PackageIntl\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): AriaLiveMessages<any, false, any> {\n return useMemo(() => {\n /**\n * Method to create Aria-String for focus-Event\n */\n const onFocus: AriaOnFocus<unknown> = () => {\n // no aria string for focus-events because in some screen readers (NVDA) and browsers (Chrome) updating the aria string causes the instructions to be read out again each time a select option is focused\n return \"\";\n };\n\n /**\n * Method to create Aria-String for value-change-Event\n */\n const onChange: AriaOnChange<unknown, boolean> = (props) => {\n if (props.action == \"select-option\" || props.action == \"initial-input-focus\")\n return props.label + \" \" + intl.formatMessage({ id: \"selected\" });\n else return \"\";\n };\n\n /**\n * Method to create Aria-String for instruction\n */\n const guidance = () => {\n return \"\";\n };\n\n /**\n * Method to create Aria-String for result length\n */\n const onFilter = () => {\n return \"\";\n };\n\n return {\n onFocus,\n onChange,\n guidance,\n onFilter\n };\n }, [intl]);\n}\n"],"names":["ProjectionSelect"],"mappings":";;;;;;AASO,MAAM,gBAAmB,GAAA,IAAA,CAAK,SAASA,iBAAAA,CAAiB,KAK5D,EAAA;AACC,EAAA,MAAM,EAAE,iBAAA,EAAmB,WAAa,EAAA,aAAA,EAAe,oBAAuB,GAAA,KAAA,CAAA;AAC9E,EAAA,MAAM,OAAO,OAAQ,EAAA,CAAA;AACrB,EAAM,MAAA,YAAA,GAAe,gBAAgB,IAAI,CAAA,CAAA;AACzC,EAAA,MAAM,CAAC,MAAA,EAAQ,SAAS,CAAA,GAAI,SAAS,KAAK,CAAA,CAAA;AAE1C,EAAM,MAAA,OAAA,GAAU,QAAS,CAAA,CAAC,KAAyC,KAAA;AAE/D,IAAA,IAAI,CAAC,MAAA,IAAU,KAAM,CAAA,GAAA,KAAQ,OAAS,EAAA;AAClC,MAAA,SAAA,CAAU,IAAI,CAAA,CAAA;AAAA,KAClB;AAAA,GACH,CAAA,CAAA;AAED,EACI,uBAAA,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACG,KAAO,EAAA,iBAAA;AAAA,MACP,YAAc,EAAA,iBAAA;AAAA,MACd,OAAS,EAAA,WAAA;AAAA,MACT,aAAc,EAAA,MAAA;AAAA,MACd,kBAAkB,aAAc,CAAA,OAAA;AAAA,MAChC,YAAA,EAAY,KAAK,aAAc,CAAA;AAAA,QAC3B,EAAI,EAAA,2BAAA;AAAA,OACP,CAAA;AAAA,MACD,eAAgB,EAAA,yBAAA;AAAA,MAChB,YAAc,EAAA,KAAA;AAAA,MACd,YAAc,EAAA;AAAA,QACV,IAAA,EAAM,CAAC,IAAS,KAAA;AACZ,UAAO,OAAA;AAAA,YACH,GAAG,IAAA;AAAA,YACH,KAAO,EAAA,aAAA;AAAA,YACP,QAAU,EAAA,MAAA;AAAA,WACd,CAAA;A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@@ -0,0 +1,147 @@
1
+ # @open-pioneer/coordinate-search
2
+
3
+ This package provides a UI component which allow users to search for coordinates in the map and provides component that is an input field for coordinates.
4
+
5
+ ## Usage coordinate search
6
+
7
+ To integrate the coordinate search in your app, insert the following snippet:
8
+
9
+ ```jsx
10
+ <CoordinateSearch mapId="map_id" />
11
+ ```
12
+
13
+ ### Configuration
14
+
15
+ To define the selectable projections, set the optional `projections` property:
16
+
17
+ ```jsx
18
+ <CoordinateSearch
19
+ mapId="map_id"
20
+ projections={[
21
+ {
22
+ label: "EPSG:25832",
23
+ value: "EPSG:25832",
24
+ precision: 2
25
+ },
26
+ {
27
+ label: "WGS 84",
28
+ value: "EPSG:4326"
29
+ },
30
+ {
31
+ label: "Web Mercator",
32
+ value: "EPSG:3857"
33
+ }
34
+ ]}
35
+ />
36
+ ```
37
+
38
+ The optional property `precision` allows to specify the number of display digits (default: 3).
39
+
40
+ If no `projections` are specified, Web Mercator (EPSG:3857) and WGS 84 (EPSG:4326) are the default options.
41
+
42
+ ### Listening to events
43
+
44
+ To listen to the events `onSelect` and `onClear`, provide optional callback functions to the component.
45
+
46
+ In case of the `onSelect` event, you can access the entered coordinate from the parameter `CoordinatesEvent`. The `onSelect` event gets called if a valid input is entered or if the selected projection is changed after entering an input.
47
+
48
+ With the `onClear` option, you can set a callback function that gets called if the clear button is clicked.
49
+
50
+ ```tsx
51
+ <CoordinateSearch
52
+ mapId="map_id"
53
+ onSelect={(event: CoordinatesEvent) => {
54
+ // do something
55
+ }}
56
+ onClear={() => {
57
+ // do something
58
+ }}
59
+ />
60
+ ```
61
+
62
+ ## Usage coordinate input
63
+
64
+ To integrate the coordinate input component in your app, insert the following snippet:
65
+
66
+ ```jsx
67
+ <CoordinateInput mapId="map_id" />
68
+ ```
69
+
70
+ ### Configure projections
71
+
72
+ To define the selectable projections, set the optional `projections` property:
73
+
74
+ ```jsx
75
+ <CoordinateInput
76
+ mapId="map_id"
77
+ projections={[
78
+ {
79
+ label: "EPSG:25832",
80
+ value: "EPSG:25832",
81
+ precision: 2
82
+ },
83
+ {
84
+ label: "WGS 84",
85
+ value: "EPSG:4326"
86
+ },
87
+ {
88
+ label: "Web Mercator",
89
+ value: "EPSG:3857"
90
+ }
91
+ ]}
92
+ />
93
+ ```
94
+
95
+ The optional property `precision` allows to specify the number of display digits (default: 3).
96
+
97
+ If no `projections` are specified, Web Mercator (EPSG:3857) and WGS 84 (EPSG:4326) are the default options.
98
+
99
+ ### Set the input value
100
+
101
+ To set the value of the input field from outside the component, set the optional `input` property of type `Coordinate`.
102
+
103
+ The coordinates have to be in the projection of the map.
104
+
105
+ If the value changes, the `onSelect` function is triggered (see below).
106
+
107
+ ```jsx
108
+ <CoordinateInput mapId="map_id" input={[761166, 6692084]} />
109
+ ```
110
+
111
+ ### Configure the placeholder
112
+
113
+ To set the placeholder of the input field from outside the component, use the optional `placeholder` property of type `Coordinate` or `string`.
114
+
115
+ Common usage for a `string` input is a supportive text like "Enter coordinates here".
116
+
117
+ A `Coordinate` input can be used for example for showing the coordinates of a selected geometry or the current mouse position.
118
+
119
+ The Coordinates have to be in the projection of the map.
120
+
121
+ ```jsx
122
+ <CoordinateInput mapId="map_id" placeholder={[700000, 6000000]} />
123
+ <CoordinateInput mapId="map_id" placeholder={"Enter coordinates here"} />
124
+ ```
125
+
126
+ ### Listening to events
127
+
128
+ To listen to the events `onSelect` and `onClear`, provide optional callback functions to the component.
129
+
130
+ In case of the `onSelect` event, you can access the entered coordinate from the parameter `CoordinatesEvent`. The `onSelect` event gets called if you enter the input, if value of the `input` property changes or if the selected projection is changed after entering an input.
131
+
132
+ With the `onClear` option, you can set a callback function that gets called if the clear button is clicked.
133
+
134
+ ```tsx
135
+ <CoordinateInput
136
+ onSelect={(event: CoordinatesEvent) => {
137
+ // do something
138
+ }}
139
+ onClear={() => {
140
+ // do something
141
+ }}
142
+ />
143
+ ```
144
+
145
+ ## License
146
+
147
+ Apache-2.0 (see `LICENSE` file)
@@ -0,0 +1,8 @@
1
+ import { useIntlInternal, useServiceInternal } from '@open-pioneer/runtime/react-integration';
2
+
3
+ const PACKAGE_NAME = "@open-pioneer/coordinate-search";
4
+ const useService = /*@__PURE__*/ useServiceInternal.bind(undefined, PACKAGE_NAME);
5
+ const useIntl = /*@__PURE__*/ useIntlInternal.bind(undefined, PACKAGE_NAME);
6
+
7
+ export { useIntl, useService };
8
+ //# sourceMappingURL=_virtual-pioneer-module_react-hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_virtual-pioneer-module_react-hooks.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,13 @@
1
+ import { NumberParserService, PackageIntl } from "@open-pioneer/runtime";
2
+ import { Projection } from "ol/proj";
3
+ export interface ParseSuccess {
4
+ kind: "success";
5
+ projection: Projection;
6
+ coordinates: [number, number];
7
+ }
8
+ export interface ParseError {
9
+ kind: "empty" | "tooltip.space" | "tooltip.spaceOne" | "tooltip.2coords" | "tooltip.invalidNumbers" | "tooltip.extent" | "tooltip.projection";
10
+ }
11
+ export type ParseResult = ParseSuccess | ParseError;
12
+ export declare function parseCoordinates(input: string, numberParser: NumberParserService, projection: Projection): ParseResult;
13
+ export declare function formatCoordinates(coordinates: number[], precision: number, intl: PackageIntl): string;
package/coordinates.js ADDED
@@ -0,0 +1,73 @@
1
+ import { get, transform } from 'ol/proj.js';
2
+ import { createLogger } from '@open-pioneer/core';
3
+
4
+ const LOG = createLogger("coordinate-search");
5
+ function parseCoordinates(input, numberParser, projection) {
6
+ if (input == "") return err("empty");
7
+ if (!input.includes(" ")) {
8
+ return err("tooltip.space");
9
+ }
10
+ if (input.indexOf(" ") != input.lastIndexOf(" ")) {
11
+ return err("tooltip.spaceOne");
12
+ }
13
+ const splitCoords = input.split(" ");
14
+ if (splitCoords.length != 2 || splitCoords[0] == "" || splitCoords[1] == "") {
15
+ return err("tooltip.2coords");
16
+ }
17
+ const coordsString1 = numberParser.parseNumber(splitCoords[0]);
18
+ const coordsString2 = numberParser.parseNumber(splitCoords[1]);
19
+ const coords = [coordsString1, coordsString2];
20
+ if (coords.some((number) => Number.isNaN(number))) {
21
+ return err("tooltip.invalidNumbers");
22
+ }
23
+ try {
24
+ if (!checkIfCoordsInProjectionsExtent(projection, coords)) {
25
+ return err("tooltip.extent");
26
+ }
27
+ if (!checkIfCoordsInProjectionsExtent(
28
+ get("EPSG:4326"),
29
+ transform(coords, projection, "EPSG:4326")
30
+ )) {
31
+ return err("tooltip.extent");
32
+ }
33
+ } catch (e) {
34
+ LOG.warn("Failed to check if coordinates are in projection extent", e);
35
+ return err("tooltip.projection");
36
+ }
37
+ return {
38
+ kind: "success",
39
+ projection,
40
+ coordinates: coords
41
+ };
42
+ }
43
+ function err(kind) {
44
+ return { kind };
45
+ }
46
+ function checkIfCoordsInProjectionsExtent(projection, coords) {
47
+ const extent = projection.getExtent();
48
+ if (!extent || extent.length !== 4) {
49
+ return true;
50
+ }
51
+ if (!coords || coords.length !== 2) {
52
+ throw new Error(`Internal error: invalid coordinates ${coords}.`);
53
+ }
54
+ return extent[0] <= coords[0] && extent[1] <= coords[1] && extent[2] >= coords[0] && extent[3] >= coords[1];
55
+ }
56
+ function formatCoordinates(coordinates, precision, intl) {
57
+ if (coordinates[0] == null || coordinates[1] == null) {
58
+ return "";
59
+ }
60
+ const [x, y] = coordinates;
61
+ const xString = intl.formatNumber(x, {
62
+ maximumFractionDigits: precision,
63
+ minimumFractionDigits: precision
64
+ });
65
+ const yString = intl.formatNumber(y, {
66
+ maximumFractionDigits: precision,
67
+ minimumFractionDigits: precision
68
+ });
69
+ return xString + " " + yString;
70
+ }
71
+
72
+ export { formatCoordinates, parseCoordinates };
73
+ //# sourceMappingURL=coordinates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinates.js","sources":["coordinates.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { NumberParserService, PackageIntl } from \"@open-pioneer/runtime\";\nimport { get as getProjection, Projection, transform } from \"ol/proj\";\nimport { createLogger } from \"@open-pioneer/core\";\nconst LOG = createLogger(\"coordinate-search\");\n\nexport interface ParseSuccess {\n kind: \"success\";\n projection: Projection;\n coordinates: [number, number];\n}\n\nexport interface ParseError {\n // Double duty as i18n message at the moment\n kind:\n | \"empty\"\n | \"tooltip.space\"\n | \"tooltip.spaceOne\"\n | \"tooltip.2coords\"\n | \"tooltip.invalidNumbers\"\n | \"tooltip.extent\"\n | \"tooltip.projection\";\n}\n\nexport type ParseResult = ParseSuccess | ParseError;\n\nexport function parseCoordinates(\n input: string,\n numberParser: NumberParserService,\n projection: Projection\n): ParseResult {\n if (input == \"\") return err(\"empty\");\n\n if (!input.includes(\" \")) {\n return err(\"tooltip.space\");\n }\n if (input.indexOf(\" \") != input.lastIndexOf(\" \")) {\n return err(\"tooltip.spaceOne\");\n }\n\n const splitCoords = input.split(\" \");\n if (splitCoords.length != 2 || splitCoords[0] == \"\" || splitCoords[1] == \"\") {\n return err(\"tooltip.2coords\");\n }\n\n const coordsString1 = numberParser.parseNumber(splitCoords[0]!);\n const coordsString2 = numberParser.parseNumber(splitCoords[1]!);\n\n const coords: [number, number] = [coordsString1, coordsString2];\n if (coords.some((number) => Number.isNaN(number))) {\n return err(\"tooltip.invalidNumbers\");\n }\n try {\n if (!checkIfCoordsInProjectionsExtent(projection, coords)) {\n return err(\"tooltip.extent\");\n }\n\n if (\n !checkIfCoordsInProjectionsExtent(\n getProjection(\"EPSG:4326\")!,\n transform(coords, projection, \"EPSG:4326\")\n )\n ) {\n return err(\"tooltip.extent\");\n }\n } catch (e) {\n LOG.warn(\"Failed to check if coordinates are in projection extent\", e);\n return err(\"tooltip.projection\");\n }\n\n return {\n kind: \"success\",\n projection,\n coordinates: coords\n };\n}\n\nfunction err(kind: ParseError[\"kind\"]): ParseError {\n return { kind };\n}\n\n/* validate if the coordinates fit to the extent of the selected projection */\nfunction checkIfCoordsInProjectionsExtent(projection: Projection, coords: number[]): boolean {\n const extent = projection.getExtent();\n if (!extent || extent.length !== 4) {\n // Some projections don't have an extent, cannot validate.\n return true;\n }\n if (!coords || coords.length !== 2) {\n throw new Error(`Internal error: invalid coordinates ${coords}.`);\n }\n\n return (\n extent[0]! <= coords[0]! &&\n extent[1]! <= coords[1]! &&\n extent[2]! >= coords[0]! &&\n extent[3]! >= coords[1]!\n );\n}\n\n/* Formats the coordinates as a string with given precision considering locales */\nexport function formatCoordinates(\n coordinates: number[],\n precision: number,\n intl: PackageIntl\n): string {\n if (coordinates[0] == null || coordinates[1] == null) {\n return \"\";\n }\n\n const [x, y] = coordinates;\n\n const xString = intl.formatNumber(x, {\n maximumFractionDigits: precision,\n minimumFractionDigits: precision\n });\n const yString = intl.formatNumber(y, {\n maximumFractionDigits: precision,\n minimumFractionDigits: precision\n });\n\n return xString + \" \" + yString;\n}\n"],"names":["getProjection"],"mappings":";;;AAKA,MAAM,GAAA,GAAM,aAAa,mBAAmB,CAAA,CAAA;AAsB5B,SAAA,gBAAA,CACZ,KACA,EAAA,YAAA,EACA,UACW,EAAA;AACX,EAAA,IAAI,KAAS,IAAA,EAAA,EAAW,OAAA,GAAA,CAAI,OAAO,CAAA,CAAA;AAEnC,EAAA,IAAI,CAAC,KAAA,CAAM,QAAS,CAAA,GAAG,CAAG,EAAA;AACtB,IAAA,OAAO,IAAI,eAAe,CAAA,CAAA;AAAA,GAC9B;AACA,EAAA,IAAI,MAAM,OAAQ,CAAA,GAAG,KAAK,KAAM,CAAA,WAAA,CAAY,GAAG,CAAG,EAAA;AAC9C,IAAA,OAAO,IAAI,kBAAkB,CAAA,CAAA;AAAA,GACjC;AAEA,EAAM,MAAA,WAAA,GAAc,KAAM,CAAA,KAAA,CAAM,GAAG,CAAA,CAAA;AACnC,EAAI,IAAA,WAAA,CAAY,MAAU,IAAA,CAAA,IAAK,WAAY,CAAA,CAAC,KAAK,EAAM,IAAA,WAAA,CAAY,CAAC,CAAA,IAAK,EAAI,EAA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+ messages:
2
+ coordinateInput:
3
+ ariaLabel: Koordinateneingabe
4
+ copyPlaceholder: Kopieren
5
+ clearPlaceholder: Löschen
6
+ tooltip:
7
+ basic: "Ungültige Eingabe"
8
+ space: "Ungültige Eingabe: Bitte trennen Sie die Koordinaten mit genau einem Leerzeichen."
9
+ spaceOne: "Ungültige Eingabe: Bitte verwenden Sie nur genau ein Leerzeichen zum Trennen der Koordinaten."
10
+ 2coords: "Ungültige Eingabe: Es müssen zwei Zahlen eingegeben werden."
11
+ invalidNumbers: "Ungültige Eingabe: Es müssen zwei gültige Zahlen eingegeben werden."
12
+ extent: "Die eingegebenen Koordinaten passen nicht zum Koordinatensystem. Bitte Koordinatensystem oder Koordinaten ändern."
13
+ projection: "Es gibt einen Fehler mit der Projektion. Bitte eine andere Projektion auswählen."
14
+ selected: selektiert
package/i18n/en.yaml ADDED
@@ -0,0 +1,14 @@
1
+ messages:
2
+ coordinateInput:
3
+ ariaLabel: Coordinate input
4
+ copyPlaceholder: Copy
5
+ clearPlaceholder: Clear
6
+ tooltip:
7
+ basic: "Invalid input"
8
+ space: "Invalid input: Please enter the coordinates seperated by a space."
9
+ spaceOne: "Invalid input: Please use exactly one space to separate the coordinates."
10
+ 2coords: "Invalid input: Please enter two numbers."
11
+ invalidNumbers: "Invalid input: Please enter two valid numbers."
12
+ extent: "The coordinates are not in the bounds of the reference system. Please change the projection or coordinates."
13
+ projection: "The projection is not working. Please change to another projection."
14
+ selected: selected
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { CoordinateSearch, type CoordinateSearchProps } from "./CoordinateSearch";
2
+ export { CoordinateInput, type CoordinateInputProps, type CoordinatesSelectEvent, type ProjectionInput } from "./CoordinateInput";
package/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export { CoordinateSearch } from './CoordinateSearch.js';
2
+ export { CoordinateInput } from './CoordinateInput.js';
3
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}