@eeacms/volto-clms-theme 1.0.44 → 1.0.48

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 (54) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/Jenkinsfile +32 -24
  3. package/package.json +5 -1
  4. package/src/actions/geonetwork/import_geonetwork.js +21 -0
  5. package/src/actions/index.js +14 -0
  6. package/src/actions/userschema/userschema.js +17 -0
  7. package/src/components/Blocks/CclTextLinkCarouselBlock/CclTextLinkCarouselEdit.jsx +38 -0
  8. package/src/components/Blocks/CclTextLinkCarouselBlock/CclTextLinkCarouselView.jsx +41 -0
  9. package/src/components/Blocks/CclTextLinkCarouselBlock/TextLinkCarouselSchema.js +18 -0
  10. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclCarouselView.jsx +32 -11
  11. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclProductTabsView.jsx +1 -1
  12. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclVerticalTabsView.jsx +21 -7
  13. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/TabsWidget.jsx +78 -15
  14. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/custom.less +60 -1
  15. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/subTabSchema.js +19 -0
  16. package/src/components/Blocks/customBlocks.js +19 -0
  17. package/src/components/CLMSDatasetDetailView/BoundingBoxComponent.jsx +20 -0
  18. package/src/components/CLMSDatasetDetailView/CLMSDatasetDetailView.jsx +169 -15
  19. package/src/components/CLMSDatasetDetailView/ContactComponent.jsx +44 -0
  20. package/src/components/CLMSDatasetDetailView/DataSetInfoContent.jsx +14 -6
  21. package/src/components/CLMSDatasetDetailView/DistributionInfoComponent.jsx +20 -0
  22. package/src/components/CLMSDatasetDetailView/MetadataContent.jsx +182 -72
  23. package/src/components/CLMSDownloadCartView/CLMSDownloadCartView.jsx +5 -1
  24. package/src/components/CLMSEventView/CLMSEventView.jsx +15 -13
  25. package/src/components/CLMSNewsItemView/CLMSNewsItemView.jsx +13 -11
  26. package/src/components/CLMSProfileView/CLMSApiTokensView.jsx +55 -33
  27. package/src/components/CLMSProfileView/CLMSProfileView.jsx +28 -15
  28. package/src/components/CLMSProfileView/CLMSUserProfileView.jsx +37 -64
  29. package/src/components/CclCard/CclCard.jsx +8 -5
  30. package/src/components/CclCard/cards.less +1 -1
  31. package/src/components/CclInfoDescription/CclInfoDescription.jsx +9 -8
  32. package/src/components/CclLoginModal/CclLoginModal.jsx +1 -7
  33. package/src/components/CclLoginModal/ccl-login-modal.css +0 -4
  34. package/src/components/CclModal/CclModal.jsx +6 -1
  35. package/src/components/CclTab/CclTab.jsx +8 -11
  36. package/src/components/CclTab/CclTabs.jsx +23 -8
  37. package/src/components/Widgets/ContactWidget.jsx +91 -0
  38. package/src/components/Widgets/DistributionInfoWidget.jsx +40 -0
  39. package/src/components/Widgets/GeonetworkIdentifiersWidget.jsx +48 -0
  40. package/src/components/Widgets/TextLinkWidget.jsx +41 -0
  41. package/src/constants/ActionTypes.js +1 -0
  42. package/src/customizations/volto/components/theme/Header/Header.jsx +30 -21
  43. package/src/index.js +8 -3
  44. package/src/reducers/geonetwork/import_geonetwork_reducer.js +45 -0
  45. package/src/reducers/index.js +7 -3
  46. package/src/reducers/tokens/tokens.js +14 -10
  47. package/src/reducers/userschema/userschema.js +48 -0
  48. package/theme/clms/css/block-form.less +62 -0
  49. package/theme/clms/css/carousel.css +64 -11
  50. package/theme/clms/css/home.css +18 -4
  51. package/theme/clms/css/maps.css +4 -0
  52. package/theme/clms/css/maps.less +4 -0
  53. package/theme/clms/css/menu.css +4 -0
  54. package/theme/clms/css/styles.less +15 -3
