@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
package/src/helpers.js ADDED
@@ -0,0 +1,148 @@
1
+ import AmphibiansPNG from '@eeacms/volto-n2k/icons/placeholders/default.png';
2
+ import BirdsPNG from '@eeacms/volto-n2k/icons/placeholders/Birds.png';
3
+ import ConifersPNG from '@eeacms/volto-n2k/icons/placeholders/Conifers.png';
4
+ import FernsPNG from '@eeacms/volto-n2k/icons/placeholders/default.png';
5
+ import FishesPNG from '@eeacms/volto-n2k/icons/placeholders/Fishes.png';
6
+ import FloweringPlantsPNG from '@eeacms/volto-n2k/icons/placeholders/default.png';
7
+ import FungiPNG from '@eeacms/volto-n2k/icons/placeholders/Fungi.png';
8
+ import InvertebratesPNG from '@eeacms/volto-n2k/icons/placeholders/default.png';
9
+ import MammalsPNG from '@eeacms/volto-n2k/icons/placeholders/default.png';
10
+ import MossesLiverwortsPNG from '@eeacms/volto-n2k/icons/placeholders/default.png';
11
+ import ReptilesPNG from '@eeacms/volto-n2k/icons/placeholders/default.png';
12
+ import AlgaePNG from '@eeacms/volto-n2k/icons/placeholders/Algae.png';
13
+ import PlantsPNG from '@eeacms/volto-n2k/icons/placeholders/default.png';
14
+ import defaultPNG from '@eeacms/volto-n2k/icons/placeholders/default.png';
15
+
16
+ export const photoPlaceholders = {
17
+ Amphibians: AmphibiansPNG,
18
+ Birds: BirdsPNG,
19
+ Conifers: ConifersPNG,
20
+ Ferns: FernsPNG,
21
+ Fishes: FishesPNG,
22
+ 'Flowering Plants': FloweringPlantsPNG,
23
+ Fungi: FungiPNG,
24
+ Invertebrates: InvertebratesPNG,
25
+ Mammals: MammalsPNG,
26
+ 'Mosses & Liverworts': MossesLiverwortsPNG,
27
+ Reptiles: ReptilesPNG,
28
+ Algae: AlgaePNG,
29
+ Plants: PlantsPNG,
30
+ default: defaultPNG,
31
+ };
32
+
33
+ export const getObjectByIndex = (provider_data, index) => {
34
+ const obj = {};
35
+ const keys = Object.keys(provider_data);
36
+ keys.forEach((key) => {
37
+ obj[key] = provider_data[key][index];
38
+ });
39
+ return obj;
40
+ };
41
+
42
+ export function sortBy(obj, property, order = 'ASC') {
43
+ return Object.keys(obj)
44
+ .sort((a, b) =>
45
+ order === 'ASC'
46
+ ? obj[a][property] - obj[b][property]
47
+ : obj[b][property] - obj[a][property],
48
+ )
49
+ .reduce((newObj, key) => {
50
+ newObj[key] = { ...obj[key] };
51
+ return newObj;
52
+ }, {});
53
+ }
54
+
55
+ export const componentToHex = (c) => {
56
+ var hex = parseInt(c).toString(16);
57
+ return hex.length === 1 ? '0' + hex : hex;
58
+ };
59
+
60
+ function hexToRgb(hex) {
61
+ var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
62
+ return result
63
+ ? [
64
+ parseInt(result[1], 16),
65
+ parseInt(result[2], 16),
66
+ parseInt(result[3], 16),
67
+ ]
68
+ : [0, 0, 0];
69
+ }
70
+
71
+ export const getContrastColor = (rgb) => {
72
+ if (rgb.includes('rgb(')) {
73
+ rgb = rgb
74
+ .substring(4, rgb.length - 1)
75
+ .replace(/ /g, '')
76
+ .split(',');
77
+ } else if (rgb[0] === '#') {
78
+ rgb = hexToRgb(rgb);
79
+ }
80
+ const brightness = Math.round(
81
+ (parseInt(rgb[0]) * 299 + parseInt(rgb[1]) * 587 + parseInt(rgb[2]) * 114) /
82
+ 1000,
83
+ );
84
+
85
+ return brightness > 125 ? 'rgb(0, 0, 0)' : 'rgb(255, 255, 255)';
86
+ };
87
+
88
+ export const adjustBrightness = (col, amt) => {
89
+ var usePound = false;
90
+
91
+ if (col.includes('rgb(')) {
92
+ const rgb = col
93
+ .substring(4, col.length - 1)
94
+ .replace(/ /g, '')
95
+ .split(',');
96
+ col =
97
+ '#' +
98
+ componentToHex(rgb[0]) +
99
+ componentToHex(rgb[1]) +
100
+ componentToHex(rgb[2]);
101
+ }
102
+
103
+ if (col[0] === '#') {
104
+ col = col.slice(1);
105
+ usePound = true;
106
+ }
107
+
108
+ let R = parseInt(col.substring(0, 2), 16);
109
+ let G = parseInt(col.substring(2, 4), 16);
110
+ let B = parseInt(col.substring(4, 6), 16);
111
+
112
+ // to make the colour less bright than the input
113
+ // change the following three "+" symbols to "-"
114
+ R = R + amt;
115
+ G = G + amt;
116
+ B = B + amt;
117
+
118
+ if (R > 255) R = 255;
119
+ else if (R < 0) R = 0;
120
+
121
+ if (G > 255) G = 255;
122
+ else if (G < 0) G = 0;
123
+
124
+ if (B > 255) B = 255;
125
+ else if (B < 0) B = 0;
126
+
127
+ let RR = R.toString(16).length === 1 ? '0' + R.toString(16) : R.toString(16);
128
+ let GG = G.toString(16).length === 1 ? '0' + G.toString(16) : G.toString(16);
129
+ let BB = B.toString(16).length === 1 ? '0' + B.toString(16) : B.toString(16);
130
+
131
+ return (usePound ? '#' : '') + RR + GG + BB;
132
+ };
133
+
134
+ export const getN2kItems = (items) => {
135
+ return items.filter((item) => item.url === '/natura2000')?.[0]?.items || [];
136
+ };
137
+
138
+ export const pathExists = (path, items) => {
139
+ let ok = false;
140
+ for (let i = 0; i < items.length; i++) {
141
+ if (!ok && items[i].url === path) {
142
+ ok = true;
143
+ } else if (!ok && items[i].items?.length) {
144
+ ok = pathExists(path, items[i].items);
145
+ }
146
+ }
147
+ return ok;
148
+ };
@@ -0,0 +1,6 @@
1
+ import useResizeObserver from './useResizeObserver';
2
+
3
+ import withScreenSize from './withScreenSize';
4
+ import withLocalStorage from './withLocalStorage';
5
+
6
+ export { useResizeObserver, withScreenSize, withLocalStorage };
@@ -0,0 +1,26 @@
1
+ import { useEffect, useState } from 'react';
2
+ import ResizeObserver from 'resize-observer-polyfill';
3
+
4
+ /**
5
+ * Hook, that returns the current dimensions of an HTML element.
6
+ * Doesn't play well with SVG.
7
+ */
8
+
9
+ const useResizeObserver = (ref) => {
10
+ const [dimensions, setDimensions] = useState(null);
11
+ useEffect(() => {
12
+ const observeTarget = ref.current;
13
+ const resizeObserver = new ResizeObserver((entries) => {
14
+ entries.forEach((entry) => {
15
+ setDimensions(entry.contentRect);
16
+ });
17
+ });
18
+ resizeObserver.observe(observeTarget);
19
+ return () => {
20
+ resizeObserver.unobserve(observeTarget);
21
+ };
22
+ }, [ref]);
23
+ return dimensions;
24
+ };
25
+
26
+ export default useResizeObserver;
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import { useDispatch, useSelector } from 'react-redux';
3
+ import {
4
+ setLocalStorage,
5
+ deleteLocalStorage,
6
+ resetLocalStorage,
7
+ } from '@eeacms/volto-n2k/actions';
8
+
9
+ export default function withLanguage(WrappedComponent) {
10
+ return (props) => {
11
+ const dispatch = useDispatch();
12
+ const localStorage = useSelector((state) => state.localStorage);
13
+
14
+ const get = (key) => {
15
+ return localStorage[key];
16
+ };
17
+
18
+ const set = (key, value) => {
19
+ dispatch(setLocalStorage(key, value));
20
+ };
21
+
22
+ const remove = (key) => {
23
+ dispatch(deleteLocalStorage(key));
24
+ };
25
+
26
+ const reset = () => {
27
+ dispatch(resetLocalStorage());
28
+ };
29
+
30
+ return (
31
+ <WrappedComponent
32
+ {...props}
33
+ localStorage={{ ...localStorage, get, set, remove, reset }}
34
+ />
35
+ );
36
+ };
37
+ }
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+
3
+ export default function withScreenSize(WrappedComponent) {
4
+ return (props) => {
5
+ const [screenHeight, setScreenHeight] = React.useState(null);
6
+ const [screenWidth, setScreenWidth] = React.useState(null);
7
+
8
+ const updateScreenSize = () => {
9
+ if (__CLIENT__) {
10
+ const screenHeight =
11
+ window.innerHeight ||
12
+ document.documentElement.clientHeight ||
13
+ document.body.clientHeight ||
14
+ 0;
15
+ const screenWidth =
16
+ window.innerWidth ||
17
+ document.documentElement.clientWidth ||
18
+ document.body.clientWidth ||
19
+ 0;
20
+
21
+ setScreenHeight(screenHeight);
22
+ setScreenWidth(screenWidth);
23
+ }
24
+ };
25
+
26
+ React.useEffect(() => {
27
+ updateScreenSize();
28
+ window.addEventListener('resize', updateScreenSize);
29
+ return () => {
30
+ window.removeEventListener('resize', updateScreenSize);
31
+ };
32
+ /* eslint-disable-next-line */
33
+ }, []);
34
+
35
+ return (
36
+ <WrappedComponent
37
+ {...props}
38
+ screenHeight={screenHeight}
39
+ screenWidth={screenWidth}
40
+ />
41
+ );
42
+ };
43
+ }
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 25.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 108.55 96" style="enable-background:new 0 0 108.55 96;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#3b7f02;}
7
+ </style>
8
+ <path class="st0" d="M105.66,40.87L81.78,23.48L81.62,6.57C81.61,5,81.1,3.55,80.26,2.42C79.15,0.93,77.47-0.02,75.6,0
9
+ c-3.29,0.03-5.94,3.02-5.91,6.69l0.08,8.04l-6.48-4.72l-10-7.29L53.25,2.7l-9.8,7.63L2,42.56c-1.32,1.03-2,2.6-2,4.23
10
+ c0,1.32,0.44,2.68,1.35,3.84c2.02,2.6,5.6,3.2,7.98,1.35l6.72-5.23v36.97c0,6.77,5.13,12.28,11.44,12.28h53.58
11
+ c6.31,0,11.44-5.51,11.44-12.28V46.06l6.12,4.46c2.96,2.15,6.93,1.75,8.87-0.92C109.44,46.94,108.62,43.03,105.66,40.87z"/>
12
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="13" cy="13" r="12" fill="#EB9701"/>
3
+ <circle cx="12.5" cy="6.5" r="1.5" fill="black"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12.8572 10H13C13.5523 10 14 10.4477 14 11V19H15C15.5523 19 16 19.4477 16 20C16 20.5523 15.5523 21 15 21H11C10.4477 21 10 20.5523 10 20C10 19.4477 10.4477 19 11 19H12V11.7143H11.2857C10.8124 11.7143 10.4286 11.3305 10.4286 10.8571C10.4286 10.3838 10.8124 10 11.2857 10H12H12.8572Z" fill="black"/>
5
+ </svg>
Binary file
@@ -0,0 +1,142 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+ xmlns:cc="http://creativecommons.org/ns#"
5
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+ xmlns:svg="http://www.w3.org/2000/svg"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10
+ version="1.1"
11
+ id="svg2"
12
+ xml:space="preserve"
13
+ width="153.64"
14
+ height="105.73333"
15
+ viewBox="0 0 153.64 105.73333"
16
+ sodipodi:docname="natura2000-hr.eps"><metadata
17
+ id="metadata8"><rdf:RDF><cc:Work
18
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
19
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
20
+ id="defs6" /><sodipodi:namedview
21
+ pagecolor="#ffffff"
22
+ bordercolor="#666666"
23
+ borderopacity="1"
24
+ objecttolerance="10"
25
+ gridtolerance="10"
26
+ guidetolerance="10"
27
+ inkscape:pageopacity="0"
28
+ inkscape:pageshadow="2"
29
+ inkscape:window-width="640"
30
+ inkscape:window-height="480"
31
+ id="namedview4" /><g
32
+ id="g10"
33
+ inkscape:groupmode="layer"
34
+ inkscape:label="ink_ext_XXXXXX"
35
+ transform="matrix(1.3333333,0,0,-1.3333333,0,105.73333)"><g
36
+ id="g12"
37
+ transform="scale(0.1)"><path
38
+ d="m 1041.07,112.488 c 4.02,0 7.65,-1.961 10.9,-5.879 3.24,-3.925 5.97,-10.3199 8.19,-19.2067 2.18,-8.8945 3.26,-19.2265 3.26,-31.0156 0,-11.875 -1.08,-22.1758 -3.24,-30.8867 -2.13,-8.7148 -4.93,-15.0312 -8.32,-18.97656 -3.38,-3.95703 -7.11,-5.925784 -11.22,-5.925784 -6.09,0 -11.11,4.390624 -15.03,13.140644 -4.97,10.8711 -7.45,24.9336 -7.45,42.1992 0,12.1992 1.09,22.6758 3.23,31.4258 2.15,8.7617 4.89,15.1487 8.26,19.1287 3.36,3.996 7.17,5.996 11.42,5.996 m 5.82,-58.9724 c 0,22.4297 -0.65,37.1602 -2.01,44.168 -0.93,5.1294 -2.3,7.6754 -4.05,7.6754 -2.08,0 -3.64,-3.66 -4.63,-10.9723 -1,-7.3281 -1.49,-21.457 -1.49,-42.3945 0,-17.5117 0.71,-29.9024 2.15,-37.168 0.87,-4.5117 2.16,-6.76561 3.78,-6.76561 1.09,0 2.09,1.03516 2.97,3.07421 0.89,2.0508 1.6,6.3945 2.14,13.0547 0.77,9.0156 1.14,18.7891 1.14,29.3281"
39
+ style="fill:#254aa5;fill-opacity:1;fill-rule:nonzero;stroke:none"
40
+ id="path14" /><path
41
+ d="m 1129.93,112.059 c 4.02,0 7.63,-1.961 10.89,-5.887 3.26,-3.914 5.98,-10.3243 8.16,-19.2072 2.19,-8.8906 3.31,-19.2226 3.31,-31.0078 0,-11.8867 -1.09,-22.1797 -3.27,-30.8984 -2.14,-8.7109 -4.92,-15.0313 -8.32,-18.97266 -3.4,-3.94531 -7.13,-5.917971 -11.2,-5.917971 -6.1,0 -11.13,4.382811 -15.07,13.140631 -4.94,10.8633 -7.4,24.9219 -7.4,42.1914 0,12.1953 1.06,22.6758 3.2,31.4258 2.15,8.7656 4.91,15.1442 8.27,19.1372 3.36,3.996 7.18,5.996 11.43,5.996 m 5.82,-58.9731 c 0,22.4297 -0.67,37.1563 -2.01,44.1602 -0.97,5.1289 -2.31,7.6879 -4.06,7.6879 -2.06,0 -3.63,-3.672 -4.62,-10.9887 -1,-7.3242 -1.49,-21.457 -1.49,-42.3906 0,-17.5 0.69,-29.9063 2.11,-37.168 0.9,-4.50389 2.17,-6.75779 3.82,-6.75779 1.09,0 2.08,1.02343 2.95,3.06249 0.89,2.0625 1.62,6.4063 2.15,13.0703 0.78,9.0039 1.15,18.7774 1.15,29.3242"
42
+ style="fill:#254aa5;fill-opacity:1;fill-rule:nonzero;stroke:none"
43
+ id="path16" /><path
44
+ d="m 951.816,112.5 c 3.985,0 7.618,-1.965 10.879,-5.879 3.243,-3.926 5.965,-10.3202 8.164,-19.2108 2.188,-8.8946 3.282,-19.2266 3.282,-31.0157 0,-11.875 -1.075,-22.1757 -3.243,-30.8867 -2.16,-8.7109 -4.921,-15.0312 -8.332,-18.97655 -3.394,-3.95312 -7.128,-5.925781 -11.179,-5.925781 -6.114,0 -11.133,4.394531 -15.078,13.144531 -4.942,10.8672 -7.422,24.9336 -7.422,42.1953 0,12.1992 1.074,22.668 3.222,31.4297 2.129,8.7578 4.903,15.145 8.274,19.129 3.347,3.996 7.156,5.996 11.433,5.996 m 5.801,-58.9766 c 0,22.4336 -0.683,37.1602 -2.012,44.1719 -0.964,5.1247 -2.292,7.6877 -4.042,7.6877 -2.11,0 -3.653,-3.672 -4.649,-10.9885 -0.996,-7.3242 -1.492,-21.457 -1.492,-42.3906 0,-17.5117 0.711,-29.9062 2.137,-37.168 0.898,-4.5156 2.168,-6.76949 3.828,-6.76949 1.062,0 2.051,1.03515 2.929,3.07419 0.879,2.0508 1.614,6.3985 2.168,13.0586 0.743,9.0156 1.133,18.7891 1.133,29.3242"
45
+ style="fill:#254aa5;fill-opacity:1;fill-rule:nonzero;stroke:none"
46
+ id="path18" /><path
47
+ d="M 71.0781,701.355 V 194.387 H 641.191 c 3.672,-12.012 13.282,-22.621 28.926,-31.797 20.75,-12.168 45.879,-18.274 75.332,-18.274 29.473,0 54.578,6.106 75.344,18.274 0,0 60.184,23.765 78.758,25.094 18.574,1.332 56.894,10.48 76.777,-4.11 19.895,-14.582 43.882,-34.347 63.792,-34.347 19.89,0 103.43,-1.329 103.43,-1.329 v 46.489 68.883 438.085 H 71.0781"
48
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
49
+ id="path20" /><path
50
+ d="M 71.0781,701.355 V 194.387 H 641.191 c 3.672,-12.012 13.282,-22.621 28.926,-31.797 20.75,-12.168 45.879,-18.274 75.332,-18.274 29.473,0 54.578,6.106 75.344,18.274 0,0 60.184,23.765 78.758,25.094 18.574,1.332 56.894,10.48 76.777,-4.11 19.895,-14.582 43.882,-34.347 63.792,-34.347 19.89,0 103.43,-1.329 103.43,-1.329 v 46.489 68.883 438.085 z"
51
+ style="fill:none;stroke:#ffffff;stroke-width:8.7;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
52
+ id="path22" /><path
53
+ d="M 71,133.895 774.414,133.418 583.242,364.121 496.422,272.41 410.191,232.773 352.98,315.41 329.418,260 304.398,315.879 263.289,372.48 71,471.582 V 133.895"
54
+ style="fill:#00a990;fill-opacity:1;fill-rule:nonzero;stroke:none"
55
+ id="path24" /><path
56
+ d="m 866.672,765.332 -30.188,-25.793 c 0,0 -6.23,-11.121 -8.613,-13.601 -2.832,-2.918 -9.746,-6.25 -17.832,-10.762 -10.391,-5.781 -21.894,-11.531 -30.195,-19.824 -11.778,-11.789 -17.891,-27.481 -21.531,-42.747 -5.286,-22.097 -12.317,-34.57 -35.676,-40.828 -9.961,-2.675 -37.91,-4.355 -51.446,-5.027 -1.269,-0.062 -64.043,-0.988 -71.289,-0.695 -3.066,0.117 -37.019,0.988 -42.543,2.129 -1.097,0.222 -16.851,11.164 -26.148,12.656 -4.961,0.801 -9.922,0.332 -13.512,-1.192 -1.687,-0.714 -4.703,-2.617 -7.469,-5.964 -4.218,-5.082 -5.191,-6.438 -9.21,-8.125 -1.317,-0.559 -15.993,-4.563 -16.668,-4.766 -2.024,-0.676 -2.301,-1.438 -2.301,-1.438 l 1.148,-0.964 c 0,0 27.93,-0.071 29.031,0 1.098,0.078 11.711,-1.836 24.153,-1.887 5.457,-0.02 11.426,-2.012 16.375,-2.402 19.484,-1.504 89.996,-11.895 109.234,-14.571 31.004,-4.316 105.664,-28.203 132.528,-32.246 36.457,-5.488 76.046,-1.152 105.48,4.785 54.023,10.907 101.31,18.907 158.98,26.278 5.67,0.722 45.53,6.261 46.84,6.425 9.88,1.25 9.49,5.754 9.49,5.754 0,0 -0.26,3.321 -6.6,3.098 -7.58,-0.293 -43.07,-2.285 -49.45,-2.629 -48.21,-2.578 -120.998,0.852 -139.494,4.981 -2.383,0.332 -3.633,0.664 -7.676,2.187 -14.707,5.82 -19.805,23.066 -15.527,53.254 2.753,19.375 27.871,141.383 27.871,141.383 v 0.234 c 0,0 -0.684,-0.137 -1.438,-1.433 -1.308,-2.317 -39.051,-69.504 -39.051,-69.504 l 10.879,57.336 -31.023,-43.477 2.871,29.375"
57
+ style="fill:#254aa5;fill-opacity:1;fill-rule:nonzero;stroke:none"
58
+ id="path26" /><path
59
+ d="m 413.063,728.555 -28.36,39.812 c 0,0 -0.855,-5.469 -5.555,-12.586 -13.347,-20.234 -40.531,-47.078 -79.05,-75.703 -1.969,-1.453 -19.278,-14.336 -25.02,-19.109 -4.59,-3.828 -3.207,-8.508 -1.148,-12.414 2.031,-3.848 5.793,-10.086 7.492,-13.86 7.137,-15.847 6.137,-28.777 -6.344,-40.125 -4.68,-4.257 -10.976,-8.047 -20.398,-12.16 -2.61,-1.14 -8.332,-3.426 -13.508,-4.793 -8.211,-2.14 -24.352,-4.258 -34.215,-5.012 -8.187,-0.632 -26.836,-0.671 -35.926,-0.957 -8.39,-0.261 -43.359,-0.117 -52.332,0 -33.367,0.461 -42.5388,1.915 -42.5388,1.915 0,0 -7.8985,5.675 -13.2188,8.363 -6.6211,3.609 -13.9141,4.929 -19.543,4.297 -3.4882,-0.2 -8.457,-1.348 -11.5,-4.067 -1.3476,-1.199 -1.6211,-1.414 -2.8789,-3.101 -3.1992,-4.297 -5.3476,-6.614 -9.1992,-8.125 -2.25,-0.879 -14.17967,-3.801 -16.93749,-4.77 C 0.113281,565.195 0,564.719 0,564.719 l 2,-0.949 h 29.0391 c 0,0 9.9922,-2.051 16.9375,-2.051 3.7617,0 4.1054,0.008 7.5117,0 3.4219,-0.008 5.6484,-0.711 8.3086,-1.297 2.6719,-0.586 6.7226,-1.156 9.8203,-1.789 3.1016,-0.645 34.7028,-4.207 50.2658,-6.082 11.375,-1.367 28.086,-3.086 38.504,-5.266 12.324,-2.566 30.609,-6.34 41.113,-9.551 2.789,-0.847 28.18,-8.125 30.469,-8.839 23.312,-7.301 44.992,-13.114 79.64,-16.707 29.598,-2.825 53.739,-2.852 84.512,1.667 26.027,3.227 47.91,9.18 77.609,15.532 34.93,7.449 71.969,10.386 102.34,13.843 12.946,1.477 37.633,5.383 47.145,6.915 10.781,1.75 8.906,5.753 8.906,5.753 0,0 -0.793,3.118 -6.633,2.864 -1.453,-0.063 -21.902,-1.907 -27.175,-2.336 -11.29,-0.899 -28.301,-1.336 -43.52,-1.258 -16.383,0.098 -39.59,0.809 -62.09,2.867 -43.203,3.789 -62.433,5.781 -75.594,8.606 -4.082,0.988 -9.32,2.148 -9.261,5.515 0.039,2.442 1.953,4.504 6.468,8.899 7.5,7.293 6.344,12.761 6.653,34.629 0.429,30.195 3.832,67.16 3.32,70.117 -0.43,2.453 -3.238,3.437 -5.746,2.16 -3.473,-1.789 -10.641,-8.352 -10.641,-8.352 0,0 -0.543,1.239 0,2.852 1.426,4.355 7.168,14.031 9.477,18.152 2.121,3.782 2.613,5.266 2.601,6.692 -0.023,1.23 -1,2.636 -4.89,1.906 -2.34,-0.434 -3.219,-0.688 -5.75,-0.727 -2.949,-0.046 -6.25,1.536 -4.602,6.934 1.211,3.926 6.325,13.137 6.325,13.137"
60
+ style="fill:#254aa5;fill-opacity:1;fill-rule:nonzero;stroke:none"
61
+ id="path28" /><path
62
+ d="m 178.512,583.105 c 0,0 -1.692,10.594 -1.449,21.747 0.238,11.132 1.449,21.476 1.449,21.476 0,0 2.648,-3.848 5.172,-6.68 14.867,-16.71 31.785,-23.222 60.925,-22.199 10.133,0.356 17.25,2.141 17.25,2.141 0,0 -6.289,-3.613 -13.507,-6.199 -31.77,-11.399 -69.84,-10.286 -69.84,-10.286"
63
+ style="fill:#254aa5;fill-opacity:1;fill-rule:nonzero;stroke:none"
64
+ id="path30" /><path
65
+ d="M 118.129,41.9531 89.3906,109.055 H 63.7969 l 10.0742,-3.813 V 7.32422 L 63.7969,3.75 H 89.6758 L 80.4766,7.32422 V 90.1953 L 117.27,3.75 h 7.199 v 101.492 l 9.761,3.813 h -26.441 l 10.34,-3.813 V 41.9531"
66
+ style="fill:#254aa5;fill-opacity:1;fill-rule:nonzero;stroke:none"
67
+ id="path32" /><path
68
+ d="M 118.129,41.9531 89.3906,109.055 H 63.7969 l 10.0742,-3.813 V 7.32422 L 63.7969,3.75 H 89.6758 L 80.4766,7.32422 V 90.1953 L 117.27,3.75 h 7.199 v 101.492 l 9.761,3.813 h -26.441 l 10.34,-3.813 z"
69
+ style="fill:none;stroke:#254aa5;stroke-width:4.43;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.864;stroke-dasharray:none;stroke-opacity:1"
70
+ id="path34" /><path
71
+ d="m 215.289,42.1875 h 8.633 l -8.34,39.6484 -0.293,-1.4257 v 19.8238 l 2.301,9.317 h 5.18 L 249.504,7.32422 258.988,3.75 h -35.636 l 9.468,3.57422 -8.328,32.23438 h -9.203 v 2.6289"
72
+ style="fill:#254aa5;fill-opacity:1;fill-rule:nonzero;stroke:none"
73
+ id="path36" /><path
74
+ d="m 215.289,42.1875 h 8.633 l -8.34,39.6484 -0.293,-1.4257 v 19.8238 l 2.301,9.317 h 5.18 L 249.504,7.32422 258.988,3.75 h -35.636 l 9.468,3.57422 -8.328,32.23438 h -9.203 z"
75
+ style="fill:none;stroke:#254aa5;stroke-width:4.43;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.864;stroke-dasharray:none;stroke-opacity:1"
76
+ id="path38" /><path
77
+ d="m 215.289,80.4102 -8.617,-38.2227 h 8.617 v -2.6289 h -8.906 L 197.758,7.32422 207.242,3.75 h -25.859 l 9.754,3.57422 24.152,92.90978 V 80.4102"
78
+ style="fill:#254aa5;fill-opacity:1;fill-rule:nonzero;stroke:none"
79
+ id="path40" /><path
80
+ d="m 215.289,80.4102 -8.617,-38.2227 h 8.617 v -2.6289 h -8.906 L 197.758,7.32422 207.242,3.75 h -25.859 l 9.754,3.57422 24.152,92.90978 z"
81
+ style="fill:none;stroke:#254aa5;stroke-width:4.43;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.864;stroke-dasharray:none;stroke-opacity:1"
82
+ id="path42" /><path
83
+ d="M 371.66,76.3477 V 109.055 H 313.891 V 76.3477 h 0.859 l 10.93,29.8433 h 8.922 V 7.32422 L 322.809,3.75 h 39.664 l -11.5,3.57422 V 106.191 h 9.187 l 10.93,-29.8433 h 0.57"
84
+ style="fill:#254aa5;fill-opacity:1;fill-rule:nonzero;stroke:none"
85
+ id="path44" /><path
86
+ d="M 371.66,76.3477 V 109.055 H 313.891 V 76.3477 h 0.859 l 10.93,29.8433 h 8.922 V 7.32422 L 322.809,3.75 h 39.664 l -11.5,3.57422 V 106.191 h 9.187 l 10.93,-29.8433 z"
87
+ style="fill:none;stroke:#254aa5;stroke-width:4.43;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.864;stroke-dasharray:none;stroke-opacity:1"
88
+ id="path46" /><path
89
+ d="m 490.668,105.488 9.492,3.567 h -26.152 l 10.051,-3.567 c 0,0 0.113,-66.7497 0,-68.0661 -0.93,-11.875 -2.227,-17.3633 -5.157,-22.6953 -2.703,-4.89066 -6.898,-8.92582 -12.261,-8.64066 -5.192,0.26172 -7.09,4.05076 -7.84,6.43356 -0.403,1.25 -0.871,4.3828 -1.473,16.543 -0.105,2.0508 0,76.4255 0,76.4255 l 9.774,3.567 h -35.633 l 9.761,-3.567 c 0,0 -0.007,-61.8747 0,-63.3005 0.211,-29.3359 9.942,-34.47266 14.372,-37.29687 8.816,-3.95313 15.589,-3.40625 22.257,0.83984 3.325,2.11328 12.532,9.00393 12.809,35.98043 0.02,1.3164 0,63.7771 0,63.7771"
90
+ style="fill:#254aa5;fill-opacity:1;fill-rule:nonzero;stroke:none"
91
+ id="path48" /><path
92
+ d="m 490.668,105.488 9.492,3.567 h -26.152 l 10.051,-3.567 c 0,0 0.113,-66.7497 0,-68.0661 -0.93,-11.875 -2.227,-17.3633 -5.157,-22.6953 -2.703,-4.89066 -6.898,-8.92582 -12.261,-8.64066 -5.192,0.26172 -7.09,4.05076 -7.84,6.43356 -0.403,1.25 -0.871,4.3828 -1.473,16.543 -0.105,2.0508 0,76.4255 0,76.4255 l 9.774,3.567 h -35.633 l 9.761,-3.567 c 0,0 -0.007,-61.8747 0,-63.3005 0.211,-29.3359 9.942,-34.47266 14.372,-37.29687 8.816,-3.95313 15.589,-3.40625 22.257,0.83984 3.325,2.11328 12.532,9.00393 12.809,35.98043 0.02,1.3164 0,63.7771 0,63.7771 z"
93
+ style="fill:none;stroke:#254aa5;stroke-width:4.43;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.864;stroke-dasharray:none;stroke-opacity:1"
94
+ id="path50" /><path
95
+ d="m 591.855,3.75 h 0.86 -0.86"
96
+ style="fill:#254aa5;fill-opacity:1;fill-rule:nonzero;stroke:none"
97
+ id="path52" /><path
98
+ d="m 591.855,3.75 h 0.86 z"
99
+ style="fill:none;stroke:#254aa5;stroke-width:4.43;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.864;stroke-dasharray:none;stroke-opacity:1"
100
+ id="path54" /><path
101
+ d="m 591.855,105.242 c -2.441,0.742 -9.199,0.949 -9.199,0.949 V 62.2461 c 0,0 3.887,-0.4102 9.199,0.957 l -0.078,-4.5117 -2.5,0.4688 -6.621,0.2343 V 7.32422 L 591.855,3.75 h -35.062 l 9.766,3.57422 V 105.488 l -9.766,3.567 h 23.566 c 0,0 9.875,-0.082 11.704,-0.254 1.824,-0.16 15.554,-1.731 21.726,-10.7737 4.973,-7.2851 4.055,-17.6367 2.227,-22.1679 -2.578,-6.3399 -6.399,-9.043 -12.95,-12.168 -1.445,-0.7031 -10.351,-2.8711 -10.351,-2.8711 0,0 5.937,-1.3008 7.765,-1.4258 5.719,-0.4297 8.614,-2.7929 10.067,-6.457 0.637,-1.5898 1.555,-4.5469 2.004,-6.2109 0.476,-1.668 9.5,-39.40238 9.5,-39.40238 L 630.957,3.75 h -25.312 c 0,0 -8.887,47.6055 -9.766,50.6133 -1.074,3.7109 -4.102,4.3281 -4.102,4.3281 l 0.078,4.5117 0.579,0.2422 c 0,0 6.941,2.0625 8.046,10.2656 1.192,8.8477 0.829,15.6446 0,21.5039 -1.105,7.7932 -6.671,9.4332 -8.625,10.0272"
102
+ style="fill:#254aa5;fill-opacity:1;fill-rule:nonzero;stroke:none"
103
+ id="path56" /><path
104
+ d="m 591.855,105.242 c -2.441,0.742 -9.199,0.949 -9.199,0.949 V 62.2461 c 0,0 3.887,-0.4102 9.199,0.957 l -0.078,-4.5117 -2.5,0.4688 -6.621,0.2343 V 7.32422 L 591.855,3.75 h -35.062 l 9.766,3.57422 V 105.488 l -9.766,3.567 h 23.566 c 0,0 9.875,-0.082 11.704,-0.254 1.824,-0.16 15.554,-1.731 21.726,-10.7737 4.973,-7.2851 4.055,-17.6367 2.227,-22.1679 -2.578,-6.3399 -6.399,-9.043 -12.95,-12.168 -1.445,-0.7031 -10.351,-2.8711 -10.351,-2.8711 0,0 5.937,-1.3008 7.765,-1.4258 5.719,-0.4297 8.614,-2.7929 10.067,-6.457 0.637,-1.5898 1.555,-4.5469 2.004,-6.2109 0.476,-1.668 9.5,-39.40238 9.5,-39.40238 L 630.957,3.75 h -25.312 c 0,0 -8.887,47.6055 -9.766,50.6133 -1.074,3.7109 -4.102,4.3281 -4.102,4.3281 l 0.078,4.5117 0.579,0.2422 c 0,0 6.941,2.0625 8.046,10.2656 1.192,8.8477 0.829,15.6446 0,21.5039 -1.105,7.7932 -6.671,9.4332 -8.625,10.0272 z"
105
+ style="fill:none;stroke:#254aa5;stroke-width:4.43;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.864;stroke-dasharray:none;stroke-opacity:1"
106
+ id="path58" /><path
107
+ d="m 712.59,42.1875 h 8.621 l -8.047,39.6484 -0.574,-1.6679 v 20.066 l 2.586,9.317 h 5.176 L 746.816,7.32422 756.582,3.75 h -35.937 l 9.765,3.57422 -8.332,32.23438 h -9.488 v 2.6289"
108
+ style="fill:#254aa5;fill-opacity:1;fill-rule:nonzero;stroke:none"
109
+ id="path60" /><path
110
+ d="m 712.59,42.1875 h 8.621 l -8.047,39.6484 -0.574,-1.6679 v 20.066 l 2.586,9.317 h 5.176 L 746.816,7.32422 756.582,3.75 h -35.937 l 9.765,3.57422 -8.332,32.23438 h -9.488 z"
111
+ style="fill:none;stroke:#254aa5;stroke-width:4.43;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.864;stroke-dasharray:none;stroke-opacity:1"
112
+ id="path62" /><path
113
+ d="m 712.59,80.168 -8.047,-37.9805 h 8.047 v -2.6289 h -8.918 L 695.344,7.32422 705.117,3.75 h -26.172 l 9.493,3.57422 24.152,92.90978 V 80.168"
114
+ style="fill:#254aa5;fill-opacity:1;fill-rule:nonzero;stroke:none"
115
+ id="path64" /><path
116
+ d="m 712.59,80.168 -8.047,-37.9805 h 8.047 v -2.6289 h -8.918 L 695.344,7.32422 705.117,3.75 h -26.172 l 9.493,3.57422 24.152,92.90978 z"
117
+ style="fill:none;stroke:#254aa5;stroke-width:4.43;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.864;stroke-dasharray:none;stroke-opacity:1"
118
+ id="path66" /><path
119
+ d="m 854.883,103.098 -5.176,7.39 V 76.3477 H 850 c 0,0 5.254,20.5546 9.102,26.1643 3.652,5.301 10.312,4.707 13.261,0.156 1.825,-2.8164 4.492,-8.9453 -0.508,-27.5117 C 869.109,64.9727 846.543,3.75 846.543,3.75 h 36.211 v 32.9492 h -0.274 l -7.187,-25.0664 h -22.129 c 0,0 28.406,53.2305 31.356,67.168 3.546,16.7969 -3.993,27.3712 -12.821,30.3402 -9.719,3.261 -16.816,-6.043 -16.816,-6.043"
120
+ style="fill:#254aa5;fill-opacity:1;fill-rule:nonzero;stroke:none"
121
+ id="path68" /><path
122
+ d="m 854.883,103.098 -5.176,7.39 V 76.3477 H 850 c 0,0 5.254,20.5546 9.102,26.1643 3.652,5.301 10.312,4.707 13.261,0.156 1.825,-2.8164 4.492,-8.9453 -0.508,-27.5117 C 869.109,64.9727 846.543,3.75 846.543,3.75 h 36.211 v 32.9492 h -0.274 l -7.187,-25.0664 h -22.129 c 0,0 28.406,53.2305 31.356,67.168 3.546,16.7969 -3.993,27.3712 -12.821,30.3402 -9.719,3.261 -16.816,-6.043 -16.816,-6.043 z"
123
+ style="fill:none;stroke:#254aa5;stroke-width:4.43;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.864;stroke-dasharray:none;stroke-opacity:1"
124
+ id="path70" /><path
125
+ d="M 434.047,702.305 H 770.645 M 71,591.25 v 111.055 h 240.602"
126
+ style="fill:none;stroke:#00a990;stroke-width:8.65;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.864;stroke-dasharray:none;stroke-opacity:1"
127
+ id="path72" /><path
128
+ d="m 71.0898,133.672 0.0079,399.531"
129
+ style="fill:none;stroke:#254aa5;stroke-width:8.65;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.864;stroke-dasharray:none;stroke-opacity:1"
130
+ id="path74" /><path
131
+ d="m 670.051,294.148 c 0,0 1.023,-0.894 1.746,-1.675 10.117,-10.942 43.379,-51.821 43.379,-51.821 0,0 29.426,-13.308 80.215,-11.941 24.316,0.644 51.816,7.43 64.675,9.785 5,0.93 9.7,1.777 17.532,2.637 27.246,2.988 39.648,2.988 60.363,-10.266 5.105,-3.269 57.93,-35.301 61.492,-37.508 19.457,-12.004 47.737,-9.343 58.937,-5.742 22.61,7.305 40.07,13.184 69.87,8.856 3.76,-0.555 14.36,-2.871 14.36,-2.871 0,0 -29.12,21.339 -42.54,28.898 -18.04,10.145 -36.97,14.551 -54.62,11.23 -3.51,-0.671 -0.28,0.243 -0.28,0.243 0,0 -38.66,-9.305 -58.93,-10.274 -8.926,-0.429 -32.773,-2.558 -58.652,21.477 -12.137,12.207 -21.297,20.461 -26.438,23.664 -11.336,7.098 -26.355,8.883 -39.656,9.058 -4.434,0.063 -38.848,-1.062 -66.984,-1.902 -27.625,-0.828 -78.856,2.606 -104.344,11.453 -5.41,1.875 -20.125,6.699 -20.125,6.699"
132
+ style="fill:#00a990;fill-opacity:1;fill-rule:nonzero;stroke:none"
133
+ id="path76" /><path
134
+ d="m 1145.51,135.098 -1.15,28.172 c 0,0 -17.5,8.898 -41.11,9.32 -15.59,0.281 -32.01,-4.934 -58.37,-10.754 -11.49,-2.539 -32.4,-3.75 -46.267,5.262 -11.179,7.265 -20.234,14.062 -28.183,21.972 -3.758,3.762 -7.11,7.91 -13.203,13.852 -13.379,13.023 -18.633,15.933 -31.055,16.961 -19.727,1.609 -37.461,-2.254 -57.774,-4.074 -27.734,-2.469 -76.386,-8.036 -140.578,10.754 -3.699,1.082 -3.445,1.679 -3.445,1.679 0,0 7.727,-8 10.637,-11.008 22.554,-23.269 67,-76.648 67,-76.648 0,0 2.922,1.457 9.062,4.394 52.012,24.883 99.473,32.137 108.477,33.583 25.683,4.093 46.015,4.093 63.242,-7.645 4.941,-3.352 4.863,-3.105 10.352,-6.691 19.155,-12.461 50.165,-32.477 66.115,-37.723 17.08,-5.637 29.02,-5.93 43.68,-2.395 17.88,4.297 42.57,10.989 42.57,10.989"
135
+ style="fill:#00a990;fill-opacity:1;fill-rule:nonzero;stroke:none"
136
+ id="path78" /><path
137
+ d="M 920.703,702.285 H 1146.35 V 135"
138
+ style="fill:none;stroke:#254aa5;stroke-width:8.65;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.864;stroke-dasharray:none;stroke-opacity:1"
139
+ id="path80" /><path
140
+ d="m 444.973,433.613 -9.203,-23.64 h -30.473 l 24.433,-15.285 -9.472,-24.836 24.715,15.531 25.007,-15.531 -9.781,24.601 24.723,15.52 h -31.039 z m -29.325,-90.273 -8.91,-23.399 h -30.461 l 24.703,-15.293 -9.757,-24.824 24.718,15.274 25,-15.274 -9.769,24.602 25.012,15.515 h -31.051 z m 427.457,0 -8.925,-23.652 h -30.742 l 24.707,-15.262 -9.473,-24.844 24.707,15.516 24.465,-15.516 -9.504,24.598 24.726,15.508 h -30.761 z m -28.164,90.273 -9.199,-23.64 h -30.195 l 24.426,-15.285 -9.758,-24.836 25,15.531 24.726,-15.531 -10.078,24.601 25.02,15.52 h -30.774 z m -73.906,68.313 -8.894,-23.41 h -30.469 l 24.441,-15.528 -9.504,-24.609 24.731,15.059 24.715,-15.059 -9.766,24.609 24.727,15.528 h -30.782 z m -111.25,19.812 -8.906,-23.64 h -30.176 l 24.434,-15.051 -9.778,-25.078 24.426,15.285 25.02,-15.285 -9.754,24.836 25,15.293 h -31.067 z m -110.937,-19.355 -9.2,-23.645 h -30.46 l 24.429,-15.269 -9.484,-24.836 24.715,15.527 24.722,-15.527 -9.476,24.59 24.715,15.515 h -30.758 z"
141
+ style="fill:none;stroke:#254aa5;stroke-width:2.1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.864;stroke-dasharray:none;stroke-opacity:1"
142
+ id="path82" /></g></g></svg>
Binary file
Binary file
Binary file
package/src/index.js ADDED
@@ -0,0 +1,163 @@
1
+ /* eslint-disable no-extend-native */
2
+ import React from 'react';
3
+
4
+ import localStorage from './store';
5
+
6
+ import installAppExtras from './components/theme/AppExtras';
7
+
8
+ import { LinkElement } from './components/manage/Blocks/SlateLink/render';
9
+ import installBodyClass from './components/manage/Blocks/BodyClass';
10
+ // import installBubbleChart from './components/manage/Blocks/BubbleChart';
11
+ import installCarouselHorizontal from './components/manage/Blocks/CarouselHorizontal';
12
+ import installCddaShape from './components/manage/Blocks/CddaShape';
13
+ import installConnectedList from './components/manage/Blocks/List';
14
+ import installContactBlock from './components/manage/Blocks/ContactBlock';
15
+ // import installExplodedPiesChart from './components/manage/Blocks/ExplodedPiesChart';
16
+ import installExploreHabitats from './components/manage/Blocks/ExploreHabitats';
17
+ import installExploreSites from './components/manage/Blocks/ExploreSites';
18
+ import installExploreSpecies from './components/manage/Blocks/ExploreSpecies';
19
+ import installHabitatClassification from './components/manage/Blocks/HabitatClassification';
20
+ import installHabitatDistribution from './components/manage/Blocks/HabitatDistribution';
21
+ import installHabitatProtectedSites from './components/manage/Blocks/HabitatProtectedSites';
22
+ import installHabitatsBanner from './components/manage/Blocks/HabitatsBanner';
23
+ import installImageText from './components/manage/Blocks/ImageText';
24
+ import installLandingBlock from './components/manage/Blocks/Landing';
25
+ import installNavigationAnchors from './components/manage/Blocks/NavigationAnchors';
26
+ import installSimpleDataTable from './components/manage/Blocks/SimpleDataTable';
27
+ import installSiteBanner from './components/manage/Blocks/SiteBanner';
28
+ import installSiteHabitatsList from './components/manage/Blocks/SiteHabitatsList';
29
+ import installSiteProtectedHabitats from './components/manage/Blocks/SiteProtectedHabitats';
30
+ import installSiteProtectedSpecies from './components/manage/Blocks/SiteProtectedSpecies';
31
+ import installSiteShape from './components/manage/Blocks/SiteShape';
32
+ import installSiteSpeciesList from './components/manage/Blocks/SiteSpeciesList';
33
+ import installSlateSvg from './components/manage/Blocks/SlateSVG';
34
+ import installSpeciesBanner from './components/manage/Blocks/SpeciesBanner';
35
+ import installSpeciesClassification from './components/manage/Blocks/SpeciesClassification';
36
+ import installSpeciesDistribution from './components/manage/Blocks/SpeciesDistribution';
37
+ import installSpeciesProtectedSites from './components/manage/Blocks/SpeciesProtectedSites';
38
+ // import installStackedBarChart from './components/manage/Blocks/StackedBarChart';
39
+ import installTilesImages from './components/manage/Blocks/TilesImages';
40
+
41
+ import { LINK } from 'volto-slate/constants';
42
+
43
+ import { Header, Footer } from '@eeacms/volto-n2k/components';
44
+
45
+ import { gridSizes, variants } from './grid';
46
+
47
+ import './less/styles.less';
48
+
49
+ Array.prototype.sortByProperty = function (property, order = 'ASC') {
50
+ return this.sort((a, b) => {
51
+ if (a[property] < b[property]) return order === 'ASC' ? -1 : 1;
52
+ if (a[property] > b[property]) return order === 'ASC' ? 1 : -1;
53
+ return 0;
54
+ });
55
+ };
56
+
57
+ const applyConfig = (config) => {
58
+ config.blocks.groupBlocksOrder = [
59
+ ...config.blocks.groupBlocksOrder,
60
+ { id: 'natura_2000', title: 'Natura 2000' },
61
+ ];
62
+
63
+ config.addonReducers = {
64
+ ...config.addonReducers,
65
+ localStorage,
66
+ };
67
+
68
+ config.settings.persistentReducers.push('localStorage');
69
+
70
+ config.settings = {
71
+ ...config.settings,
72
+ multilingualRoot: '/natura2000/:lang',
73
+ multilingualPath: '/natura2000/:lang/*',
74
+ defaultLanguage: 'en',
75
+ supportedLanguages: [
76
+ 'bg',
77
+ 'hr',
78
+ 'cs',
79
+ 'da',
80
+ 'nl',
81
+ 'en',
82
+ 'et',
83
+ 'fi',
84
+ 'fr',
85
+ 'de',
86
+ 'el',
87
+ 'hu',
88
+ 'ga',
89
+ 'it',
90
+ 'lv',
91
+ 'lt',
92
+ 'mt',
93
+ 'pl',
94
+ 'pt',
95
+ 'ro',
96
+ 'sk',
97
+ 'sl',
98
+ 'es',
99
+ 'sv',
100
+ ],
101
+ };
102
+
103
+ config.settings.themes = {
104
+ ...(config.settings.themes || {}),
105
+ natura2000: {
106
+ Header: Header,
107
+ Footer: Footer,
108
+ Breadcrumbs: () => <></>,
109
+ },
110
+ };
111
+
112
+ config.blocks.blocksConfig.columnsBlock = {
113
+ ...(config.blocks.blocksConfig.columnsBlock || {}),
114
+ gridSizes: {
115
+ ...(config.blocks.blocksConfig.columnsBlock?.gridSizes || {}),
116
+ ...gridSizes,
117
+ },
118
+ variants: [
119
+ ...(config.blocks.blocksConfig.columnsBlock?.variants || []),
120
+ ...variants,
121
+ ],
122
+ };
123
+
124
+ config.settings.slate.elements[LINK] = LinkElement;
125
+
126
+ return [
127
+ installAppExtras,
128
+
129
+ installBodyClass,
130
+ // installBubbleChart,
131
+ installCarouselHorizontal,
132
+ installCddaShape,
133
+ installConnectedList,
134
+ installContactBlock,
135
+ // installExplodedPiesChart,
136
+ installExploreHabitats,
137
+ installExploreSites,
138
+ installExploreSpecies,
139
+ installHabitatClassification,
140
+ installHabitatDistribution,
141
+ installHabitatProtectedSites,
142
+ installHabitatsBanner,
143
+ installImageText,
144
+ installLandingBlock,
145
+ installNavigationAnchors,
146
+ installSimpleDataTable,
147
+ installSiteBanner,
148
+ installSiteHabitatsList,
149
+ installSiteProtectedHabitats,
150
+ installSiteProtectedSpecies,
151
+ installSiteShape,
152
+ installSiteSpeciesList,
153
+ installSlateSvg,
154
+ installSpeciesBanner,
155
+ installSpeciesClassification,
156
+ installSpeciesDistribution,
157
+ installSpeciesProtectedSites,
158
+ // installStackedBarChart,
159
+ installTilesImages,
160
+ ].reduce((acc, apply) => apply(acc), config);
161
+ };
162
+
163
+ export default applyConfig;
@@ -0,0 +1,3 @@
1
+ @import (multiple, reference, optional) '../../theme.config';
2
+
3
+ @import './variables.less';