imio.smartweb.core 1.2.37__py3-none-any.whl → 1.2.79__py3-none-any.whl

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 (222) hide show
  1. imio/smartweb/core/behaviors/categorization.py +24 -0
  2. imio/smartweb/core/behaviors/configure.zcml +7 -0
  3. imio/smartweb/core/browser/controlpanel.py +43 -0
  4. imio/smartweb/core/browser/faceted/block_view.pt +4 -4
  5. imio/smartweb/core/browser/faceted/summary_view.pt +4 -4
  6. imio/smartweb/core/browser/sitemap.py +10 -3
  7. imio/smartweb/core/browser/static/icons/action-delete.svg +3 -0
  8. imio/smartweb/core/browser/static/icons/action-engagement-2.svg +4 -0
  9. imio/smartweb/core/browser/static/icons/action-panneaux.svg +3 -0
  10. imio/smartweb/core/browser/static/icons/action-vote.svg +3 -0
  11. imio/smartweb/core/browser/static/icons/categorie-attention.svg +3 -0
  12. imio/smartweb/core/browser/static/icons/categorie-infos-travaux-2.svg +4 -0
  13. imio/smartweb/core/browser/static/icons/categorie-nature.svg +3 -0
  14. imio/smartweb/core/browser/static/icons/categorie-parcs-a-conteneurs.svg +4 -0
  15. imio/smartweb/core/browser/static/icons/categorie-plus.svg +3 -0
  16. imio/smartweb/core/browser/static/icons/categorie-primes-2.svg +5 -0
  17. imio/smartweb/core/browser/static/icons/categorie-sport-natation.svg +4 -0
  18. imio/smartweb/core/browser/static/icons/organisation-ecole-sac.svg +4 -0
  19. imio/smartweb/core/browser/static/icons/organisation-scout.svg +3 -0
  20. imio/smartweb/core/browser/static/icons/reseausocial-behance.svg +3 -0
  21. imio/smartweb/core/browser/static/icons/reseausocial-linkedin.svg +3 -0
  22. imio/smartweb/core/browser/static/smartweb-edit-compiled.css +1 -1
  23. imio/smartweb/core/browser/static/smartweb-view-compiled.css +1 -1
  24. imio/smartweb/core/browser/static/src/edit.less +42 -0
  25. imio/smartweb/core/browser/static/src/view.less +109 -56
  26. imio/smartweb/core/browser/vocabulary.py +8 -3
  27. imio/smartweb/core/contents/__init__.py +2 -0
  28. imio/smartweb/core/contents/configure.zcml +1 -0
  29. imio/smartweb/core/contents/folder/block_view.pt +8 -8
  30. imio/smartweb/core/contents/folder/summary_view.pt +4 -4
  31. imio/smartweb/core/contents/pages/cirkwi/content.py +5 -0
  32. imio/smartweb/core/contents/pages/cirkwi/view.py +2 -1
  33. imio/smartweb/core/contents/pages/configure.zcml +1 -0
  34. imio/smartweb/core/contents/pages/portal_page/view.py +3 -0
  35. imio/smartweb/core/contents/pages/views.py +47 -1
  36. imio/smartweb/core/contents/publication/__init__.py +0 -0
  37. imio/smartweb/core/contents/publication/configure.zcml +5 -0
  38. imio/smartweb/core/contents/publication/content.py +23 -0
  39. imio/smartweb/core/contents/rest/base.py +9 -7
  40. imio/smartweb/core/contents/rest/directory/endpoint.py +2 -2
  41. imio/smartweb/core/contents/rest/directory/view.pt +2 -1
  42. imio/smartweb/core/contents/rest/events/content.py +13 -0
  43. imio/smartweb/core/contents/rest/events/endpoint.py +5 -3
  44. imio/smartweb/core/contents/rest/events/view.pt +5 -1
  45. imio/smartweb/core/contents/rest/events/view.py +12 -0
  46. imio/smartweb/core/contents/rest/news/content.py +6 -0
  47. imio/smartweb/core/contents/rest/news/endpoint.py +4 -2
  48. imio/smartweb/core/contents/rest/news/view.pt +4 -1
  49. imio/smartweb/core/contents/rest/news/view.py +8 -0
  50. imio/smartweb/core/contents/rest/utils.py +0 -1
  51. imio/smartweb/core/contents/rest/view.py +4 -0
  52. imio/smartweb/core/contents/sections/common_templates/carousel.pt +5 -1
  53. imio/smartweb/core/contents/sections/common_templates/table.pt +18 -4
  54. imio/smartweb/core/contents/sections/configure.zcml +18 -0
  55. imio/smartweb/core/contents/sections/contact/content.py +2 -2
  56. imio/smartweb/core/contents/sections/contact/macros.pt +28 -3
  57. imio/smartweb/core/contents/sections/contact/utils.py +2 -0
  58. imio/smartweb/core/contents/sections/contact/view.py +28 -12
  59. imio/smartweb/core/contents/sections/events/content.py +12 -4
  60. imio/smartweb/core/contents/sections/events/view.py +20 -2
  61. imio/smartweb/core/contents/sections/external_content/view.pt +4 -4
  62. imio/smartweb/core/contents/sections/external_content/views.py +6 -4
  63. imio/smartweb/core/contents/sections/files/content.py +7 -1
  64. imio/smartweb/core/contents/sections/files/view.py +43 -12
  65. imio/smartweb/core/contents/sections/links/view.py +5 -0
  66. imio/smartweb/core/contents/sections/macros.pt +26 -0
  67. imio/smartweb/core/contents/sections/news/content.py +11 -3
  68. imio/smartweb/core/contents/sections/news/view.py +20 -2
  69. imio/smartweb/core/contents/sections/text/views.py +2 -0
  70. imio/smartweb/core/contents/sections/views.py +73 -10
  71. imio/smartweb/core/interfaces.py +4 -0
  72. imio/smartweb/core/profiles/default/metadata.xml +1 -1
  73. imio/smartweb/core/profiles/default/taxonomies/page_category.xml +16 -0
  74. imio/smartweb/core/profiles/default/taxonomies/procedure_category.xml +26 -0
  75. imio/smartweb/core/profiles/default/types/imio.smartweb.EventsView.xml +1 -0
  76. imio/smartweb/core/profiles/default/types/imio.smartweb.NewsView.xml +1 -0
  77. imio/smartweb/core/profiles/default/types/imio.smartweb.Publication.xml +38 -0
  78. imio/smartweb/core/profiles/default/types/imio.smartweb.SectionEvents.xml +1 -0
  79. imio/smartweb/core/profiles/default/types/imio.smartweb.SectionFiles.xml +2 -0
  80. imio/smartweb/core/profiles/default/types/imio.smartweb.SectionNews.xml +1 -0
  81. imio/smartweb/core/profiles/default/types.xml +1 -0
  82. imio/smartweb/core/profiles/icons/basic/registry.xml +120 -0
  83. imio/smartweb/core/rest/authentic_sources.py +17 -2
  84. imio/smartweb/core/subscribers.py +48 -0
  85. imio/smartweb/core/subscribers.zcml +12 -0
  86. imio/smartweb/core/tests/resources/json_iadeliberations_institutions.json +60 -0
  87. imio/smartweb/core/tests/resources/json_iadeliberations_publication.json +105 -0
  88. imio/smartweb/core/tests/resources/json_iadeliberations_publications.json +270 -0
  89. imio/smartweb/core/tests/resources/json_rest_events.json +6 -2
  90. imio/smartweb/core/tests/resources/json_rest_news.json +2 -2
  91. imio/smartweb/core/tests/resources/json_rest_specific_events.json +1 -1
  92. imio/smartweb/core/tests/test_htmx_in_sections.py +131 -0
  93. imio/smartweb/core/tests/test_iadeliberations.py +136 -0
  94. imio/smartweb/core/tests/test_icons.py +1 -1
  95. imio/smartweb/core/tests/test_rest.py +58 -17
  96. imio/smartweb/core/tests/test_section_contact.py +42 -10
  97. imio/smartweb/core/tests/test_section_events.py +28 -5
  98. imio/smartweb/core/tests/test_section_external_content.py +28 -2
  99. imio/smartweb/core/tests/test_section_news.py +30 -8
  100. imio/smartweb/core/tests/test_sections.py +17 -0
  101. imio/smartweb/core/tests/test_vocabularies.py +60 -3
  102. imio/smartweb/core/tests/test_vocabulary.py +43 -0
  103. imio/smartweb/core/upgrades/configure.zcml +108 -0
  104. imio/smartweb/core/upgrades/profiles/1055_to_1056/types/imio.smartweb.SectionFiles.xml +12 -0
  105. imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.EventsView.xml +11 -0
  106. imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.NewsView.xml +11 -0
  107. imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.SectionEvents.xml +11 -0
  108. imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.SectionNews.xml +11 -0
  109. imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/page_category.cfg +9 -0
  110. imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/page_category.xml +73 -0
  111. imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/procedure_category.cfg +9 -0
  112. imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/procedure_category.xml +118 -0
  113. imio/smartweb/core/upgrades/profiles/1058_to_1059/registry/linkedin-icon.xml +126 -0
  114. imio/smartweb/core/upgrades/profiles/1059_to_1060/registry/iadeliberation.xml +9 -0
  115. imio/smartweb/core/upgrades/profiles/1060_to_1061/types/imio.smartweb.Publication.xml +38 -0
  116. imio/smartweb/core/upgrades/profiles/1060_to_1061/types/imio.smartweb.SectionFiles.xml +11 -0
  117. imio/smartweb/core/upgrades/profiles/1060_to_1061/types.xml +4 -0
  118. imio/smartweb/core/upgrades/profiles/1060_to_1061/workflows.xml +6 -0
  119. imio/smartweb/core/utils.py +33 -2
  120. imio/smartweb/core/viewlets/configure.zcml +23 -1
  121. imio/smartweb/core/viewlets/footer.pt +5 -0
  122. imio/smartweb/core/viewlets/footer.py +5 -0
  123. imio/smartweb/core/viewlets/htmx.py +15 -0
  124. imio/smartweb/core/viewlets/htmx_js_header.pt +64 -0
  125. imio/smartweb/core/viewlets/ogptags.py +4 -3
  126. imio/smartweb/core/viewlets/social.py +23 -0
  127. imio/smartweb/core/vocabularies.py +65 -3
  128. imio/smartweb/core/vocabularies.zcml +18 -0
  129. imio/smartweb/core/webcomponents/build/1c1605a5fe9a2b10a88f.png +1 -0
  130. imio/smartweb/core/webcomponents/build/524db40e119aa11f4478.png +1 -0
  131. imio/smartweb/core/webcomponents/build/57d3b7cb1ab874660b39.svg +1 -0
  132. imio/smartweb/core/webcomponents/build/6cf03871df23ed2ee8b3.png +1 -0
  133. imio/smartweb/core/webcomponents/build/css/373.smartweb-webcomponents-compiled.css +1 -1
  134. imio/smartweb/core/webcomponents/build/css/486.smartweb-webcomponents-compiled.css +1 -1
  135. imio/smartweb/core/webcomponents/build/css/884.smartweb-webcomponents-compiled.css +1 -0
  136. imio/smartweb/core/webcomponents/build/css/919.smartweb-webcomponents-compiled.css +1 -1
  137. imio/smartweb/core/webcomponents/build/css/smartweb-webcomponents-compiled.css +1 -1
  138. imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js +1 -1
  139. imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js.LICENSE.txt +10 -8
  140. imio/smartweb/core/webcomponents/build/js/373.smartweb-webcomponents-compiled.js +2 -1
  141. imio/smartweb/core/webcomponents/build/js/{568.smartweb-webcomponents-compiled.js.LICENSE.txt → 373.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -4
  142. imio/smartweb/core/webcomponents/build/js/486.smartweb-webcomponents-compiled.js +1 -1
  143. imio/smartweb/core/webcomponents/build/js/499.smartweb-webcomponents-compiled.js +2 -0
  144. imio/smartweb/core/webcomponents/build/js/{674.smartweb-webcomponents-compiled.js.LICENSE.txt → 499.smartweb-webcomponents-compiled.js.LICENSE.txt} +1 -8
  145. imio/smartweb/core/webcomponents/build/js/799.smartweb-webcomponents-compiled.js +1 -1
  146. imio/smartweb/core/webcomponents/build/js/824.smartweb-webcomponents-compiled.js +2 -0
  147. imio/smartweb/core/webcomponents/build/js/828.smartweb-webcomponents-compiled.js +2 -0
  148. imio/smartweb/core/webcomponents/build/js/828.smartweb-webcomponents-compiled.js.LICENSE.txt +32 -0
  149. imio/smartweb/core/webcomponents/build/js/884.smartweb-webcomponents-compiled.js +1 -0
  150. imio/smartweb/core/webcomponents/build/js/919.smartweb-webcomponents-compiled.js +1 -1
  151. imio/smartweb/core/webcomponents/build/js/{568.smartweb-webcomponents-compiled.js → 963.smartweb-webcomponents-compiled.js} +2 -2
  152. imio/smartweb/core/webcomponents/build/js/963.smartweb-webcomponents-compiled.js.LICENSE.txt +3 -0
  153. imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js +1 -1
  154. imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js.LICENSE.txt +11 -14
  155. imio/smartweb/core/webcomponents/package.json +42 -40
  156. imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.jsx +146 -79
  157. imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.scss +415 -351
  158. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactCard/ContactCard.jsx +95 -62
  159. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +328 -168
  160. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactList/ContactList.jsx +21 -4
  161. imio/smartweb/core/webcomponents/src/components/Annuaire/Filters/Filter.jsx +213 -100
  162. imio/smartweb/core/webcomponents/src/components/Annuaire/index.js +1 -1
  163. imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx +76 -33
  164. imio/smartweb/core/webcomponents/src/components/Events/EventContent/EventContent.jsx +604 -377
  165. imio/smartweb/core/webcomponents/src/components/Events/EventList/EventList.jsx +29 -4
  166. imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +162 -88
  167. imio/smartweb/core/webcomponents/src/components/Events/Events.scss +496 -378
  168. imio/smartweb/core/webcomponents/src/components/Events/Filters/Filter.jsx +259 -91
  169. imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.jsx +62 -55
  170. imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.scss +68 -17
  171. imio/smartweb/core/webcomponents/src/components/Filters/IamData.jsx +42 -0
  172. imio/smartweb/core/webcomponents/src/components/Filters/MainFilter.scss +229 -0
  173. imio/smartweb/core/webcomponents/src/components/Filters/PublicTargetData.jsx +94 -0
  174. imio/smartweb/core/webcomponents/src/components/Filters/SelectStyles.js +58 -0
  175. imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.jsx +149 -0
  176. imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.scss +70 -0
  177. imio/smartweb/core/webcomponents/src/components/News/Filters/Filter.jsx +139 -83
  178. imio/smartweb/core/webcomponents/src/components/News/News.jsx +133 -67
  179. imio/smartweb/core/webcomponents/src/components/News/News.scss +170 -127
  180. imio/smartweb/core/webcomponents/src/components/News/NewsCard/NewsCard.jsx +76 -44
  181. imio/smartweb/core/webcomponents/src/components/News/NewsContent/NewsContent.jsx +261 -188
  182. imio/smartweb/core/webcomponents/src/components/News/NewsList/NewsList.jsx +48 -9
  183. imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx +21 -10
  184. imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx +21 -10
  185. imio/smartweb/core/webcomponents/src/components/Search/Filters/Filter.jsx +8 -9
  186. imio/smartweb/core/webcomponents/src/components/Search/NewsResult/NewsResult.jsx +23 -12
  187. imio/smartweb/core/webcomponents/src/components/Search/Search.jsx +7 -6
  188. imio/smartweb/core/webcomponents/src/components/Search/Search.scss +115 -96
  189. imio/smartweb/core/webcomponents/src/components/Search/WebResult/WebResult.jsx +12 -3
  190. imio/smartweb/core/webcomponents/src/components/Search/index.js +1 -1
  191. imio/smartweb/core/webcomponents/src/hooks/ScrollContext.jsx +3 -0
  192. imio/smartweb/core/webcomponents/src/hooks/useAxios.js +3 -3
  193. imio/smartweb/core/webcomponents/src/hooks/useFilterQuery.js +1 -2
  194. imio/smartweb/core/webcomponents/src/index.scss +255 -211
  195. imio/smartweb/core/webcomponents/src/utils/Map.jsx +26 -19
  196. imio/smartweb/core/webcomponents/src/utils/Map.scss +2 -2
  197. imio/smartweb/core/webcomponents/src/utils/translation.js +129 -9
  198. imio.smartweb.core-1.2.79-py3.8-nspkg.pth +2 -0
  199. {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/METADATA +413 -10
  200. {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/RECORD +206 -160
  201. {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/WHEEL +1 -1
  202. imio/smartweb/core/webcomponents/build/assets/location-bla.1423bcce16ddcb21141430cac1428dc1.svg +0 -1
  203. imio/smartweb/core/webcomponents/build/assets/next-react-white.819cb069ac8eec300a9db6a7707712d6.svg +0 -1
  204. imio/smartweb/core/webcomponents/build/assets/next-react.17bc43ff4a6a86f4520f5782f6a89a72.svg +0 -1
  205. imio/smartweb/core/webcomponents/build/assets/search.57bdbf5b191499cd77514097d1c4972c.svg +0 -1
  206. imio/smartweb/core/webcomponents/build/css/686.smartweb-webcomponents-compiled.css +0 -1
  207. imio/smartweb/core/webcomponents/build/js/209.smartweb-webcomponents-compiled.js +0 -2
  208. imio/smartweb/core/webcomponents/build/js/674.smartweb-webcomponents-compiled.js +0 -2
  209. imio/smartweb/core/webcomponents/build/js/686.smartweb-webcomponents-compiled.js +0 -1
  210. imio/smartweb/core/webcomponents/build/js/804.smartweb-webcomponents-compiled.js +0 -1
  211. imio/smartweb/core/webcomponents/src/assets/facebook-news.svg +0 -1
  212. imio/smartweb/core/webcomponents/src/assets/location-bla.svg +0 -1
  213. imio/smartweb/core/webcomponents/src/assets/next-react.svg +0 -1
  214. imio/smartweb/core/webcomponents/src/assets/search.svg +0 -1
  215. imio/smartweb/core/webcomponents/src/assets/skeleton.svg +0 -1
  216. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/download.svg +0 -1
  217. imio.smartweb.core-1.2.37-py3.10-nspkg.pth +0 -3
  218. /imio/smartweb/core/webcomponents/build/js/{209.smartweb-webcomponents-compiled.js.LICENSE.txt → 824.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -0
  219. {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/LICENSE.GPL +0 -0
  220. {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/LICENSE.rst +0 -0
  221. {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/namespace_packages.txt +0 -0
  222. {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/top_level.txt +0 -0
@@ -1,393 +1,620 @@
1
- import { useHistory } from "react-router-dom";
2
- import React, { useEffect, useState } from "react";
1
+ import { useNavigate } from "react-router-dom";
2
+ import React, { useEffect, useState, useRef } from "react";
3
3
  import useAxios from "../../../hooks/useAxios";
4
4
  import useFilterQuery from "../../../hooks/useFilterQuery";
5
5
  import moment from "moment";
6
- import ReactMarkdown from 'react-markdown'
6
+ import ReactMarkdown from "react-markdown";
7
7
  import Spotlight from "spotlight.js";
8
- import "../../../../node_modules/flexbin/flexbin.css"
8
+ import "../../../../node_modules/flexbin/flexbin.css";
9
9
  import { Translate } from "react-translated";
10
+ import queryString from "query-string";
10
11
 
11
- const ContactContent = ({ queryUrl, onChange }) => {
12
- let history = useHistory();
13
- const queryString = require("query-string");
14
- const { u, ...parsed } = Object.assign(
15
- { UID: queryString.parse(useFilterQuery().toString())['u'], fullobjects: 1 },
16
- );
17
- const [params, setParams] = useState(parsed);
18
- const [item, setitem] = useState({});
19
- const [files, setFiles] = useState();
20
- const [gallery, setGallery] = useState();
21
- const { response, error, isLoading } = useAxios(
22
- {
23
- method: "get",
24
- url: "",
25
- baseURL: queryUrl,
26
- headers: {
27
- Accept: "application/json",
28
- },
29
- params: params,
30
- },
31
- []
32
- );
33
- useEffect(() => {
34
- setParams(parsed)
35
- }, [queryString.parse(useFilterQuery().toString())['u']]);
36
- // set all contacts state
37
- useEffect(() => {
38
- if (response !== null) {
39
- setitem(response.items[0]);
40
- }
41
- window.scrollTo(0, 0);
42
- }, [response]);
43
-
44
- /// use to set file and gallery items
45
- useEffect(() => {
46
- if (item.items && item.items.length > 0) {
47
- setFiles(item.items.filter(files => files['@type'] === 'File'));
48
- setGallery(item.items.filter(files => files['@type'] === 'Image'));
49
- }
50
- }, [item]);
12
+ const ContactContent = ({ queryUrl, onChange, onlyPastEvents, contextAuthenticatedUser }) => {
13
+ let navigate = useNavigate();
14
+ const { u, ...parsed } = Object.assign({
15
+ UID: queryString.parse(useFilterQuery().toString())["u"],
16
+ fullobjects: 1,
17
+ "event_dates.query": moment().format("YYYY-MM-DD"),
18
+ "event_dates.range": onlyPastEvents === "True" ? "max" : "min",
19
+ });
20
+ const [params, setParams] = useState(parsed);
21
+ const [item, setitem] = useState({});
22
+ const [recurence, setRecurence] = useState([]);
23
+ const [files, setFiles] = useState();
24
+ const [gallery, setGallery] = useState();
25
+ const [isSchedulVisible, setSchedulVisibility] = useState(false);
26
+ const modalRef = useRef();
27
+ const { response, error, isLoading } = useAxios(
28
+ {
29
+ method: "get",
30
+ url: "",
31
+ baseURL: queryUrl,
32
+ headers: {
33
+ Accept: "application/json",
34
+ },
35
+ params: params,
36
+ },
37
+ []
38
+ );
39
+ useEffect(() => {
40
+ setParams(parsed);
41
+ }, [queryString.parse(useFilterQuery().toString())["u"]]);
42
+ // set all contacts state
43
+ useEffect(() => {
44
+ if (response !== null) {
45
+ setitem(response.items[0]);
46
+ // set recurrence
47
+ if (response.items.length > 1) {
48
+ response.items.map((item, i) => {
49
+ const currentDate = new Date();
50
+ const itemDate = new Date(item.start);
51
+ if (itemDate >= currentDate) {
52
+ setRecurence((prevRecurrence) => [...prevRecurrence, item.start]);
53
+ }
54
+ });
55
+ } else {
56
+ setRecurence(null);
57
+ }
58
+ }
59
+ window.scrollTo({
60
+ top: 0,
61
+ left: 0,
62
+ behavior: "instant",
63
+ });
64
+ }, [response]);
65
+ /// use to set file and gallery items
66
+ useEffect(() => {
67
+ if (item.items && item.items.length > 0) {
68
+ setFiles(item.items.filter((files) => files["@type"] === "File"));
69
+ setGallery(item.items.filter((files) => files["@type"] === "Image"));
70
+ }
71
+ }, [item]);
51
72
 
52
73
  function handleClick() {
53
- history.push("./");
74
+ navigate("..");
54
75
  onChange(null);
55
76
  }
56
- moment.locale('be');
57
- const start = moment.utc(item.start).format('DD-MM-YYYY');
58
- const end = moment.utc(item.end).format('DD-MM-YYYY');
59
- const startHours = moment.utc(item.start).format('LT');
60
- const endHours = moment.utc(item.end).format('LT');
61
77
 
62
- let itineraryLink =
63
- "https://www.google.com/maps/dir/?api=1&destination=" +
64
- item.street +
65
- "+" +
66
- item.number +
67
- "+" +
68
- item.complement +
69
- "+" +
70
- item.zipcode +
71
- "+" +
72
- item.city
73
- itineraryLink = itineraryLink.replaceAll('+null', '')
74
- return (
75
- <div className="envent-content r-content">
76
- <button type="button" onClick={handleClick}>
77
- <Translate text="Retour" />
78
- </button>
79
- <article>
80
- <header>
81
- <h2 className="r-content-title">{item.title}</h2>
82
- </header>
83
- <figure>
84
- <div
85
- className="r-content-img"
86
- style={{
87
- backgroundImage: item.image_affiche_scale
88
- ? "url(" + item.image_affiche_scale + ")"
89
- : "",
90
- }}
91
- />
92
- </figure>
93
- <span className="news-info-title"><Translate text="Infos pratiques" /></span>
94
- <div className="r-content-news-info">
95
- <div className="r-content-news-info-container">
96
- {/* date */}
97
- <div className="r-content-news-info-schedul">
98
- <div className="icon-baseline">
99
- <svg
100
- xmlns="http://www.w3.org/2000/svg"
101
- preserveAspectRatio="xMinYMin"
102
- viewBox="0 0 19.41 19.41"
103
- >
104
- <path d="M16.09,2.74H14.35V.85a.44.44,0,0,0-.43-.44H12.47A.44.44,0,0,0,12,.85V2.74H7.38V.85A.44.44,0,0,0,7,.41H5.5a.44.44,0,0,0-.44.44V2.74H3.32A1.74,1.74,0,0,0,1.58,4.48V17.26A1.74,1.74,0,0,0,3.32,19H16.09a1.74,1.74,0,0,0,1.75-1.74V4.48A1.74,1.74,0,0,0,16.09,2.74Zm-.21,14.52H3.54A.22.22,0,0,1,3.32,17h0V6.22H16.09V17a.21.21,0,0,1-.21.22Z" />
105
- </svg>
106
- </div>
107
- <div className="dpinlb">
108
- <div className="r-content-news-info--date">
109
- {start === end
110
- ? (<div>
111
- {item.whole_day
112
- ? <div className="r-content-date-start">
113
- <span>Le&nbsp;</span>
114
- <div className="r-time">{start}</div>
115
- </div>
116
- : item.open_end ?
117
- <>
118
- <div className="r-content-date-one-day">
119
- <div className="r-content-date-start">
120
- <span>Le&nbsp;</span>
121
- <div className="r-time">{start}</div>
122
- <span>&nbsp;à&nbsp;</span>
123
- <div className="r-time-hours">{startHours}</div>
124
- </div>
78
+ // ref to toggle
79
+
80
+ useEffect(() => {
81
+ const handleClickOutside = (event) => {
82
+ if (modalRef.current && !modalRef.current.contains(event.target)) {
83
+ closeSchedul();
84
+ }
85
+ };
86
+
87
+ document.addEventListener("mousedown", handleClickOutside);
88
+
89
+ return () => {
90
+ document.removeEventListener("mousedown", handleClickOutside);
91
+ };
92
+ }, []);
93
+
94
+ // moment
95
+ moment.locale("be");
96
+ const start = moment.utc(item.start).format("DD-MM-YYYY");
97
+ const end = moment.utc(item.end).format("DD-MM-YYYY");
98
+ const startHours = moment.utc(item.start).format("LT");
99
+ const endHours = moment.utc(item.end).format("LT");
100
+
101
+ // Trouver la date la plus proche dans le futur
102
+ const now = moment();
103
+ const futureDates = recurence && recurence.filter((date) => moment(date).isAfter(now));
104
+
105
+ let itineraryLink =
106
+ "https://www.google.com/maps/dir/?api=1&destination=" +
107
+ item.street +
108
+ "+" +
109
+ item.number +
110
+ "+" +
111
+ item.complement +
112
+ "+" +
113
+ item.zipcode +
114
+ "+" +
115
+ item.city;
116
+ itineraryLink = itineraryLink.replaceAll("+null", "");
117
+
118
+ const openSchedul = () => {
119
+ setSchedulVisibility(true);
120
+ };
121
+ const closeSchedul = () => {
122
+ setSchedulVisibility(false);
123
+ };
124
+ return (
125
+ <div className="envent-content r-content">
126
+ <button type="button" onClick={handleClick}>
127
+ <Translate text="Retour" />
128
+ </button>
129
+
130
+ {contextAuthenticatedUser === "False" ? (
131
+ <a
132
+ href={item["@id"]}
133
+ target="_blank"
134
+ title="Editer la fiche"
135
+ className="edit-rest-elements edit-rest-elements-content"
136
+ >
137
+ <svg
138
+ xmlns="http://www.w3.org/2000/svg"
139
+ width="16"
140
+ height="16"
141
+ fill="currentColor"
142
+ class="bi bi-pencil-square"
143
+ viewBox="0 0 16 16"
144
+ >
145
+ <path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z" />
146
+ <path
147
+ fill-rule="evenodd"
148
+ d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"
149
+ />
150
+ </svg>
151
+ </a>
152
+ ) : (
153
+ ""
154
+ )}
125
155
 
126
- </div>
127
- </>
128
- :
129
- <>
130
- <div className="r-content-date-one-day">
131
- <div className="r-content-date-start">
132
- <span>Le&nbsp;</span>
133
- <div className="r-time">{start}</div>
134
- </div>
135
- <div className="r-content-date-start-hours">
136
- <span>de&nbsp;</span>
137
- <div className="r-time-hours">{startHours}</div>
138
- <span>&nbsp;à&nbsp;</span>
139
- <div className="r-time-hours">{endHours}</div>
140
- </div>
141
- </div>
142
- </>
143
- }
144
- </div>)
145
- : (<div className="r-content-date-du-au">
146
- <div className="r-content-date-start">
147
- <span>Du&nbsp;</span>
148
- <div className="r-time">{start}</div>
149
- </div>
150
- <div className="r-content-date-end">
151
- <span>&nbsp;au&nbsp;</span>
152
- <div className="r-time">{end}</div>
153
- </div>
154
- </div>)
155
- }
156
- </div>
157
- </div>
158
- </div>
159
- {/* adress */}
160
- <div className="r-content-news-info-aera">
161
- {item.street ? (
162
- <div className="icon-baseline">
163
- <svg
164
- xmlns="http://www.w3.org/2000/svg"
165
- viewBox="0 0 19.41 19.41"
166
- >
167
- <path d="M9,18.34C3.9,10.94,3,10.18,3,7.45a6.75,6.75,0,0,1,13.49,0c0,2.73-.94,3.49-6,10.89a.85.85,0,0,1-1.17.22A.77.77,0,0,1,9,18.34Zm.7-8.07A2.82,2.82,0,1,0,6.89,7.45a2.83,2.83,0,0,0,2.82,2.82Z" />
168
- </svg>
169
- </div>
170
- ) : (
171
- ""
172
- )}
156
+ <article>
157
+ <header className="r-content-header">
158
+ <h2 className="r-content-title">{item.title}</h2>
159
+ {item.local_category ? (
160
+ <span className="r-content-title-cat">{item.local_category.title}</span>
161
+ ) : (
162
+ ""
163
+ )}
164
+ {item.category ? (
165
+ <span className="r-content-title-cat">{item.category.title}</span>
166
+ ) : (
167
+ ""
168
+ )}
169
+ <span></span>
170
+ </header>
171
+ <figure>
172
+ <div
173
+ className="r-content-img"
174
+ style={{
175
+ backgroundImage: item.image_affiche_scale
176
+ ? "url(" + item.image_affiche_scale + ")"
177
+ : "",
178
+ }}
179
+ />
180
+ </figure>
181
+ <span className="news-info-title">
182
+ <Translate text="Infos pratiques" />
183
+ </span>
184
+ <div className="r-content-news-info">
185
+ <div className="r-content-news-info-container">
186
+ {/* date */}
187
+ <div className="r-content-news-info-schedul">
188
+ <div className="icon-baseline">
189
+ <svg
190
+ xmlns="http://www.w3.org/2000/svg"
191
+ preserveAspectRatio="xMinYMin"
192
+ viewBox="0 0 19.41 19.41"
193
+ >
194
+ <path d="M16.09,2.74H14.35V.85a.44.44,0,0,0-.43-.44H12.47A.44.44,0,0,0,12,.85V2.74H7.38V.85A.44.44,0,0,0,7,.41H5.5a.44.44,0,0,0-.44.44V2.74H3.32A1.74,1.74,0,0,0,1.58,4.48V17.26A1.74,1.74,0,0,0,3.32,19H16.09a1.74,1.74,0,0,0,1.75-1.74V4.48A1.74,1.74,0,0,0,16.09,2.74Zm-.21,14.52H3.54A.22.22,0,0,1,3.32,17h0V6.22H16.09V17a.21.21,0,0,1-.21.22Z" />
195
+ </svg>
196
+ </div>
197
+ <div ref={modalRef} className="dpinlb">
198
+ {!recurence && (
199
+ <div className="r-content-news-info--date">
200
+ {start === end ? (
201
+ <div>
202
+ {item.whole_day ? (
203
+ <div className="r-content-date-start">
204
+ <span>
205
+ <Translate text="Le" />
206
+ &nbsp;
207
+ </span>
208
+ <div className="r-time">{start}</div>
209
+ </div>
210
+ ) : item.open_end ? (
211
+ <>
212
+ <div className="r-content-date-one-day">
213
+ <div className="r-content-date-start">
214
+ <span>
215
+ <Translate text="Le" />
216
+ &nbsp;
217
+ </span>
218
+ <div className="r-time">
219
+ {start}
220
+ </div>
221
+ <span>
222
+ &nbsp;
223
+ <Translate text="à" />
224
+ &nbsp;
225
+ </span>
226
+ <div className="r-time-hours">
227
+ {startHours}
228
+ </div>
229
+ </div>
230
+ </div>
231
+ </>
232
+ ) : (
233
+ <>
234
+ <div className="r-content-date-one-day">
235
+ <div className="r-content-date-start">
236
+ <span>
237
+ <Translate text="Le" />
238
+ &nbsp;
239
+ </span>
240
+ <div className="r-time">
241
+ {start}
242
+ </div>
243
+ </div>
244
+ <div className="r-content-date-start-hours">
245
+ <span>
246
+ <Translate text="de" />
247
+ &nbsp;
248
+ </span>
249
+ <div className="r-time-hours">
250
+ {startHours}
251
+ </div>
252
+ <span>
253
+ &nbsp;
254
+ <Translate text="à" />
255
+ &nbsp;
256
+ </span>
257
+ <div className="r-time-hours">
258
+ {endHours}
259
+ </div>
260
+ </div>
261
+ </div>
262
+ </>
263
+ )}
264
+ </div>
265
+ ) : (
266
+ <div className="r-content-date-du-au">
267
+ <div className="r-content-date-start">
268
+ <span>Du&nbsp;</span>
269
+ <div className="r-time">{start}</div>
270
+ </div>
271
+ <div className="r-content-date-end">
272
+ <span>&nbsp;au&nbsp;</span>
273
+ <div className="r-time">{end}</div>
274
+ </div>
275
+ </div>
276
+ )}
277
+ </div>
278
+ )}
279
+ {recurence && (
280
+ <a
281
+ onClick={openSchedul}
282
+ className="recurence-schedul"
283
+ role="button"
284
+ aria-expanded="false"
285
+ >
286
+ <p>
287
+ {item.whole_day ? (
288
+ moment(futureDates[0]).format("DD-MM-YYYY")
289
+ ) : (
290
+ <>
291
+ {moment(futureDates[0]).format("DD-MM-YYYY")}
292
+ <div className="r-content-recur-start-hours">
293
+ <span>
294
+ <Translate text="de" />
295
+ &nbsp;
296
+ </span>
297
+ <div className="r-time-hours">
298
+ {startHours}
299
+ </div>
300
+ <span>
301
+ &nbsp;
302
+ <Translate text="à" />
303
+ &nbsp;
304
+ </span>
305
+ <div className="r-time-hours">
306
+ {endHours}
307
+ </div>
308
+ </div>
309
+ </>
310
+ )}
311
+ <span className="recurence-schedul-more">
312
+ Prochaines dates
313
+ <i class="bi bi-arrow-down-short"></i>
314
+ </span>
315
+ </p>
316
+ <div
317
+ className={
318
+ isSchedulVisible
319
+ ? "recurence-modal-display"
320
+ : "recurence-modal-hide"
321
+ }
322
+ >
323
+ <ul>
324
+ {futureDates.map((date, i) => {
325
+ return (
326
+ <li key={i}>
327
+ {moment(date).format("DD-MM-YYYY")}
328
+ </li>
329
+ );
330
+ })}
331
+ </ul>
332
+ </div>
333
+ </a>
334
+ )}
335
+ </div>
336
+ </div>
337
+ {/* adress */}
338
+ <div className="r-content-news-info-aera">
339
+ {item.street ? (
340
+ <div className="icon-baseline">
341
+ <svg
342
+ xmlns="http://www.w3.org/2000/svg"
343
+ viewBox="0 0 19.41 19.41"
344
+ >
345
+ <path d="M9,18.34C3.9,10.94,3,10.18,3,7.45a6.75,6.75,0,0,1,13.49,0c0,2.73-.94,3.49-6,10.89a.85.85,0,0,1-1.17.22A.77.77,0,0,1,9,18.34Zm.7-8.07A2.82,2.82,0,1,0,6.89,7.45a2.83,2.83,0,0,0,2.82,2.82Z" />
346
+ </svg>
347
+ </div>
348
+ ) : (
349
+ ""
350
+ )}
173
351
 
174
- <div className="dpinlb">
175
- <div className="r-content-news-info--itinirary">
176
- {item.street ? (
177
- <a href={itineraryLink} target="_blank">
178
- <span>Itinéraire</span>
179
- </a>
180
- ) : (
181
- ""
182
- )}
183
- </div>
184
- {item.reduced_mobility_facilities === true ? (
185
- <div className="r-content-news-info--reduced">
186
- <span><Translate text="Accessible aux PMR" /></span>
187
- </div>
188
- ) : (
189
- ""
190
- )}
191
- </div>
192
- </div>
193
- {/* contact */}
194
- <div className="r-content-news-info-contact">
195
- <div className="dpinlb">
196
- <div className="r-content-news-info--name">
197
- <span>{item.contact_name}</span>
198
- </div>
199
- <div className="r-content-news-info--phone">
200
- <span>
201
- <a href={`tel:${item.contact_phone}`}>
202
- {item.contact_phone}
203
- </a>
204
- </span>
205
- </div>
206
- <div className="r-content-news-info--email">
207
- <a href={`mailto:${item.contact_email}`}>
208
- {item.contact_email}
209
- </a>
210
- </div>
211
- </div>
212
- </div>
213
- {/* link */}
214
- {item.event_url === null &&
215
- item.online_participation === null &&
216
- item.video_url === null ? (
217
- ""
218
- ) : (
219
- <div className="r-content-news-info-link">
220
- <div className="icon-baseline">
221
- <svg
222
- xmlns="http://www.w3.org/2000/svg"
223
- viewBox="0 0 19.41 19.41"
224
- >
225
- <path d="M16.36,2.22H3.06a1.3,1.3,0,0,0-1.3,1.3h0v9a1.3,1.3,0,0,0,1.3,1.3H7.52v1.74h-.7a.8.8,0,0,0,0,1.6h5.79a.8.8,0,0,0,0-1.6h-.7V13.85h4.45a1.31,1.31,0,0,0,1.3-1.3v-9A1.3,1.3,0,0,0,16.36,2.22Zm-1.9,10.83a.37.37,0,1,1,.36-.37h0a.36.36,0,0,1-.36.36Zm1.6.08a.45.45,0,1,1,.44-.45h0a.44.44,0,0,1-.44.45h0Zm.53-1.35H2.82V3.52a.23.23,0,0,1,.23-.23H16.36a.23.23,0,0,1,.23.23h0v8.27Z" />
226
- </svg>
227
- </div>
228
- <div className="dpinlb">
229
- {item.event_url === null ? (
230
- ""
231
- ) : (
232
- <div className="r-content-news-info-event_link">
233
- <a href={item.event_url}><Translate text="Lien de l'événement" /></a>
234
- </div>
235
- )}
236
- {item.online_participation === null ? (
237
- ""
238
- ) : (
239
- <div className="r-content-news-info--online_participation">
240
- <a href={item.online_participation}>
241
- <Translate text="Participation en ligne" />
242
- </a>
243
- </div>
244
- )}
245
- {item.video_url === null ? (
246
- ""
247
- ) : (
248
- <div className="r-content-news-info--video">
249
- <a href={item.video_url}><Translate text="Lien vers la vidéo" /></a>
250
- </div>
251
- )}
252
- </div>
253
- </div>
254
- )}
352
+ <div className="dpinlb">
353
+ <div className="r-content-news-info--itinirary">
354
+ {item.street ? (
355
+ <a href={itineraryLink} target="_blank">
356
+ <span>Itinéraire</span>
357
+ </a>
358
+ ) : (
359
+ ""
360
+ )}
361
+ </div>
362
+ {item.reduced_mobility_facilities === true ? (
363
+ <div className="r-content-news-info--reduced">
364
+ <span>
365
+ <Translate text="Accessible aux PMR" />
366
+ </span>
367
+ </div>
368
+ ) : (
369
+ ""
370
+ )}
371
+ {item.free_entry === true ? (
372
+ <div className="r-content-news-info--entry">
373
+ <span>
374
+ <Translate text="Gratuit" />
375
+ </span>
376
+ </div>
377
+ ) : (
378
+ ""
379
+ )}
380
+ </div>
381
+ </div>
382
+ {/* contact */}
383
+ {(item.contact_name || item.contact_phone || item.contact_email) && (
384
+ <div className="r-content-news-info-contact">
385
+ <div className="dpinlb">
386
+ <div className="r-content-news-info--name">
387
+ <span>{item.contact_name}</span>
388
+ </div>
389
+ <div className="r-content-news-info--phone">
390
+ <span>
391
+ <a href={`tel:${item.contact_phone}`}>
392
+ {item.contact_phone}
393
+ </a>
394
+ </span>
395
+ </div>
396
+ <div className="r-content-news-info--email">
397
+ <a href={`mailto:${item.contact_email}`}>
398
+ {item.contact_email}
399
+ </a>
400
+ </div>
401
+ </div>
402
+ </div>
403
+ )}
404
+ {/* link */}
405
+ {item.event_url === null &&
406
+ item.online_participation === null &&
407
+ item.video_url === null ? (
408
+ ""
409
+ ) : (
410
+ <div className="r-content-news-info-link">
411
+ <div className="icon-baseline">
412
+ <svg
413
+ xmlns="http://www.w3.org/2000/svg"
414
+ viewBox="0 0 19.41 19.41"
415
+ >
416
+ <path d="M16.36,2.22H3.06a1.3,1.3,0,0,0-1.3,1.3h0v9a1.3,1.3,0,0,0,1.3,1.3H7.52v1.74h-.7a.8.8,0,0,0,0,1.6h5.79a.8.8,0,0,0,0-1.6h-.7V13.85h4.45a1.31,1.31,0,0,0,1.3-1.3v-9A1.3,1.3,0,0,0,16.36,2.22Zm-1.9,10.83a.37.37,0,1,1,.36-.37h0a.36.36,0,0,1-.36.36Zm1.6.08a.45.45,0,1,1,.44-.45h0a.44.44,0,0,1-.44.45h0Zm.53-1.35H2.82V3.52a.23.23,0,0,1,.23-.23H16.36a.23.23,0,0,1,.23.23h0v8.27Z" />
417
+ </svg>
418
+ </div>
419
+ <div className="dpinlb">
420
+ {item.event_url === null ? (
421
+ ""
422
+ ) : (
423
+ <div className="r-content-news-info-event_link">
424
+ <a href={item.event_url}>
425
+ <Translate text="Lien de l'événement" />
426
+ </a>
427
+ </div>
428
+ )}
429
+ {item.online_participation === null ? (
430
+ ""
431
+ ) : (
432
+ <div className="r-content-news-info--online_participation">
433
+ <a href={item.online_participation}>
434
+ <Translate text="Participation en ligne" />
435
+ </a>
436
+ </div>
437
+ )}
438
+ {item.video_url === null ? (
439
+ ""
440
+ ) : (
441
+ <div className="r-content-news-info--video">
442
+ <a href={item.video_url}>
443
+ <Translate text="Lien vers la vidéo" />
444
+ </a>
445
+ </div>
446
+ )}
447
+ </div>
448
+ </div>
449
+ )}
255
450
 
256
- {/* Social */}
257
- {item.facebook === null &&
258
- item.instagram === null &&
259
- item.twitter === null ? (
260
- ""
261
- ) : (
262
- <div className="r-content-news-info-social">
263
- <ul>
264
- {!item.facebook ? (
265
- ""
266
- ) : (
267
- <li>
268
- <a href={item.facebook} target="_blank">
269
- <svg
270
- xmlns="http://www.w3.org/2000/svg"
271
- height="800"
272
- width="1200"
273
- viewBox="-204.79995 -341.33325 1774.9329 2047.9995"
274
- >
275
- <path
276
- d="M1365.333 682.667C1365.333 305.64 1059.693 0 682.667 0 305.64 0 0 305.64 0 682.667c0 340.738 249.641 623.16 576 674.373V880H402.667V682.667H576v-150.4c0-171.094 101.917-265.6 257.853-265.6 74.69 0 152.814 13.333 152.814 13.333v168h-86.083c-84.804 0-111.25 52.623-111.25 106.61v128.057h189.333L948.4 880H789.333v477.04c326.359-51.213 576-333.635 576-674.373"
277
- fill="#100f0d"
278
- />
279
- <path
280
- d="M948.4 880l30.267-197.333H789.333V554.609C789.333 500.623 815.78 448 900.584 448h86.083V280s-78.124-13.333-152.814-13.333c-155.936 0-257.853 94.506-257.853 265.6v150.4H402.667V880H576v477.04a687.805 687.805 0 00106.667 8.293c36.288 0 71.91-2.84 106.666-8.293V880H948.4"
281
- fill="#fff"
282
- />
283
- </svg>
284
- </a>
285
- </li>
286
- )}
287
- {!item.instagram ? (
288
- ""
289
- ) : (
290
- <li>
291
- <a href={item.instagram} target="_blank">
292
- <svg
293
- xmlns="http://www.w3.org/2000/svg"
294
- height="800"
295
- width="1200"
296
- viewBox="-100.7682 -167.947 873.3244 1007.682"
297
- >
298
- <g fill="#100f0d">
299
- <path d="M335.895 0c-91.224 0-102.663.387-138.49 2.021-35.752 1.631-60.169 7.31-81.535 15.612-22.088 8.584-40.82 20.07-59.493 38.743-18.674 18.673-30.16 37.407-38.743 59.495C9.33 137.236 3.653 161.653 2.02 197.405.386 233.232 0 244.671 0 335.895c0 91.222.386 102.661 2.02 138.488 1.633 35.752 7.31 60.169 15.614 81.534 8.584 22.088 20.07 40.82 38.743 59.495 18.674 18.673 37.405 30.159 59.493 38.743 21.366 8.302 45.783 13.98 81.535 15.612 35.827 1.634 47.266 2.021 138.49 2.021 91.222 0 102.661-.387 138.488-2.021 35.752-1.631 60.169-7.31 81.534-15.612 22.088-8.584 40.82-20.07 59.495-38.743 18.673-18.675 30.159-37.407 38.743-59.495 8.302-21.365 13.981-45.782 15.612-81.534 1.634-35.827 2.021-47.266 2.021-138.488 0-91.224-.387-102.663-2.021-138.49-1.631-35.752-7.31-60.169-15.612-81.534-8.584-22.088-20.07-40.822-38.743-59.495-18.675-18.673-37.407-30.159-59.495-38.743-21.365-8.302-45.782-13.981-81.534-15.612C438.556.387 427.117 0 335.895 0zm0 60.521c89.686 0 100.31.343 135.729 1.959 32.75 1.493 50.535 6.965 62.37 11.565 15.68 6.094 26.869 13.372 38.622 25.126 11.755 11.754 19.033 22.944 25.127 38.622 4.6 11.836 10.072 29.622 11.565 62.371 1.616 35.419 1.959 46.043 1.959 135.73 0 89.687-.343 100.311-1.959 135.73-1.493 32.75-6.965 50.535-11.565 62.37-6.094 15.68-13.372 26.869-25.127 38.622-11.753 11.755-22.943 19.033-38.621 25.127-11.836 4.6-29.622 10.072-62.371 11.565-35.413 1.616-46.036 1.959-135.73 1.959-89.694 0-100.315-.343-135.73-1.96-32.75-1.492-50.535-6.964-62.37-11.564-15.68-6.094-26.869-13.372-38.622-25.127-11.754-11.753-19.033-22.943-25.127-38.621-4.6-11.836-10.071-29.622-11.565-62.371-1.616-35.419-1.959-46.043-1.959-135.73 0-89.687.343-100.311 1.959-135.73 1.494-32.75 6.965-50.535 11.565-62.37 6.094-15.68 13.373-26.869 25.126-38.622 11.754-11.755 22.944-19.033 38.622-25.127 11.836-4.6 29.622-10.072 62.371-11.565 35.419-1.616 46.043-1.959 135.73-1.959" />
300
- <path d="M335.895 447.859c-61.838 0-111.966-50.128-111.966-111.964 0-61.838 50.128-111.966 111.966-111.966 61.836 0 111.964 50.128 111.964 111.966 0 61.836-50.128 111.964-111.964 111.964zm0-284.451c-95.263 0-172.487 77.224-172.487 172.487 0 95.261 77.224 172.485 172.487 172.485 95.261 0 172.485-77.224 172.485-172.485 0-95.263-77.224-172.487-172.485-172.487m219.608-6.815c0 22.262-18.047 40.307-40.308 40.307-22.26 0-40.307-18.045-40.307-40.307 0-22.261 18.047-40.308 40.307-40.308 22.261 0 40.308 18.047 40.308 40.308" />
301
- </g>
302
- </svg>
303
- </a>
304
- </li>
305
- )}
306
- {!item.twitter ? (
307
- ""
308
- ) : (
309
- <li>
310
- <a href={item.twitter} target="_blank">
311
- <svg
312
- xmlns="http://www.w3.org/2000/svg"
313
- height="800"
314
- width="1200"
315
- viewBox="-44.7006 -60.54775 387.4052 363.2865"
316
- >
317
- <path
318
- fill="#000"
319
- d="M93.719 242.19c112.46 0 173.96-93.168 173.96-173.96 0-2.646-.054-5.28-.173-7.903a124.338 124.338 0 0030.498-31.66c-10.955 4.87-22.744 8.148-35.11 9.626 12.622-7.57 22.313-19.543 26.885-33.817a122.62 122.62 0 01-38.824 14.841C239.798 7.433 223.915 0 206.326 0c-33.764 0-61.144 27.381-61.144 61.132 0 4.798.537 9.465 1.586 13.941-50.815-2.557-95.874-26.886-126.03-63.88a60.977 60.977 0 00-8.279 30.73c0 21.212 10.794 39.938 27.208 50.893a60.685 60.685 0 01-27.69-7.647c-.009.257-.009.507-.009.781 0 29.61 21.075 54.332 49.051 59.934a61.218 61.218 0 01-16.122 2.152 60.84 60.84 0 01-11.491-1.103c7.784 24.293 30.355 41.971 57.115 42.465-20.926 16.402-47.287 26.171-75.937 26.171-4.929 0-9.798-.28-14.584-.846 27.059 17.344 59.189 27.464 93.722 27.464"
320
- />
321
- </svg>
322
- </a>
323
- </li>
324
- )}
325
- </ul>
326
- </div>
327
- )}
328
- </div>
329
- {/* booking */}
330
- <div className="r-content-news-info-action">
331
- {item.ticket_url ? (
332
- <div className="r-content-booking">
333
- <a href={item.ticket_url}>
334
- <svg
335
- xmlns="http://www.w3.org/2000/svg"
336
- viewBox="0 0 19.41 19.41"
337
- >
338
- <circle cx="13.03" cy="14.61" r="0.63" fill="fill:#fff" />
339
- <circle cx="11.59" cy="6.52" r="0.63" fill="fill:#fff" />
340
- <path
341
- d="M17.11,11.47h.62V7.71h-1.6a1.25,1.25,0,0,1-1.25-1.25,1.27,1.27,0,0,1,.67-1.12l.54-.28-1.6-3.39-12.8,6h0v3.76h.63a1.26,1.26,0,0,1,0,2.51H1.68v3.76H17.73V14h-.62a1.26,1.26,0,1,1,0-2.51Zm-6.9-6.4a.63.63,0,0,0,1.14-.53l2.54-1.2.58,1.23A2.52,2.52,0,0,0,14,7.71H4.63Zm6.27,10.08v1.34H13.66a.63.63,0,1,0-1.26,0H2.93V15.16a2.51,2.51,0,0,0,0-4.86V9H12.4a.63.63,0,0,0,1.26,0h2.82V10.3a2.51,2.51,0,0,0,0,4.86Z"
342
- fill="fill:#fff"
343
- />
344
- <circle cx="13.03" cy="10.85" r="0.63" fill="fill:#fff" />
345
- <circle cx="13.03" cy="12.73" r="0.63" fill="fill:#fff" />
346
- </svg>
347
- <Translate text="Billetterie" />
348
- </a>
349
- </div>
350
- ) : (
351
- ""
352
- )}
353
- </div>
354
- </div>
355
- <div className="r-content-description">
356
- <ReactMarkdown>{item.description}</ReactMarkdown>
357
- </div>
358
- <div
359
- className="r-content-text"
360
- dangerouslySetInnerHTML={{
361
- __html: item.text && item.text.data,
362
- }}
363
- ></div>
364
- {/* add files to download */}
365
- {files &&
366
- <div className="r-content-files">
367
- {files.map((file, i) => (
368
- <div key={i} className="r-content-file">
369
- <a href={file.targetUrl} className="r-content-file-link" rel="nofollow">
370
- <span className="r-content-file-title">{file.title}</span>
371
- <span className="r-content-file-icon"><svg width="21" height="21" viewBox="0 0 24 24" fill="none" stroke="#8899a4" stroke-width="2" stroke-linecap="square" stroke-linejoin="arcs"><path d="M3 15v4c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2v-4M17 9l-5 5-5-5M12 12.8V2.5"></path></svg> </span>
372
- </a>
373
- </div>
374
- ))}
375
- </div>
376
- }
377
- {/* add gallery */}
378
- {gallery &&
379
- <div className="r-content-gallery">
380
- <div className="spotlight-group flexbin r-content-gallery">
381
- {gallery.map((image, i) => (
382
- <a key={i} className="spotlight" href={image.image_full_scale}>
383
- <img src={image.image_preview_scale} alt="" />
384
- </a>
385
- ))}
386
- </div>
387
- </div>
388
- }
389
- </article>
390
- </div>
391
- );
451
+ {/* Social */}
452
+ {item.facebook === null &&
453
+ item.instagram === null &&
454
+ item.twitter === null ? (
455
+ ""
456
+ ) : (
457
+ <div className="r-content-news-info-social">
458
+ <ul>
459
+ {!item.facebook ? (
460
+ ""
461
+ ) : (
462
+ <li>
463
+ <a href={item.facebook} target="_blank">
464
+ <svg
465
+ xmlns="http://www.w3.org/2000/svg"
466
+ height="800"
467
+ width="1200"
468
+ viewBox="-204.79995 -341.33325 1774.9329 2047.9995"
469
+ >
470
+ <path
471
+ d="M1365.333 682.667C1365.333 305.64 1059.693 0 682.667 0 305.64 0 0 305.64 0 682.667c0 340.738 249.641 623.16 576 674.373V880H402.667V682.667H576v-150.4c0-171.094 101.917-265.6 257.853-265.6 74.69 0 152.814 13.333 152.814 13.333v168h-86.083c-84.804 0-111.25 52.623-111.25 106.61v128.057h189.333L948.4 880H789.333v477.04c326.359-51.213 576-333.635 576-674.373"
472
+ fill="#100f0d"
473
+ />
474
+ <path
475
+ d="M948.4 880l30.267-197.333H789.333V554.609C789.333 500.623 815.78 448 900.584 448h86.083V280s-78.124-13.333-152.814-13.333c-155.936 0-257.853 94.506-257.853 265.6v150.4H402.667V880H576v477.04a687.805 687.805 0 00106.667 8.293c36.288 0 71.91-2.84 106.666-8.293V880H948.4"
476
+ fill="#fff"
477
+ />
478
+ </svg>
479
+ </a>
480
+ </li>
481
+ )}
482
+ {!item.instagram ? (
483
+ ""
484
+ ) : (
485
+ <li>
486
+ <a href={item.instagram} target="_blank">
487
+ <svg
488
+ xmlns="http://www.w3.org/2000/svg"
489
+ height="800"
490
+ width="1200"
491
+ viewBox="-100.7682 -167.947 873.3244 1007.682"
492
+ >
493
+ <g fill="#100f0d">
494
+ <path d="M335.895 0c-91.224 0-102.663.387-138.49 2.021-35.752 1.631-60.169 7.31-81.535 15.612-22.088 8.584-40.82 20.07-59.493 38.743-18.674 18.673-30.16 37.407-38.743 59.495C9.33 137.236 3.653 161.653 2.02 197.405.386 233.232 0 244.671 0 335.895c0 91.222.386 102.661 2.02 138.488 1.633 35.752 7.31 60.169 15.614 81.534 8.584 22.088 20.07 40.82 38.743 59.495 18.674 18.673 37.405 30.159 59.493 38.743 21.366 8.302 45.783 13.98 81.535 15.612 35.827 1.634 47.266 2.021 138.49 2.021 91.222 0 102.661-.387 138.488-2.021 35.752-1.631 60.169-7.31 81.534-15.612 22.088-8.584 40.82-20.07 59.495-38.743 18.673-18.675 30.159-37.407 38.743-59.495 8.302-21.365 13.981-45.782 15.612-81.534 1.634-35.827 2.021-47.266 2.021-138.488 0-91.224-.387-102.663-2.021-138.49-1.631-35.752-7.31-60.169-15.612-81.534-8.584-22.088-20.07-40.822-38.743-59.495-18.675-18.673-37.407-30.159-59.495-38.743-21.365-8.302-45.782-13.981-81.534-15.612C438.556.387 427.117 0 335.895 0zm0 60.521c89.686 0 100.31.343 135.729 1.959 32.75 1.493 50.535 6.965 62.37 11.565 15.68 6.094 26.869 13.372 38.622 25.126 11.755 11.754 19.033 22.944 25.127 38.622 4.6 11.836 10.072 29.622 11.565 62.371 1.616 35.419 1.959 46.043 1.959 135.73 0 89.687-.343 100.311-1.959 135.73-1.493 32.75-6.965 50.535-11.565 62.37-6.094 15.68-13.372 26.869-25.127 38.622-11.753 11.755-22.943 19.033-38.621 25.127-11.836 4.6-29.622 10.072-62.371 11.565-35.413 1.616-46.036 1.959-135.73 1.959-89.694 0-100.315-.343-135.73-1.96-32.75-1.492-50.535-6.964-62.37-11.564-15.68-6.094-26.869-13.372-38.622-25.127-11.754-11.753-19.033-22.943-25.127-38.621-4.6-11.836-10.071-29.622-11.565-62.371-1.616-35.419-1.959-46.043-1.959-135.73 0-89.687.343-100.311 1.959-135.73 1.494-32.75 6.965-50.535 11.565-62.37 6.094-15.68 13.373-26.869 25.126-38.622 11.754-11.755 22.944-19.033 38.622-25.127 11.836-4.6 29.622-10.072 62.371-11.565 35.419-1.616 46.043-1.959 135.73-1.959" />
495
+ <path d="M335.895 447.859c-61.838 0-111.966-50.128-111.966-111.964 0-61.838 50.128-111.966 111.966-111.966 61.836 0 111.964 50.128 111.964 111.966 0 61.836-50.128 111.964-111.964 111.964zm0-284.451c-95.263 0-172.487 77.224-172.487 172.487 0 95.261 77.224 172.485 172.487 172.485 95.261 0 172.485-77.224 172.485-172.485 0-95.263-77.224-172.487-172.485-172.487m219.608-6.815c0 22.262-18.047 40.307-40.308 40.307-22.26 0-40.307-18.045-40.307-40.307 0-22.261 18.047-40.308 40.307-40.308 22.261 0 40.308 18.047 40.308 40.308" />
496
+ </g>
497
+ </svg>
498
+ </a>
499
+ </li>
500
+ )}
501
+ {!item.twitter ? (
502
+ ""
503
+ ) : (
504
+ <li>
505
+ <a href={item.twitter} target="_blank">
506
+ <svg
507
+ xmlns="http://www.w3.org/2000/svg"
508
+ height="800"
509
+ width="1200"
510
+ viewBox="-44.7006 -60.54775 387.4052 363.2865"
511
+ >
512
+ <path
513
+ fill="#000"
514
+ d="M93.719 242.19c112.46 0 173.96-93.168 173.96-173.96 0-2.646-.054-5.28-.173-7.903a124.338 124.338 0 0030.498-31.66c-10.955 4.87-22.744 8.148-35.11 9.626 12.622-7.57 22.313-19.543 26.885-33.817a122.62 122.62 0 01-38.824 14.841C239.798 7.433 223.915 0 206.326 0c-33.764 0-61.144 27.381-61.144 61.132 0 4.798.537 9.465 1.586 13.941-50.815-2.557-95.874-26.886-126.03-63.88a60.977 60.977 0 00-8.279 30.73c0 21.212 10.794 39.938 27.208 50.893a60.685 60.685 0 01-27.69-7.647c-.009.257-.009.507-.009.781 0 29.61 21.075 54.332 49.051 59.934a61.218 61.218 0 01-16.122 2.152 60.84 60.84 0 01-11.491-1.103c7.784 24.293 30.355 41.971 57.115 42.465-20.926 16.402-47.287 26.171-75.937 26.171-4.929 0-9.798-.28-14.584-.846 27.059 17.344 59.189 27.464 93.722 27.464"
515
+ />
516
+ </svg>
517
+ </a>
518
+ </li>
519
+ )}
520
+ </ul>
521
+ </div>
522
+ )}
523
+ </div>
524
+ {/* booking */}
525
+ <div className="r-content-news-info-action">
526
+ {item.ticket_url ? (
527
+ <div className="r-content-booking">
528
+ <a href={item.ticket_url}>
529
+ <svg
530
+ xmlns="http://www.w3.org/2000/svg"
531
+ viewBox="0 0 19.41 19.41"
532
+ >
533
+ <circle cx="13.03" cy="14.61" r="0.63" fill="fill:#fff" />
534
+ <circle cx="11.59" cy="6.52" r="0.63" fill="fill:#fff" />
535
+ <path
536
+ d="M17.11,11.47h.62V7.71h-1.6a1.25,1.25,0,0,1-1.25-1.25,1.27,1.27,0,0,1,.67-1.12l.54-.28-1.6-3.39-12.8,6h0v3.76h.63a1.26,1.26,0,0,1,0,2.51H1.68v3.76H17.73V14h-.62a1.26,1.26,0,1,1,0-2.51Zm-6.9-6.4a.63.63,0,0,0,1.14-.53l2.54-1.2.58,1.23A2.52,2.52,0,0,0,14,7.71H4.63Zm6.27,10.08v1.34H13.66a.63.63,0,1,0-1.26,0H2.93V15.16a2.51,2.51,0,0,0,0-4.86V9H12.4a.63.63,0,0,0,1.26,0h2.82V10.3a2.51,2.51,0,0,0,0,4.86Z"
537
+ fill="fill:#fff"
538
+ />
539
+ <circle cx="13.03" cy="10.85" r="0.63" fill="fill:#fff" />
540
+ <circle cx="13.03" cy="12.73" r="0.63" fill="fill:#fff" />
541
+ </svg>
542
+ <Translate text="Billetterie" />
543
+ </a>
544
+ </div>
545
+ ) : (
546
+ ""
547
+ )}
548
+ </div>
549
+ </div>
550
+ <div className="r-content-description">
551
+ <ReactMarkdown>{item.description}</ReactMarkdown>
552
+ </div>
553
+ <div
554
+ className="r-content-text"
555
+ dangerouslySetInnerHTML={{
556
+ __html: item.text && item.text.data,
557
+ }}
558
+ ></div>
559
+ {/* add files to download */}
560
+ {files && (
561
+ <div className="r-content-files">
562
+ {files.map((file, i) => (
563
+ <div key={i} className="r-content-file">
564
+ <a
565
+ href={file.targetUrl}
566
+ className="r-content-file-link"
567
+ rel="nofollow"
568
+ >
569
+ <div className="r-content-file-title">
570
+ {file.title}
571
+ <span className="r-content-file-title-size">
572
+ {Number(file.file.size / 1000).toFixed(2)} KB
573
+ </span>
574
+ </div>
575
+ <span className="r-content-file-icon">
576
+ <svg
577
+ width="21"
578
+ height="21"
579
+ viewBox="0 0 24 24"
580
+ fill="none"
581
+ stroke="#8899a4"
582
+ stroke-width="2"
583
+ stroke-linecap="square"
584
+ stroke-linejoin="arcs"
585
+ >
586
+ <path d="M3 15v4c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2v-4M17 9l-5 5-5-5M12 12.8V2.5"></path>
587
+ </svg>{" "}
588
+ </span>
589
+ </a>
590
+ </div>
591
+ ))}
592
+ </div>
593
+ )}
594
+ {/* add gallery */}
595
+ {gallery && (
596
+ <div className="r-content-gallery">
597
+ <div className="spotlight-group flexbin r-content-gallery">
598
+ {gallery.map((image, i) => (
599
+ <a key={i} className="spotlight" href={image.image_full_scale}>
600
+ <img src={image.image_preview_scale} alt="" />
601
+ </a>
602
+ ))}
603
+ </div>
604
+ </div>
605
+ )}
606
+ {/* add category & Topics */}
607
+ {item.topics && item.topics.length > 0 && (
608
+ <div className="r-content-topics">
609
+ {item.topics.map((topic, i) => (
610
+ <a key={i}>
611
+ <span>{topic.title}</span>
612
+ </a>
613
+ ))}
614
+ </div>
615
+ )}
616
+ </article>
617
+ </div>
618
+ );
392
619
  };
393
620
  export default ContactContent;