imio.smartweb.core 1.2.47__py3-none-any.whl → 1.2.49__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 (77) hide show
  1. imio/smartweb/core/contents/rest/base.py +8 -6
  2. imio/smartweb/core/contents/rest/directory/endpoint.py +2 -2
  3. imio/smartweb/core/contents/rest/events/endpoint.py +2 -2
  4. imio/smartweb/core/contents/rest/news/endpoint.py +2 -2
  5. imio/smartweb/core/contents/sections/events/view.py +2 -1
  6. imio/smartweb/core/contents/sections/news/view.py +2 -1
  7. imio/smartweb/core/contents/sections/text/views.py +2 -0
  8. imio/smartweb/core/contents/sections/views.py +2 -0
  9. imio/smartweb/core/tests/resources/json_rest_events.json +4 -1
  10. imio/smartweb/core/tests/test_rest.py +20 -17
  11. imio/smartweb/core/tests/test_section_events.py +9 -8
  12. imio/smartweb/core/tests/test_section_news.py +6 -6
  13. imio/smartweb/core/tests/test_vocabularies.py +2 -2
  14. imio/smartweb/core/utils.py +1 -1
  15. imio/smartweb/core/viewlets/footer.pt +5 -0
  16. imio/smartweb/core/viewlets/footer.py +5 -0
  17. imio/smartweb/core/vocabularies.py +2 -2
  18. imio/smartweb/core/webcomponents/build/css/373.smartweb-webcomponents-compiled.css +1 -1
  19. imio/smartweb/core/webcomponents/build/css/486.smartweb-webcomponents-compiled.css +1 -1
  20. imio/smartweb/core/webcomponents/build/css/884.smartweb-webcomponents-compiled.css +1 -0
  21. imio/smartweb/core/webcomponents/build/css/smartweb-webcomponents-compiled.css +1 -1
  22. imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js +1 -1
  23. imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js.LICENSE.txt +5 -0
  24. imio/smartweb/core/webcomponents/build/js/373.smartweb-webcomponents-compiled.js +1 -1
  25. imio/smartweb/core/webcomponents/build/js/486.smartweb-webcomponents-compiled.js +1 -1
  26. imio/smartweb/core/webcomponents/build/js/736.smartweb-webcomponents-compiled.js +1 -1
  27. imio/smartweb/core/webcomponents/build/js/736.smartweb-webcomponents-compiled.js.LICENSE.txt +3 -3
  28. imio/smartweb/core/webcomponents/build/js/884.smartweb-webcomponents-compiled.js +1 -0
  29. imio/smartweb/core/webcomponents/build/js/919.smartweb-webcomponents-compiled.js +1 -1
  30. imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js +1 -1
  31. imio/smartweb/core/webcomponents/package.json +1 -0
  32. imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.jsx +112 -74
  33. imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.scss +14 -22
  34. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactCard/ContactCard.jsx +24 -20
  35. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +6 -4
  36. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactList/ContactList.jsx +7 -2
  37. imio/smartweb/core/webcomponents/src/components/Annuaire/Filters/Filter.jsx +211 -98
  38. imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx +1 -1
  39. imio/smartweb/core/webcomponents/src/components/Events/EventContent/EventContent.jsx +570 -379
  40. imio/smartweb/core/webcomponents/src/components/Events/EventList/EventList.jsx +13 -4
  41. imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +128 -82
  42. imio/smartweb/core/webcomponents/src/components/Events/Events.scss +79 -29
  43. imio/smartweb/core/webcomponents/src/components/Events/Filters/Filter.jsx +257 -90
  44. imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.jsx +63 -56
  45. imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.scss +60 -12
  46. imio/smartweb/core/webcomponents/src/components/Filters/IamData.jsx +42 -0
  47. imio/smartweb/core/webcomponents/src/components/Filters/MainFilter.scss +227 -0
  48. imio/smartweb/core/webcomponents/src/components/Filters/PublicTargetData.jsx +94 -0
  49. imio/smartweb/core/webcomponents/src/components/Filters/SelectStyles.js +58 -0
  50. imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.jsx +149 -0
  51. imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.scss +70 -0
  52. imio/smartweb/core/webcomponents/src/components/News/Filters/Filter.jsx +139 -82
  53. imio/smartweb/core/webcomponents/src/components/News/News.jsx +98 -55
  54. imio/smartweb/core/webcomponents/src/components/News/News.scss +29 -9
  55. imio/smartweb/core/webcomponents/src/components/News/NewsCard/NewsCard.jsx +34 -31
  56. imio/smartweb/core/webcomponents/src/components/News/NewsContent/NewsContent.jsx +264 -244
  57. imio/smartweb/core/webcomponents/src/components/News/NewsList/NewsList.jsx +13 -8
  58. imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx +23 -12
  59. imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx +23 -12
  60. imio/smartweb/core/webcomponents/src/components/Search/Filters/Filter.jsx +5 -5
  61. imio/smartweb/core/webcomponents/src/components/Search/NewsResult/NewsResult.jsx +23 -12
  62. imio/smartweb/core/webcomponents/src/components/Search/Search.jsx +4 -4
  63. imio/smartweb/core/webcomponents/src/components/Search/WebResult/WebResult.jsx +13 -4
  64. imio/smartweb/core/webcomponents/src/index.jsx +3 -3
  65. imio/smartweb/core/webcomponents/src/index.scss +25 -68
  66. imio/smartweb/core/webcomponents/src/utils/Map.jsx +20 -11
  67. imio/smartweb/core/webcomponents/src/utils/translation.js +30 -0
  68. {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.49.dist-info}/METADATA +30 -1
  69. {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.49.dist-info}/RECORD +75 -69
  70. imio/smartweb/core/webcomponents/build/css/686.smartweb-webcomponents-compiled.css +0 -1
  71. imio/smartweb/core/webcomponents/build/js/686.smartweb-webcomponents-compiled.js +0 -1
  72. /imio.smartweb.core-1.2.47-py3.8-nspkg.pth → /imio.smartweb.core-1.2.49-py3.8-nspkg.pth +0 -0
  73. {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.49.dist-info}/LICENSE.GPL +0 -0
  74. {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.49.dist-info}/LICENSE.rst +0 -0
  75. {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.49.dist-info}/WHEEL +0 -0
  76. {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.49.dist-info}/namespace_packages.txt +0 -0
  77. {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.49.dist-info}/top_level.txt +0 -0
