@eeacms/volto-clms-theme 1.0.45 → 1.0.49
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.
- package/CHANGELOG.md +53 -0
- package/Jenkinsfile +15 -5
- package/README.md +86 -0
- package/package.json +7 -1
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclVerticalTabsView.jsx +21 -7
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/TabsWidget.jsx +78 -15
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/custom.less +5 -0
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/subTabSchema.js +19 -0
- package/src/components/CLMSDatasetDetailView/BoundingBoxComponent.jsx +20 -0
- package/src/components/CLMSDatasetDetailView/CLMSDatasetDetailView.jsx +16 -22
- package/src/components/CLMSDatasetDetailView/ContactComponent.jsx +44 -0
- package/src/components/CLMSDatasetDetailView/DistributionInfoComponent.jsx +20 -0
- package/src/components/CLMSDatasetDetailView/MetadataContent.jsx +209 -80
- package/src/components/CLMSEventView/CLMSEventView.jsx +15 -13
- package/src/components/CLMSNewsItemView/CLMSNewsItemView.jsx +13 -11
- package/src/components/CclCard/CclCard.jsx +8 -5
- package/src/components/CclInfoDescription/CclInfoDescription.jsx +9 -8
- package/src/components/CclLoginModal/CclLoginModal.jsx +0 -6
- package/src/components/CclTab/CclTab.jsx +8 -11
- package/src/components/CclTab/CclTabs.jsx +23 -8
- package/theme/clms/css/block-form.less +62 -0
- package/theme/clms/css/menu.css +4 -0
- package/theme/clms/css/styles.less +9 -2
|
@@ -1,29 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
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
|
-
{data
|
|
10
|
-
return
|
|
11
|
-
<CclButton
|
|
12
|
-
className="ccl-button ccl-button--default download-dataset-metadata"
|
|
13
|
-
url={
|
|
14
|
-
'https://sdi.eea.europa.eu/catalogue/srv/eng/catalog.search#/metadata/' +
|
|
15
|
-
item.id
|
|
16
|
-
}
|
|
17
|
-
download={true}
|
|
18
|
-
>
|
|
19
|
-
Download metadata: {item.title}
|
|
20
|
-
</CclButton>
|
|
21
|
-
) : (
|
|
14
|
+
{data?.geonetwork_identifiers?.items.map((item, key) => {
|
|
15
|
+
return (
|
|
22
16
|
<CclButton
|
|
17
|
+
key={key}
|
|
23
18
|
className="ccl-button ccl-button--default download-dataset-metadata"
|
|
24
19
|
url={
|
|
25
|
-
|
|
26
|
-
|
|
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
|
|
27
25
|
}
|
|
28
26
|
download={true}
|
|
29
27
|
>
|
|
@@ -34,90 +32,221 @@ const MetadataContent = (data) => {
|
|
|
34
32
|
|
|
35
33
|
<CclInfoContainer>
|
|
36
34
|
<h2>Data identification</h2>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
+
)}
|
|
42
56
|
<CclInfoDescription
|
|
43
57
|
title="Resource abstract"
|
|
44
58
|
tooltip="Brief narrative summary of the content of the resource(s) with coverage, main attributes, data sources, important of the work, etc."
|
|
45
59
|
description={
|
|
46
|
-
<StringToHTML string={data
|
|
60
|
+
<StringToHTML string={data?.dataResourceAbstract?.data || ''} />
|
|
47
61
|
}
|
|
48
62
|
/>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
{data?.keywords && data?.keywords?.length > 0 && (
|
|
64
|
+
<CclInfoDescription
|
|
65
|
+
title="Keywords"
|
|
66
|
+
tooltip=""
|
|
67
|
+
description={
|
|
68
|
+
<Label.Group>
|
|
69
|
+
{data?.keywords.map((keyword, key) => {
|
|
70
|
+
return (
|
|
71
|
+
<Label key={key} color="olive">
|
|
72
|
+
{keyword}
|
|
73
|
+
</Label>
|
|
74
|
+
);
|
|
75
|
+
})}
|
|
76
|
+
</Label.Group>
|
|
77
|
+
}
|
|
78
|
+
/>
|
|
79
|
+
)}
|
|
80
|
+
{data?.geographicCoverage?.geolocation && (
|
|
81
|
+
<CclInfoDescription
|
|
82
|
+
title="Geographic coverage"
|
|
83
|
+
tooltip=""
|
|
84
|
+
description={
|
|
85
|
+
<Label.Group>
|
|
86
|
+
{data?.geographicCoverage?.geolocation.map((location, key) => {
|
|
87
|
+
return (
|
|
88
|
+
<Label key={key} color="olive">
|
|
89
|
+
{location.label}
|
|
90
|
+
</Label>
|
|
91
|
+
);
|
|
92
|
+
})}
|
|
93
|
+
</Label.Group>
|
|
94
|
+
}
|
|
95
|
+
/>
|
|
96
|
+
)}
|
|
97
|
+
{data?.accessAndUseLimitationPublic_line && (
|
|
98
|
+
<CclInfoDescription
|
|
99
|
+
title="Limitation of public access"
|
|
100
|
+
tooltip=""
|
|
101
|
+
description={data?.accessAndUseLimitationPublic_line}
|
|
102
|
+
/>
|
|
103
|
+
)}
|
|
71
104
|
<CclInfoDescription
|
|
72
|
-
title="
|
|
73
|
-
tooltip="
|
|
105
|
+
title="Conditions applying to access and use"
|
|
106
|
+
tooltip=""
|
|
74
107
|
description={
|
|
75
|
-
<StringToHTML string={data
|
|
108
|
+
<StringToHTML string={data?.accessAndUseConstraints?.data || ''} />
|
|
76
109
|
}
|
|
77
110
|
/>
|
|
78
|
-
</CclInfoContainer>
|
|
79
|
-
<CclInfoContainer>
|
|
80
|
-
<h2>Conformity</h2>
|
|
81
111
|
<CclInfoDescription
|
|
82
|
-
title="
|
|
83
|
-
tooltip="
|
|
84
|
-
description={
|
|
85
|
-
<StringToHTML string={data.conformitySpecification?.data} />
|
|
86
|
-
}
|
|
112
|
+
title="Spatial Resolution"
|
|
113
|
+
tooltip=""
|
|
114
|
+
description={data?.qualitySpatialResolution_line}
|
|
87
115
|
/>
|
|
116
|
+
{data?.classificationTopicCategory && (
|
|
117
|
+
<CclInfoDescription
|
|
118
|
+
title="Topic of Category"
|
|
119
|
+
tooltip=""
|
|
120
|
+
description={
|
|
121
|
+
<Label.Group>
|
|
122
|
+
{data?.classificationTopicCategory &&
|
|
123
|
+
data?.classificationTopicCategory.map((topic, key) => {
|
|
124
|
+
return (
|
|
125
|
+
<Label key={key} color="olive">
|
|
126
|
+
{topic.title}
|
|
127
|
+
</Label>
|
|
128
|
+
);
|
|
129
|
+
})}
|
|
130
|
+
</Label.Group>
|
|
131
|
+
}
|
|
132
|
+
/>
|
|
133
|
+
)}
|
|
134
|
+
{data?.geographicBoundingBox?.items?.length > 0 && (
|
|
135
|
+
<CclInfoDescription
|
|
136
|
+
title="Bounding Boxes"
|
|
137
|
+
tooltip=""
|
|
138
|
+
description={data?.geographicBoundingBox?.items.map((bbox, key) => {
|
|
139
|
+
return <BoundingBoxComponent key={key} bbox={bbox} />;
|
|
140
|
+
})}
|
|
141
|
+
/>
|
|
142
|
+
)}
|
|
143
|
+
{data?.temporalCoverage && (
|
|
144
|
+
<CclInfoDescription
|
|
145
|
+
title="Temporal Extent"
|
|
146
|
+
tooltip=""
|
|
147
|
+
description={
|
|
148
|
+
<Label.Group>
|
|
149
|
+
{data?.temporalCoverage &&
|
|
150
|
+
data?.temporalCoverage.map((year, key) => {
|
|
151
|
+
return (
|
|
152
|
+
<Label key={key} color="olive">
|
|
153
|
+
{year}
|
|
154
|
+
</Label>
|
|
155
|
+
);
|
|
156
|
+
})}
|
|
157
|
+
</Label.Group>
|
|
158
|
+
}
|
|
159
|
+
/>
|
|
160
|
+
)}
|
|
88
161
|
</CclInfoContainer>
|
|
162
|
+
{data?.dataResourceType && (
|
|
163
|
+
<CclInfoContainer>
|
|
164
|
+
<h2>Hierarchy Level</h2>
|
|
165
|
+
<CclInfoDescription
|
|
166
|
+
title="Resource Type"
|
|
167
|
+
tooltip=""
|
|
168
|
+
description={data?.dataResourceType}
|
|
169
|
+
/>
|
|
170
|
+
</CclInfoContainer>
|
|
171
|
+
)}
|
|
172
|
+
{data?.responsiblePartyWithRole?.items &&
|
|
173
|
+
data?.responsiblePartyWithRole?.items?.length > 0 && (
|
|
174
|
+
<CclInfoContainer>
|
|
175
|
+
<h2>Contacts</h2>
|
|
176
|
+
<CclInfoDescription
|
|
177
|
+
title="Responsible Party with Role"
|
|
178
|
+
tooltip=""
|
|
179
|
+
description={data?.responsiblePartyWithRole?.items.map(
|
|
180
|
+
(item, key) => {
|
|
181
|
+
return <ContactComponent key={key} contact={item} />;
|
|
182
|
+
},
|
|
183
|
+
)}
|
|
184
|
+
/>
|
|
185
|
+
</CclInfoContainer>
|
|
186
|
+
)}
|
|
187
|
+
{data?.coordinateReferenceSystemList &&
|
|
188
|
+
data?.coordinateReferenceSystemList.length > 0 && (
|
|
189
|
+
<CclInfoContainer>
|
|
190
|
+
<h2>Reference system info</h2>
|
|
191
|
+
<CclInfoDescription
|
|
192
|
+
title="Coordinate Reference System"
|
|
193
|
+
tooltip="CRS of the resource"
|
|
194
|
+
description={
|
|
195
|
+
<Label.Group>
|
|
196
|
+
{data?.coordinateReferenceSystemList &&
|
|
197
|
+
data?.coordinateReferenceSystemList.map(
|
|
198
|
+
(reference, key) => {
|
|
199
|
+
return (
|
|
200
|
+
<Label key={key} color="olive">
|
|
201
|
+
{reference}
|
|
202
|
+
</Label>
|
|
203
|
+
);
|
|
204
|
+
},
|
|
205
|
+
)}
|
|
206
|
+
</Label.Group>
|
|
207
|
+
}
|
|
208
|
+
/>
|
|
209
|
+
</CclInfoContainer>
|
|
210
|
+
)}
|
|
89
211
|
<CclInfoContainer>
|
|
90
|
-
<h2>
|
|
91
|
-
<CclInfoDescription
|
|
92
|
-
title="Conditions applying to access and use"
|
|
93
|
-
tooltip="Restriction on the access and use of a resource or metadata"
|
|
94
|
-
description={
|
|
95
|
-
<StringToHTML string={data.accessAndUseConstraints?.data} />
|
|
96
|
-
}
|
|
97
|
-
/>
|
|
212
|
+
<h2>Data quality info</h2>
|
|
98
213
|
<CclInfoDescription
|
|
99
|
-
title="
|
|
100
|
-
tooltip="
|
|
214
|
+
title="Specification"
|
|
215
|
+
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"
|
|
101
216
|
description={
|
|
102
|
-
<StringToHTML string={data
|
|
217
|
+
<StringToHTML string={data?.conformitySpecification?.data} />
|
|
103
218
|
}
|
|
104
219
|
/>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
220
|
+
{data?.conformityPass?.title && (
|
|
221
|
+
<CclInfoDescription
|
|
222
|
+
title="Pass"
|
|
223
|
+
tooltip=""
|
|
224
|
+
description={data?.conformityPass?.title}
|
|
225
|
+
/>
|
|
226
|
+
)}
|
|
108
227
|
<CclInfoDescription
|
|
109
|
-
title="
|
|
110
|
-
tooltip="
|
|
111
|
-
description={<StringToHTML string={data
|
|
112
|
-
/>
|
|
113
|
-
<CclInfoDescription
|
|
114
|
-
title="Responsible party role"
|
|
115
|
-
tooltip="Function performed by the party"
|
|
116
|
-
description={
|
|
117
|
-
<StringToHTML string={data.responsiblePartyRole?.data} />
|
|
118
|
-
}
|
|
228
|
+
title="Lineage"
|
|
229
|
+
tooltip="General explanation of the data produce knowledge's about the lineage of a dataset"
|
|
230
|
+
description={<StringToHTML string={data?.qualityLineage?.data} />}
|
|
119
231
|
/>
|
|
120
232
|
</CclInfoContainer>
|
|
233
|
+
{data?.distributionInfo?.items &&
|
|
234
|
+
data?.distributionInfo?.items?.length > 0 && (
|
|
235
|
+
<CclInfoContainer>
|
|
236
|
+
<h2>Distribution info</h2>
|
|
237
|
+
<CclInfoDescription
|
|
238
|
+
title="Resource Locator and Services"
|
|
239
|
+
tooltip=""
|
|
240
|
+
description={data?.distributionInfo?.items.map(
|
|
241
|
+
(resource, key) => {
|
|
242
|
+
return (
|
|
243
|
+
<DistributionInfoComponent key={key} resource={resource} />
|
|
244
|
+
);
|
|
245
|
+
},
|
|
246
|
+
)}
|
|
247
|
+
/>
|
|
248
|
+
</CclInfoContainer>
|
|
249
|
+
)}
|
|
121
250
|
</>
|
|
122
251
|
);
|
|
123
252
|
};
|
|
@@ -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
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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>
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Link } from 'react-router-dom';
|
|
3
1
|
import './cards.less';
|
|
4
|
-
|
|
5
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
2
|
+
|
|
6
3
|
import * as mime from 'react-native-mime-types';
|
|
7
4
|
|
|
5
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
6
|
+
import { Link } from 'react-router-dom';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
|
|
8
10
|
function bytesToSize(bytes) {
|
|
9
11
|
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
|
|
10
12
|
if (bytes === 0) return '0 Byte';
|
|
@@ -26,7 +28,7 @@ function CclCard(props) {
|
|
|
26
28
|
{type === 'doc' && (
|
|
27
29
|
<>
|
|
28
30
|
<div className="card-doc-title">
|
|
29
|
-
<a href={card?.file?.download ||
|
|
31
|
+
<a href={card?.file?.download || url}>
|
|
30
32
|
{card?.title || 'Card default title'}
|
|
31
33
|
</a>
|
|
32
34
|
</div>
|
|
@@ -47,6 +49,7 @@ function CclCard(props) {
|
|
|
47
49
|
<div className="card-block-image">
|
|
48
50
|
<img
|
|
49
51
|
src={
|
|
52
|
+
card?.image?.scales?.preview?.download ||
|
|
50
53
|
card?.image?.download ||
|
|
51
54
|
'https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg'
|
|
52
55
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
1
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import { faInfoCircle } from '@fortawesome/free-solid-svg-icons';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -16,14 +16,16 @@ import { faInfoCircle } from '@fortawesome/free-solid-svg-icons';
|
|
|
16
16
|
</CclInfoDescription>
|
|
17
17
|
*
|
|
18
18
|
*/
|
|
19
|
-
function CclInfoDescription({ title, description, tooltip
|
|
19
|
+
function CclInfoDescription({ title, description, tooltip }) {
|
|
20
20
|
return (
|
|
21
21
|
<div className="dataset-info-field">
|
|
22
22
|
<div className="dataset-field-title">
|
|
23
23
|
<h3>{title}</h3>
|
|
24
|
-
|
|
25
|
-
<
|
|
26
|
-
|
|
24
|
+
{tooltip && (
|
|
25
|
+
<span className="info-icon" tooltip={tooltip} direction="up">
|
|
26
|
+
<FontAwesomeIcon icon={faInfoCircle} />
|
|
27
|
+
</span>
|
|
28
|
+
)}
|
|
27
29
|
</div>
|
|
28
30
|
<div className="dataset-field-description">{description}</div>
|
|
29
31
|
</div>
|
|
@@ -32,7 +34,6 @@ function CclInfoDescription({ title, description, tooltip = 'Info' }) {
|
|
|
32
34
|
|
|
33
35
|
CclInfoDescription.propTypes = {
|
|
34
36
|
title: PropTypes.string.isRequired,
|
|
35
|
-
description: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
|
|
36
|
-
.isRequired,
|
|
37
|
+
description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
37
38
|
};
|
|
38
39
|
export default CclInfoDescription;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import CclModal from '@eeacms/volto-clms-theme/components/CclModal/CclModal';
|
|
4
3
|
import { useDispatch, useSelector } from 'react-redux';
|
|
5
4
|
import { getRegistry } from '@eeacms/volto-clms-theme/actions';
|
|
@@ -75,9 +74,4 @@ function CclLoginModal() {
|
|
|
75
74
|
);
|
|
76
75
|
}
|
|
77
76
|
|
|
78
|
-
CclLoginModal.propTypes = {
|
|
79
|
-
title: PropTypes.string.isRequired,
|
|
80
|
-
children: PropTypes.node.isRequired,
|
|
81
|
-
marginBottom: PropTypes.bool,
|
|
82
|
-
};
|
|
83
77
|
export default CclLoginModal;
|
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { NavLink } from 'react-router-dom';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import cx from 'classnames';
|
|
3
5
|
|
|
4
6
|
function CclTab(props) {
|
|
5
|
-
let { activeTab, tabTitle, onClick } = props;
|
|
7
|
+
let { activeTab, tabTitle, onClick, tabId } = props;
|
|
6
8
|
|
|
7
9
|
function onTabClick() {
|
|
8
|
-
onClick(
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
let className = 'card';
|
|
12
|
-
|
|
13
|
-
if (activeTab === tabTitle) {
|
|
14
|
-
className += ' active';
|
|
10
|
+
onClick(tabId);
|
|
15
11
|
}
|
|
16
12
|
|
|
17
13
|
return (
|
|
18
14
|
<div
|
|
19
|
-
className={
|
|
15
|
+
className={cx('card', activeTab === tabId && 'active')}
|
|
20
16
|
onClick={onTabClick}
|
|
21
17
|
onKeyDown={onTabClick}
|
|
22
18
|
tabIndex="0"
|
|
23
19
|
role="button"
|
|
20
|
+
id={tabId}
|
|
24
21
|
>
|
|
25
|
-
<
|
|
22
|
+
<NavLink to={'#' + tabId}>{tabTitle}</NavLink>
|
|
26
23
|
</div>
|
|
27
24
|
);
|
|
28
25
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import './CclTabs.less';
|
|
2
|
+
|
|
1
3
|
import React, { useState } from 'react';
|
|
2
|
-
|
|
4
|
+
|
|
3
5
|
import CclTab from './CclTab';
|
|
4
|
-
import '
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* Tabs component documentation.
|
|
@@ -20,30 +22,43 @@ import './CclTabs.less';
|
|
|
20
22
|
*/
|
|
21
23
|
const CclTabs = (props) => {
|
|
22
24
|
let { children } = props;
|
|
23
|
-
let [activeTab, setActiveTab] = useState(props.children[0].props.
|
|
25
|
+
let [activeTab, setActiveTab] = useState(props.children[0].props.tabId || '');
|
|
24
26
|
|
|
25
27
|
function onClickTabItem(tab) {
|
|
26
28
|
setActiveTab(tab);
|
|
27
29
|
}
|
|
30
|
+
React.useEffect(() => {
|
|
31
|
+
const hash = window.location.hash.substring(1) || '';
|
|
32
|
+
if (hash) {
|
|
33
|
+
setActiveTab(hash);
|
|
34
|
+
} else {
|
|
35
|
+
setActiveTab(
|
|
36
|
+
children
|
|
37
|
+
.filter((item) => !!item.props.tabTitle)[0]
|
|
38
|
+
.props?.tabTitle?.replace(' ', ''),
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
}, [children]);
|
|
28
42
|
|
|
29
43
|
return (
|
|
30
44
|
<div className="ccl-container-flex">
|
|
31
45
|
<div className="left-content cont-w-25">
|
|
32
|
-
<
|
|
46
|
+
<nav className="left-menu">
|
|
33
47
|
{children
|
|
34
48
|
.filter((item) => !!item.props.tabTitle)
|
|
35
|
-
.map((child) => {
|
|
49
|
+
.map((child, key) => {
|
|
36
50
|
const { tabTitle } = child.props;
|
|
37
51
|
return (
|
|
38
52
|
<CclTab
|
|
39
53
|
activeTab={activeTab}
|
|
40
|
-
key={
|
|
54
|
+
key={key}
|
|
55
|
+
tabId={tabTitle.replace(' ', '')}
|
|
41
56
|
tabTitle={tabTitle}
|
|
42
57
|
onClick={onClickTabItem}
|
|
43
58
|
/>
|
|
44
59
|
);
|
|
45
60
|
})}
|
|
46
|
-
</
|
|
61
|
+
</nav>
|
|
47
62
|
|
|
48
63
|
{/* Check if underPanel element exist and render */}
|
|
49
64
|
{children
|
|
@@ -59,7 +74,7 @@ const CclTabs = (props) => {
|
|
|
59
74
|
{children
|
|
60
75
|
.filter((item) => !!item.props.tabTitle)
|
|
61
76
|
.map((child, index) => {
|
|
62
|
-
return child.props.tabTitle !== activeTab ? (
|
|
77
|
+
return child.props.tabTitle.replace(' ', '') !== activeTab ? (
|
|
63
78
|
<div key={index} className="deactivate-content">
|
|
64
79
|
{child.props.children}
|
|
65
80
|
</div>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
div.form.block {
|
|
2
|
+
.ui.form input:not([type]):focus,
|
|
3
|
+
.ui.form input[type='date']:focus,
|
|
4
|
+
.ui.form input[type='datetime-local']:focus,
|
|
5
|
+
.ui.form input[type='email']:focus,
|
|
6
|
+
.ui.form input[type='number']:focus,
|
|
7
|
+
.ui.form input[type='password']:focus,
|
|
8
|
+
.ui.form input[type='search']:focus,
|
|
9
|
+
.ui.form input[type='tel']:focus,
|
|
10
|
+
.ui.form input[type='time']:focus,
|
|
11
|
+
.ui.form input[type='text']:focus,
|
|
12
|
+
.ui.form input[type='file']:focus,
|
|
13
|
+
.ui.form input[type='url']:focus {
|
|
14
|
+
border-color: #a0b128;
|
|
15
|
+
color: #a0b128;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ui.form textarea:focus {
|
|
19
|
+
border-color: #a0b128;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.label-file-widget-input {
|
|
23
|
+
display: inline-block;
|
|
24
|
+
padding: 0.6rem 3rem;
|
|
25
|
+
border: 1px solid transparent;
|
|
26
|
+
border-color: #a0b128;
|
|
27
|
+
margin-top: 20px;
|
|
28
|
+
border-radius: 0px;
|
|
29
|
+
color: #a0b128;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
opacity: 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.label-file-widget-input:hover {
|
|
35
|
+
background-color: #a0b128;
|
|
36
|
+
color: white;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ui.primary.button {
|
|
40
|
+
padding: 0.6rem 3rem;
|
|
41
|
+
border: 1px solid transparent;
|
|
42
|
+
background-color: #a0b128;
|
|
43
|
+
border-radius: 0px;
|
|
44
|
+
color: white;
|
|
45
|
+
font-size: 1rem;
|
|
46
|
+
line-height: 1.5;
|
|
47
|
+
text-align: center;
|
|
48
|
+
text-decoration: none;
|
|
49
|
+
transition: all 0.3s ease-out;
|
|
50
|
+
vertical-align: middle;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ui.primary.button:hover {
|
|
54
|
+
border-color: #a0b128;
|
|
55
|
+
background-color: white;
|
|
56
|
+
color: #a0b128;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.dropzone-text {
|
|
60
|
+
color: #c7d5d8;
|
|
61
|
+
}
|
|
62
|
+
}
|