@eeacms/volto-widget-geolocation 7.0.0 → 7.0.1
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/.eslintrc.js +6 -6
- package/CHANGELOG.md +45 -1
- package/package.json +1 -1
- package/src/components/manage/Widgets/GeolocationWidget.jsx +11 -3
- package/src/components/manage/Widgets/InlineForm.jsx +3 -2
- package/src/components/manage/Widgets/ListResults.jsx +2 -2
- package/src/components/manage/Widgets/SearchGeoName.jsx +8 -4
- package/src/components/manage/Widgets/SearchWidget.jsx +2 -1
- package/src/components/manage/Widgets/util.js +3 -1
package/.eslintrc.js
CHANGED
|
@@ -16,16 +16,16 @@ if (configFile) {
|
|
|
16
16
|
voltoPath = `./${jsConfig.baseUrl}/${pathsConfig['@plone/volto'][0]}`;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
const
|
|
20
|
-
const
|
|
19
|
+
const { AddonRegistry } = require('@plone/registry/addon-registry');
|
|
20
|
+
const { registry } = AddonRegistry.init(projectRootPath);
|
|
21
21
|
|
|
22
22
|
// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
|
|
23
|
-
const addonAliases = Object.keys(
|
|
23
|
+
const addonAliases = Object.keys(registry.packages).map((o) => [
|
|
24
24
|
o,
|
|
25
|
-
|
|
25
|
+
registry.packages[o].modulePath,
|
|
26
26
|
]);
|
|
27
27
|
|
|
28
|
-
const addonExtenders =
|
|
28
|
+
const addonExtenders = registry.getEslintExtenders().map((m) => require(m));
|
|
29
29
|
|
|
30
30
|
const defaultConfig = {
|
|
31
31
|
extends: `${voltoPath}/.eslintrc`,
|
|
@@ -34,7 +34,7 @@ const defaultConfig = {
|
|
|
34
34
|
alias: {
|
|
35
35
|
map: [
|
|
36
36
|
['@plone/volto', '@plone/volto/src'],
|
|
37
|
-
['@plone/volto-slate', '@plone/volto
|
|
37
|
+
['@plone/volto-slate', '@plone/volto-slate/src'],
|
|
38
38
|
...addonAliases,
|
|
39
39
|
['@package', `${__dirname}/src`],
|
|
40
40
|
['@root', `${__dirname}/src`],
|
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
-
### [7.0.
|
|
7
|
+
### [7.0.1](https://github.com/eea/volto-widget-geolocation/compare/7.0.0...7.0.1) - 8 April 2026
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- test: Fix make test [Alin V. (Claudiu) - [`259216a`](https://github.com/eea/volto-widget-geolocation/commit/259216a2b005820c46823bf3d630b3d19d72b390)]
|
|
12
|
+
## [7.0.0](https://github.com/eea/volto-widget-geolocation/compare/6.0.0...7.0.0) - 25 March 2026
|
|
8
13
|
|
|
9
14
|
#### :rocket: New Features
|
|
10
15
|
|
|
@@ -12,10 +17,18 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
12
17
|
|
|
13
18
|
#### :house: Internal changes
|
|
14
19
|
|
|
20
|
+
- chore: [JENKINSFILE] add package version in sonarqube [valentinab25 - [`3d36f26`](https://github.com/eea/volto-widget-geolocation/commit/3d36f268dd9a174c76701d91821e179a9aa23c88)]
|
|
21
|
+
- chore: [JENKINSFILE] use sonarqube branches [EEA Jenkins - [`20463c5`](https://github.com/eea/volto-widget-geolocation/commit/20463c59a3745afd8f9219f4218e9de8b7d66154)]
|
|
15
22
|
|
|
16
23
|
#### :hammer_and_wrench: Others
|
|
17
24
|
|
|
18
25
|
- tests: Fix Sonar Qube tags - refs #297339 [Alin Voinea - [`67965ac`](https://github.com/eea/volto-widget-geolocation/commit/67965ac1bee2cf70b1bc22af35c901dc13af9945)]
|
|
26
|
+
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`aae565e`](https://github.com/eea/volto-widget-geolocation/commit/aae565e00a2cd98c49bfdbd10b5dd06048d63bb4)]
|
|
27
|
+
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`fb0905f`](https://github.com/eea/volto-widget-geolocation/commit/fb0905f94baac7fd571d4e79c1420afb00a8fccc)]
|
|
28
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`5ed8a57`](https://github.com/eea/volto-widget-geolocation/commit/5ed8a572af0b0ca52390d3dc58e30597ccb0a62e)]
|
|
29
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`ac19098`](https://github.com/eea/volto-widget-geolocation/commit/ac1909879d5e6f1378803fb6186a63195b797173)]
|
|
30
|
+
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`14a8054`](https://github.com/eea/volto-widget-geolocation/commit/14a805450540589f1393d50a06d299dad4d7a7cd)]
|
|
31
|
+
- Add Sonarqube tag using ied-frontend addons list [EEA Jenkins - [`6992e34`](https://github.com/eea/volto-widget-geolocation/commit/6992e343adaf36ee43c1f72f61d6a8882bddc36f)]
|
|
19
32
|
## [6.0.0](https://github.com/eea/volto-widget-geolocation/compare/5.3.1...6.0.0) - 22 April 2024
|
|
20
33
|
|
|
21
34
|
#### :rocket: New Features
|
|
@@ -31,6 +44,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
31
44
|
|
|
32
45
|
#### :hammer_and_wrench: Others
|
|
33
46
|
|
|
47
|
+
- Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`a14b70c`](https://github.com/eea/volto-widget-geolocation/commit/a14b70c1d9fe082759b14f6c6cee1683e0cfec07)]
|
|
48
|
+
- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`81b65a2`](https://github.com/eea/volto-widget-geolocation/commit/81b65a292d6bf3b9a98f566c451b95644a44bfa4)]
|
|
34
49
|
### [5.3.0](https://github.com/eea/volto-widget-geolocation/compare/5.2.0...5.3.0) - 13 March 2024
|
|
35
50
|
|
|
36
51
|
#### :bug: Bug Fixes
|
|
@@ -55,6 +70,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
55
70
|
#### :hammer_and_wrench: Others
|
|
56
71
|
|
|
57
72
|
- Updated package version [David Ichim - [`65b98d1`](https://github.com/eea/volto-widget-geolocation/commit/65b98d1067fde38c3208775be637a3038f64ab34)]
|
|
73
|
+
- Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`e8523d2`](https://github.com/eea/volto-widget-geolocation/commit/e8523d2c7416bcbf0102b63f41e71433c9c435fd)]
|
|
58
74
|
- test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`93df3b7`](https://github.com/eea/volto-widget-geolocation/commit/93df3b7b12b5f17416c95ca1824d51570e04524e)]
|
|
59
75
|
- fix search button in metadata section [Teodor - [`3645338`](https://github.com/eea/volto-widget-geolocation/commit/3645338ddaab8ca8965cdfae4f2ba79837b88fec)]
|
|
60
76
|
- change UI for advanced search button [Teodor - [`1532b13`](https://github.com/eea/volto-widget-geolocation/commit/1532b131b1a4560ebe919252db31f7bb586792ab)]
|
|
@@ -66,9 +82,15 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
66
82
|
|
|
67
83
|
#### :house: Internal changes
|
|
68
84
|
|
|
85
|
+
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`f922cca`](https://github.com/eea/volto-widget-geolocation/commit/f922ccab5b9aaafb4a339ba946d91ee5f20329c9)]
|
|
69
86
|
|
|
70
87
|
#### :hammer_and_wrench: Others
|
|
71
88
|
|
|
89
|
+
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`82bcb17`](https://github.com/eea/volto-widget-geolocation/commit/82bcb1797f3345148c6a603f2e3cc33baf264989)]
|
|
90
|
+
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`b85472a`](https://github.com/eea/volto-widget-geolocation/commit/b85472ab313d3f93c4e270817a96596ffcd0f544)]
|
|
91
|
+
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`997043c`](https://github.com/eea/volto-widget-geolocation/commit/997043c4c14b77b2d99c83518843a42c93343075)]
|
|
92
|
+
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`af80bd8`](https://github.com/eea/volto-widget-geolocation/commit/af80bd8a135ff8cdc7f988ff7392c1612e4383cb)]
|
|
93
|
+
- test: [JENKINS] Improve cypress time [valentinab25 - [`886d02a`](https://github.com/eea/volto-widget-geolocation/commit/886d02a83c00a2cac1ee1f878d5d036e2c28d0fd)]
|
|
72
94
|
### [5.1.6](https://github.com/eea/volto-widget-geolocation/compare/5.1.5...5.1.6) - 22 October 2023
|
|
73
95
|
|
|
74
96
|
### [5.1.5](https://github.com/eea/volto-widget-geolocation/compare/5.1.4...5.1.5) - 17 October 2023
|
|
@@ -95,6 +117,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
95
117
|
|
|
96
118
|
- test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`8bf8acb`](https://github.com/eea/volto-widget-geolocation/commit/8bf8acbca8df069456df12f1b4397cc7f19ebcdb)]
|
|
97
119
|
- test: Fix package.json scripts to use makefile [Alin Voinea - [`b01f153`](https://github.com/eea/volto-widget-geolocation/commit/b01f1535b57cb0c0a4e17c3b8e82e260635719df)]
|
|
120
|
+
- test: Fix eslint and yarn i18n [Alin Voinea - [`136fd03`](https://github.com/eea/volto-widget-geolocation/commit/136fd039d82952d5eb5481117d19715310b006a4)]
|
|
98
121
|
- i18n: Add en [Alin Voinea - [`05a2dc9`](https://github.com/eea/volto-widget-geolocation/commit/05a2dc91a4fa487d828586cc909d9d343c3d1506)]
|
|
99
122
|
- test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`0fce8cc`](https://github.com/eea/volto-widget-geolocation/commit/0fce8ccbcefc5f1b12b4248e962ce7ec1c822b5d)]
|
|
100
123
|
### [5.1.3](https://github.com/eea/volto-widget-geolocation/compare/5.1.2...5.1.3) - 10 August 2023
|
|
@@ -126,15 +149,18 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
126
149
|
- test: jest should look for addons in node_modules Refs #253277 [valentinab25 - [`97afdc6`](https://github.com/eea/volto-widget-geolocation/commit/97afdc64e77ba6ed56a252dd425b13c0a9900601)]
|
|
127
150
|
- test: add unit tests for util - refs #253277 [ana-oprea - [`5904795`](https://github.com/eea/volto-widget-geolocation/commit/5904795ce51f8c5fc3a8e5cf6812a72b284586b0)]
|
|
128
151
|
- test: Fix test config, coverage Refs #253277 [valentinab25 - [`ae96b0a`](https://github.com/eea/volto-widget-geolocation/commit/ae96b0a75fb6c418281a83fe45901d68b88c08f2)]
|
|
152
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`e46d9a3`](https://github.com/eea/volto-widget-geolocation/commit/e46d9a3378b8991c38308bf820c85cb292628dc1)]
|
|
129
153
|
### [5.1.0](https://github.com/eea/volto-widget-geolocation/compare/5.0.3...5.1.0) - 27 March 2023
|
|
130
154
|
|
|
131
155
|
#### :hammer_and_wrench: Others
|
|
132
156
|
|
|
157
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`7155a34`](https://github.com/eea/volto-widget-geolocation/commit/7155a34e46cefc066790fa0d638be14e86e390c8)]
|
|
133
158
|
### [5.0.3](https://github.com/eea/volto-widget-geolocation/compare/5.0.2...5.0.3) - 2 March 2023
|
|
134
159
|
|
|
135
160
|
#### :hammer_and_wrench: Others
|
|
136
161
|
|
|
137
162
|
- map countrynames from taxonomy in geonames results [nileshgulia1 - [`444f50f`](https://github.com/eea/volto-widget-geolocation/commit/444f50fa31ac50f0e37675db80eceae0538f27d5)]
|
|
163
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`9cb2f2a`](https://github.com/eea/volto-widget-geolocation/commit/9cb2f2a7556d5688018cd148ef6957c6b904b6a3)]
|
|
138
164
|
### [5.0.2](https://github.com/eea/volto-widget-geolocation/compare/5.0.1...5.0.2) - 27 February 2023
|
|
139
165
|
|
|
140
166
|
#### :hammer_and_wrench: Others
|
|
@@ -142,7 +168,12 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
142
168
|
- fix proptype warning [nileshgulia1 - [`c9cc7c5`](https://github.com/eea/volto-widget-geolocation/commit/c9cc7c510d69fd980d6b8190144afdc3b1c3b594)]
|
|
143
169
|
- Merge pull request #49 from eea/country_mapping_fix [Nilesh - [`27f7405`](https://github.com/eea/volto-widget-geolocation/commit/27f7405212bc77bdeef2b12398cba9ccbfbcf3d4)]
|
|
144
170
|
- consume country names from country_mapping from backend if present [nileshgulia1 - [`ab91c4a`](https://github.com/eea/volto-widget-geolocation/commit/ab91c4a8bc5a80ee3d68f45194aaabfcf94394d5)]
|
|
171
|
+
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`df6a218`](https://github.com/eea/volto-widget-geolocation/commit/df6a218ce262fdec9d9733dfd924c60cdefca9b1)]
|
|
172
|
+
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`748246c`](https://github.com/eea/volto-widget-geolocation/commit/748246c00f5f10e1e1ddba7cebaa5bde289432e5)]
|
|
145
173
|
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`ee943bd`](https://github.com/eea/volto-widget-geolocation/commit/ee943bd7fb8c6e0e37114c3c7be70158973f1d7b)]
|
|
174
|
+
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`745dede`](https://github.com/eea/volto-widget-geolocation/commit/745dede703c8c625be24feb97fe8af156235cc60)]
|
|
175
|
+
- yarn 3 [Alin Voinea - [`71a7571`](https://github.com/eea/volto-widget-geolocation/commit/71a7571adcbc81480589ccce3959120d565e7015)]
|
|
176
|
+
- Add Sonarqube tag using demo-kitkat-frontend addons list [EEA Jenkins - [`5dff0ab`](https://github.com/eea/volto-widget-geolocation/commit/5dff0abc11b5397ac1ca85897a46bc37d0732c92)]
|
|
146
177
|
### [5.0.1](https://github.com/eea/volto-widget-geolocation/compare/5.0.0...5.0.1) - 16 November 2022
|
|
147
178
|
|
|
148
179
|
#### :hammer_and_wrench: Others
|
|
@@ -153,11 +184,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
153
184
|
#### :hammer_and_wrench: Others
|
|
154
185
|
|
|
155
186
|
- Cleanup [Alin Voinea - [`2b53756`](https://github.com/eea/volto-widget-geolocation/commit/2b5375660e6184a5875b7ac87eb17902cc7bfab9)]
|
|
187
|
+
- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`24fc1be`](https://github.com/eea/volto-widget-geolocation/commit/24fc1be54e9b5f52473a704928e9770df981894a)]
|
|
188
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`41b6a2c`](https://github.com/eea/volto-widget-geolocation/commit/41b6a2cccb276db1e6f57bd4d28318628ef87a08)]
|
|
156
189
|
- update(jest): add @plone/volto-slate resolver refs- #153447 [nileshgulia1 - [`404894f`](https://github.com/eea/volto-widget-geolocation/commit/404894fcf6b5227a19f8292f881ce66476ce5e16)]
|
|
157
190
|
### [4.0.6](https://github.com/eea/volto-widget-geolocation/compare/4.0.5...4.0.6) - 30 June 2022
|
|
158
191
|
|
|
159
192
|
#### :hammer_and_wrench: Others
|
|
160
193
|
|
|
194
|
+
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`c706ec9`](https://github.com/eea/volto-widget-geolocation/commit/c706ec94c0d51443d81a788c1c100e6cc268b034)]
|
|
161
195
|
### [4.0.5](https://github.com/eea/volto-widget-geolocation/compare/4.0.4...4.0.5) - 20 June 2022
|
|
162
196
|
|
|
163
197
|
#### :hammer_and_wrench: Others
|
|
@@ -173,30 +207,40 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
173
207
|
- eslint [nileshgulia1 - [`c91d86c`](https://github.com/eea/volto-widget-geolocation/commit/c91d86c33a4756373294d1779d01f19775b8363d)]
|
|
174
208
|
- fix filters [nileshgulia1 - [`9822e51`](https://github.com/eea/volto-widget-geolocation/commit/9822e5127bf0fb7e0a9957c63d78e7460d53cb5b)]
|
|
175
209
|
- fix searchWidget for coremetadata behaviour [nileshgulia1 - [`3e28cc7`](https://github.com/eea/volto-widget-geolocation/commit/3e28cc74195851ebc0537abb021032fc8429ab06)]
|
|
210
|
+
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`54c8b1c`](https://github.com/eea/volto-widget-geolocation/commit/54c8b1c85acdda12b1f026f8fa80fb63db7c9f9d)]
|
|
211
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`bc64abe`](https://github.com/eea/volto-widget-geolocation/commit/bc64abe6c60580fe7e99545f75e552e8b9af4975)]
|
|
176
212
|
### [4.0.3](https://github.com/eea/volto-widget-geolocation/compare/4.0.2...4.0.3) - 3 January 2022
|
|
177
213
|
|
|
178
214
|
### [4.0.2](https://github.com/eea/volto-widget-geolocation/compare/4.0.1...4.0.2) - 18 December 2021
|
|
179
215
|
|
|
180
216
|
#### :hammer_and_wrench: Others
|
|
181
217
|
|
|
218
|
+
- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`22b1599`](https://github.com/eea/volto-widget-geolocation/commit/22b1599e3c0a9ea6848bbf13b6447e54987c5ac3)]
|
|
182
219
|
### [4.0.1](https://github.com/eea/volto-widget-geolocation/compare/4.0.0...4.0.1) - 10 December 2021
|
|
183
220
|
|
|
184
221
|
#### :hammer_and_wrench: Others
|
|
185
222
|
|
|
186
223
|
- Refs #142010 - Optimize Volto-addons gitflow pipelines [valentinab25 - [`acaedb9`](https://github.com/eea/volto-widget-geolocation/commit/acaedb9198fac529c8db6c1dc744730d90abc4b5)]
|
|
224
|
+
- Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`150d263`](https://github.com/eea/volto-widget-geolocation/commit/150d263758c9651eba879292d92edd10efa0d864)]
|
|
225
|
+
- Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`d19460f`](https://github.com/eea/volto-widget-geolocation/commit/d19460f1beb0f9275220ade75bc5bb9d58571951)]
|
|
226
|
+
- Add Sonarqube tag using forests-frontend addons list [EEA Jenkins - [`d77d8cf`](https://github.com/eea/volto-widget-geolocation/commit/d77d8cf8d04177df6f4564a78804b7a7e1ca5f67)]
|
|
227
|
+
- Add Sonarqube tag using sustainability-frontend addons list [EEA Jenkins - [`1d5a574`](https://github.com/eea/volto-widget-geolocation/commit/1d5a5744b2bca35cd2a6d6ffe76c24a573cac62b)]
|
|
187
228
|
## [4.0.0](https://github.com/eea/volto-widget-geolocation/compare/3.0.3...4.0.0) - 24 September 2021
|
|
188
229
|
|
|
189
230
|
#### :hammer_and_wrench: Others
|
|
190
231
|
|
|
232
|
+
- Add Sonarqube tag using climate-energy-frontend addons list [EEA Jenkins - [`c374d87`](https://github.com/eea/volto-widget-geolocation/commit/c374d87267b340ba40cd61b53b24e8b9f135c974)]
|
|
191
233
|
### [3.0.3](https://github.com/eea/volto-widget-geolocation/compare/3.0.2...3.0.3) - 16 September 2021
|
|
192
234
|
|
|
193
235
|
#### :hammer_and_wrench: Others
|
|
194
236
|
|
|
237
|
+
- Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`f28a503`](https://github.com/eea/volto-widget-geolocation/commit/f28a503ea7ed70a857a1556d71ec50138086494b)]
|
|
195
238
|
### [3.0.2](https://github.com/eea/volto-widget-geolocation/compare/3.0.1...3.0.2) - 9 September 2021
|
|
196
239
|
|
|
197
240
|
#### :hammer_and_wrench: Others
|
|
198
241
|
|
|
199
242
|
- Fix volto-corsproxy dependency pin [Alin Voinea - [`ded8151`](https://github.com/eea/volto-widget-geolocation/commit/ded8151484d2d2406fafe3a3bfe3548a2d38b06a)]
|
|
243
|
+
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`045c761`](https://github.com/eea/volto-widget-geolocation/commit/045c761ff0958adea7ac2da3c28cbbf3dd6fcedb)]
|
|
200
244
|
### [3.0.1](https://github.com/eea/volto-widget-geolocation/compare/3.0.0...3.0.1) - 18 June 2021
|
|
201
245
|
|
|
202
246
|
## [3.0.0](https://github.com/eea/volto-widget-geolocation/compare/2.3.0...3.0.0) - 9 June 2021
|
package/package.json
CHANGED
|
@@ -3,8 +3,12 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import { Grid, Button } from 'semantic-ui-react';
|
|
4
4
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
5
5
|
import { useSelector, useDispatch } from 'react-redux';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import Icon from '@plone/volto/components/theme/Icon/Icon';
|
|
7
|
+
import SidebarPopup from '@plone/volto/components/manage/Sidebar/SidebarPopup';
|
|
8
|
+
import FormFieldWrapper from '@plone/volto/components/manage/Widgets/FormFieldWrapper';
|
|
9
|
+
import unionBy from 'lodash/unionBy';
|
|
10
|
+
import keys from 'lodash/keys';
|
|
11
|
+
import isEmpty from 'lodash/isEmpty';
|
|
8
12
|
import { getGeoData } from '@eeacms/volto-widget-geolocation/actions';
|
|
9
13
|
import { GeolocationWidgetView } from '@eeacms/volto-widget-geolocation/components';
|
|
10
14
|
import Select, { components } from 'react-select';
|
|
@@ -36,6 +40,8 @@ const messages = defineMessages({
|
|
|
36
40
|
},
|
|
37
41
|
});
|
|
38
42
|
|
|
43
|
+
const EMPTY_OBJECT = Object.freeze({});
|
|
44
|
+
|
|
39
45
|
const getOptions = (arr, state) => {
|
|
40
46
|
return state ? unionBy(arr, state, 'label') : arr;
|
|
41
47
|
};
|
|
@@ -48,7 +54,9 @@ const GeolocationWidget = (props) => {
|
|
|
48
54
|
|
|
49
55
|
const [isOpenPopup, setPopup] = useState(false);
|
|
50
56
|
const dispatch = useDispatch();
|
|
51
|
-
const geoData = useSelector(
|
|
57
|
+
const geoData = useSelector(
|
|
58
|
+
(state) => state.geolocation?.data ?? EMPTY_OBJECT,
|
|
59
|
+
);
|
|
52
60
|
const { biotags = {}, geotags = {}, country_mappings = {} } = geoData;
|
|
53
61
|
|
|
54
62
|
React.useEffect(() => {
|
|
@@ -8,8 +8,9 @@ import {
|
|
|
8
8
|
selectTheme,
|
|
9
9
|
customSelectStyles,
|
|
10
10
|
} from '@plone/volto/components/manage/Widgets/SelectStyling';
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import keys from 'lodash/keys';
|
|
12
|
+
import map from 'lodash/map';
|
|
13
|
+
import Field from '@plone/volto/components/manage/Form/Field';
|
|
13
14
|
import { Segment, Message, Card } from 'semantic-ui-react';
|
|
14
15
|
|
|
15
16
|
const messages = defineMessages({
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
Accordion,
|
|
9
9
|
Button,
|
|
10
10
|
} from 'semantic-ui-react';
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import keys from 'lodash/keys';
|
|
12
|
+
import Icon from '@plone/volto/components/theme/Icon/Icon';
|
|
13
13
|
import rightSVG from '@plone/volto/icons/right-key.svg';
|
|
14
14
|
import downSVG from '@plone/volto/icons/down-key.svg';
|
|
15
15
|
import addSVG from '@plone/volto/icons/circle-plus.svg';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import InlineForm from './InlineForm';
|
|
3
|
-
import
|
|
3
|
+
import VoltoIcon from '@plone/volto/components/theme/Icon/Icon';
|
|
4
4
|
import { useSelector, shallowEqual, useDispatch } from 'react-redux';
|
|
5
|
-
import
|
|
5
|
+
import keys from 'lodash/keys';
|
|
6
6
|
|
|
7
7
|
import { GeoSearchSchema as schema } from './schema';
|
|
8
8
|
import ListResults from './ListResults';
|
|
@@ -11,16 +11,20 @@ import worldSVG from '@plone/volto/icons/world.svg';
|
|
|
11
11
|
import clearSVG from '@plone/volto/icons/clear.svg';
|
|
12
12
|
import checkSVG from '@plone/volto/icons/check.svg';
|
|
13
13
|
|
|
14
|
+
const EMPTY_OBJECT = Object.freeze({});
|
|
15
|
+
|
|
14
16
|
const SearchGeoName = (props) => {
|
|
15
17
|
const { id, data, block, setPopup, onChange, onChangeSchema } = props;
|
|
16
18
|
const [resultsValue, setResultsValue] = React.useState(data.geolocation);
|
|
17
19
|
const InlineFormSchema = schema(props);
|
|
18
20
|
const [searchUrl, setSearchUrl] = React.useState('');
|
|
19
21
|
const subrequest = useSelector(
|
|
20
|
-
(state) => state
|
|
22
|
+
(state) => state?.content?.subrequests ?? EMPTY_OBJECT,
|
|
21
23
|
shallowEqual,
|
|
22
24
|
);
|
|
23
|
-
const geoData = useSelector(
|
|
25
|
+
const geoData = useSelector(
|
|
26
|
+
(state) => state.geolocation?.data ?? EMPTY_OBJECT,
|
|
27
|
+
);
|
|
24
28
|
const { country_mappings = {} } = geoData;
|
|
25
29
|
const geonamesUrl = Object.keys(subrequest).find(
|
|
26
30
|
(item) => item === searchUrl,
|
|
@@ -8,7 +8,8 @@ import { Form, Input } from 'semantic-ui-react';
|
|
|
8
8
|
import { compose } from 'redux';
|
|
9
9
|
import { useDispatch, useSelector } from 'react-redux';
|
|
10
10
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
11
|
-
import
|
|
11
|
+
import Icon from '@plone/volto/components/theme/Icon/Icon';
|
|
12
|
+
import FormFieldWrapper from '@plone/volto/components/manage/Widgets/FormFieldWrapper';
|
|
12
13
|
import { getProxiedExternalContent } from '@eeacms/volto-corsproxy/actions';
|
|
13
14
|
import { getCountryCode, makeSearchUrl } from './util';
|
|
14
15
|
import countries from 'i18n-iso-countries';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import countries from 'i18n-iso-countries';
|
|
2
|
-
import
|
|
2
|
+
import assign from 'lodash/assign';
|
|
3
|
+
import values from 'lodash/values';
|
|
4
|
+
import keys from 'lodash/keys';
|
|
3
5
|
export function getCountryCode(countryName = '') {
|
|
4
6
|
return countries.getAlpha2Code(countryName, 'en');
|
|
5
7
|
}
|