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.
Files changed (72) hide show
  1. imio/smartweb/core/contents/sections/events/view.py +2 -1
  2. imio/smartweb/core/contents/sections/news/view.py +2 -1
  3. imio/smartweb/core/contents/sections/text/views.py +2 -0
  4. imio/smartweb/core/contents/sections/views.py +2 -0
  5. imio/smartweb/core/tests/resources/json_rest_events.json +4 -1
  6. imio/smartweb/core/tests/test_rest.py +4 -1
  7. imio/smartweb/core/tests/test_section_events.py +9 -8
  8. imio/smartweb/core/tests/test_section_news.py +6 -6
  9. imio/smartweb/core/tests/test_vocabularies.py +2 -2
  10. imio/smartweb/core/utils.py +1 -1
  11. imio/smartweb/core/viewlets/footer.pt +5 -0
  12. imio/smartweb/core/viewlets/footer.py +5 -0
  13. imio/smartweb/core/vocabularies.py +2 -2
  14. imio/smartweb/core/webcomponents/build/css/373.smartweb-webcomponents-compiled.css +1 -1
  15. imio/smartweb/core/webcomponents/build/css/486.smartweb-webcomponents-compiled.css +1 -1
  16. imio/smartweb/core/webcomponents/build/css/884.smartweb-webcomponents-compiled.css +1 -0
  17. imio/smartweb/core/webcomponents/build/css/smartweb-webcomponents-compiled.css +1 -1
  18. imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js +1 -1
  19. imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js.LICENSE.txt +5 -0
  20. imio/smartweb/core/webcomponents/build/js/373.smartweb-webcomponents-compiled.js +1 -1
  21. imio/smartweb/core/webcomponents/build/js/486.smartweb-webcomponents-compiled.js +1 -1
  22. imio/smartweb/core/webcomponents/build/js/736.smartweb-webcomponents-compiled.js +1 -1
  23. imio/smartweb/core/webcomponents/build/js/736.smartweb-webcomponents-compiled.js.LICENSE.txt +3 -3
  24. imio/smartweb/core/webcomponents/build/js/884.smartweb-webcomponents-compiled.js +1 -0
  25. imio/smartweb/core/webcomponents/build/js/919.smartweb-webcomponents-compiled.js +1 -1
  26. imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js +1 -1
  27. imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.jsx +101 -74
  28. imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.scss +4 -22
  29. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactCard/ContactCard.jsx +22 -18
  30. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +4 -2
  31. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactList/ContactList.jsx +7 -2
  32. imio/smartweb/core/webcomponents/src/components/Annuaire/Filters/Filter.jsx +211 -98
  33. imio/smartweb/core/webcomponents/src/components/Events/EventContent/EventContent.jsx +506 -378
  34. imio/smartweb/core/webcomponents/src/components/Events/EventList/EventList.jsx +13 -4
  35. imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +117 -82
  36. imio/smartweb/core/webcomponents/src/components/Events/Events.scss +52 -28
  37. imio/smartweb/core/webcomponents/src/components/Events/Filters/Filter.jsx +257 -90
  38. imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.jsx +62 -54
  39. imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.scss +60 -12
  40. imio/smartweb/core/webcomponents/src/components/Filters/IamData.jsx +42 -0
  41. imio/smartweb/core/webcomponents/src/components/Filters/MainFilter.scss +217 -0
  42. imio/smartweb/core/webcomponents/src/components/Filters/PublicTargetData.jsx +94 -0
  43. imio/smartweb/core/webcomponents/src/components/Filters/SelectStyles.js +58 -0
  44. imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.jsx +149 -0
  45. imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.scss +70 -0
  46. imio/smartweb/core/webcomponents/src/components/News/Filters/Filter.jsx +127 -82
  47. imio/smartweb/core/webcomponents/src/components/News/News.jsx +86 -53
  48. imio/smartweb/core/webcomponents/src/components/News/News.scss +29 -9
  49. imio/smartweb/core/webcomponents/src/components/News/NewsCard/NewsCard.jsx +34 -31
  50. imio/smartweb/core/webcomponents/src/components/News/NewsContent/NewsContent.jsx +264 -244
  51. imio/smartweb/core/webcomponents/src/components/News/NewsList/NewsList.jsx +13 -8
  52. imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx +23 -12
  53. imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx +23 -12
  54. imio/smartweb/core/webcomponents/src/components/Search/Filters/Filter.jsx +5 -5
  55. imio/smartweb/core/webcomponents/src/components/Search/NewsResult/NewsResult.jsx +23 -12
  56. imio/smartweb/core/webcomponents/src/components/Search/Search.jsx +4 -4
  57. imio/smartweb/core/webcomponents/src/components/Search/WebResult/WebResult.jsx +13 -4
  58. imio/smartweb/core/webcomponents/src/index.jsx +3 -3
  59. imio/smartweb/core/webcomponents/src/index.scss +11 -65
  60. imio/smartweb/core/webcomponents/src/utils/Map.jsx +18 -9
  61. imio/smartweb/core/webcomponents/src/utils/translation.js +18 -0
  62. imio.smartweb.core-1.2.48-py3.10-nspkg.pth +3 -0
  63. {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.48.dist-info}/METADATA +22 -3
  64. {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.48.dist-info}/RECORD +69 -63
  65. {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.48.dist-info}/WHEEL +1 -1
  66. imio/smartweb/core/webcomponents/build/css/686.smartweb-webcomponents-compiled.css +0 -1
  67. imio/smartweb/core/webcomponents/build/js/686.smartweb-webcomponents-compiled.js +0 -1
  68. imio.smartweb.core-1.2.47-py3.8-nspkg.pth +0 -2
  69. {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.48.dist-info}/LICENSE.GPL +0 -0
  70. {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.48.dist-info}/LICENSE.rst +0 -0
  71. {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.48.dist-info}/namespace_packages.txt +0 -0
  72. {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.48.dist-info}/top_level.txt +0 -0
