@eeacms/volto-cca-policy 0.1.70 → 0.1.72

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,11 +4,20 @@ 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
- ### [0.1.70](https://github.com/eea/volto-cca-policy/compare/0.1.69...0.1.70) - 2 February 2024
7
+ ### [0.1.72](https://github.com/eea/volto-cca-policy/compare/0.1.71...0.1.72) - 9 February 2024
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix: map full width layout by removing no longer needed CSS [kreafox - [`6f5f1aa`](https://github.com/eea/volto-cca-policy/commit/6f5f1aa5a92a93c07a4efcc63be7ea862692c6d1)]
12
+
13
+ ### [0.1.71](https://github.com/eea/volto-cca-policy/compare/0.1.70...0.1.71) - 5 February 2024
8
14
 
9
15
  #### :hammer_and_wrench: Others
10
16
 
11
- - Refs #161485 - observatory page search description [Tripon Eugen - [`6dd9046`](https://github.com/eea/volto-cca-policy/commit/6dd9046ace2e894e721a1cd65553a6d9435f2ad5)]
17
+ - Refs #161485 - change cluster icon size [Tripon Eugen - [`74ccdcc`](https://github.com/eea/volto-cca-policy/commit/74ccdcc96c4a7d12b81b9fc7225170043ddd80dc)]
18
+ - Refs #161485 - change cluster icon size [Tripon Eugen - [`20010ca`](https://github.com/eea/volto-cca-policy/commit/20010ca893f0edc2def950a145013e328fce9be0)]
19
+ ### [0.1.70](https://github.com/eea/volto-cca-policy/compare/0.1.69...0.1.70) - 2 February 2024
20
+
12
21
  ### [0.1.69](https://github.com/eea/volto-cca-policy/compare/0.1.68...0.1.69) - 31 January 2024
13
22
 
14
23
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.1.70",
3
+ "version": "0.1.72",
4
4
  "description": "@eeacms/volto-cca-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -0,0 +1,41 @@
1
+ import { Plug } from '@plone/volto/components/manage/Pluggable';
2
+ import { getBaseUrl } from '@plone/volto/helpers';
3
+
4
+ function MigrationButtons(props) {
5
+ const { content, token, pathname } = props;
6
+ const contentId = content?.['@id'] || '';
7
+ const show = !!token && contentId && contentId.indexOf('europa.eu') === -1;
8
+ const base = getBaseUrl(pathname);
9
+
10
+ const handleClickMigrate = () => {
11
+ window.open(`http://localhost:8080/cca/${base}/@@volto_migrate`, '_blank');
12
+ };
13
+
14
+ const handleClickView = () => {
15
+ window.open(`https://climate-adapt.eea.europa.eu${base}`, '_blank');
16
+ };
17
+
18
+ return show ? (
19
+ <Plug pluggable="main.toolbar.top" id="cca-migration-helpers" order={0}>
20
+ <button
21
+ className={`circle-right-btn `}
22
+ id="toolbar-migration"
23
+ onClick={handleClickMigrate}
24
+ title="Migrate context"
25
+ >
26
+ M
27
+ </button>
28
+
29
+ <button
30
+ className={`circle-right-btn `}
31
+ id="toolbar-view"
32
+ onClick={handleClickView}
33
+ title="View original"
34
+ >
35
+ V
36
+ </button>
37
+ </Plug>
38
+ ) : null;
39
+ }
40
+
41
+ export default MigrationButtons;
package/src/index.js CHANGED
@@ -27,6 +27,7 @@ import installStore from './store';
27
27
 
28
28
  import GeocharsWidget from './components/theme/Widgets/GeocharsWidget';
29
29
  import GeolocationWidget from './components/theme/Widgets/GeolocationWidget';
30
+ import MigrationButtons from './components/MigrationButtons';
30
31
 
31
32
  const getEnv = () => (typeof window !== 'undefined' ? window.env : process.env);
32
33
 
@@ -448,6 +449,14 @@ const applyConfig = (config) => {
448
449
  ...(config.addonRoutes || []),
449
450
  ];
450
451
 
452
+ config.settings.appExtras = [
453
+ ...(config.settings.appExtras || []),
454
+ {
455
+ match: '',
456
+ component: MigrationButtons,
457
+ },
458
+ ];
459
+
451
460
  return compose(installBlocks, installSearchEngine, installStore)(config);
452
461
  };
453
462
 
@@ -1,3 +1,9 @@
1
+ .searchlib-page .content-section-tabs.menu .item i.icon.small {
2
+ width: 32px;
3
+ height: 32px;
4
+ font-size: 32px;
5
+ }
6
+
1
7
  /*******************************
2
8
  Global Overrides
3
9
  *******************************/
@@ -142,82 +148,6 @@ div.content-metadata {
142
148
  }
143
149
  }
144
150
 
145
- body.view-viewview .full {
146
- position: relative !important;
147
- right: 50%;
148
- left: 50%;
149
- width: 100vw !important;
150
- max-width: initial !important;
151
- margin-right: -50vw !important;
152
- margin-left: -50vw !important;
153
-
154
- > div {
155
- display: block;
156
- width: 100% !important;
157
- margin-right: auto !important;
158
- margin-left: auto !important;
159
- }
160
- }
161
-
162
- body.view-viewview.has-toolbar:not(.has-sidebar):not(.has-sidebar-collapsed) {
163
- .full > div {
164
- width: calc(100% - @toolbarWidth) !important;
165
- }
166
- }
167
-
168
- @media screen and (min-width: @largestMobileScreen) {
169
- body.view-viewview.has-toolbar.has-sidebar {
170
- .full > div {
171
- width: calc(100% - (@toolbarWidth + @sidebarWidth)) !important;
172
- }
173
- }
174
-
175
- body.view-viewview.has-toolbar.has-sidebar-collapsed {
176
- .full > div {
177
- width: calc(100% - (@toolbarWidth + @collapsedToolbarWidth)) !important;
178
- }
179
- }
180
-
181
- body.view-viewview.has-toolbar-collapsed:not(.has-sidebar):not(.has-sidebar-collapsed) {
182
- .full > div {
183
- width: calc(100% - @collapsedToolbarWidth) !important;
184
- }
185
- }
186
-
187
- body.view-viewview.has-toolbar-collapsed.has-sidebar {
188
- .full > div {
189
- .full-width-block {
190
- width: calc(100% - (@collapsedToolbarWidth + @sidebarWidth)) !important;
191
- }
192
- }
193
- }
194
-
195
- body.view-viewview.has-toolbar-collapsed.has-sidebar-collapsed {
196
- .full > div {
197
- width: calc(
198
- 100% - (@collapsedToolbarWidth + @collapsedToolbarWidth)
199
- ) !important;
200
- }
201
- }
202
- }
203
-
204
- @media only screen and (max-width: 767px) {
205
- body.view-viewview.has-toolbar-collapsed.has-sidebar-collapsed
206
- .full.full-width-block,
207
- body.view-viewview.has-toolbar.has-sidebar-collapsed .full.full-width-block {
208
- width: 100% !important;
209
- }
210
- }
211
-
212
- @media screen and (max-width: @largestMobileScreen) {
213
- body.view-viewview.has-toolbar:not(.has-sidebar):not(.has-sidebar-collapsed),
214
- body.view-viewview.has-toolbar-collapsed:not(.has-sidebar):not(.has-sidebar-collapsed) {
215
- .full > div {
216
- width: 100% !important;
217
- }
218
- }
219
- }
220
-
221
151
  .listing-body-dates:empty {
222
152
  margin-bottom: 0;
223
153
  }