imio.smartweb.core 1.2.38__py3-none-any.whl → 1.2.80__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 (223) 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-mon-dossier.svg +1 -1
  14. imio/smartweb/core/browser/static/icons/categorie-nature.svg +3 -0
  15. imio/smartweb/core/browser/static/icons/categorie-parcs-a-conteneurs.svg +4 -0
  16. imio/smartweb/core/browser/static/icons/categorie-plus.svg +3 -0
  17. imio/smartweb/core/browser/static/icons/categorie-primes-2.svg +5 -0
  18. imio/smartweb/core/browser/static/icons/categorie-sport-natation.svg +4 -0
  19. imio/smartweb/core/browser/static/icons/organisation-ecole-sac.svg +4 -0
  20. imio/smartweb/core/browser/static/icons/organisation-scout.svg +3 -0
  21. imio/smartweb/core/browser/static/icons/reseausocial-behance.svg +3 -0
  22. imio/smartweb/core/browser/static/icons/reseausocial-linkedin.svg +3 -0
  23. imio/smartweb/core/browser/static/smartweb-edit-compiled.css +1 -1
  24. imio/smartweb/core/browser/static/smartweb-view-compiled.css +1 -1
  25. imio/smartweb/core/browser/static/src/edit.less +42 -0
  26. imio/smartweb/core/browser/static/src/view.less +109 -56
  27. imio/smartweb/core/browser/vocabulary.py +8 -3
  28. imio/smartweb/core/contents/__init__.py +2 -0
  29. imio/smartweb/core/contents/configure.zcml +1 -0
  30. imio/smartweb/core/contents/folder/block_view.pt +8 -8
  31. imio/smartweb/core/contents/folder/summary_view.pt +4 -4
  32. imio/smartweb/core/contents/pages/cirkwi/content.py +5 -0
  33. imio/smartweb/core/contents/pages/cirkwi/view.py +2 -1
  34. imio/smartweb/core/contents/pages/configure.zcml +1 -0
  35. imio/smartweb/core/contents/pages/portal_page/view.py +3 -0
  36. imio/smartweb/core/contents/pages/views.py +47 -1
  37. imio/smartweb/core/contents/publication/__init__.py +0 -0
  38. imio/smartweb/core/contents/publication/configure.zcml +5 -0
  39. imio/smartweb/core/contents/publication/content.py +23 -0
  40. imio/smartweb/core/contents/rest/base.py +9 -7
  41. imio/smartweb/core/contents/rest/directory/endpoint.py +2 -2
  42. imio/smartweb/core/contents/rest/directory/view.pt +2 -1
  43. imio/smartweb/core/contents/rest/events/content.py +13 -0
  44. imio/smartweb/core/contents/rest/events/endpoint.py +5 -3
  45. imio/smartweb/core/contents/rest/events/view.pt +5 -1
  46. imio/smartweb/core/contents/rest/events/view.py +12 -0
  47. imio/smartweb/core/contents/rest/news/content.py +6 -0
  48. imio/smartweb/core/contents/rest/news/endpoint.py +4 -2
  49. imio/smartweb/core/contents/rest/news/view.pt +4 -1
  50. imio/smartweb/core/contents/rest/news/view.py +8 -0
  51. imio/smartweb/core/contents/rest/utils.py +0 -1
  52. imio/smartweb/core/contents/rest/view.py +4 -0
  53. imio/smartweb/core/contents/sections/common_templates/carousel.pt +5 -1
  54. imio/smartweb/core/contents/sections/common_templates/table.pt +18 -4
  55. imio/smartweb/core/contents/sections/configure.zcml +18 -0
  56. imio/smartweb/core/contents/sections/contact/content.py +2 -2
  57. imio/smartweb/core/contents/sections/contact/macros.pt +28 -3
  58. imio/smartweb/core/contents/sections/contact/utils.py +2 -0
  59. imio/smartweb/core/contents/sections/contact/view.py +28 -12
  60. imio/smartweb/core/contents/sections/events/content.py +12 -4
  61. imio/smartweb/core/contents/sections/events/view.py +20 -2
  62. imio/smartweb/core/contents/sections/external_content/view.pt +4 -4
  63. imio/smartweb/core/contents/sections/external_content/views.py +6 -4
  64. imio/smartweb/core/contents/sections/files/content.py +7 -1
  65. imio/smartweb/core/contents/sections/files/view.py +43 -12
  66. imio/smartweb/core/contents/sections/links/view.py +5 -0
  67. imio/smartweb/core/contents/sections/macros.pt +26 -0
  68. imio/smartweb/core/contents/sections/news/content.py +11 -3
  69. imio/smartweb/core/contents/sections/news/view.py +20 -2
  70. imio/smartweb/core/contents/sections/text/views.py +2 -0
  71. imio/smartweb/core/contents/sections/views.py +73 -10
  72. imio/smartweb/core/interfaces.py +4 -0
  73. imio/smartweb/core/profiles/default/metadata.xml +1 -1
  74. imio/smartweb/core/profiles/default/taxonomies/page_category.xml +16 -0
  75. imio/smartweb/core/profiles/default/taxonomies/procedure_category.xml +26 -0
  76. imio/smartweb/core/profiles/default/types/imio.smartweb.EventsView.xml +1 -0
  77. imio/smartweb/core/profiles/default/types/imio.smartweb.NewsView.xml +1 -0
  78. imio/smartweb/core/profiles/default/types/imio.smartweb.Publication.xml +38 -0
  79. imio/smartweb/core/profiles/default/types/imio.smartweb.SectionEvents.xml +1 -0
  80. imio/smartweb/core/profiles/default/types/imio.smartweb.SectionFiles.xml +2 -0
  81. imio/smartweb/core/profiles/default/types/imio.smartweb.SectionNews.xml +1 -0
  82. imio/smartweb/core/profiles/default/types.xml +1 -0
  83. imio/smartweb/core/profiles/icons/basic/registry.xml +120 -0
  84. imio/smartweb/core/rest/authentic_sources.py +17 -2
  85. imio/smartweb/core/subscribers.py +48 -0
  86. imio/smartweb/core/subscribers.zcml +12 -0
  87. imio/smartweb/core/tests/resources/json_iadeliberations_institutions.json +60 -0
  88. imio/smartweb/core/tests/resources/json_iadeliberations_publication.json +105 -0
  89. imio/smartweb/core/tests/resources/json_iadeliberations_publications.json +270 -0
  90. imio/smartweb/core/tests/resources/json_rest_events.json +6 -2
  91. imio/smartweb/core/tests/resources/json_rest_news.json +2 -2
  92. imio/smartweb/core/tests/resources/json_rest_specific_events.json +1 -1
  93. imio/smartweb/core/tests/test_htmx_in_sections.py +131 -0
  94. imio/smartweb/core/tests/test_iadeliberations.py +136 -0
  95. imio/smartweb/core/tests/test_icons.py +1 -1
  96. imio/smartweb/core/tests/test_rest.py +58 -17
  97. imio/smartweb/core/tests/test_section_contact.py +42 -10
  98. imio/smartweb/core/tests/test_section_events.py +28 -5
  99. imio/smartweb/core/tests/test_section_external_content.py +28 -2
  100. imio/smartweb/core/tests/test_section_news.py +30 -8
  101. imio/smartweb/core/tests/test_sections.py +17 -0
  102. imio/smartweb/core/tests/test_vocabularies.py +60 -3
  103. imio/smartweb/core/tests/test_vocabulary.py +43 -0
  104. imio/smartweb/core/upgrades/configure.zcml +108 -0
  105. imio/smartweb/core/upgrades/profiles/1055_to_1056/types/imio.smartweb.SectionFiles.xml +12 -0
  106. imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.EventsView.xml +11 -0
  107. imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.NewsView.xml +11 -0
  108. imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.SectionEvents.xml +11 -0
  109. imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.SectionNews.xml +11 -0
  110. imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/page_category.cfg +9 -0
  111. imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/page_category.xml +73 -0
  112. imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/procedure_category.cfg +9 -0
  113. imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/procedure_category.xml +118 -0
  114. imio/smartweb/core/upgrades/profiles/1058_to_1059/registry/linkedin-icon.xml +126 -0
  115. imio/smartweb/core/upgrades/profiles/1059_to_1060/registry/iadeliberation.xml +9 -0
  116. imio/smartweb/core/upgrades/profiles/1060_to_1061/types/imio.smartweb.Publication.xml +38 -0
  117. imio/smartweb/core/upgrades/profiles/1060_to_1061/types/imio.smartweb.SectionFiles.xml +11 -0
  118. imio/smartweb/core/upgrades/profiles/1060_to_1061/types.xml +4 -0
  119. imio/smartweb/core/upgrades/profiles/1060_to_1061/workflows.xml +6 -0
  120. imio/smartweb/core/utils.py +33 -2
  121. imio/smartweb/core/viewlets/configure.zcml +23 -1
  122. imio/smartweb/core/viewlets/footer.pt +5 -0
  123. imio/smartweb/core/viewlets/footer.py +5 -0
  124. imio/smartweb/core/viewlets/htmx.py +15 -0
  125. imio/smartweb/core/viewlets/htmx_js_header.pt +64 -0
  126. imio/smartweb/core/viewlets/ogptags.py +4 -3
  127. imio/smartweb/core/viewlets/social.py +23 -0
  128. imio/smartweb/core/vocabularies.py +65 -3
  129. imio/smartweb/core/vocabularies.zcml +18 -0
  130. imio/smartweb/core/webcomponents/build/1c1605a5fe9a2b10a88f.png +1 -0
  131. imio/smartweb/core/webcomponents/build/524db40e119aa11f4478.png +1 -0
  132. imio/smartweb/core/webcomponents/build/57d3b7cb1ab874660b39.svg +1 -0
  133. imio/smartweb/core/webcomponents/build/6cf03871df23ed2ee8b3.png +1 -0
  134. imio/smartweb/core/webcomponents/build/css/373.smartweb-webcomponents-compiled.css +1 -1
  135. imio/smartweb/core/webcomponents/build/css/486.smartweb-webcomponents-compiled.css +1 -1
  136. imio/smartweb/core/webcomponents/build/css/884.smartweb-webcomponents-compiled.css +1 -0
  137. imio/smartweb/core/webcomponents/build/css/919.smartweb-webcomponents-compiled.css +1 -1
  138. imio/smartweb/core/webcomponents/build/css/smartweb-webcomponents-compiled.css +1 -1
  139. imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js +1 -1
  140. imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js.LICENSE.txt +10 -8
  141. imio/smartweb/core/webcomponents/build/js/373.smartweb-webcomponents-compiled.js +2 -1
  142. imio/smartweb/core/webcomponents/build/js/{568.smartweb-webcomponents-compiled.js.LICENSE.txt → 373.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -4
  143. imio/smartweb/core/webcomponents/build/js/486.smartweb-webcomponents-compiled.js +1 -1
  144. imio/smartweb/core/webcomponents/build/js/499.smartweb-webcomponents-compiled.js +2 -0
  145. imio/smartweb/core/webcomponents/build/js/{674.smartweb-webcomponents-compiled.js.LICENSE.txt → 499.smartweb-webcomponents-compiled.js.LICENSE.txt} +1 -8
  146. imio/smartweb/core/webcomponents/build/js/799.smartweb-webcomponents-compiled.js +1 -1
  147. imio/smartweb/core/webcomponents/build/js/824.smartweb-webcomponents-compiled.js +2 -0
  148. imio/smartweb/core/webcomponents/build/js/828.smartweb-webcomponents-compiled.js +2 -0
  149. imio/smartweb/core/webcomponents/build/js/828.smartweb-webcomponents-compiled.js.LICENSE.txt +32 -0
  150. imio/smartweb/core/webcomponents/build/js/884.smartweb-webcomponents-compiled.js +1 -0
  151. imio/smartweb/core/webcomponents/build/js/919.smartweb-webcomponents-compiled.js +1 -1
  152. imio/smartweb/core/webcomponents/build/js/{568.smartweb-webcomponents-compiled.js → 963.smartweb-webcomponents-compiled.js} +2 -2
  153. imio/smartweb/core/webcomponents/build/js/963.smartweb-webcomponents-compiled.js.LICENSE.txt +3 -0
  154. imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js +1 -1
  155. imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js.LICENSE.txt +11 -14
  156. imio/smartweb/core/webcomponents/package.json +42 -40
  157. imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.jsx +146 -79
  158. imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.scss +415 -351
  159. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactCard/ContactCard.jsx +95 -62
  160. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +328 -168
  161. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactList/ContactList.jsx +21 -4
  162. imio/smartweb/core/webcomponents/src/components/Annuaire/Filters/Filter.jsx +213 -100
  163. imio/smartweb/core/webcomponents/src/components/Annuaire/index.js +1 -1
  164. imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx +76 -33
  165. imio/smartweb/core/webcomponents/src/components/Events/EventContent/EventContent.jsx +604 -377
  166. imio/smartweb/core/webcomponents/src/components/Events/EventList/EventList.jsx +29 -4
  167. imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +162 -88
  168. imio/smartweb/core/webcomponents/src/components/Events/Events.scss +496 -378
  169. imio/smartweb/core/webcomponents/src/components/Events/Filters/Filter.jsx +259 -91
  170. imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.jsx +62 -55
  171. imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.scss +68 -17
  172. imio/smartweb/core/webcomponents/src/components/Filters/IamData.jsx +42 -0
  173. imio/smartweb/core/webcomponents/src/components/Filters/MainFilter.scss +229 -0
  174. imio/smartweb/core/webcomponents/src/components/Filters/PublicTargetData.jsx +94 -0
  175. imio/smartweb/core/webcomponents/src/components/Filters/SelectStyles.js +58 -0
  176. imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.jsx +149 -0
  177. imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.scss +70 -0
  178. imio/smartweb/core/webcomponents/src/components/News/Filters/Filter.jsx +139 -83
  179. imio/smartweb/core/webcomponents/src/components/News/News.jsx +133 -67
  180. imio/smartweb/core/webcomponents/src/components/News/News.scss +170 -127
  181. imio/smartweb/core/webcomponents/src/components/News/NewsCard/NewsCard.jsx +76 -44
  182. imio/smartweb/core/webcomponents/src/components/News/NewsContent/NewsContent.jsx +261 -188
  183. imio/smartweb/core/webcomponents/src/components/News/NewsList/NewsList.jsx +48 -9
  184. imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx +21 -10
  185. imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx +21 -10
  186. imio/smartweb/core/webcomponents/src/components/Search/Filters/Filter.jsx +8 -9
  187. imio/smartweb/core/webcomponents/src/components/Search/NewsResult/NewsResult.jsx +23 -12
  188. imio/smartweb/core/webcomponents/src/components/Search/Search.jsx +7 -6
  189. imio/smartweb/core/webcomponents/src/components/Search/Search.scss +115 -96
  190. imio/smartweb/core/webcomponents/src/components/Search/WebResult/WebResult.jsx +12 -3
  191. imio/smartweb/core/webcomponents/src/components/Search/index.js +1 -1
  192. imio/smartweb/core/webcomponents/src/hooks/ScrollContext.jsx +3 -0
  193. imio/smartweb/core/webcomponents/src/hooks/useAxios.js +3 -3
  194. imio/smartweb/core/webcomponents/src/hooks/useFilterQuery.js +1 -2
  195. imio/smartweb/core/webcomponents/src/index.scss +255 -211
  196. imio/smartweb/core/webcomponents/src/utils/Map.jsx +26 -19
  197. imio/smartweb/core/webcomponents/src/utils/Map.scss +2 -2
  198. imio/smartweb/core/webcomponents/src/utils/translation.js +129 -9
  199. imio.smartweb.core-1.2.80-py3.8-nspkg.pth +2 -0
  200. {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.80.dist-info}/METADATA +410 -10
  201. {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.80.dist-info}/RECORD +207 -161
  202. {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.80.dist-info}/WHEEL +1 -1
  203. imio/smartweb/core/webcomponents/build/assets/location-bla.1423bcce16ddcb21141430cac1428dc1.svg +0 -1
  204. imio/smartweb/core/webcomponents/build/assets/next-react-white.819cb069ac8eec300a9db6a7707712d6.svg +0 -1
  205. imio/smartweb/core/webcomponents/build/assets/next-react.17bc43ff4a6a86f4520f5782f6a89a72.svg +0 -1
  206. imio/smartweb/core/webcomponents/build/assets/search.57bdbf5b191499cd77514097d1c4972c.svg +0 -1
  207. imio/smartweb/core/webcomponents/build/css/686.smartweb-webcomponents-compiled.css +0 -1
  208. imio/smartweb/core/webcomponents/build/js/209.smartweb-webcomponents-compiled.js +0 -2
  209. imio/smartweb/core/webcomponents/build/js/40.smartweb-webcomponents-compiled.js +0 -1
  210. imio/smartweb/core/webcomponents/build/js/674.smartweb-webcomponents-compiled.js +0 -2
  211. imio/smartweb/core/webcomponents/build/js/686.smartweb-webcomponents-compiled.js +0 -1
  212. imio/smartweb/core/webcomponents/src/assets/facebook-news.svg +0 -1
  213. imio/smartweb/core/webcomponents/src/assets/location-bla.svg +0 -1
  214. imio/smartweb/core/webcomponents/src/assets/next-react.svg +0 -1
  215. imio/smartweb/core/webcomponents/src/assets/search.svg +0 -1
  216. imio/smartweb/core/webcomponents/src/assets/skeleton.svg +0 -1
  217. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/download.svg +0 -1
  218. imio.smartweb.core-1.2.38-py3.8-nspkg.pth +0 -3
  219. /imio/smartweb/core/webcomponents/build/js/{209.smartweb-webcomponents-compiled.js.LICENSE.txt → 824.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -0
  220. {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.80.dist-info}/LICENSE.GPL +0 -0
  221. {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.80.dist-info}/LICENSE.rst +0 -0
  222. {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.80.dist-info}/namespace_packages.txt +0 -0
  223. {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.80.dist-info}/top_level.txt +0 -0
@@ -1,18 +1,19 @@
1
- import { useHistory } from "react-router-dom";
1
+ import { useNavigate } from "react-router-dom";
2
2
  import React, { useEffect, useState } from "react";
3
3
  import useAxios from "../../../hooks/useAxios";
4
4
  import useFilterQuery from "../../../hooks/useFilterQuery";
5
- import ReactMarkdown from 'react-markdown';
5
+ import ReactMarkdown from "react-markdown";
6
6
  import "spotlight.js";
7
- import "../../../../node_modules/flexbin/flexbin.css"
7
+ import "../../../../node_modules/flexbin/flexbin.css";
8
8
  import { Translate } from "react-translated";
9
+ import queryString from "query-string";
9
10
 
10
- const ContactContent = ({ queryUrl, onChange }) => {
11
- let history = useHistory();
12
- const queryString = require("query-string");
13
- const { u, ...parsed } = Object.assign(
14
- { UID: queryString.parse(useFilterQuery().toString())['u'], fullobjects: 1 },
15
- );
11
+ const ContactContent = ({ queryUrl, onChange, contextAuthenticatedUser }) => {
12
+ const navigate = useNavigate();
13
+ const { u, ...parsed } = Object.assign({
14
+ UID: queryString.parse(useFilterQuery().toString())["u"],
15
+ fullobjects: 1,
16
+ });
16
17
  const [params, setParams] = useState(parsed);
17
18
  const [item, setitem] = useState({});
18
19
  const [files, setFiles] = useState();
@@ -34,47 +35,50 @@ const ContactContent = ({ queryUrl, onChange }) => {
34
35
  []
35
36
  );
36
37
  useEffect(() => {
37
- setParams(parsed)
38
- }, [queryString.parse(useFilterQuery().toString())['u']]);
38
+ setParams(parsed);
39
+ }, [queryString.parse(useFilterQuery().toString())["u"]]);
39
40
 
40
41
  // set all contacts state
41
42
  useEffect(() => {
42
43
  if (response !== null) {
43
44
  setitem(response.items[0]);
44
45
  }
45
- window.scrollTo(0, 0);
46
+ window.scrollTo({
47
+ top: 0,
48
+ left: 0,
49
+ behavior: "instant",
50
+ });
46
51
  }, [response]);
47
52
 
48
53
  // set image
49
54
  useEffect(() => {
50
55
  if (item.image_affiche_scale) {
51
56
  const img = new Image();
52
- img.src = item.image_affiche_scale
57
+ img.src = item.image_affiche_scale;
53
58
  img.onload = () => {
54
59
  setImage(img);
55
60
  };
56
61
  }
57
62
  }, [item]);
58
63
 
59
-
60
64
  // set social link
61
65
  useEffect(() => {
62
- item.urls && setSocial(item.urls.filter(urls => urls.type !== 'website'));
66
+ item.urls && setSocial(item.urls.filter((urls) => urls.type !== "website"));
63
67
  }, [item]);
64
68
 
65
69
  /// use to set file and gallery items
66
70
  useEffect(() => {
67
71
  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'));
72
+ setFiles(item.items.filter((files) => files["@type"] === "File"));
73
+ setGallery(item.items.filter((files) => files["@type"] === "Image"));
70
74
  }
71
75
  }, [item]);
72
76
 
73
77
  function handleClick() {
74
- history.push("./");
78
+ navigate("..");
75
79
  onChange(null);
76
80
  }
77
- let countryTitle = item.country && item.country.title
81
+ let countryTitle = item.country && item.country.title;
78
82
  let itineraryLink =
79
83
  "https://www.google.com/maps/dir/?api=1&destination=" +
80
84
  item.street +
@@ -87,9 +91,9 @@ const ContactContent = ({ queryUrl, onChange }) => {
87
91
  "+" +
88
92
  item.city +
89
93
  "+" +
90
- countryTitle
94
+ countryTitle;
91
95
 
92
- itineraryLink = itineraryLink.replaceAll('+null', '')
96
+ itineraryLink = itineraryLink.replaceAll("+null", "");
93
97
 
94
98
  const toggleSchedul = () => {
95
99
  setSchedulVisibility(!isSchedulVisible);
@@ -99,27 +103,54 @@ const ContactContent = ({ queryUrl, onChange }) => {
99
103
  <button type="button" onClick={handleClick}>
100
104
  <Translate text="Retour" />
101
105
  </button>
106
+
107
+ {contextAuthenticatedUser === "False" ? (
108
+ <a
109
+ href={item["@id"]}
110
+ target="_blank"
111
+ title="Editer la fiche"
112
+ className="edit-rest-elements edit-rest-elements-content"
113
+ >
114
+ <svg
115
+ xmlns="http://www.w3.org/2000/svg"
116
+ width="16"
117
+ height="16"
118
+ fill="currentColor"
119
+ class="bi bi-pencil-square"
120
+ viewBox="0 0 16 16"
121
+ >
122
+ <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" />
123
+ <path
124
+ fill-rule="evenodd"
125
+ 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"
126
+ />
127
+ </svg>
128
+ </a>
129
+ ) : (
130
+ ""
131
+ )}
102
132
  <article>
103
133
  <header>
104
134
  <h2 className="r-content-title">{item.title}</h2>
105
- {item.subtitle ? (
106
- <h3 className="r-content-subtitle">{item.subtitle}</h3>
107
- ) : (
108
- ""
109
- )}
135
+ {item.subtitle ? <h3 className="r-content-subtitle">{item.subtitle}</h3> : ""}
110
136
  </header>
111
137
  {item.image_affiche_scale && (
112
138
  <figure className="r-content-figure">
113
139
  <div
114
140
  className="r-content-figure-blur"
115
- style={{ backgroundImage: "url(" + item.image_affiche_scale + ")" }} />
116
- <img className="r-content-figure-img"
141
+ style={{ backgroundImage: "url(" + item.image_affiche_scale + ")" }}
142
+ />
143
+ <img
144
+ className="r-content-figure-img"
117
145
  src={item.image_affiche_scale}
118
- style={{ objectFit: image && image.width >= image.height ? "cover" : "contain" }}
119
- alt="" />
146
+ style={{
147
+ objectFit:
148
+ image && image.width >= image.height ? "cover" : "contain",
149
+ }}
150
+ alt=""
151
+ />
120
152
  </figure>
121
153
  )}
122
-
123
154
  </article>
124
155
  <div className="contactCard">
125
156
  <div className="contactText">
@@ -127,12 +158,20 @@ const ContactContent = ({ queryUrl, onChange }) => {
127
158
  <ReactMarkdown>{item.description}</ReactMarkdown>
128
159
  </div>
129
160
  <div className="contactTextAll">
130
- <p className="annuaire-info-title">Infos pratiques</p>
161
+ <p className="annuaire-info-title">
162
+ <Translate text="Infos pratiques" />
163
+ </p>
131
164
  {item.category ? <span>{item.category}</span> : ""}
132
165
  {item.street ? (
133
166
  <div className="annaire-adresse">
134
167
  <div className="annaire-adresse-icon">
135
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
168
+ <svg
169
+ xmlns="http://www.w3.org/2000/svg"
170
+ width="16"
171
+ height="16"
172
+ fill="currentColor"
173
+ viewBox="0 0 16 16"
174
+ >
136
175
  <path d="M8 16s6-5.686 6-10A6 6 0 0 0 2 6c0 4.314 6 10 6 10zm0-7a3 3 0 1 1 0-6 3 3 0 0 1 0 6z" />
137
176
  </svg>
138
177
  </div>
@@ -149,29 +188,53 @@ const ContactContent = ({ queryUrl, onChange }) => {
149
188
  {item.city ? <span>{item.city}</span> : ""}
150
189
  </a>
151
190
  </div>
152
-
153
191
  </div>
154
-
155
192
  ) : (
156
193
  ""
157
194
  )}
158
195
  {/* schedule */}
159
- {
160
- item.table_date &&
161
- <div onClick={toggleSchedul} className="annuaire-schedul" role="button" aria-expanded="false" >
196
+ {item.table_date && (
197
+ <a
198
+ href="javascript:void(0)"
199
+ onClick={toggleSchedul}
200
+ className="annuaire-schedul"
201
+ role="button"
202
+ aria-expanded="false"
203
+ aria-label="Afficher l'horaire complet"
204
+ >
162
205
  <div className="annuaire-schedul-icon">
163
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clock-fill" viewBox="0 0 16 16">
206
+ <svg
207
+ xmlns="http://www.w3.org/2000/svg"
208
+ width="16"
209
+ height="16"
210
+ fill="currentColor"
211
+ className="bi bi-clock-fill"
212
+ viewBox="0 0 16 16"
213
+ >
164
214
  <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71z" />
165
215
  </svg>
166
216
  </div>
167
217
  <div className="annuaire-schedul-content">
168
218
  {isSchedulVisible ? (
169
219
  <>
170
- <span className={item.schedule_for_today === "Fermé" ? "annuaire-day-close" : "annuaire-day-open"}>
171
- {item.schedule_for_today}
220
+ <span
221
+ className={
222
+ item.schedule_for_today === "Fermé"
223
+ ? "annuaire-day-close"
224
+ : "annuaire-day-open"
225
+ }
226
+ >
227
+ <Translate text={item.schedule_for_today} />
172
228
  </span>
173
- <svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" fill="currentColor" class="bi bi-caret-down-fill" viewBox="0 0 16 16">
174
- <path d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"/>
229
+ <svg
230
+ xmlns="http://www.w3.org/2000/svg"
231
+ width="10"
232
+ height="10"
233
+ fill="currentColor"
234
+ className="bi bi-caret-down-fill"
235
+ viewBox="0 0 16 16"
236
+ >
237
+ <path d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z" />
175
238
  </svg>
176
239
  </>
177
240
  ) : (
@@ -183,7 +246,10 @@ const ContactContent = ({ queryUrl, onChange }) => {
183
246
 
184
247
  return (
185
248
  <li key={index}>
186
- <strong>{dayOfWeek}:</strong> {status}
249
+ <strong>
250
+ <Translate text={dayOfWeek} />:
251
+ </strong>{" "}
252
+ {status}
187
253
  </li>
188
254
  );
189
255
  })}
@@ -191,32 +257,19 @@ const ContactContent = ({ queryUrl, onChange }) => {
191
257
  </div>
192
258
  )}
193
259
  </div>
194
- {/* <div className="annuaire-schedul-content">
195
- <span className={item.schedule_for_today === "Fermé" ? "annuaire-day-close" : "annuaire-day-open"}>
196
- {item.schedule_for_today}
197
- </span>
198
- <div class="">
199
- <ul>
200
- {item.table_date.map((day, index) => {
201
- const dayOfWeek = Object.keys(day)[0];
202
- const status = day[dayOfWeek];
203
-
204
- return (
205
- <li key={index}>
206
- <strong>{dayOfWeek}:</strong> {status}
207
- </li>
208
- );
209
- })}
210
- </ul>
211
- </div>
212
- </div> */}
213
- </div>
214
- }
260
+ </a>
261
+ )}
215
262
 
216
- {item.phones && item.phones.length > 0
217
- ? (<div className="annuaire-phone">
263
+ {item.phones && item.phones.length > 0 ? (
264
+ <div className="annuaire-phone">
218
265
  <div className="annuaire-phone-icon">
219
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
266
+ <svg
267
+ xmlns="http://www.w3.org/2000/svg"
268
+ width="16"
269
+ height="16"
270
+ fill="currentColor"
271
+ viewBox="0 0 16 16"
272
+ >
220
273
  <path d="M1.885.511a1.745 1.745 0 0 1 2.61.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.678.678 0 0 0 .178.643l2.457 2.457a.678.678 0 0 0 .644.178l2.189-.547a1.745 1.745 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.634 18.634 0 0 1-7.01-4.42 18.634 18.634 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877L1.885.511z" />
221
274
  </svg>
222
275
  </div>
@@ -225,20 +278,26 @@ const ContactContent = ({ queryUrl, onChange }) => {
225
278
  return (
226
279
  <span key={i}>
227
280
  {phone.label ? phone.label + ": " : ""}
228
- <a href={"tel:" + phone.number}>
229
- {phone.number}
230
- </a>
281
+ <a href={"tel:" + phone.number}>{phone.number}</a>
231
282
  </span>
232
283
  );
233
284
  })}
234
285
  </div>
235
- </div>)
236
- : ""}
286
+ </div>
287
+ ) : (
288
+ ""
289
+ )}
237
290
 
238
- {item.mails && item.mails.length > 0
239
- ? <div className="annuaire-website-mails">
291
+ {item.mails && item.mails.length > 0 ? (
292
+ <div className="annuaire-website-mails">
240
293
  <div className="annuaire-website-mails-icon">
241
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
294
+ <svg
295
+ xmlns="http://www.w3.org/2000/svg"
296
+ width="16"
297
+ height="16"
298
+ fill="currentColor"
299
+ viewBox="0 0 16 16"
300
+ >
242
301
  <path d="M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414.05 3.555ZM0 4.697v7.104l5.803-3.558L0 4.697ZM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586l-1.239-.757Zm3.436-.586L16 11.801V4.697l-5.803 3.546Z" />
243
302
  </svg>
244
303
  </div>
@@ -255,155 +314,256 @@ const ContactContent = ({ queryUrl, onChange }) => {
255
314
  })}
256
315
  </div>
257
316
  </div>
258
- : ""}
317
+ ) : (
318
+ ""
319
+ )}
259
320
 
260
- {item.urls && item.urls.length > 0
261
- ? <div className="annuaire-website-link">
321
+ {item.urls && item.urls.length > 0 ? (
322
+ <div className="annuaire-website-link">
262
323
  <div className="annuaire-website-link-icon">
263
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
324
+ <svg
325
+ xmlns="http://www.w3.org/2000/svg"
326
+ width="16"
327
+ height="16"
328
+ viewBox="0 0 16 16"
329
+ >
264
330
  <path d="M2.5 2A1.5 1.5 0 0 0 1 3.5V12h14V3.5A1.5 1.5 0 0 0 13.5 2h-11zM0 12.5h16a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 0 12.5z" />
265
331
  </svg>
266
332
  </div>
267
333
  <ul className="annuaire-website-link-content">
268
- {item.urls.filter(url => url.type === "website").map((website, i) => {
269
- return (
270
- <>
271
- <li key={i}>
272
- <a href={website.url} target="_blank" rel="noreferrer">
273
- {(website.url)}
274
- </a>
275
- </li>
276
- </>
277
- );
278
- })}
334
+ {item.urls
335
+ .filter((url) => url.type === "website")
336
+ .map((website, i) => {
337
+ return (
338
+ <>
339
+ <li key={i}>
340
+ <a
341
+ href={website.url}
342
+ target="_blank"
343
+ rel="noreferrer"
344
+ >
345
+ {website.url}
346
+ </a>
347
+ </li>
348
+ </>
349
+ );
350
+ })}
279
351
  </ul>
280
352
  </div>
281
- : ""}
353
+ ) : (
354
+ ""
355
+ )}
282
356
 
283
357
  {/* add social icons */}
284
- {social &&
358
+ {social && (
285
359
  <div className="annuaire-social-link">
286
360
  {social.length > 1 ? (
287
361
  <ul>
288
362
  {social.map((url, i) => {
289
363
  return (
290
364
  <li key={i}>
291
- <a href={url.url} target="_blank" rel="noreferrer">
365
+ <a
366
+ href={url.url}
367
+ target="_blank"
368
+ rel="noreferrer"
369
+ >
292
370
  {url.type === "facebook" ? (
293
- <svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" viewBox="0 0 16 16">
371
+ <svg
372
+ xmlns="http://www.w3.org/2000/svg"
373
+ width="25"
374
+ height="25"
375
+ fill="currentColor"
376
+ viewBox="0 0 16 16"
377
+ >
294
378
  <path d="M16 8.049c0-4.446-3.582-8.05-8-8.05C3.58 0-.002 3.603-.002 8.05c0 4.017 2.926 7.347 6.75 7.951v-5.625h-2.03V8.05H6.75V6.275c0-2.017 1.195-3.131 3.022-3.131.876 0 1.791.157 1.791.157v1.98h-1.009c-.993 0-1.303.621-1.303 1.258v1.51h2.218l-.354 2.326H9.25V16c3.824-.604 6.75-3.934 6.75-7.951z" />
295
379
  </svg>
296
- )
297
- : url.type === "instagram" ? (
298
- <svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" viewBox="0 0 16 16">
299
- <path d="M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z" />
300
- </svg>
301
- )
302
- : url.type === "twitter" ? (
303
- <svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" viewBox="0 0 16 16">
304
- <path d="M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z" />
305
- </svg>
306
- )
307
- : url.type === "youtube" ? (
308
- <svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" viewBox="0 0 16 16">
309
- <path d="M8.051 1.999h.089c.822.003 4.987.033 6.11.335a2.01 2.01 0 0 1 1.415 1.42c.101.38.172.883.22 1.402l.01.104.022.26.008.104c.065.914.073 1.77.074 1.957v.075c-.001.194-.01 1.108-.082 2.06l-.008.105-.009.104c-.05.572-.124 1.14-.235 1.558a2.007 2.007 0 0 1-1.415 1.42c-1.16.312-5.569.334-6.18.335h-.142c-.309 0-1.587-.006-2.927-.052l-.17-.006-.087-.004-.171-.007-.171-.007c-1.11-.049-2.167-.128-2.654-.26a2.007 2.007 0 0 1-1.415-1.419c-.111-.417-.185-.986-.235-1.558L.09 9.82l-.008-.104A31.4 31.4 0 0 1 0 7.68v-.123c.002-.215.01-.958.064-1.778l.007-.103.003-.052.008-.104.022-.26.01-.104c.048-.519.119-1.023.22-1.402a2.007 2.007 0 0 1 1.415-1.42c.487-.13 1.544-.21 2.654-.26l.17-.007.172-.006.086-.003.171-.007A99.788 99.788 0 0 1 7.858 2h.193zM6.4 5.209v4.818l4.157-2.408L6.4 5.209z" />
310
- </svg>
311
- )
312
- : url.type === "pinterest" ? (
313
- <svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" viewBox="0 0 16 16">
314
- <path d="M8 0a8 8 0 0 0-2.915 15.452c-.07-.633-.134-1.606.027-2.297.146-.625.938-3.977.938-3.977s-.239-.479-.239-1.187c0-1.113.645-1.943 1.448-1.943.682 0 1.012.512 1.012 1.127 0 .686-.437 1.712-.663 2.663-.188.796.4 1.446 1.185 1.446 1.422 0 2.515-1.5 2.515-3.664 0-1.915-1.377-3.254-3.342-3.254-2.276 0-3.612 1.707-3.612 3.471 0 .688.265 1.425.595 1.826a.24.24 0 0 1 .056.23c-.061.252-.196.796-.222.907-.035.146-.116.177-.268.107-1-.465-1.624-1.926-1.624-3.1 0-2.523 1.834-4.84 5.286-4.84 2.775 0 4.932 1.977 4.932 4.62 0 2.757-1.739 4.976-4.151 4.976-.811 0-1.573-.421-1.834-.919l-.498 1.902c-.181.695-.669 1.566-.995 2.097A8 8 0 1 0 8 0z" />
315
- </svg>
316
- )
317
- : ""
318
- }
380
+ ) : url.type === "instagram" ? (
381
+ <svg
382
+ xmlns="http://www.w3.org/2000/svg"
383
+ width="25"
384
+ height="25"
385
+ fill="currentColor"
386
+ viewBox="0 0 16 16"
387
+ >
388
+ <path d="M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z" />
389
+ </svg>
390
+ ) : url.type === "twitter" ? (
391
+ <svg
392
+ xmlns="http://www.w3.org/2000/svg"
393
+ width="25"
394
+ height="25"
395
+ fill="currentColor"
396
+ class="bi bi-twitter-x"
397
+ viewBox="0 0 16 16"
398
+ >
399
+ <path d="M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z" />
400
+ </svg>
401
+ ) : url.type === "youtube" ? (
402
+ <svg
403
+ xmlns="http://www.w3.org/2000/svg"
404
+ width="25"
405
+ height="25"
406
+ fill="currentColor"
407
+ viewBox="0 0 16 16"
408
+ >
409
+ <path d="M8.051 1.999h.089c.822.003 4.987.033 6.11.335a2.01 2.01 0 0 1 1.415 1.42c.101.38.172.883.22 1.402l.01.104.022.26.008.104c.065.914.073 1.77.074 1.957v.075c-.001.194-.01 1.108-.082 2.06l-.008.105-.009.104c-.05.572-.124 1.14-.235 1.558a2.007 2.007 0 0 1-1.415 1.42c-1.16.312-5.569.334-6.18.335h-.142c-.309 0-1.587-.006-2.927-.052l-.17-.006-.087-.004-.171-.007-.171-.007c-1.11-.049-2.167-.128-2.654-.26a2.007 2.007 0 0 1-1.415-1.419c-.111-.417-.185-.986-.235-1.558L.09 9.82l-.008-.104A31.4 31.4 0 0 1 0 7.68v-.123c.002-.215.01-.958.064-1.778l.007-.103.003-.052.008-.104.022-.26.01-.104c.048-.519.119-1.023.22-1.402a2.007 2.007 0 0 1 1.415-1.42c.487-.13 1.544-.21 2.654-.26l.17-.007.172-.006.086-.003.171-.007A99.788 99.788 0 0 1 7.858 2h.193zM6.4 5.209v4.818l4.157-2.408L6.4 5.209z" />
410
+ </svg>
411
+ ) : url.type === "linkedin" ? (
412
+ <svg
413
+ xmlns="http://www.w3.org/2000/svg"
414
+ width="25"
415
+ height="25"
416
+ fill="currentColor"
417
+ class="bi bi-linkedin"
418
+ viewBox="0 0 16 16"
419
+ >
420
+ <path d="M0 1.146C0 .513.526 0 1.175 0h13.65C15.474 0 16 .513 16 1.146v13.708c0 .633-.526 1.146-1.175 1.146H1.175C.526 16 0 15.487 0 14.854zm4.943 12.248V6.169H2.542v7.225zm-1.2-8.212c.837 0 1.358-.554 1.358-1.248-.015-.709-.52-1.248-1.342-1.248S2.4 3.226 2.4 3.934c0 .694.521 1.248 1.327 1.248zm4.908 8.212V9.359c0-.216.016-.432.08-.586.173-.431.568-.878 1.232-.878.869 0 1.216.662 1.216 1.634v3.865h2.401V9.25c0-2.22-1.184-3.252-2.764-3.252-1.274 0-1.845.7-2.165 1.193v.025h-.016l.016-.025V6.169h-2.4c.03.678 0 7.225 0 7.225z" />
421
+ </svg>
422
+ ) : url.type === "pinterest" ? (
423
+ <svg
424
+ xmlns="http://www.w3.org/2000/svg"
425
+ width="25"
426
+ height="25"
427
+ fill="currentColor"
428
+ viewBox="0 0 16 16"
429
+ >
430
+ <path d="M8 0a8 8 0 0 0-2.915 15.452c-.07-.633-.134-1.606.027-2.297.146-.625.938-3.977.938-3.977s-.239-.479-.239-1.187c0-1.113.645-1.943 1.448-1.943.682 0 1.012.512 1.012 1.127 0 .686-.437 1.712-.663 2.663-.188.796.4 1.446 1.185 1.446 1.422 0 2.515-1.5 2.515-3.664 0-1.915-1.377-3.254-3.342-3.254-2.276 0-3.612 1.707-3.612 3.471 0 .688.265 1.425.595 1.826a.24.24 0 0 1 .056.23c-.061.252-.196.796-.222.907-.035.146-.116.177-.268.107-1-.465-1.624-1.926-1.624-3.1 0-2.523 1.834-4.84 5.286-4.84 2.775 0 4.932 1.977 4.932 4.62 0 2.757-1.739 4.976-4.151 4.976-.811 0-1.573-.421-1.834-.919l-.498 1.902c-.181.695-.669 1.566-.995 2.097A8 8 0 1 0 8 0z" />
431
+ </svg>
432
+ ) : (
433
+ ""
434
+ )}
319
435
  </a>
320
- </li>)
436
+ </li>
437
+ );
321
438
  })}
322
439
  </ul>
323
440
  ) : (
324
441
  <div>
325
- <a href={social[0] && social[0].url} target="_blank" rel="noreferrer">
442
+ <a
443
+ href={social[0] && social[0].url}
444
+ target="_blank"
445
+ rel="noreferrer"
446
+ >
326
447
  {social[0] && social[0].type === "facebook" ? (
327
- <svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" viewBox="0 0 16 16">
448
+ <svg
449
+ xmlns="http://www.w3.org/2000/svg"
450
+ width="25"
451
+ height="25"
452
+ fill="currentColor"
453
+ viewBox="0 0 16 16"
454
+ >
328
455
  <path d="M16 8.049c0-4.446-3.582-8.05-8-8.05C3.58 0-.002 3.603-.002 8.05c0 4.017 2.926 7.347 6.75 7.951v-5.625h-2.03V8.05H6.75V6.275c0-2.017 1.195-3.131 3.022-3.131.876 0 1.791.157 1.791.157v1.98h-1.009c-.993 0-1.303.621-1.303 1.258v1.51h2.218l-.354 2.326H9.25V16c3.824-.604 6.75-3.934 6.75-7.951z" />
329
456
  </svg>
330
- )
331
- : social[0] && social[0].type === "instagram" ? (
332
- <svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" viewBox="0 0 16 16">
333
- <path d="M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z" />
334
- </svg>
335
- )
336
- : social[0] && social[0].type === "twitter" ? (
337
- <svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" viewBox="0 0 16 16">
338
- <path d="M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z" />
339
- </svg>
340
- )
341
- : social[0] && social[0].type === "youtube" ? (
342
- <svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" viewBox="0 0 16 16">
343
- <path d="M8.051 1.999h.089c.822.003 4.987.033 6.11.335a2.01 2.01 0 0 1 1.415 1.42c.101.38.172.883.22 1.402l.01.104.022.26.008.104c.065.914.073 1.77.074 1.957v.075c-.001.194-.01 1.108-.082 2.06l-.008.105-.009.104c-.05.572-.124 1.14-.235 1.558a2.007 2.007 0 0 1-1.415 1.42c-1.16.312-5.569.334-6.18.335h-.142c-.309 0-1.587-.006-2.927-.052l-.17-.006-.087-.004-.171-.007-.171-.007c-1.11-.049-2.167-.128-2.654-.26a2.007 2.007 0 0 1-1.415-1.419c-.111-.417-.185-.986-.235-1.558L.09 9.82l-.008-.104A31.4 31.4 0 0 1 0 7.68v-.123c.002-.215.01-.958.064-1.778l.007-.103.003-.052.008-.104.022-.26.01-.104c.048-.519.119-1.023.22-1.402a2.007 2.007 0 0 1 1.415-1.42c.487-.13 1.544-.21 2.654-.26l.17-.007.172-.006.086-.003.171-.007A99.788 99.788 0 0 1 7.858 2h.193zM6.4 5.209v4.818l4.157-2.408L6.4 5.209z" />
344
- </svg>
345
- )
346
- : social[0] && social[0].type === "pinterest" ? (
347
- <svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" viewBox="0 0 16 16">
348
- <path d="M8 0a8 8 0 0 0-2.915 15.452c-.07-.633-.134-1.606.027-2.297.146-.625.938-3.977.938-3.977s-.239-.479-.239-1.187c0-1.113.645-1.943 1.448-1.943.682 0 1.012.512 1.012 1.127 0 .686-.437 1.712-.663 2.663-.188.796.4 1.446 1.185 1.446 1.422 0 2.515-1.5 2.515-3.664 0-1.915-1.377-3.254-3.342-3.254-2.276 0-3.612 1.707-3.612 3.471 0 .688.265 1.425.595 1.826a.24.24 0 0 1 .056.23c-.061.252-.196.796-.222.907-.035.146-.116.177-.268.107-1-.465-1.624-1.926-1.624-3.1 0-2.523 1.834-4.84 5.286-4.84 2.775 0 4.932 1.977 4.932 4.62 0 2.757-1.739 4.976-4.151 4.976-.811 0-1.573-.421-1.834-.919l-.498 1.902c-.181.695-.669 1.566-.995 2.097A8 8 0 1 0 8 0z" />
349
- </svg>
350
- )
351
- : ""
352
- }
457
+ ) : social[0] && social[0].type === "instagram" ? (
458
+ <svg
459
+ xmlns="http://www.w3.org/2000/svg"
460
+ width="25"
461
+ height="25"
462
+ fill="currentColor"
463
+ viewBox="0 0 16 16"
464
+ >
465
+ <path d="M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z" />
466
+ </svg>
467
+ ) : social[0] && social[0].type === "twitter" ? (
468
+ <svg
469
+ xmlns="http://www.w3.org/2000/svg"
470
+ width="25"
471
+ height="25"
472
+ fill="currentColor"
473
+ class="bi bi-twitter-x"
474
+ viewBox="0 0 16 16"
475
+ >
476
+ <path d="M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z" />
477
+ </svg>
478
+ ) : social[0] && social[0].type === "youtube" ? (
479
+ <svg
480
+ xmlns="http://www.w3.org/2000/svg"
481
+ width="25"
482
+ height="25"
483
+ fill="currentColor"
484
+ viewBox="0 0 16 16"
485
+ >
486
+ <path d="M8.051 1.999h.089c.822.003 4.987.033 6.11.335a2.01 2.01 0 0 1 1.415 1.42c.101.38.172.883.22 1.402l.01.104.022.26.008.104c.065.914.073 1.77.074 1.957v.075c-.001.194-.01 1.108-.082 2.06l-.008.105-.009.104c-.05.572-.124 1.14-.235 1.558a2.007 2.007 0 0 1-1.415 1.42c-1.16.312-5.569.334-6.18.335h-.142c-.309 0-1.587-.006-2.927-.052l-.17-.006-.087-.004-.171-.007-.171-.007c-1.11-.049-2.167-.128-2.654-.26a2.007 2.007 0 0 1-1.415-1.419c-.111-.417-.185-.986-.235-1.558L.09 9.82l-.008-.104A31.4 31.4 0 0 1 0 7.68v-.123c.002-.215.01-.958.064-1.778l.007-.103.003-.052.008-.104.022-.26.01-.104c.048-.519.119-1.023.22-1.402a2.007 2.007 0 0 1 1.415-1.42c.487-.13 1.544-.21 2.654-.26l.17-.007.172-.006.086-.003.171-.007A99.788 99.788 0 0 1 7.858 2h.193zM6.4 5.209v4.818l4.157-2.408L6.4 5.209z" />
487
+ </svg>
488
+ ) : social[0] && social[0].type === "linkedin" ? (
489
+ <svg
490
+ xmlns="http://www.w3.org/2000/svg"
491
+ width="25"
492
+ height="25"
493
+ fill="currentColor"
494
+ class="bi bi-linkedin"
495
+ viewBox="0 0 16 16"
496
+ >
497
+ <path d="M0 1.146C0 .513.526 0 1.175 0h13.65C15.474 0 16 .513 16 1.146v13.708c0 .633-.526 1.146-1.175 1.146H1.175C.526 16 0 15.487 0 14.854zm4.943 12.248V6.169H2.542v7.225zm-1.2-8.212c.837 0 1.358-.554 1.358-1.248-.015-.709-.52-1.248-1.342-1.248S2.4 3.226 2.4 3.934c0 .694.521 1.248 1.327 1.248zm4.908 8.212V9.359c0-.216.016-.432.08-.586.173-.431.568-.878 1.232-.878.869 0 1.216.662 1.216 1.634v3.865h2.401V9.25c0-2.22-1.184-3.252-2.764-3.252-1.274 0-1.845.7-2.165 1.193v.025h-.016l.016-.025V6.169h-2.4c.03.678 0 7.225 0 7.225z" />
498
+ </svg>
499
+ ) : social[0] && social[0].type === "pinterest" ? (
500
+ <svg
501
+ xmlns="http://www.w3.org/2000/svg"
502
+ width="25"
503
+ height="25"
504
+ fill="currentColor"
505
+ viewBox="0 0 16 16"
506
+ >
507
+ <path d="M8 0a8 8 0 0 0-2.915 15.452c-.07-.633-.134-1.606.027-2.297.146-.625.938-3.977.938-3.977s-.239-.479-.239-1.187c0-1.113.645-1.943 1.448-1.943.682 0 1.012.512 1.012 1.127 0 .686-.437 1.712-.663 2.663-.188.796.4 1.446 1.185 1.446 1.422 0 2.515-1.5 2.515-3.664 0-1.915-1.377-3.254-3.342-3.254-2.276 0-3.612 1.707-3.612 3.471 0 .688.265 1.425.595 1.826a.24.24 0 0 1 .056.23c-.061.252-.196.796-.222.907-.035.146-.116.177-.268.107-1-.465-1.624-1.926-1.624-3.1 0-2.523 1.834-4.84 5.286-4.84 2.775 0 4.932 1.977 4.932 4.62 0 2.757-1.739 4.976-4.151 4.976-.811 0-1.573-.421-1.834-.919l-.498 1.902c-.181.695-.669 1.566-.995 2.097A8 8 0 1 0 8 0z" />
508
+ </svg>
509
+ ) : (
510
+ ""
511
+ )}
353
512
  </a>
354
513
  </div>
355
- )
356
- }
514
+ )}
357
515
  </div>