@@ -2,7 +2,7 @@ import EventCard from "../EventCard/EventCard";
2
2
  import { Link } from "react-router-dom";
3
3
  import React from "react";
4
4
  import removeAccents from "remove-accents";
5
- const ContactList = ({ itemsArray, onChange, onHover,showCategoriesOrTopics }) => {
5
+ const ContactList = ({ itemsArray, onChange, onHover, showCategoriesOrTopics }) => {
6
6
  function handleClick(event) {
7
7
  onChange(event);
8
8
  }
@@ -25,18 +25,27 @@ const ContactList = ({ itemsArray, onChange, onHover,showCategoriesOrTopics }) =
25
25
  className="r-list-item-link"
26
26
  style={{ textDecoration: "none" }}
27
27
  to={{
28
- pathname: "/" + removeAccents(item.title).replace(/[^a-zA-Z ]/g, "").replace(/\s/g, "-").toLowerCase(),
28
+ pathname:
29
+ "/" +
30
+ removeAccents(item.title)
31
+ .replace(/[^a-zA-Z ]/g, "")
32
+ .replace(/\s/g, "-")
33
+ .toLowerCase(),
29
34
  search: `?u=${item.UID}`,
30
35
  state: {
31
36
  idItem: item.UID,
32
37
  },
33
38
  }}
34
39
  ></Link>
35
- <EventCard item={item} showCategoriesOrTopics={showCategoriesOrTopics} key={item.created} />
40
+ <EventCard
41
+ item={item}
42
+ showCategoriesOrTopics={showCategoriesOrTopics}
43
+ key={item.created}
44
+ />
36
45
  </li>
37
46
  ))}
38
47
  </ul>
39
48
  </React.Fragment>
40
49
  );
41
50
  };
42
- export default ContactList;
51
+ export default ContactList;
@@ -1,21 +1,17 @@
1
1
  import React, { useEffect, useState, useRef } from "react";
2
- import {
3
- BrowserRouter,
4
- Routes,
5
- Route,
6
- } from "react-router-dom";
2
+ import { BrowserRouter, Routes, Route } from "react-router-dom";
7
3
  import Filters from "./Filters/Filter";
8
4
  import EventContent from "./EventContent/EventContent";
9
5
  import EventList from "./EventList/EventList";
10
6
  import Map from "../../utils/Map";
11
7
  import useAxios from "../../hooks/useAxios";
12
8
  import "./Events.scss";
9
+ import "../Filters/MainFilter.scss";
13
10
  import useFilterQuery from "../../hooks/useFilterQuery";
14
11
  import { Provider, Translate } from "react-translated";
15
- import translation from '../../utils/translation';
12
+ import translation from "../../utils/translation";
16
13
  import moment from "moment";
