@eeacms/volto-clms-theme 1.0.82 → 1.0.85
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 +52 -0
- package/Jenkinsfile +4 -3
- package/jest-addon.config.js +5 -1
- package/package.json +5 -2
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/AccordionFacet.jsx +8 -0
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/CheckboxTreeFacet.jsx +9 -0
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/DoubleRangeFacet.jsx +8 -0
- package/src/components/Blocks/customBlocks.js +17 -0
- package/src/components/CLMSDownloadCartView/CLMSCartContent.jsx +27 -27
- package/src/components/CLMSDownloadCartView/cartUtils.js +1 -1
- package/src/components/CLMSDownloadsView/CLMSDownloadTasks.jsx +34 -10
- package/src/components/CLMSDownloadsView/FileCard.jsx +19 -12
- package/src/components/CLMSMeetingView/CLMSMeetingView.jsx +3 -0
- package/src/components/CLMSMeetingView/CclLightGallery.jsx +63 -0
- package/src/components/CLMSMeetingView/styles.less +49 -0
- package/src/components/CclLanguageSelector/CclLanguageSelector.jsx +15 -28
- package/src/components/CclLoginModal/CclLoginModal.jsx +31 -25
- package/src/components/CclModal/CclModal.jsx +10 -14
- package/src/components/CclModal/modal.less +22 -5
- package/src/components/Widgets/{DownloadableFilesWidget.jsx → DownloadableFilesTableWidget.jsx} +7 -6
- package/src/components/Widgets/ProductComponentsWidget.jsx +39 -0
- package/src/customizations/volto/components/manage/Toolbar/Toolbar.jsx +44 -32
- package/src/index.js +15 -11
- package/src/components/Widgets/DownloadableFilesWidget.test.jsx +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,60 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [1.0.85](https://github.com/eea/volto-clms-theme/compare/1.0.84...1.0.85)
|
|
8
|
+
|
|
9
|
+
- Volto 15 upgrade [`#240`](https://github.com/eea/volto-clms-theme/pull/240)
|
|
10
|
+
- jest config [`5e0723b`](https://github.com/eea/volto-clms-theme/commit/5e0723b1c1006609811a84d6fb9a3b6744c8d1be)
|
|
11
|
+
- sort downloads [`50cdd33`](https://github.com/eea/volto-clms-theme/commit/50cdd332f992e45a8745483bddaf25e01ecd5db5)
|
|
12
|
+
- condition valid Start date [`dce8883`](https://github.com/eea/volto-clms-theme/commit/dce8883f386676c682af2b5a68f7451d3ccd49dd)
|
|
13
|
+
- search block new features [`8e814cb`](https://github.com/eea/volto-clms-theme/commit/8e814cbd359782540c21fe37b37ef146d331f0d6)
|
|
14
|
+
- language selector cookie management [`1385ac9`](https://github.com/eea/volto-clms-theme/commit/1385ac95795702206d3623ba6e780faa43a89e0a)
|
|
15
|
+
- toolbar cookie management [`5c23200`](https://github.com/eea/volto-clms-theme/commit/5c23200790b20e1d4f1bc966463c37bf4c808f47)
|
|
16
|
+
|
|
17
|
+
#### [1.0.84](https://github.com/eea/volto-clms-theme/compare/1.0.83...1.0.84)
|
|
18
|
+
|
|
19
|
+
> 18 March 2022
|
|
20
|
+
|
|
21
|
+
- Develop [`#239`](https://github.com/eea/volto-clms-theme/pull/239)
|
|
22
|
+
- lightgallery style imports [`7b6c1a9`](https://github.com/eea/volto-clms-theme/commit/7b6c1a9d2b269a74d7c0ec699b078f41035c7e23)
|
|
23
|
+
- lightGallery added for meeting view [`4047d5c`](https://github.com/eea/volto-clms-theme/commit/4047d5c18ce4c64b03fbcc3db761b3c0f4cd26d3)
|
|
24
|
+
|
|
25
|
+
#### [1.0.83](https://github.com/eea/volto-clms-theme/compare/1.0.82...1.0.83)
|
|
26
|
+
|
|
27
|
+
> 17 March 2022
|
|
28
|
+
|
|
29
|
+
- Develop [`#236`](https://github.com/eea/volto-clms-theme/pull/236)
|
|
30
|
+
- new widget to edit the component controlpanel [`#237`](https://github.com/eea/volto-clms-theme/pull/237)
|
|
31
|
+
- use volto-react-table widget [`#238`](https://github.com/eea/volto-clms-theme/pull/238)
|
|
32
|
+
- Bugs n improvements [`#235`](https://github.com/eea/volto-clms-theme/pull/235)
|
|
33
|
+
- Develop [`#234`](https://github.com/eea/volto-clms-theme/pull/234)
|
|
34
|
+
- remove duplicated [`0739aef`](https://github.com/eea/volto-clms-theme/commit/0739aef163cac91233a936c49f488fbc9daec5be)
|
|
35
|
+
- add volto-react-table-widget [`f4b1e99`](https://github.com/eea/volto-clms-theme/commit/f4b1e998e38f31a63b475760d0bf2157451f9af4)
|
|
36
|
+
- fix packages.json [`44848a0`](https://github.com/eea/volto-clms-theme/commit/44848a0e07a0a960dc17ee6d0c08febac320688d)
|
|
37
|
+
- remove unneeded code [`e37e121`](https://github.com/eea/volto-clms-theme/commit/e37e121ca910b4fbaf2f9da80393fc577a6923c7)
|
|
38
|
+
- adjust dependnecies [`a7f67fe`](https://github.com/eea/volto-clms-theme/commit/a7f67fec4c56d09b038ce052e88b04a601da6db3)
|
|
39
|
+
- adjust import [`66bb59a`](https://github.com/eea/volto-clms-theme/commit/66bb59a22a1b623bc6dcf13996c98572b14526db)
|
|
40
|
+
- add VOLTO version to addon tests execution [`a94a491`](https://github.com/eea/volto-clms-theme/commit/a94a4918413aa5a2a75eea14ab837338d24d2e32)
|
|
41
|
+
- fix cart type selector [`47046b0`](https://github.com/eea/volto-clms-theme/commit/47046b0ba02400c572aee981cc52ad481d560b77)
|
|
42
|
+
- reorder cart modal buttons and remove duplicates of dataset titles from modal [`03171f2`](https://github.com/eea/volto-clms-theme/commit/03171f2e7b85878d1fac186130af2dc8a8813937)
|
|
43
|
+
- ESLint fix [`6e4faad`](https://github.com/eea/volto-clms-theme/commit/6e4faad26bbf412a691e827333541e6e8d302590)
|
|
44
|
+
- use ReactTableWidget [`18d8777`](https://github.com/eea/volto-clms-theme/commit/18d8777cc134a6d13ed0ab1324d38c2edc5f5426)
|
|
45
|
+
- Modal homogenization [`33d41b5`](https://github.com/eea/volto-clms-theme/commit/33d41b5d90094addf6d3e4301225727e801c45b5)
|
|
46
|
+
- use datset title instead of dataResourceTitle [`4a9dc98`](https://github.com/eea/volto-clms-theme/commit/4a9dc98c965d96d1d796a81b94ccf5c0283309d7)
|
|
47
|
+
- get header from schema [`8851314`](https://github.com/eea/volto-clms-theme/commit/8851314f92b1798428790dc4db02fd7688fbc5af)
|
|
48
|
+
- use onBlur [`bdfcc7e`](https://github.com/eea/volto-clms-theme/commit/bdfcc7ecc28c48d0c84261166b824ac20e746d4f)
|
|
49
|
+
- implement search and filtering [`8b748eb`](https://github.com/eea/volto-clms-theme/commit/8b748ebc17a3edbbf1e6b2d24df016f8bb86a333)
|
|
50
|
+
- use react-papaparse to import/export CSV files [`d07fe9d`](https://github.com/eea/volto-clms-theme/commit/d07fe9d17ef963b839bb98b22a008921b83f9f3d)
|
|
51
|
+
- add CSV export [`8bd1ea5`](https://github.com/eea/volto-clms-theme/commit/8bd1ea5451e2b2e8ce8ea1521a13acc1bfcfc7bb)
|
|
52
|
+
- modify the data in the props so Volto keeps its value [`6d5b19a`](https://github.com/eea/volto-clms-theme/commit/6d5b19a081a2487d2680696ba7c993ef8f3bd50e)
|
|
53
|
+
- remove styles [`c677afe`](https://github.com/eea/volto-clms-theme/commit/c677afe47ec10b0274311252941639d1ab3d326b)
|
|
54
|
+
- initial demo using react-table to edit downloadable files. right now without edit functionality [`dafa015`](https://github.com/eea/volto-clms-theme/commit/dafa015e43272101c141456200c75a4c0d65d3dc)
|
|
55
|
+
|
|
7
56
|
#### [1.0.82](https://github.com/eea/volto-clms-theme/compare/1.0.81...1.0.82)
|
|
8
57
|
|
|
58
|
+
> 11 March 2022
|
|
59
|
+
|
|
60
|
+
- Develop [`#233`](https://github.com/eea/volto-clms-theme/pull/233)
|
|
9
61
|
- add new field in prepackaged downloadable files [`#232`](https://github.com/eea/volto-clms-theme/pull/232)
|
|
10
62
|
|
|
11
63
|
#### [1.0.81](https://github.com/eea/volto-clms-theme/compare/1.0.80...1.0.81)
|
package/Jenkinsfile
CHANGED
|
@@ -4,8 +4,9 @@ pipeline {
|
|
|
4
4
|
environment {
|
|
5
5
|
GIT_NAME = "volto-clms-theme"
|
|
6
6
|
NAMESPACE = "@eeacms"
|
|
7
|
-
SONARQUBE_TAGS = "clms.land.copernicus.eu,volto.eea.europa.eu"
|
|
7
|
+
SONARQUBE_TAGS = "clms.land.copernicus.eu,volto.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu"
|
|
8
8
|
DEPENDENCIES = ""
|
|
9
|
+
VOLTO = "15.2.1"
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
stages {
|
|
@@ -77,7 +78,7 @@ pipeline {
|
|
|
77
78
|
script {
|
|
78
79
|
try {
|
|
79
80
|
sh '''docker pull plone/volto-addon-ci'''
|
|
80
|
-
sh '''docker run -i --name="$BUILD_TAG-volto" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci'''
|
|
81
|
+
sh '''docker run -i --name="$BUILD_TAG-volto" -e NAMESPACE="$NAMESPACE" -e VOLTO=$VOLTO -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci'''
|
|
81
82
|
sh '''rm -rf xunit-reports'''
|
|
82
83
|
sh '''mkdir -p xunit-reports'''
|
|
83
84
|
sh '''docker cp $BUILD_TAG-volto:/opt/frontend/my-volto-project/coverage xunit-reports/'''
|
|
@@ -125,7 +126,7 @@ pipeline {
|
|
|
125
126
|
script {
|
|
126
127
|
try {
|
|
127
128
|
sh '''docker pull plone; docker run -d --rm --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="profile-plone.restapi:blocks" plone fg'''
|
|
128
|
-
sh '''docker pull plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" -e NODE_ENV=test plone/volto-addon-ci cypress'''
|
|
129
|
+
sh '''docker pull plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e VOLTO=$VOLTO -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" -e NODE_ENV=test plone/volto-addon-ci cypress'''
|
|
129
130
|
} finally {
|
|
130
131
|
try {
|
|
131
132
|
sh '''rm -rf cypress-reports cypress-results cypress-coverage'''
|
package/jest-addon.config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
testMatch: ['**/src/addons/**/?(*.)+(spec|test).[jt]s
|
|
2
|
+
testMatch: ['**/src/addons/**/?(*.)+(spec|test).[jt]s(x)?'],
|
|
3
3
|
collectCoverageFrom: [
|
|
4
4
|
'src/addons/**/src/**/*.{js,jsx,ts,tsx}',
|
|
5
5
|
'!src/**/*.d.ts',
|
|
@@ -15,6 +15,7 @@ module.exports = {
|
|
|
15
15
|
'@eeacms/(.*?)/(.*)$': '<rootDir>/src/addons/$1/src/$2',
|
|
16
16
|
'volto-clms-theme/(.*)$': '<rootDir>/src/addons/volto-clms-theme/src/$1',
|
|
17
17
|
'~/(.*)$': '<rootDir>/src/$1',
|
|
18
|
+
'@root/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
|
|
18
19
|
'load-volto-addons':
|
|
19
20
|
'<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
|
|
20
21
|
},
|
|
@@ -38,4 +39,7 @@ module.exports = {
|
|
|
38
39
|
statements: 5,
|
|
39
40
|
},
|
|
40
41
|
},
|
|
42
|
+
roots: ['<rootDir>'],
|
|
43
|
+
modulePaths: ['<rootDir>'],
|
|
44
|
+
moduleDirectories: ['node_modules'],
|
|
41
45
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-clms-theme",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.85",
|
|
4
4
|
"description": "volto-clms-theme: Volto theme for CLMS site",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "CodeSyntax for the European Environment Agency",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"@eeacms/volto-resize-helper",
|
|
27
27
|
"@eeacms/volto-tabs-block",
|
|
28
28
|
"@eeacms/volto-clms-utils",
|
|
29
|
+
"@eeacms/volto-react-table-widget",
|
|
29
30
|
"volto-form-block",
|
|
30
31
|
"@eeacms/volto-taxonomy"
|
|
31
32
|
],
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"@eeacms/volto-clms-utils": "0.1.6",
|
|
36
37
|
"@eeacms/volto-columns-block": "4.4.3",
|
|
37
38
|
"@eeacms/volto-metadata-block": "^2.1.0",
|
|
39
|
+
"@eeacms/volto-react-table-widget": "0.1.1",
|
|
38
40
|
"@eeacms/volto-resize-helper": "0.2.1",
|
|
39
41
|
"@eeacms/volto-tabs-block": "1.2.7",
|
|
40
42
|
"@eeacms/volto-taxonomy": "^1.0.0",
|
|
@@ -50,7 +52,8 @@
|
|
|
50
52
|
"slick-carousel": "1.8.1",
|
|
51
53
|
"volto-dropdownmenu": "2.2.7",
|
|
52
54
|
"volto-form-block": "2.2.2",
|
|
53
|
-
"react-input-range": "^1.3.0"
|
|
55
|
+
"react-input-range": "^1.3.0",
|
|
56
|
+
"lightgallery": "^2.4.0"
|
|
54
57
|
},
|
|
55
58
|
"devDependencies": {
|
|
56
59
|
"@cypress/code-coverage": "^3.9.5",
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { Checkbox } from 'semantic-ui-react';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import {
|
|
4
|
+
selectFacetSchemaEnhancer,
|
|
5
|
+
selectFacetStateToValue,
|
|
6
|
+
selectFacetValueToQuery,
|
|
7
|
+
} from '@plone/volto/components/manage/Blocks/Search/components/base';
|
|
3
8
|
|
|
4
9
|
const AccordionFacet = (props) => {
|
|
5
10
|
const {
|
|
@@ -79,4 +84,7 @@ const AccordionFacet = (props) => {
|
|
|
79
84
|
);
|
|
80
85
|
};
|
|
81
86
|
|
|
87
|
+
AccordionFacet.schemaEnhancer = selectFacetSchemaEnhancer;
|
|
88
|
+
AccordionFacet.stateToValue = selectFacetStateToValue;
|
|
89
|
+
AccordionFacet.valueToQuery = selectFacetValueToQuery;
|
|
82
90
|
export default AccordionFacet;
|
|
@@ -5,6 +5,12 @@ import React, { useState } from 'react';
|
|
|
5
5
|
import { Checkbox, List } from 'semantic-ui-react';
|
|
6
6
|
import { structure_taxonomy_terms } from '@eeacms/volto-clms-theme/components';
|
|
7
7
|
|
|
8
|
+
import {
|
|
9
|
+
selectFacetSchemaEnhancer,
|
|
10
|
+
selectFacetStateToValue,
|
|
11
|
+
selectFacetValueToQuery,
|
|
12
|
+
} from '@plone/volto/components/manage/Blocks/Search/components/base';
|
|
13
|
+
|
|
8
14
|
const CheckboxTreeFacet = (props) => {
|
|
9
15
|
const { facet, choices, onChange, value } = props;
|
|
10
16
|
const facetValue = value;
|
|
@@ -120,4 +126,7 @@ const CheckboxListParent = ({ option, key, onChange, value, id }) => {
|
|
|
120
126
|
);
|
|
121
127
|
};
|
|
122
128
|
|
|
129
|
+
CheckboxTreeFacet.schemaEnhancer = selectFacetSchemaEnhancer;
|
|
130
|
+
CheckboxTreeFacet.stateToValue = selectFacetStateToValue;
|
|
131
|
+
CheckboxTreeFacet.valueToQuery = selectFacetValueToQuery;
|
|
123
132
|
export default CheckboxTreeFacet;
|
|
@@ -5,6 +5,11 @@ import React, { useState } from 'react';
|
|
|
5
5
|
|
|
6
6
|
import InputRange from 'react-input-range';
|
|
7
7
|
import { Segment } from 'semantic-ui-react';
|
|
8
|
+
import {
|
|
9
|
+
selectFacetSchemaEnhancer,
|
|
10
|
+
selectFacetStateToValue,
|
|
11
|
+
selectFacetValueToQuery,
|
|
12
|
+
} from '@plone/volto/components/manage/Blocks/Search/components/base';
|
|
8
13
|
|
|
9
14
|
const DoubleRangeFacet = (props) => {
|
|
10
15
|
const { facet, choices, onChange, value } = props;
|
|
@@ -73,4 +78,7 @@ const DoubleRangeFacet = (props) => {
|
|
|
73
78
|
);
|
|
74
79
|
};
|
|
75
80
|
|
|
81
|
+
DoubleRangeFacet.schemaEnhancer = selectFacetSchemaEnhancer;
|
|
82
|
+
DoubleRangeFacet.stateToValue = selectFacetStateToValue;
|
|
83
|
+
DoubleRangeFacet.valueToQuery = selectFacetValueToQuery;
|
|
76
84
|
export default DoubleRangeFacet;
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
CheckboxTreeFacet,
|
|
7
7
|
rewriteOptions,
|
|
8
8
|
} from '@eeacms/volto-clms-theme/components/Blocks/CustomTemplates/VoltoSearchBlock';
|
|
9
|
+
import { SelectFacetFilterListEntry } from '@plone/volto/components/manage/Blocks/Search/components';
|
|
9
10
|
import {
|
|
10
11
|
CclCarouselView,
|
|
11
12
|
CclProductTabsView,
|
|
@@ -305,24 +306,40 @@ const customBlocks = (config) => ({
|
|
|
305
306
|
title: 'Accordion Checkbox',
|
|
306
307
|
view: WithType(AccordionFacet, 'checkbox'),
|
|
307
308
|
isDefault: true,
|
|
309
|
+
schemaEnhancer: AccordionFacet.schemaEnhancer,
|
|
310
|
+
stateToValue: AccordionFacet.stateToValue,
|
|
311
|
+
valueToQuery: AccordionFacet.valueToQuery,
|
|
312
|
+
filterListComponent: SelectFacetFilterListEntry,
|
|
308
313
|
},
|
|
309
314
|
{
|
|
310
315
|
id: 'accordionLabelFacet',
|
|
311
316
|
title: 'Accordion Label',
|
|
312
317
|
view: WithType(AccordionFacet, 'label'),
|
|
313
318
|
isDefault: false,
|
|
319
|
+
schemaEnhancer: AccordionFacet.schemaEnhancer,
|
|
320
|
+
stateToValue: AccordionFacet.stateToValue,
|
|
321
|
+
valueToQuery: AccordionFacet.valueToQuery,
|
|
322
|
+
filterListComponent: SelectFacetFilterListEntry,
|
|
314
323
|
},
|
|
315
324
|
{
|
|
316
325
|
id: 'doubleRangeFacet',
|
|
317
326
|
title: 'Double Range',
|
|
318
327
|
view: DoubleRangeFacet,
|
|
319
328
|
isDefault: false,
|
|
329
|
+
schemaEnhancer: DoubleRangeFacet.schemaEnhancer,
|
|
330
|
+
stateToValue: DoubleRangeFacet.stateToValue,
|
|
331
|
+
valueToQuery: DoubleRangeFacet.valueToQuery,
|
|
332
|
+
filterListComponent: SelectFacetFilterListEntry,
|
|
320
333
|
},
|
|
321
334
|
{
|
|
322
335
|
id: 'checkboxTreeFacet',
|
|
323
336
|
title: 'Checkbox Tree',
|
|
324
337
|
view: CheckboxTreeFacet,
|
|
325
338
|
isDefault: false,
|
|
339
|
+
schemaEnhancer: CheckboxTreeFacet.schemaEnhancer,
|
|
340
|
+
stateToValue: CheckboxTreeFacet.stateToValue,
|
|
341
|
+
valueToQuery: CheckboxTreeFacet.valueToQuery,
|
|
342
|
+
filterListComponent: SelectFacetFilterListEntry,
|
|
326
343
|
},
|
|
327
344
|
|
|
328
345
|
...config.blocks.blocksConfig.search.extensions.facetWidgets.types,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @module components/CLMSDownloadCartView/CLMSCartContent
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Checkbox,
|
|
7
|
+
import { Checkbox, Modal, Segment, Select } from 'semantic-ui-react';
|
|
8
8
|
import React, { useEffect, useState } from 'react';
|
|
9
9
|
import {
|
|
10
10
|
getCartObjectFromMapviewer,
|
|
@@ -226,7 +226,11 @@ const CLMSCartContent = (props) => {
|
|
|
226
226
|
return (
|
|
227
227
|
<Select
|
|
228
228
|
placeholder="Select type"
|
|
229
|
-
value={
|
|
229
|
+
value={
|
|
230
|
+
item.type
|
|
231
|
+
? item.type
|
|
232
|
+
: item.type_options.length > 0 && item.type_options[0].id
|
|
233
|
+
}
|
|
230
234
|
options={item.type_options.map((option) => {
|
|
231
235
|
return { key: option.id, value: option.id, text: option.name };
|
|
232
236
|
})}
|
|
@@ -436,36 +440,32 @@ const CLMSCartContent = (props) => {
|
|
|
436
440
|
<br />
|
|
437
441
|
<strong>Map viewer selection:</strong>
|
|
438
442
|
<ul>
|
|
439
|
-
{
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
443
|
+
{[
|
|
444
|
+
...new Set(
|
|
445
|
+
getSelectedCartItems()
|
|
446
|
+
.filter((item) => !item.file_id)
|
|
447
|
+
.map((item) => item.name),
|
|
448
|
+
),
|
|
449
|
+
].map((item, key) => (
|
|
450
|
+
<li key={key}>{item}</li>
|
|
451
|
+
))}
|
|
444
452
|
</ul>
|
|
445
453
|
</div>
|
|
446
454
|
</div>
|
|
447
455
|
</Modal.Content>
|
|
448
456
|
<Modal.Actions>
|
|
449
|
-
<
|
|
450
|
-
<
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
</Grid.Column>
|
|
462
|
-
<Grid.Column>
|
|
463
|
-
<CclButton onClick={() => setOpenedModal(false)}>
|
|
464
|
-
Cancel
|
|
465
|
-
</CclButton>
|
|
466
|
-
</Grid.Column>
|
|
467
|
-
</Grid.Row>
|
|
468
|
-
</Grid>
|
|
457
|
+
<div className="modal-buttons">
|
|
458
|
+
<CclButton
|
|
459
|
+
mode={'filled'}
|
|
460
|
+
onClick={() => {
|
|
461
|
+
setOpenedModal(false);
|
|
462
|
+
startDownloading();
|
|
463
|
+
}}
|
|
464
|
+
>
|
|
465
|
+
Accept
|
|
466
|
+
</CclButton>
|
|
467
|
+
<CclButton onClick={() => setOpenedModal(false)}>Cancel</CclButton>
|
|
468
|
+
</div>
|
|
469
469
|
</Modal.Actions>
|
|
470
470
|
</Modal>
|
|
471
471
|
</>
|
|
@@ -67,15 +67,23 @@ const CLMSDownloadTasks = (props) => {
|
|
|
67
67
|
return (
|
|
68
68
|
<Grid columns={2}>
|
|
69
69
|
{tasks?.length > 0 &&
|
|
70
|
-
tasks
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
item=
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
70
|
+
tasks
|
|
71
|
+
.map((item) => {
|
|
72
|
+
if (!item.RegistrationDateTime) {
|
|
73
|
+
item.RegistrationDateTime = '1970-01-01T00:00:00.000Z';
|
|
74
|
+
}
|
|
75
|
+
return item;
|
|
76
|
+
})
|
|
77
|
+
.sort(dynamicSort('-RegistrationDateTime'))
|
|
78
|
+
.map((item, key) => (
|
|
79
|
+
<Grid.Column key={key}>
|
|
80
|
+
<FileCard
|
|
81
|
+
item={item}
|
|
82
|
+
showDeleteTaskLoading={showDel}
|
|
83
|
+
deleteTaskInProgress={delTask}
|
|
84
|
+
/>
|
|
85
|
+
</Grid.Column>
|
|
86
|
+
))}
|
|
79
87
|
</Grid>
|
|
80
88
|
);
|
|
81
89
|
};
|
|
@@ -108,6 +116,22 @@ const CLMSDownloadTasks = (props) => {
|
|
|
108
116
|
setter(intermediate);
|
|
109
117
|
}
|
|
110
118
|
|
|
119
|
+
const dynamicSort = (property) => {
|
|
120
|
+
var sortOrder = 1;
|
|
121
|
+
if (property[0] === '-') {
|
|
122
|
+
sortOrder = -1;
|
|
123
|
+
property = property.substr(1);
|
|
124
|
+
}
|
|
125
|
+
return function (a, b) {
|
|
126
|
+
/* next line works with strings and numbers,
|
|
127
|
+
* and you may want to customize it to your needs
|
|
128
|
+
*/
|
|
129
|
+
var result =
|
|
130
|
+
a[property] < b[property] ? -1 : a[property] > b[property] ? 1 : 0;
|
|
131
|
+
return result * sortOrder;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
|
|
111
135
|
const deleteTaskInProgress = (task_id) => {
|
|
112
136
|
setShowDeleteTaskLoading(task_id);
|
|
113
137
|
dispatch(deleteDownloadtool(task_id));
|
|
@@ -220,7 +244,7 @@ const CLMSDownloadTasks = (props) => {
|
|
|
220
244
|
<h2>
|
|
221
245
|
<FormattedMessage id="Cancelled" defaultMessage="Cancelled" />
|
|
222
246
|
</h2>
|
|
223
|
-
{cancelled?.length
|
|
247
|
+
{cancelled?.length > 0 ? (
|
|
224
248
|
<MapTasks tasks={cancelled} showDel={showDeleteTaskLoading} />
|
|
225
249
|
) : (
|
|
226
250
|
<p>
|
|
@@ -125,18 +125,25 @@ const FileCard = (props) => {
|
|
|
125
125
|
>
|
|
126
126
|
<Header as="h3">{`Task ID: ${item?.TaskID}`}</Header>
|
|
127
127
|
<Segment basic className="file-datetimes">
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
128
|
+
{item?.RegistrationDateTime && (
|
|
129
|
+
<>
|
|
130
|
+
Start date:
|
|
131
|
+
{new Date(item?.RegistrationDateTime).toLocaleString(
|
|
132
|
+
'en-GB',
|
|
133
|
+
{
|
|
134
|
+
timeZone: 'UTC',
|
|
135
|
+
},
|
|
136
|
+
)}
|
|
137
|
+
<span
|
|
138
|
+
className="info-icon"
|
|
139
|
+
tooltip="Dates and times are in UTC"
|
|
140
|
+
direction="up"
|
|
141
|
+
>
|
|
142
|
+
<FontAwesomeIcon icon={faInfoCircle} />
|
|
143
|
+
</span>
|
|
144
|
+
<br />
|
|
145
|
+
</>
|
|
146
|
+
)}
|
|
140
147
|
{item?.FinalizationDateTime && (
|
|
141
148
|
<>
|
|
142
149
|
End date:{' '}
|
|
@@ -18,6 +18,7 @@ import { createContent } from '@plone/volto/actions';
|
|
|
18
18
|
import jwtDecode from 'jwt-decode';
|
|
19
19
|
import { postMeetingRegister } from '../../actions';
|
|
20
20
|
import { toast } from 'react-toastify';
|
|
21
|
+
import { LightGalleryListing } from './CclLightGallery';
|
|
21
22
|
|
|
22
23
|
export const CLMSMeetingView = (props) => {
|
|
23
24
|
const { content, intl } = props;
|
|
@@ -156,6 +157,7 @@ export const CLMSMeetingView = (props) => {
|
|
|
156
157
|
);
|
|
157
158
|
});
|
|
158
159
|
};
|
|
160
|
+
|
|
159
161
|
var formErrorMessagesList = [];
|
|
160
162
|
!content.anonymous_registration_form?.published &&
|
|
161
163
|
formErrorMessagesList.push(
|
|
@@ -379,6 +381,7 @@ export const CLMSMeetingView = (props) => {
|
|
|
379
381
|
</figure>
|
|
380
382
|
)}
|
|
381
383
|
<StringToHTML string={content.text?.data || ''} />
|
|
384
|
+
<LightGalleryListing />
|
|
382
385
|
</Segment>
|
|
383
386
|
</div>
|
|
384
387
|
);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import LightGallery from 'lightgallery/react';
|
|
4
|
+
import lgZoom from 'lightgallery/plugins/zoom';
|
|
5
|
+
import 'lightgallery/css/lightgallery.css';
|
|
6
|
+
import 'lightgallery/css/lg-zoom.css';
|
|
7
|
+
import { Image } from 'semantic-ui-react';
|
|
8
|
+
import './styles.less';
|
|
9
|
+
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
10
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
11
|
+
import { searchContent } from '@plone/volto/actions';
|
|
12
|
+
|
|
13
|
+
export const LightGalleryListing = () => {
|
|
14
|
+
const dispatch = useDispatch();
|
|
15
|
+
const images = useSelector(
|
|
16
|
+
(state) => state?.search?.subrequests?.images?.items,
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
React.useEffect(() => {
|
|
20
|
+
dispatch(
|
|
21
|
+
searchContent(
|
|
22
|
+
window.location.pathname,
|
|
23
|
+
{
|
|
24
|
+
'path.depth': 1,
|
|
25
|
+
portal_type: 'Image',
|
|
26
|
+
fullobjects: true,
|
|
27
|
+
},
|
|
28
|
+
'images',
|
|
29
|
+
),
|
|
30
|
+
);
|
|
31
|
+
return () => {
|
|
32
|
+
dispatch(searchContent([]));
|
|
33
|
+
};
|
|
34
|
+
}, [dispatch]);
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<>
|
|
38
|
+
<div>
|
|
39
|
+
<LightGallery plugins={[lgZoom]} mode="lg-fade">
|
|
40
|
+
{images?.map((item, index) => (
|
|
41
|
+
<a
|
|
42
|
+
key={index}
|
|
43
|
+
className="gallery-item"
|
|
44
|
+
href={flattenToAppURL(item?.image?.download)}
|
|
45
|
+
data-sub-html={item.description}
|
|
46
|
+
data-src={flattenToAppURL(item?.image?.scales?.huge?.download)}
|
|
47
|
+
>
|
|
48
|
+
<Image
|
|
49
|
+
src={flattenToAppURL(item?.image?.scales?.large?.download)}
|
|
50
|
+
className="img-responsive"
|
|
51
|
+
alt={item.description}
|
|
52
|
+
/>
|
|
53
|
+
</a>
|
|
54
|
+
))}
|
|
55
|
+
</LightGallery>
|
|
56
|
+
</div>
|
|
57
|
+
</>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
LightGalleryListing.propTypes = {
|
|
61
|
+
items: PropTypes.arrayOf(PropTypes.any),
|
|
62
|
+
};
|
|
63
|
+
export default LightGalleryListing;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@type: 'extra';
|
|
2
|
+
@element: 'custom';
|
|
3
|
+
@import (multiple) '../../theme.config';
|
|
4
|
+
|
|
5
|
+
h1,
|
|
6
|
+
p {
|
|
7
|
+
font-family: Lato;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
body {
|
|
11
|
+
margin: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.gallery-item {
|
|
15
|
+
display: inline-block;
|
|
16
|
+
margin: 5px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.img-responsive {
|
|
20
|
+
display: flex;
|
|
21
|
+
width: 8rem !important;
|
|
22
|
+
height: 8rem !important;
|
|
23
|
+
object-fit: cover;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.image-message {
|
|
27
|
+
opacity: 0.8;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.image-editor-icon {
|
|
31
|
+
border-radius: 0.2rem;
|
|
32
|
+
font-size: 0.8rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ui.image:hover {
|
|
36
|
+
background-color: #e0e1e2;
|
|
37
|
+
border-radius: 0.2rem;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.lightgallery .lg-react-element {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-wrap: wrap;
|
|
44
|
+
}
|
|
45
|
+
@media (ma-width: 770px) {
|
|
46
|
+
.lightgallery .lg-react-element {
|
|
47
|
+
justify-content: center;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -4,21 +4,26 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { Helmet, flattenToAppURL, langmap } from '@plone/volto/helpers';
|
|
7
|
-
import {
|
|
7
|
+
import { useSelector } from 'react-redux';
|
|
8
8
|
|
|
9
9
|
import CclModal from '@eeacms/volto-clms-theme/components/CclModal/CclModal';
|
|
10
|
-
import { FormattedMessage } from 'react-intl';
|
|
10
|
+
import { defineMessages, useIntl, FormattedMessage } from 'react-intl';
|
|
11
11
|
import { Link } from 'react-router-dom';
|
|
12
12
|
import PropTypes from 'prop-types';
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import config from '@plone/volto/registry';
|
|
15
|
-
import cookie from 'react-cookie';
|
|
16
15
|
import cx from 'classnames';
|
|
17
16
|
import { find } from 'lodash';
|
|
18
|
-
import { updateIntl } from 'react-intl-redux';
|
|
19
17
|
|
|
20
18
|
let locales = {};
|
|
21
19
|
|
|
20
|
+
const messages = defineMessages({
|
|
21
|
+
switchLanguageTo: {
|
|
22
|
+
id: 'Switch to',
|
|
23
|
+
defaultMessage: 'Switch to',
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
22
27
|
if (config.settings) {
|
|
23
28
|
config.settings.supportedLanguages.forEach((lang) => {
|
|
24
29
|
import('~/../locales/' + lang + '.json').then((locale) => {
|
|
@@ -31,12 +36,9 @@ function Capitalize(str) {
|
|
|
31
36
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
32
37
|
}
|
|
33
38
|
|
|
34
|
-
const ModalContent = ({
|
|
35
|
-
|
|
36
|
-
currentLang,
|
|
37
|
-
onClickAction,
|
|
38
|
-
changeLanguage,
|
|
39
|
-
}) => {
|
|
39
|
+
const ModalContent = (props) => {
|
|
40
|
+
const intl = useIntl();
|
|
41
|
+
const { translations, currentLang, onClickAction } = props;
|
|
40
42
|
return (
|
|
41
43
|
<div className="ccl-container">
|
|
42
44
|
<div className="modal-language-header">
|
|
@@ -64,6 +66,9 @@ const ModalContent = ({
|
|
|
64
66
|
<span className="language-link" lang-code={lang}>
|
|
65
67
|
{lang !== currentLang ? (
|
|
66
68
|
<Link
|
|
69
|
+
aria-label={`${intl.formatMessage(
|
|
70
|
+
messages.switchLanguageTo,
|
|
71
|
+
)} ${langmap[lang].nativeName.toLowerCase()}`}
|
|
67
72
|
to={
|
|
68
73
|
translation
|
|
69
74
|
? flattenToAppURL(translation['@id'])
|
|
@@ -72,7 +77,6 @@ const ModalContent = ({
|
|
|
72
77
|
title={langmap[lang].nativeName}
|
|
73
78
|
onClick={() => {
|
|
74
79
|
onClickAction();
|
|
75
|
-
changeLanguage(lang);
|
|
76
80
|
}}
|
|
77
81
|
key={`language-selector-${lang}`}
|
|
78
82
|
>
|
|
@@ -92,26 +96,11 @@ const ModalContent = ({
|
|
|
92
96
|
};
|
|
93
97
|
|
|
94
98
|
function CclLanguageSelector(props) {
|
|
95
|
-
const dispatch = useDispatch();
|
|
96
99
|
const currentLang = useSelector((state) => state.intl.locale);
|
|
97
100
|
const translations = useSelector(
|
|
98
101
|
(state) => state.content.data?.['@components']?.translations?.items,
|
|
99
102
|
);
|
|
100
103
|
|
|
101
|
-
function changeLanguage(language) {
|
|
102
|
-
cookie.save('I18N_LANGUAGE', language, {
|
|
103
|
-
expires: new Date((2 ** 31 - 1) * 1000),
|
|
104
|
-
path: '/',
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
dispatch(
|
|
108
|
-
updateIntl({
|
|
109
|
-
locale: language,
|
|
110
|
-
messages: locales[language],
|
|
111
|
-
}),
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
104
|
return config.settings.isMultilingual ? (
|
|
116
105
|
<div className="ccl-header-lang">
|
|
117
106
|
<CclModal
|
|
@@ -129,7 +118,6 @@ function CclLanguageSelector(props) {
|
|
|
129
118
|
translations={translations}
|
|
130
119
|
currentLang={currentLang}
|
|
131
120
|
onClickAction={props.onClickAction}
|
|
132
|
-
changeLanguage={changeLanguage}
|
|
133
121
|
/>
|
|
134
122
|
</CclModal>
|
|
135
123
|
|
|
@@ -142,7 +130,6 @@ function CclLanguageSelector(props) {
|
|
|
142
130
|
translations={translations}
|
|
143
131
|
currentLang={currentLang}
|
|
144
132
|
onClickAction={props.onClickAction}
|
|
145
|
-
changeLanguage={changeLanguage}
|
|
146
133
|
/>
|
|
147
134
|
</CclModal>
|
|
148
135
|
</div>
|
|
@@ -45,33 +45,39 @@ function CclLoginModal() {
|
|
|
45
45
|
size="tiny"
|
|
46
46
|
modalStatus={modalStatus}
|
|
47
47
|
>
|
|
48
|
-
<div className="
|
|
49
|
-
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
<div className="content">
|
|
49
|
+
<div className="modal-login-title">Registration / Login</div>
|
|
50
|
+
<div className="modal-login-text">
|
|
51
|
+
<p>
|
|
52
|
+
This site uses EU Login to handle user registration and login. You
|
|
53
|
+
can read more about this service in the{' '}
|
|
54
|
+
<a href="https://ecas.ec.europa.eu/cas/about.html">
|
|
55
|
+
EU Login site help
|
|
56
|
+
</a>
|
|
57
|
+
.
|
|
58
|
+
</p>
|
|
59
|
+
<p>
|
|
60
|
+
{' '}
|
|
61
|
+
When you clik on the following link, you will be sent to EU Login
|
|
62
|
+
and after a successful login there you will be redirected back to
|
|
63
|
+
this site.
|
|
64
|
+
</p>
|
|
65
|
+
<p>
|
|
66
|
+
If you have any issues or questions, please contact us using the
|
|
67
|
+
<a href="/en/contact-service-helpdesk"> helpdesk</a>.
|
|
68
|
+
</p>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div className="actions">
|
|
72
|
+
<div className="modal-buttons">
|
|
73
|
+
<a
|
|
74
|
+
href={toPublicURL(loginUrl) || '#'}
|
|
75
|
+
className="ccl-button ccl-button-green"
|
|
76
|
+
>
|
|
77
|
+
Login using EU Login
|
|
55
78
|
</a>
|
|
56
|
-
|
|
57
|
-
</p>
|
|
58
|
-
<p>
|
|
59
|
-
{' '}
|
|
60
|
-
When you clik on the following link, you will be sent to EU Login and
|
|
61
|
-
after a successful login there you will be redirected back to this
|
|
62
|
-
site.
|
|
63
|
-
</p>
|
|
64
|
-
<p>
|
|
65
|
-
If you have any issues or questions, please contact us using the
|
|
66
|
-
<a href="/en/contact-service-helpdesk"> helpdesk</a>.
|
|
67
|
-
</p>
|
|
79
|
+
</div>
|
|
68
80
|
</div>
|
|
69
|
-
<a
|
|
70
|
-
href={toPublicURL(loginUrl) || '#'}
|
|
71
|
-
className="ccl-button ccl-button-green"
|
|
72
|
-
>
|
|
73
|
-
Login using EU Login
|
|
74
|
-
</a>
|
|
75
81
|
</CclModal>
|
|
76
82
|
);
|
|
77
83
|
}
|
|
@@ -30,21 +30,17 @@ function CclModal(props) {
|
|
|
30
30
|
className={'modal-clms'}
|
|
31
31
|
size={size}
|
|
32
32
|
>
|
|
33
|
-
<div className={'modal-clms-
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
role="button"
|
|
43
|
-
></span>
|
|
44
|
-
</div>
|
|
45
|
-
{children}
|
|
46
|
-
</div>
|
|
33
|
+
<div className={'modal-close modal-clms-close'}>
|
|
34
|
+
<span
|
|
35
|
+
className="ccl-icon-close"
|
|
36
|
+
aria-label="Close"
|
|
37
|
+
onClick={() => closeModal()}
|
|
38
|
+
onKeyDown={() => closeModal()}
|
|
39
|
+
tabIndex="0"
|
|
40
|
+
role="button"
|
|
41
|
+
></span>
|
|
47
42
|
</div>
|
|
43
|
+
{children}
|
|
48
44
|
</Modal>
|
|
49
45
|
);
|
|
50
46
|
}
|
|
@@ -99,11 +99,6 @@
|
|
|
99
99
|
text-align: right;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
.modal-clms .ccl-button {
|
|
103
|
-
width: 60%;
|
|
104
|
-
margin: 2rem auto 0;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
102
|
.modal-clms hr {
|
|
108
103
|
height: 1px;
|
|
109
104
|
padding: 0;
|
|
@@ -116,6 +111,28 @@
|
|
|
116
111
|
line-height: 1.5rem;
|
|
117
112
|
}
|
|
118
113
|
|
|
114
|
+
.modal-buttons {
|
|
115
|
+
display: flex;
|
|
116
|
+
justify-content: space-between;
|
|
117
|
+
margin: 0 1rem;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.modal-buttons .ccl-button {
|
|
121
|
+
width: auto;
|
|
122
|
+
margin: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.modal-buttons .ccl-button:only-child {
|
|
126
|
+
margin: 0 auto;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@media only screen and (max-width: 767px) {
|
|
130
|
+
.modal-clms.ui.modal > .content,
|
|
131
|
+
.modal-clms.ui.modal > .actions {
|
|
132
|
+
padding: 1.5rem !important;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
119
136
|
/* Language modal */
|
|
120
137
|
.modals.dimmer .ui.scrolling.modal.modal-clms {
|
|
121
138
|
margin-top: 0;
|
package/src/components/Widgets/{DownloadableFilesWidget.jsx → DownloadableFilesTableWidget.jsx}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { ReactTableWidget } from '@eeacms/volto-react-table-widget';
|
|
3
3
|
|
|
4
4
|
const ItemSchema = () => ({
|
|
5
5
|
title: 'Downloadable File',
|
|
@@ -18,6 +18,7 @@ const ItemSchema = () => ({
|
|
|
18
18
|
title: 'Year',
|
|
19
19
|
description: 'Enter the year of this file.',
|
|
20
20
|
type: 'number',
|
|
21
|
+
minimum: 1900,
|
|
21
22
|
},
|
|
22
23
|
version: {
|
|
23
24
|
title: 'Version',
|
|
@@ -36,8 +37,6 @@ const ItemSchema = () => ({
|
|
|
36
37
|
['Raster', 'Raster'],
|
|
37
38
|
['Vector', 'Vector'],
|
|
38
39
|
],
|
|
39
|
-
// type: 'string',
|
|
40
|
-
// controlled vocabulary: 'raster' or 'vector'
|
|
41
40
|
},
|
|
42
41
|
format: {
|
|
43
42
|
title: 'Format',
|
|
@@ -84,15 +83,17 @@ const ItemSchema = () => ({
|
|
|
84
83
|
required: [],
|
|
85
84
|
});
|
|
86
85
|
|
|
87
|
-
const
|
|
86
|
+
const DownloadableFilesTableWidget = (props) => {
|
|
88
87
|
return (
|
|
89
|
-
<
|
|
88
|
+
<ReactTableWidget
|
|
90
89
|
schema={ItemSchema()}
|
|
91
90
|
{...props}
|
|
91
|
+
csvexport={true}
|
|
92
|
+
csvimport={true}
|
|
92
93
|
value={props.value?.items || props.default?.items || []}
|
|
93
94
|
onChange={(id, value) => props.onChange(id, { items: value })}
|
|
94
95
|
/>
|
|
95
96
|
);
|
|
96
97
|
};
|
|
97
98
|
|
|
98
|
-
export default
|
|
99
|
+
export default DownloadableFilesTableWidget;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ObjectListWidget from '@plone/volto/components/manage/Widgets/ObjectListWidget';
|
|
3
|
+
|
|
4
|
+
const ItemSchema = () => ({
|
|
5
|
+
title: 'Product component',
|
|
6
|
+
properties: {
|
|
7
|
+
name: {
|
|
8
|
+
title: 'Name',
|
|
9
|
+
description: 'Enter the name of this component.',
|
|
10
|
+
type: 'string',
|
|
11
|
+
},
|
|
12
|
+
description: {
|
|
13
|
+
title: 'Description',
|
|
14
|
+
description: 'Enter the description of this component.',
|
|
15
|
+
type: 'text',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
fieldsets: [
|
|
19
|
+
{
|
|
20
|
+
id: 'default',
|
|
21
|
+
title: 'Component',
|
|
22
|
+
fields: ['name', 'description'],
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
required: [],
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const ProductComponentsWidget = (props) => {
|
|
29
|
+
return (
|
|
30
|
+
<ObjectListWidget
|
|
31
|
+
schema={ItemSchema()}
|
|
32
|
+
{...props}
|
|
33
|
+
value={props.value?.items || props.default?.items || []}
|
|
34
|
+
onChange={(id, value) => props.onChange(id, { items: value })}
|
|
35
|
+
/>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default ProductComponentsWidget;
|
|
@@ -3,41 +3,44 @@
|
|
|
3
3
|
* @module components/manage/Toolbar/Toolbar
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { BodyClass, getBaseUrl } from '@plone/volto/helpers';
|
|
7
6
|
import React, { Component } from 'react';
|
|
8
7
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { Link } from 'react-router-dom';
|
|
10
|
+
import jwtDecode from 'jwt-decode';
|
|
11
|
+
import { connect } from 'react-redux';
|
|
12
|
+
import { compose } from 'redux';
|
|
13
|
+
import { doesNodeContainClick } from 'semantic-ui-react/dist/commonjs/lib';
|
|
14
|
+
import { withCookies } from 'react-cookie';
|
|
9
15
|
import { filter, find } from 'lodash';
|
|
16
|
+
import cx from 'classnames';
|
|
17
|
+
import config from '@plone/volto/registry';
|
|
18
|
+
|
|
19
|
+
import More from '@plone/volto/components/manage/Toolbar/More';
|
|
20
|
+
import PersonalTools from '@plone/volto/components/manage/Toolbar/PersonalTools';
|
|
21
|
+
import Types from '@plone/volto/components/manage/Toolbar/Types';
|
|
22
|
+
import PersonalInformation from '@plone/volto/components/manage/Preferences/PersonalInformation';
|
|
23
|
+
import PersonalPreferences from '@plone/volto/components/manage/Preferences/PersonalPreferences';
|
|
24
|
+
import StandardWrapper from '@plone/volto/components/manage/Toolbar/StandardWrapper';
|
|
10
25
|
import {
|
|
11
26
|
getTypes,
|
|
12
27
|
listActions,
|
|
13
28
|
setExpandedToolbar,
|
|
14
29
|
unlockContent,
|
|
15
30
|
} from '@plone/volto/actions';
|
|
16
|
-
|
|
17
31
|
import { Icon } from '@plone/volto/components';
|
|
18
|
-
import {
|
|
19
|
-
import More from '@plone/volto/components/manage/Toolbar/More';
|
|
20
|
-
import PersonalInformation from '@plone/volto/components/manage/Preferences/PersonalInformation';
|
|
21
|
-
import PersonalPreferences from '@plone/volto/components/manage/Preferences/PersonalPreferences';
|
|
22
|
-
import PersonalTools from '@plone/volto/components/manage/Toolbar/PersonalTools';
|
|
32
|
+
import { BodyClass, getBaseUrl } from '@plone/volto/helpers';
|
|
23
33
|
import { Pluggable } from '@plone/volto/components/manage/Pluggable';
|
|
24
|
-
|
|
25
|
-
import StandardWrapper from '@plone/volto/components/manage/Toolbar/StandardWrapper';
|
|
26
|
-
import Types from '@plone/volto/components/manage/Toolbar/Types';
|
|
27
|
-
import addSVG from '@plone/volto/icons/add-document.svg';
|
|
28
|
-
import clearSVG from '@plone/volto/icons/clear.svg';
|
|
29
|
-
import { compose } from 'redux';
|
|
30
|
-
import config from '@plone/volto/registry';
|
|
31
|
-
import { connect } from 'react-redux';
|
|
32
|
-
import cookie from 'react-cookie';
|
|
33
|
-
import cx from 'classnames';
|
|
34
|
-
import { doesNodeContainClick } from 'semantic-ui-react/dist/commonjs/lib';
|
|
35
|
-
import folderSVG from '@plone/volto/icons/folder.svg';
|
|
36
|
-
import jwtDecode from 'jwt-decode';
|
|
37
|
-
import moreSVG from '@plone/volto/icons/more.svg';
|
|
34
|
+
|
|
38
35
|
import penSVG from '@plone/volto/icons/pen.svg';
|
|
39
36
|
import unlockSVG from '@plone/volto/icons/unlock.svg';
|
|
37
|
+
import folderSVG from '@plone/volto/icons/folder.svg';
|
|
38
|
+
import addSVG from '@plone/volto/icons/add-document.svg';
|
|
39
|
+
import moreSVG from '@plone/volto/icons/more.svg';
|
|
40
40
|
import userSVG from '@plone/volto/icons/user.svg';
|
|
41
|
+
import clearSVG from '@plone/volto/icons/clear.svg';
|
|
42
|
+
|
|
43
|
+
// import cookie from 'react-cookie';
|
|
41
44
|
|
|
42
45
|
const messages = defineMessages({
|
|
43
46
|
edit: {
|
|
@@ -174,17 +177,21 @@ class Toolbar extends Component {
|
|
|
174
177
|
types: [],
|
|
175
178
|
};
|
|
176
179
|
|
|
177
|
-
state = {
|
|
178
|
-
expanded: cookie.load('toolbar_expanded') !== 'false',
|
|
179
|
-
showMenu: false,
|
|
180
|
-
menuStyle: {},
|
|
181
|
-
menuComponents: [],
|
|
182
|
-
loadedComponents: [],
|
|
183
|
-
hideToolbarBody: false,
|
|
184
|
-
};
|
|
185
|
-
|
|
186
180
|
toolbarWindow = React.createRef();
|
|
187
181
|
|
|
182
|
+
constructor(props) {
|
|
183
|
+
super(props);
|
|
184
|
+
const { cookies } = props;
|
|
185
|
+
this.state = {
|
|
186
|
+
expanded: cookies.get('toolbar_expanded') !== 'false',
|
|
187
|
+
showMenu: false,
|
|
188
|
+
menuStyle: {},
|
|
189
|
+
menuComponents: [],
|
|
190
|
+
loadedComponents: [],
|
|
191
|
+
hideToolbarBody: false,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
|
|
188
195
|
/**
|
|
189
196
|
* Component will mount
|
|
190
197
|
* @method componentDidMount
|
|
@@ -225,8 +232,11 @@ class Toolbar extends Component {
|
|
|
225
232
|
}
|
|
226
233
|
|
|
227
234
|
handleShrink = () => {
|
|
228
|
-
|
|
229
|
-
|
|
235
|
+
const { cookies } = this.props;
|
|
236
|
+
cookies.set('toolbar_expanded', !this.state.expanded, {
|
|
237
|
+
expires: new Date(
|
|
238
|
+
new Date().getTime() + config.settings.cookieExpires * 1000,
|
|
239
|
+
),
|
|
230
240
|
path: '/',
|
|
231
241
|
});
|
|
232
242
|
this.setState(
|
|
@@ -303,6 +313,7 @@ class Toolbar extends Component {
|
|
|
303
313
|
id: 'folderContents',
|
|
304
314
|
});
|
|
305
315
|
const { expanded } = this.state;
|
|
316
|
+
|
|
306
317
|
if (this.props.roles && this.props.roles?.includes('Manager')) {
|
|
307
318
|
return (
|
|
308
319
|
this.props.token && (
|
|
@@ -583,6 +594,7 @@ class Toolbar extends Component {
|
|
|
583
594
|
|
|
584
595
|
export default compose(
|
|
585
596
|
injectIntl,
|
|
597
|
+
withCookies,
|
|
586
598
|
connect(
|
|
587
599
|
(state, props) => ({
|
|
588
600
|
actions: state.actions.actions,
|
package/src/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
// COMPONENTS FOR ROUTES
|
|
2
|
-
import { ContactForm, Search, Sitemap } from '@plone/volto/components';
|
|
3
|
-
// CUSTOMIZED BLOCKS IMPORTS
|
|
4
1
|
import customBlocks, {
|
|
5
2
|
customGroupBlocksOrder,
|
|
6
3
|
} from '@eeacms/volto-clms-theme/components/Blocks/customBlocks';
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
// ROUTE VIEWS
|
|
6
|
+
import { ContactForm, Search, Sitemap } from '@plone/volto/components';
|
|
7
|
+
|
|
8
|
+
// VIEWS
|
|
10
9
|
import CLMSDatasetDetailView from '@eeacms/volto-clms-theme/components/CLMSDatasetDetailView/CLMSDatasetDetailView';
|
|
11
10
|
import CLMSDownloadCartView from './components/CLMSDownloadCartView/CLMSDownloadCartView';
|
|
12
11
|
import CLMSDownloadableFileView from '@eeacms/volto-clms-theme/components/CLMSDownloadableFileView/CLMSDownloadableFileView';
|
|
@@ -21,17 +20,21 @@ import CLMSNewsItemView from '@eeacms/volto-clms-theme/components/CLMSNewsItemVi
|
|
|
21
20
|
import ConfirmSubscriptionView from './components/CLMSSubscriptionView/ConfirmSubscriptionView';
|
|
22
21
|
import ProfileView from './components/CLMSProfileView/CLMSProfileView';
|
|
23
22
|
import SubscriptionView from './components/CLMSSubscriptionView/SubscriptionView';
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
import
|
|
23
|
+
|
|
24
|
+
// WIDGET
|
|
25
|
+
import BoundingWidget from './components/Widgets/BoundingWidget';
|
|
27
26
|
import ContactWidget from './components/Widgets/ContactWidget';
|
|
27
|
+
import DatasetDownloadInformationWidget from './components/Widgets/DatasetDownloadInformationWidget';
|
|
28
28
|
import DistributionInfoWidget from './components/Widgets/DistributionInfoWidget';
|
|
29
|
-
import
|
|
29
|
+
import DownloadableFilesTableWidget from './components/Widgets/DownloadableFilesTableWidget';
|
|
30
30
|
import GeonetworkIdentifiersWidget from './components/Widgets/GeonetworkIdentifiersWidget';
|
|
31
31
|
import MapLayersWidget from './components/Widgets/MapLayersWidget';
|
|
32
|
+
import TabsWidget from './components/Blocks/CustomTemplates/VoltoTabsBlock/TabsWidget';
|
|
32
33
|
import TaxonomyWidget from './components/Widgets/TaxonomyWidget';
|
|
33
|
-
import
|
|
34
|
+
import ProductComponentsWidget from './components/Widgets/ProductComponentsWidget';
|
|
34
35
|
// CUSTOM REDUCERS IMPORT
|
|
36
|
+
import TextLinkWidget from './components/Widgets/TextLinkWidget';
|
|
37
|
+
|
|
35
38
|
import reducers from './reducers';
|
|
36
39
|
|
|
37
40
|
const applyConfig = (config) => {
|
|
@@ -63,7 +66,7 @@ const applyConfig = (config) => {
|
|
|
63
66
|
...config.widgets.widget,
|
|
64
67
|
bounding_widget: BoundingWidget,
|
|
65
68
|
layer_widget: MapLayersWidget,
|
|
66
|
-
downloadable_files_widget:
|
|
69
|
+
downloadable_files_widget: DownloadableFilesTableWidget,
|
|
67
70
|
contact_widget: ContactWidget,
|
|
68
71
|
distribution_info_widget: DistributionInfoWidget,
|
|
69
72
|
geonetwork_identifiers_widget: GeonetworkIdentifiersWidget,
|
|
@@ -73,6 +76,7 @@ const applyConfig = (config) => {
|
|
|
73
76
|
config.widgets.id = {
|
|
74
77
|
...config.widgets.id,
|
|
75
78
|
taxonomy_technical_library_categorization: TaxonomyWidget,
|
|
79
|
+
product_components: ProductComponentsWidget,
|
|
76
80
|
};
|
|
77
81
|
config.settings = {
|
|
78
82
|
...config.settings,
|