@@ -1,104 +1,214 @@
1
- import React from 'react';
2
- import { CclInfoDescription, CclInfoContainer } from '../CclInfoDescription';
1
+ import { CclInfoContainer, CclInfoDescription } from '../CclInfoDescription';
2
+
3
+ import BoundingBoxComponent from './BoundingBoxComponent';
3
4
  import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
5
+ import ContactComponent from './ContactComponent';
6
+ import DistributionInfoComponent from './DistributionInfoComponent';
7
+ import { Label } from 'semantic-ui-react';
8
+ import React from 'react';
4
9
  import { StringToHTML } from '@eeacms/volto-clms-theme/components/CclUtils';
5
10
 
6
11
  const MetadataContent = (data) => {
7
12
  return (
8
13
  <>
9
- <CclButton
10
- className="ccl-button ccl-button--default download-dataset-metadata"
11
- url={data['@id']}
12
- download={true}
13
- >
14
- Download metadata
15
- </CclButton>
14
+ {data?.geonetwork_identifiers?.items.map((item, key) => {
15
+ return (
16
+ <CclButton
17
+ key={key}
18
+ className="ccl-button ccl-button--default download-dataset-metadata"
19
+ url={
20
+ item.type === 'EEA'
21
+ ? 'https://sdi.eea.europa.eu/catalogue/srv/eng/catalog.search#/metadata/' +
22
+ item.id
23
+ : 'https://land.copernicus.vgt.vito.be/geonetwork/srv/eng/catalog.search#/metadata/' +
24
+ item.id
25
+ }
26
+ download={true}
27
+ >
28
+ Download metadata: {item.title}
29
+ </CclButton>
30
+ );
31
+ })}
32
+
16
33
  <CclInfoContainer>
17
34
  <h2>Data identification</h2>
18
- <CclInfoDescription
19
- title="Resource title"
20
- tooltip="Name by which the cited resource is known"
21
- description={data.dataResourceTitle}
22
- />
35
+ {data?.dataResourceTitle && (
36
+ <CclInfoDescription
37
+ title="Resource title"
38
+ tooltip="Name by which the cited resource is known"
39
+ description={data?.dataResourceTitle}
40
+ />
41
+ )}
42
+ {data?.resourceEffective && (
43
+ <CclInfoDescription
44
+ title="Date of publication"
45
+ tooltip=""
46
+ description={new Date(data?.resourceEffective).toLocaleDateString()}
47
+ />
48
+ )}
49
+ {data?.resourceModified && (
50
+ <CclInfoDescription
51
+ title="Revision date"
52
+ tooltip=""
53
+ description={new Date(data?.resourceModified).toLocaleDateString()}
54
+ />
55
+ )}
23
56
  <CclInfoDescription
24
57
  title="Resource abstract"
25
58
  tooltip="Brief narrative summary of the content of the resource(s) with coverage, main attributes, data sources, important of the work, etc."
26
59
  description={
27
- <StringToHTML string={data.dataResourceAbstract?.data || ''} />
60
+ <StringToHTML string={data?.dataResourceAbstract?.data || ''} />
28
61
  }
29
62
  />
30
- </CclInfoContainer>
31
- <CclInfoContainer>
32
- <h2>Classification of spatial data</h2>
33
- </CclInfoContainer>
34
- <CclInfoContainer>
35
- <h2>Geographic reference</h2>
63
+ {data?.keywords && data?.keywords?.length > 0 && (
64
+ <CclInfoDescription
65
+ title="Keywords"
66
+ tooltip=""
67
+ description={data?.keywords.map((keyword) => {
68
+ return <Label color="olive">{keyword}</Label>;
69
+ })}
70
+ />
71
+ )}
72
+ {data?.geographicCoverage && (
73
+ <CclInfoDescription
74
+ title="Geographic coverage"
75
+ tooltip=""
76
+ description={JSON.stringify(data?.geographicCoverage)}
77
+ />
78
+ )}
79
+ {data?.accessAndUseLimitationPublic_line && (
80
+ <CclInfoDescription
81
+ title="Limitation of public access"
82
+ tooltip=""
83
+ description={data?.accessAndUseLimitationPublic_line}
84
+ />
85
+ )}
36
86
  <CclInfoDescription
37
- title="Coordinate Reference System"
38
- tooltip="CRS of the resource"
39
- description={data.coordinateReferenceSystem}
40
- />
41
- </CclInfoContainer>
42
- <CclInfoContainer>
43
- <h2>Temporal reference</h2>
44
- </CclInfoContainer>
45
- <CclInfoContainer>
46
- <h2>Quality and validity</h2>
47
- <CclInfoDescription
48
- title="Lineage"
49
- tooltip="General explanation of the data produce knowledge's about the lineage of a dataset"
50
- description={<StringToHTML string={data.qualityLineage?.data} />}
51
- />
52
- <CclInfoDescription
53
- title="Spatial resolution"
54
- tooltip="A set of zero to many resolution distances (typically for gridded data and imagery-derived products) or equivalent scales (typically for maps or map-derived products)"
87
+ title="Conditions applying to access and use"
88
+ tooltip=""
55
89
  description={
56
- <StringToHTML string={data.qualitySpatialResolution?.data} />
90
+ <StringToHTML string={data?.accessAndUseConstraints?.data || ''} />
57
91
  }
58
92
  />
59
- </CclInfoContainer>
60
- <CclInfoContainer>
61
- <h2>Conformity</h2>
62
93
  <CclInfoDescription
63
- title="Specification"
64
- tooltip="A citation of the implementing rules adopted under Article 7(1) of Directive 2007/2/EC or other specification to which a particular resource conforms"
65
- description={
66
- <StringToHTML string={data.conformitySpecification?.data} />
67
- }
94
+ title="Spatial Resolution"
95
+ tooltip=""
96
+ description={data?.qualitySpatialResolution_line}
68
97
  />
98
+ {data?.classificationTopicCategory && (
99
+ <CclInfoDescription
100
+ title="Topic of Category"
101
+ tooltip=""
102
+ description={
103
+ data?.classificationTopicCategory &&
104
+ data?.classificationTopicCategory.map((topic) => {
105
+ return <Label color="olive">{topic.title}</Label>;
106
+ })
107
+ }
108
+ />
109
+ )}
110
+ {data?.geographicBoundingBox?.items?.length > 0 && (
111
+ <CclInfoDescription
112
+ title="Bounding Boxes"
113
+ tooltip=""
114
+ description={data?.geographicBoundingBox?.items.map((bbox, key) => {
115
+ return <BoundingBoxComponent key={key} bbox={bbox} />;
116
+ })}
117
+ />
118
+ )}
119
+ {data?.temporalCoverage && (
120
+ <CclInfoDescription
121
+ title="Temporal Extent"
122
+ tooltip=""
123
+ description={
124
+ data?.temporalCoverage &&
125
+ data?.temporalCoverage.map((year) => {
126
+ return <Label color="olive">{year}</Label>;
127
+ })
128
+ }
129
+ />
130
+ )}
69
131
  </CclInfoContainer>
132
+ {data?.dataResourceType && (
133
+ <CclInfoContainer>
134
+ <h2>Hierarchy Level</h2>
135
+ <CclInfoDescription
136
+ title="Resource Type"
137
+ tooltip=""
138
+ description={data?.dataResourceType}
139
+ />
140
+ </CclInfoContainer>
141
+ )}
142
+ {data?.responsiblePartyWithRole?.items &&
143
+ data?.responsiblePartyWithRole?.items?.length > 0 && (
144
+ <CclInfoContainer>
145
+ <h2>Contacts</h2>
146
+ <CclInfoDescription
147
+ title="Responsible Party with Role"
148
+ tooltip=""
149
+ description={data?.responsiblePartyWithRole?.items.map(
150
+ (item, key) => {
151
+ return <ContactComponent key={key} contact={item} />;
152
+ },
153
+ )}
154
+ />
155
+ </CclInfoContainer>
156
+ )}
157
+ {data?.coordinateReferenceSystemList &&
158
+ data?.coordinateReferenceSystemList.length > 0 && (
159
+ <CclInfoContainer>
160
+ <h2>Reference system info</h2>
161
+ <CclInfoDescription
162
+ title="Coordinate Reference System"
163
+ tooltip="CRS of the resource"
164
+ description={
165
+ data?.coordinateReferenceSystemList &&
166
+ data?.coordinateReferenceSystemList.map((reference) => {
167
+ return <Label color="olive">{reference}</Label>;
168
+ })
169
+ }
170
+ />
171
+ </CclInfoContainer>
172
+ )}
70
173
  <CclInfoContainer>
71
- <h2>Constraints related to access and use</h2>
72
- <CclInfoDescription
73
- title="Conditions applying to access and use"
74
- tooltip="Restriction on the access and use of a resource or metadata"
75
- description={
76
- <StringToHTML string={data.accessAndUseConstraints?.data} />
77
- }
78
- />
174
+ <h2>Data quality info</h2>
79
175
  <CclInfoDescription
80
- title="Limitation of public access"
81
- tooltip="Limitation and other reason for public access"
176
+ title="Specification"
177
+ tooltip="A citation of the implementing rules adopted under Article 7(1) of Directive 2007/2/EC or other specification to which a particular resource conforms"
82
178
  description={
83
- <StringToHTML string={data.accessAndUseLimitationPublic?.data} />
179
+ <StringToHTML string={data?.conformitySpecification?.data} />
84
180
  }
85
181
  />
86
- </CclInfoContainer>
87
- <CclInfoContainer>
88
- <h2>Responsible organisation</h2>
89
- <CclInfoDescription
90
- title="Responsible party"
91
- tooltip="Organisation associated with the resource. Organisation name, contact information (email)."
92
- description={<StringToHTML string={data.owners?.data} />}
93
- />
182
+ {data?.conformityPass && (
183
+ <CclInfoDescription
184
+ title="Pass"
185
+ tooltip=""
186
+ description={data?.conformityPass}
187
+ />
188
+ )}
94
189
  <CclInfoDescription
95
- title="Responsible party role"
96
- tooltip="Function performed by the party"
97
- description={
98
- <StringToHTML string={data.responsiblePartyRole?.data} />
99
- }
190
+ title="Lineage"
191
+ tooltip="General explanation of the data produce knowledge's about the lineage of a dataset"
192
+ description={<StringToHTML string={data?.qualityLineage?.data} />}
100
193
  />
101
194
  </CclInfoContainer>
195
+ {data?.distributionInfo?.items &&
196
+ data?.distributionInfo?.items?.length > 0 && (
197
+ <CclInfoContainer>
198
+ <h2>Distribution info</h2>
199
+ <CclInfoDescription
200
+ title="Resource Locator and Services"
201
+ tooltip=""
202
+ description={data?.distributionInfo?.items.map(
203
+ (resource, key) => {
204
+ return (
205
+ <DistributionInfoComponent key={key} resource={resource} />
206
+ );
207
+ },
208
+ )}
209
+ />
210
+ </CclInfoContainer>
211
+ )}
102
212
  </>
103
213
  );
104
214
  };
