imio.smartweb.core 1.2.12__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.
- imio/smartweb/core/browser/configure.zcml +1 -1
- imio/smartweb/core/browser/dashboards/configure.zcml +0 -2
- imio/smartweb/core/browser/dashboards/plausible.py +4 -4
- imio/smartweb/core/browser/static/smartweb-edit-compiled.js +1 -1
- imio/smartweb/core/browser/static/src/edit.js +5 -0
- imio/smartweb/core/browser/utils.py +4 -30
- imio/smartweb/core/contents/__init__.py +2 -0
- imio/smartweb/core/contents/rest/base.py +12 -0
- imio/smartweb/core/contents/rest/configure.zcml +7 -0
- imio/smartweb/core/contents/rest/directory/content.py +2 -2
- imio/smartweb/core/contents/rest/directory/view.pt +2 -1
- imio/smartweb/core/contents/rest/directory/view.py +3 -0
- imio/smartweb/core/contents/rest/events/content.py +2 -2
- imio/smartweb/core/contents/rest/events/view.pt +2 -1
- imio/smartweb/core/contents/rest/events/view.py +3 -0
- imio/smartweb/core/contents/rest/news/content.py +2 -2
- imio/smartweb/core/contents/rest/news/view.pt +2 -1
- imio/smartweb/core/contents/rest/news/view.py +3 -0
- imio/smartweb/core/contents/rest/search/endpoint.py +1 -1
- imio/smartweb/core/contents/rest/traversal.py +18 -0
- imio/smartweb/core/contents/rest/view.py +7 -0
- imio/smartweb/core/contents/sections/events/view.py +1 -1
- imio/smartweb/core/contents/sections/news/view.py +1 -1
- imio/smartweb/core/interfaces.py +4 -0
- imio/smartweb/core/profiles/default/actions.xml +15 -0
- imio/smartweb/core/profiles/default/metadata.xml +1 -1
- imio/smartweb/core/rest/authentic_sources.py +21 -11
- imio/smartweb/core/tests/test_rest.py +120 -0
- imio/smartweb/core/tests/utils.py +15 -0
- imio/smartweb/core/upgrades/configure.zcml +18 -0
- imio/smartweb/core/upgrades/profiles/1051_to_1052/actions.xml +20 -0
- imio/smartweb/core/utils.py +31 -0
- imio/smartweb/core/viewlets/configure.zcml +11 -0
- imio/smartweb/core/viewlets/httpheaders.py +13 -0
- imio/smartweb/core/viewlets/ogp_tag_header.pt +10 -0
- imio/smartweb/core/viewlets/ogptags.py +8 -0
- imio/smartweb/core/webcomponents/build/css/54.smartweb-webcomponents-compiled.css +1 -0
- imio/smartweb/core/webcomponents/build/css/647.smartweb-webcomponents-compiled.css +1 -0
- imio/smartweb/core/webcomponents/build/js/3.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/323.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/363.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/493.smartweb-webcomponents-compiled.js +1 -0
- imio/smartweb/core/webcomponents/build/js/54.smartweb-webcomponents-compiled.js +1 -0
- imio/smartweb/core/webcomponents/build/js/647.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/647.smartweb-webcomponents-compiled.js.LICENSE.txt +1 -0
- imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/package.json +14 -17
- imio/smartweb/core/webcomponents/src/assets/contentIcon/download.svg +1 -0
- imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.jsx +85 -84
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactCard/ContactCard.jsx +22 -23
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +109 -93
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/download.svg +1 -0
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactList/ContactList.jsx +7 -7
- imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx +43 -0
- imio/smartweb/core/webcomponents/src/components/Events/{ContactContent/ContactContent.jsx → EventContent/EventContent.jsx} +76 -81
- imio/smartweb/core/webcomponents/src/components/Events/{ContactList/ContactList.jsx → EventList/EventList.jsx} +9 -9
- imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +99 -98
- imio/smartweb/core/webcomponents/src/components/Events/Events.scss +1 -1
- imio/smartweb/core/webcomponents/src/components/News/News.jsx +23 -25
- imio/smartweb/core/webcomponents/src/components/News/News.scss +3 -5
- imio/smartweb/core/webcomponents/src/components/News/{ContactCard/ContactCard.jsx → NewsCard/NewsCard.jsx} +14 -27
- imio/smartweb/core/webcomponents/src/components/News/{ContactContent/ContactContent.jsx → NewsContent/NewsContent.jsx} +37 -40
- imio/smartweb/core/webcomponents/src/components/News/{ContactList/ContactList.jsx → NewsList/NewsList.jsx} +9 -9
- imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx +5 -5
- imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx +5 -5
- imio/smartweb/core/webcomponents/src/components/Search/NewsResult/NewsResult.jsx +5 -5
- imio/smartweb/core/webcomponents/src/components/Search/WebResult/WebResult.jsx +3 -3
- imio/smartweb/core/webcomponents/src/{components/Events/ContactMap/ContactMap.jsx → utils/Map.jsx} +60 -64
- {imio.smartweb.core-1.2.12.dist-info → imio.smartweb.core-1.2.19.dist-info}/METADATA +59 -1
- {imio.smartweb.core-1.2.12.dist-info → imio.smartweb.core-1.2.19.dist-info}/RECORD +80 -82
- imio/smartweb/core/webcomponents/build/css/267.smartweb-webcomponents-compiled.css +0 -1
- imio/smartweb/core/webcomponents/build/css/779.smartweb-webcomponents-compiled.css +0 -1
- imio/smartweb/core/webcomponents/build/js/267.smartweb-webcomponents-compiled.js +0 -1
- imio/smartweb/core/webcomponents/build/js/552.smartweb-webcomponents-compiled.js +0 -2
- imio/smartweb/core/webcomponents/build/js/565.smartweb-webcomponents-compiled.js +0 -1
- imio/smartweb/core/webcomponents/build/js/612.smartweb-webcomponents-compiled.js +0 -2
- imio/smartweb/core/webcomponents/build/js/779.smartweb-webcomponents-compiled.js +0 -1
- imio/smartweb/core/webcomponents/pnpm-lock.yaml +0 -7066
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactMap/ContactMap.jsx +0 -156
- imio/smartweb/core/webcomponents/src/components/Annuaire/Skeleton/LoaderCss.jsx +0 -7
- imio/smartweb/core/webcomponents/src/components/Annuaire/Skeleton/Skeleton.jsx +0 -20
- imio/smartweb/core/webcomponents/src/components/Events/ContactCard/ContactCard.jsx +0 -49
- imio/smartweb/core/webcomponents/src/components/Events/ContactMap/ContactMap.scss +0 -0
- imio/smartweb/core/webcomponents/src/components/Events/Skeleton/Skeleton.jsx +0 -20
- imio/smartweb/core/webcomponents/src/components/News/ContactMap/ContactMap.jsx +0 -127
- imio/smartweb/core/webcomponents/src/components/News/ContactMap/ContactMap.scss +0 -4
- imio/smartweb/core/webcomponents/src/components/News/Skeleton/Skeleton.jsx +0 -20
- imio/smartweb/core/webcomponents/src/components/Search/Skeleton/Skeleton.jsx +0 -20
- /imio/smartweb/core/webcomponents/build/css/{552.smartweb-webcomponents-compiled.css → 363.smartweb-webcomponents-compiled.css} +0 -0
- /imio/smartweb/core/webcomponents/build/js/{552.smartweb-webcomponents-compiled.js.LICENSE.txt → 3.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -0
- /imio/smartweb/core/webcomponents/build/js/{612.smartweb-webcomponents-compiled.js.LICENSE.txt → 363.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -0
- /imio/smartweb/core/webcomponents/src/{components/Annuaire/ContactMap/ContactMap.scss → utils/Map.scss} +0 -0
- /imio.smartweb.core-1.2.12-py3.10-nspkg.pth → /imio.smartweb.core-1.2.19-py3.10-nspkg.pth +0 -0
- {imio.smartweb.core-1.2.12.dist-info → imio.smartweb.core-1.2.19.dist-info}/LICENSE.GPL +0 -0
- {imio.smartweb.core-1.2.12.dist-info → imio.smartweb.core-1.2.19.dist-info}/LICENSE.rst +0 -0
- {imio.smartweb.core-1.2.12.dist-info → imio.smartweb.core-1.2.19.dist-info}/WHEEL +0 -0
- {imio.smartweb.core-1.2.12.dist-info → imio.smartweb.core-1.2.19.dist-info}/namespace_packages.txt +0 -0
- {imio.smartweb.core-1.2.12.dist-info → imio.smartweb.core-1.2.19.dist-info}/top_level.txt +0 -0
imio/smartweb/core/webcomponents/src/{components/Events/ContactMap/ContactMap.jsx → utils/Map.jsx}
RENAMED
@@ -1,10 +1,11 @@
|
|
1
1
|
import React, { useState, useEffect } from "react";
|
2
2
|
import { MapContainer, TileLayer, Marker, Popup, useMap } from "react-leaflet";
|
3
|
+
import useFilterQuery from "../hooks/useFilterQuery";
|
3
4
|
import L from "leaflet";
|
4
|
-
import iconSvg from "
|
5
|
-
import iconSvgActivated from "
|
5
|
+
import iconSvg from "../assets/pin-react.svg";
|
6
|
+
import iconSvgActivated from "../assets/pin-react-active.svg";
|
6
7
|
import { Link } from "react-router-dom";
|
7
|
-
import "./
|
8
|
+
import "./Map.scss";
|
8
9
|
import "leaflet/dist/leaflet.css";
|
9
10
|
import removeAccents from "remove-accents";
|
10
11
|
|
@@ -22,26 +23,30 @@ function ChangeMapView({ activeItem, arrayOfLatLngs }) {
|
|
22
23
|
return null;
|
23
24
|
}
|
24
25
|
|
25
|
-
function
|
26
|
+
function Map(props) {
|
26
27
|
const [activeItem, setActiveItem] = useState(null);
|
27
|
-
const [hoverItem, setHoverItem] = useState(null);
|
28
28
|
const [filterGeoArray, setFilterGeoArray] = useState([]);
|
29
29
|
const [allPosition, setAllPosition] = useState(null);
|
30
|
-
|
30
|
+
const queryString = require("query-string");
|
31
|
+
const { u, ...parsed } = Object.assign(
|
32
|
+
{ UID: queryString.parse(useFilterQuery().toString())['u']},
|
33
|
+
);
|
34
|
+
// Delete Imio positions
|
31
35
|
useEffect(() => {
|
32
36
|
const filterArray = props.items.filter((isgeo) => isgeo.geolocation.latitude && isgeo.geolocation.latitude !== 50.4989185 && isgeo.geolocation.longitude !== 4.7184485);
|
33
37
|
setFilterGeoArray(filterArray);
|
34
38
|
}, [props]);
|
35
39
|
|
36
|
-
|
40
|
+
// Setup Maker Icon
|
41
|
+
const mapIcon = (url) => {
|
37
42
|
return new L.Icon({
|
38
43
|
iconUrl: url,
|
39
44
|
iconSize: [29, 37],
|
40
45
|
});
|
41
46
|
}
|
42
|
-
|
47
|
+
// Get Marker Icon and Z-index
|
43
48
|
const getMarkerIcon = (index) => {
|
44
|
-
if (index ===
|
49
|
+
if (index === parsed.UID) {
|
45
50
|
return mapIcon(iconSvgActivated);
|
46
51
|
}
|
47
52
|
if (index === props.hoverId) {
|
@@ -60,26 +65,14 @@ function ContentMap(props) {
|
|
60
65
|
};
|
61
66
|
|
62
67
|
useEffect(() => {
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
} else setActiveItem(null);
|
71
|
-
}, [props.clickId]);
|
68
|
+
var result =
|
69
|
+
filterGeoArray &&
|
70
|
+
filterGeoArray.filter((obj) => {
|
71
|
+
return obj.UID === parsed.UID;
|
72
|
+
});
|
73
|
+
setActiveItem(result[0]);
|
74
|
+
}, [filterGeoArray]);
|
72
75
|
|
73
|
-
useEffect(() => {
|
74
|
-
if (props.hoverId) {
|
75
|
-
var result =
|
76
|
-
filterGeoArray &&
|
77
|
-
filterGeoArray.filter((obj) => {
|
78
|
-
return obj.UID === props.hoverId;
|
79
|
-
});
|
80
|
-
setHoverItem(result[0]);
|
81
|
-
} else setHoverItem(null);
|
82
|
-
}, [props.hoverId]);
|
83
76
|
|
84
77
|
useEffect(() => {
|
85
78
|
if (filterGeoArray.length > 0) {
|
@@ -94,6 +87,42 @@ function ContentMap(props) {
|
|
94
87
|
}, [filterGeoArray]);
|
95
88
|
const position = [50.85034, 4.35171];
|
96
89
|
|
90
|
+
const markers = filterGeoArray.map((mark) => (
|
91
|
+
<Marker
|
92
|
+
key={mark.UID}
|
93
|
+
icon={getMarkerIcon(mark.UID)}
|
94
|
+
zIndexOffset={getMarkerZindex(mark.UID)}
|
95
|
+
position={[
|
96
|
+
mark.geolocation ? mark.geolocation.latitude : "",
|
97
|
+
mark.geolocation ? mark.geolocation.longitude : "",
|
98
|
+
]}
|
99
|
+
eventHandlers={{
|
100
|
+
mouseover: (e) => {
|
101
|
+
// Gérer les événements ici
|
102
|
+
},
|
103
|
+
}}
|
104
|
+
>
|
105
|
+
<Popup closeButton={false}>
|
106
|
+
<Link
|
107
|
+
className="r-map-popup"
|
108
|
+
style={{ textDecoration: "none" }}
|
109
|
+
to={{
|
110
|
+
pathname: removeAccents(
|
111
|
+
mark.title.replace(/\s/g, "-").toLowerCase()
|
112
|
+
),
|
113
|
+
search: `?u=${mark.UID}`,
|
114
|
+
state: {
|
115
|
+
idItem: mark.UID,
|
116
|
+
},
|
117
|
+
}}
|
118
|
+
>
|
119
|
+
<span className="r-map-popup-title">{mark.title}</span>
|
120
|
+
<p className="r-map-popup-category">{mark.category && mark.category.title}</p>
|
121
|
+
</Link>
|
122
|
+
</Popup>
|
123
|
+
</Marker>
|
124
|
+
));
|
125
|
+
|
97
126
|
return (
|
98
127
|
<div>
|
99
128
|
<MapContainer
|
@@ -108,49 +137,16 @@ function ContentMap(props) {
|
|
108
137
|
{allPosition != null ? (
|
109
138
|
<ChangeMapView
|
110
139
|
activeItem={activeItem}
|
140
|
+
activeItemUID={parsed.UID}
|
111
141
|
arrayOfLatLngs={allPosition && allPosition}
|
112
142
|
/>
|
113
143
|
) : (
|
114
144
|
""
|
115
145
|
)}
|
116
|
-
{filterGeoArray &&
|
117
|
-
filterGeoArray.map((mark) => (
|
118
|
-
<Marker
|
119
|
-
key={mark.UID}
|
120
|
-
icon={getMarkerIcon(mark.UID)}
|
121
|
-
zIndexOffset={getMarkerZindex(mark.UID)}
|
122
|
-
position={[
|
123
|
-
mark.geolocation ? mark.geolocation.latitude : "",
|
124
|
-
mark.geolocation ? mark.geolocation.longitude : "",
|
125
|
-
]}
|
126
|
-
eventHandlers={{
|
127
|
-
mouseover: (e) => {
|
128
|
-
},
|
129
|
-
}}
|
130
|
-
>
|
131
|
-
<Popup closeButton={false}>
|
132
|
-
<Link
|
133
|
-
className="r-map-popup"
|
134
|
-
style={{ textDecoration: "none" }}
|
135
|
-
to={{
|
136
|
-
pathname: removeAccents(
|
137
|
-
mark.title.replace(/\s/g, "-").toLowerCase()
|
138
|
-
),
|
139
|
-
search: `?u=${mark.UID}`,
|
140
|
-
state: {
|
141
|
-
idItem: mark.UID,
|
142
|
-
},
|
143
|
-
}}
|
144
|
-
>
|
145
|
-
<span className="r-map-popup-title">{mark.title}</span>
|
146
|
-
<p className="r-map-popup-category">{mark.category && mark.category.title}</p>
|
147
|
-
</Link>
|
148
|
-
</Popup>
|
149
|
-
</ Marker>
|
150
|
-
))}
|
146
|
+
{filterGeoArray && markers }
|
151
147
|
</MapContainer>
|
152
148
|
</div>
|
153
149
|
);
|
154
150
|
}
|
155
151
|
|
156
|
-
export default
|
152
|
+
export default Map;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: imio.smartweb.core
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.19
|
4
4
|
Summary: Core product for iMio websites
|
5
5
|
Home-page: https://github.com/imio/imio.smartweb.core
|
6
6
|
Author: Christophe Boulanger
|
@@ -189,6 +189,64 @@ Changelog
|
|
189
189
|
=========
|
190
190
|
|
191
191
|
|
192
|
+
1.2.19 (2023-12-06)
|
193
|
+
-------------------
|
194
|
+
|
195
|
+
- WEB-4022 : Fix : Compiled edit.js
|
196
|
+
[boulch]
|
197
|
+
|
198
|
+
- WEB-4022 : Fix : bad char in actions.xml (setup/upgrade step)
|
199
|
+
[boulch]
|
200
|
+
|
201
|
+
|
202
|
+
1.2.18 (2023-12-05)
|
203
|
+
-------------------
|
204
|
+
|
205
|
+
- WEB-4022 : Create a new action menu with an utils view that redirect to stats (browser)view
|
206
|
+
[boulch]
|
207
|
+
|
208
|
+
- Change HashRouter to BrowserRouter in React & fix related URLs
|
209
|
+
[thomlamb, laulaz]
|
210
|
+
|
211
|
+
- WEB-3783 : Add new header viewlet to manage og:tags in REACT views
|
212
|
+
[boulch]
|
213
|
+
|
214
|
+
|
215
|
+
1.2.17 (2023-12-01)
|
216
|
+
-------------------
|
217
|
+
|
218
|
+
- Refactor / optimize React code and upgrade packages
|
219
|
+
[thomlamb]
|
220
|
+
|
221
|
+
|
222
|
+
1.2.16 (2023-12-01)
|
223
|
+
-------------------
|
224
|
+
|
225
|
+
- Handle single item json responses in request forwarders
|
226
|
+
[laulaz]
|
227
|
+
|
228
|
+
|
229
|
+
1.2.15 (2023-11-30)
|
230
|
+
-------------------
|
231
|
+
|
232
|
+
- Handle empty responses in request forwarders
|
233
|
+
[laulaz]
|
234
|
+
|
235
|
+
|
236
|
+
1.2.14 (2023-11-30)
|
237
|
+
-------------------
|
238
|
+
|
239
|
+
- Fix parameters in `POST` / `PATCH` / `DELETE` requests
|
240
|
+
[laulaz]
|
241
|
+
|
242
|
+
|
243
|
+
1.2.13 (2023-11-29)
|
244
|
+
-------------------
|
245
|
+
|
246
|
+
- Use json for request forwarders body
|
247
|
+
[laulaz, boulch]
|
248
|
+
|
249
|
+
|
192
250
|
1.2.12 (2023-11-29)
|
193
251
|
-------------------
|
194
252
|
|