imio.smartweb.core 1.2.37__py3-none-any.whl → 1.2.79__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/behaviors/categorization.py +24 -0
- imio/smartweb/core/behaviors/configure.zcml +7 -0
- imio/smartweb/core/browser/controlpanel.py +43 -0
- imio/smartweb/core/browser/faceted/block_view.pt +4 -4
- imio/smartweb/core/browser/faceted/summary_view.pt +4 -4
- imio/smartweb/core/browser/sitemap.py +10 -3
- imio/smartweb/core/browser/static/icons/action-delete.svg +3 -0
- imio/smartweb/core/browser/static/icons/action-engagement-2.svg +4 -0
- imio/smartweb/core/browser/static/icons/action-panneaux.svg +3 -0
- imio/smartweb/core/browser/static/icons/action-vote.svg +3 -0
- imio/smartweb/core/browser/static/icons/categorie-attention.svg +3 -0
- imio/smartweb/core/browser/static/icons/categorie-infos-travaux-2.svg +4 -0
- imio/smartweb/core/browser/static/icons/categorie-nature.svg +3 -0
- imio/smartweb/core/browser/static/icons/categorie-parcs-a-conteneurs.svg +4 -0
- imio/smartweb/core/browser/static/icons/categorie-plus.svg +3 -0
- imio/smartweb/core/browser/static/icons/categorie-primes-2.svg +5 -0
- imio/smartweb/core/browser/static/icons/categorie-sport-natation.svg +4 -0
- imio/smartweb/core/browser/static/icons/organisation-ecole-sac.svg +4 -0
- imio/smartweb/core/browser/static/icons/organisation-scout.svg +3 -0
- imio/smartweb/core/browser/static/icons/reseausocial-behance.svg +3 -0
- imio/smartweb/core/browser/static/icons/reseausocial-linkedin.svg +3 -0
- imio/smartweb/core/browser/static/smartweb-edit-compiled.css +1 -1
- imio/smartweb/core/browser/static/smartweb-view-compiled.css +1 -1
- imio/smartweb/core/browser/static/src/edit.less +42 -0
- imio/smartweb/core/browser/static/src/view.less +109 -56
- imio/smartweb/core/browser/vocabulary.py +8 -3
- imio/smartweb/core/contents/__init__.py +2 -0
- imio/smartweb/core/contents/configure.zcml +1 -0
- imio/smartweb/core/contents/folder/block_view.pt +8 -8
- imio/smartweb/core/contents/folder/summary_view.pt +4 -4
- imio/smartweb/core/contents/pages/cirkwi/content.py +5 -0
- imio/smartweb/core/contents/pages/cirkwi/view.py +2 -1
- imio/smartweb/core/contents/pages/configure.zcml +1 -0
- imio/smartweb/core/contents/pages/portal_page/view.py +3 -0
- imio/smartweb/core/contents/pages/views.py +47 -1
- imio/smartweb/core/contents/publication/__init__.py +0 -0
- imio/smartweb/core/contents/publication/configure.zcml +5 -0
- imio/smartweb/core/contents/publication/content.py +23 -0
- imio/smartweb/core/contents/rest/base.py +9 -7
- imio/smartweb/core/contents/rest/directory/endpoint.py +2 -2
- imio/smartweb/core/contents/rest/directory/view.pt +2 -1
- imio/smartweb/core/contents/rest/events/content.py +13 -0
- imio/smartweb/core/contents/rest/events/endpoint.py +5 -3
- imio/smartweb/core/contents/rest/events/view.pt +5 -1
- imio/smartweb/core/contents/rest/events/view.py +12 -0
- imio/smartweb/core/contents/rest/news/content.py +6 -0
- imio/smartweb/core/contents/rest/news/endpoint.py +4 -2
- imio/smartweb/core/contents/rest/news/view.pt +4 -1
- imio/smartweb/core/contents/rest/news/view.py +8 -0
- imio/smartweb/core/contents/rest/utils.py +0 -1
- imio/smartweb/core/contents/rest/view.py +4 -0
- imio/smartweb/core/contents/sections/common_templates/carousel.pt +5 -1
- imio/smartweb/core/contents/sections/common_templates/table.pt +18 -4
- imio/smartweb/core/contents/sections/configure.zcml +18 -0
- imio/smartweb/core/contents/sections/contact/content.py +2 -2
- imio/smartweb/core/contents/sections/contact/macros.pt +28 -3
- imio/smartweb/core/contents/sections/contact/utils.py +2 -0
- imio/smartweb/core/contents/sections/contact/view.py +28 -12
- imio/smartweb/core/contents/sections/events/content.py +12 -4
- imio/smartweb/core/contents/sections/events/view.py +20 -2
- imio/smartweb/core/contents/sections/external_content/view.pt +4 -4
- imio/smartweb/core/contents/sections/external_content/views.py +6 -4
- imio/smartweb/core/contents/sections/files/content.py +7 -1
- imio/smartweb/core/contents/sections/files/view.py +43 -12
- imio/smartweb/core/contents/sections/links/view.py +5 -0
- imio/smartweb/core/contents/sections/macros.pt +26 -0
- imio/smartweb/core/contents/sections/news/content.py +11 -3
- imio/smartweb/core/contents/sections/news/view.py +20 -2
- imio/smartweb/core/contents/sections/text/views.py +2 -0
- imio/smartweb/core/contents/sections/views.py +73 -10
- imio/smartweb/core/interfaces.py +4 -0
- imio/smartweb/core/profiles/default/metadata.xml +1 -1
- imio/smartweb/core/profiles/default/taxonomies/page_category.xml +16 -0
- imio/smartweb/core/profiles/default/taxonomies/procedure_category.xml +26 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.EventsView.xml +1 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.NewsView.xml +1 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.Publication.xml +38 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.SectionEvents.xml +1 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.SectionFiles.xml +2 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.SectionNews.xml +1 -0
- imio/smartweb/core/profiles/default/types.xml +1 -0
- imio/smartweb/core/profiles/icons/basic/registry.xml +120 -0
- imio/smartweb/core/rest/authentic_sources.py +17 -2
- imio/smartweb/core/subscribers.py +48 -0
- imio/smartweb/core/subscribers.zcml +12 -0
- imio/smartweb/core/tests/resources/json_iadeliberations_institutions.json +60 -0
- imio/smartweb/core/tests/resources/json_iadeliberations_publication.json +105 -0
- imio/smartweb/core/tests/resources/json_iadeliberations_publications.json +270 -0
- imio/smartweb/core/tests/resources/json_rest_events.json +6 -2
- imio/smartweb/core/tests/resources/json_rest_news.json +2 -2
- imio/smartweb/core/tests/resources/json_rest_specific_events.json +1 -1
- imio/smartweb/core/tests/test_htmx_in_sections.py +131 -0
- imio/smartweb/core/tests/test_iadeliberations.py +136 -0
- imio/smartweb/core/tests/test_icons.py +1 -1
- imio/smartweb/core/tests/test_rest.py +58 -17
- imio/smartweb/core/tests/test_section_contact.py +42 -10
- imio/smartweb/core/tests/test_section_events.py +28 -5
- imio/smartweb/core/tests/test_section_external_content.py +28 -2
- imio/smartweb/core/tests/test_section_news.py +30 -8
- imio/smartweb/core/tests/test_sections.py +17 -0
- imio/smartweb/core/tests/test_vocabularies.py +60 -3
- imio/smartweb/core/tests/test_vocabulary.py +43 -0
- imio/smartweb/core/upgrades/configure.zcml +108 -0
- imio/smartweb/core/upgrades/profiles/1055_to_1056/types/imio.smartweb.SectionFiles.xml +12 -0
- imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.EventsView.xml +11 -0
- imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.NewsView.xml +11 -0
- imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.SectionEvents.xml +11 -0
- imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.SectionNews.xml +11 -0
- imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/page_category.cfg +9 -0
- imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/page_category.xml +73 -0
- imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/procedure_category.cfg +9 -0
- imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/procedure_category.xml +118 -0
- imio/smartweb/core/upgrades/profiles/1058_to_1059/registry/linkedin-icon.xml +126 -0
- imio/smartweb/core/upgrades/profiles/1059_to_1060/registry/iadeliberation.xml +9 -0
- imio/smartweb/core/upgrades/profiles/1060_to_1061/types/imio.smartweb.Publication.xml +38 -0
- imio/smartweb/core/upgrades/profiles/1060_to_1061/types/imio.smartweb.SectionFiles.xml +11 -0
- imio/smartweb/core/upgrades/profiles/1060_to_1061/types.xml +4 -0
- imio/smartweb/core/upgrades/profiles/1060_to_1061/workflows.xml +6 -0
- imio/smartweb/core/utils.py +33 -2
- imio/smartweb/core/viewlets/configure.zcml +23 -1
- imio/smartweb/core/viewlets/footer.pt +5 -0
- imio/smartweb/core/viewlets/footer.py +5 -0
- imio/smartweb/core/viewlets/htmx.py +15 -0
- imio/smartweb/core/viewlets/htmx_js_header.pt +64 -0
- imio/smartweb/core/viewlets/ogptags.py +4 -3
- imio/smartweb/core/viewlets/social.py +23 -0
- imio/smartweb/core/vocabularies.py +65 -3
- imio/smartweb/core/vocabularies.zcml +18 -0
- imio/smartweb/core/webcomponents/build/1c1605a5fe9a2b10a88f.png +1 -0
- imio/smartweb/core/webcomponents/build/524db40e119aa11f4478.png +1 -0
- imio/smartweb/core/webcomponents/build/57d3b7cb1ab874660b39.svg +1 -0
- imio/smartweb/core/webcomponents/build/6cf03871df23ed2ee8b3.png +1 -0
- 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/919.smartweb-webcomponents-compiled.css +1 -1
- 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 +10 -8
- imio/smartweb/core/webcomponents/build/js/373.smartweb-webcomponents-compiled.js +2 -1
- imio/smartweb/core/webcomponents/build/js/{568.smartweb-webcomponents-compiled.js.LICENSE.txt → 373.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -4
- imio/smartweb/core/webcomponents/build/js/486.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/499.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/{674.smartweb-webcomponents-compiled.js.LICENSE.txt → 499.smartweb-webcomponents-compiled.js.LICENSE.txt} +1 -8
- imio/smartweb/core/webcomponents/build/js/799.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/824.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/828.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/828.smartweb-webcomponents-compiled.js.LICENSE.txt +32 -0
- 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/{568.smartweb-webcomponents-compiled.js → 963.smartweb-webcomponents-compiled.js} +2 -2
- imio/smartweb/core/webcomponents/build/js/963.smartweb-webcomponents-compiled.js.LICENSE.txt +3 -0
- imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js.LICENSE.txt +11 -14
- imio/smartweb/core/webcomponents/package.json +42 -40
- imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.jsx +146 -79
- imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.scss +415 -351
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactCard/ContactCard.jsx +95 -62
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +328 -168
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactList/ContactList.jsx +21 -4
- imio/smartweb/core/webcomponents/src/components/Annuaire/Filters/Filter.jsx +213 -100
- imio/smartweb/core/webcomponents/src/components/Annuaire/index.js +1 -1
- imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx +76 -33
- imio/smartweb/core/webcomponents/src/components/Events/EventContent/EventContent.jsx +604 -377
- imio/smartweb/core/webcomponents/src/components/Events/EventList/EventList.jsx +29 -4
- imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +162 -88
- imio/smartweb/core/webcomponents/src/components/Events/Events.scss +496 -378
- imio/smartweb/core/webcomponents/src/components/Events/Filters/Filter.jsx +259 -91
- imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.jsx +62 -55
- imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.scss +68 -17
- imio/smartweb/core/webcomponents/src/components/Filters/IamData.jsx +42 -0
- imio/smartweb/core/webcomponents/src/components/Filters/MainFilter.scss +229 -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 +139 -83
- imio/smartweb/core/webcomponents/src/components/News/News.jsx +133 -67
- imio/smartweb/core/webcomponents/src/components/News/News.scss +170 -127
- imio/smartweb/core/webcomponents/src/components/News/NewsCard/NewsCard.jsx +76 -44
- imio/smartweb/core/webcomponents/src/components/News/NewsContent/NewsContent.jsx +261 -188
- imio/smartweb/core/webcomponents/src/components/News/NewsList/NewsList.jsx +48 -9
- imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx +21 -10
- imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx +21 -10
- imio/smartweb/core/webcomponents/src/components/Search/Filters/Filter.jsx +8 -9
- imio/smartweb/core/webcomponents/src/components/Search/NewsResult/NewsResult.jsx +23 -12
- imio/smartweb/core/webcomponents/src/components/Search/Search.jsx +7 -6
- imio/smartweb/core/webcomponents/src/components/Search/Search.scss +115 -96
- imio/smartweb/core/webcomponents/src/components/Search/WebResult/WebResult.jsx +12 -3
- imio/smartweb/core/webcomponents/src/components/Search/index.js +1 -1
- imio/smartweb/core/webcomponents/src/hooks/ScrollContext.jsx +3 -0
- imio/smartweb/core/webcomponents/src/hooks/useAxios.js +3 -3
- imio/smartweb/core/webcomponents/src/hooks/useFilterQuery.js +1 -2
- imio/smartweb/core/webcomponents/src/index.scss +255 -211
- imio/smartweb/core/webcomponents/src/utils/Map.jsx +26 -19
- imio/smartweb/core/webcomponents/src/utils/Map.scss +2 -2
- imio/smartweb/core/webcomponents/src/utils/translation.js +129 -9
- imio.smartweb.core-1.2.79-py3.8-nspkg.pth +2 -0
- {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/METADATA +413 -10
- {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/RECORD +206 -160
- {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/WHEEL +1 -1
- imio/smartweb/core/webcomponents/build/assets/location-bla.1423bcce16ddcb21141430cac1428dc1.svg +0 -1
- imio/smartweb/core/webcomponents/build/assets/next-react-white.819cb069ac8eec300a9db6a7707712d6.svg +0 -1
- imio/smartweb/core/webcomponents/build/assets/next-react.17bc43ff4a6a86f4520f5782f6a89a72.svg +0 -1
- imio/smartweb/core/webcomponents/build/assets/search.57bdbf5b191499cd77514097d1c4972c.svg +0 -1
- imio/smartweb/core/webcomponents/build/css/686.smartweb-webcomponents-compiled.css +0 -1
- imio/smartweb/core/webcomponents/build/js/209.smartweb-webcomponents-compiled.js +0 -2
- imio/smartweb/core/webcomponents/build/js/674.smartweb-webcomponents-compiled.js +0 -2
- imio/smartweb/core/webcomponents/build/js/686.smartweb-webcomponents-compiled.js +0 -1
- imio/smartweb/core/webcomponents/build/js/804.smartweb-webcomponents-compiled.js +0 -1
- imio/smartweb/core/webcomponents/src/assets/facebook-news.svg +0 -1
- imio/smartweb/core/webcomponents/src/assets/location-bla.svg +0 -1
- imio/smartweb/core/webcomponents/src/assets/next-react.svg +0 -1
- imio/smartweb/core/webcomponents/src/assets/search.svg +0 -1
- imio/smartweb/core/webcomponents/src/assets/skeleton.svg +0 -1
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/download.svg +0 -1
- imio.smartweb.core-1.2.37-py3.10-nspkg.pth +0 -3
- /imio/smartweb/core/webcomponents/build/js/{209.smartweb-webcomponents-compiled.js.LICENSE.txt → 824.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -0
- {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/LICENSE.GPL +0 -0
- {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/LICENSE.rst +0 -0
- {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/namespace_packages.txt +0 -0
- {imio.smartweb.core-1.2.37.dist-info → imio.smartweb.core-1.2.79.dist-info}/top_level.txt +0 -0
@@ -13,7 +13,10 @@ const ContactResult = (props) => {
|
|
13
13
|
headers: {
|
14
14
|
Accept: "application/json",
|
15
15
|
},
|
16
|
-
params:
|
16
|
+
params:
|
17
|
+
props.urlParams.SearchableText || props.urlParams.iam || props.urlParams.topics
|
18
|
+
? props.urlParams
|
19
|
+
: {},
|
17
20
|
},
|
18
21
|
[props]
|
19
22
|
);
|
@@ -32,7 +35,14 @@ const ContactResult = (props) => {
|
|
32
35
|
<Translate text="Contacts" />
|
33
36
|
</h2>
|
34
37
|
<p className="r-search-header-count">
|
35
|
-
{resultArray.length > 0 ?
|
38
|
+
{resultArray.length > 0 ? (
|
39
|
+
<>
|
40
|
+
{" "}
|
41
|
+
{resultArray.length} <Translate text="Résultats" />{" "}
|
42
|
+
</>
|
43
|
+
) : (
|
44
|
+
<Translate text="Aucun résultat" />
|
45
|
+
)}
|
36
46
|
</p>
|
37
47
|
</div>
|
38
48
|
<ul className="r-search-list">
|
@@ -40,15 +50,16 @@ const ContactResult = (props) => {
|
|
40
50
|
<li key={i} className="r-search-item">
|
41
51
|
<a href={item["_url"]}>
|
42
52
|
<div className="r-search-img">
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
53
|
+
{item.has_leadimage[0] ? (
|
54
|
+
<div
|
55
|
+
className="r-search-img"
|
56
|
+
style={{
|
57
|
+
backgroundImage: "url(" + item.image_url + ")",
|
58
|
+
}}
|
59
|
+
></div>
|
60
|
+
) : (
|
49
61
|
<div className="r-search-img no-search-item-img"></div>
|
50
|
-
)
|
51
|
-
}
|
62
|
+
)}
|
52
63
|
</div>
|
53
64
|
<Highlighter
|
54
65
|
highlightClassName="r-search-highlighter"
|
@@ -13,7 +13,10 @@ const EventsResult = (props) => {
|
|
13
13
|
headers: {
|
14
14
|
Accept: "application/json",
|
15
15
|
},
|
16
|
-
params:
|
16
|
+
params:
|
17
|
+
props.urlParams.SearchableText || props.urlParams.iam || props.urlParams.topics
|
18
|
+
? props.urlParams
|
19
|
+
: {},
|
17
20
|
},
|
18
21
|
[props]
|
19
22
|
);
|
@@ -32,7 +35,14 @@ const EventsResult = (props) => {
|
|
32
35
|
<Translate text="Événements" />
|
33
36
|
</h2>
|
34
37
|
<p className="r-search-header-count">
|
35
|
-
{resultArray.length > 0 ?
|
38
|
+
{resultArray.length > 0 ? (
|
39
|
+
<>
|
40
|
+
{" "}
|
41
|
+
{resultArray.length} <Translate text="Résultats" />{" "}
|
42
|
+
</>
|
43
|
+
) : (
|
44
|
+
<Translate text="Aucun résultat" />
|
45
|
+
)}
|
36
46
|
</p>
|
37
47
|
</div>
|
38
48
|
<ul className="r-search-list">
|
@@ -40,15 +50,16 @@ const EventsResult = (props) => {
|
|
40
50
|
<li key={i} className="r-search-item">
|
41
51
|
<a href={item["_url"]}>
|
42
52
|
<div className="r-search-img">
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
53
|
+
{item.has_leadimage[0] ? (
|
54
|
+
<div
|
55
|
+
className="r-search-img"
|
56
|
+
style={{
|
57
|
+
backgroundImage: "url(" + item.image_url + ")",
|
58
|
+
}}
|
59
|
+
></div>
|
60
|
+
) : (
|
49
61
|
<div className="r-search-img no-search-item-img"></div>
|
50
|
-
)
|
51
|
-
}
|
62
|
+
)}
|
52
63
|
</div>
|
53
64
|
<Highlighter
|
54
65
|
highlightClassName="r-search-highlighter"
|
@@ -1,13 +1,12 @@
|
|
1
1
|
import React, { useEffect, useCallback, useRef, useState } from "react";
|
2
2
|
import Select from "react-select";
|
3
|
-
import {
|
3
|
+
import { useNavigate } from "react-router-dom";
|
4
4
|
import axios from "axios";
|
5
5
|
import { Translate, Translator } from "react-translated";
|
6
|
+
import queryString from "query-string";
|
6
7
|
|
7
8
|
function Filters(props) {
|
8
|
-
let
|
9
|
-
const queryString = require("query-string");
|
10
|
-
|
9
|
+
let navigate = useNavigate();
|
11
10
|
const [inputValues, setInputValues] = useState(props.activeFilter);
|
12
11
|
const [searchValues, setSearchValues] = useState({});
|
13
12
|
const [topicsFilter, setTopicsFilter] = useState(null);
|
@@ -109,7 +108,7 @@ function Filters(props) {
|
|
109
108
|
firstUpdate.current = false;
|
110
109
|
return;
|
111
110
|
}
|
112
|
-
|
111
|
+
navigate({
|
113
112
|
pathname: "./",
|
114
113
|
search: queryString.stringify(inputValues),
|
115
114
|
});
|
@@ -154,7 +153,7 @@ function Filters(props) {
|
|
154
153
|
onChange={HandlerText}
|
155
154
|
value={searchValues.SearchableText}
|
156
155
|
placeholder={translate({
|
157
|
-
text:
|
156
|
+
text: "Recherche",
|
158
157
|
})}
|
159
158
|
/>
|
160
159
|
)}
|
@@ -174,7 +173,7 @@ function Filters(props) {
|
|
174
173
|
onChange={onChangeHandlerSelect}
|
175
174
|
options={iamFilter && iamFilter}
|
176
175
|
placeholder={translate({
|
177
|
-
text:
|
176
|
+
text: "Je suis",
|
178
177
|
})}
|
179
178
|
value={actIam && actIam[0]}
|
180
179
|
/>
|
@@ -192,7 +191,7 @@ function Filters(props) {
|
|
192
191
|
onChange={onChangeHandlerSelect}
|
193
192
|
options={topicsFilter && topicsFilter}
|
194
193
|
placeholder={translate({
|
195
|
-
text:
|
194
|
+
text: "Thématiques",
|
196
195
|
})}
|
197
196
|
value={actTopi && actTopi[0]}
|
198
197
|
/>
|
@@ -203,4 +202,4 @@ function Filters(props) {
|
|
203
202
|
);
|
204
203
|
}
|
205
204
|
|
206
|
-
export default Filters;
|
205
|
+
export default Filters;
|
@@ -13,7 +13,10 @@ const NewsResult = (props) => {
|
|
13
13
|
headers: {
|
14
14
|
Accept: "application/json",
|
15
15
|
},
|
16
|
-
params:
|
16
|
+
params:
|
17
|
+
props.urlParams.SearchableText || props.urlParams.iam || props.urlParams.topics
|
18
|
+
? props.urlParams
|
19
|
+
: {},
|
17
20
|
},
|
18
21
|
[props]
|
19
22
|
);
|
@@ -29,10 +32,17 @@ const NewsResult = (props) => {
|
|
29
32
|
<div className="search-news">
|
30
33
|
<div className="r-search-header">
|
31
34
|
<h2 className="r-search-header-title">
|
32
|
-
<Translate text="Actualités"/>
|
35
|
+
<Translate text="Actualités" />
|
33
36
|
</h2>
|
34
37
|
<p className="r-search-header-count">
|
35
|
-
{resultArray.length > 0 ?
|
38
|
+
{resultArray.length > 0 ? (
|
39
|
+
<>
|
40
|
+
{" "}
|
41
|
+
{resultArray.length} <Translate text="Résultats" />{" "}
|
42
|
+
</>
|
43
|
+
) : (
|
44
|
+
<Translate text="Aucun résultat" />
|
45
|
+
)}
|
36
46
|
</p>
|
37
47
|
</div>
|
38
48
|
<ul className="r-search-list">
|
@@ -40,15 +50,16 @@ const NewsResult = (props) => {
|
|
40
50
|
<li key={i} className="r-search-item">
|
41
51
|
<a href={item["_url"]}>
|
42
52
|
<div className="r-search-img">
|
43
|
-
{
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
53
|
+
{item.has_leadimage[0] ? (
|
54
|
+
<div
|
55
|
+
className="r-search-img"
|
56
|
+
style={{
|
57
|
+
backgroundImage: "url(" + item.image_url + ")",
|
58
|
+
}}
|
59
|
+
></div>
|
60
|
+
) : (
|
61
|
+
<div className="r-search-img no-search-item-img"></div>
|
62
|
+
)}
|
52
63
|
</div>
|
53
64
|
<Highlighter
|
54
65
|
highlightClassName="r-search-highlighter"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
|
-
import { BrowserRouter
|
2
|
+
import { BrowserRouter } from "react-router-dom";
|
3
3
|
import Filters from "./Filters/Filter";
|
4
4
|
import ContactResult from "./ContactResult/ContactResult";
|
5
5
|
import NewsResult from "./NewsResult/NewsResult";
|
@@ -7,12 +7,14 @@ import EventsResult from "./EventsResult/EventsResult";
|
|
7
7
|
import WebResult from "./WebResult/WebResult";
|
8
8
|
import useFilterQuery from "../../hooks/useFilterQuery";
|
9
9
|
import { Provider } from "react-translated";
|
10
|
-
import translation from
|
10
|
+
import translation from "../../utils/translation";
|
11
|
+
import queryString from "query-string";
|
12
|
+
|
11
13
|
import "./Search.scss";
|
12
14
|
|
13
15
|
export default function Search(props) {
|
14
16
|
return (
|
15
|
-
<
|
17
|
+
<BrowserRouter>
|
16
18
|
<Provider language={props.currentLanguage} translation={translation}>
|
17
19
|
<SearchView
|
18
20
|
queryFilterUrl={props.queryFilterUrl}
|
@@ -20,14 +22,13 @@ export default function Search(props) {
|
|
20
22
|
resultOption={JSON.parse(props.resultOption)}
|
21
23
|
/>
|
22
24
|
</Provider>
|
23
|
-
</
|
25
|
+
</BrowserRouter>
|
24
26
|
);
|
25
27
|
}
|
26
28
|
const SearchView = (props) => {
|
27
|
-
const queryString = require("query-string");
|
28
29
|
const parsed = queryString.parse(useFilterQuery().toString());
|
29
30
|
const { SearchableText, iam, topics } = parsed;
|
30
|
-
const parsed2 = {
|
31
|
+
const parsed2 = { SearchableText: SearchableText, iam: iam, topics: topics };
|
31
32
|
// const parsed2 = { ...parsed };
|
32
33
|
const [filters, setFilters] = useState(parsed2);
|
33
34
|
const [batchSize, setBatchSize] = useState(6);
|
@@ -1,125 +1,144 @@
|
|
1
|
-
.userrole-authenticated{
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
.userrole-authenticated {
|
2
|
+
.r-search-container {
|
3
|
+
padding: 0 20px 0 123px;
|
4
|
+
}
|
5
5
|
}
|
6
|
-
|
6
|
+
|
7
|
+
.r-search-container {
|
7
8
|
max-width: 1330px;
|
8
9
|
margin: 0 auto;
|
9
10
|
padding: 0 20px 0 20px;
|
11
|
+
|
10
12
|
.full-width {
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
width: 100vw;
|
14
|
+
position: relative;
|
15
|
+
left: 50%;
|
16
|
+
right: 50%;
|
17
|
+
margin-left: -50vw;
|
18
|
+
margin-right: -50vw;
|
17
19
|
}
|
18
20
|
|
19
|
-
.r-search-highlighter{
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
.r-search-highlighter {
|
22
|
+
padding: 0;
|
23
|
+
font-weight: bold;
|
24
|
+
background: transparent;
|
25
|
+
position: relative;
|
26
|
+
border-bottom: 2px solid #f9b300;
|
25
27
|
}
|
26
|
-
|
27
|
-
|
28
|
+
|
29
|
+
.r-search-header {
|
30
|
+
border-bottom: 1px solid #000;
|
28
31
|
}
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
32
|
+
|
33
|
+
.r-search-header-title {
|
34
|
+
font-weight: bold;
|
35
|
+
font-size: 15px;
|
36
|
+
text-transform: uppercase;
|
33
37
|
}
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
+
|
39
|
+
.r-search-header-count {
|
40
|
+
font-size: 10px;
|
41
|
+
text-transform: uppercase;
|
42
|
+
color: #808080;
|
38
43
|
}
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
+
|
45
|
+
.r-search-result {
|
46
|
+
margin-top: 2rem;
|
47
|
+
display: grid;
|
48
|
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
49
|
+
gap: 1.5rem;
|
44
50
|
}
|
45
51
|
|
46
|
-
.r-search.search-bar-filter{
|
47
|
-
position: relative;
|
48
|
-
form{
|
52
|
+
.r-search.search-bar-filter {
|
49
53
|
position: relative;
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
}
|
54
|
-
input{
|
55
|
-
line-height: 50px;
|
56
|
-
border: 1px solid #CCCCCC;
|
57
|
-
height: 50px;
|
58
|
-
padding: 0 10px;
|
59
|
-
font-weight: bold;
|
60
|
-
color: #000;
|
61
|
-
letter-spacing:1.2px;
|
62
|
-
&::placeholder {
|
63
|
-
color: #000;
|
64
|
-
font-size: 12px;
|
65
|
-
opacity: 1;
|
66
|
-
text-transform: uppercase;
|
67
|
-
letter-spacing:1.2px;
|
54
|
+
|
55
|
+
form {
|
56
|
+
position: relative;
|
68
57
|
}
|
69
58
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
59
|
+
label,
|
60
|
+
input {
|
61
|
+
width: 100%;
|
62
|
+
}
|
63
|
+
|
64
|
+
input {
|
65
|
+
line-height: 50px;
|
66
|
+
border: 1px solid #cccccc;
|
67
|
+
height: 50px;
|
68
|
+
padding: 0 10px;
|
69
|
+
font-weight: bold;
|
70
|
+
color: #000;
|
71
|
+
letter-spacing: 1.2px;
|
72
|
+
|
73
|
+
&::placeholder {
|
74
|
+
color: #000;
|
75
|
+
font-size: 12px;
|
76
|
+
opacity: 1;
|
77
|
+
text-transform: uppercase;
|
78
|
+
letter-spacing: 1.2px;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
button {
|
83
|
+
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg id='Calque_2' data-name='Calque 2'%3E%3Cg id='Calque_1-2' data-name='Calque 1'%3E%3Cg id='search'%3E%3Cpath id='Shape' d='M11.08,6.77a4.31,4.31,0,1,0-4.31,4.31h0A4.32,4.32,0,0,0,11.08,6.77Zm4.92,8A1.24,1.24,0,0,1,14.77,16a1.17,1.17,0,0,1-.86-.37l-3.3-3.28a6.77,6.77,0,1,1,1.74-1.74l3.3,3.3A1.25,1.25,0,0,1,16,14.77Z' style='fill:%23141414;fill-rule:evenodd'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E")
|
84
|
+
no-repeat;
|
85
|
+
background-position: center;
|
86
|
+
background-size: 80%;
|
87
|
+
border: none;
|
88
|
+
width: 20px;
|
89
|
+
position: absolute;
|
90
|
+
right: 10px;
|
91
|
+
top: 0;
|
92
|
+
bottom: 0;
|
93
|
+
}
|
82
94
|
}
|
83
95
|
|
84
|
-
.r-search-select{
|
85
|
-
|
86
|
-
|
96
|
+
.r-search-select {
|
97
|
+
height: 50px;
|
98
|
+
border-radius: 0px;
|
87
99
|
}
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
100
|
+
|
101
|
+
.r-search-list {
|
102
|
+
margin-top: 20px;
|
103
|
+
overflow-y: scroll;
|
104
|
+
|
105
|
+
@media screen and (min-width: 992px) {
|
106
|
+
max-height: 375px;
|
107
|
+
}
|
108
|
+
|
109
|
+
.r-search-item {
|
110
|
+
list-style: none;
|
111
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.25);
|
112
|
+
padding: 1rem 0;
|
113
|
+
font-size: 14px;
|
114
|
+
display: flex;
|
115
|
+
gap: 10px;
|
116
|
+
|
117
|
+
.r-search-img {
|
118
|
+
width: 91px;
|
119
|
+
height: 61px;
|
120
|
+
background-size: cover;
|
121
|
+
background-repeat: no-repeat;
|
122
|
+
flex-basis: 100%;
|
123
|
+
flex-basis: 91px;
|
124
|
+
flex-grow: 0;
|
125
|
+
flex-shrink: 0;
|
126
|
+
}
|
110
127
|
}
|
111
|
-
}
|
112
128
|
}
|
113
129
|
}
|
130
|
+
|
114
131
|
.offcanvas-header .btn-close {
|
115
|
-
|
116
|
-
|
117
|
-
|
132
|
+
right: 10px;
|
133
|
+
position: absolute;
|
134
|
+
top: 10px;
|
118
135
|
}
|
119
136
|
|
120
|
-
.search-contact .r-search-img,
|
137
|
+
.search-contact .r-search-img,
|
138
|
+
.search-events .r-search-img,
|
139
|
+
.search-news .r-search-img {
|
121
140
|
float: left;
|
122
|
-
margin-right: .5rem;
|
141
|
+
margin-right: 0.5rem;
|
123
142
|
}
|
124
143
|
|
125
144
|
.r-search-result mark {
|
@@ -13,7 +13,10 @@ const WebResult = (props) => {
|
|
13
13
|
headers: {
|
14
14
|
Accept: "application/json",
|
15
15
|
},
|
16
|
-
params:
|
16
|
+
params:
|
17
|
+
props.urlParams.SearchableText || props.urlParams.iam || props.urlParams.topics
|
18
|
+
? props.urlParams
|
19
|
+
: {},
|
17
20
|
},
|
18
21
|
[props]
|
19
22
|
);
|
@@ -30,10 +33,16 @@ const WebResult = (props) => {
|
|
30
33
|
<div className="r-search-header">
|
31
34
|
<h2 className="r-search-header-title">
|
32
35
|
<Translate text="Infos pratiques" />
|
33
|
-
|
34
36
|
</h2>
|
35
37
|
<p className="r-search-header-count">
|
36
|
-
{resultArray.length > 0 ?
|
38
|
+
{resultArray.length > 0 ? (
|
39
|
+
<>
|
40
|
+
{" "}
|
41
|
+
{resultArray.length} <Translate text="Résultats" />{" "}
|
42
|
+
</>
|
43
|
+
) : (
|
44
|
+
<Translate text="Aucun résultat" />
|
45
|
+
)}
|
37
46
|
</p>
|
38
47
|
</div>
|
39
48
|
<ul className="r-search-list">
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import loadable from "@loadable/component";
|
2
|
-
export default loadable(() => import("./Search"));
|
2
|
+
export default loadable(() => import("./Search"));
|
@@ -31,10 +31,10 @@ const useAxios = (params) => {
|
|
31
31
|
}
|
32
32
|
};
|
33
33
|
useEffect(() => {
|
34
|
-
fetchData({...params,signal: controller.signal});
|
35
|
-
return() => controller.abort()
|
34
|
+
fetchData({ ...params, signal: controller.signal });
|
35
|
+
return () => controller.abort()
|
36
36
|
}, [params.params]);
|
37
37
|
return { response, error, isLoading, isMore };
|
38
38
|
};
|
39
39
|
|
40
|
-
export default useAxios;
|
40
|
+
export default useAxios;
|