@eeacms/volto-cca-policy 0.1.5 → 0.1.7
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/.project.eslintrc.js +4 -5
- package/CHANGELOG.md +143 -0
- package/cypress.config.js +1 -0
- package/package.json +8 -6
- package/razzle.extend.js +29 -0
- package/src/components/index.js +0 -1
- package/src/components/manage/Blocks/ECDEIndicators/ECDEIndicator.jsx +128 -0
- package/src/components/manage/Blocks/ECDEIndicators/ECDEIndicatorsEdit.jsx +5 -0
- package/src/components/manage/Blocks/ECDEIndicators/ECDEIndicatorsView.jsx +119 -0
- package/src/components/manage/Blocks/ECDEIndicators/README.md +72 -0
- package/src/components/manage/Blocks/ECDEIndicators/index.js +16 -0
- package/src/components/manage/Blocks/ECDEIndicators/styles.less +28 -0
- package/src/components/manage/Blocks/MKHMap/Edit.jsx +29 -0
- package/src/components/manage/Blocks/MKHMap/FeatureDisplay.jsx +87 -0
- package/src/components/manage/Blocks/MKHMap/FeatureInteraction.jsx +56 -0
- package/src/components/manage/Blocks/MKHMap/InfoOverlay.jsx +68 -0
- package/src/components/manage/Blocks/MKHMap/View.jsx +117 -0
- package/src/components/manage/Blocks/MKHMap/index.js +16 -0
- package/src/components/manage/Blocks/MKHMap/layers.js +107 -0
- package/src/components/manage/Blocks/MKHMap/map.svg +3 -0
- package/src/components/manage/Blocks/MKHMap/schema.js +15 -0
- package/src/components/manage/Blocks/MKHMap/styles.less +41 -0
- package/src/components/manage/Blocks/MKHMap/useWhyDidYouUpdate.js +33 -0
- package/src/components/manage/Blocks/index.js +12 -0
- package/src/components/theme/Views/AdaptationOptionView.jsx +20 -7
- package/src/components/theme/Views/CaseStudyView.jsx +298 -16
- package/src/components/theme/Views/GuidanceView.jsx +53 -10
- package/src/components/theme/Views/IndicatorView.jsx +19 -6
- package/src/components/theme/Views/InformationPortalView.jsx +20 -7
- package/src/components/theme/Views/OrganisationView.jsx +27 -13
- package/src/components/theme/Views/ProjectView.jsx +23 -8
- package/src/components/theme/Views/PublicationReportView.jsx +25 -9
- package/src/components/theme/Views/ToolView.jsx +25 -16
- package/src/components/theme/Views/VideoView.jsx +21 -7
- package/src/customizations/volto/components/theme/Header/Header.jsx +9 -2
- package/src/customizations/volto/components/theme/View/DefaultView.jsx +174 -0
- package/src/helpers/ContentMetadata.jsx +317 -22
- package/src/helpers/ShareInfo.jsx +14 -0
- package/src/helpers/Utils.jsx +95 -24
- package/src/helpers/index.js +2 -1
- package/src/index.js +111 -22
- package/src/policy.js +12 -20
- package/theme/assets/images/Footer/ec_logo.svg +3 -0
- package/theme/assets/images/Header/climate-adapt-logo-1.svg +20 -0
- package/theme/assets/images/Header/climate-adapt-logo.svg +22 -0
- package/theme/assets/images/spinner.svg +1 -0
- package/theme/collections/table.variables +17 -0
- package/theme/extras/banner.variables +5 -0
- package/theme/extras/contextNavigation.overrides +60 -0
- package/theme/extras/contextNavigation.variables +32 -0
- package/theme/extras/footer.variables +6 -0
- package/theme/extras/header.overrides +14 -0
- package/theme/extras/header.variables +7 -0
- package/theme/extras/hero.overrides +4 -0
- package/theme/extras/inpageNavigation.variables +5 -0
- package/theme/globals/site.overrides +142 -0
- package/theme/globals/site.variables +16 -0
- package/theme/theme.config +136 -0
- package/theme/tokens/colors.less +9 -0
- package/theme/tokens/tokens.less +1 -0
- package/src/components/manage/Blocks/ContextNavigation/ContextNavigationEdit.jsx +0 -31
- package/src/components/manage/Blocks/ContextNavigation/ContextNavigationView.jsx +0 -17
- package/src/components/manage/Blocks/ContextNavigation/index.js +0 -26
- package/src/components/manage/Blocks/ContextNavigation/schema.js +0 -81
- package/src/components/manage/Blocks/LayoutSettings/LayoutSettingsEdit.jsx +0 -32
- package/src/components/manage/Blocks/LayoutSettings/LayoutSettingsView.jsx +0 -15
- package/src/components/manage/Blocks/LayoutSettings/edit.less +0 -4
- package/src/components/manage/Blocks/LayoutSettings/index.js +0 -24
- package/src/components/manage/Blocks/LayoutSettings/schema.js +0 -32
- package/src/components/manage/Blocks/Title/Edit.jsx +0 -226
- package/src/components/manage/Blocks/Title/View.jsx +0 -35
- package/src/components/manage/Blocks/Title/index.js +0 -13
- package/src/components/manage/Blocks/Title/schema.js +0 -80
- package/src/components/manage/Blocks/schema-utils.js +0 -16
- package/src/components/manage/Blocks/schema.js +0 -52
- package/src/components/theme/Banner/Banner.jsx +0 -99
- package/src/components/theme/Banner/View.jsx +0 -241
- package/src/components/theme/Banner/styles.less +0 -20
- package/src/components/theme/CustomCSS/CustomCSS.jsx +0 -12
- package/src/components/theme/DraftBackground/DraftBackground.jsx +0 -16
- package/src/components/theme/DraftBackground/draft.css +0 -3
- package/src/components/theme/DraftBackground/draft.png +0 -0
- package/src/components/theme/Homepage/HomePageInverseView.jsx +0 -60
- package/src/components/theme/Homepage/HomePageView.jsx +0 -60
- package/src/components/theme/Logo.jsx +0 -34
- package/src/components/theme/SubsiteClass.jsx +0 -23
- package/src/config.js +0 -307
- package/src/customizations/@eeacms/volto-block-style/StyleWrapper/schema.js +0 -44
- package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/HeaderSearchPopUp.js +0 -80
- package/src/customizations/@eeacms/volto-tabs-block/components/templates/default/schema.js +0 -109
- package/src/customizations/@eeacms/volto-tabs-block/components/templates/horizontal-responsive/schema.js +0 -109
- package/src/customizations/volto/components/manage/Form/Form.jsx +0 -784
- package/src/customizations/volto/components/manage/Form/ModalForm.jsx +0 -326
- package/src/customizations/volto/components/manage/Sharing/Sharing.jsx +0 -495
- package/src/customizations/volto/components/manage/Widgets/ObjectBrowserWidget.jsx +0 -436
- package/src/customizations/volto/components/theme/Breadcrumbs/Breadcrumbs.jsx +0 -62
- package/src/customizations/volto/components/theme/Comments/Comments.jsx +0 -487
- package/src/customizations/volto/components/theme/Footer/Footer.jsx +0 -90
- package/src/customizations/volto/components/theme/Tags/Tags.jsx +0 -53
- package/src/customizations/volto/components/theme/Unauthorized/Unauthorized.jsx +0 -91
- package/src/customizations/volto/components/theme/View/EventView.jsx +0 -90
- package/src/helpers/custom-styles.less +0 -34
- package/src/middleware/voltoCustom.js +0 -37
package/.project.eslintrc.js
CHANGED
|
@@ -5,13 +5,14 @@ const projectRootPath = fs.existsSync('./project')
|
|
|
5
5
|
? fs.realpathSync('./project')
|
|
6
6
|
: fs.realpathSync('./../../../');
|
|
7
7
|
const packageJson = require(path.join(projectRootPath, 'package.json'));
|
|
8
|
-
const jsConfig = require(path.join(projectRootPath, 'jsconfig.json'))
|
|
8
|
+
const jsConfig = require(path.join(projectRootPath, 'jsconfig.json'))
|
|
9
|
+
.compilerOptions;
|
|
9
10
|
|
|
10
11
|
const pathsConfig = jsConfig.paths;
|
|
11
12
|
|
|
12
13
|
let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto');
|
|
13
14
|
|
|
14
|
-
Object.keys(pathsConfig).forEach(pkg => {
|
|
15
|
+
Object.keys(pathsConfig).forEach((pkg) => {
|
|
15
16
|
if (pkg === '@plone/volto') {
|
|
16
17
|
voltoPath = `./${jsConfig.baseUrl}/${pathsConfig[pkg][0]}`;
|
|
17
18
|
}
|
|
@@ -20,12 +21,11 @@ const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
|
|
|
20
21
|
const reg = new AddonConfigurationRegistry(projectRootPath);
|
|
21
22
|
|
|
22
23
|
// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
|
|
23
|
-
const addonAliases = Object.keys(reg.packages).map(o => [
|
|
24
|
+
const addonAliases = Object.keys(reg.packages).map((o) => [
|
|
24
25
|
o,
|
|
25
26
|
reg.packages[o].modulePath,
|
|
26
27
|
]);
|
|
27
28
|
|
|
28
|
-
|
|
29
29
|
module.exports = {
|
|
30
30
|
extends: `${projectRootPath}/node_modules/@plone/volto/.eslintrc`,
|
|
31
31
|
settings: {
|
|
@@ -45,4 +45,3 @@ module.exports = {
|
|
|
45
45
|
},
|
|
46
46
|
},
|
|
47
47
|
};
|
|
48
|
-
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,148 @@ 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.7](https://github.com/eea/volto-cca-policy/compare/0.1.6...0.1.7) - 6 March 2023
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- Update RAST path [kreafox - [`b6f8b10`](https://github.com/eea/volto-cca-policy/commit/b6f8b1081009c8b195fd3e6012952732be3ee3b3)]
|
|
12
|
+
### [0.1.6](https://github.com/eea/volto-cca-policy/compare/0.1.5...0.1.6) - 6 March 2023
|
|
13
|
+
|
|
14
|
+
#### :hammer_and_wrench: Others
|
|
15
|
+
|
|
16
|
+
- Refs #160116 - IndicatorView: update layout. [GhitaB - [`241207c`](https://github.com/eea/volto-cca-policy/commit/241207ca5b4ac4a0f5eae2198547a0e5c1e3d971)]
|
|
17
|
+
- Refs #160116 - InformationPortalView: add share info, update section title. [GhitaB - [`696cb47`](https://github.com/eea/volto-cca-policy/commit/696cb475bd43b7a8acd2a380496ea7d9f737ca37)]
|
|
18
|
+
- Refs #160116 - InformationPortalView: update layout. [GhitaB - [`6a1bb73`](https://github.com/eea/volto-cca-policy/commit/6a1bb734cbc73e955778b120606457d0ec67478e)]
|
|
19
|
+
- Refs #160116 - GuidanceView: add share info. [GhitaB - [`1e147c9`](https://github.com/eea/volto-cca-policy/commit/1e147c90fde8cfcc0c91e0bdc092707eb7f2b13c)]
|
|
20
|
+
- Refs #160116 - GuidanceView: update layout. [GhitaB - [`bc8d960`](https://github.com/eea/volto-cca-policy/commit/bc8d9604072d7532d99a9e47a40bc1fd14bd0d23)]
|
|
21
|
+
- Refs #160116 - AdaptationOptionView: add share info. [GhitaB - [`9216f80`](https://github.com/eea/volto-cca-policy/commit/9216f8040d0d6afc154b73945f4447a4f276447b)]
|
|
22
|
+
- Refs #160116 - CaseStudyView: add share info. [GhitaB - [`50aa2ce`](https://github.com/eea/volto-cca-policy/commit/50aa2ce5881cf4925eed8572cf1ea6786d891e47)]
|
|
23
|
+
- Refs #160116 - CaseStudyView: update layout. [GhitaB - [`3c3152e`](https://github.com/eea/volto-cca-policy/commit/3c3152e629514ea2d670086f9fafe55d29ca4f33)]
|
|
24
|
+
- Refs #160116 - AdaptationOptionView: update layout. [GhitaB - [`a46ae70`](https://github.com/eea/volto-cca-policy/commit/a46ae706781320d78c5708c4c00f9dbc079a6646)]
|
|
25
|
+
- Refs #160116 - OrganisationView: solve key warning. [GhitaB - [`09ac524`](https://github.com/eea/volto-cca-policy/commit/09ac5241968ea07bc54067ad02ebd55c968cbd81)]
|
|
26
|
+
- Refs #160116 - Geochars: implement case when data is saved in .spatial_layer / .spatial_values. [GhitaB - [`6465966`](https://github.com/eea/volto-cca-policy/commit/6465966777cbfd1bfee4501bae7e50fbe575a7ea)]
|
|
27
|
+
- Refs #160116 - OrganisationView: add share info. [GhitaB - [`85e2a37`](https://github.com/eea/volto-cca-policy/commit/85e2a3772fc5e0c257561ecc33249eb25b305f50)]
|
|
28
|
+
- Refs #160116 - OrganisationView: add label, improve section titles. [GhitaB - [`ce96697`](https://github.com/eea/volto-cca-policy/commit/ce96697ea025c6bcd948e6a591b37015c2069703)]
|
|
29
|
+
- Fix jenkins: Update volto-eea-design-system version [kreafox - [`f47b684`](https://github.com/eea/volto-cca-policy/commit/f47b684fd2e0523385b257342fa69d5005e3df54)]
|
|
30
|
+
- Refs #160116 - fix jenkins warning - retry. [GhitaB - [`defa462`](https://github.com/eea/volto-cca-policy/commit/defa462b438ad54cb5d344070ab276169ed1a41a)]
|
|
31
|
+
- Refs #160116 - fix jenkins warning. [GhitaB - [`2c5f636`](https://github.com/eea/volto-cca-policy/commit/2c5f636b0114f96b9ea6a8127994debdc669ed36)]
|
|
32
|
+
- Refs #160116 - OrganisationView: update layout. [GhitaB - [`7c0bc5b`](https://github.com/eea/volto-cca-policy/commit/7c0bc5b0e41c6a62abcbcc289a06335dec43f5ad)]
|
|
33
|
+
- Refs #160116 - ContentMetadata: don't show default creation dates. [GhitaB - [`0625fae`](https://github.com/eea/volto-cca-policy/commit/0625faeaacd88c760beb9b7caa252289c71ddb5e)]
|
|
34
|
+
- Refs #160116 - ProjectView: add share info. [GhitaB - [`1637b28`](https://github.com/eea/volto-cca-policy/commit/1637b28d119300a9d84a3030ec8829161fcabeff)]
|
|
35
|
+
- Refs #160116 - ProjectView: customize metadata - add duration. [GhitaB - [`d1c996b`](https://github.com/eea/volto-cca-policy/commit/d1c996b2bcc3ad7b55f3da80ae2185a8b3efb36a)]
|
|
36
|
+
- Refs #160116 - ProjectView: customize metadata - creation date. [GhitaB - [`7f7fd38`](https://github.com/eea/volto-cca-policy/commit/7f7fd383ae3f588ba01ea36a408e16e2f965ade8)]
|
|
37
|
+
- Refs #160116 - ProjectView: customize metadata - add funding programme. [GhitaB - [`27ebb39`](https://github.com/eea/volto-cca-policy/commit/27ebb39275f1e5bb9554c224ba4db8da0a269d98)]
|
|
38
|
+
- Refs #160116 - ProjectView: customize metadata. [GhitaB - [`62738b1`](https://github.com/eea/volto-cca-policy/commit/62738b1f9e0eb8c063a87a3f8f288ed8ca7f4a41)]
|
|
39
|
+
- Refs #160116 - ProjectView: improve section titles. [GhitaB - [`7bec10b`](https://github.com/eea/volto-cca-policy/commit/7bec10bbbeff85ff2153e950c427e522a7d34754)]
|
|
40
|
+
- Refs #160116 - ProjectView: improve layout. [GhitaB - [`8a464e7`](https://github.com/eea/volto-cca-policy/commit/8a464e71cfc1c7f62bc77328609594528378aea9)]
|
|
41
|
+
- Refs #160116 - PublicationReportView: improve section title. [GhitaB - [`60b1cf7`](https://github.com/eea/volto-cca-policy/commit/60b1cf713e4320742a9bc4d0d411231cd43b657d)]
|
|
42
|
+
- Refs #160116 - Customize documents list title based on content type. [GhitaB - [`a15ad01`](https://github.com/eea/volto-cca-policy/commit/a15ad010f4d54bc82fb753089705579b56b6a6f8)]
|
|
43
|
+
- Refs #160116 - PublicationReportView: documents list. [GhitaB - [`1743fcb`](https://github.com/eea/volto-cca-policy/commit/1743fcb9597d9381cbf93a21067a95c0a726f932)]
|
|
44
|
+
- Refs #160116 - PublicationReportView: customize metadata. [GhitaB - [`55739eb`](https://github.com/eea/volto-cca-policy/commit/55739eb66f09b5ca5d5a7b238e6f447b721f0ee0)]
|
|
45
|
+
- Refs #160116 - VideoView: customize metadata section. [GhitaB - [`e9c7385`](https://github.com/eea/volto-cca-policy/commit/e9c7385635925697acafc967849188e7018412dc)]
|
|
46
|
+
- Refs #160116 - PublicationReportView: customize tooltip text. [GhitaB - [`bda603e`](https://github.com/eea/volto-cca-policy/commit/bda603e5531023cfcf856b449fbb249076d53802)]
|
|
47
|
+
- Refs #160116 - PublicationReportView: add share info. [GhitaB - [`6b64db4`](https://github.com/eea/volto-cca-policy/commit/6b64db47ec7180c356247fdd2fd4ebf57a6e3257)]
|
|
48
|
+
- Refs #160116 - PublicationReportView: improve section titles. [GhitaB - [`fe6977f`](https://github.com/eea/volto-cca-policy/commit/fe6977f056a10af6c999a46c59c7628c9c5df0c9)]
|
|
49
|
+
- Refs #160116 - PublicationReportView: improve layout. [GhitaB - [`a58d854`](https://github.com/eea/volto-cca-policy/commit/a58d854b86684b8832710c92440f44cea0a5c06d)]
|
|
50
|
+
- Refs #160116 - ToolView: improve layout, fix section titles. [GhitaB - [`b04672c`](https://github.com/eea/volto-cca-policy/commit/b04672cd8582c0d417d148adf5a034296804e324)]
|
|
51
|
+
- Refs #160116 - VideoView: add Share your information section. [GhitaB - [`a62af5f`](https://github.com/eea/volto-cca-policy/commit/a62af5f243c9368de9e3f89e2c3890b7cd6a6cf0)]
|
|
52
|
+
- Refs #160116 - VideoView - fix layout grid columns, fix section title. [GhitaB - [`7a2b488`](https://github.com/eea/volto-cca-policy/commit/7a2b48855bea83b279d43edbebca080e2d19019d)]
|
|
53
|
+
- Fix color in navigation [kreafox - [`959cd2d`](https://github.com/eea/volto-cca-policy/commit/959cd2d9a686cfec8598aa60cbeff11b1a35cfe6)]
|
|
54
|
+
- Fix padding in context navigation [kreafox - [`b78da3b`](https://github.com/eea/volto-cca-policy/commit/b78da3bd37183ab0698681e7dc39c17f48810df8)]
|
|
55
|
+
- Style update [kreafox - [`7c3a8c7`](https://github.com/eea/volto-cca-policy/commit/7c3a8c79353dc3615c71edc7a70bd6d2d3db779e)]
|
|
56
|
+
- Update footer [kreafox - [`63973d7`](https://github.com/eea/volto-cca-policy/commit/63973d74e6e5fce653fa808b501b0635f1b7784e)]
|
|
57
|
+
- Refs #160935 - ECDEIndicators: improve styles. [GhitaB - [`c66bbf3`](https://github.com/eea/volto-cca-policy/commit/c66bbf326fcde766ce16429426f49d84744d4c13)]
|
|
58
|
+
- Refs #160935 - ECDEIndicators: fix layout columns grid responsivity. [GhitaB - [`f8c7611`](https://github.com/eea/volto-cca-policy/commit/f8c7611d4629888b6dedfd4c00f69dfa775e48ba)]
|
|
59
|
+
- Refs #160935 - ECDEIndicators: Improve columns. [GhitaB - [`332ec9d`](https://github.com/eea/volto-cca-policy/commit/332ec9d0e6ca5a96b84e63f78cd3a6083dc538ca)]
|
|
60
|
+
- Refs #160935 - Add styles for iframe. [GhitaB - [`251e20e`](https://github.com/eea/volto-cca-policy/commit/251e20efe5d94ca5d4937fc4d440a376acccb53a)]
|
|
61
|
+
- Refs #160935 - Fix jenkins warning. [GhitaB - [`b98ff07`](https://github.com/eea/volto-cca-policy/commit/b98ff078e39380b9327a8d94fe5abfa49fd9af87)]
|
|
62
|
+
- Refs #160935 - Add spinner. [GhitaB - [`16dc1b2`](https://github.com/eea/volto-cca-policy/commit/16dc1b23df9b901f42070f13b15240452cc5450d)]
|
|
63
|
+
- Refs #160935 - Add spinner. [GhitaB - [`08b4c9f`](https://github.com/eea/volto-cca-policy/commit/08b4c9f2af467d4a1f0a99cdf831441cd2ee6f28)]
|
|
64
|
+
- Refs #160935 - Try fix jenkins errors. [GhitaB - [`36206bf`](https://github.com/eea/volto-cca-policy/commit/36206bf1546272fd4459278ddd34d0ea345cf7f4)]
|
|
65
|
+
- Add volto openlayers map as addon [Tiberiu Ichim - [`b259c81`](https://github.com/eea/volto-cca-policy/commit/b259c8130f45ceca81e338dbe045ba59a89526ea)]
|
|
66
|
+
- WIP improve indicator [Tiberiu Ichim - [`6bb3525`](https://github.com/eea/volto-cca-policy/commit/6bb3525193db56a2b871eee556693f4e40cea922)]
|
|
67
|
+
- Update config: rename RAST and add footer description [kreafox - [`49bd7bd`](https://github.com/eea/volto-cca-policy/commit/49bd7bd7c4aede4f048eedeb897b7100ff5783fe)]
|
|
68
|
+
- Add contextNavigation override and move custom styles to themes [kreafox - [`1ed72c4`](https://github.com/eea/volto-cca-policy/commit/1ed72c43583e83bc035fa5c249d87db1fb52fd29)]
|
|
69
|
+
- Refs #160935 - Cleanup. [GhitaB - [`483c338`](https://github.com/eea/volto-cca-policy/commit/483c338fb6a42bdc0fad9c739d460c522fb1c5d4)]
|
|
70
|
+
- Refs #160935 - Cleanup. [GhitaB - [`07a77bd`](https://github.com/eea/volto-cca-policy/commit/07a77bdd5fd773a594c6c4b011d896a8ea5e09da)]
|
|
71
|
+
- Refs #160935 - WIP load iframe based on selected region. [GhitaB - [`b933026`](https://github.com/eea/volto-cca-policy/commit/b9330262fe60843bb62cf8dbe28996715a20e16c)]
|
|
72
|
+
- Refs #160935 - WIP load iframe based on selected region. [GhitaB - [`9fa48b6`](https://github.com/eea/volto-cca-policy/commit/9fa48b6a707a0a87d433714f652e050f34a28305)]
|
|
73
|
+
- Refs #160935 - WIP load iframe based on selected region. [GhitaB - [`97fb07b`](https://github.com/eea/volto-cca-policy/commit/97fb07bd43d74c530151b0e5f7270a1d9200f54a)]
|
|
74
|
+
- Refs #160935 - WIP ECDE indicators - selected region. [GhitaB - [`b897d46`](https://github.com/eea/volto-cca-policy/commit/b897d4654aa8c79879227c251e65880b17866c27)]
|
|
75
|
+
- Refs #160935 - WIP ECDE indicators - selected region. [GhitaB - [`0d52f17`](https://github.com/eea/volto-cca-policy/commit/0d52f177904093645f275ae3a3a53ef50e755e31)]
|
|
76
|
+
- Refs #160935 - WIP ECDE indicators. [GhitaB - [`58e6b0f`](https://github.com/eea/volto-cca-policy/commit/58e6b0fdcfe154e14f3ec0c21ddd370e007f11be)]
|
|
77
|
+
- WIP [Tiberiu Ichim - [`0a971c9`](https://github.com/eea/volto-cca-policy/commit/0a971c948d868250f4351b2906c8fd84babb79e4)]
|
|
78
|
+
- WIP [Tiberiu Ichim - [`0ba2210`](https://github.com/eea/volto-cca-policy/commit/0ba2210d7e3d7d37d70cc6338437444fd0343433)]
|
|
79
|
+
- WIP ECDEIndicator [GhitaB - [`a145457`](https://github.com/eea/volto-cca-policy/commit/a145457473fb8d88bb8ee4421ce4137b7807af5a)]
|
|
80
|
+
- Add ecdeindicators block [Tiberiu Ichim - [`23adfbf`](https://github.com/eea/volto-cca-policy/commit/23adfbf0d6055c9bb76bb68fc2028ef58d056d63)]
|
|
81
|
+
- Restructure context navigation [Tiberiu Ichim - [`70190e1`](https://github.com/eea/volto-cca-policy/commit/70190e1ac223549fd8b4790ca3361a9ddf876802)]
|
|
82
|
+
- Refs #241799 - rast tool [tripon eugen - [`a80ef8e`](https://github.com/eea/volto-cca-policy/commit/a80ef8e238c5b404ddf073113098d9c1c62a5b94)]
|
|
83
|
+
- More styling on MKH [kreafox - [`e1d6e28`](https://github.com/eea/volto-cca-policy/commit/e1d6e2879eb72ce390be0678dbd80241f016ef99)]
|
|
84
|
+
- Remove console.log [kreafox - [`514c178`](https://github.com/eea/volto-cca-policy/commit/514c178f3058a735a83d42864567fe2395f1716e)]
|
|
85
|
+
- More styling on MKH [kreafox - [`8ef5fc1`](https://github.com/eea/volto-cca-policy/commit/8ef5fc1d22f2cc63bade5610184a723937482a7c)]
|
|
86
|
+
- Add base theming & subsite stylig [kreafox - [`a6b209e`](https://github.com/eea/volto-cca-policy/commit/a6b209e60c2a9edf687de2d79be7db6192e52d83)]
|
|
87
|
+
- Prettier [kreafox - [`5c3b4af`](https://github.com/eea/volto-cca-policy/commit/5c3b4af1396459018c5237b63ce1d47bf770b223)]
|
|
88
|
+
- Update dependency [kreafox - [`6e5329d`](https://github.com/eea/volto-cca-policy/commit/6e5329d8298268eb1de04aae05e691aa8cb89347)]
|
|
89
|
+
- Cleanup dependencies [kreafox - [`1537f4d`](https://github.com/eea/volto-cca-policy/commit/1537f4d150b5168c25c0abf60e91651f0c08be3d)]
|
|
90
|
+
- Code cleanup [Tiberiu Ichim - [`f8ad2ad`](https://github.com/eea/volto-cca-policy/commit/f8ad2ad055c4ef3c1a545ace415be403b360f2e2)]
|
|
91
|
+
- Code cleanup [Tiberiu Ichim - [`98aa3a0`](https://github.com/eea/volto-cca-policy/commit/98aa3a01ce6969e2b778272b4b226e250e537e4e)]
|
|
92
|
+
- Show subsite logo [Tiberiu Ichim - [`46eb8b1`](https://github.com/eea/volto-cca-policy/commit/46eb8b166eb7bbc3cb804f8374e202d38c86df1e)]
|
|
93
|
+
- Don't need to depend two times on volto-subsites [tripon eugen - [`7496451`](https://github.com/eea/volto-cca-policy/commit/7496451a376677d50a3f60cd38db20431a16fb1e)]
|
|
94
|
+
- Code cleanup [Tiberiu Ichim - [`1442162`](https://github.com/eea/volto-cca-policy/commit/1442162ea56a69b5c49e92560f72c7fbefc72d6d)]
|
|
95
|
+
- Improve map [Tiberiu Ichim - [`ee72e58`](https://github.com/eea/volto-cca-policy/commit/ee72e5883bf3b9e4a13d9b18d437b620128acb37)]
|
|
96
|
+
- Improve map [Tiberiu Ichim - [`a784d8c`](https://github.com/eea/volto-cca-policy/commit/a784d8cbb9b78e8f31ee1098814765bc40ecee2e)]
|
|
97
|
+
- Improve map [Tiberiu Ichim - [`b9edbca`](https://github.com/eea/volto-cca-policy/commit/b9edbcae8c1f83e84691be68ba7046379780e793)]
|
|
98
|
+
- Improve map [Tiberiu Ichim - [`8fae7e8`](https://github.com/eea/volto-cca-policy/commit/8fae7e8e1075aa0736782ac2d141ad61048623f4)]
|
|
99
|
+
- Improve map [Tiberiu Ichim - [`14aa5cb`](https://github.com/eea/volto-cca-policy/commit/14aa5cbb2ef3f6c4b9b28de801e74326588d1ceb)]
|
|
100
|
+
- Improve map [Tiberiu Ichim - [`ee52aef`](https://github.com/eea/volto-cca-policy/commit/ee52aef8f61d8612aaae86394bfc02d7bc9c5dc9)]
|
|
101
|
+
- Improve map [Tiberiu Ichim - [`8061959`](https://github.com/eea/volto-cca-policy/commit/8061959497181eb4f7e6af58b0f77e8ab4eb895d)]
|
|
102
|
+
- Interact [Tiberiu Ichim - [`9b4d35c`](https://github.com/eea/volto-cca-policy/commit/9b4d35c91acf57db51d63b2c2fe1df27a6408002)]
|
|
103
|
+
- WIP on map [Tiberiu Ichim - [`ed3bb96`](https://github.com/eea/volto-cca-policy/commit/ed3bb96029e9827a6722a1dc1ec47d26281002c0)]
|
|
104
|
+
- WIP on map [Tiberiu Ichim - [`65b9592`](https://github.com/eea/volto-cca-policy/commit/65b9592b1be71c226071f9dff9672d062f21f6de)]
|
|
105
|
+
- WIP on map [Tiberiu Ichim - [`aa7abbf`](https://github.com/eea/volto-cca-policy/commit/aa7abbf0707ee583f6dca35568ba1384e30850c2)]
|
|
106
|
+
- Move addons registration in this package [Tiberiu Ichim - [`134d3e6`](https://github.com/eea/volto-cca-policy/commit/134d3e6a4251156908849b2b53c7e2ecc4c6dfe6)]
|
|
107
|
+
- WIP [Tiberiu Ichim - [`e2461b3`](https://github.com/eea/volto-cca-policy/commit/e2461b39b156946fb94c7cd095aa7a5438aeb938)]
|
|
108
|
+
- Add stub mkh block [Tiberiu Ichim - [`1a1bec3`](https://github.com/eea/volto-cca-policy/commit/1a1bec3724d74eef7cfa8f90dba2462f62afa44a)]
|
|
109
|
+
- Refs #160116 - IndicatorView - custom ContentMetadata. [GhitaB - [`3d3723f`](https://github.com/eea/volto-cca-policy/commit/3d3723f166426dd18841596be420e33089085bb4)]
|
|
110
|
+
- Refs #160116 - GuidanceView - contributors list - in case of organisations list. [GhitaB - [`1b61a8e`](https://github.com/eea/volto-cca-policy/commit/1b61a8e88c0a153e7aac6f013036b4018bd693a3)]
|
|
111
|
+
- Refs #160116 - GuidanceView - add contributors list. [GhitaB - [`029d83d`](https://github.com/eea/volto-cca-policy/commit/029d83dc028c990605ac211175ff3b311880566c)]
|
|
112
|
+
- Refs #160116 - GuidanceView - improve Source. [GhitaB - [`4729c84`](https://github.com/eea/volto-cca-policy/commit/4729c84480bcd480986ba8c089bb41259d2be792)]
|
|
113
|
+
- Refs #160116 - GuidanceView - improve. [GhitaB - [`0024281`](https://github.com/eea/volto-cca-policy/commit/00242815e7fce13bbd8ca480dd283f916961fc91)]
|
|
114
|
+
- Refs #160116 - GuidanceView - custom ContentMetadata. [GhitaB - [`addacee`](https://github.com/eea/volto-cca-policy/commit/addacee962e69009eb133dd80cbb3d16a07f2f89)]
|
|
115
|
+
- Refs #160116 - GuidanceView - custom tooltip text for date of creation. [GhitaB - [`18f05f3`](https://github.com/eea/volto-cca-policy/commit/18f05f35d8c66aec25b7df2bc85e35de59911a77)]
|
|
116
|
+
- Refs #160116 - CaseStudyView - add icon in documents list. [GhitaB - [`3c23953`](https://github.com/eea/volto-cca-policy/commit/3c23953e3709f3b0b909edca2a9e6af1537e48fa)]
|
|
117
|
+
- Add index [Tiberiu Ichim - [`c6f1025`](https://github.com/eea/volto-cca-policy/commit/c6f1025c5653ab01a5f899e27e3c6deef1649850)]
|
|
118
|
+
- Refs #160116 - CaseStudyView - add documents list. [GhitaB - [`c712320`](https://github.com/eea/volto-cca-policy/commit/c71232000ee900c5d6e838fd42fcd6a51db14544)]
|
|
119
|
+
- Enable layout settings block [Tiberiu Ichim - [`3d99b4b`](https://github.com/eea/volto-cca-policy/commit/3d99b4b0a1e626a2e8f4d889502aee119fa1f331)]
|
|
120
|
+
- Refs #160116 - CaseStudyView - improve links list - use UniversalLink in case of internal links. [GhitaB - [`6772a89`](https://github.com/eea/volto-cca-policy/commit/6772a89b2dc4834390b9a4ac57e07c34d08569d0)]
|
|
121
|
+
- Refs #160116 - CaseStudyView - custom ContentMetadata. [GhitaB - [`3e161bf`](https://github.com/eea/volto-cca-policy/commit/3e161bff80234518b9da4b850f4be36d1ffa2e83)]
|
|
122
|
+
- Refs #160116 - CaseStudyView - custom ContentMetadata. [GhitaB - [`b63358e`](https://github.com/eea/volto-cca-policy/commit/b63358e489660dd6fa37a5866e2785aa8b7bd3df)]
|
|
123
|
+
- Refs #160116 - CaseStudyView - do not show sections without content. [GhitaB - [`da09499`](https://github.com/eea/volto-cca-policy/commit/da0949973cd63dc74b9f8dd66d7d4dba6f78eee2)]
|
|
124
|
+
- Refs #160116 - CaseStudyView - custom case for Relevance section content. [GhitaB - [`44d7907`](https://github.com/eea/volto-cca-policy/commit/44d7907d2ae1c56462bd194109af6574bf0465d1)]
|
|
125
|
+
- Refs #160116 - CaseStudyView - custom title. [GhitaB - [`3ff5535`](https://github.com/eea/volto-cca-policy/commit/3ff553544ca5e7d48927ba6d717b953b8cca69e6)]
|
|
126
|
+
- Refs #160116 - CaseStudyView - implement case of adaptation options links list. [GhitaB - [`dd16cea`](https://github.com/eea/volto-cca-policy/commit/dd16cea9fc79af42f30e6e721eb3f3e504cbb6f6)]
|
|
127
|
+
- Refs #160116 - CaseStudyView - fix hr. [GhitaB - [`f6ff20b`](https://github.com/eea/volto-cca-policy/commit/f6ff20bd1fa916a7b0ba97b4d4aef5092bcc08cb)]
|
|
128
|
+
- Refs #160116 - CaseStudyView - custom title in content section. [GhitaB - [`f61c341`](https://github.com/eea/volto-cca-policy/commit/f61c34155ad22099c16da388caa0ea21d48881c6)]
|
|
129
|
+
- Refs #160116 - CaseStudyView - simplify code. [GhitaB - [`3994ed9`](https://github.com/eea/volto-cca-policy/commit/3994ed9d13b03b83f589525434c30356ef4c4142)]
|
|
130
|
+
- Refs #160116 - CaseStudyView - websites as links list. [GhitaB - [`9806f55`](https://github.com/eea/volto-cca-policy/commit/9806f550632a05bc877111bb9c559dd5b61f24be)]
|
|
131
|
+
- Refs #160116 - CaseStudyView - code style. [GhitaB - [`8d8625e`](https://github.com/eea/volto-cca-policy/commit/8d8625e16ee8281b6f042eb54ba7d54baf5a8080)]
|
|
132
|
+
- Refs #160116 - CaseStudyView - sections groups and content. [GhitaB - [`99a0730`](https://github.com/eea/volto-cca-policy/commit/99a07302e70a2b3adfb296baff0d085e98fa5118)]
|
|
133
|
+
- Refs #160116 - CaseStudyView - add key for photos. [GhitaB - [`13ce5b6`](https://github.com/eea/volto-cca-policy/commit/13ce5b6f34d15555212d7528c412b67c569dc656)]
|
|
134
|
+
- Refs #160116 - CaseStudyView - sections menu. [GhitaB - [`6736b8f`](https://github.com/eea/volto-cca-policy/commit/6736b8f9c0e39b8b3dc8df9b6c6d01a34cd15edb)]
|
|
135
|
+
- Refs #160116 - CaseStudyView - Add Case Study Illustrations section. [GhitaB - [`330983b`](https://github.com/eea/volto-cca-policy/commit/330983b787e08abd152b9d6be213ea150b4b17c4)]
|
|
136
|
+
- Refs #160116 - CaseStudyView - WIP add sections menu and sections. [GhitaB - [`b387432`](https://github.com/eea/volto-cca-policy/commit/b3874328a2b825ea0752ef78cc7c5b1d88b59a8b)]
|
|
137
|
+
- Refs #160116 - CaseStudyView - WIP add sections menu and sections. [GhitaB - [`7742534`](https://github.com/eea/volto-cca-policy/commit/774253452ad7ec72340038af60eb35e7a0ea1853)]
|
|
138
|
+
- Refs #160116 - CaseStudyView - primary photo - improve design. [GhitaB - [`c02c6eb`](https://github.com/eea/volto-cca-policy/commit/c02c6eb2430757555313390918ebaaf9b2f53acd)]
|
|
139
|
+
- Refs #160116 - CaseStudyView - primary photo - no image case. [GhitaB - [`4209d1b`](https://github.com/eea/volto-cca-policy/commit/4209d1b25d1d5c25e553be2cb10bd488d17290fb)]
|
|
140
|
+
- Refs #160116 - CaseStudyView - add primary photo component. [GhitaB - [`fd1c9b0`](https://github.com/eea/volto-cca-policy/commit/fd1c9b0a609b56e8d920aa7071e3a2eb609b19c6)]
|
|
141
|
+
- Refs #160116 - Improve component for published/modified info. [GhitaB - [`00e8709`](https://github.com/eea/volto-cca-policy/commit/00e8709773ffd627d611c523c951f795a0968165)]
|
|
142
|
+
- Refs #160116 - AdaptationOptionView - fix missing field Life time. [GhitaB - [`432c52f`](https://github.com/eea/volto-cca-policy/commit/432c52fdabfae772a26b65cd0f96cce2388fef89)]
|
|
143
|
+
- Refs #160116 - Improve styles. [GhitaB - [`4d91265`](https://github.com/eea/volto-cca-policy/commit/4d912659039a73789aaf0eaa74c97cc5bf968f34)]
|
|
144
|
+
- Refs #160116 - ContentMetadata - related case studies. [GhitaB - [`66a3852`](https://github.com/eea/volto-cca-policy/commit/66a38525f950af9f7348e98d109604e548bccdb1)]
|
|
145
|
+
- Refs #160116 - ContentMetadata - related case studies. [GhitaB - [`15274c6`](https://github.com/eea/volto-cca-policy/commit/15274c6ebcf1e1f635ca5a60eae095e068f9e7b7)]
|
|
146
|
+
- Fix import [Tiberiu Ichim - [`b0736d8`](https://github.com/eea/volto-cca-policy/commit/b0736d860dc4c83c3d399b02e5c52bcde0819157)]
|
|
147
|
+
- Refs #153789 - fix [tripon eugen - [`a4ec283`](https://github.com/eea/volto-cca-policy/commit/a4ec28369c12416583a68406700f438731a6f746)]
|
|
148
|
+
- Refs #153789 - publishedDates and oraganisations related [tripon eugen - [`e22b6b5`](https://github.com/eea/volto-cca-policy/commit/e22b6b518211f27a2b0ebc512970feb64709ec31)]
|
|
7
149
|
### [0.1.5](https://github.com/eea/volto-cca-policy/compare/0.1.4...0.1.5) - 6 February 2023
|
|
8
150
|
|
|
9
151
|
#### :hammer_and_wrench: Others
|
|
@@ -97,6 +239,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
97
239
|
#### :hammer_and_wrench: Others
|
|
98
240
|
|
|
99
241
|
- Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
|
|
242
|
+
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
|
|
100
243
|
### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
|
|
101
244
|
|
|
102
245
|
#### :hammer_and_wrench: Others
|
package/cypress.config.js
CHANGED
|
@@ -19,6 +19,7 @@ module.exports = defineConfig({
|
|
|
19
19
|
setupNodeEvents(on, config) {
|
|
20
20
|
// e2e testing node events setup code
|
|
21
21
|
require('@cypress/code-coverage/task')(on, config);
|
|
22
|
+
require('cypress-fail-fast/plugin')(on, config);
|
|
22
23
|
return config;
|
|
23
24
|
},
|
|
24
25
|
baseUrl: 'http://localhost:3000',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-cca-policy",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
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",
|
|
@@ -17,17 +17,19 @@
|
|
|
17
17
|
"url": "git@github.com:eea/volto-cca-policy.git"
|
|
18
18
|
},
|
|
19
19
|
"addons": [
|
|
20
|
-
"@eeacms/volto-
|
|
21
|
-
"volto-
|
|
20
|
+
"@eeacms/volto-openlayers-map",
|
|
21
|
+
"@eeacms/volto-eea-design-system"
|
|
22
22
|
],
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@eeacms/volto-eea-design-system": "1.0.0-beta.4",
|
|
25
|
+
"@eeacms/volto-openlayers-map": "*"
|
|
26
|
+
},
|
|
23
27
|
"devDependencies": {
|
|
24
28
|
"@cypress/code-coverage": "^3.10.0",
|
|
25
|
-
"@eeacms/volto-eea-design-system": "*",
|
|
26
29
|
"@plone/scripts": "*",
|
|
27
30
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
28
31
|
"cypress-fail-fast": "^5.0.1",
|
|
29
|
-
"md5": "^2.3.0"
|
|
30
|
-
"volto-subsites": "*"
|
|
32
|
+
"md5": "^2.3.0"
|
|
31
33
|
},
|
|
32
34
|
"scripts": {
|
|
33
35
|
"release": "release-it",
|
package/razzle.extend.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const plugins = (defaultPlugins) => {
|
|
3
|
+
return defaultPlugins;
|
|
4
|
+
};
|
|
5
|
+
const modify = (config, { target, dev }, webpack) => {
|
|
6
|
+
const themeConfigPath = `${__dirname}/theme/theme.config`;
|
|
7
|
+
config.resolve.alias['../../theme.config$'] = themeConfigPath;
|
|
8
|
+
config.resolve.alias['../../theme.config'] = themeConfigPath;
|
|
9
|
+
config.resolve.alias['../../theme'] = `${__dirname}/theme`;
|
|
10
|
+
const projectRootPath = path.resolve('.');
|
|
11
|
+
const themeLessPath = `${projectRootPath}/node_modules/@eeacms/volto-eea-design-system/theme`;
|
|
12
|
+
|
|
13
|
+
config.resolve.alias['eea-design-system-theme'] = dev
|
|
14
|
+
? `${projectRootPath}/src/addons/volto-eea-design-system/theme/themes/eea`
|
|
15
|
+
: `${themeLessPath}/themes/eea`;
|
|
16
|
+
|
|
17
|
+
const semanticLessPath = `${projectRootPath}/node_modules/semantic-ui-less`;
|
|
18
|
+
const hasDesignSystemInstalled = config.resolve.alias['eea-volto-themes'];
|
|
19
|
+
config.resolve.alias['eea-volto-theme-folder'] = hasDesignSystemInstalled
|
|
20
|
+
? themeLessPath
|
|
21
|
+
: semanticLessPath;
|
|
22
|
+
|
|
23
|
+
return config;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
module.exports = {
|
|
27
|
+
plugins,
|
|
28
|
+
modify,
|
|
29
|
+
};
|
package/src/components/index.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export BannerView from './theme/Banner/View';
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
// import { useDispatch, useSelector } from 'react-redux';
|
|
3
|
+
// import { getContent } from '@plone/volto/actions';
|
|
4
|
+
import spinner from '@eeacms/volto-cca-policy/../theme//assets/images/spinner.svg';
|
|
5
|
+
import './styles.less';
|
|
6
|
+
|
|
7
|
+
if (__CLIENT__) {
|
|
8
|
+
window.cds_toolbox = {
|
|
9
|
+
cds_public_path: 'https://cds.climate.copernicus.eu/toolbox/',
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// function useIndicator(path) {
|
|
14
|
+
// const dispatch = useDispatch();
|
|
15
|
+
//
|
|
16
|
+
// React.useEffect(() => {
|
|
17
|
+
// const action = getContent(path, null, 'fetch_indicator', null, false);
|
|
18
|
+
// dispatch(action);
|
|
19
|
+
// }, [dispatch, path]);
|
|
20
|
+
//
|
|
21
|
+
// return useSelector(
|
|
22
|
+
// (state) => state.content.subrequests.fetch_indicator?.data,
|
|
23
|
+
// );
|
|
24
|
+
// }
|
|
25
|
+
|
|
26
|
+
const createIframe = (details_url, selected_region, spinner_url) => {
|
|
27
|
+
let selected_app;
|
|
28
|
+
// selected_region = 'Bayern';
|
|
29
|
+
|
|
30
|
+
selected_app = details_url
|
|
31
|
+
.split('https://cds.climate.copernicus.eu/workflows/c3s/')[1]
|
|
32
|
+
.split('/')[0];
|
|
33
|
+
// console.log('selected app: ', selected_app);
|
|
34
|
+
//
|
|
35
|
+
// console.log('region: ', selected_region);
|
|
36
|
+
|
|
37
|
+
return `
|
|
38
|
+
<iframe srcdoc="<head>
|
|
39
|
+
<title>CDS integration test</title>
|
|
40
|
+
<meta charset='utf-8' />
|
|
41
|
+
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
|
|
42
|
+
<script type='text/javascript'>
|
|
43
|
+
window.cds_toolbox = { cds_public_path: 'https://cds.climate.copernicus.eu/toolbox/' };
|
|
44
|
+
</script>
|
|
45
|
+
<script type='text/javascript' src='https://cds.climate.copernicus.eu/toolbox/toolbox-latest.js'></script>
|
|
46
|
+
<script src='https://code.jquery.com/jquery-3.6.3.min.js'
|
|
47
|
+
integrity='sha256-pvPw+upLPUjgMXY0G+8O0xUf+/Im1MZjXxxgOcBQBXU=' crossorigin='anonymous'></script>
|
|
48
|
+
|
|
49
|
+
<body>
|
|
50
|
+
<div class='t-ct'>
|
|
51
|
+
<div id='toolbox-app'>
|
|
52
|
+
<div class='pre-app-loading'>
|
|
53
|
+
<img src='${spinner_url}' alt='Loading'>
|
|
54
|
+
<div>
|
|
55
|
+
...loading configuration...
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<script>
|
|
62
|
+
(function () {
|
|
63
|
+
const ID = 'toolbox-app';
|
|
64
|
+
$(document).ready(() => {
|
|
65
|
+
window.cds_toolbox.runApp(ID, 'https://cds.climate.copernicus.eu/workflows/c3s/${selected_app}/master/configuration.json', {
|
|
66
|
+
workflowParams: {
|
|
67
|
+
default: '${selected_region}'
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
// const defaults = {
|
|
72
|
+
// 'ecde-app-growing-degree-days': '${selected_region}',
|
|
73
|
+
// 'ecde-app-mean-temperature': 'Occitanie'
|
|
74
|
+
// }
|
|
75
|
+
//
|
|
76
|
+
// let selectedApp = '${selected_app}';
|
|
77
|
+
// const $appSelector = $('#app-selection');
|
|
78
|
+
|
|
79
|
+
// $appSelector.on('change', () => {
|
|
80
|
+
// const value = $appSelector.val();
|
|
81
|
+
// if (value !== selectedApp) {
|
|
82
|
+
// selectedApp = value;
|
|
83
|
+
// window.cds_toolbox[ID].app_instance.destroy();
|
|
84
|
+
// window.cds_toolbox.runApp(ID, 'https://cds.climate.copernicus.eu/workflows/c3s/' + selectedApp + '/master/configuration.json', {
|
|
85
|
+
// workflowParams: {
|
|
86
|
+
// default: defaults[selectedApp]
|
|
87
|
+
// }
|
|
88
|
+
// });
|
|
89
|
+
// }
|
|
90
|
+
// })
|
|
91
|
+
});
|
|
92
|
+
})();
|
|
93
|
+
|
|
94
|
+
</script>
|
|
95
|
+
|
|
96
|
+
</body>" />`;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export default function ECDEIndicator(props) {
|
|
100
|
+
const { selectedRegion } = props;
|
|
101
|
+
// const { indicatorUrl, selectedRegion } = props;
|
|
102
|
+
const [spinnerUrl, setSpinnerUrl] = useState(null);
|
|
103
|
+
|
|
104
|
+
// const indicator = useIndicator(indicatorUrl);
|
|
105
|
+
// console.log('real indicator url', indicator?.details_app_toolbox_url);
|
|
106
|
+
|
|
107
|
+
// const details_url = indicator?.details_app_toolbox_url;
|
|
108
|
+
// Hardcoded, to be replaced;
|
|
109
|
+
const details_url =
|
|
110
|
+
'https://cds.climate.copernicus.eu/workflows/c3s/ecde-app-growing-degree-days/master/configuration.json';
|
|
111
|
+
|
|
112
|
+
React.useEffect(() => {
|
|
113
|
+
setSpinnerUrl(spinner);
|
|
114
|
+
}, []);
|
|
115
|
+
|
|
116
|
+
return (
|
|
117
|
+
<>
|
|
118
|
+
{details_url ? (
|
|
119
|
+
<div
|
|
120
|
+
className="iframe-container"
|
|
121
|
+
dangerouslySetInnerHTML={{
|
|
122
|
+
__html: createIframe(details_url, selectedRegion, spinnerUrl), // selectedRegion // 'Vest'
|
|
123
|
+
}}
|
|
124
|
+
/>
|
|
125
|
+
) : null}
|
|
126
|
+
</>
|
|
127
|
+
);
|
|
128
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import superagent from 'superagent';
|
|
3
|
+
import { Dropdown, Grid } from 'semantic-ui-react';
|
|
4
|
+
import { searchContent } from '@plone/volto/actions';
|
|
5
|
+
import ECDEIndicator from './ECDEIndicator';
|
|
6
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
7
|
+
|
|
8
|
+
const regions_url =
|
|
9
|
+
'https://nest.discomap.eea.europa.eu/arcgis/rest/services/CLIMA/Regions_cities/MapServer/2/query?where=1+%3D+1&text=&objectIds=&time=&timeRelation=esriTimeRelationOverlaps&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&distance=&units=esriSRUnit_Foot&relationParam=&outFields=*&returnGeometry=false&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&havingClause=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&historicMoment=&returnDistinctValues=false&resultOffset=&resultRecordCount=&returnExtentOnly=false&sqlFormat=none&datumTransformation=¶meterValues=&rangeValues=&quantizationParameters=&featureEncoding=esriDefault&f=pjson';
|
|
10
|
+
|
|
11
|
+
function useRegions() {
|
|
12
|
+
const [regions, setRegions] = React.useState([]);
|
|
13
|
+
|
|
14
|
+
React.useEffect(() => {
|
|
15
|
+
superagent
|
|
16
|
+
.get(regions_url)
|
|
17
|
+
.set('accept', 'json')
|
|
18
|
+
.then((resp) => {
|
|
19
|
+
const res = JSON.parse(resp.text);
|
|
20
|
+
const _regions = res.features
|
|
21
|
+
.map((o) => [
|
|
22
|
+
// o.attributes.GISCO_ID,
|
|
23
|
+
// o.attributes.LAU_Name_Excel,
|
|
24
|
+
o.attributes.NUTS_ID,
|
|
25
|
+
o.attributes.NUTS_NAME,
|
|
26
|
+
])
|
|
27
|
+
.sort((a, b) => (a[1] > b[1] ? 1 : a[1] === b[1] ? 0 : -1));
|
|
28
|
+
// console.log('res', _regions); //JSON.parse(resp.text)
|
|
29
|
+
setRegions(_regions);
|
|
30
|
+
});
|
|
31
|
+
}, []);
|
|
32
|
+
|
|
33
|
+
return regions;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function useIndicators() {
|
|
37
|
+
const dispatch = useDispatch();
|
|
38
|
+
|
|
39
|
+
React.useEffect(() => {
|
|
40
|
+
const action = searchContent(
|
|
41
|
+
'/',
|
|
42
|
+
{
|
|
43
|
+
portal_type: 'eea.climateadapt.c3sindicator',
|
|
44
|
+
origin_website: 'C3S',
|
|
45
|
+
},
|
|
46
|
+
'ecde_indicators',
|
|
47
|
+
);
|
|
48
|
+
dispatch(action);
|
|
49
|
+
}, [dispatch]);
|
|
50
|
+
|
|
51
|
+
const indicators = useSelector(
|
|
52
|
+
(state) => state.search.subrequests.ecde_indicators?.items || [],
|
|
53
|
+
);
|
|
54
|
+
// console.log('indicators', indicators);
|
|
55
|
+
|
|
56
|
+
return indicators;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export default function ECDEIndicatorsView(props) {
|
|
60
|
+
const [selectedIndicator, setSelectedIndicator] = React.useState();
|
|
61
|
+
const [selectedRegion, setSelectedRegion] = React.useState();
|
|
62
|
+
|
|
63
|
+
const regions = useRegions();
|
|
64
|
+
const indicators = useIndicators();
|
|
65
|
+
|
|
66
|
+
// console.log(regions);
|
|
67
|
+
return (
|
|
68
|
+
<div>
|
|
69
|
+
<Grid columns="12">
|
|
70
|
+
<Grid.Column mobile={12} tablet={12} computer={2} className="col-left">
|
|
71
|
+
<div className="regions-selector">
|
|
72
|
+
<strong>Regions</strong>
|
|
73
|
+
<Dropdown
|
|
74
|
+
clearable
|
|
75
|
+
options={regions.map(([key, label]) => ({
|
|
76
|
+
key,
|
|
77
|
+
text: label,
|
|
78
|
+
value: key,
|
|
79
|
+
}))}
|
|
80
|
+
selection
|
|
81
|
+
onChange={(e, { value }) => setSelectedRegion(value)}
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
<div className="indicators-selector">
|
|
85
|
+
<strong>Indicators</strong>
|
|
86
|
+
<Dropdown
|
|
87
|
+
clearable
|
|
88
|
+
options={indicators.map((indic) => ({
|
|
89
|
+
key: indic['@id'],
|
|
90
|
+
text: indic.title,
|
|
91
|
+
value: indic['@id'],
|
|
92
|
+
}))}
|
|
93
|
+
selection
|
|
94
|
+
onChange={(e, { value }) => {
|
|
95
|
+
setSelectedIndicator(value);
|
|
96
|
+
setSelectedRegion(
|
|
97
|
+
indicators.filter((item) => item['@id'] === value)[0]?.title,
|
|
98
|
+
);
|
|
99
|
+
}}
|
|
100
|
+
/>
|
|
101
|
+
</div>
|
|
102
|
+
</Grid.Column>
|
|
103
|
+
<Grid.Column
|
|
104
|
+
mobile={12}
|
|
105
|
+
tablet={12}
|
|
106
|
+
computer={10}
|
|
107
|
+
className="col-right"
|
|
108
|
+
>
|
|
109
|
+
{selectedIndicator ? (
|
|
110
|
+
<ECDEIndicator
|
|
111
|
+
indicatorUrl={selectedIndicator}
|
|
112
|
+
selectedRegion={selectedRegion}
|
|
113
|
+
/>
|
|
114
|
+
) : null}
|
|
115
|
+
</Grid.Column>
|
|
116
|
+
</Grid>
|
|
117
|
+
</div>
|
|
118
|
+
);
|
|
119
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<title>CDS integration test</title>
|
|
6
|
+
<meta charset="utf-8" />
|
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
8
|
+
<script type="text/javascript">
|
|
9
|
+
window.cds_toolbox = { cds_public_path: 'https://cds.climate.copernicus.eu/toolbox/' };
|
|
10
|
+
</script>
|
|
11
|
+
<script type="text/javascript" src="https://cds.climate.copernicus.eu/toolbox/toolbox-latest.js"></script>
|
|
12
|
+
<script src="https://code.jquery.com/jquery-3.6.3.min.js"
|
|
13
|
+
integrity="sha256-pvPw+upLPUjgMXY0G+8O0xUf+/Im1MZjXxxgOcBQBXU=" crossorigin="anonymous"></script>
|
|
14
|
+
|
|
15
|
+
<body>
|
|
16
|
+
|
|
17
|
+
<h1>Hello world</h1>
|
|
18
|
+
|
|
19
|
+
<select id="app-selection">
|
|
20
|
+
<option selected value="ecde-app-growing-degree-days">ECDE growing degree days</option>
|
|
21
|
+
<option value="ecde-app-mean-temperature">ECDE Mean Temperature</option>
|
|
22
|
+
</select>
|
|
23
|
+
|
|
24
|
+
<div class="t-ct">
|
|
25
|
+
<div id="toolbox-app">
|
|
26
|
+
<div class="pre-app-loading">
|
|
27
|
+
<img src="/toolbox/assets/spinner.svg" alt="Loading">
|
|
28
|
+
<div>
|
|
29
|
+
...loading configuration...
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
(function () {
|
|
37
|
+
const ID = 'toolbox-app';
|
|
38
|
+
$(document).ready(() => {
|
|
39
|
+
window.cds_toolbox.runApp(ID, 'https://cds.climate.copernicus.eu/workflows/c3s/ecde-app-growing-degree-days/master/configuration.json', {
|
|
40
|
+
workflowParams: {
|
|
41
|
+
default: 'Bayern'
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const defaults = {
|
|
46
|
+
'ecde-app-growing-degree-days': 'Bayern',
|
|
47
|
+
'ecde-app-mean-temperature': 'Occitanie'
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
let selectedApp = 'ecde-app-growing-degree-days';
|
|
51
|
+
const $appSelector = $('#app-selection');
|
|
52
|
+
|
|
53
|
+
$appSelector.on('change', () => {
|
|
54
|
+
const value = $appSelector.val();
|
|
55
|
+
if (value !== selectedApp) {
|
|
56
|
+
selectedApp = value;
|
|
57
|
+
window.cds_toolbox[ID].app_instance.destroy();
|
|
58
|
+
window.cds_toolbox.runApp(ID, `https://cds.climate.copernicus.eu/workflows/c3s/${selectedApp}/master/configuration.json`, {
|
|
59
|
+
workflowParams: {
|
|
60
|
+
default: defaults[selectedApp]
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
})();
|
|
67
|
+
|
|
68
|
+
</script>
|
|
69
|
+
|
|
70
|
+
</body>
|
|
71
|
+
|
|
72
|
+
</html>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import worldSVG from '@plone/volto/icons/world.svg';
|
|
2
|
+
import ECDEIndicatorsEdit from './ECDEIndicatorsEdit';
|
|
3
|
+
import ECDEIndicatorsView from './ECDEIndicatorsView';
|
|
4
|
+
|
|
5
|
+
export default function installECDEIndicatorsBlock(config) {
|
|
6
|
+
config.blocks.blocksConfig.ecdeIndicators = {
|
|
7
|
+
id: 'ecdeIndicators',
|
|
8
|
+
title: 'ECDE Indicators',
|
|
9
|
+
icon: worldSVG,
|
|
10
|
+
group: 'common',
|
|
11
|
+
edit: ECDEIndicatorsEdit,
|
|
12
|
+
view: ECDEIndicatorsView,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return config;
|
|
16
|
+
}
|