@eeacms/volto-n2k 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/.coverage.babel.config.js +9 -0
  2. package/.release-it.json +17 -0
  3. package/CHANGELOG.md +155 -0
  4. package/DEVELOP.md +53 -0
  5. package/Jenkinsfile +209 -0
  6. package/LICENSE.md +9 -0
  7. package/README.md +62 -0
  8. package/bootstrap +41 -0
  9. package/cypress/fixtures/example.json +5 -0
  10. package/cypress/integration/block-basics.js +32 -0
  11. package/cypress/plugins/index.js +26 -0
  12. package/cypress/support/commands.js +315 -0
  13. package/cypress/support/index.js +53 -0
  14. package/cypress.json +12 -0
  15. package/jest-addon.config.js +36 -0
  16. package/package.json +57 -0
  17. package/src/actions.js +20 -0
  18. package/src/components/index.js +3 -0
  19. package/src/components/manage/Blocks/BodyClass/Edit.jsx +29 -0
  20. package/src/components/manage/Blocks/BodyClass/View.jsx +13 -0
  21. package/src/components/manage/Blocks/BodyClass/index.js +24 -0
  22. package/src/components/manage/Blocks/BodyClass/schema.js +19 -0
  23. package/src/components/manage/Blocks/BubbleChart/BubbleChart.jsx +101 -0
  24. package/src/components/manage/Blocks/BubbleChart/Chart.jsx +67 -0
  25. package/src/components/manage/Blocks/BubbleChart/ChartContext.jsx +3 -0
  26. package/src/components/manage/Blocks/BubbleChart/View.jsx +63 -0
  27. package/src/components/manage/Blocks/BubbleChart/index.js +17 -0
  28. package/src/components/manage/Blocks/BubbleChart/schema.js +124 -0
  29. package/src/components/manage/Blocks/BubbleChart/style.less +12 -0
  30. package/src/components/manage/Blocks/CarouselHorizontal/HorizontalView.jsx +221 -0
  31. package/src/components/manage/Blocks/CarouselHorizontal/index.js +19 -0
  32. package/src/components/manage/Blocks/CarouselHorizontal/schema.js +32 -0
  33. package/src/components/manage/Blocks/CddaShape/View.jsx +109 -0
  34. package/src/components/manage/Blocks/CddaShape/index.js +23 -0
  35. package/src/components/manage/Blocks/CddaShape/schema.js +19 -0
  36. package/src/components/manage/Blocks/CddaShape/style.less +14 -0
  37. package/src/components/manage/Blocks/ContactBlock/View.jsx +56 -0
  38. package/src/components/manage/Blocks/ContactBlock/icons/domain.svg +1 -0
  39. package/src/components/manage/Blocks/ContactBlock/icons/email.svg +1 -0
  40. package/src/components/manage/Blocks/ContactBlock/icons/location.svg +1 -0
  41. package/src/components/manage/Blocks/ContactBlock/index.js +17 -0
  42. package/src/components/manage/Blocks/ContactBlock/schema.js +57 -0
  43. package/src/components/manage/Blocks/ContactBlock/styles.less +31 -0
  44. package/src/components/manage/Blocks/ExplodedPiesChart/Pie.jsx +125 -0
  45. package/src/components/manage/Blocks/ExplodedPiesChart/View.jsx +80 -0
  46. package/src/components/manage/Blocks/ExplodedPiesChart/index.js +17 -0
  47. package/src/components/manage/Blocks/ExplodedPiesChart/schema.js +75 -0
  48. package/src/components/manage/Blocks/ExplodedPiesChart/style.less +80 -0
  49. package/src/components/manage/Blocks/ExploreHabitats/Edit.jsx +29 -0
  50. package/src/components/manage/Blocks/ExploreHabitats/View.jsx +177 -0
  51. package/src/components/manage/Blocks/ExploreHabitats/index.js +24 -0
  52. package/src/components/manage/Blocks/ExploreHabitats/schema.js +15 -0
  53. package/src/components/manage/Blocks/ExploreHabitats/style.less +15 -0
  54. package/src/components/manage/Blocks/ExploreSites/Edit.jsx +29 -0
  55. package/src/components/manage/Blocks/ExploreSites/View.jsx +175 -0
  56. package/src/components/manage/Blocks/ExploreSites/index.js +24 -0
  57. package/src/components/manage/Blocks/ExploreSites/schema.js +15 -0
  58. package/src/components/manage/Blocks/ExploreSites/style.less +15 -0
  59. package/src/components/manage/Blocks/ExploreSpecies/Edit.jsx +29 -0
  60. package/src/components/manage/Blocks/ExploreSpecies/View.jsx +177 -0
  61. package/src/components/manage/Blocks/ExploreSpecies/index.js +24 -0
  62. package/src/components/manage/Blocks/ExploreSpecies/schema.js +15 -0
  63. package/src/components/manage/Blocks/ExploreSpecies/style.less +15 -0
  64. package/src/components/manage/Blocks/HabitatClassification/View.jsx +30 -0
  65. package/src/components/manage/Blocks/HabitatClassification/index.js +17 -0
  66. package/src/components/manage/Blocks/HabitatClassification/schema.js +19 -0
  67. package/src/components/manage/Blocks/HabitatClassification/style.less +3 -0
  68. package/src/components/manage/Blocks/HabitatDistribution/View.jsx +97 -0
  69. package/src/components/manage/Blocks/HabitatDistribution/index.js +23 -0
  70. package/src/components/manage/Blocks/HabitatDistribution/schema.js +19 -0
  71. package/src/components/manage/Blocks/HabitatDistribution/style.less +5 -0
  72. package/src/components/manage/Blocks/HabitatProtectedSites/View.jsx +97 -0
  73. package/src/components/manage/Blocks/HabitatProtectedSites/index.js +23 -0
  74. package/src/components/manage/Blocks/HabitatProtectedSites/schema.js +19 -0
  75. package/src/components/manage/Blocks/HabitatProtectedSites/style.less +5 -0
  76. package/src/components/manage/Blocks/HabitatsBanner/View.jsx +39 -0
  77. package/src/components/manage/Blocks/HabitatsBanner/index.js +17 -0
  78. package/src/components/manage/Blocks/HabitatsBanner/schema.js +19 -0
  79. package/src/components/manage/Blocks/HabitatsBanner/style.less +49 -0
  80. package/src/components/manage/Blocks/ImageText/Edit.jsx +98 -0
  81. package/src/components/manage/Blocks/ImageText/View.jsx +66 -0
  82. package/src/components/manage/Blocks/ImageText/index.js +24 -0
  83. package/src/components/manage/Blocks/ImageText/schema.js +69 -0
  84. package/src/components/manage/Blocks/ImageText/styles.less +87 -0
  85. package/src/components/manage/Blocks/Landing/DefalutView.jsx +83 -0
  86. package/src/components/manage/Blocks/Landing/Edit.jsx +219 -0
  87. package/src/components/manage/Blocks/Landing/EditBlockWrapper.jsx +161 -0
  88. package/src/components/manage/Blocks/Landing/View.jsx +65 -0
  89. package/src/components/manage/Blocks/Landing/images/background.webp +0 -0
  90. package/src/components/manage/Blocks/Landing/images/coasts_and_seas.webp +0 -0
  91. package/src/components/manage/Blocks/Landing/images/forests.webp +0 -0
  92. package/src/components/manage/Blocks/Landing/images/grasslands.webp +0 -0
  93. package/src/components/manage/Blocks/Landing/images/hiker.webp +0 -0
  94. package/src/components/manage/Blocks/Landing/images/islands.webp +0 -0
  95. package/src/components/manage/Blocks/Landing/images/mountains.webp +0 -0
  96. package/src/components/manage/Blocks/Landing/images/natura2000.webp +0 -0
  97. package/src/components/manage/Blocks/Landing/images/natura2000_square.webp +0 -0
  98. package/src/components/manage/Blocks/Landing/images/peatlands.webp +0 -0
  99. package/src/components/manage/Blocks/Landing/images/people_and_nature.webp +0 -0
  100. package/src/components/manage/Blocks/Landing/images/rivers.webp +0 -0
  101. package/src/components/manage/Blocks/Landing/index.js +104 -0
  102. package/src/components/manage/Blocks/Landing/schema.js +62 -0
  103. package/src/components/manage/Blocks/Landing/style.less +174 -0
  104. package/src/components/manage/Blocks/List/View.jsx +37 -0
  105. package/src/components/manage/Blocks/List/index.js +17 -0
  106. package/src/components/manage/Blocks/List/schema.js +49 -0
  107. package/src/components/manage/Blocks/List/style.less +12 -0
  108. package/src/components/manage/Blocks/NavigationAnchors/Edit.jsx +33 -0
  109. package/src/components/manage/Blocks/NavigationAnchors/View.jsx +132 -0
  110. package/src/components/manage/Blocks/NavigationAnchors/assets/external.png +0 -0
  111. package/src/components/manage/Blocks/NavigationAnchors/index.js +23 -0
  112. package/src/components/manage/Blocks/NavigationAnchors/schema.js +76 -0
  113. package/src/components/manage/Blocks/NavigationAnchors/styles.less +104 -0
  114. package/src/components/manage/Blocks/SimpleDataTable/index.js +16 -0
  115. package/src/components/manage/Blocks/SimpleDataTable/templates/colored/View.jsx +178 -0
  116. package/src/components/manage/Blocks/SimpleDataTable/templates/colored/index.js +4 -0
  117. package/src/components/manage/Blocks/SimpleDataTable/templates/colored/schema.js +56 -0
  118. package/src/components/manage/Blocks/SimpleDataTable/templates/colored/style.less +54 -0
  119. package/src/components/manage/Blocks/SiteBanner/View.jsx +148 -0
  120. package/src/components/manage/Blocks/SiteBanner/index.js +17 -0
  121. package/src/components/manage/Blocks/SiteBanner/schema.js +19 -0
  122. package/src/components/manage/Blocks/SiteBanner/style.less +106 -0
  123. package/src/components/manage/Blocks/SiteHabitatsList/View.jsx +89 -0
  124. package/src/components/manage/Blocks/SiteHabitatsList/index.js +17 -0
  125. package/src/components/manage/Blocks/SiteHabitatsList/schema.js +19 -0
  126. package/src/components/manage/Blocks/SiteHabitatsList/style.less +70 -0
  127. package/src/components/manage/Blocks/SiteProtectedHabitats/View.jsx +47 -0
  128. package/src/components/manage/Blocks/SiteProtectedHabitats/images/background.webp +0 -0
  129. package/src/components/manage/Blocks/SiteProtectedHabitats/index.js +17 -0
  130. package/src/components/manage/Blocks/SiteProtectedHabitats/schema.js +19 -0
  131. package/src/components/manage/Blocks/SiteProtectedHabitats/style.less +90 -0
  132. package/src/components/manage/Blocks/SiteProtectedSpecies/View.jsx +55 -0
  133. package/src/components/manage/Blocks/SiteProtectedSpecies/images/background.webp +0 -0
  134. package/src/components/manage/Blocks/SiteProtectedSpecies/index.js +17 -0
  135. package/src/components/manage/Blocks/SiteProtectedSpecies/schema.js +19 -0
  136. package/src/components/manage/Blocks/SiteProtectedSpecies/style.less +90 -0
  137. package/src/components/manage/Blocks/SiteShape/View.jsx +107 -0
  138. package/src/components/manage/Blocks/SiteShape/index.js +23 -0
  139. package/src/components/manage/Blocks/SiteShape/schema.js +19 -0
  140. package/src/components/manage/Blocks/SiteShape/style.less +15 -0
  141. package/src/components/manage/Blocks/SiteSpeciesList/Filters/SortBy.jsx +52 -0
  142. package/src/components/manage/Blocks/SiteSpeciesList/Filters/SpeciesGroups.jsx +43 -0
  143. package/src/components/manage/Blocks/SiteSpeciesList/Filters/View.jsx +200 -0
  144. package/src/components/manage/Blocks/SiteSpeciesList/Filters/index.js +4 -0
  145. package/src/components/manage/Blocks/SiteSpeciesList/View.jsx +253 -0
  146. package/src/components/manage/Blocks/SiteSpeciesList/index.js +17 -0
  147. package/src/components/manage/Blocks/SiteSpeciesList/schema.js +19 -0
  148. package/src/components/manage/Blocks/SiteSpeciesList/style.less +264 -0
  149. package/src/components/manage/Blocks/SiteSpeciesList/utils.js +33 -0
  150. package/src/components/manage/Blocks/SlateLink/render.jsx +77 -0
  151. package/src/components/manage/Blocks/SlateLink/styles.less +22 -0
  152. package/src/components/manage/Blocks/SlateSVG/constants.js +1 -0
  153. package/src/components/manage/Blocks/SlateSVG/extensions.js +11 -0
  154. package/src/components/manage/Blocks/SlateSVG/index.js +47 -0
  155. package/src/components/manage/Blocks/SlateSVG/render.jsx +42 -0
  156. package/src/components/manage/Blocks/SlateSVG/schema.js +12 -0
  157. package/src/components/manage/Blocks/SlateSVG/styles.less +6 -0
  158. package/src/components/manage/Blocks/SpeciesBanner/View.jsx +109 -0
  159. package/src/components/manage/Blocks/SpeciesBanner/index.js +17 -0
  160. package/src/components/manage/Blocks/SpeciesBanner/schema.js +19 -0
  161. package/src/components/manage/Blocks/SpeciesBanner/style.less +115 -0
  162. package/src/components/manage/Blocks/SpeciesClassification/View.jsx +19 -0
  163. package/src/components/manage/Blocks/SpeciesClassification/index.js +17 -0
  164. package/src/components/manage/Blocks/SpeciesClassification/schema.js +19 -0
  165. package/src/components/manage/Blocks/SpeciesClassification/style.less +3 -0
  166. package/src/components/manage/Blocks/SpeciesDistribution/View.jsx +97 -0
  167. package/src/components/manage/Blocks/SpeciesDistribution/index.js +23 -0
  168. package/src/components/manage/Blocks/SpeciesDistribution/schema.js +19 -0
  169. package/src/components/manage/Blocks/SpeciesDistribution/style.less +5 -0
  170. package/src/components/manage/Blocks/SpeciesProtectedSites/View.jsx +97 -0
  171. package/src/components/manage/Blocks/SpeciesProtectedSites/index.js +23 -0
  172. package/src/components/manage/Blocks/SpeciesProtectedSites/schema.js +19 -0
  173. package/src/components/manage/Blocks/SpeciesProtectedSites/style.less +5 -0
  174. package/src/components/manage/Blocks/StackedBarChart/Chart.jsx +127 -0
  175. package/src/components/manage/Blocks/StackedBarChart/ChartContext.jsx +3 -0
  176. package/src/components/manage/Blocks/StackedBarChart/StackedBars.jsx +116 -0
  177. package/src/components/manage/Blocks/StackedBarChart/View.jsx +64 -0
  178. package/src/components/manage/Blocks/StackedBarChart/index.js +17 -0
  179. package/src/components/manage/Blocks/StackedBarChart/schema.js +25 -0
  180. package/src/components/manage/Blocks/StackedBarChart/style.less +37 -0
  181. package/src/components/manage/Blocks/TilesImages/Edit.jsx +32 -0
  182. package/src/components/manage/Blocks/TilesImages/View.jsx +37 -0
  183. package/src/components/manage/Blocks/TilesImages/index.js +23 -0
  184. package/src/components/manage/Blocks/TilesImages/schema.js +72 -0
  185. package/src/components/manage/Blocks/TilesImages/styles.less +57 -0
  186. package/src/components/theme/AppExtras/CopyPaste/CopyPaste.jsx +176 -0
  187. package/src/components/theme/AppExtras/CopyPaste/index.js +3 -0
  188. package/src/components/theme/AppExtras/CopyPaste/style.less +18 -0
  189. package/src/components/theme/AppExtras/MultilingualRedirector/MultilingualRedirector.jsx +35 -0
  190. package/src/components/theme/AppExtras/index.js +13 -0
  191. package/src/components/theme/Footer/Footer.jsx +209 -0
  192. package/src/components/theme/Header/Header.jsx +81 -0
  193. package/src/components/theme/LanguageSelector/LanguageSelector.jsx +79 -0
  194. package/src/components/theme/LanguageSelector/styles.less +44 -0
  195. package/src/components/theme/Navigation/Navigation.jsx +453 -0
  196. package/src/components/theme/Sitemap/Sitemap.jsx +152 -0
  197. package/src/fonts/OpenSans-Bold.ttf +0 -0
  198. package/src/fonts/OpenSans-Regular.ttf +0 -0
  199. package/src/fonts/OpenSans-Semibold.ttf +0 -0
  200. package/src/fonts/Rajdhani-Bold.ttf +0 -0
  201. package/src/fonts/Rajdhani-Regular.ttf +0 -0
  202. package/src/grid.js +78 -0
  203. package/src/helpers.js +148 -0
  204. package/src/hocs/index.js +6 -0
  205. package/src/hocs/useResizeObserver.jsx +26 -0
  206. package/src/hocs/withLocalStorage.jsx +37 -0
  207. package/src/hocs/withScreenSize.jsx +43 -0
  208. package/src/icons/home.svg +12 -0
  209. package/src/icons/info.svg +5 -0
  210. package/src/icons/n2k-logo-transparent.png +0 -0
  211. package/src/icons/n2k-logo.png +0 -0
  212. package/src/icons/natura2000.svg +142 -0
  213. package/src/icons/placeholders/Algae.png +0 -0
  214. package/src/icons/placeholders/Amphibians.png +0 -0
  215. package/src/icons/placeholders/Birds.png +0 -0
  216. package/src/icons/placeholders/Conifers.png +0 -0
  217. package/src/icons/placeholders/Fishes.png +0 -0
  218. package/src/icons/placeholders/Fungi.png +0 -0
  219. package/src/icons/placeholders/Mammals.png +0 -0
  220. package/src/icons/placeholders/Plants.png +0 -0
  221. package/src/icons/placeholders/Reptiles.png +0 -0
  222. package/src/icons/placeholders/default.png +0 -0
  223. package/src/index.js +163 -0
  224. package/src/less/globals.less +3 -0
  225. package/src/less/styles.less +691 -0
  226. package/src/less/variables.less +2 -0
  227. package/src/static/cca.svg +61 -0
  228. package/src/static/ec.png +0 -0
  229. package/src/static/eea.png +0 -0
  230. package/src/static/eu.jpg +0 -0
  231. package/src/static/forest.svg +100 -0
  232. package/src/static/wise.png +0 -0
  233. package/src/store.js +24 -0
