imio.smartweb.core 1.2.47__py3-none-any.whl → 1.2.48__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.
- imio/smartweb/core/contents/sections/events/view.py +2 -1
- imio/smartweb/core/contents/sections/news/view.py +2 -1
- imio/smartweb/core/contents/sections/text/views.py +2 -0
- imio/smartweb/core/contents/sections/views.py +2 -0
- imio/smartweb/core/tests/resources/json_rest_events.json +4 -1
- imio/smartweb/core/tests/test_rest.py +4 -1
- imio/smartweb/core/tests/test_section_events.py +9 -8
- imio/smartweb/core/tests/test_section_news.py +6 -6
- imio/smartweb/core/tests/test_vocabularies.py +2 -2
- imio/smartweb/core/utils.py +1 -1
- imio/smartweb/core/viewlets/footer.pt +5 -0
- imio/smartweb/core/viewlets/footer.py +5 -0
- imio/smartweb/core/vocabularies.py +2 -2
- imio/smartweb/core/webcomponents/build/css/373.smartweb-webcomponents-compiled.css +1 -1
- imio/smartweb/core/webcomponents/build/css/486.smartweb-webcomponents-compiled.css +1 -1
- imio/smartweb/core/webcomponents/build/css/884.smartweb-webcomponents-compiled.css +1 -0
- imio/smartweb/core/webcomponents/build/css/smartweb-webcomponents-compiled.css +1 -1
- imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js.LICENSE.txt +5 -0
- imio/smartweb/core/webcomponents/build/js/373.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/486.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/736.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/736.smartweb-webcomponents-compiled.js.LICENSE.txt +3 -3
- imio/smartweb/core/webcomponents/build/js/884.smartweb-webcomponents-compiled.js +1 -0
- imio/smartweb/core/webcomponents/build/js/919.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.jsx +101 -74
- imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.scss +4 -22
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactCard/ContactCard.jsx +22 -18
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +4 -2
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactList/ContactList.jsx +7 -2
- imio/smartweb/core/webcomponents/src/components/Annuaire/Filters/Filter.jsx +211 -98
- imio/smartweb/core/webcomponents/src/components/Events/EventContent/EventContent.jsx +506 -378
- imio/smartweb/core/webcomponents/src/components/Events/EventList/EventList.jsx +13 -4
- imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +117 -82
- imio/smartweb/core/webcomponents/src/components/Events/Events.scss +52 -28
- imio/smartweb/core/webcomponents/src/components/Events/Filters/Filter.jsx +257 -90
- imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.jsx +62 -54
- imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.scss +60 -12
- imio/smartweb/core/webcomponents/src/components/Filters/IamData.jsx +42 -0
- imio/smartweb/core/webcomponents/src/components/Filters/MainFilter.scss +217 -0
- imio/smartweb/core/webcomponents/src/components/Filters/PublicTargetData.jsx +94 -0
- imio/smartweb/core/webcomponents/src/components/Filters/SelectStyles.js +58 -0
- imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.jsx +149 -0
- imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.scss +70 -0
- imio/smartweb/core/webcomponents/src/components/News/Filters/Filter.jsx +127 -82
- imio/smartweb/core/webcomponents/src/components/News/News.jsx +86 -53
- imio/smartweb/core/webcomponents/src/components/News/News.scss +29 -9
- imio/smartweb/core/webcomponents/src/components/News/NewsCard/NewsCard.jsx +34 -31
- imio/smartweb/core/webcomponents/src/components/News/NewsContent/NewsContent.jsx +264 -244
- imio/smartweb/core/webcomponents/src/components/News/NewsList/NewsList.jsx +13 -8
- imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx +23 -12
- imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx +23 -12
- imio/smartweb/core/webcomponents/src/components/Search/Filters/Filter.jsx +5 -5
- imio/smartweb/core/webcomponents/src/components/Search/NewsResult/NewsResult.jsx +23 -12
- imio/smartweb/core/webcomponents/src/components/Search/Search.jsx +4 -4
- imio/smartweb/core/webcomponents/src/components/Search/WebResult/WebResult.jsx +13 -4
- imio/smartweb/core/webcomponents/src/index.jsx +3 -3
- imio/smartweb/core/webcomponents/src/index.scss +11 -65
- imio/smartweb/core/webcomponents/src/utils/Map.jsx +18 -9
- imio/smartweb/core/webcomponents/src/utils/translation.js +18 -0
- imio.smartweb.core-1.2.48-py3.10-nspkg.pth +3 -0
- {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.48.dist-info}/METADATA +22 -3
- {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.48.dist-info}/RECORD +69 -63
- {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.48.dist-info}/WHEEL +1 -1
- imio/smartweb/core/webcomponents/build/css/686.smartweb-webcomponents-compiled.css +0 -1
- imio/smartweb/core/webcomponents/build/js/686.smartweb-webcomponents-compiled.js +0 -1
- imio.smartweb.core-1.2.47-py3.8-nspkg.pth +0 -2
- {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.48.dist-info}/LICENSE.GPL +0 -0
- {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.48.dist-info}/LICENSE.rst +0 -0
- {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.48.dist-info}/namespace_packages.txt +0 -0
- {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.48.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:
|
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
|
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
|
12
|
+
import translation from "../../utils/translation";
|
16
13
|
import moment from "moment";
|
17
|
-
import queryString from
|
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
|
-
{
|
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
|
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 +
|
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 =
|
146
|
+
listRender = (
|
147
|
+
<p>
|
148
|
+
<Translate text="Aucun événement n'a été trouvé" />
|
149
|
+
</p>
|
150
|
+
);
|
142
151
|
}
|
143
|
-
|
144
|
-
|
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:
|
171
|
+
style={{ top: headerHeight }}
|
151
172
|
>
|
152
173
|
<div
|
153
174
|
id="r-result-filter"
|
@@ -160,80 +181,94 @@ function EventsView(props) {
|
|
160
181
|
language={props.language}
|
161
182
|
onlyPastEvents={props.onlyPastEvents}
|
162
183
|
/>
|
163
|
-
{props.proposeUrl &&
|
164
|
-
|
165
|
-
<
|
166
|
-
<
|
167
|
-
</
|
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
|
+
</a>
|
189
|
+
</div>
|
179
190
|
)}
|
180
191
|
</div>
|
181
192
|
</div>
|
182
193
|
<Routes>
|
183
|
-
<Route
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
194
|
+
<Route
|
195
|
+
exact
|
196
|
+
path="/"
|
197
|
+
element={
|
198
|
+
<div className="r-wrapper container r-annuaire-wrapper">
|
199
|
+
<div className="r-result r-annuaire-result">
|
200
|
+
{itemsNumber > 0 ? (
|
201
|
+
<p className="r-results-numbers">
|
202
|
+
<span>{itemsNumber}</span>
|
203
|
+
{itemsNumber > 1 ? (
|
204
|
+
<Translate text="événements trouvés" />
|
205
|
+
) : (
|
206
|
+
<Translate text="événement trouvé" />
|
207
|
+
)}
|
208
|
+
</p>
|
209
|
+
) : (
|
210
|
+
<p className="r-results-numbers">
|
211
|
+
<Translate text="Aucun résultat" />
|
212
|
+
</p>
|
213
|
+
)}
|
214
|
+
<div>{listRender}</div>
|
215
|
+
<div className="r-load-more">
|
216
|
+
{itemsNumber - props.batchSize > batchStart ? (
|
217
|
+
<div>
|
218
|
+
<span className="no-more-result">
|
219
|
+
{isLoading ? divLoader : ""}
|
220
|
+
</span>
|
221
|
+
<button onClick={loadMore} className="btn-grad">
|
222
|
+
{isLoading ? (
|
223
|
+
<Translate text="Chargement..." />
|
224
|
+
) : (
|
225
|
+
<Translate text="Plus de résultats" />
|
226
|
+
)}
|
227
|
+
</button>
|
228
|
+
</div>
|
229
|
+
) : (
|
190
230
|
<span className="no-more-result">
|
191
231
|
{isLoading ? divLoader : ""}
|
192
232
|
</span>
|
193
|
-
|
194
|
-
|
195
|
-
</button>
|
196
|
-
</div>
|
197
|
-
) : (
|
198
|
-
<span className="no-more-result">
|
199
|
-
{isLoading ? divLoader : ""}
|
200
|
-
</span>
|
201
|
-
)}
|
233
|
+
)}
|
234
|
+
</div>
|
202
235
|
</div>
|
236
|
+
{displayMap && (
|
237
|
+
<div
|
238
|
+
className="r-map annuaire-map"
|
239
|
+
style={{
|
240
|
+
top: style.height + headerHeight,
|
241
|
+
height: "calc(100vh-" + style.height + headerHeight,
|
242
|
+
}}
|
243
|
+
>
|
244
|
+
{MapRender}
|
245
|
+
</div>
|
246
|
+
)}
|
203
247
|
</div>
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
className="r-map annuaire-map"
|
225
|
-
style={{
|
226
|
-
top: style.height + portalHeaderHeight,
|
227
|
-
height: "calc(100vh-" + style.height + portalHeaderHeight,
|
228
|
-
}}
|
229
|
-
>
|
230
|
-
{MapRender}
|
248
|
+
}
|
249
|
+
></Route>
|
250
|
+
<Route
|
251
|
+
path={"/:name"}
|
252
|
+
element={
|
253
|
+
<div className="r-wrapper container r-annuaire-wrapper">
|
254
|
+
<div className="r-result r-annuaire-result">
|
255
|
+
<EventContent queryUrl={props.queryUrl} onChange={clickID} />
|
256
|
+
</div>
|
257
|
+
{displayMap && (
|
258
|
+
<div
|
259
|
+
className="r-map annuaire-map"
|
260
|
+
style={{
|
261
|
+
top: style.height + headerHeight,
|
262
|
+
height: "calc(100vh-" + style.height + headerHeight,
|
263
|
+
}}
|
264
|
+
>
|
265
|
+
{MapRender}
|
266
|
+
</div>
|
267
|
+
)}
|
231
268
|
</div>
|
232
|
-
|
233
|
-
|
234
|
-
}>
|
235
|
-
</Route>
|
269
|
+
}
|
270
|
+
></Route>
|
236
271
|
</Routes>
|
237
272
|
</div>
|
238
273
|
);
|
239
|
-
}
|
274
|
+
}
|
@@ -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
|
|