imio.smartweb.core 1.2.11__py3-none-any.whl → 1.2.19__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 (99) hide show
  1. imio/smartweb/core/browser/configure.zcml +1 -1
  2. imio/smartweb/core/browser/dashboards/configure.zcml +0 -2
  3. imio/smartweb/core/browser/dashboards/plausible.py +4 -4
  4. imio/smartweb/core/browser/static/smartweb-edit-compiled.js +1 -1
  5. imio/smartweb/core/browser/static/src/edit.js +5 -0
  6. imio/smartweb/core/browser/utils.py +4 -30
  7. imio/smartweb/core/contents/__init__.py +2 -0
  8. imio/smartweb/core/contents/rest/base.py +12 -0
  9. imio/smartweb/core/contents/rest/configure.zcml +7 -0
  10. imio/smartweb/core/contents/rest/directory/content.py +2 -2
  11. imio/smartweb/core/contents/rest/directory/view.pt +2 -1
  12. imio/smartweb/core/contents/rest/directory/view.py +3 -0
  13. imio/smartweb/core/contents/rest/events/content.py +2 -2
  14. imio/smartweb/core/contents/rest/events/view.pt +2 -1
  15. imio/smartweb/core/contents/rest/events/view.py +3 -0
  16. imio/smartweb/core/contents/rest/news/content.py +2 -2
  17. imio/smartweb/core/contents/rest/news/view.pt +2 -1
  18. imio/smartweb/core/contents/rest/news/view.py +3 -0
  19. imio/smartweb/core/contents/rest/search/endpoint.py +1 -1
  20. imio/smartweb/core/contents/rest/traversal.py +18 -0
  21. imio/smartweb/core/contents/rest/view.py +7 -0
  22. imio/smartweb/core/contents/sections/events/view.py +1 -1
  23. imio/smartweb/core/contents/sections/news/view.py +1 -1
  24. imio/smartweb/core/interfaces.py +4 -0
  25. imio/smartweb/core/profiles/default/actions.xml +15 -0
  26. imio/smartweb/core/profiles/default/metadata.xml +1 -1
  27. imio/smartweb/core/rest/authentic_sources.py +47 -10
  28. imio/smartweb/core/rest/configure.zcml +54 -0
  29. imio/smartweb/core/tests/test_rest.py +120 -0
  30. imio/smartweb/core/tests/utils.py +15 -0
  31. imio/smartweb/core/upgrades/configure.zcml +18 -0
  32. imio/smartweb/core/upgrades/profiles/1051_to_1052/actions.xml +20 -0
  33. imio/smartweb/core/utils.py +31 -0
  34. imio/smartweb/core/viewlets/configure.zcml +11 -0
  35. imio/smartweb/core/viewlets/httpheaders.py +13 -0
  36. imio/smartweb/core/viewlets/ogp_tag_header.pt +10 -0
  37. imio/smartweb/core/viewlets/ogptags.py +8 -0
  38. imio/smartweb/core/webcomponents/build/css/54.smartweb-webcomponents-compiled.css +1 -0
  39. imio/smartweb/core/webcomponents/build/css/647.smartweb-webcomponents-compiled.css +1 -0
  40. imio/smartweb/core/webcomponents/build/js/3.smartweb-webcomponents-compiled.js +2 -0
  41. imio/smartweb/core/webcomponents/build/js/323.smartweb-webcomponents-compiled.js +1 -1
  42. imio/smartweb/core/webcomponents/build/js/363.smartweb-webcomponents-compiled.js +2 -0
  43. imio/smartweb/core/webcomponents/build/js/493.smartweb-webcomponents-compiled.js +1 -0
  44. imio/smartweb/core/webcomponents/build/js/54.smartweb-webcomponents-compiled.js +1 -0
  45. imio/smartweb/core/webcomponents/build/js/647.smartweb-webcomponents-compiled.js +2 -0
  46. imio/smartweb/core/webcomponents/build/js/647.smartweb-webcomponents-compiled.js.LICENSE.txt +1 -0
  47. imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js +1 -1
  48. imio/smartweb/core/webcomponents/package.json +14 -17
  49. imio/smartweb/core/webcomponents/src/assets/contentIcon/download.svg +1 -0
  50. imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.jsx +85 -84
  51. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactCard/ContactCard.jsx +22 -23
  52. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +109 -93
  53. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/download.svg +1 -0
  54. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactList/ContactList.jsx +7 -7
  55. imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx +43 -0
  56. imio/smartweb/core/webcomponents/src/components/Events/{ContactContent/ContactContent.jsx → EventContent/EventContent.jsx} +76 -81
  57. imio/smartweb/core/webcomponents/src/components/Events/{ContactList/ContactList.jsx → EventList/EventList.jsx} +9 -9
  58. imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +99 -98
  59. imio/smartweb/core/webcomponents/src/components/Events/Events.scss +1 -1
  60. imio/smartweb/core/webcomponents/src/components/News/News.jsx +23 -25
  61. imio/smartweb/core/webcomponents/src/components/News/News.scss +3 -5
  62. imio/smartweb/core/webcomponents/src/components/News/{ContactCard/ContactCard.jsx → NewsCard/NewsCard.jsx} +14 -27
  63. imio/smartweb/core/webcomponents/src/components/News/{ContactContent/ContactContent.jsx → NewsContent/NewsContent.jsx} +37 -40
  64. imio/smartweb/core/webcomponents/src/components/News/{ContactList/ContactList.jsx → NewsList/NewsList.jsx} +9 -9
  65. imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx +5 -5
  66. imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx +5 -5
  67. imio/smartweb/core/webcomponents/src/components/Search/NewsResult/NewsResult.jsx +5 -5
  68. imio/smartweb/core/webcomponents/src/components/Search/WebResult/WebResult.jsx +3 -3
  69. imio/smartweb/core/webcomponents/src/{components/Events/ContactMap/ContactMap.jsx → utils/Map.jsx} +60 -64
  70. {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/METADATA +72 -1
  71. {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/RECORD +81 -83
  72. imio/smartweb/core/webcomponents/build/css/267.smartweb-webcomponents-compiled.css +0 -1
  73. imio/smartweb/core/webcomponents/build/css/779.smartweb-webcomponents-compiled.css +0 -1
  74. imio/smartweb/core/webcomponents/build/js/267.smartweb-webcomponents-compiled.js +0 -1
  75. imio/smartweb/core/webcomponents/build/js/552.smartweb-webcomponents-compiled.js +0 -2
  76. imio/smartweb/core/webcomponents/build/js/565.smartweb-webcomponents-compiled.js +0 -1
  77. imio/smartweb/core/webcomponents/build/js/612.smartweb-webcomponents-compiled.js +0 -2
  78. imio/smartweb/core/webcomponents/build/js/779.smartweb-webcomponents-compiled.js +0 -1
  79. imio/smartweb/core/webcomponents/pnpm-lock.yaml +0 -7066
  80. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactMap/ContactMap.jsx +0 -156
  81. imio/smartweb/core/webcomponents/src/components/Annuaire/Skeleton/LoaderCss.jsx +0 -7
  82. imio/smartweb/core/webcomponents/src/components/Annuaire/Skeleton/Skeleton.jsx +0 -20
  83. imio/smartweb/core/webcomponents/src/components/Events/ContactCard/ContactCard.jsx +0 -49
  84. imio/smartweb/core/webcomponents/src/components/Events/ContactMap/ContactMap.scss +0 -0
  85. imio/smartweb/core/webcomponents/src/components/Events/Skeleton/Skeleton.jsx +0 -20
  86. imio/smartweb/core/webcomponents/src/components/News/ContactMap/ContactMap.jsx +0 -127
  87. imio/smartweb/core/webcomponents/src/components/News/ContactMap/ContactMap.scss +0 -4
  88. imio/smartweb/core/webcomponents/src/components/News/Skeleton/Skeleton.jsx +0 -20
  89. imio/smartweb/core/webcomponents/src/components/Search/Skeleton/Skeleton.jsx +0 -20
  90. /imio/smartweb/core/webcomponents/build/css/{552.smartweb-webcomponents-compiled.css → 363.smartweb-webcomponents-compiled.css} +0 -0
  91. /imio/smartweb/core/webcomponents/build/js/{552.smartweb-webcomponents-compiled.js.LICENSE.txt → 3.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -0
  92. /imio/smartweb/core/webcomponents/build/js/{612.smartweb-webcomponents-compiled.js.LICENSE.txt → 363.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -0
  93. /imio/smartweb/core/webcomponents/src/{components/Annuaire/ContactMap/ContactMap.scss → utils/Map.scss} +0 -0
  94. /imio.smartweb.core-1.2.11-py3.10-nspkg.pth → /imio.smartweb.core-1.2.19-py3.10-nspkg.pth +0 -0
  95. {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/LICENSE.GPL +0 -0
  96. {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/LICENSE.rst +0 -0
  97. {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/WHEEL +0 -0
  98. {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/namespace_packages.txt +0 -0
  99. {imio.smartweb.core-1.2.11.dist-info → imio.smartweb.core-1.2.19.dist-info}/top_level.txt +0 -0
@@ -24,7 +24,7 @@
24
24
  "@babel/plugin-transform-react-jsx": "^7.14.5",
25
25
  "@babel/preset-env": "^7.14.7",
26
26
  "@fullhuman/postcss-purgecss": "^4.0.3",
27
- "@svgr/webpack": "^5.5.0",
27
+ "@svgr/webpack": "^8.1.0",
28
28
  "autoprefixer": "^10.3.3",
29
29
  "babel-loader": "^8.2.2",
30
30
  "clean-webpack-plugin": "^4.0.0",
@@ -36,25 +36,23 @@
36
36
  "eslint-plugin-react": "^7.26.1",
37
37
  "file-loader": "^6.2.0",
38
38
  "json-minimizer-webpack-plugin": "^3.0.0",
39
- "less": "^4.1.1",
40
- "less-loader": "^10.0.1",
41
39
  "mini-css-extract-plugin": "^2.1.0",
42
- "postcss": "^8.3.6",
43
- "postcss-loader": "^6.1.1",
40
+ "postcss": "^8.4.31",
41
+ "postcss-loader": "^7.3.3",
44
42
  "prettier": "2.3.2",
45
- "purgecss": "^4.0.3",
46
- "sass": "^1.36.0",
47
- "sass-loader": "^12.1.0",
48
- "style-loader": "^3.0.0",
49
- "webpack": "^5.53.0",
50
- "webpack-cli": "^4.8.0",
51
- "webpack-dev-server": "^4.2.1",
52
- "xml2js": "^0.4.23"
43
+ "purgecss": "^5.0.0",
44
+ "sass": "^1.69.4",
45
+ "sass-loader": "^13.3.2",
46
+ "style-loader": "^3.3.3",
47
+ "webpack": "^5.89.0",
48
+ "webpack-cli": "^5.1.4",
49
+ "webpack-dev-server": "^4.15.1",
50
+ "xml2js": "^0.6.2"
53
51
  },
54
52
  "dependencies": {
55
53
  "@babel/polyfill": "^7.12.1",
56
54
  "@loadable/component": "^5.15.0",
57
- "axios": "^0.26.0",
55
+ "axios": "^1.5.1",
58
56
  "babel-polyfill": "^6.26.0",
59
57
  "flexbin": "^0.2.0",
60
58
  "leaflet": "^1.7.1",
@@ -68,13 +66,12 @@
68
66
  "react-leaflet": "^3.2.5",
69
67
  "react-markdown": "^8.0.3",
70
68
  "react-moment": "^1.1.1",
71
- "react-multilevel-select": "^1.0.3",
72
69
  "react-router-dom": "^5.3.0",
73
- "react-select": "^4.3.1",
70
+ "react-select": "^5.7.7",
74
71
  "react-translated": "^2.5.0",
75
72
  "react-web-component": "^2.0.2",
76
73
  "react-web-component-style-loader": "^0.1.4-alpha",
77
74
  "remove-accents": "^0.4.2",
78
75
  "spotlight.js": "^0.7.8"
79
76
  }
80
- }
77
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17.5 17.94"><path d="M14.88 17.94H2.62C1.17 17.94 0 16.76 0 15.32v-4.38h1.75v4.38c0 .48.39.88.88.88h12.25c.48 0 .88-.39.88-.88v-4.38h1.75v4.38c0 1.45-1.18 2.62-2.62 2.62Zm-6.12-5.76L3.14 6.56l1.24-1.24 3.5 3.5V0h1.75v8.83l3.5-3.5 1.24 1.24-5.61 5.61Z" style="fill:#8899a4;stroke-width:0"/></svg>
@@ -1,9 +1,9 @@
1
1
  import React, { useEffect, useState, useRef } from "react";
2
- import { HashRouter as Router, Switch, Route } from "react-router-dom";
2
+ import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
3
3
  import Filters from "./Filters/Filter";
4
4
  import ContactContent from "./ContactContent/ContactContent";
5
5
  import ContactList from "./ContactList/ContactList";
6
- import ContactMap from "./ContactMap/ContactMap";
6
+ import Map from "../../utils/Map";
7
7
  import useAxios from "../../hooks/useAxios";
8
8
  import "./Annuaire.scss";
9
9
  import useFilterQuery from "../../hooks/useFilterQuery";
@@ -12,7 +12,7 @@ import translation from '../../utils/translation';
12
12
 
13
13
  export default function Annuaire(props) {
14
14
  return (
15
- <Router>
15
+ <Router basename={props.viewPath}>
16
16
  <Provider language={props.currentLanguage} translation={translation}>
17
17
  <AnnuaireView
18
18
  queryFilterUrl={props.queryFilterUrl}
@@ -38,7 +38,7 @@ function AnnuaireView(props) {
38
38
  const [filters, setFilters] = useState(parsed);
39
39
  const [batchStart, setBatchStart] = useState(0);
40
40
  const [loadMoreLaunch, setLoadMoreLaunch] = useState(false);
41
- const displayMap = props.displayMap === "True" ? true : false;
41
+ const displayMap = props.displayMap === "True" ? true : false;
42
42
  const { response, error, isLoading, isMore } = useAxios(
43
43
  {
44
44
  method: "get",
@@ -78,7 +78,7 @@ function AnnuaireView(props) {
78
78
  // set state filters when active filter selection
79
79
  const filtersChange = (value) => {
80
80
  setLoadMoreLaunch(false);
81
- setBatchStart((batchStart) => 0);
81
+ setBatchStart(() => 0);
82
82
  setFilters(value);
83
83
  window.scrollTo(0, 0);
84
84
  };
@@ -104,7 +104,7 @@ function AnnuaireView(props) {
104
104
  let portalHeaderHeight = portalHeader.offsetHeight;
105
105
 
106
106
  const filterRef = useRef();
107
- const [style, setStyle] = React.useState({ height:0 });
107
+ const [style, setStyle] = React.useState({ height: 0 });
108
108
  useEffect(() => {
109
109
  setStyle({
110
110
  height: filterRef.current.clientHeight,
@@ -119,11 +119,12 @@ function AnnuaireView(props) {
119
119
  <ContactList onChange={clickID} contactArray={contactArray} onHover={hoverID} />
120
120
  );
121
121
  MapRender = (
122
- <ContactMap
122
+ <Map
123
123
  headerHeight={style.height + portalHeaderHeight}
124
124
  clickId={clickId}
125
125
  hoverId={hoverId}
126
126
  items={contactArray}
127
+ queryUrl={props.queryUrl}
127
128
  />
128
129
  );
129
130
  } else if (!isLoading) {
@@ -132,92 +133,92 @@ function AnnuaireView(props) {
132
133
 
133
134
  const divLoader = <div className="lds-roller-container"><div className="lds-roller"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div></div>;
134
135
  return (
135
- <Router>
136
- <div className={`ref ${displayMap ? "view-map" : "no-map"}`}>
136
+ <div className={`ref ${displayMap ? "view-map" : "no-map"}`}>
137
+ <div
138
+ className="r-result-filter-container"
139
+ ref={filterRef}
140
+ style={{ top: portalHeaderHeight }}
141
+ >
137
142
  <div
138
- className="r-result-filter-container"
139
- ref={filterRef}
140
- style={{ top: portalHeaderHeight }}
143
+ id="r-result-filter"
144
+ className="r-result-filter container annuaire-result-filter"
141
145
  >
142
- <div
143
- id="r-result-filter"
144
- className="r-result-filter container annuaire-result-filter"
145
- >
146
- <Filters
147
- url={props.queryFilterUrl}
148
- activeFilter={filters}
149
- onChange={filtersChange}
150
- />
151
- {props.proposeUrl &&
152
- (
153
- <div className="r-add-contact">
154
- <a target="_blank" href={props.proposeUrl}><Translate text='Proposer un contact' /></a>
155
- </div>
156
- )
157
- }
158
- {contactNumber > 0 ? (
159
- <p className="r-results-numbers">
160
- <span>{contactNumber}</span>
161
- {contactNumber > 1
146
+ <Filters
147
+ url={props.queryFilterUrl}
148
+ activeFilter={filters}
149
+ onChange={filtersChange}
150
+ />
151
+ {props.proposeUrl &&
152
+ (
153
+ <div className="r-add-contact">
154
+ <a target="_blank" rel="noreferrer" href={props.proposeUrl}><Translate text='Proposer un contact' /></a>
155
+ </div>
156
+ )
157
+ }
158
+ {contactNumber > 0 ? (
159
+ <p className="r-results-numbers">
160
+ <span>{contactNumber}</span>
161
+ {contactNumber > 1
162
162
  ? <Translate text='contacts trouvés' />
163
163
  : <Translate text='contact trouvé' />}
164
- </p>
165
- ) : (
166
- <p className="r-results-numbers"><Translate text='Aucun résultat' /></p>
167
- )}
168
- </div>
164
+ </p>
165
+ ) : (
166
+ <p className="r-results-numbers"><Translate text='Aucun résultat' /></p>
167
+ )}
169
168
  </div>
170
- <Switch>
171
- <Route path={"/:name"}>
172
- <div className="r-wrapper container r-annuaire-wrapper">
173
- <div className="r-result r-annuaire-result">
174
- <ContactContent queryUrl={props.queryUrl} onChange={clickID} />
175
- </div>
176
- {displayMap && <div
177
- className="r-map annuaire-map"
178
- style={{
179
- top: style.height + portalHeaderHeight,
180
- height: "calc(100vh-" + style.height + portalHeaderHeight,
181
- }}
182
- >
183
- {MapRender}
184
- </div>}
185
- </div>
186
- </Route>
187
- <Route exact path="*">
188
- <div className="r-wrapper container r-annuaire-wrapper">
189
- <div className="r-result r-annuaire-result">
190
- <div>{listRender}</div>
191
- <div className="r-load-more">
192
- {contactNumber - props.batchSize > batchStart ? (
193
- <div>
194
- <span className="no-more-result">
195
- {isLoading ? divLoader : ""}
196
- </span>
197
- <button onClick={loadMore} className="btn-grad">
198
- {isLoading ? <Translate text='Chargement...' /> : <Translate text='Plus de résultats' />}
199
- </button>
200
- </div>
201
- ) : (
169
+ </div>
170
+ <Switch>
171
+ <Route exact path="/">
172
+ <div className="r-wrapper container r-annuaire-wrapper">
173
+ <div className="r-result r-annuaire-result">
174
+ <div>{listRender}</div>
175
+ <div className="r-load-more">
176
+ {contactNumber - props.batchSize > batchStart ? (
177
+ <div>
202
178
  <span className="no-more-result">
203
179
  {isLoading ? divLoader : ""}
204
180
  </span>
205
- )}
206
- </div>
181
+ <button onClick={loadMore} className="btn-grad">
182
+ {isLoading ? <Translate text='Chargement...' /> : <Translate text='Plus de résultats' />}
183
+ </button>
184
+ </div>
185
+ ) : (
186
+ <span className="no-more-result">
187
+ {isLoading ? divLoader : ""}
188
+ </span>
189
+ )}
207
190
  </div>
208
- {displayMap && <div
209
- className="r-map annuaire-map"
210
- style={{
211
- top: style.height + portalHeaderHeight,
212
- height: "calc(100vh-" + style.height + portalHeaderHeight,
213
- }}
214
- >
215
- {MapRender}
216
- </div>}
217
191
  </div>
218
- </Route>
219
- </Switch>
220
- </div>
221
- </Router>
192
+ {displayMap && <div
193
+ className="r-map annuaire-map"
194
+ style={{
195
+ top: style.height + portalHeaderHeight,
196
+ height: "calc(100vh-" + style.height + portalHeaderHeight,
197
+ }}
198
+ >
199
+ {MapRender}
200
+ </div>
201
+ }
202
+ </div>
203
+ </Route>
204
+ <Route path={"/:name"}>
205
+ <div className="r-wrapper container r-annuaire-wrapper">
206
+ <div className="r-result r-annuaire-result">
207
+ <ContactContent queryUrl={props.queryUrl} onChange={clickID} />
208
+ </div>
209
+ {displayMap && <div
210
+ className="r-map annuaire-map"
211
+ style={{
212
+ top: style.height + portalHeaderHeight,
213
+ height: "calc(100vh-" + style.height + portalHeaderHeight,
214
+ }}
215
+ >
216
+ {MapRender}
217
+ </div>
218
+ }
219
+ </div>
220
+ </Route>
221
+ </Switch>
222
+ </div>
222
223
  );
223
224
  }
@@ -1,32 +1,31 @@
1
1
  import React, { useEffect, useState } from "react";
2
2
 
3
- const ContactCard = ({ contactItem }) => {
3
+ const ContactCard = ({ item }) => {
4
4
  const [image, setImage] = useState(new Image());
5
5
  const [imageClassName, setImageClassName] = useState("");
6
- const title = contactItem.title && contactItem.title;
6
+ const title = item.title && item.title;
7
7
  const category =
8
- contactItem.taxonomy_contact_category && contactItem.taxonomy_contact_category[0];
9
- const number = contactItem.number ? contactItem.number : "";
10
- const street = contactItem.street ? contactItem.street : "";
11
- const complement = contactItem.complement ? contactItem.complement : "";
12
- const zipcode = contactItem.zipcode ? contactItem.zipcode : "";
13
- const city = contactItem.city ? contactItem.city : "";
14
- const country = contactItem.country ? contactItem.country : "";
15
- const phones = contactItem.phones ? contactItem.phones : "";
16
- const mails = contactItem.mails ? contactItem.mails : "";
17
- const topics = contactItem.topics ? contactItem.topics : "";
18
- let countryTitle = contactItem.country && contactItem.country.title
8
+ item.taxonomy_contact_category && item.taxonomy_contact_category[0];
9
+ const number = item.number ? item.number : "";
10
+ const street = item.street ? item.street : "";
11
+ const complement = item.complement ? item.complement : "";
12
+ const zipcode = item.zipcode ? item.zipcode : "";
13
+ const city = item.city ? item.city : "";
14
+ const phones = item.phones ? item.phones : "";
15
+ const mails = item.mails ? item.mails : "";
16
+ const topics = item.topics ? item.topics : "";
17
+ let countryTitle = item.country && item.country.title
19
18
  let itineraryLink =
20
19
  "https://www.google.com/maps/dir/?api=1&destination=" +
21
- contactItem.street +
20
+ item.street +
22
21
  "+" +
23
- contactItem.number +
22
+ item.number +
24
23
  "+" +
25
- contactItem.complement +
24
+ item.complement +
26
25
  "+" +
27
- contactItem.zipcode +
26
+ item.zipcode +
28
27
  "+" +
29
- contactItem.city +
28
+ item.city +
30
29
  "+" +
31
30
  countryTitle
32
31
 
@@ -36,7 +35,7 @@ const ContactCard = ({ contactItem }) => {
36
35
  useEffect(() => {
37
36
  const loadImage = async () => {
38
37
  const img = new Image();
39
- const src = contactItem.image_affiche_scale || contactItem.logo_thumb_scale || "";
38
+ const src = item.image_affiche_scale || item.logo_thumb_scale || "";
40
39
 
41
40
  img.src = src;
42
41
 
@@ -51,11 +50,11 @@ const ContactCard = ({ contactItem }) => {
51
50
  }
52
51
  };
53
52
 
54
- if (contactItem.image_affiche_scale || contactItem.logo_thumb_scale) {
53
+ if (item.image_affiche_scale || item.logo_thumb_scale) {
55
54
  loadImage();
56
55
  }
57
- }, [contactItem]);
58
-
56
+ }, [item]);
57
+
59
58
  return (
60
59
  <div className="r-list-item">
61
60
  {image && image.src
@@ -85,7 +84,7 @@ const ContactCard = ({ contactItem }) => {
85
84
  {zipcode ? <span>{zipcode + " "}</span> : ""}
86
85
  {city ? <span>{city}</span> : ""}
87
86
  <div className="itineraty">
88
- <a href={itineraryLink} target="_blank">
87
+ <a href={itineraryLink} target="_blank" rel="noreferrer">
89
88
  Itinéraire
90
89
  </a>
91
90
  </div>