@eeacms/volto-n2k 1.0.34 → 1.1.0
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/.eslintrc.js +65 -0
- package/CHANGELOG.md +27 -0
- package/jest-addon.config.js +19 -4
- package/jest.setup.js +65 -0
- package/package.json +6 -5
- package/src/components/manage/Blocks/BodyClass/index.js +2 -2
- package/src/components/manage/Blocks/BodyClass/schema.js +3 -1
- package/src/components/manage/Blocks/BubbleChart/BubbleChart.jsx +4 -4
- package/src/components/manage/Blocks/BubbleChart/View.jsx +2 -2
- package/src/components/manage/Blocks/BubbleChart/index.js +2 -2
- package/src/components/manage/Blocks/CDDACountryProfileMap/View.jsx +4 -9
- package/src/components/manage/Blocks/CDDACountryProfileMap/index.js +2 -2
- package/src/components/manage/Blocks/CarouselHorizontal/index.js +19 -16
- package/src/components/manage/Blocks/CarouselHorizontal/schema.js +30 -11
- package/src/components/manage/Blocks/CddaShape/index.js +2 -2
- package/src/components/manage/Blocks/ConnectedLinkList/index.js +2 -2
- package/src/components/manage/Blocks/ContactBlock/index.js +2 -2
- package/src/components/manage/Blocks/ExplodedPiesChart/index.js +2 -2
- package/src/components/manage/Blocks/ExplodedPiesChart/style.less +1 -1
- package/src/components/manage/Blocks/ExploreHabitats/View.jsx +3 -8
- package/src/components/manage/Blocks/ExploreHabitats/index.js +2 -2
- package/src/components/manage/Blocks/ExploreHabitats/schema.js +3 -1
- package/src/components/manage/Blocks/ExploreSites/View.jsx +3 -8
- package/src/components/manage/Blocks/ExploreSites/index.js +2 -2
- package/src/components/manage/Blocks/ExploreSites/schema.js +3 -1
- package/src/components/manage/Blocks/ExploreSpecies/View.jsx +3 -8
- package/src/components/manage/Blocks/ExploreSpecies/index.js +2 -2
- package/src/components/manage/Blocks/ExploreSpecies/schema.js +3 -1
- package/src/components/manage/Blocks/HabitatClassification/index.js +2 -2
- package/src/components/manage/Blocks/HabitatDistribution/index.js +2 -2
- package/src/components/manage/Blocks/HabitatProtectedSites/index.js +2 -2
- package/src/components/manage/Blocks/HabitatsBanner/Edit.jsx +0 -1
- package/src/components/manage/Blocks/HabitatsBanner/View.jsx +46 -38
- package/src/components/manage/Blocks/HabitatsBanner/index.js +2 -2
- package/src/components/manage/Blocks/HabitatsBanner/style.less +0 -2
- package/src/components/manage/Blocks/ImageText/View.jsx +12 -5
- package/src/components/manage/Blocks/ImageText/index.js +2 -2
- package/src/components/manage/Blocks/ImageText/schema.js +69 -67
- package/src/components/manage/Blocks/LabeledList/index.js +2 -2
- package/src/components/manage/Blocks/LabeledList/style.less +1 -1
- package/src/components/manage/Blocks/Landing/EditBlockWrapper.jsx +3 -3
- package/src/components/manage/Blocks/Landing/index.js +3 -4
- package/src/components/manage/Blocks/Landing/schema.js +1 -1
- package/src/components/manage/Blocks/List/View.jsx +6 -3
- package/src/components/manage/Blocks/List/index.js +2 -2
- package/src/components/manage/Blocks/List/style.less +1 -1
- package/src/components/manage/Blocks/N2KCountryProfileMap/View.jsx +2 -5
- package/src/components/manage/Blocks/N2KCountryProfileMap/index.js +2 -2
- package/src/components/manage/Blocks/NavigationAnchors/index.js +2 -2
- package/src/components/manage/Blocks/NavigationAnchors/schema.js +37 -35
- package/src/components/manage/Blocks/SimpleDataTable/index.js +2 -2
- package/src/components/manage/Blocks/SimpleDataTable/templates/colored/style.less +2 -2
- package/src/components/manage/Blocks/SiteBanner/index.js +2 -2
- package/src/components/manage/Blocks/SiteBanner/style.less +1 -1
- package/src/components/manage/Blocks/SiteHabitatsList/index.js +2 -2
- package/src/components/manage/Blocks/SiteHabitatsList/style.less +2 -2
- package/src/components/manage/Blocks/SiteProtectedHabitats/index.js +2 -2
- package/src/components/manage/Blocks/SiteProtectedHabitats/style.less +1 -1
- package/src/components/manage/Blocks/SiteProtectedSpecies/index.js +2 -2
- package/src/components/manage/Blocks/SiteProtectedSpecies/style.less +1 -1
- package/src/components/manage/Blocks/SiteShape/index.js +2 -2
- package/src/components/manage/Blocks/SiteSpeciesList/index.js +2 -2
- package/src/components/manage/Blocks/SlateSVG/styles.less +1 -1
- package/src/components/manage/Blocks/SpeciesBanner/Edit.jsx +0 -1
- package/src/components/manage/Blocks/SpeciesBanner/View.jsx +7 -4
- package/src/components/manage/Blocks/SpeciesBanner/index.js +2 -2
- package/src/components/manage/Blocks/SpeciesBanner/style.less +0 -2
- package/src/components/manage/Blocks/SpeciesClassification/index.js +2 -2
- package/src/components/manage/Blocks/SpeciesDistribution/index.js +2 -2
- package/src/components/manage/Blocks/SpeciesProtectedSites/index.js +2 -2
- package/src/components/manage/Blocks/StackedBarChart/StackedBars.jsx +4 -10
- package/src/components/manage/Blocks/StackedBarChart/View.jsx +2 -2
- package/src/components/manage/Blocks/StackedBarChart/index.js +2 -2
- package/src/components/manage/Blocks/StatusList/index.js +2 -2
- package/src/components/manage/Blocks/StatusList/style.less +1 -1
- package/src/components/manage/Blocks/TilesImages/index.js +2 -2
- package/src/components/manage/Blocks/TilesImages/schema.js +47 -45
- package/src/components/theme/AppExtras/index.js +2 -2
- package/src/customizations/@eeacms/volto-group-block/components/manage/Blocks/Group/EditBlockWrapper.jsx +2 -8
- package/src/less/styles.less +5 -5
- package/.project.eslintrc.js +0 -49
|
@@ -38,39 +38,41 @@ const linksSchema = () => ({
|
|
|
38
38
|
required: [],
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
-
export default ()
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
41
|
+
export default function getSchema() {
|
|
42
|
+
return {
|
|
43
|
+
title: 'Navigation anchors',
|
|
44
|
+
fieldsets: [
|
|
45
|
+
{
|
|
46
|
+
id: 'default',
|
|
47
|
+
title: 'Default',
|
|
48
|
+
fields: ['sticky', 'className', 'align', 'links'],
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
properties: {
|
|
52
|
+
sticky: {
|
|
53
|
+
title: 'Sticky',
|
|
54
|
+
type: 'boolean',
|
|
55
|
+
default: true,
|
|
56
|
+
},
|
|
57
|
+
className: {
|
|
58
|
+
title: 'Class',
|
|
59
|
+
widget: 'textarea',
|
|
60
|
+
},
|
|
61
|
+
align: {
|
|
62
|
+
title: 'Align',
|
|
63
|
+
choices: [
|
|
64
|
+
['flex-start', 'Left'],
|
|
65
|
+
['flex-end', 'Right'],
|
|
66
|
+
['center', 'Center'],
|
|
67
|
+
],
|
|
68
|
+
defaultValue: 'flex-start',
|
|
69
|
+
},
|
|
70
|
+
links: {
|
|
71
|
+
title: 'Links',
|
|
72
|
+
schema: linksSchema(),
|
|
73
|
+
widget: 'object_list',
|
|
74
|
+
},
|
|
55
75
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
align: {
|
|
61
|
-
title: 'Align',
|
|
62
|
-
choices: [
|
|
63
|
-
['flex-start', 'Left'],
|
|
64
|
-
['flex-end', 'Right'],
|
|
65
|
-
['center', 'Center'],
|
|
66
|
-
],
|
|
67
|
-
defaultValue: 'flex-start',
|
|
68
|
-
},
|
|
69
|
-
links: {
|
|
70
|
-
title: 'Links',
|
|
71
|
-
schema: linksSchema(),
|
|
72
|
-
widget: 'object_list',
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
required: [],
|
|
76
|
-
});
|
|
76
|
+
required: [],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ColoredTableView, coloredTableSchema } from './templates/colored';
|
|
2
2
|
|
|
3
|
-
export default (config)
|
|
3
|
+
export default function applyConfig(config) {
|
|
4
4
|
config.blocks.blocksConfig.simpleDataConnectedTable = {
|
|
5
5
|
...config.blocks.blocksConfig.simpleDataConnectedTable,
|
|
6
6
|
templates: {
|
|
@@ -13,4 +13,4 @@ export default (config) => {
|
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
15
|
return config;
|
|
16
|
-
}
|
|
16
|
+
}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
table {
|
|
4
4
|
overflow: hidden;
|
|
5
5
|
width: auto;
|
|
6
|
+
border-radius: 12px !important;
|
|
6
7
|
background: #fff !important;
|
|
7
8
|
border-collapse: separate !important;
|
|
8
|
-
border-radius: 12px !important;
|
|
9
9
|
|
|
10
10
|
thead,
|
|
11
11
|
td {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
display: block;
|
|
36
36
|
width: 16px;
|
|
37
37
|
height: 16px;
|
|
38
|
-
margin-right: 0.5rem;
|
|
39
38
|
border-radius: 50%;
|
|
39
|
+
margin-right: 0.5rem;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
> * {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import SiteBannerView from './View';
|
|
2
2
|
import getSchema from './schema';
|
|
3
3
|
|
|
4
|
-
export default (config)
|
|
4
|
+
export default function applyConfig(config) {
|
|
5
5
|
config.blocks.blocksConfig.custom_connected_block = {
|
|
6
6
|
...config.blocks.blocksConfig.custom_connected_block,
|
|
7
7
|
blocks: {
|
|
@@ -14,4 +14,4 @@ export default (config) => {
|
|
|
14
14
|
},
|
|
15
15
|
};
|
|
16
16
|
return config;
|
|
17
|
-
}
|
|
17
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import SiteHabitatsList from './View';
|
|
2
2
|
import getSchema from './schema';
|
|
3
3
|
|
|
4
|
-
export default (config)
|
|
4
|
+
export default function applyConfig(config) {
|
|
5
5
|
config.blocks.blocksConfig.custom_connected_block = {
|
|
6
6
|
...config.blocks.blocksConfig.custom_connected_block,
|
|
7
7
|
blocks: {
|
|
@@ -14,4 +14,4 @@ export default (config) => {
|
|
|
14
14
|
},
|
|
15
15
|
};
|
|
16
16
|
return config;
|
|
17
|
-
}
|
|
17
|
+
}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
.habitat {
|
|
7
7
|
padding: 1rem 2rem;
|
|
8
8
|
border: 1px solid #e8e8e8;
|
|
9
|
+
border-radius: 10px;
|
|
9
10
|
margin-bottom: 1rem;
|
|
10
11
|
background-color: #fff !important;
|
|
11
|
-
border-radius: 10px;
|
|
12
12
|
|
|
13
13
|
.habitat-toolbar {
|
|
14
14
|
display: flex;
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
.count {
|
|
37
37
|
width: 24px;
|
|
38
38
|
height: 24px;
|
|
39
|
+
border-radius: 6px;
|
|
39
40
|
margin-bottom: 0;
|
|
40
41
|
background-color: #00a390;
|
|
41
|
-
border-radius: 6px;
|
|
42
42
|
color: #fff !important;
|
|
43
43
|
font-weight: bold;
|
|
44
44
|
line-height: 24px;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import SiteProtectedHabitatsView from './View';
|
|
2
2
|
import getSchema from './schema';
|
|
3
3
|
|
|
4
|
-
export default (config)
|
|
4
|
+
export default function applyConfig(config) {
|
|
5
5
|
config.blocks.blocksConfig.custom_connected_block = {
|
|
6
6
|
...config.blocks.blocksConfig.custom_connected_block,
|
|
7
7
|
blocks: {
|
|
@@ -14,4 +14,4 @@ export default (config) => {
|
|
|
14
14
|
},
|
|
15
15
|
};
|
|
16
16
|
return config;
|
|
17
|
-
}
|
|
17
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import SiteProtectedSpeciesView from './View';
|
|
2
2
|
import getSchema from './schema';
|
|
3
3
|
|
|
4
|
-
export default (config)
|
|
4
|
+
export default function applyConfig(config) {
|
|
5
5
|
config.blocks.blocksConfig.custom_connected_block = {
|
|
6
6
|
...config.blocks.blocksConfig.custom_connected_block,
|
|
7
7
|
blocks: {
|
|
@@ -14,4 +14,4 @@ export default (config) => {
|
|
|
14
14
|
},
|
|
15
15
|
};
|
|
16
16
|
return config;
|
|
17
|
-
}
|
|
17
|
+
}
|
|
@@ -7,7 +7,7 @@ export function getSiteShapeURL(site_code) {
|
|
|
7
7
|
);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export default (config)
|
|
10
|
+
export default function applyConfig(config) {
|
|
11
11
|
config.blocks.blocksConfig.custom_connected_block = {
|
|
12
12
|
...config.blocks.blocksConfig.custom_connected_block,
|
|
13
13
|
blocks: {
|
|
@@ -20,4 +20,4 @@ export default (config) => {
|
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
22
|
return config;
|
|
23
|
-
}
|
|
23
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import SiteSpeciesList from './View';
|
|
2
2
|
import getSchema from './schema';
|
|
3
3
|
|
|
4
|
-
export default (config)
|
|
4
|
+
export default function applyConfig(config) {
|
|
5
5
|
config.blocks.blocksConfig.custom_connected_block = {
|
|
6
6
|
...config.blocks.blocksConfig.custom_connected_block,
|
|
7
7
|
blocks: {
|
|
@@ -14,4 +14,4 @@ export default (config) => {
|
|
|
14
14
|
},
|
|
15
15
|
};
|
|
16
16
|
return config;
|
|
17
|
-
}
|
|
17
|
+
}
|
|
@@ -3,7 +3,6 @@ import { SidebarPortal } from '@plone/volto/components';
|
|
|
3
3
|
import BlockDataForm from '@plone/volto/components/manage/Form/BlockDataForm';
|
|
4
4
|
import getSchema from './schema';
|
|
5
5
|
import View from './View';
|
|
6
|
-
import './style.less';
|
|
7
6
|
|
|
8
7
|
const Edit = (props) => {
|
|
9
8
|
const schema = useMemo(() => getSchema(props), [props]);
|
|
@@ -10,6 +10,7 @@ import { connectToMultipleProviders } from '@eeacms/volto-datablocks/hocs';
|
|
|
10
10
|
import { replaceQueryParam } from '@eeacms/volto-n2k/helpers';
|
|
11
11
|
import arrowLeft from '@eeacms/volto-n2k/icons/arrow-left.svg';
|
|
12
12
|
import arrowRight from '@eeacms/volto-n2k/icons/arrow-right.svg';
|
|
13
|
+
|
|
13
14
|
import './style.less';
|
|
14
15
|
|
|
15
16
|
const SwiperLoader = loadable.lib(() => import('swiper'));
|
|
@@ -31,8 +32,10 @@ const _View = (props) => {
|
|
|
31
32
|
props.data.species_pictures_provider,
|
|
32
33
|
);
|
|
33
34
|
const species = props.providers_data?.[species_provider] || {};
|
|
34
|
-
const species_pictures =
|
|
35
|
-
props.providers_data?.[species_pictures_provider] || {}
|
|
35
|
+
const species_pictures = useMemo(
|
|
36
|
+
() => props.providers_data?.[species_pictures_provider] || {},
|
|
37
|
+
[props.providers_data, species_pictures_provider],
|
|
38
|
+
);
|
|
36
39
|
|
|
37
40
|
const {
|
|
38
41
|
author = [],
|
|
@@ -205,10 +208,10 @@ const View = compose(
|
|
|
205
208
|
})),
|
|
206
209
|
)(_View);
|
|
207
210
|
|
|
208
|
-
export default (props)
|
|
211
|
+
export default function $View(props) {
|
|
209
212
|
return (
|
|
210
213
|
<VisibilitySensor Placeholder={() => <div>loading.... </div>}>
|
|
211
214
|
<View {...props} />
|
|
212
215
|
</VisibilitySensor>
|
|
213
216
|
);
|
|
214
|
-
}
|
|
217
|
+
}
|
|
@@ -2,7 +2,7 @@ import worldSVG from '@plone/volto/icons/world.svg';
|
|
|
2
2
|
import Edit from './Edit';
|
|
3
3
|
import View from './View';
|
|
4
4
|
|
|
5
|
-
export default (config)
|
|
5
|
+
export default function applyConfig(config) {
|
|
6
6
|
config.blocks.blocksConfig.species_banner = {
|
|
7
7
|
id: 'species_banner',
|
|
8
8
|
title: 'Species banner',
|
|
@@ -21,4 +21,4 @@ export default (config) => {
|
|
|
21
21
|
blockHasOwnFocusManagement: false,
|
|
22
22
|
};
|
|
23
23
|
return config;
|
|
24
|
-
}
|
|
24
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import SpeciesClassification from './View';
|
|
2
2
|
import getSchema from './schema';
|
|
3
3
|
|
|
4
|
-
export default (config)
|
|
4
|
+
export default function applyConfig(config) {
|
|
5
5
|
config.blocks.blocksConfig.custom_connected_block = {
|
|
6
6
|
...config.blocks.blocksConfig.custom_connected_block,
|
|
7
7
|
blocks: {
|
|
@@ -14,4 +14,4 @@ export default (config) => {
|
|
|
14
14
|
},
|
|
15
15
|
};
|
|
16
16
|
return config;
|
|
17
|
-
}
|
|
17
|
+
}
|
|
@@ -13,7 +13,7 @@ export function getSpeciesDistributionURL(code_2000, isBird) {
|
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export default (config)
|
|
16
|
+
export default function applyConfig(config) {
|
|
17
17
|
config.blocks.blocksConfig.custom_connected_block = {
|
|
18
18
|
...config.blocks.blocksConfig.custom_connected_block,
|
|
19
19
|
blocks: {
|
|
@@ -26,4 +26,4 @@ export default (config) => {
|
|
|
26
26
|
},
|
|
27
27
|
};
|
|
28
28
|
return config;
|
|
29
|
-
}
|
|
29
|
+
}
|
|
@@ -7,7 +7,7 @@ export function getSpeciesProtectedSitesURL(code_2000) {
|
|
|
7
7
|
);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export default (config)
|
|
10
|
+
export default function applyConfig(config) {
|
|
11
11
|
config.blocks.blocksConfig.custom_connected_block = {
|
|
12
12
|
...config.blocks.blocksConfig.custom_connected_block,
|
|
13
13
|
blocks: {
|
|
@@ -20,4 +20,4 @@ export default (config) => {
|
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
22
|
return config;
|
|
23
|
-
}
|
|
23
|
+
}
|
|
@@ -13,15 +13,8 @@ const getSerieData = (serie) => {
|
|
|
13
13
|
function StackedBars(props) {
|
|
14
14
|
const { d3 } = props;
|
|
15
15
|
const { scaleOrdinal, stack } = d3;
|
|
16
|
-
const {
|
|
17
|
-
|
|
18
|
-
height,
|
|
19
|
-
width,
|
|
20
|
-
margin,
|
|
21
|
-
scales,
|
|
22
|
-
popup,
|
|
23
|
-
setPopup,
|
|
24
|
-
} = React.useContext(ChartContext);
|
|
16
|
+
const { element, height, width, margin, scales, popup, setPopup } =
|
|
17
|
+
React.useContext(ChartContext);
|
|
25
18
|
const { data = {}, keys = [], hoverText = '{}' } = props;
|
|
26
19
|
|
|
27
20
|
if (!keys?.length || !scales?.xScale || !scales?.yScale) {
|
|
@@ -62,7 +55,8 @@ function StackedBars(props) {
|
|
|
62
55
|
onFocus={() => {}}
|
|
63
56
|
onBlur={() => {}}
|
|
64
57
|
onMouseMoveCapture={(event) => {
|
|
65
|
-
const elementPosition =
|
|
58
|
+
const elementPosition =
|
|
59
|
+
element.parentNode.getBoundingClientRect();
|
|
66
60
|
setPopup({
|
|
67
61
|
id: `${serieIndex}_${rectIndex}_${rect.key}`,
|
|
68
62
|
clientX: event.clientX - elementPosition.x,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import Chart from './Chart';
|
|
3
3
|
import StackedBars from './StackedBars';
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ const View = (props) => {
|
|
|
13
13
|
y_label_key = 'assessment',
|
|
14
14
|
y_value_key = 'quantity',
|
|
15
15
|
} = props;
|
|
16
|
-
const data = props.provider_data || {};
|
|
16
|
+
const data = useMemo(() => props.provider_data || {}, [props.provider_data]);
|
|
17
17
|
|
|
18
18
|
React.useEffect(() => {
|
|
19
19
|
if (!(data[x_label_key]?.length && data[y_label_key]?.length)) return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import StackedBarChart from './View';
|
|
2
2
|
import getSchema from './schema';
|
|
3
3
|
|
|
4
|
-
export default (config)
|
|
4
|
+
export default function applyConfig(config) {
|
|
5
5
|
config.blocks.blocksConfig.custom_connected_block = {
|
|
6
6
|
...config.blocks.blocksConfig.custom_connected_block,
|
|
7
7
|
blocks: {
|
|
@@ -14,4 +14,4 @@ export default (config) => {
|
|
|
14
14
|
},
|
|
15
15
|
};
|
|
16
16
|
return config;
|
|
17
|
-
}
|
|
17
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import StatusListView from './View';
|
|
2
2
|
import getSchema from './schema';
|
|
3
3
|
|
|
4
|
-
export default (config)
|
|
4
|
+
export default function applyConfig(config) {
|
|
5
5
|
config.blocks.blocksConfig.custom_connected_block = {
|
|
6
6
|
...config.blocks.blocksConfig.custom_connected_block,
|
|
7
7
|
blocks: {
|
|
@@ -14,4 +14,4 @@ export default (config) => {
|
|
|
14
14
|
},
|
|
15
15
|
};
|
|
16
16
|
return config;
|
|
17
|
-
}
|
|
17
|
+
}
|
|
@@ -2,7 +2,7 @@ import TilesImagesEdit from './Edit';
|
|
|
2
2
|
import TilesImagesView from './View';
|
|
3
3
|
import worldSVG from '@plone/volto/icons/world.svg';
|
|
4
4
|
|
|
5
|
-
export default (config)
|
|
5
|
+
export default function applyConfig(config) {
|
|
6
6
|
config.blocks.blocksConfig.tiles_images = {
|
|
7
7
|
id: 'tiles_images',
|
|
8
8
|
title: 'Tiles images',
|
|
@@ -20,4 +20,4 @@ export default (config) => {
|
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
22
|
return config;
|
|
23
|
-
}
|
|
23
|
+
}
|
|
@@ -23,49 +23,51 @@ const imageSchema = {
|
|
|
23
23
|
required: ['url', 'title'],
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
export default ()
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
26
|
+
export default function getSchema() {
|
|
27
|
+
return {
|
|
28
|
+
title: 'Tiles images',
|
|
29
|
+
fieldsets: [
|
|
30
|
+
{
|
|
31
|
+
id: 'default',
|
|
32
|
+
title: 'Default',
|
|
33
|
+
fields: ['theme', 'images'],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 'advanced',
|
|
37
|
+
title: 'Advanced',
|
|
38
|
+
fields: ['size', 'hasBorder', 'rounded'],
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
properties: {
|
|
42
|
+
size: {
|
|
43
|
+
title: 'Tiles size',
|
|
44
|
+
type: 'number',
|
|
45
|
+
},
|
|
46
|
+
hasBorder: {
|
|
47
|
+
title: 'With border',
|
|
48
|
+
type: 'boolean',
|
|
49
|
+
default: true,
|
|
50
|
+
},
|
|
51
|
+
rounded: {
|
|
52
|
+
title: 'Rounded',
|
|
53
|
+
type: 'boolean',
|
|
54
|
+
default: true,
|
|
55
|
+
},
|
|
56
|
+
theme: {
|
|
57
|
+
title: 'Theme',
|
|
58
|
+
choices: [
|
|
59
|
+
['light', 'Light'],
|
|
60
|
+
['grey', 'Grey'],
|
|
61
|
+
['dark', 'Dark'],
|
|
62
|
+
],
|
|
63
|
+
default: 'light',
|
|
64
|
+
},
|
|
65
|
+
images: {
|
|
66
|
+
title: 'Images',
|
|
67
|
+
widget: 'object_list',
|
|
68
|
+
schema: imageSchema,
|
|
69
|
+
},
|
|
54
70
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
['light', 'Light'],
|
|
59
|
-
['grey', 'Grey'],
|
|
60
|
-
['dark', 'Dark'],
|
|
61
|
-
],
|
|
62
|
-
default: 'light',
|
|
63
|
-
},
|
|
64
|
-
images: {
|
|
65
|
-
title: 'Images',
|
|
66
|
-
widget: 'object_list_inline',
|
|
67
|
-
schema: imageSchema,
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
required: [],
|
|
71
|
-
});
|
|
71
|
+
required: [],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import HashLink from './HashLink';
|
|
2
2
|
|
|
3
|
-
export default (config)
|
|
3
|
+
export default function applyConfig(config) {
|
|
4
4
|
config.settings.appExtras = [
|
|
5
5
|
...(config.settings.appExtras || []),
|
|
6
6
|
{
|
|
@@ -10,4 +10,4 @@ export default (config) => {
|
|
|
10
10
|
];
|
|
11
11
|
|
|
12
12
|
return config;
|
|
13
|
-
}
|
|
13
|
+
}
|
|
@@ -61,14 +61,8 @@ class EditBlockWrapper extends React.Component {
|
|
|
61
61
|
blockNode = React.createRef();
|
|
62
62
|
|
|
63
63
|
render() {
|
|
64
|
-
const {
|
|
65
|
-
|
|
66
|
-
blockProps,
|
|
67
|
-
draginfo,
|
|
68
|
-
extraControls,
|
|
69
|
-
disabled,
|
|
70
|
-
children,
|
|
71
|
-
} = this.props;
|
|
64
|
+
const { intl, blockProps, draginfo, extraControls, disabled, children } =
|
|
65
|
+
this.props;
|
|
72
66
|
|
|
73
67
|
const {
|
|
74
68
|
allowedBlocks,
|
package/src/less/styles.less
CHANGED
|
@@ -296,10 +296,10 @@ body.grey-bg {
|
|
|
296
296
|
|
|
297
297
|
.item.firstLevel.at-glance {
|
|
298
298
|
align-self: stretch;
|
|
299
|
+
border-radius: 0 0 10px 10px;
|
|
299
300
|
margin-top: -1rem;
|
|
300
301
|
margin-bottom: -1rem;
|
|
301
302
|
background: #00a390 0 0 no-repeat padding-box;
|
|
302
|
-
border-radius: 0 0 10px 10px;
|
|
303
303
|
color: #fff;
|
|
304
304
|
cursor: pointer;
|
|
305
305
|
|
|
@@ -358,9 +358,9 @@ body.grey-bg {
|
|
|
358
358
|
position: relative;
|
|
359
359
|
width: 3em;
|
|
360
360
|
height: 3em;
|
|
361
|
+
border-radius: 10em;
|
|
361
362
|
margin-bottom: 1.5rem;
|
|
362
363
|
background-color: #fff !important;
|
|
363
|
-
border-radius: 10em;
|
|
364
364
|
box-shadow: 0px 4px 9px -6px #000000;
|
|
365
365
|
|
|
366
366
|
&:hover {
|
|
@@ -587,22 +587,22 @@ img.slick-image {
|
|
|
587
587
|
|
|
588
588
|
> a.active:nth-child(1),
|
|
589
589
|
> a.active:hover:nth-child(1) {
|
|
590
|
-
background: #4aa47f;
|
|
591
590
|
border-radius: 4px;
|
|
591
|
+
background: #4aa47f;
|
|
592
592
|
color: #fff;
|
|
593
593
|
}
|
|
594
594
|
|
|
595
595
|
> a.active:nth-child(2),
|
|
596
596
|
> a.active:hover:nth-child(2) {
|
|
597
|
-
background: #b78730;
|
|
598
597
|
border-radius: 4px;
|
|
598
|
+
background: #b78730;
|
|
599
599
|
color: #fff;
|
|
600
600
|
}
|
|
601
601
|
|
|
602
602
|
> a.active:nth-child(3),
|
|
603
603
|
> a.active:hover:nth-child(3) {
|
|
604
|
-
background: #2e80ec;
|
|
605
604
|
border-radius: 4px;
|
|
605
|
+
background: #2e80ec;
|
|
606
606
|
color: #fff;
|
|
607
607
|
}
|
|
608
608
|
}
|