17
- import queryString from 'query-string';
18
-
14
+ import queryString from "query-string";
19
15
 
20
16
  export default function Events(props) {
21
17
  return (
@@ -37,7 +33,12 @@ export default function Events(props) {
37
33
  }
38
34
  function EventsView(props) {
39
35
  const { u, ...parsed } = Object.assign(
40
- { b_start: 0, fullobjects: 1, "event_dates.query": [moment().format('YYYY-MM-DD')], "event_dates.range": props.onlyPastEvents === "True" ? "max" : "min"},
36
+ {
37
+ b_start: 0,
38
+ fullobjects: 1,
39
+ "event_dates.query": [moment().format("YYYY-MM-DD")],
40
+ "event_dates.range": props.onlyPastEvents === "True" ? "max" : "min",
41
+ },
41
42
  queryString.parse(useFilterQuery().toString())
42
43
  );
43
44
  const [itemsArray, setItemsArray] = useState([]);
@@ -110,15 +111,14 @@ function EventsView(props) {
110
111
  }, [batchStart]);
111
112
 
112
113
  // filter top style
113
- let portalHeader = document.getElementById("portal-header");
114
- let portalHeaderHeight = portalHeader.offsetHeight;
115
-
116
114
  const filterRef = useRef();
117
115
  const [style, setStyle] = React.useState({ height: 0 });
116
+ const [headerHeight, setHeaderHeight] = useState(0);
118
117
  useEffect(() => {
119
118
  setStyle({
120
119
  height: filterRef.current.clientHeight,
121
120
  });
121
+ setHeaderHeight(filterRef.current.offsetTop);
122
122
  }, [filterRef.current]);
123
123
 
124
124
  // coditional list render
@@ -126,11 +126,16 @@ function EventsView(props) {
126
126
  let MapRender;
127
127
  if (itemsArray && itemsArray.length > 0) {
128
128
  listRender = (
129
- <EventList onChange={clickID} itemsArray={itemsArray} onHover={hoverID} showCategoriesOrTopics={props.showCategoriesOrTopics} />
129
+ <EventList
130
+ onChange={clickID}
131
+ itemsArray={itemsArray}
132
+ onHover={hoverID}
133
+ showCategoriesOrTopics={props.showCategoriesOrTopics}
134
+ />
130
135
  );
131
136
  MapRender = (
132
137
  <Map
133
- headerHeight={style.height + portalHeaderHeight}
138
+ headerHeight={style.height + headerHeight}
134
139
  clickId={clickId}
135
140
  hoverId={hoverId}
136
141
  items={itemsArray}
@@ -138,16 +143,32 @@ function EventsView(props) {
138
143
  />
139
144
  );
140
145
  } else if (!isLoading) {
141
- listRender = <p><Translate text="Aucun événement n'a été trouvé" /></p>;
146
+ listRender = (
147
+ <p>
148
+ <Translate text="Aucun événement n'a été trouvé" />
149
+ </p>
150
+ );
142
151
  }
143
-
144
- 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>;
152
+ const divLoader = (
153
+ <div className="lds-roller-container">
154
+ <div className="lds-roller">
155
+ <div></div>
156
+ <div></div>
157
+ <div></div>
158
+ <div></div>
159
+ <div></div>
160
+ <div></div>
161
+ <div></div>
162
+ <div></div>
163
+ </div>
164
+ </div>
165
+ );
145
166
  return (
146
167
  <div className={`ref ${displayMap ? "view-map" : "no-map"}`}>
147
168
  <div
148
169
  className="r-result-filter-container"
149
170
  ref={filterRef}
150
- style={{ top: portalHeaderHeight }}
171
+ style={{ top: headerHeight }}
151
172
  >
152
173
  <div
153
174
  id="r-result-filter"
@@ -160,80 +181,105 @@ function EventsView(props) {
160
181
  language={props.language}
161
182
  onlyPastEvents={props.onlyPastEvents}
162
183
  />
163
- {props.proposeUrl &&
164
- (
165
- <div className="r-add-event">
166
- <a target="_blank" href={props.proposeUrl}><Translate text='Proposer un événement' /></a>
167
- </div>
168
- )
169
- }
170
- {itemsNumber > 0 ? (
171
- <p className="r-results-numbers">
172
- <span>{itemsNumber}</span>
173
- {itemsNumber > 1
174
- ? <Translate text='événements trouvés' />
175
- : <Translate text='événement trouvé' />}
176
- </p>
177
- ) : (
178
- <p className="r-results-numbers"><Translate text='Aucun résultat' /></p>
184
+ {props.proposeUrl && (
185
+ <div className="r-add-event">
186
+ <a target="_blank" href={props.proposeUrl}>
187
+ <Translate text="Proposer un événement" />
188
+ <svg
189
+ xmlns="http://www.w3.org/2000/svg"
190
+ width="16"
191
+ height="16"
192
+ fill="currentColor"
193
+ className="bi bi-plus-circle"
194
+ viewBox="0 0 16 16"
195
+ >
196
+ <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16" />
197
+ <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4" />
198
+ </svg>
199
+ </a>
200
+ </div>
179
201
  )}
180
202
  </div>
181
203
  </div>
182
204
  <Routes>
183
- <Route exact path="/" element={
184
- <div className="r-wrapper container r-annuaire-wrapper">
185
- <div className="r-result r-annuaire-result">
186
- <div>{listRender}</div>
187
- <div className="r-load-more">
188
- {itemsNumber - props.batchSize > batchStart ? (
189
- <div>
205
+ <Route
206
+ exact
207
+ path="/"
208
+ element={
209
+ <div className="r-wrapper container r-annuaire-wrapper">
210
+ <div className="r-result r-annuaire-result">
211
+ {itemsNumber > 0 ? (
212
+ <p className="r-results-numbers">
213
+ <span>{itemsNumber}</span>
214
+ {itemsNumber > 1 ? (
215
+ <Translate text="événements trouvés" />
216
+ ) : (
217
+ <Translate text="événement trouvé" />
218
+ )}
219
+ </p>
220
+ ) : (
221
+ <p className="r-results-numbers">
222
+ <Translate text="Aucun résultat" />
223
+ </p>
224
+ )}
225
+ <div>{listRender}</div>
226
+ <div className="r-load-more">
227
+ {itemsNumber - props.batchSize > batchStart ? (
228
+ <div>
229
+ <span className="no-more-result">
230
+ {isLoading ? divLoader : ""}
231
+ </span>
232
+ <button onClick={loadMore} className="btn-grad">
233
+ {isLoading ? (
234
+ <Translate text="Chargement..." />
235
+ ) : (
236
+ <Translate text="Plus de résultats" />
237
+ )}
238
+ </button>
239
+ </div>
240
+ ) : (
190
241
  <span className="no-more-result">
191
242
  {isLoading ? divLoader : ""}
192
243
  </span>
193
- <button onClick={loadMore} className="btn-grad">
194
- {isLoading ? <Translate text='Chargement...' /> : <Translate text='Plus de résultats' />}
195
- </button>
196
- </div>
197
- ) : (
198
- <span className="no-more-result">
199
- {isLoading ? divLoader : ""}
200
- </span>
201
- )}
244
+ )}
245
+ </div>
202
246
  </div>
247
+ {displayMap && (
248
+ <div
249
+ className="r-map annuaire-map"
250
+ style={{
251
+ top: style.height + headerHeight,
252
+ height: "calc(100vh-" + style.height + headerHeight,
253
+ }}
254
+ >
255
+ {MapRender}
256
+ </div>
257
+ )}
203
258
  </div>
204
- {displayMap && <div
205
- className="r-map annuaire-map"
206
- style={{
207
- top: style.height + portalHeaderHeight,
208
- height: "calc(100vh-" + style.height + portalHeaderHeight,
209
- }}
210
- >
211
- {MapRender}
212
- </div>
213
- }
214
- </div>
215
- }>
216
-
217
- </Route>
218
- <Route path={"/:name"} element={
219
- <div className="r-wrapper container r-annuaire-wrapper">
220
- <div className="r-result r-annuaire-result">
221
- <EventContent queryUrl={props.queryUrl} onChange={clickID} />
222
- </div>
223
- {displayMap && <div
224
- className="r-map annuaire-map"
225
- style={{
226
- top: style.height + portalHeaderHeight,
227
- height: "calc(100vh-" + style.height + portalHeaderHeight,
228
- }}
229
- >
230
- {MapRender}
259
+ }
260
+ ></Route>
261
+ <Route
262
+ path={"/:name"}
263
+ element={
264
+ <div className="r-wrapper container r-annuaire-wrapper">
265
+ <div className="r-result r-annuaire-result">
266
+ <EventContent queryUrl={props.queryUrl} onChange={clickID} onlyPastEvents={props.onlyPastEvents} />
267
+ </div>
268
+ {displayMap && (
269
+ <div
270
+ className="r-map annuaire-map"
271
+ style={{
272
+ top: style.height + headerHeight,
273
+ height: "calc(100vh-" + style.height + headerHeight,
274
+ }}
275
+ >
276
+ {MapRender}
277
+ </div>
278
+ )}
231
279
  </div>
232
- }
233
- </div>
234
- }>
235
- </Route>
280
+ }
281
+ ></Route>
236
282
  </Routes>
237
283
  </div>
238
284
  );
239
- }
285
+ }
@@ -36,18 +36,6 @@ body .outer-wrapper {
36
36
  padding: 0 !important;
37
37
  }
38
38
 
39
- .r-result-filter-container {
40
- @media screen and (min-width:1200px) {
41
- position: sticky;
42
- }
43
-
44
- background: #fff;
45
- z-index: 1;
46
- }
47
-
48
- .annuaire-result-filter {
49
- padding: 0 .75rem;
50
- }
51
39
 
52
40
  #portal-column-content {
53
41
  h1 {
@@ -83,14 +71,7 @@ article>header {
83
71
 
84
72
 
85
73
  /////////
86
- .r-results-numbers {
87
- width: 100%;
88
- margin-bottom: 0.5rem;
89
74
 
90
- span {
91
- font-weight: bold;
92
- }
93
- }
94
75
 
95
76
  .r-wrapper {
96
77
  display: block;
@@ -112,15 +93,6 @@ article>header {
112
93
  margin-top: 2rem;
113
94
  padding-bottom: 2rem;
114
95
 
115
- &-filter {
116
- display: flex;
117
- gap: 20px;
118
-
119
- .r-filter {
120
- width: 100%;
121
- }
122
- }
123
-
124
96
  &-list {
125
97
  padding: 0;
126
98
 
@@ -147,6 +119,10 @@ article>header {
147
119
  width: 100%;
148
120
  padding-bottom: 56%;
149
121
 
122
+ &.r-item-img-placeholder {
123
+ background: #f2f2f2;
124
+ }
125
+
150
126
  @media screen and (min-width:600px) {
151
127
  width: 246px;
152
128
  height: 149px;
@@ -327,6 +303,54 @@ article>header {
327
303
  vertical-align: top;
328
304
  }
329
305
 
306
+ .r-recurence-past {
307
+ opacity: 0.5;
308
+ }
309
+
310
+ .recurence-schedul {
311
+ position: relative;
312
+ }
313
+
314
+ .recurence-schedul-more {
315
+ display: block;
316
+ }
317
+
318
+ .recurence-modal-display {
319
+ background-color: #fff;
320
+ position: absolute;
321
+ top: 0;
322
+ left: 0;
323
+ right: 0;
324
+ width: max-content;
325
+ padding: 10px 15px !important;
326
+ box-shadow:
327
+ 0.7px 0px 5.3px rgba(0, 0, 0, 0.024),
328
+ 2.5px 0px 17.9px rgba(0, 0, 0, 0.036),
329
+ 11px 0px 80px rgba(0, 0, 0, 0.06);
330
+ border-radius: 10px;
331
+ border: solid 1px #dadada;
332
+
333
+ span {
334
+ font-size: 14px;
335
+ color: #000;
336
+ border-bottom: solid 1px #969696;
337
+ margin-bottom: 0.4rem;
338
+ display: block;
339
+ }
340
+
341
+ ul {
342
+ margin: 0;
343
+ }
344
+
345
+ li {
346
+ list-style: none;
347
+ }
348
+ }
349
+
350
+ .recurence-modal-hide {
351
+ display: none;
352
+ }
353
+
330
354
  //// for bla ////
331
355
  // content
332
356
 
@@ -334,8 +358,16 @@ article>header {
334
358
  padding-bottom: 60%;
335
359
  }
336
360
 
361
+ .r-content-header {
362
+ margin-bottom: 1rem;
363
+ }
364
+
337
365
  .r-content-title {
338
- margin: 1rem 0;
366
+ margin: 0;
367
+ }
368
+
369
+ .r-content-recur-start-hours {
370
+ display: flex;
339
371
  }
340
372
 
341
373
  .news-info-title {
@@ -447,6 +479,24 @@ article>header {
447
479
  }
448
480
  }
449
481
 
482
+ .r-content-topics {
483
+ display: flex;
484
+ gap: 15px;
485
+
486
+ span {
487
+ padding: 5px;
488
+ background: #f1f1f1;
489
+ border-radius: 5px;
490
+ margin-right: 5px;
491
+ }
492
+ }
493
+
494
+ .r-content-title-cat {
495
+ color: #8e8e8e;
496
+ margin-right: 5px;
497
+ font-size: 14px;
498
+ }
499
+
450
500
  // // No Map
451
501
  // // Main
452
502
  .no-map {