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
@@ -1,21 +1,25 @@
1
1
  .breadcrumb {
2
2
  padding: 0;
3
3
  }
4
+
4
5
  .r-result-list {
5
6
  margin-top: 50px;
6
7
  padding-left: 0;
7
8
  list-style: none;
8
9
  }
10
+
9
11
  #portal-column-content {
10
12
  h1 {
11
13
  font-size: 0px;
12
14
  position: absolute;
13
15
  }
14
16
  }
17
+
15
18
  #viewlet-below-content-title,
16
19
  #viewlet-below-content-description {
17
20
  display: none;
18
21
  }
22
+
19
23
  /* image */
20
24
  /* text */
21
25
  .r-item-text {
@@ -24,31 +28,29 @@
24
28
  display: flex;
25
29
  flex-direction: column;
26
30
  }
31
+
27
32
  .r-item-title {
28
33
  display: block;
29
34
  }
30
35
 
31
- .r-results-numbers {
32
- width: 100%;
33
- margin-bottom: 0.5rem;
34
- span {
35
- font-weight: bold;
36
- }
37
- }
36
+
38
37
  // content
39
38
 
40
39
  .r-content-img {
41
40
  padding-bottom: 60%;
42
41
  }
42
+
43
43
  .new-content {
44
44
  max-width: 700px;
45
45
  margin: 0 auto;
46
46
  }
47
+
47
48
  //// for bla ////
48
49
  /* list item */
49
50
  .r-load-more {
50
51
  text-align: center;
51
52
  margin-bottom: 2rem;
53
+
52
54
  button {
53
55
  background: #000;
54
56
  border: solid 1px transparent;
@@ -61,13 +63,16 @@
61
63
  font-size: 14px;
62
64
  margin: 0 auto;
63
65
  display: block;
66
+
64
67
  &:hover {
65
68
  background: rgba(0, 0, 0, 0.871);
66
69
  }
67
70
  }
68
71
  }
72
+
69
73
  .r-actu-wrapper {
70
74
  position: relative;
75
+
71
76
  &:after {
72
77
  width: 495px;
73
78
  display: block;
@@ -78,6 +83,7 @@
78
83
  right: 0;
79
84
  transform: translateY(-20%);
80
85
  }
86
+
81
87
  .r-list-item-group {
82
88
  max-width: 900px;
83
89
  margin: 30px auto;
@@ -86,20 +92,24 @@
86
92
  border: 1px solid #D1D1D1;
87
93
  }
88
94
  }
95
+
89
96
  /* text */
90
97
  .r-item-title {
91
98
  font-size: 18px;
92
99
  font-weight: bold;
93
100
  }
101
+
94
102
  .r-item-description {
95
103
  font-size: 16px;
96
104
  color: #444444;
97
105
  margin-top: 10px;
98
106
  }
107
+
99
108
  /* image */
100
109
  .r-item-img {
101
110
  border-radius: 15px 15px 15px 0px;
102
111
  }
112
+
103
113
  .r-actu-wrapper {
104
114
  .r-item-img {
105
115
  width: 100%;
@@ -107,15 +117,18 @@
107
117
  background-position: top;
108
118
  background-size: cover;
109
119
  background-repeat: no-repeat;
120
+
110
121
  @media screen and (min-width:775px) {
111
122
  width: 323px;
112
123
  }
113
124
  }
114
125
  }
126
+
115
127
  /* arrow more */
116
128
  .r-item-read-more {
117
129
  margin-top: auto;
118
130
  }
131
+
119
132
  .r-item-arrow-more {
120
133
  width: 50px;
121
134
  height: 50px;
@@ -130,6 +143,7 @@
130
143
  background-size: 20px;
131
144
  background-position: center;
132
145
  }
146
+
133
147
  .r-list-item-group {
134
148
  &:hover {
135
149
  .r-item-arrow-more {
@@ -142,10 +156,11 @@
142
156
  }
143
157
 
144
158
  .r-list-item {
145
- @media screen and (max-width:600px) {
159
+ @media screen and (max-width:774px) {
146
160
  flex-direction: column;
147
161
  }
148
162
  }
163
+
149
164
  .r-item-read-more {
150
165
  @media screen and (max-width:600px) {
151
166
  position: relative;
@@ -156,6 +171,7 @@
156
171
  display: inline-flex;
157
172
  align-self: center;
158
173
  margin-right: 0.4rem;
174
+
159
175
  svg {
160
176
  top: .125em;
161
177
  position: relative;
@@ -163,6 +179,7 @@
163
179
  width: 1em;
164
180
  }
165
181
  }
182
+
166
183
  .dpinlb {
167
184
  display: inline-block;
168
185
  vertical-align: top;
@@ -173,12 +190,15 @@
173
190
  width: 30px;
174
191
  height: 30px;
175
192
  }
193
+
176
194
  ul {
177
195
  display: flex;
178
196
  align-items: center;
179
197
  margin: 0;
198
+
180
199
  li {
181
200
  list-style: none;
201
+
182
202
  a {
183
203
  &:hover {
184
204
  opacity: .7;
@@ -194,4 +214,4 @@
194
214
  color: #747474;
195
215
  font-weight: 400;
196
216
  font-size: 13px;
197
- }
217
+ }
@@ -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>