@eeacms/volto-embed 9.0.4 → 9.0.6
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 +30 -17
- package/cypress.config.js +1 -1
- package/locales/de/LC_MESSAGES/volto.po +9 -9
- package/locales/en/LC_MESSAGES/volto.po +9 -9
- package/locales/it/LC_MESSAGES/volto.po +9 -9
- package/locales/ro/LC_MESSAGES/volto.po +9 -9
- package/locales/volto.pot +10 -10
- package/package.json +1 -1
- package/src/Blocks/EmbedMaps/View.jsx +67 -5
- package/src/Blocks/EmbedMaps/View.test.js +31 -0
- package/src/Blocks/EmbedMaps/schema.js +27 -0
- package/src/Blocks/Maps/Edit.jsx +7 -7
- package/src/Blocks/Maps/Edit.test.js +26 -0
- package/src/Blocks/Maps/View.jsx +4 -4
- package/src/EmbedMap/EmbedMap.jsx +21 -8
- package/src/EmbedMap/EmbedMap.test.js +4 -0
- package/src/EmbedMap/style.less +3 -2
- package/src/Toolbar/Enlarge.jsx +1 -1
- package/src/Toolbar/MoreInfo.jsx +1 -1
- package/src/Toolbar/Share.jsx +1 -1
- package/src/Widgets/MapsWidget.jsx +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,36 @@ 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
|
-
### [9.0.
|
|
7
|
+
### [9.0.6](https://github.com/eea/volto-embed/compare/9.0.5...9.0.6) - 10 January 2024
|
|
8
|
+
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat: filter embed map by data query + add option to give extra parameters [kreafox - [`c2331fb`](https://github.com/eea/volto-embed/commit/c2331fb1f3413c54d365cdbc701b37991e98dfda)]
|
|
12
|
+
|
|
13
|
+
#### :bug: Bug Fixes
|
|
14
|
+
|
|
15
|
+
- fix: handle case with multiple values [kreafox - [`ab3bfc4`](https://github.com/eea/volto-embed/commit/ab3bfc4b645671550fec3534ae7e25a6d7274ee5)]
|
|
16
|
+
- fix: missing map on view [kreafox - [`7481650`](https://github.com/eea/volto-embed/commit/748165070f109f2b09039882bb22451c520cbbba)]
|
|
17
|
+
|
|
18
|
+
#### :hammer_and_wrench: Others
|
|
19
|
+
|
|
20
|
+
- test: increase coverage [kreafox - [`2d8e43c`](https://github.com/eea/volto-embed/commit/2d8e43cf3988564306b6aa7b885b0ff398043ce0)]
|
|
21
|
+
- test: increase coverage [kreafox - [`1fa9052`](https://github.com/eea/volto-embed/commit/1fa9052a3c015361e3a7eae043c418b696262fbe)]
|
|
22
|
+
- test: increase cypress timeout [kreafox - [`9bb40a5`](https://github.com/eea/volto-embed/commit/9bb40a5df2b29a55edec24a57fcd6e65f270f13c)]
|
|
23
|
+
- test: updates [kreafox - [`5b54d02`](https://github.com/eea/volto-embed/commit/5b54d02c6b6392e25f07ef1e286bdbced999592e)]
|
|
24
|
+
- test: update snapshot [kreafox - [`338f23e`](https://github.com/eea/volto-embed/commit/338f23ee5c6c75ccb6ee2d8d474298553fe3bd53)]
|
|
25
|
+
### [9.0.5](https://github.com/eea/volto-embed/compare/9.0.4...9.0.5) - 14 December 2023
|
|
26
|
+
|
|
27
|
+
#### :bug: Bug Fixes
|
|
28
|
+
|
|
29
|
+
- fix: change message on Open Map Editor - refs #257682 [Teodor Voicu - [`ca4ee3e`](https://github.com/eea/volto-embed/commit/ca4ee3e30d495858a07e09db6734dd9c6c12f517)]
|
|
30
|
+
- fix: CSS for enlarge embed-map ref #257682 [Teodor Voicu - [`44c79a6`](https://github.com/eea/volto-embed/commit/44c79a6d9a78f881fd111a916e640c59bd70c20f)]
|
|
31
|
+
- fix: Invalid DOM property class. Did you mean className [Alin Voinea - [`d4b1132`](https://github.com/eea/volto-embed/commit/d4b1132988029287f9e6c8817d799de414b09115)]
|
|
32
|
+
|
|
33
|
+
#### :hammer_and_wrench: Others
|
|
34
|
+
|
|
35
|
+
- enable resources to load in cypress [Teodor - [`917e2d4`](https://github.com/eea/volto-embed/commit/917e2d46e5764af308392f99d328168cb99d1159)]
|
|
36
|
+
### [9.0.4](https://github.com/eea/volto-embed/compare/9.0.3...9.0.4) - 9 December 2023
|
|
8
37
|
|
|
9
38
|
#### :rocket: New Features
|
|
10
39
|
|
|
@@ -46,13 +75,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
46
75
|
- update [Miu Razvan - [`926beb8`](https://github.com/eea/volto-embed/commit/926beb87d2c44907aebe57369312eea7bf22d656)]
|
|
47
76
|
- update [Miu Razvan - [`da351ae`](https://github.com/eea/volto-embed/commit/da351ae9ffaaef756f7a665618a03fd04cb9b01d)]
|
|
48
77
|
- use volto-datablocks@develop dependency [Miu Razvan - [`b379d84`](https://github.com/eea/volto-embed/commit/b379d8478657dd39dad066181b349cee7ac2531d)]
|
|
49
|
-
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`ddf685a`](https://github.com/eea/volto-embed/commit/ddf685a9481d780a1df2e4f991f93676478c3e05)]
|
|
50
78
|
## [8.0.0](https://github.com/eea/volto-embed/compare/7.0.2...8.0.0) - 17 November 2023
|
|
51
79
|
|
|
52
80
|
#### :hammer_and_wrench: Others
|
|
53
81
|
|
|
54
82
|
- tests: add cypress tests [nileshgulia1 - [`e4b2803`](https://github.com/eea/volto-embed/commit/e4b28033114170639787d77976dc13b7f697f704)]
|
|
55
|
-
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`83d91d5`](https://github.com/eea/volto-embed/commit/83d91d5716a9ce8ebbbff01a7838711298684be4)]
|
|
56
83
|
- fix error [Claudia Ifrim - [`553f3af`](https://github.com/eea/volto-embed/commit/553f3af004af034c721dcd6b01de55c258a88c49)]
|
|
57
84
|
- bump version [Miu Razvan - [`363694a`](https://github.com/eea/volto-embed/commit/363694ae50cdec941fb53b396b75e9a4554d44fb)]
|
|
58
85
|
### [7.0.2](https://github.com/eea/volto-embed/compare/7.0.1...7.0.2) - 10 November 2023
|
|
@@ -62,7 +89,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
62
89
|
#### :hammer_and_wrench: Others
|
|
63
90
|
|
|
64
91
|
- add missing less variable [Miu Razvan - [`47683a7`](https://github.com/eea/volto-embed/commit/47683a7816581d117bb88f16e3087864aaa52f5e)]
|
|
65
|
-
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`ba168e4`](https://github.com/eea/volto-embed/commit/ba168e49554a51a6015a98a77dc0ceab76320218)]
|
|
66
92
|
## [7.0.0](https://github.com/eea/volto-embed/compare/6.0.1...7.0.0) - 6 November 2023
|
|
67
93
|
|
|
68
94
|
#### :rocket: New Features
|
|
@@ -72,15 +98,12 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
72
98
|
#### :house: Internal changes
|
|
73
99
|
|
|
74
100
|
- style: Automated code fix [eea-jenkins - [`c34d6f4`](https://github.com/eea/volto-embed/commit/c34d6f47fd33f728d40254a12c05fe385b27f2e9)]
|
|
75
|
-
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`673f3ff`](https://github.com/eea/volto-embed/commit/673f3ff355baa8d3646e4558ff2be00f36b5a45a)]
|
|
76
101
|
- chore: husky, lint-staged use fixed versions [valentinab25 - [`31169f7`](https://github.com/eea/volto-embed/commit/31169f73887837463daee76d63b6516046ad49aa)]
|
|
77
102
|
|
|
78
103
|
#### :hammer_and_wrench: Others
|
|
79
104
|
|
|
80
105
|
- update tests [Miu Razvan - [`c906b79`](https://github.com/eea/volto-embed/commit/c906b79149e853f718d924871ce2e633e5e427c8)]
|
|
81
106
|
- update tests [Miu Razvan - [`11625b6`](https://github.com/eea/volto-embed/commit/11625b65846388a846d1bdf7ebb2e1f8bd103c91)]
|
|
82
|
-
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`5e7a155`](https://github.com/eea/volto-embed/commit/5e7a15505334c9b81f07172116b49eaefc692ebf)]
|
|
83
|
-
- test: [JENKINS] Improve cypress time [valentinab25 - [`eeb6dcb`](https://github.com/eea/volto-embed/commit/eeb6dcb4b0f8af07496450e6e7783932ebe88bf7)]
|
|
84
107
|
- Release 7.0.0 [Alin Voinea - [`cbc5c79`](https://github.com/eea/volto-embed/commit/cbc5c79f1b66daf0d599d9de5a1bc7d137bafed8)]
|
|
85
108
|
- add act in unit tests [Miu Razvan - [`ecf5b2f`](https://github.com/eea/volto-embed/commit/ecf5b2fe553d99ad6a11570d3d34852d557fbe85)]
|
|
86
109
|
- update [Miu Razvan - [`049cc14`](https://github.com/eea/volto-embed/commit/049cc140bb6ffea4eb3f1555e693e9973ef63d0e)]
|
|
@@ -103,7 +126,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
103
126
|
|
|
104
127
|
- test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`dc2de20`](https://github.com/eea/volto-embed/commit/dc2de2084b53043f240ee1efa2588b5037326ed7)]
|
|
105
128
|
- test: Fix package.json scripts to use makefile [Alin Voinea - [`b4ffca2`](https://github.com/eea/volto-embed/commit/b4ffca24bb8cc4ba2007cc1040cc7b55dc7cc779)]
|
|
106
|
-
- test: Fix eslint and yarn i18n [Alin Voinea - [`1563d0a`](https://github.com/eea/volto-embed/commit/1563d0ab1f54e775a16705bfd3d267303eb2a526)]
|
|
107
129
|
- i18n: Add en [Alin Voinea - [`b4e0694`](https://github.com/eea/volto-embed/commit/b4e0694ee40ecc195536fd1826adfab8876c5061)]
|
|
108
130
|
- test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`8f228ca`](https://github.com/eea/volto-embed/commit/8f228ca0644cee0f777a01114895583f387a395c)]
|
|
109
131
|
- test: increase test coverage - refs #254313 [ana-oprea - [`30354d8`](https://github.com/eea/volto-embed/commit/30354d8a10a78e4fc322e37f4be20ff85cd00bbc)]
|
|
@@ -132,9 +154,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
132
154
|
|
|
133
155
|
- Add react-countup to resolutions [kreafox - [`36eb637`](https://github.com/eea/volto-embed/commit/36eb637c0cb9413b0b0e0ce53e621b2289929d65)]
|
|
134
156
|
- Move generic classes to privacy-protection [kreafox - [`715d559`](https://github.com/eea/volto-embed/commit/715d559e370bf7a3489b64d357b0a6cd7b1a3af2)]
|
|
135
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`5715b4d`](https://github.com/eea/volto-embed/commit/5715b4d3fcc14a34e031c383275c685d88f4db44)]
|
|
136
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`ef24ac0`](https://github.com/eea/volto-embed/commit/ef24ac05b17f4f4dbf05ceafbee677012a7f28f5)]
|
|
137
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`81f957b`](https://github.com/eea/volto-embed/commit/81f957b51aef7be59214530b774de8547bee3f5f)]
|
|
138
157
|
### [5.0.2](https://github.com/eea/volto-embed/compare/5.0.1...5.0.2) - 20 March 2023
|
|
139
158
|
|
|
140
159
|
#### :hammer_and_wrench: Others
|
|
@@ -149,7 +168,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
149
168
|
- update .project.eslintrc.js [Miu Razvan - [`628fd40`](https://github.com/eea/volto-embed/commit/628fd402b00d075ce319b9be92ff5f0e4d0ca2c4)]
|
|
150
169
|
- rename schema.jsx [Miu Razvan - [`62794e3`](https://github.com/eea/volto-embed/commit/62794e398eab5117132e5622cab735f6cf4f79fd)]
|
|
151
170
|
- improving code quality as per sonarqube reported issues [tedw87 - [`c7842f7`](https://github.com/eea/volto-embed/commit/c7842f7795f344e9d30538ddf2da04e97e319ebe)]
|
|
152
|
-
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`fe3a2de`](https://github.com/eea/volto-embed/commit/fe3a2de6180796c3d6b569733d2b9365a669c23e)]
|
|
153
171
|
## [5.0.0](https://github.com/eea/volto-embed/compare/4.0.4...5.0.0) - 31 October 2022
|
|
154
172
|
|
|
155
173
|
#### :hammer_and_wrench: Others
|
|
@@ -169,8 +187,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
169
187
|
|
|
170
188
|
- use specific alpha for addon test [andreiggr - [`e6df633`](https://github.com/eea/volto-embed/commit/e6df633aa4d2b0ee7eeb6b5aafa21528f14cd1df)]
|
|
171
189
|
- add optional height to privacy container [andreiggr - [`e2ac711`](https://github.com/eea/volto-embed/commit/e2ac711db4e461b474cade42109346a73bb8ecbd)]
|
|
172
|
-
- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`9f3f358`](https://github.com/eea/volto-embed/commit/9f3f35882fb367d72c7916abe7cbf366dbd8d5b6)]
|
|
173
|
-
- Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`7677140`](https://github.com/eea/volto-embed/commit/767714006abf7cbe336c5ab00d76c7232d5bc798)]
|
|
174
190
|
### [4.0.2](https://github.com/eea/volto-embed/compare/4.0.1...4.0.2) - 15 July 2022
|
|
175
191
|
|
|
176
192
|
#### :hammer_and_wrench: Others
|
|
@@ -210,7 +226,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
210
226
|
|
|
211
227
|
- Update package.json [Nilesh - [`0ec673a`](https://github.com/eea/volto-embed/commit/0ec673a8178731b8c1e010101caee2a3c9fafaca)]
|
|
212
228
|
- Update package.json [Nilesh - [`b8b94ec`](https://github.com/eea/volto-embed/commit/b8b94ec64672229f464b9108b4ac01a848827c00)]
|
|
213
|
-
- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`cfe04d8`](https://github.com/eea/volto-embed/commit/cfe04d885255bb8e472a3b268b98e3d7b9022437)]
|
|
214
229
|
- Refs #142010 - Optimize Volto-addons gitflow pipelines [valentinab25 - [`bf197dd`](https://github.com/eea/volto-embed/commit/bf197dd6516f9c18994add19b1141e061a96e2b6)]
|
|
215
230
|
- no hardcoded text [Daniela Mormocea - [`4001bb4`](https://github.com/eea/volto-embed/commit/4001bb414df05c1516f95e4dcec4a328406dc63f)]
|
|
216
231
|
- fix [Daniela Mormocea - [`a41ca9a`](https://github.com/eea/volto-embed/commit/a41ca9a2795a59f2633fb97938244e335dca8c43)]
|
|
@@ -284,8 +299,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
284
299
|
- revert use of custom bg image [nileshgulia1 - [`63a74b7`](https://github.com/eea/volto-embed/commit/63a74b7e671d85b602b0190c7a18e6d6ad71341b)]
|
|
285
300
|
- PrivacyProtection update & accept bg image [Andrei Grigore - [`f3f05d1`](https://github.com/eea/volto-embed/commit/f3f05d1d21fc88b90de3f68a995242b6c359e03a)]
|
|
286
301
|
- fix loading of cookies [nileshgulia1 - [`46348d8`](https://github.com/eea/volto-embed/commit/46348d8321b4633a3d5fdcbfb2c4f01912d7ed2a)]
|
|
287
|
-
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`a1e1f50`](https://github.com/eea/volto-embed/commit/a1e1f50db8a1ebc11261c3a24c39687c00ca7eea)]
|
|
288
|
-
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`1e1471e`](https://github.com/eea/volto-embed/commit/1e1471ebab5ba6e5bf0c231ddd0de94d8fe6c846)]
|
|
289
302
|
### [2.0.1](https://github.com/eea/volto-embed/compare/2.0.0...2.0.1) - 28 May 2021
|
|
290
303
|
|
|
291
304
|
#### :hammer_and_wrench: Others
|
package/cypress.config.js
CHANGED
|
@@ -32,6 +32,11 @@ msgstr ""
|
|
|
32
32
|
msgid "Center"
|
|
33
33
|
msgstr ""
|
|
34
34
|
|
|
35
|
+
#: Blocks/Maps/Edit
|
|
36
|
+
# defaultMessage: ESRI Maps Embedded Block
|
|
37
|
+
msgid "ESRI Maps Embedded Block"
|
|
38
|
+
msgstr ""
|
|
39
|
+
|
|
35
40
|
#: Blocks/Maps/Edit
|
|
36
41
|
#: Widgets/MapsWidget
|
|
37
42
|
# defaultMessage: Embed code error, please follow the instructions and try again.
|
|
@@ -40,8 +45,8 @@ msgstr ""
|
|
|
40
45
|
|
|
41
46
|
#: Blocks/Maps/View
|
|
42
47
|
#: EmbedMap/EmbedMap
|
|
43
|
-
# defaultMessage: Embeded
|
|
44
|
-
msgid "Embeded
|
|
48
|
+
# defaultMessage: Embeded ESRI Maps
|
|
49
|
+
msgid "Embeded ESRI Maps"
|
|
45
50
|
msgstr ""
|
|
46
51
|
|
|
47
52
|
#: Blocks/Maps/Edit
|
|
@@ -55,11 +60,6 @@ msgstr ""
|
|
|
55
60
|
msgid "Full"
|
|
56
61
|
msgstr ""
|
|
57
62
|
|
|
58
|
-
#: Blocks/Maps/Edit
|
|
59
|
-
# defaultMessage: Google Maps Embedded Block
|
|
60
|
-
msgid "Google Maps Embedded Block"
|
|
61
|
-
msgstr ""
|
|
62
|
-
|
|
63
63
|
#: Blocks/Maps/Edit
|
|
64
64
|
# defaultMessage: Left
|
|
65
65
|
msgid "Left"
|
|
@@ -94,8 +94,8 @@ msgstr ""
|
|
|
94
94
|
|
|
95
95
|
#: Blocks/Maps/Edit
|
|
96
96
|
#: Widgets/MapsWidget
|
|
97
|
-
# defaultMessage: Please enter the
|
|
98
|
-
msgid "Please enter the
|
|
97
|
+
# defaultMessage: Please enter the embed code or URL for the ESRI webmap.
|
|
98
|
+
msgid "Please enter the embed code or URL for the ESRI webmap."
|
|
99
99
|
msgstr ""
|
|
100
100
|
|
|
101
101
|
#: Blocks/Maps/Edit
|
|
@@ -32,6 +32,11 @@ msgstr ""
|
|
|
32
32
|
msgid "Center"
|
|
33
33
|
msgstr ""
|
|
34
34
|
|
|
35
|
+
#: Blocks/Maps/Edit
|
|
36
|
+
# defaultMessage: ESRI Maps Embedded Block
|
|
37
|
+
msgid "ESRI Maps Embedded Block"
|
|
38
|
+
msgstr ""
|
|
39
|
+
|
|
35
40
|
#: Blocks/Maps/Edit
|
|
36
41
|
#: Widgets/MapsWidget
|
|
37
42
|
# defaultMessage: Embed code error, please follow the instructions and try again.
|
|
@@ -40,8 +45,8 @@ msgstr ""
|
|
|
40
45
|
|
|
41
46
|
#: Blocks/Maps/View
|
|
42
47
|
#: EmbedMap/EmbedMap
|
|
43
|
-
# defaultMessage: Embeded
|
|
44
|
-
msgid "Embeded
|
|
48
|
+
# defaultMessage: Embeded ESRI Maps
|
|
49
|
+
msgid "Embeded ESRI Maps"
|
|
45
50
|
msgstr ""
|
|
46
51
|
|
|
47
52
|
#: Blocks/Maps/Edit
|
|
@@ -55,11 +60,6 @@ msgstr ""
|
|
|
55
60
|
msgid "Full"
|
|
56
61
|
msgstr ""
|
|
57
62
|
|
|
58
|
-
#: Blocks/Maps/Edit
|
|
59
|
-
# defaultMessage: Google Maps Embedded Block
|
|
60
|
-
msgid "Google Maps Embedded Block"
|
|
61
|
-
msgstr ""
|
|
62
|
-
|
|
63
63
|
#: Blocks/Maps/Edit
|
|
64
64
|
# defaultMessage: Left
|
|
65
65
|
msgid "Left"
|
|
@@ -94,8 +94,8 @@ msgstr ""
|
|
|
94
94
|
|
|
95
95
|
#: Blocks/Maps/Edit
|
|
96
96
|
#: Widgets/MapsWidget
|
|
97
|
-
# defaultMessage: Please enter the
|
|
98
|
-
msgid "Please enter the
|
|
97
|
+
# defaultMessage: Please enter the embed code or URL for the ESRI webmap.
|
|
98
|
+
msgid "Please enter the embed code or URL for the ESRI webmap."
|
|
99
99
|
msgstr ""
|
|
100
100
|
|
|
101
101
|
#: Blocks/Maps/Edit
|
|
@@ -32,6 +32,11 @@ msgstr ""
|
|
|
32
32
|
msgid "Center"
|
|
33
33
|
msgstr ""
|
|
34
34
|
|
|
35
|
+
#: Blocks/Maps/Edit
|
|
36
|
+
# defaultMessage: ESRI Maps Embedded Block
|
|
37
|
+
msgid "ESRI Maps Embedded Block"
|
|
38
|
+
msgstr ""
|
|
39
|
+
|
|
35
40
|
#: Blocks/Maps/Edit
|
|
36
41
|
#: Widgets/MapsWidget
|
|
37
42
|
# defaultMessage: Embed code error, please follow the instructions and try again.
|
|
@@ -40,8 +45,8 @@ msgstr ""
|
|
|
40
45
|
|
|
41
46
|
#: Blocks/Maps/View
|
|
42
47
|
#: EmbedMap/EmbedMap
|
|
43
|
-
# defaultMessage: Embeded
|
|
44
|
-
msgid "Embeded
|
|
48
|
+
# defaultMessage: Embeded ESRI Maps
|
|
49
|
+
msgid "Embeded ESRI Maps"
|
|
45
50
|
msgstr ""
|
|
46
51
|
|
|
47
52
|
#: Blocks/Maps/Edit
|
|
@@ -55,11 +60,6 @@ msgstr ""
|
|
|
55
60
|
msgid "Full"
|
|
56
61
|
msgstr ""
|
|
57
62
|
|
|
58
|
-
#: Blocks/Maps/Edit
|
|
59
|
-
# defaultMessage: Google Maps Embedded Block
|
|
60
|
-
msgid "Google Maps Embedded Block"
|
|
61
|
-
msgstr ""
|
|
62
|
-
|
|
63
63
|
#: Blocks/Maps/Edit
|
|
64
64
|
# defaultMessage: Left
|
|
65
65
|
msgid "Left"
|
|
@@ -94,8 +94,8 @@ msgstr ""
|
|
|
94
94
|
|
|
95
95
|
#: Blocks/Maps/Edit
|
|
96
96
|
#: Widgets/MapsWidget
|
|
97
|
-
# defaultMessage: Please enter the
|
|
98
|
-
msgid "Please enter the
|
|
97
|
+
# defaultMessage: Please enter the embed code or URL for the ESRI webmap.
|
|
98
|
+
msgid "Please enter the embed code or URL for the ESRI webmap."
|
|
99
99
|
msgstr ""
|
|
100
100
|
|
|
101
101
|
#: Blocks/Maps/Edit
|
|
@@ -32,6 +32,11 @@ msgstr ""
|
|
|
32
32
|
msgid "Center"
|
|
33
33
|
msgstr ""
|
|
34
34
|
|
|
35
|
+
#: Blocks/Maps/Edit
|
|
36
|
+
# defaultMessage: ESRI Maps Embedded Block
|
|
37
|
+
msgid "ESRI Maps Embedded Block"
|
|
38
|
+
msgstr ""
|
|
39
|
+
|
|
35
40
|
#: Blocks/Maps/Edit
|
|
36
41
|
#: Widgets/MapsWidget
|
|
37
42
|
# defaultMessage: Embed code error, please follow the instructions and try again.
|
|
@@ -40,8 +45,8 @@ msgstr ""
|
|
|
40
45
|
|
|
41
46
|
#: Blocks/Maps/View
|
|
42
47
|
#: EmbedMap/EmbedMap
|
|
43
|
-
# defaultMessage: Embeded
|
|
44
|
-
msgid "Embeded
|
|
48
|
+
# defaultMessage: Embeded ESRI Maps
|
|
49
|
+
msgid "Embeded ESRI Maps"
|
|
45
50
|
msgstr ""
|
|
46
51
|
|
|
47
52
|
#: Blocks/Maps/Edit
|
|
@@ -55,11 +60,6 @@ msgstr ""
|
|
|
55
60
|
msgid "Full"
|
|
56
61
|
msgstr ""
|
|
57
62
|
|
|
58
|
-
#: Blocks/Maps/Edit
|
|
59
|
-
# defaultMessage: Google Maps Embedded Block
|
|
60
|
-
msgid "Google Maps Embedded Block"
|
|
61
|
-
msgstr ""
|
|
62
|
-
|
|
63
63
|
#: Blocks/Maps/Edit
|
|
64
64
|
# defaultMessage: Left
|
|
65
65
|
msgid "Left"
|
|
@@ -94,8 +94,8 @@ msgstr ""
|
|
|
94
94
|
|
|
95
95
|
#: Blocks/Maps/Edit
|
|
96
96
|
#: Widgets/MapsWidget
|
|
97
|
-
# defaultMessage: Please enter the
|
|
98
|
-
msgid "Please enter the
|
|
97
|
+
# defaultMessage: Please enter the embed code or URL for the ESRI webmap.
|
|
98
|
+
msgid "Please enter the embed code or URL for the ESRI webmap."
|
|
99
99
|
msgstr ""
|
|
100
100
|
|
|
101
101
|
#: Blocks/Maps/Edit
|
package/locales/volto.pot
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
msgid ""
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Plone\n"
|
|
4
|
-
"POT-Creation-Date: 2023-
|
|
4
|
+
"POT-Creation-Date: 2023-12-12T14:17:31.174Z\n"
|
|
5
5
|
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
6
6
|
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
7
7
|
"MIME-Version: 1.0\n"
|
|
@@ -34,6 +34,11 @@ msgstr ""
|
|
|
34
34
|
msgid "Center"
|
|
35
35
|
msgstr ""
|
|
36
36
|
|
|
37
|
+
#: Blocks/Maps/Edit
|
|
38
|
+
# defaultMessage: ESRI Maps Embedded Block
|
|
39
|
+
msgid "ESRI Maps Embedded Block"
|
|
40
|
+
msgstr ""
|
|
41
|
+
|
|
37
42
|
#: Blocks/Maps/Edit
|
|
38
43
|
#: Widgets/MapsWidget
|
|
39
44
|
# defaultMessage: Embed code error, please follow the instructions and try again.
|
|
@@ -42,8 +47,8 @@ msgstr ""
|
|
|
42
47
|
|
|
43
48
|
#: Blocks/Maps/View
|
|
44
49
|
#: EmbedMap/EmbedMap
|
|
45
|
-
# defaultMessage: Embeded
|
|
46
|
-
msgid "Embeded
|
|
50
|
+
# defaultMessage: Embeded ESRI Maps
|
|
51
|
+
msgid "Embeded ESRI Maps"
|
|
47
52
|
msgstr ""
|
|
48
53
|
|
|
49
54
|
#: Blocks/Maps/Edit
|
|
@@ -57,11 +62,6 @@ msgstr ""
|
|
|
57
62
|
msgid "Full"
|
|
58
63
|
msgstr ""
|
|
59
64
|
|
|
60
|
-
#: Blocks/Maps/Edit
|
|
61
|
-
# defaultMessage: Google Maps Embedded Block
|
|
62
|
-
msgid "Google Maps Embedded Block"
|
|
63
|
-
msgstr ""
|
|
64
|
-
|
|
65
65
|
#: Blocks/Maps/Edit
|
|
66
66
|
# defaultMessage: Left
|
|
67
67
|
msgid "Left"
|
|
@@ -96,8 +96,8 @@ msgstr ""
|
|
|
96
96
|
|
|
97
97
|
#: Blocks/Maps/Edit
|
|
98
98
|
#: Widgets/MapsWidget
|
|
99
|
-
# defaultMessage: Please enter the
|
|
100
|
-
msgid "Please enter the
|
|
99
|
+
# defaultMessage: Please enter the embed code or URL for the ESRI webmap.
|
|
100
|
+
msgid "Please enter the embed code or URL for the ESRI webmap."
|
|
101
101
|
msgstr ""
|
|
102
102
|
|
|
103
103
|
#: Blocks/Maps/Edit
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React, { useEffect, useMemo } from 'react';
|
|
1
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
2
|
+
import { reduce, isArray, isString } from 'lodash';
|
|
2
3
|
import { connect } from 'react-redux';
|
|
3
4
|
import { Message } from 'semantic-ui-react';
|
|
4
5
|
import { getContent } from '@plone/volto/actions';
|
|
@@ -6,6 +7,13 @@ import { flattenToAppURL } from '@plone/volto/helpers';
|
|
|
6
7
|
import EmbedMap from '@eeacms/volto-embed/EmbedMap/EmbedMap';
|
|
7
8
|
import { pickMetadata } from '@eeacms/volto-embed/helpers';
|
|
8
9
|
|
|
10
|
+
let timer;
|
|
11
|
+
|
|
12
|
+
const debounce = (func, ...args) => {
|
|
13
|
+
if (timer) clearTimeout(timer);
|
|
14
|
+
timer = setTimeout(func, 800, ...args);
|
|
15
|
+
};
|
|
16
|
+
|
|
9
17
|
function getMaps(props) {
|
|
10
18
|
const content = props.mapsContent || {};
|
|
11
19
|
const maps = content.maps || props.data?.maps || {};
|
|
@@ -15,9 +23,46 @@ function getMaps(props) {
|
|
|
15
23
|
};
|
|
16
24
|
}
|
|
17
25
|
|
|
26
|
+
function getParameters({ parameters, data_query }) {
|
|
27
|
+
return {
|
|
28
|
+
...reduce(
|
|
29
|
+
data_query,
|
|
30
|
+
(acc, { i, v }) => {
|
|
31
|
+
if (i && v) {
|
|
32
|
+
let value = isString(v) ? v : '';
|
|
33
|
+
if (isArray(v)) {
|
|
34
|
+
value = v.join(',');
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
...acc,
|
|
38
|
+
[i]: value,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return acc;
|
|
42
|
+
},
|
|
43
|
+
{},
|
|
44
|
+
),
|
|
45
|
+
...reduce(
|
|
46
|
+
parameters,
|
|
47
|
+
(acc, { field, value }) => {
|
|
48
|
+
if (field && value) {
|
|
49
|
+
return {
|
|
50
|
+
...acc,
|
|
51
|
+
[field]: value,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
return acc;
|
|
55
|
+
},
|
|
56
|
+
{},
|
|
57
|
+
),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
18
61
|
function View(props) {
|
|
19
|
-
const { id, getContent, mode } = props;
|
|
62
|
+
const { id, getContent, mode, data_query } = props;
|
|
20
63
|
const {
|
|
64
|
+
height,
|
|
65
|
+
parameters,
|
|
21
66
|
useVisibilitySensor = true,
|
|
22
67
|
with_notes = true,
|
|
23
68
|
with_sources = true,
|
|
@@ -30,14 +75,29 @@ function View(props) {
|
|
|
30
75
|
|
|
31
76
|
const maps = useMemo(() => getMaps(props), [props]);
|
|
32
77
|
|
|
78
|
+
const [queryParams, setQueryParams] = useState(() =>
|
|
79
|
+
getParameters({ parameters, data_query }),
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
debounce(() => {
|
|
84
|
+
setQueryParams(
|
|
85
|
+
getParameters({
|
|
86
|
+
parameters,
|
|
87
|
+
data_query,
|
|
88
|
+
}),
|
|
89
|
+
);
|
|
90
|
+
});
|
|
91
|
+
}, [data_query, parameters]);
|
|
92
|
+
|
|
33
93
|
useEffect(() => {
|
|
34
94
|
const mapsId = maps['@id'] ? flattenToAppURL(maps['@id']) : undefined;
|
|
35
|
-
if (
|
|
95
|
+
if (url && url !== mapsId) {
|
|
36
96
|
getContent(url, null, id);
|
|
37
97
|
}
|
|
38
98
|
}, [id, getContent, mode, url, maps]);
|
|
39
99
|
|
|
40
|
-
if (
|
|
100
|
+
if (mode === 'edit' && !url) {
|
|
41
101
|
return <Message>Please select a map from block editor.</Message>;
|
|
42
102
|
}
|
|
43
103
|
|
|
@@ -51,7 +111,8 @@ function View(props) {
|
|
|
51
111
|
data={{
|
|
52
112
|
...maps,
|
|
53
113
|
useVisibilitySensor,
|
|
54
|
-
|
|
114
|
+
parameters: queryParams,
|
|
115
|
+
height: height || maps.height,
|
|
55
116
|
with_notes,
|
|
56
117
|
with_sources,
|
|
57
118
|
with_more_info,
|
|
@@ -67,6 +128,7 @@ function View(props) {
|
|
|
67
128
|
export default connect(
|
|
68
129
|
(state, props) => ({
|
|
69
130
|
mapsContent: state.content.subrequests?.[props.id]?.data,
|
|
131
|
+
data_query: state.content?.data?.data_query,
|
|
70
132
|
}),
|
|
71
133
|
{ getContent },
|
|
72
134
|
)(View);
|
|
@@ -31,6 +31,37 @@ test('renders a view embed map block component', () => {
|
|
|
31
31
|
enabled: false,
|
|
32
32
|
},
|
|
33
33
|
useVisibilitySensor: false,
|
|
34
|
+
parameters: {
|
|
35
|
+
'@id': '647e4a0f-d4a0-4b8a-9965-0a016f017ebd',
|
|
36
|
+
field: 'zoomtocountry',
|
|
37
|
+
value: 'RO',
|
|
38
|
+
},
|
|
39
|
+
height: '800',
|
|
40
|
+
}}
|
|
41
|
+
data_query={[
|
|
42
|
+
{
|
|
43
|
+
i: 'Country',
|
|
44
|
+
o: 'plone.app.querystring.operation.selection.is',
|
|
45
|
+
v: ['RO'],
|
|
46
|
+
},
|
|
47
|
+
]}
|
|
48
|
+
/>
|
|
49
|
+
</Provider>,
|
|
50
|
+
);
|
|
51
|
+
const json = component.toJSON();
|
|
52
|
+
expect(json).toMatchSnapshot();
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
test('renders an edit view embed map block component', () => {
|
|
56
|
+
const component = renderer.create(
|
|
57
|
+
<Provider store={global.store}>
|
|
58
|
+
<View
|
|
59
|
+
id="my-map"
|
|
60
|
+
mode="edit"
|
|
61
|
+
data={{
|
|
62
|
+
'@type': 'embed_maps',
|
|
63
|
+
url: '',
|
|
64
|
+
maps: {},
|
|
34
65
|
}}
|
|
35
66
|
/>
|
|
36
67
|
</Provider>,
|
|
@@ -11,6 +11,22 @@ const messages = defineMessages({
|
|
|
11
11
|
},
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
+
const parameters = {
|
|
15
|
+
title: 'Parameter',
|
|
16
|
+
fieldsets: [{ id: 'default', title: 'Default', fields: ['field', 'value'] }],
|
|
17
|
+
properties: {
|
|
18
|
+
field: {
|
|
19
|
+
title: 'Name',
|
|
20
|
+
type: 'text',
|
|
21
|
+
},
|
|
22
|
+
value: {
|
|
23
|
+
title: 'Value',
|
|
24
|
+
type: 'text',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
required: [],
|
|
28
|
+
};
|
|
29
|
+
|
|
14
30
|
export default (props) => {
|
|
15
31
|
return {
|
|
16
32
|
title: 'Embed interactive Map',
|
|
@@ -31,6 +47,11 @@ export default (props) => {
|
|
|
31
47
|
'with_enlarge',
|
|
32
48
|
],
|
|
33
49
|
},
|
|
50
|
+
{
|
|
51
|
+
id: 'parameters',
|
|
52
|
+
title: 'Parameters',
|
|
53
|
+
fields: ['parameters'],
|
|
54
|
+
},
|
|
34
55
|
],
|
|
35
56
|
properties: {
|
|
36
57
|
url: {
|
|
@@ -75,6 +96,12 @@ export default (props) => {
|
|
|
75
96
|
type: 'boolean',
|
|
76
97
|
defaultValue: true,
|
|
77
98
|
},
|
|
99
|
+
parameters: {
|
|
100
|
+
title: 'Parameters',
|
|
101
|
+
widget: 'object_list',
|
|
102
|
+
schema: parameters,
|
|
103
|
+
description: 'Set a list of parameters.',
|
|
104
|
+
},
|
|
78
105
|
},
|
|
79
106
|
|
|
80
107
|
required: [],
|
package/src/Blocks/Maps/Edit.jsx
CHANGED
|
@@ -39,9 +39,9 @@ const messages = defineMessages({
|
|
|
39
39
|
id: 'Full',
|
|
40
40
|
defaultMessage: 'Full',
|
|
41
41
|
},
|
|
42
|
-
|
|
43
|
-
id: '
|
|
44
|
-
defaultMessage: '
|
|
42
|
+
ESRIMapsEmbeddedBlock: {
|
|
43
|
+
id: 'ESRI Maps Embedded Block',
|
|
44
|
+
defaultMessage: 'ESRI Maps Embedded Block',
|
|
45
45
|
},
|
|
46
46
|
});
|
|
47
47
|
|
|
@@ -175,7 +175,7 @@ class Edit extends Component {
|
|
|
175
175
|
/**
|
|
176
176
|
* get getSrc handler
|
|
177
177
|
* @method getSrc
|
|
178
|
-
* @param {string} embed Embed HTML code from
|
|
178
|
+
* @param {string} embed Embed HTML code from ESRI Maps share option
|
|
179
179
|
* @returns {string} Source URL
|
|
180
180
|
*/
|
|
181
181
|
getSrc(embed) {
|
|
@@ -232,7 +232,7 @@ class Edit extends Component {
|
|
|
232
232
|
>
|
|
233
233
|
<iframe
|
|
234
234
|
title={this.props.intl.formatMessage(
|
|
235
|
-
messages.
|
|
235
|
+
messages.ESRIMapsEmbeddedBlock,
|
|
236
236
|
)}
|
|
237
237
|
src={this.props.data.url}
|
|
238
238
|
className="google-map"
|
|
@@ -289,8 +289,8 @@ class Edit extends Component {
|
|
|
289
289
|
</div>
|
|
290
290
|
<div className="message-text">
|
|
291
291
|
<FormattedMessage
|
|
292
|
-
id="Please enter the
|
|
293
|
-
defaultMessage="Please enter the
|
|
292
|
+
id="Please enter the embed code or URL for the ESRI webmap."
|
|
293
|
+
defaultMessage="Please enter the embed code or URL for the ESRI webmap."
|
|
294
294
|
/>
|
|
295
295
|
{this.state.error && (
|
|
296
296
|
<div style={{ color: 'red' }}>
|
|
@@ -80,4 +80,30 @@ describe('Test Maps Block editing', () => {
|
|
|
80
80
|
const json = component.toJSON();
|
|
81
81
|
expect(json).toMatchSnapshot();
|
|
82
82
|
});
|
|
83
|
+
|
|
84
|
+
test('test-3', () => {
|
|
85
|
+
const component = renderer.create(
|
|
86
|
+
<Provider store={global.store}>
|
|
87
|
+
<Edit
|
|
88
|
+
data={{
|
|
89
|
+
'@type': 'maps',
|
|
90
|
+
url: '',
|
|
91
|
+
}}
|
|
92
|
+
pathname="/news"
|
|
93
|
+
selected={true}
|
|
94
|
+
block="1234"
|
|
95
|
+
index={1}
|
|
96
|
+
onChangeBlock={() => {}}
|
|
97
|
+
onSelectBlock={() => {}}
|
|
98
|
+
onDeleteBlock={() => {}}
|
|
99
|
+
onFocusPreviousBlock={() => {}}
|
|
100
|
+
onFocusNextBlock={() => {}}
|
|
101
|
+
handleKeyDown={() => {}}
|
|
102
|
+
content={{}}
|
|
103
|
+
/>
|
|
104
|
+
</Provider>,
|
|
105
|
+
);
|
|
106
|
+
const json = component.toJSON();
|
|
107
|
+
expect(json).toMatchSnapshot();
|
|
108
|
+
});
|
|
83
109
|
});
|
package/src/Blocks/Maps/View.jsx
CHANGED
|
@@ -12,9 +12,9 @@ import { withBlockExtensions } from '@plone/volto/helpers';
|
|
|
12
12
|
import PrivacyProtection from '@eeacms/volto-embed/PrivacyProtection/PrivacyProtection';
|
|
13
13
|
|
|
14
14
|
const messages = defineMessages({
|
|
15
|
-
|
|
16
|
-
id: 'Embeded
|
|
17
|
-
defaultMessage: 'Embeded
|
|
15
|
+
EmbededESRIMaps: {
|
|
16
|
+
id: 'Embeded ESRI Maps',
|
|
17
|
+
defaultMessage: 'Embeded ESRI Maps',
|
|
18
18
|
},
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -46,7 +46,7 @@ const View = ({ data, intl, id }) => {
|
|
|
46
46
|
useVisibilitySensor={data.useVisibilitySensor}
|
|
47
47
|
>
|
|
48
48
|
<iframe
|
|
49
|
-
title={intl.formatMessage(messages.
|
|
49
|
+
title={intl.formatMessage(messages.EmbededESRIMaps)}
|
|
50
50
|
src={data.url}
|
|
51
51
|
className="google-map"
|
|
52
52
|
frameBorder="0"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState, useRef } from 'react';
|
|
2
|
-
import { isNaN, isNumber } from 'lodash';
|
|
2
|
+
import { isNaN, isNumber, isEmpty } from 'lodash';
|
|
3
3
|
import { compose } from 'redux';
|
|
4
4
|
import { connect } from 'react-redux';
|
|
5
5
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
@@ -16,9 +16,9 @@ import PrivacyProtection from '@eeacms/volto-embed/PrivacyProtection/PrivacyProt
|
|
|
16
16
|
import './style.less';
|
|
17
17
|
|
|
18
18
|
const messages = defineMessages({
|
|
19
|
-
|
|
20
|
-
id: 'Embeded
|
|
21
|
-
defaultMessage: 'Embeded
|
|
19
|
+
EmbededESRIMaps: {
|
|
20
|
+
id: 'Embeded ESRI Maps',
|
|
21
|
+
defaultMessage: 'Embeded ESRI Maps',
|
|
22
22
|
},
|
|
23
23
|
});
|
|
24
24
|
|
|
@@ -31,8 +31,19 @@ function getHeight(height) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
function EmbedMap({ data, intl, id, screen }) {
|
|
34
|
+
const { parameters, url } = data;
|
|
34
35
|
const el = useRef();
|
|
35
36
|
const [mobile, setMobile] = useState(false);
|
|
37
|
+
const [iframeSrc, setIframeSrc] = useState(url);
|
|
38
|
+
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
const query_params = new URLSearchParams(parameters).toString();
|
|
41
|
+
if (isEmpty(parameters)) {
|
|
42
|
+
setIframeSrc(url);
|
|
43
|
+
} else {
|
|
44
|
+
setIframeSrc(url + '&' + query_params);
|
|
45
|
+
}
|
|
46
|
+
}, [url, parameters]);
|
|
36
47
|
|
|
37
48
|
useEffect(() => {
|
|
38
49
|
if (el.current) {
|
|
@@ -46,7 +57,7 @@ function EmbedMap({ data, intl, id, screen }) {
|
|
|
46
57
|
}
|
|
47
58
|
}, [screen, mobile]);
|
|
48
59
|
|
|
49
|
-
if (!
|
|
60
|
+
if (!url) return null;
|
|
50
61
|
|
|
51
62
|
return (
|
|
52
63
|
<div
|
|
@@ -71,8 +82,8 @@ function EmbedMap({ data, intl, id, screen }) {
|
|
|
71
82
|
useVisibilitySensor={data.useVisibilitySensor ?? true}
|
|
72
83
|
>
|
|
73
84
|
<iframe
|
|
74
|
-
title={intl.formatMessage(messages.
|
|
75
|
-
src={
|
|
85
|
+
title={intl.formatMessage(messages.EmbededESRIMaps)}
|
|
86
|
+
src={iframeSrc}
|
|
76
87
|
className="google-map"
|
|
77
88
|
frameBorder="0"
|
|
78
89
|
allowFullScreen
|
|
@@ -115,5 +126,7 @@ function EmbedMap({ data, intl, id, screen }) {
|
|
|
115
126
|
|
|
116
127
|
export default compose(
|
|
117
128
|
injectIntl,
|
|
118
|
-
connect((state) => ({
|
|
129
|
+
connect((state) => ({
|
|
130
|
+
screen: state.screen,
|
|
131
|
+
})),
|
|
119
132
|
)(EmbedMap);
|
|
@@ -37,6 +37,10 @@ test('renders map component', () => {
|
|
|
37
37
|
url:
|
|
38
38
|
'https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3027.7835278268726!2d14.38842915203974!3d40.634655679238854!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x133b994881d943cb%3A0x6ab93db57d3272f0!2sHotel+Mediterraneo+Sorrento!5e0!3m2!1sen!2ses!4v1550168740166',
|
|
39
39
|
useVisibilitySensor: false,
|
|
40
|
+
parameters: {
|
|
41
|
+
Country: 'RO',
|
|
42
|
+
zoomtocountry: 'RO',
|
|
43
|
+
},
|
|
40
44
|
}}
|
|
41
45
|
/>
|
|
42
46
|
</Provider>,
|
package/src/EmbedMap/style.less
CHANGED
package/src/Toolbar/Enlarge.jsx
CHANGED
package/src/Toolbar/MoreInfo.jsx
CHANGED
package/src/Toolbar/Share.jsx
CHANGED
|
@@ -159,8 +159,8 @@ function MapEditorModal({ id, onClose, onChange, ...rest }) {
|
|
|
159
159
|
</div>
|
|
160
160
|
<div className="message-text">
|
|
161
161
|
<FormattedMessage
|
|
162
|
-
id="Please enter the
|
|
163
|
-
defaultMessage="Please enter the
|
|
162
|
+
id="Please enter the embed code or URL for the ESRI webmap."
|
|
163
|
+
defaultMessage="Please enter the embed code or URL for the ESRI webmap."
|
|
164
164
|
/>
|
|
165
165
|
{error && (
|
|
166
166
|
<div style={{ color: 'red' }}>
|