358
- }
516
+ )}
359
517
 
360
518
  {item.logo_thumb_scale ? (
361
- <img
362
- className="annuaire-logo"
363
- src={item.logo_thumb_scale}
364
- alt="Logo"
365
- />
519
+ <img className="annuaire-logo" src={item.logo_thumb_scale} alt="" />
366
520
  ) : (
367
521
  ""
368
522
  )}
369
- {item.logo_thumb_scale &&
370
- <img
371
- className="annuaire-logo"
372
- src={item.logo_thumb_scale}
373
- alt="Logo"
374
- />
375
- }
376
523
  </div>
377
524
  </div>
378
525
  {/* add files to download */}
379
- {
380
- files &&
526
+ {files && (
381
527
  <div className="r-content-files">
382
528
  {files.map((file, i) => (
383
529
  <div key={i} className="r-content-file">
384
- <a href={file.targetUrl} className="r-content-file-link" rel="nofollow">
530
+ <a
531
+ href={file.targetUrl}
532
+ className="r-content-file-link"
533
+ rel="nofollow"
534
+ >
385
535
  <span className="r-content-file-title">{file.title}</span>
386
536
  <span className="r-content-file-icon">
387
- <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>
537
+ <svg
538
+ width="21"
539
+ height="21"
540
+ viewBox="0 0 24 24"
541
+ fill="none"
542
+ stroke="#8899a4"
543
+ stroke-width="2"
544
+ stroke-linecap="square"
545
+ stroke-linejoin="arcs"
546
+ >
547
+ <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>
548
+ </svg>
388
549
  </span>
389
550
  </a>
390
551
  </div>
391
552
  ))}
392
553
  </div>
393
- }
554
+ )}
394
555
  {/* add gallery */}
395
- {
396
- gallery &&
556
+ {gallery && (
397
557
  <div className="r-content-gallery">
398
558
  <div className="spotlight-group flexbin r-content-gallery">
399
559
  {gallery.map((image, i) => (
400
- <a key={i} className="spotlight" href={image.image_full_scale} >
560
+ <a key={i} className="spotlight" href={image.image_full_scale}>
401
561
  <img src={image.image_preview_scale} alt="" />
402
562
  </a>
403
563
  ))}
404
564
  </div>
405
565
  </div>
406
- }
566
+ )}
407
567
  </div>
408
568
  </div>
409
569
  );