@@ -0,0 +1,9 @@
1
+ const defaultBabel = require('@plone/volto/babel');
2
+
3
+ function applyDefault(api) {
4
+ const voltoBabel = defaultBabel(api);
5
+ voltoBabel.plugins.push('@babel/plugin-transform-modules-commonjs', 'transform-class-properties', 'istanbul');
6
+ return voltoBabel;
7
+ }
8
+
9
+ module.exports = applyDefault;
@@ -0,0 +1,17 @@
1
+ {
2
+ "npm": {
3
+ "publish": false
4
+ },
5
+ "git": {
6
+ "changelog": "npx auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs",
7
+ "tagName": "${version}"
8
+ },
9
+ "github": {
10
+ "release": true,
11
+ "releaseName": "${version}",
12
+ "releaseNotes": "npx auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs"
13
+ },
14
+ "hooks": {
15
+ "after:bump": "npx auto-changelog --commit-limit false -p"
16
+ }
17
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,155 @@
1
+ ### Changelog
2
+
3
+ All notable changes to this project will be documented in this file. Dates are displayed in UTC.
4
+
5
+ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
+
7
+ #### [0.1.1](https://github.com/eea/volto-n2k/compare/0.1.0...0.1.1)
8
+
9
+ - Update [`0ef14ec`](https://github.com/eea/volto-n2k/commit/0ef14ec745d6642f3c45f7f5b4138e210329e60c)
10
+ - Bumped versions; [`94e98ab`](https://github.com/eea/volto-n2k/commit/94e98ab1c21b7b25b5383d62398ed01a02c5cbc9)
11
+ - Update [`854a980`](https://github.com/eea/volto-n2k/commit/854a98070c034c402c85bf35eaa4e881fd8d6e9b)
12
+ - Update [`69daa40`](https://github.com/eea/volto-n2k/commit/69daa4081f6fe4f2619ef15ab36b2c0fa3c6b80b)
13
+ - add special css classes for background color [`c18254f`](https://github.com/eea/volto-n2k/commit/c18254ff771444d5357d0502703fe2462faf9d3f)
14
+ - Refs#135632 - Update labels [`7153d82`](https://github.com/eea/volto-n2k/commit/7153d82950cebdbfb2c9b59e382781864cd874e5)
15
+ - Update [`390228e`](https://github.com/eea/volto-n2k/commit/390228e918e8447ab8d937ea7ce69859ea9143dc)
16
+ - Update [`ed2d0a3`](https://github.com/eea/volto-n2k/commit/ed2d0a34b935c5fe6f447bb8e879ad1037ec5cd3)
17
+ - Update [`973efd1`](https://github.com/eea/volto-n2k/commit/973efd11944579182bb988f4e0952a86fe64eb63)
18
+ - add info notice [`205e848`](https://github.com/eea/volto-n2k/commit/205e84836e65bab95f6255f0e9c75a2ccef75aba)
19
+ - update layers [`1a27989`](https://github.com/eea/volto-n2k/commit/1a2798945d9646fe0c3a01d6f760ae79e679c436)
20
+ - Update [`857ef92`](https://github.com/eea/volto-n2k/commit/857ef923aed09d4b51811651ad56f2c657b89888)
21
+ - add explore species map + small updates on other explore blockes [`a014c0c`](https://github.com/eea/volto-n2k/commit/a014c0c3089fb54cc7dbcedffdbda3ef5c2acc10)
22
+ - add explore habitats map [`c078217`](https://github.com/eea/volto-n2k/commit/c07821796b197e48e787c304f4e291eb267be983)
23
+ - updates [`a205380`](https://github.com/eea/volto-n2k/commit/a2053804a9d0c214d37d28f1c8414a6fcedf6b11)
24
+ - remove comments [`0df2466`](https://github.com/eea/volto-n2k/commit/0df24662107c3160c63bc0c2efbbb4f4c137ad32)
25
+ - show active page results on map [`562137c`](https://github.com/eea/volto-n2k/commit/562137cc760b7fef1033cfb841049391e58d2135)
26
+ - comment debug message [`b7eef69`](https://github.com/eea/volto-n2k/commit/b7eef69f835ff4e0e9b31cf5e606168030ab2fd8)
27
+ - update map - explore sites [`2f8bb11`](https://github.com/eea/volto-n2k/commit/2f8bb11f3297b57c36c5cae3e8db24099b57fa88)
28
+ - demo block explore sites [`581f6a4`](https://github.com/eea/volto-n2k/commit/581f6a448b271f27dafd674997ea4f4ca36cc2a2)
29
+ - Update [`436da76`](https://github.com/eea/volto-n2k/commit/436da76e02085a1b15764bc6ece1a7c9c31d2676)
30
+ - Update [`42ab50e`](https://github.com/eea/volto-n2k/commit/42ab50e6681a47251d15ac06b836c6f8c27157fa)
31
+ - Added bubble chart [`89fba5e`](https://github.com/eea/volto-n2k/commit/89fba5e5db41aa955ba2d0ed58c9f0042c461504)
32
+ - Group species by id_eunis in species list [`543c957`](https://github.com/eea/volto-n2k/commit/543c9573b53acd8eecc9afbb6ae7beeddba53966)
33
+ - update maps - species and habitats distribution maps [`ad12eb1`](https://github.com/eea/volto-n2k/commit/ad12eb141907d6f28444f1eafc3f687735d2a68d)
34
+ - update format for common name and author [`26b7a2f`](https://github.com/eea/volto-n2k/commit/26b7a2f3d20c7701b57fb24f39fc7dfeceec3ce8)
35
+ - update format for species name (common / scientific) [`abdedcf`](https://github.com/eea/volto-n2k/commit/abdedcfe645665031dedf050fd2c5cdde8c14a50)
36
+ - Update [`83f26c9`](https://github.com/eea/volto-n2k/commit/83f26c91657ee8d272be6cd98e9e63aa4d192582)
37
+ - Default placeholder image for species slider [`6292aaa`](https://github.com/eea/volto-n2k/commit/6292aaa29d5c71c528e85b0bd1d4f2cb36d5986f)
38
+ - Added species pictures carousel [`98cdc00`](https://github.com/eea/volto-n2k/commit/98cdc00b90376b79426e73dc3a6e742197b5ef3d)
39
+ - Update [`8cea2bd`](https://github.com/eea/volto-n2k/commit/8cea2bdc228899bfef86af28fd9cc71fb01f728c)
40
+ - Update [`db02f21`](https://github.com/eea/volto-n2k/commit/db02f212a321c92e7e34668fed293b2dfdc0004f)
41
+ - Update [`0d4b031`](https://github.com/eea/volto-n2k/commit/0d4b0310b55ff3196512d5a4eb0142fed41f9c84)
42
+ - Added StackedBarChart + small patch [`1b1e989`](https://github.com/eea/volto-n2k/commit/1b1e98904c5cd4b44a3f2095192adfb7572fa91e)
43
+ - update label [`43d8b86`](https://github.com/eea/volto-n2k/commit/43d8b865356c1c0ed906c3693db26cf8bb83f9d0)
44
+ - Update [`3c4b0e1`](https://github.com/eea/volto-n2k/commit/3c4b0e18adfc7b4058191d762d8ace2f2f976ed6)
45
+ - Update [`18de4c4`](https://github.com/eea/volto-n2k/commit/18de4c482fbc2bba6333a51e3aa4b84c84929bc9)
46
+ - Update [`3dc8bed`](https://github.com/eea/volto-n2k/commit/3dc8bed126509f019299f396acecd8cab79059f3)
47
+ - update placeholders [`0f826ea`](https://github.com/eea/volto-n2k/commit/0f826eabc368bfd937359a9bc50605bbea1c28cc)
48
+ - update placeholders [`936b2f2`](https://github.com/eea/volto-n2k/commit/936b2f2f7f43cdc3fcb9f338c6a9b0541495712c)
49
+ - Prettier [`aac9f75`](https://github.com/eea/volto-n2k/commit/aac9f750e922df684efbf8fe6cc1083e6366caef)
50
+ - Update [`647ce80`](https://github.com/eea/volto-n2k/commit/647ce8085c477e28464a25e75759acb032584299)
51
+ - add notice to maps [`3c66542`](https://github.com/eea/volto-n2k/commit/3c665422470ddf2be5229246660e3e4bf61d667c)
52
+ - updates on landing page and styles [`e068d26`](https://github.com/eea/volto-n2k/commit/e068d26f20e373fa64881340c139b36fc060f1b1)
53
+ - update text on landing page - natura 2000 section [`b70a919`](https://github.com/eea/volto-n2k/commit/b70a91959bdcd2613cfb5399a7b96d80a6b1ee6f)
54
+ - Update [`2e5cc42`](https://github.com/eea/volto-n2k/commit/2e5cc427e29411200da16d6c85840755090326d5)
55
+ - update background image again [`9c1982e`](https://github.com/eea/volto-n2k/commit/9c1982e2b672a41a84c4c126fdbfb0e3b69bc5f5)
56
+ - Update [`b5b5059`](https://github.com/eea/volto-n2k/commit/b5b5059112f43f484d920a62e9a574bdfa6e16b7)
57
+ - 2 decimals in ha, and 4 in km² [`4b3d28e`](https://github.com/eea/volto-n2k/commit/4b3d28ed68f16f70599e4bf8b7a387ec142ab0ba)
58
+ - update image [`8b86991`](https://github.com/eea/volto-n2k/commit/8b86991441df717c2b7baa2190273d24648bb3fe)
59
+ - update scientific name format [`4ec0397`](https://github.com/eea/volto-n2k/commit/4ec03978d0991764e666e8030715cbfdcf6dc6af)
60
+ - fit to extent [`92b01e7`](https://github.com/eea/volto-n2k/commit/92b01e74e2fd9217577fb54da337deaaa2c4e6d7)
61
+ - Update [`9f13c7c`](https://github.com/eea/volto-n2k/commit/9f13c7c324c7188e480cd49e2158624b2d1e500d)
62
+ - Update [`3620eb4`](https://github.com/eea/volto-n2k/commit/3620eb4608634ea8698dcd9f643bfbe7909166d1)
63
+ - Lint & prettier [`2a558b8`](https://github.com/eea/volto-n2k/commit/2a558b85c586420853e8ff0d7549e6184136fb16)
64
+ - Updated dependencies [`6e6dc60`](https://github.com/eea/volto-n2k/commit/6e6dc60a288e56a66321760472c258725dcea476)
65
+ - Update [`5b42a41`](https://github.com/eea/volto-n2k/commit/5b42a41efcf5496885fb701d4c5e2e6511ab8bc9)
66
+ - Commented tests for now... [`7f6dbe9`](https://github.com/eea/volto-n2k/commit/7f6dbe9b7d8204d9b0e08bf5194e4c68eb6408e0)
67
+ - Updated dependencies [`1dc367f`](https://github.com/eea/volto-n2k/commit/1dc367f8ca01df2c29939b71509764b0f6084ded)
68
+ - update height for iframe (embeded maps) [`5563e6f`](https://github.com/eea/volto-n2k/commit/5563e6fd5df4c201909dd7af90cf6d06eab0a97b)
69
+ - add common name in species list - sdf [`a2bbb1b`](https://github.com/eea/volto-n2k/commit/a2bbb1b6586c1efb5f7f73e0269f6f96e1250806)
70
+ - Add jest configuration [`0ae3e0c`](https://github.com/eea/volto-n2k/commit/0ae3e0cd4926cf2e8cad672a24109dd5428473aa)
71
+ - Cypress coverage [`467099d`](https://github.com/eea/volto-n2k/commit/467099d11c4bf9e6882049e0ac356314debc0cd1)
72
+
73
+ #### 0.1.0
74
+
75
+ > 31 May 2021
76
+
77
+ - Run bootstrap script [`#1`](https://github.com/eea/volto-n2k/pull/1)
78
+ - webp images [`8de2bcc`](https://github.com/eea/volto-n2k/commit/8de2bccd0359dac8f216ae7a67b751f119132ac4)
79
+ - Update [`3a0de95`](https://github.com/eea/volto-n2k/commit/3a0de95d8fe266593045c6619ca08b8d239a2e53)
80
+ - add distribution map and protected sites map for habitats [`60d7f9b`](https://github.com/eea/volto-n2k/commit/60d7f9b66703ca11bf97515a718adc14a962817b)
81
+ - add zoom and pan for species distribution map [`1257d48`](https://github.com/eea/volto-n2k/commit/1257d48df0287bea8779a0968a51193d373f73d2)
82
+ - add species protected sites map [`f324592`](https://github.com/eea/volto-n2k/commit/f324592c0914b41aa4dea03c39c4b39707d193df)
83
+ - filter species with no site code assigned [`2edd440`](https://github.com/eea/volto-n2k/commit/2edd440edb1bfe88c29c136fff32ffd07b65f846)
84
+ - filter features with NaN coords [`24493ab`](https://github.com/eea/volto-n2k/commit/24493abd4421bcc27b3585a652a9bb0e84913fae)
85
+ - New components [`df0613f`](https://github.com/eea/volto-n2k/commit/df0613f891585a7e69018e25463b0482901abf06)
86
+ - Update [`71c3855`](https://github.com/eea/volto-n2k/commit/71c3855212bb6a0234e4204e89282336b64c2335)
87
+ - add species distribution map [`585d42d`](https://github.com/eea/volto-n2k/commit/585d42d28359bd6dc900a44690084e8c16e6348c)
88
+ - Update [`41846a3`](https://github.com/eea/volto-n2k/commit/41846a3bd288cd57992a5512146298fa61739c57)
89
+ - update text first slide [`2cd67ea`](https://github.com/eea/volto-n2k/commit/2cd67eaeba43547615235ebcd67b0b113623acfe)
90
+ - add map block for cdda shape [`a93075c`](https://github.com/eea/volto-n2k/commit/a93075c966b88487c1f039d8f872777cf37fddd2)
91
+ - update pages order on landing page [`4d5a628`](https://github.com/eea/volto-n2k/commit/4d5a6282ce80a97088b3061bd55cb35db0cacdc2)
92
+ - Updated SiteShape [`51646c7`](https://github.com/eea/volto-n2k/commit/51646c759c7ac8e8f96dc3bf1505f0a0c43513a5)
93
+ - Prettier [`c979304`](https://github.com/eea/volto-n2k/commit/c979304e9d4a09632ef5c7ce63f2cf2469caf861)
94
+ - Added SiteShape with openlayers [`7ac30ba`](https://github.com/eea/volto-n2k/commit/7ac30baa4e15c86e0f528eac76d5642e5ce92398)
95
+ - add iucn info for species [`1d691c0`](https://github.com/eea/volto-n2k/commit/1d691c0a6a0b3eb45010a8c78eaa689329f172da)
96
+ - Site shape as image [`30cbf79`](https://github.com/eea/volto-n2k/commit/30cbf795a2c6b7f04c6d7b1c91a2bfbe93454c21)
97
+ - new block for site shape [`7981df8`](https://github.com/eea/volto-n2k/commit/7981df88d3dd4f834ec67999ed08fb8ea9b747d7)
98
+ - Redirect to /natura2000 if page has no translation [`839074b`](https://github.com/eea/volto-n2k/commit/839074b560df1b4cbd0a1b867245a193d129a98f)
99
+ - I18N update [`63ffb5b`](https://github.com/eea/volto-n2k/commit/63ffb5bc12fd5b1500bb18d0c0930ec18b0fb273)
100
+ - withCookies hook [`c943d60`](https://github.com/eea/volto-n2k/commit/c943d603452ac234b6f5ea71c6318ee63bf7b003)
101
+ - Updated language selector [`b3b75df`](https://github.com/eea/volto-n2k/commit/b3b75df8f05cda647105d73b054e599bec2635ee)
102
+ - Language selector [`6b04f70`](https://github.com/eea/volto-n2k/commit/6b04f70d983a27955a98323a6e2b4af8b4ea0778)
103
+ - Update [`fe0b337`](https://github.com/eea/volto-n2k/commit/fe0b33731f958b6df9e65c1b6cb25ea8d139c3db)
104
+ - Fix height for iframe [`35a87f7`](https://github.com/eea/volto-n2k/commit/35a87f78a1fcdfba66c440255e08f97ad9e63a09)
105
+ - Update [`9a9c44e`](https://github.com/eea/volto-n2k/commit/9a9c44ec335f4d0dd7c79de5211d4b52d267cbf8)
106
+ - Added ContactBlock; Small fixes [`d2a06d4`](https://github.com/eea/volto-n2k/commit/d2a06d47f77fcf032ac7d801c083cb801b0396d1)
107
+ - Added filters for species list [`350b7dd`](https://github.com/eea/volto-n2k/commit/350b7ddf4293db34bd16843ee3ab22e021449a32)
108
+ - Lint & Prettier [`68f8061`](https://github.com/eea/volto-n2k/commit/68f80612d7fdd41262a432f71e2236842d11bc43)
109
+ - Added species list and habitats list [`542fee4`](https://github.com/eea/volto-n2k/commit/542fee45bea2dd8337acc0f76d2a196498d7951c)
110
+ - add extra fields for cdda [`91b2900`](https://github.com/eea/volto-n2k/commit/91b2900b15648d60470a0801eb8aaae05fe7de6c)
111
+ - CSS fix & responsiveness [`5a682cd`](https://github.com/eea/volto-n2k/commit/5a682cd62111f4f4785e5c845ddc05ccb9d03683)
112
+ - Fix home icon size on Firefox & css fix [`7a8fd7f`](https://github.com/eea/volto-n2k/commit/7a8fd7fe6612e1b75a6afdda4ac6896c40872cf4)
113
+ - [Feature #131618] Country gray background paragraph has padding [`edbaad7`](https://github.com/eea/volto-n2k/commit/edbaad7b87013275cd2990c8a3bc04d06ff9a30f)
114
+ - Prettier [`54d56db`](https://github.com/eea/volto-n2k/commit/54d56dbdad7663cdfc89f50bb1daf5c31e7b4632)
115
+ - Update [`52a3bcb`](https://github.com/eea/volto-n2k/commit/52a3bcbdefd926ef20fd6abfc9bb2de5de60dee6)
116
+ - Fix css after merge conflict [`f40c166`](https://github.com/eea/volto-n2k/commit/f40c1663baf52df9f1959988d783657b6396aac3)
117
+ - Prettier [`12e8714`](https://github.com/eea/volto-n2k/commit/12e871464096b551f0f4d6a2c226c0d17c62aca4)
118
+ - Added custom blocks [`07e42aa`](https://github.com/eea/volto-n2k/commit/07e42aabe2db684fa5b04bb29d98cfead8286920)
119
+ - Added navigation anchors [`4022ed4`](https://github.com/eea/volto-n2k/commit/4022ed42edace0c410df72d7827703f2206fbe2d)
120
+ - Improved exploded pies chart [`2658e90`](https://github.com/eea/volto-n2k/commit/2658e90b5196716af10fa571cf09235fa2257435)
121
+ - Lint & Prettier [`501bafa`](https://github.com/eea/volto-n2k/commit/501bafa299149aea4b63da30b59c0a484c838a93)
122
+ - Small patch [`dc958d8`](https://github.com/eea/volto-n2k/commit/dc958d8f61c963efdf5f6de6434787b5221ff0df)
123
+ - Fix warning on missing key [`9414881`](https://github.com/eea/volto-n2k/commit/94148814d1ba80c75f3483d47b36a017b87eb4e3)
124
+ - Refactor & styling [`60092e8`](https://github.com/eea/volto-n2k/commit/60092e8850185e7dc3eb4d2956f0c24fa0354bfb)
125
+ - Added font; styling improvements [`efdfb9d`](https://github.com/eea/volto-n2k/commit/efdfb9d859f27e0a42e928fd9775271e6bb7651a)
126
+ - Added protected species block type [`0f98963`](https://github.com/eea/volto-n2k/commit/0f98963e8769357811172ba197b9b2ada1d08e2b)
127
+ - Changed icons for landing page [`409de3b`](https://github.com/eea/volto-n2k/commit/409de3b9751b5f8fe913261ce54f1f308e258238)
128
+ - Added fonts; Small patch [`e0eff7b`](https://github.com/eea/volto-n2k/commit/e0eff7b29ae1a0f088a6f29b92cf2adb42164ebb)
129
+ - Work on SiteBanner [`d77a60c`](https://github.com/eea/volto-n2k/commit/d77a60ca72dada0f0c5397ff170d56b790e637e8)
130
+ - Added landing block for natura 2000 [`7f213ce`](https://github.com/eea/volto-n2k/commit/7f213cea3a0a6a21edc5507bdee0dcaa808811f3)
131
+ - Removed tabs-block dependency [`90ad7fc`](https://github.com/eea/volto-n2k/commit/90ad7fc67d311c45bc7288803cd3ad50185e5cbd)
132
+ - Update [`a956004`](https://github.com/eea/volto-n2k/commit/a9560049cb26ab8e65d1618bbd700dfdc1771022)
133
+ - Added site banner [`d64ef5f`](https://github.com/eea/volto-n2k/commit/d64ef5f45af719530a3c9b5c0b9c23c4dbe516c0)
134
+ - Updated carousel [`c8d758f`](https://github.com/eea/volto-n2k/commit/c8d758fc953ac5c8abf6fa25da3718d538c54286)
135
+ - Horizontal carousel with image [`d7028bf`](https://github.com/eea/volto-n2k/commit/d7028bfb5494af35ffe373f9fb860d79ced40139)
136
+ - Update [`66350f2`](https://github.com/eea/volto-n2k/commit/66350f250ec1d23783b1bfe5c301b95bc20cfcd1)
137
+ - Added variants for volto-columns-block [`ab505ec`](https://github.com/eea/volto-n2k/commit/ab505ecb2ee817a4c5b2d8108259ceca3dd4ef39)
138
+ - Added titles for buttons [`505920f`](https://github.com/eea/volto-n2k/commit/505920f7e9c20ffe6cdcb878d5404d98d12a48a8)
139
+ - Added copy/paste for the entire page [`82711b8`](https://github.com/eea/volto-n2k/commit/82711b8417a9a1b076f8829424d8f604d392d1aa)
140
+ - Style update [`72f84e6`](https://github.com/eea/volto-n2k/commit/72f84e69ca7bbe62e66a0f62f56118e93f73cc6f)
141
+ - Moved hashlink logic to volto-slate [`f8921b6`](https://github.com/eea/volto-n2k/commit/f8921b6e0ab0cbf39c9ea4e048370e5d432d38a3)
142
+ - Scroll to hash on mount [`8f1cfea`](https://github.com/eea/volto-n2k/commit/8f1cfeaa8d1686f02a6b65d2b74064e341f8139a)
143
+ - Update package.json [`3f9901b`](https://github.com/eea/volto-n2k/commit/3f9901b121a48746877aedf0773b0df0cdfebe80)
144
+ - Volto 12 compatibility; volto-datablocks dependency [`962c117`](https://github.com/eea/volto-n2k/commit/962c1173b9aa216787792d4d6816028faa9bb71c)
145
+ - Update [`8a55c42`](https://github.com/eea/volto-n2k/commit/8a55c42d3d66e03302c14784d980cb17fc119a74)
146
+ - Used d3 v3 [`621dfbf`](https://github.com/eea/volto-n2k/commit/621dfbf9ee430db02e9db1280f39a0d2a82836cf)
147
+ - Updated dependencies [`4871889`](https://github.com/eea/volto-n2k/commit/4871889d61bc2a607db8beeb65ac8d5b5ee7fe6d)
148
+ - Updated Pies chart [`2079d50`](https://github.com/eea/volto-n2k/commit/2079d504e2829b3ad852c66fc68a6f72e4674f7e)
149
+ - Exploded pie chart [`bd7f2be`](https://github.com/eea/volto-n2k/commit/bd7f2bed6fffcd0c1f07267edfdf2eda538770c4)
150
+ - Update Footer [`8c8b526`](https://github.com/eea/volto-n2k/commit/8c8b52672684106797eca51434f45e9e5b4f2fb2)
151
+ - Style update [`d95e0a6`](https://github.com/eea/volto-n2k/commit/d95e0a634050d162734cd8e96bf1506d72a604a4)
152
+ - Style update [`49b4e9d`](https://github.com/eea/volto-n2k/commit/49b4e9ddb47d7f4843053b760f04aed258add5eb)
153
+ - Updated Header and Navigation [`4621081`](https://github.com/eea/volto-n2k/commit/46210813e1380e5739203c8986b2dbdfb4163cd4)
154
+ - Header & Footer [`4a32479`](https://github.com/eea/volto-n2k/commit/4a3247940ef98975ab0cdfa3e2137034a356dd0f)
155
+ - Initial commit [`c7b0f5c`](https://github.com/eea/volto-n2k/commit/c7b0f5c242b80ca7549b67e5f98c0771576f59ec)
package/DEVELOP.md ADDED
@@ -0,0 +1,53 @@
1
+ # volto-n2k
2
+
3
+ ## Develop
4
+
5
+ Before starting make sure your development environment is properly set. See [Volto Developer Documentation](https://docs.voltocms.com/getting-started/install/)
6
+
7
+ 1. Make sure you have installed `yo`, `@plone/generator-volto` and `mrs-developer`
8
+
9
+ $ npm install -g yo
10
+ $ npm install -g @plone/generator-volto
11
+ $ npm install -g mrs-developer
12
+
13
+ 1. Create new volto app
14
+
15
+ $ yo @plone/volto my-volto-project --addon @eeacms/volto-n2k
16
+ $ cd my-volto-project
17
+
18
+ 1. Add the following to `mrs.developer.json`:
19
+
20
+ {
21
+ "volto-n2k": {
22
+ "url": "https://github.com/eea/volto-n2k.git",
23
+ "package": "@eeacms/volto-n2k",
24
+ "branch": "develop",
25
+ "path": "src"
26
+ }
27
+ }
28
+
29
+ 1. Install
30
+
31
+ $ yarn develop
32
+ $ yarn
33
+
34
+ 1. Start backend
35
+
36
+ $ docker pull plone
37
+ $ docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone
38
+
39
+ ...wait for backend to setup and start - `Ready to handle requests`:
40
+
41
+ $ docker logs -f plone
42
+
43
+ ...you can also check http://localhost:8080/Plone
44
+
45
+ 1. Start frontend
46
+
47
+ $ yarn start
48
+
49
+ 1. Go to http://localhost:3000
50
+
51
+ 1. Happy hacking!
52
+
53
+ $ cd src/addons/volto-n2k/
package/Jenkinsfile ADDED
@@ -0,0 +1,209 @@
1
+ pipeline {
2
+ agent any
3
+
4
+ environment {
5
+ GIT_NAME = "volto-n2k"
6
+ NAMESPACE = "@eeacms"
7
+ SONARQUBE_TAGS = "volto.eea.europa.eu,biodiversity.europa.eu"
8
+ DEPENDENCIES = "volto-slate @eeacms/volto-datablocks"
9
+ }
10
+
11
+ stages {
12
+
13
+ stage('Code') {
14
+ steps {
15
+ parallel(
16
+
17
+ "ES lint": {
18
+ node(label: 'docker') {
19
+ sh '''docker run -i --rm --name="$BUILD_TAG-eslint" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci eslint'''
20
+ }
21
+ },
22
+
23
+ "Style lint": {
24
+ node(label: 'docker') {
25
+ sh '''docker run -i --rm --name="$BUILD_TAG-stylelint" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci stylelint'''
26
+ }
27
+ },
28
+
29
+ "Prettier": {
30
+ node(label: 'docker') {
31
+ sh '''docker run -i --rm --name="$BUILD_TAG-prettier" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci prettier'''
32
+ }
33
+ }
34
+ )
35
+ }
36
+ }
37
+
38
+ stage('Tests') {
39
+ steps {
40
+ parallel(
41
+
42
+ "Volto": {
43
+ node(label: 'docker') {
44
+ script {
45
+ try {
46
+ sh '''docker pull plone/volto-addon-ci'''
47
+ sh '''docker run -i --name="$BUILD_TAG-volto" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci'''
48
+ sh '''rm -rf xunit-reports'''
49
+ sh '''mkdir -p xunit-reports'''
50
+ sh '''docker cp $BUILD_TAG-volto:/opt/frontend/my-volto-project/coverage xunit-reports/'''
51
+ sh '''docker cp $BUILD_TAG-volto:/opt/frontend/my-volto-project/junit.xml xunit-reports/'''
52
+ sh '''docker cp $BUILD_TAG-volto:/opt/frontend/my-volto-project/unit_tests_log.txt xunit-reports/'''
53
+ stash name: "xunit-reports", includes: "xunit-reports/**"
54
+ archiveArtifacts artifacts: "xunit-reports/unit_tests_log.txt", fingerprint: true
55
+ publishHTML (target : [
56
+ allowMissing: false,
57
+ alwaysLinkToLastBuild: true,
58
+ keepAll: true,
59
+ reportDir: 'xunit-reports/coverage/lcov-report',
60
+ reportFiles: 'index.html',
61
+ reportName: 'UTCoverage',
62
+ reportTitles: 'Unit Tests Code Coverage'
63
+ ])
64
+ } finally {
65
+ catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
66
+ junit testResults: 'xunit-reports/junit.xml', allowEmptyResults: true
67
+ }
68
+ sh script: '''docker rm -v $BUILD_TAG-volto''', returnStatus: true
69
+ }
70
+ }
71
+ }
72
+ }
73
+ )
74
+ }
75
+ }
76
+
77
+ stage('Integration tests') {
78
+ steps {
79
+ parallel(
80
+
81
+ "Cypress": {
82
+ node(label: 'docker') {
83
+ script {
84
+ try {
85
+ sh '''docker pull plone; docker run -d --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="profile-plone.restapi:blocks" plone fg'''
86
+ sh '''docker pull plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" plone/volto-addon-ci cypress'''
87
+ } finally {
88
+ try {
89
+ sh '''rm -rf cypress-reports cypress-results cypress-coverage'''
90
+ sh '''mkdir -p cypress-reports cypress-results cypress-coverage'''
91
+ sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/cypress/videos cypress-reports/'''
92
+ sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/cypress/reports cypress-results/'''
93
+ coverage = sh script: '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/coverage cypress-coverage/''', returnStatus: true
94
+ if ( coverage == 0 ) {
95
+ publishHTML (target : [allowMissing: false,
96
+ alwaysLinkToLastBuild: true,
97
+ keepAll: true,
98
+ reportDir: 'cypress-coverage/coverage/lcov-report',
99
+ reportFiles: 'index.html',
100
+ reportName: 'CypressCoverage',
101
+ reportTitles: 'Integration Tests Code Coverage'])
102
+ }
103
+ archiveArtifacts artifacts: 'cypress-reports/videos/*.mp4', fingerprint: true
104
+ stash name: "cypress-coverage", includes: "cypress-coverage/**", allowEmpty: true
105
+ }
106
+ finally {
107
+ catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
108
+ junit testResults: 'cypress-results/**/*.xml', allowEmptyResults: true
109
+ }
110
+ sh script: "docker stop $BUILD_TAG-plone", returnStatus: true
111
+ sh script: "docker rm -v $BUILD_TAG-plone", returnStatus: true
112
+ sh script: "docker rm -v $BUILD_TAG-cypress", returnStatus: true
113
+
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
119
+
120
+ )
121
+ }
122
+ }
123
+
124
+ stage('Report to SonarQube') {
125
+ // Exclude Pull-Requests
126
+ when {
127
+ allOf {
128
+ environment name: 'CHANGE_ID', value: ''
129
+ }
130
+ }
131
+ steps {
132
+ node(label: 'swarm') {
133
+ script{
134
+ checkout scm
135
+ unstash "xunit-reports"
136
+ unstash "cypress-coverage"
137
+ def scannerHome = tool 'SonarQubeScanner';
138
+ def nodeJS = tool 'NodeJS11';
139
+ withSonarQubeEnv('Sonarqube') {
140
+ sh '''sed -i "s#/opt/frontend/my-volto-project/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
141
+ sh "export PATH=$PATH:${scannerHome}/bin:${nodeJS}/bin; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
142
+ sh '''try=2; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}-${BRANCH_NAME}&tags=${SONARQUBE_TAGS},${BRANCH_NAME}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 60; try=\$(( \$try - 1 )); fi; done'''
143
+ }
144
+ }
145
+ }
146
+ }
147
+ }
148
+
149
+ stage('Pull Request') {
150
+ when {
151
+ not {
152
+ environment name: 'CHANGE_ID', value: ''
153
+ }
154
+ environment name: 'CHANGE_TARGET', value: 'master'
155
+ }
156
+ steps {
157
+ node(label: 'docker') {
158
+ script {
159
+ if ( env.CHANGE_BRANCH != "develop" && !( env.CHANGE_BRANCH.startsWith("hotfix")) ) {
160
+ error "Pipeline aborted due to PR not made from develop or hotfix branch"
161
+ }
162
+ withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN')]) {
163
+ sh '''docker pull eeacms/gitflow'''
164
+ sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-pr" -e GIT_CHANGE_TARGET="$CHANGE_TARGET" -e GIT_CHANGE_BRANCH="$CHANGE_BRANCH" -e GIT_CHANGE_AUTHOR="$CHANGE_AUTHOR" -e GIT_CHANGE_TITLE="$CHANGE_TITLE" -e GIT_TOKEN="$GITHUB_TOKEN" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e GIT_ORG="$GIT_ORG" -e GIT_NAME="$GIT_NAME" -e LANGUAGE=javascript eeacms/gitflow'''
165
+ }
166
+ }
167
+ }
168
+ }
169
+ }
170
+
171
+ stage('Release') {
172
+ when {
173
+ allOf {
174
+ environment name: 'CHANGE_ID', value: ''
175
+ branch 'master'
176
+ }
177
+ }
178
+ steps {
179
+ node(label: 'docker') {
180
+ withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'),string(credentialsId: 'eea-jenkins-npm-token', variable: 'NPM_TOKEN')]) {
181
+ sh '''docker pull eeacms/gitflow'''
182
+ sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" -e NPM_TOKEN="$NPM_TOKEN" -e LANGUAGE=javascript eeacms/gitflow'''
183
+ }
184
+ }
185
+ }
186
+ }
187
+
188
+ }
189
+
190
+ post {
191
+ always {
192
+ cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)
193
+ }
194
+ changed {
195
+ script {
196
+ def details = """<h1>${env.JOB_NAME} - Build #${env.BUILD_NUMBER} - ${currentBuild.currentResult}</h1>
197
+ <p>Check console output at <a href="${env.BUILD_URL}/display/redirect">${env.JOB_BASE_NAME} - #${env.BUILD_NUMBER}</a></p>
198
+ """
199
+ emailext(
200
+ subject: '$DEFAULT_SUBJECT',
201
+ body: details,
202
+ attachLog: true,
203
+ compressLog: true,
204
+ recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'CulpritsRecipientProvider']]
205
+ )
206
+ }
207
+ }
208
+ }
209
+ }
package/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 European Environment Agency
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # volto-n2k
2
+ [![Releases](https://img.shields.io/github/v/release/eea/volto-n2k)](https://github.com/eea/volto-n2k/releases)
3
+ [![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto-addons%2Fvolto-n2k%2Fmaster&subject=master)](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-n2k/job/master/display/redirect)
4
+ [![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto-addons%2Fvolto-n2k%2Fdevelop&subject=develop)](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-n2k/job/develop/display/redirect)
5
+
6
+ [Volto](https://github.com/plone/volto) add-on
7
+
8
+ ## Features
9
+
10
+ ###
11
+
12
+ Demo GIF
13
+
14
+ ## Getting started
15
+
16
+ 1. Create new volto project if you don't already have one:
17
+
18
+ ```
19
+ $ npm install -g yo @plone/generator-volto
20
+ $ yo @plone/volto my-volto-project --addon @eeacms/volto-n2k
21
+
22
+ $ cd my-volto-project
23
+ $ yarn add -W @eeacms/volto-n2k
24
+ ```
25
+
26
+ 1. If you already have a volto project, just update `package.json`:
27
+
28
+ ```JSON
29
+ "addons": [
30
+ "@eeacms/volto-n2k"
31
+ ],
32
+
33
+ "dependencies": {
34
+ "@eeacms/volto-n2k": "^1.0.0"
35
+ }
36
+ ```
37
+
38
+ 1. Install new add-ons and restart Volto:
39
+
40
+ ```
41
+ $ yarn
42
+ $ yarn start
43
+ ```
44
+
45
+ 1. Go to http://localhost:3000
46
+
47
+ 1. Happy editing!
48
+
49
+ ## How to contribute
50
+
51
+ See [DEVELOP.md](https://github.com/eea/volto-n2k/blob/master/DEVELOP.md).
52
+
53
+ ## Copyright and license
54
+
55
+ The Initial Owner of the Original Code is European Environment Agency (EEA).
56
+ All Rights Reserved.
57
+
58
+ See [LICENSE.md](https://github.com/eea/volto-n2k/blob/master/LICENSE.md) for details.
59
+
60
+ ## Funding
61
+
62
+ [European Environment Agency (EU)](http://eea.europa.eu)
package/bootstrap ADDED
@@ -0,0 +1,41 @@
1
+ const path = require('path');
2
+ const fs = require('fs');
3
+ const ejs = require('ejs');
4
+
5
+ const currentDir = path.basename(process.cwd());
6
+
7
+ const bootstrap = function (ofile) {
8
+ fs.readFile(ofile, 'utf8', function (err, data) {
9
+ if (err) {
10
+ return console.log(err);
11
+ }
12
+ const result = ejs.render(data, {
13
+ addonName: `@eeacms/${currentDir}`,
14
+ name: currentDir
15
+ });
16
+ const output = ofile.replace('.tpl', '');
17
+ fs.writeFile(output, result, 'utf8', function (err) {
18
+ if (err) {
19
+ return console.log(err);
20
+ }
21
+ });
22
+ if (ofile.includes('.tpl')) {
23
+ fs.unlink(ofile, (err) => {
24
+ if (err) {
25
+ return console.error(err);
26
+ }
27
+ });
28
+ }
29
+ });
30
+ }
31
+
32
+ fs.readdir(".", { withFileTypes: true }, (err, dirents) => {
33
+ const files = dirents
34
+ .filter(dirent => dirent.isFile())
35
+ .map(dirent => dirent.name);
36
+ files.forEach(function (file) {
37
+ if (file != 'bootstrap') {
38
+ bootstrap(file);
39
+ }
40
+ });
41
+ });
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "Using fixtures to represent data",
3
+ "email": "hello@cypress.io",
4
+ "body": "Fixtures are a great way to mock data for responses to routes"
5
+ }
@@ -0,0 +1,32 @@
1
+ import { setupBeforeEach, tearDownAfterEach } from '../support';
2
+
3
+ describe('Blocks Tests', () => {
4
+ beforeEach(setupBeforeEach);
5
+ afterEach(tearDownAfterEach);
6
+
7
+ it('Add Block: Empty', () => {
8
+ // Change page title
9
+ cy.get('.documentFirstHeading > .public-DraftStyleDefault-block')
10
+ .clear()
11
+ .type('My Add-on Page')
12
+ .get('.documentFirstHeading span[data-text]')
13
+ .contains('My Add-on Page');
14
+
15
+ cy.get('.documentFirstHeading > .public-DraftStyleDefault-block').type(
16
+ '{enter}',
17
+ );
18
+
19
+ // Add block
20
+ cy.get('.ui.basic.icon.button.block-add-button').first().click();
21
+ cy.get('.blocks-chooser .title').contains('Media').click();
22
+ cy.get('.content.active.media .button.image').contains('Image').click();
23
+
24
+ // Save
25
+ cy.get('#toolbar-save').click();
26
+ cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page');
27
+
28
+ // then the page view should contain our changes
29
+ cy.contains('My Add-on Page');
30
+ cy.get('.block.image');
31
+ });
32
+ });
@@ -0,0 +1,26 @@
1
+ /// <reference types="cypress" />
2
+ // ***********************************************************
3
+ // This example plugins/index.js can be used to load plugins
4
+ //
5
+ // You can change the location of this file or turn off loading
6
+ // the plugins file with the 'pluginsFile' configuration option.
7
+ //
8
+ // You can read more here:
9
+ // https://on.cypress.io/plugins-guide
10
+ // ***********************************************************
11
+
12
+ // This function is called when a project is opened or re-opened (e.g. due to
13
+ // the project's config changing)
14
+
15
+ /**
16
+ * @type {Cypress.PluginConfig}
17
+ */
18
+ module.exports = (on, config) => {
19
+ // `on` is used to hook into various events Cypress emits
20
+ // `config` is the resolved Cypress config
21
+ /* coverage-start
22
+ require('@cypress/code-coverage/task')(on, config)
23
+ on('file:preprocessor', require('@cypress/code-coverage/use-babelrc'))
24
+ return config
25
+ coverage-end */
26
+ };