@eeacms/volto-embed 10.0.1 → 10.0.3
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
CHANGED
|
@@ -4,6 +4,27 @@ 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
|
+
### [10.0.3](https://github.com/eea/volto-embed/compare/10.0.2...10.0.3) - 24 July 2024
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix: package.json [alin - [`6c29d0d`](https://github.com/eea/volto-embed/commit/6c29d0d3875a95d24b9197db05c187f7c37083a0)]
|
|
12
|
+
|
|
13
|
+
#### :hammer_and_wrench: Others
|
|
14
|
+
|
|
15
|
+
- update [Miu Razvan - [`371e6fc`](https://github.com/eea/volto-embed/commit/371e6fc4a344a995f8be1e2b8fd80325777515c5)]
|
|
16
|
+
- update [Miu Razvan - [`c0536f0`](https://github.com/eea/volto-embed/commit/c0536f00732e3761a71bf5103ee064b5b3c1cc22)]
|
|
17
|
+
- update [Miu Razvan - [`e6c8526`](https://github.com/eea/volto-embed/commit/e6c852685654986be6c8695b4f8888e78adcc0a9)]
|
|
18
|
+
- add useScreenHeight prop [Miu Razvan - [`a261a59`](https://github.com/eea/volto-embed/commit/a261a593892f44845579b2c0aa764e22bbf48e73)]
|
|
19
|
+
- fix tests [Miu Razvan - [`0798660`](https://github.com/eea/volto-embed/commit/0798660ce054a7a60e4c3888cb63ba9c131a42f8)]
|
|
20
|
+
- Set interactiv map height to window innerheight, ref #272831 [Miu Razvan - [`5ac9eb5`](https://github.com/eea/volto-embed/commit/5ac9eb5e66cdc626b33d0bdad5b80994af2d7d79)]
|
|
21
|
+
- Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`d99c3dc`](https://github.com/eea/volto-embed/commit/d99c3dc2151f6576b127e3c751fabaae3ad676b8)]
|
|
22
|
+
### [10.0.2](https://github.com/eea/volto-embed/compare/10.0.1...10.0.2) - 7 June 2024
|
|
23
|
+
|
|
24
|
+
#### :bug: Bug Fixes
|
|
25
|
+
|
|
26
|
+
- fix: re-add parseInt with a check for NaN [nileshgulia1 - [`f7dd30c`](https://github.com/eea/volto-embed/commit/f7dd30c47aa2cc31726e49b8eb4cb40aae624941)]
|
|
27
|
+
|
|
7
28
|
### [10.0.1](https://github.com/eea/volto-embed/compare/10.0.0...10.0.1) - 4 June 2024
|
|
8
29
|
|
|
9
30
|
#### :bug: Bug Fixes
|
|
@@ -15,14 +36,37 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
15
36
|
|
|
16
37
|
#### :hammer_and_wrench: Others
|
|
17
38
|
|
|
39
|
+
- Merge pull request #62 from eea/develop [Nilesh - [`1b1d820`](https://github.com/eea/volto-embed/commit/1b1d820b206b35b6522866d7427563e69f10cc12)]
|
|
18
40
|
- test: add cypress 13 to devdependencies [ana-oprea - [`b341aaf`](https://github.com/eea/volto-embed/commit/b341aaf1d0a1c0e2b15c77b725481ca50943c190)]
|
|
19
|
-
## [10.0.0](https://github.com/eea/volto-embed/compare/9.1.
|
|
41
|
+
## [10.0.0](https://github.com/eea/volto-embed/compare/9.1.4...10.0.0) - 23 April 2024
|
|
20
42
|
|
|
21
43
|
#### :rocket: New Features
|
|
22
44
|
|
|
23
45
|
- feat: Release 10.0.0 - Volto 17 support [alin - [`bea6fba`](https://github.com/eea/volto-embed/commit/bea6fba260bf0551ac17f7c2e30ddd5717756733)]
|
|
24
46
|
- feat: Volto 17 support - refs #264527 [EEA Jenkins - [`fd4b412`](https://github.com/eea/volto-embed/commit/fd4b412405a32abfb680383c2769013974184371)]
|
|
25
47
|
|
|
48
|
+
### [9.1.4](https://github.com/eea/volto-embed/compare/9.1.2...9.1.4) - 4 June 2024
|
|
49
|
+
|
|
50
|
+
#### :bug: Bug Fixes
|
|
51
|
+
|
|
52
|
+
- fix: update snapshots [nileshgulia1 - [`bf3578c`](https://github.com/eea/volto-embed/commit/bf3578c38c48c0053aca06bd13958f49bcbab49c)]
|
|
53
|
+
- fix: remove parseInt [nileshgulia1 - [`ba532ee`](https://github.com/eea/volto-embed/commit/ba532eea34905ade2a54d623dc2a11646ad52ce6)]
|
|
54
|
+
|
|
55
|
+
#### :hammer_and_wrench: Others
|
|
56
|
+
|
|
57
|
+
- Release 9.1.4 [nileshgulia1 - [`f4c7053`](https://github.com/eea/volto-embed/commit/f4c7053e5baae054ab36792b60f57382ee810796)]
|
|
58
|
+
- Release 9.1.3 [nileshgulia1 - [`ee6135e`](https://github.com/eea/volto-embed/commit/ee6135eaaedf3f881476a650b100ace1727b9e3f)]
|
|
59
|
+
- pin cypress to"13.1.0" [nileshgulia1 - [`2ba5b25`](https://github.com/eea/volto-embed/commit/2ba5b25aff2f4e1388e5482f4f71de7b3dcd2e76)]
|
|
60
|
+
- update snapshot [nileshgulia1 - [`14191dc`](https://github.com/eea/volto-embed/commit/14191dc5f0a9b841cb6f0cbf51ae6426a20bfa7a)]
|
|
61
|
+
### [9.1.2](https://github.com/eea/volto-embed/compare/9.1.1...9.1.2) - 4 June 2024
|
|
62
|
+
|
|
63
|
+
#### :bug: Bug Fixes
|
|
64
|
+
|
|
65
|
+
- fix: unnecessary rerenders due to props.height [nileshgulia1 - [`36c012d`](https://github.com/eea/volto-embed/commit/36c012d8ea1b251a1d5a012f7b27cfa9d9436464)]
|
|
66
|
+
|
|
67
|
+
#### :hammer_and_wrench: Others
|
|
68
|
+
|
|
69
|
+
- Release 9.1.2 [nileshgulia1 - [`3da0041`](https://github.com/eea/volto-embed/commit/3da0041f0d8ebcaa614f1cc01dd0e6cc011a42a9)]
|
|
26
70
|
### [9.1.1](https://github.com/eea/volto-embed/compare/9.1.0...9.1.1) - 6 February 2024
|
|
27
71
|
|
|
28
72
|
#### :hammer_and_wrench: Others
|
|
@@ -60,6 +104,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
60
104
|
|
|
61
105
|
- test: increase coverage [kreafox - [`2d8e43c`](https://github.com/eea/volto-embed/commit/2d8e43cf3988564306b6aa7b885b0ff398043ce0)]
|
|
62
106
|
- test: increase coverage [kreafox - [`1fa9052`](https://github.com/eea/volto-embed/commit/1fa9052a3c015361e3a7eae043c418b696262fbe)]
|
|
107
|
+
- test: [JENKINS] fail with logs on coverage [valentinab25 - [`eaabce8`](https://github.com/eea/volto-embed/commit/eaabce87f1ed4b88a25bfc59a75285e858413d6a)]
|
|
63
108
|
- test: increase cypress timeout [kreafox - [`9bb40a5`](https://github.com/eea/volto-embed/commit/9bb40a5df2b29a55edec24a57fcd6e65f270f13c)]
|
|
64
109
|
- test: updates [kreafox - [`5b54d02`](https://github.com/eea/volto-embed/commit/5b54d02c6b6392e25f07ef1e286bdbced999592e)]
|
|
65
110
|
- test: update snapshot [kreafox - [`338f23e`](https://github.com/eea/volto-embed/commit/338f23ee5c6c75ccb6ee2d8d474298553fe3bd53)]
|
|
@@ -116,11 +161,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
116
161
|
- update [Miu Razvan - [`926beb8`](https://github.com/eea/volto-embed/commit/926beb87d2c44907aebe57369312eea7bf22d656)]
|
|
117
162
|
- update [Miu Razvan - [`da351ae`](https://github.com/eea/volto-embed/commit/da351ae9ffaaef756f7a665618a03fd04cb9b01d)]
|
|
118
163
|
- use volto-datablocks@develop dependency [Miu Razvan - [`b379d84`](https://github.com/eea/volto-embed/commit/b379d8478657dd39dad066181b349cee7ac2531d)]
|
|
164
|
+
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`ddf685a`](https://github.com/eea/volto-embed/commit/ddf685a9481d780a1df2e4f991f93676478c3e05)]
|
|
119
165
|
## [8.0.0](https://github.com/eea/volto-embed/compare/7.0.2...8.0.0) - 17 November 2023
|
|
120
166
|
|
|
121
167
|
#### :hammer_and_wrench: Others
|
|
122
168
|
|
|
123
169
|
- tests: add cypress tests [nileshgulia1 - [`e4b2803`](https://github.com/eea/volto-embed/commit/e4b28033114170639787d77976dc13b7f697f704)]
|
|
170
|
+
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`83d91d5`](https://github.com/eea/volto-embed/commit/83d91d5716a9ce8ebbbff01a7838711298684be4)]
|
|
124
171
|
- fix error [Claudia Ifrim - [`553f3af`](https://github.com/eea/volto-embed/commit/553f3af004af034c721dcd6b01de55c258a88c49)]
|
|
125
172
|
- bump version [Miu Razvan - [`363694a`](https://github.com/eea/volto-embed/commit/363694ae50cdec941fb53b396b75e9a4554d44fb)]
|
|
126
173
|
### [7.0.2](https://github.com/eea/volto-embed/compare/7.0.1...7.0.2) - 10 November 2023
|
|
@@ -130,6 +177,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
130
177
|
#### :hammer_and_wrench: Others
|
|
131
178
|
|
|
132
179
|
- add missing less variable [Miu Razvan - [`47683a7`](https://github.com/eea/volto-embed/commit/47683a7816581d117bb88f16e3087864aaa52f5e)]
|
|
180
|
+
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`ba168e4`](https://github.com/eea/volto-embed/commit/ba168e49554a51a6015a98a77dc0ceab76320218)]
|
|
133
181
|
## [7.0.0](https://github.com/eea/volto-embed/compare/6.0.1...7.0.0) - 6 November 2023
|
|
134
182
|
|
|
135
183
|
#### :rocket: New Features
|
|
@@ -139,12 +187,15 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
139
187
|
#### :house: Internal changes
|
|
140
188
|
|
|
141
189
|
- style: Automated code fix [eea-jenkins - [`c34d6f4`](https://github.com/eea/volto-embed/commit/c34d6f47fd33f728d40254a12c05fe385b27f2e9)]
|
|
190
|
+
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`673f3ff`](https://github.com/eea/volto-embed/commit/673f3ff355baa8d3646e4558ff2be00f36b5a45a)]
|
|
142
191
|
- chore: husky, lint-staged use fixed versions [valentinab25 - [`31169f7`](https://github.com/eea/volto-embed/commit/31169f73887837463daee76d63b6516046ad49aa)]
|
|
143
192
|
|
|
144
193
|
#### :hammer_and_wrench: Others
|
|
145
194
|
|
|
146
195
|
- update tests [Miu Razvan - [`c906b79`](https://github.com/eea/volto-embed/commit/c906b79149e853f718d924871ce2e633e5e427c8)]
|
|
147
196
|
- update tests [Miu Razvan - [`11625b6`](https://github.com/eea/volto-embed/commit/11625b65846388a846d1bdf7ebb2e1f8bd103c91)]
|
|
197
|
+
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`5e7a155`](https://github.com/eea/volto-embed/commit/5e7a15505334c9b81f07172116b49eaefc692ebf)]
|
|
198
|
+
- test: [JENKINS] Improve cypress time [valentinab25 - [`eeb6dcb`](https://github.com/eea/volto-embed/commit/eeb6dcb4b0f8af07496450e6e7783932ebe88bf7)]
|
|
148
199
|
- Release 7.0.0 [Alin Voinea - [`cbc5c79`](https://github.com/eea/volto-embed/commit/cbc5c79f1b66daf0d599d9de5a1bc7d137bafed8)]
|
|
149
200
|
- add act in unit tests [Miu Razvan - [`ecf5b2f`](https://github.com/eea/volto-embed/commit/ecf5b2fe553d99ad6a11570d3d34852d557fbe85)]
|
|
150
201
|
- update [Miu Razvan - [`049cc14`](https://github.com/eea/volto-embed/commit/049cc140bb6ffea4eb3f1555e693e9973ef63d0e)]
|
|
@@ -167,6 +218,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
167
218
|
|
|
168
219
|
- test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`dc2de20`](https://github.com/eea/volto-embed/commit/dc2de2084b53043f240ee1efa2588b5037326ed7)]
|
|
169
220
|
- test: Fix package.json scripts to use makefile [Alin Voinea - [`b4ffca2`](https://github.com/eea/volto-embed/commit/b4ffca24bb8cc4ba2007cc1040cc7b55dc7cc779)]
|
|
221
|
+
- test: Fix eslint and yarn i18n [Alin Voinea - [`1563d0a`](https://github.com/eea/volto-embed/commit/1563d0ab1f54e775a16705bfd3d267303eb2a526)]
|
|
170
222
|
- i18n: Add en [Alin Voinea - [`b4e0694`](https://github.com/eea/volto-embed/commit/b4e0694ee40ecc195536fd1826adfab8876c5061)]
|
|
171
223
|
- test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`8f228ca`](https://github.com/eea/volto-embed/commit/8f228ca0644cee0f777a01114895583f387a395c)]
|
|
172
224
|
- test: increase test coverage - refs #254313 [ana-oprea - [`30354d8`](https://github.com/eea/volto-embed/commit/30354d8a10a78e4fc322e37f4be20ff85cd00bbc)]
|
|
@@ -195,6 +247,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
195
247
|
|
|
196
248
|
- Add react-countup to resolutions [kreafox - [`36eb637`](https://github.com/eea/volto-embed/commit/36eb637c0cb9413b0b0e0ce53e621b2289929d65)]
|
|
197
249
|
- Move generic classes to privacy-protection [kreafox - [`715d559`](https://github.com/eea/volto-embed/commit/715d559e370bf7a3489b64d357b0a6cd7b1a3af2)]
|
|
250
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`5715b4d`](https://github.com/eea/volto-embed/commit/5715b4d3fcc14a34e031c383275c685d88f4db44)]
|
|
251
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`ef24ac0`](https://github.com/eea/volto-embed/commit/ef24ac05b17f4f4dbf05ceafbee677012a7f28f5)]
|
|
252
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`81f957b`](https://github.com/eea/volto-embed/commit/81f957b51aef7be59214530b774de8547bee3f5f)]
|
|
198
253
|
### [5.0.2](https://github.com/eea/volto-embed/compare/5.0.1...5.0.2) - 20 March 2023
|
|
199
254
|
|
|
200
255
|
#### :hammer_and_wrench: Others
|
|
@@ -209,6 +264,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
209
264
|
- update .project.eslintrc.js [Miu Razvan - [`628fd40`](https://github.com/eea/volto-embed/commit/628fd402b00d075ce319b9be92ff5f0e4d0ca2c4)]
|
|
210
265
|
- rename schema.jsx [Miu Razvan - [`62794e3`](https://github.com/eea/volto-embed/commit/62794e398eab5117132e5622cab735f6cf4f79fd)]
|
|
211
266
|
- improving code quality as per sonarqube reported issues [tedw87 - [`c7842f7`](https://github.com/eea/volto-embed/commit/c7842f7795f344e9d30538ddf2da04e97e319ebe)]
|
|
267
|
+
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`fe3a2de`](https://github.com/eea/volto-embed/commit/fe3a2de6180796c3d6b569733d2b9365a669c23e)]
|
|
212
268
|
## [5.0.0](https://github.com/eea/volto-embed/compare/4.0.4...5.0.0) - 31 October 2022
|
|
213
269
|
|
|
214
270
|
#### :hammer_and_wrench: Others
|
|
@@ -228,6 +284,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
228
284
|
|
|
229
285
|
- use specific alpha for addon test [andreiggr - [`e6df633`](https://github.com/eea/volto-embed/commit/e6df633aa4d2b0ee7eeb6b5aafa21528f14cd1df)]
|
|
230
286
|
- add optional height to privacy container [andreiggr - [`e2ac711`](https://github.com/eea/volto-embed/commit/e2ac711db4e461b474cade42109346a73bb8ecbd)]
|
|
287
|
+
- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`9f3f358`](https://github.com/eea/volto-embed/commit/9f3f35882fb367d72c7916abe7cbf366dbd8d5b6)]
|
|
288
|
+
- Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`7677140`](https://github.com/eea/volto-embed/commit/767714006abf7cbe336c5ab00d76c7232d5bc798)]
|
|
231
289
|
### [4.0.2](https://github.com/eea/volto-embed/compare/4.0.1...4.0.2) - 15 July 2022
|
|
232
290
|
|
|
233
291
|
#### :hammer_and_wrench: Others
|
|
@@ -267,6 +325,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
267
325
|
|
|
268
326
|
- Update package.json [Nilesh - [`0ec673a`](https://github.com/eea/volto-embed/commit/0ec673a8178731b8c1e010101caee2a3c9fafaca)]
|
|
269
327
|
- Update package.json [Nilesh - [`b8b94ec`](https://github.com/eea/volto-embed/commit/b8b94ec64672229f464b9108b4ac01a848827c00)]
|
|
328
|
+
- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`cfe04d8`](https://github.com/eea/volto-embed/commit/cfe04d885255bb8e472a3b268b98e3d7b9022437)]
|
|
270
329
|
- Refs #142010 - Optimize Volto-addons gitflow pipelines [valentinab25 - [`bf197dd`](https://github.com/eea/volto-embed/commit/bf197dd6516f9c18994add19b1141e061a96e2b6)]
|
|
271
330
|
- no hardcoded text [Daniela Mormocea - [`4001bb4`](https://github.com/eea/volto-embed/commit/4001bb414df05c1516f95e4dcec4a328406dc63f)]
|
|
272
331
|
- fix [Daniela Mormocea - [`a41ca9a`](https://github.com/eea/volto-embed/commit/a41ca9a2795a59f2633fb97938244e335dca8c43)]
|
|
@@ -340,6 +399,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
340
399
|
- revert use of custom bg image [nileshgulia1 - [`63a74b7`](https://github.com/eea/volto-embed/commit/63a74b7e671d85b602b0190c7a18e6d6ad71341b)]
|
|
341
400
|
- PrivacyProtection update & accept bg image [Andrei Grigore - [`f3f05d1`](https://github.com/eea/volto-embed/commit/f3f05d1d21fc88b90de3f68a995242b6c359e03a)]
|
|
342
401
|
- fix loading of cookies [nileshgulia1 - [`46348d8`](https://github.com/eea/volto-embed/commit/46348d8321b4633a3d5fdcbfb2c4f01912d7ed2a)]
|
|
402
|
+
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`a1e1f50`](https://github.com/eea/volto-embed/commit/a1e1f50db8a1ebc11261c3a24c39687c00ca7eea)]
|
|
403
|
+
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`1e1471e`](https://github.com/eea/volto-embed/commit/1e1471ebab5ba6e5bf0c231ddd0de94d8fe6c846)]
|
|
343
404
|
### [2.0.1](https://github.com/eea/volto-embed/compare/2.0.0...2.0.1) - 28 May 2021
|
|
344
405
|
|
|
345
406
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-embed",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.3",
|
|
4
4
|
"description": "Embed external content",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"@eeacms/volto-datablocks": "*"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"cypress": "13.1.0",
|
|
27
26
|
"@cypress/code-coverage": "^3.10.0",
|
|
28
27
|
"@plone/scripts": "*",
|
|
29
28
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
29
|
+
"cypress": "13.1.0",
|
|
30
30
|
"cypress-fail-fast": "^5.0.1",
|
|
31
31
|
"dotenv": "^16.3.2",
|
|
32
32
|
"husky": "^8.0.3",
|
|
@@ -35,7 +35,7 @@ export const MapsSchema = (props) => {
|
|
|
35
35
|
{
|
|
36
36
|
id: 'default',
|
|
37
37
|
title: 'Default',
|
|
38
|
-
fields: ['url', 'title', 'align', 'height'],
|
|
38
|
+
fields: ['url', 'title', 'align', 'height', 'useScreenHeight'],
|
|
39
39
|
},
|
|
40
40
|
],
|
|
41
41
|
|
|
@@ -63,6 +63,11 @@ export const MapsSchema = (props) => {
|
|
|
63
63
|
),
|
|
64
64
|
description: props.intl.formatMessage(messages.CSSMapHeightDescription),
|
|
65
65
|
},
|
|
66
|
+
useScreenHeight: {
|
|
67
|
+
title: 'Use screen height',
|
|
68
|
+
type: 'boolean',
|
|
69
|
+
default: false,
|
|
70
|
+
},
|
|
66
71
|
},
|
|
67
72
|
required: [],
|
|
68
73
|
};
|
|
@@ -22,12 +22,16 @@ const messages = defineMessages({
|
|
|
22
22
|
},
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
function getHeight(
|
|
25
|
+
function getHeight(data, screen) {
|
|
26
|
+
const { height, useScreenHeight } = data;
|
|
26
27
|
const asNumber = isNumber(Number(height)) && !isNaN(Number(height));
|
|
27
28
|
if (asNumber) {
|
|
28
29
|
return `${height}px`;
|
|
29
30
|
}
|
|
30
|
-
return
|
|
31
|
+
return (
|
|
32
|
+
height ||
|
|
33
|
+
(useScreenHeight && screen?.page?.height ? screen.page.height - 50 : 400)
|
|
34
|
+
);
|
|
31
35
|
}
|
|
32
36
|
|
|
33
37
|
function EmbedMap({ data, intl, id, screen }) {
|
|
@@ -78,7 +82,7 @@ function EmbedMap({ data, intl, id, screen }) {
|
|
|
78
82
|
<PrivacyProtection
|
|
79
83
|
data={data}
|
|
80
84
|
id={id}
|
|
81
|
-
height={getHeight(data
|
|
85
|
+
height={getHeight(data, screen)}
|
|
82
86
|
useVisibilitySensor={data.useVisibilitySensor ?? true}
|
|
83
87
|
>
|
|
84
88
|
<iframe
|
|
@@ -87,7 +91,7 @@ function EmbedMap({ data, intl, id, screen }) {
|
|
|
87
91
|
className="google-map"
|
|
88
92
|
frameBorder="0"
|
|
89
93
|
allowFullScreen
|
|
90
|
-
style={
|
|
94
|
+
style={{ height: getHeight(data, screen) }}
|
|
91
95
|
/>
|
|
92
96
|
</PrivacyProtection>
|
|
93
97
|
</div>
|
|
@@ -115,10 +115,13 @@ const PrivacyProtection = (props) => {
|
|
|
115
115
|
|
|
116
116
|
const height = React.useMemo(() => {
|
|
117
117
|
if (!props.height) return 'auto';
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
try {
|
|
119
|
+
const height = parseInt(props.height);
|
|
120
|
+
if (isNumber(height) && !isNaN(height)) return `${props.height}px`;
|
|
121
|
+
} catch {}
|
|
122
|
+
return 'auto';
|
|
120
123
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
121
|
-
}, []);
|
|
124
|
+
}, [props.height]);
|
|
122
125
|
|
|
123
126
|
React.useEffect(() => {
|
|
124
127
|
if (bgImg) {
|