@@ -275,7 +275,11 @@ const CLMSDownloadCartView = (props) => {
275
275
  <tr>
276
276
  <td
277
277
  colSpan={11}
278
- style={{ textAlign: 'center', fontSize: '1.5em' }}
278
+ style={{
279
+ textAlign: 'center',
280
+ color: '#adb0b8',
281
+ opacity: 0.5,
282
+ }}
279
283
  >
280
284
  Empty cart
281
285
  </td>
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
1
  import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
3
- import { StringToHTML } from '@eeacms/volto-clms-theme/components/CclUtils';
4
2
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
+ import React from 'react';
4
+ import { StringToHTML } from '@eeacms/volto-clms-theme/components/CclUtils';
5
5
 
6
6
  export const CLMSEventView = (props) => {
7
7
  const { content } = props;
@@ -12,17 +12,19 @@ export const CLMSEventView = (props) => {
12
12
  <div className="event-detail-date">
13
13
  {new Date(content?.effective).toLocaleDateString()}
14
14
  </div>
15
- <figure className="news-detail-image">
16
- <img
17
- src={
18
- content?.image
19
- ? content?.image?.download
20
- : 'https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg'
21
- }
22
- alt={content?.image ? content?.image?.filename : 'Placeholder'}
23
- />
24
- <figcaption>{content?.image_caption}</figcaption>
25
- </figure>
15
+ {content?.image && (
16
+ <figure className="news-detail-image">
17
+ <img
18
+ src={
19
+ content?.image
20
+ ? content?.image?.download
21
+ : 'https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg'
22
+ }
23
+ alt={content?.image ? content?.image?.filename : 'Placeholder'}
24
+ />
25
+ <figcaption>{content?.image_caption}</figcaption>
26
+ </figure>
27
+ )}
26
28
  <div className="event-detail-when">
27
29
  <FontAwesomeIcon icon={['far', 'calendar-alt']} />
28
30
  <div className="event-detail-when-text">
@@ -10,17 +10,19 @@ const CLMSNewsItemView = (props) => {
10
10
  <div className="news-detail-date">
11
11
  {new Date(content?.effective).toLocaleDateString()}
12
12
  </div>
13
- <figure className="news-detail-image">
14
- <img
15
- src={
16
- content?.image
17
- ? content?.image?.download
18
- : 'https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg'
19
- }
20
- alt={content?.image ? content?.image?.filename : 'Placeholder'}
21
- />
22
- <figcaption>{content?.image_caption}</figcaption>
23
- </figure>
13
+ {content?.image && (
14
+ <figure className="news-detail-image">
15
+ <img
16
+ src={
17
+ content?.image
18
+ ? content?.image?.download
19
+ : 'https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg'
20
+ }
21
+ alt={content?.image ? content?.image?.filename : 'Placeholder'}
22
+ />
23
+ <figcaption>{content?.image_caption}</figcaption>
24
+ </figure>
25
+ )}
24
26
  <div className="news-detail-content">
25
27
  <StringToHTML string={content.text?.data || ''} />
26
28
  </div>
@@ -67,7 +67,7 @@ const messages = defineMessages({
67
67
  },
68
68
  createdToken: {
69
69
  id: 'Created token name',
70
- defaultMessage: 'Token',
70
+ defaultMessage: 'The token has been created successfuly',
71
71
  },
72
72
  copyButton: {
73
73
  id: 'Copy created token button',
@@ -144,11 +144,12 @@ class CLMSApiTokensView extends Component {
144
144
  ip_range: PropTypes.string,
145
145
  issued: PropTypes.string,
146
146
  key_id: PropTypes.string,
147
- last_used: PropTypes.string,
148
- title: PropTypes.string,
147
+ public_key: PropTypes.string,
148
+ private_key: PropTypes.string,
149
149
  }),
150
150
  ),
151
151
  };
152
+
152
153
  constructor(props) {
153
154
  super(props);
154
155
  this.handleChange = this.handleChange.bind(this);
@@ -184,12 +185,9 @@ class CLMSApiTokensView extends Component {
184
185
  onClose() {
185
186
  this.componentDidMount();
186
187
  this.setState({
187
- value: '',
188
- createdToken: false,
189
- modal: false,
190
- tokenTitle: '',
191
- textToCopy: '',
192
188
  createNewToken: false,
189
+ public_key: undefined,
190
+ private_key: undefined,
193
191
  });
194
192
  }
195
193
 
@@ -203,10 +201,10 @@ class CLMSApiTokensView extends Component {
203
201
 
204
202
  handleClick() {
205
203
  this.setState({
206
- createdToken: true,
207
204
  modal: false,
208
- button: false,
209
205
  createNewToken: true,
206
+ public_key: undefined,
207
+ private_key: undefined,
210
208
  });
211
209
  }
212
210
 
@@ -225,14 +223,14 @@ class CLMSApiTokensView extends Component {
225
223
  this.props.getUser(this.props.userId);
226
224
  this.props.getTokens();
227
225
  this.setState({
228
- value: '',
229
- tokenTitle: '',
226
+ value: undefined,
227
+ tokenTitle: undefined,
230
228
  button: false,
231
- createNewToken: true,
229
+ // createNewToken: true,
232
230
  modal: false,
233
231
  createdToken: false,
234
- textToCopy: '',
235
- key_id: '',
232
+ textToCopy: undefined,
233
+ key_id: undefined,
236
234
  });
237
235
  }
238
236
 
@@ -263,21 +261,36 @@ class CLMSApiTokensView extends Component {
263
261
  {this.props.intl.formatMessage(messages.ApiTokens)}
264
262
  </h1>
265
263
  <div>
266
- <h3>{this.props.intl.formatMessage(messages.title)}</h3>
264
+ <h2>{this.props.intl.formatMessage(messages.title)}</h2>
267
265
  <p>{this.props.intl.formatMessage(messages.description)}</p>
268
266
  {this.props.createdTokens?.map((item) => (
269
267
  <>
270
268
  <div>
271
269
  <p>{item.title}</p>
272
270
  <p>{item.key_id}</p>
273
- <CclButton
274
- mode={'filled'}
275
- onClick={() => {
276
- this.deleteToken(item.key_id);
277
- }}
271
+ <CclModal
272
+ onClick={() => this.onClose}
273
+ trigger={
274
+ <CclButton mode={'filled'}>
275
+ {this.props.intl.formatMessage(messages.deleteButton)}
276
+ </CclButton>
277
+ }
278
+ size="small"
278
279
  >
279
- {this.props.intl.formatMessage(messages.deleteButton)}
280
- </CclButton>
280
+ <h4>This token will be deleted forever</h4>
281
+ <p>
282
+ You will not be able to use this token again. Only
283
+ delete your tokens when you are absolutely sure of it
284
+ </p>
285
+ <CclButton
286
+ mode={'filled'}
287
+ onClick={() => {
288
+ this.deleteToken(item.key_id);
289
+ }}
290
+ >
291
+ {'I confirm that I want to delete this token'}
292
+ </CclButton>
293
+ </CclModal>
281
294
  </div>
282
295
  </>
283
296
  ))}
@@ -351,31 +364,40 @@ class CLMSApiTokensView extends Component {
351
364
  <>
352
365
  {(this.state.createdToken === true && (
353
366
  <div>
354
- <p>
367
+ <h3>
355
368
  {this.props.intl.formatMessage(
356
369
  messages.createdToken,
357
370
  )}
358
- </p>
371
+ </h3>
359
372
  <form className="ccl-form search-form">
360
373
  {this.props.newTokens?.map((item) => (
361
374
  <>
362
- {(item.public_key !== undefined && (
375
+ {(item?.private_key && (
363
376
  <>
364
- <input
365
- value={item.public_key}
377
+ <p>{'Download your service key.'}</p>
378
+ <p>
379
+ {
380
+ "This is the only time your private key will be displayed - it will not be stored on the server, and can't be recovered should you fail to save it."
381
+ }
382
+ </p>
383
+ <p>
384
+ {
385
+ 'You should copy & paste this key into a .json file, and store this file in a location accessible only to your service application. This key grants anyone in possession of it full access to this account. You should therefore make sure to protect it with the least file system permissions possible.'
386
+ }
387
+ </p>
388
+
389
+ <textarea
366
390
  disabled="disabled"
367
- type="text"
368
- className="ccl-text-input"
369
391
  id="created_token"
370
392
  name="createdToken"
371
- placeholder=""
372
- aria-label="Created token"
393
+ class="ccl-text-input"
394
+ value={JSON.stringify(item)}
373
395
  />
374
396
  <CclButton
375
397
  mode={'filled'}
376
398
  onClick={() => {
377
399
  navigator.clipboard.writeText(
378
- item.public_key,
400
+ JSON.stringify(item),
379
401
  );
380
402
  }}
381
403
  >
@@ -3,18 +3,20 @@
3
3
  * @module components/CLMSProfileView/CLMSProfileView
4
4
  */
5
5
 
6
+ import {
7
+ CLMSApiTokensView,
8
+ CLMSUserProfileView,
9
+ } from '@eeacms/volto-clms-theme/components/CLMSProfileView';
6
10
  import React, { Component } from 'react';
11
+ import { getUser, updateUser } from '@plone/volto/actions';
12
+
13
+ import CclTabs from '@eeacms/volto-clms-theme/components/CclTab/CclTabs';
7
14
  import PropTypes from 'prop-types';
8
- import { connect } from 'react-redux';
9
15
  import { compose } from 'redux';
10
- import jwtDecode from 'jwt-decode';
11
- import { getUser, updateUser } from '@plone/volto/actions';
16
+ import { connect } from 'react-redux';
12
17
  import { getBaseUrl } from '@plone/volto/helpers';
13
- import CclTabs from '@eeacms/volto-clms-theme/components/CclTab/CclTabs';
14
- import {
15
- CLMSUserProfileView,
16
- CLMSApiTokensView,
17
- } from '@eeacms/volto-clms-theme/components/CLMSProfileView';
18
+ import { getExtraBreadcrumbItems } from '../../actions';
19
+ import jwtDecode from 'jwt-decode';
18
20
 
19
21
  /**
20
22
  * CLMSProfileView class.
@@ -32,13 +34,18 @@ class CLMSProfileView extends Component {
32
34
  children: PropTypes.instanceOf(Array),
33
35
  user: PropTypes.shape({
34
36
  '@id': PropTypes.string,
35
- description: PropTypes.string,
37
+ are_you_registering_on_behalf_on_an_organisation_: PropTypes.bool,
38
+ country: PropTypes.string,
36
39
  email: PropTypes.string,
37
40
  fullname: PropTypes.string,
41
+ how_do_you_intend_to_use_the_products: PropTypes.arrayOf(
42
+ PropTypes.string,
43
+ ),
38
44
  id: PropTypes.string,
39
- location: PropTypes.string,
40
- nickname: PropTypes.string,
41
- portrait: PropTypes.string,
45
+ organisation_institutional_domain: PropTypes.arrayOf(PropTypes.string),
46
+ organisation_name: PropTypes.string,
47
+ organisation_url: PropTypes.string,
48
+ professional_thematic_domain: PropTypes.arrayOf(PropTypes.string),
42
49
  roles: PropTypes.array,
43
50
  username: PropTypes.string,
44
51
  return_url: PropTypes.string,
@@ -56,8 +63,14 @@ class CLMSProfileView extends Component {
56
63
  */
57
64
  render() {
58
65
  const loggedIn = !!this.props.userId;
66
+ this.props.getExtraBreadcrumbItems([
67
+ {
68
+ title: 'Profile',
69
+ pathname: this.props.location.pathname,
70
+ },
71
+ ]);
59
72
  return (
60
- <>
73
+ <div className="ccl-container ">
61
74
  {loggedIn && (
62
75
  <>
63
76
  <CclTabs>
@@ -70,7 +83,7 @@ class CLMSProfileView extends Component {
70
83
  </CclTabs>
71
84
  </>
72
85
  )}
73
- </>
86
+ </div>
74
87
  );
75
88
  }
76
89
  }
@@ -83,6 +96,6 @@ export default compose(
83
96
  ? jwtDecode(state.userSession.token).sub
84
97
  : '',
85
98
  }),
86
- { getUser, updateUser, getBaseUrl },
99
+ { getUser, updateUser, getBaseUrl, getExtraBreadcrumbItems },
87
100
  ),
88
101
  )(CLMSProfileView);