@@ -1,15 +1,15 @@
1
1
  import React, { useEffect, useState, useContext } from "react";
2
2
  import moment from "moment";
3
- import ReactMarkdown from 'react-markdown';
3
+ import ReactMarkdown from "react-markdown";
4
4
  import { Translate } from "react-translated";
5
- import { LanguageContext } from '../News.jsx';
6
- const NewsCard = ({ item,showCategoriesOrTopics }) => {
5
+ import { LanguageContext } from "../News.jsx";
6
+ const NewsCard = ({ item, showCategoriesOrTopics }) => {
7
7
  const [limitDescription, setLimitDescription] = useState();
8
8
  const [itemTopic, setItemTopic] = useState(null);
9
9
 
10
10
  const numberLimit = 150;
11
11
  const title = item.title && item.title;
12
- const description = item.description && item.description;
12
+ const description = item.description || "";
13
13
 
14
14
  useEffect(() => {
15
15
  if (description.length >= numberLimit) {
@@ -20,16 +20,18 @@ const NewsCard = ({ item,showCategoriesOrTopics }) => {
20
20
  if (item.topics && item.topics.length > 0) {
21
21
  setItemTopic(item.topics[0].title);
22
22
  } else {
23
- setItemTopic(null)
23
+ setItemTopic(null);
24
24
  }
25
25
  }, [item]);
26
- moment.locale(useContext(LanguageContext))
27
- const created = moment(item.created).startOf('minute').fromNow();
28
- const lastModified = moment(item.modified).startOf('minute').fromNow();
26
+ moment.locale(useContext(LanguageContext));
27
+ const created = moment(item.created).startOf("minute").fromNow();
28
+ const lastModified = moment(item.modified).startOf("minute").fromNow();
29
29
  return (
30
30
  <div className="r-list-item">
31
31
  <div
32
- className={item.image_vignette_scale ? "r-item-img" : "r-item-img r-item-img-placeholder"}
32
+ className={
33
+ item.image_vignette_scale ? "r-item-img" : "r-item-img r-item-img-placeholder"
34
+ }
33
35
  style={{
34
36
  backgroundImage: item.image_vignette_scale
35
37
  ? "url(" + item.image_vignette_scale + ")"
@@ -39,9 +41,7 @@ const NewsCard = ({ item,showCategoriesOrTopics }) => {
39
41
  <div className="r-item-text">
40
42
  <span className="r-item-title">{title}</span>
41
43
  {showCategoriesOrTopics === "topic" ? (
42
- itemTopic && (
43
- <span className="r-item-categorie">{item.topics[0].title}</span>
44
- )
44
+ itemTopic && <span className="r-item-categorie">{item.topics[0].title}</span>
45
45
  ) : showCategoriesOrTopics === "category" ? (
46
46
  item.local_category ? (
47
47
  <span className="r-item-categorie">{item.local_category.title}</span>
@@ -50,27 +50,30 @@ const NewsCard = ({ item,showCategoriesOrTopics }) => {
50
50
  <span className="r-item-categorie">{item.category.title}</span>
51
51
  )
52
52
  )
53
- ) : ""}
54
- {description ?
53
+ ) : (
54
+ ""
55
+ )}
56
+ {description ? (
55
57
  <ReactMarkdown className="r-item-description">{limitDescription}</ReactMarkdown>
56
- : ""
57
- }
58
+ ) : (
59
+ ""
60
+ )}
58
61
  <div className="r-item-read-more" style={{ textDecoration: "none" }}>
59
- {
60
- created === lastModified ?
61
- (
62
- <div className="r-card-date-last">
63
- <span><Translate text="Publié" /> </span>
64
- <span>{created}</span>
65
- </div>
66
- ) :
67
- (
68
- <div className="r-card-date-last">
69
- <span><Translate text="Actualisé" /> </span>
70
- <span>{lastModified}</span>
71
- </div>
72
- )
73
- }
62
+ {created === lastModified ? (
63
+ <div className="r-card-date-last">
64
+ <span>
65
+ <Translate text="Publié" />{" "}
66
+ </span>
67
+ <span>{created}</span>
68
+ </div>
69
+ ) : (
70
+ <div className="r-card-date-last">
71
+ <span>
72
+ <Translate text="Actualisé" />{" "}
73
+ </span>
74
+ <span>{lastModified}</span>
75
+ </div>
76
+ )}
74
77
  </div>
75
78
  </div>
76
79
  <div className="r-item-arrow-more"></div>