@eeacms/volto-eea-website-policy 0.2.2 → 0.2.5

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 CHANGED
@@ -4,9 +4,43 @@ 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
+ #### [0.2.5](https://github.com/eea/volto-eea-website-policy/compare/0.2.4...0.2.5)
8
+
9
+ - Rounded card via style wrapper [`6728684`](https://github.com/eea/volto-eea-website-policy/commit/67286844b00902aa4c6b316b50be35db95c531f0)
10
+ - Revert "Rounded Card variation - refs #148723" [`0168a86`](https://github.com/eea/volto-eea-website-policy/commit/0168a86fa644a9b848e37c7f5054eb4308c36784)
11
+ - Disable Image Cards block [`3ed8dc3`](https://github.com/eea/volto-eea-website-policy/commit/3ed8dc311cad8e30a8c918ecec7b21cc99260c50)
12
+ - Rounded Card variation - refs #148723 [`4b46731`](https://github.com/eea/volto-eea-website-policy/commit/4b46731e25962bbb6e7159d0db8a9a642a95eb53)
13
+
14
+ #### [0.2.4](https://github.com/eea/volto-eea-website-policy/compare/0.2.3...0.2.4)
15
+
16
+ > 13 June 2022
17
+
18
+ - Release [`#10`](https://github.com/eea/volto-eea-website-policy/pull/10)
19
+ - Fix listing block title: Listing (Content) [`cec2760`](https://github.com/eea/volto-eea-website-policy/commit/cec276082c3fc1b5486c996c3746a6958fb3a1a9)
20
+ - Add theme to teaser stylewrapper [`60eeb28`](https://github.com/eea/volto-eea-website-policy/commit/60eeb28b7793708c59d0af73ffb09895e8f2c87d)
21
+ - Fix className vs class warning [`fea1603`](https://github.com/eea/volto-eea-website-policy/commit/fea1603eefd628d57640a6b94ddbbb7edfb0d841)
22
+ - Custom card view for teaser [`c8eded0`](https://github.com/eea/volto-eea-website-policy/commit/c8eded011b8317cce9f842526f5d86771f54797b)
23
+
24
+ #### [0.2.3](https://github.com/eea/volto-eea-website-policy/compare/0.2.2...0.2.3)
25
+
26
+ > 10 June 2022
27
+
28
+ - Add Item block [`#9`](https://github.com/eea/volto-eea-website-policy/pull/9)
29
+ - prettier fix [`c2a6d2d`](https://github.com/eea/volto-eea-website-policy/commit/c2a6d2d3b12ce771b9b4413c5a6db157ccd9d1fc)
30
+ - Update index.js [`fb73895`](https://github.com/eea/volto-eea-website-policy/commit/fb7389509bc7e207942762c5e02a93d0168a6fba)
31
+ - removed change from commit 719e3778 [`29e636b`](https://github.com/eea/volto-eea-website-policy/commit/29e636b34ab02992c67cc5960f4dc6b21b1b4e71)
32
+ - added navDepth to level 4 in order to fill mega menu [`719e377`](https://github.com/eea/volto-eea-website-policy/commit/719e37785cfa2ed37568c82a34dc470b52483d04)
33
+ - Rearrange Block Chooser [`9a5c118`](https://github.com/eea/volto-eea-website-policy/commit/9a5c1187ba21fa1898394a4b6cf6dd68bd68f258)
34
+ - Move Item block un components folder [`9fb6ab2`](https://github.com/eea/volto-eea-website-policy/commit/9fb6ab2fb02cc5c1a7e25367de5ebe7109bd3dc4)
35
+ - Set default sizes for image & icon in Item block [`af22ec7`](https://github.com/eea/volto-eea-website-policy/commit/af22ec78b2c6fd1d033dc1acfec5e64f8926cd77)
36
+ - Add helpers functions [`353581c`](https://github.com/eea/volto-eea-website-policy/commit/353581cc6602b5e573eee93c74a67656203c0968)
37
+ - Add Teaser block folder's structure [`9457dd4`](https://github.com/eea/volto-eea-website-policy/commit/9457dd4ffaa2631eceb46bfd1ec2d201e8b3d7a8)
38
+
7
39
  #### [0.2.2](https://github.com/eea/volto-eea-website-policy/compare/0.2.1...0.2.2)
8
40
 
9
- - Install callout and remove blockquote - refs #148688 [`53ba5a7`](https://github.com/eea/volto-eea-website-policy/commit/53ba5a7153e30f4f41221323393e41d53132fdae)
41
+ > 24 May 2022
42
+
43
+ - Install callout and remove blockquote - refs #148688 [`#8`](https://github.com/eea/volto-eea-website-policy/pull/8)
10
44
 
11
45
  #### [0.2.1](https://github.com/eea/volto-eea-website-policy/compare/0.2.0...0.2.1)
12
46
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-website-policy",
3
- "version": "0.2.2",
3
+ "version": "0.2.5",
4
4
  "description": "@eeacms/volto-eea-website-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -0,0 +1,98 @@
1
+ import React from 'react';
2
+ import { connect } from 'react-redux';
3
+ import config from '@plone/volto/registry';
4
+ import { BlockDataForm, SidebarPortal } from '@plone/volto/components';
5
+ import SlateEditor from 'volto-slate/editor/SlateEditor';
6
+ import { handleKey } from 'volto-slate/blocks/Text/keyboard';
7
+ import { uploadContent, saveSlateBlockSelection } from 'volto-slate/actions';
8
+
9
+ import { createSlateParagraph } from '@eeacms/volto-eea-website-policy/helpers';
10
+
11
+ import Item from './Item';
12
+ import getSchema from './schema';
13
+
14
+ const Edit = (props) => {
15
+ const { slate } = config.settings;
16
+ const {
17
+ data = {},
18
+ block = null,
19
+ selected = false,
20
+ index,
21
+ properties,
22
+ onChangeBlock,
23
+ onSelectBlock,
24
+ } = props;
25
+ const { description } = data;
26
+ const schema = React.useMemo(() => getSchema(props), [props]);
27
+
28
+ const withBlockProperties = React.useCallback(
29
+ (editor) => {
30
+ editor.getBlockProps = () => props;
31
+ return editor;
32
+ },
33
+ [props],
34
+ );
35
+
36
+ const handleFocus = React.useCallback(() => {
37
+ if (!selected) {
38
+ onSelectBlock(block);
39
+ }
40
+ }, [onSelectBlock, selected, block]);
41
+
42
+ return (
43
+ <>
44
+ <Item {...data} mode="edit">
45
+ <SlateEditor
46
+ index={index}
47
+ properties={properties}
48
+ extensions={slate.textblockExtensions}
49
+ renderExtensions={[withBlockProperties]}
50
+ value={createSlateParagraph(description)}
51
+ onChange={(description) => {
52
+ onChangeBlock(block, {
53
+ ...data,
54
+ description,
55
+ });
56
+ }}
57
+ block={block}
58
+ onFocus={handleFocus}
59
+ onKeyDown={handleKey}
60
+ selected={selected}
61
+ placeholder="Add item description..."
62
+ slateSettings={slate}
63
+ />
64
+ </Item>
65
+ <SidebarPortal selected={selected}>
66
+ <BlockDataForm
67
+ block={block}
68
+ schema={schema}
69
+ title={schema.title}
70
+ onChangeField={(id, value) => {
71
+ onChangeBlock(block, {
72
+ ...data,
73
+ [id]: value,
74
+ });
75
+ }}
76
+ formData={data}
77
+ />
78
+ </SidebarPortal>
79
+ </>
80
+ );
81
+ };
82
+
83
+ export default connect(
84
+ (state, props) => {
85
+ const blockId = props.block;
86
+ return {
87
+ defaultSelection: blockId
88
+ ? state.slate_block_selections?.[blockId]
89
+ : null,
90
+ uploadRequest: state.upload_content?.[props.block]?.upload || {},
91
+ uploadedContent: state.upload_content?.[props.block]?.data || {},
92
+ };
93
+ },
94
+ {
95
+ uploadContent,
96
+ saveSlateBlockSelection, // needed as editor blockProps
97
+ },
98
+ )(Edit);
@@ -0,0 +1,50 @@
1
+ import cx from 'classnames';
2
+ import { Item as UiItem, Icon } from 'semantic-ui-react';
3
+ import { serializeText } from '@eeacms/volto-eea-website-policy/helpers';
4
+
5
+ function Item({
6
+ assetType,
7
+ children,
8
+ description,
9
+ extra,
10
+ header,
11
+ icon,
12
+ iconSize = 'huge',
13
+ iconTheme,
14
+ image,
15
+ imageSize = 'tile',
16
+ meta,
17
+ mode = 'view',
18
+ styles = {},
19
+ }) {
20
+ const { verticalAlign } = styles;
21
+ return (
22
+ <UiItem.Group unstackable className="row">
23
+ <UiItem className={cx(styles?.theme)}>
24
+ {assetType === 'image' && image && (
25
+ <UiItem.Image
26
+ src={`${image}/@@images/image/preview`}
27
+ className={cx('ui', imageSize)}
28
+ alt={header || 'Item image'}
29
+ />
30
+ )}
31
+ {assetType === 'icon' && icon && (
32
+ <Icon className={cx(icon, iconTheme)} size={iconSize} />
33
+ )}
34
+ <UiItem.Content verticalAlign={verticalAlign}>
35
+ {header && <UiItem.Header>{header}</UiItem.Header>}
36
+ {meta && <UiItem.Meta>{meta}</UiItem.Meta>}
37
+ {description && mode === 'view' && (
38
+ <UiItem.Description>
39
+ {serializeText(description)}
40
+ </UiItem.Description>
41
+ )}
42
+ {mode === 'edit' && children}
43
+ {extra && <UiItem.Extra>{extra}</UiItem.Extra>}
44
+ </UiItem.Content>
45
+ </UiItem>
46
+ </UiItem.Group>
47
+ );
48
+ }
49
+
50
+ export default Item;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import Item from './Item';
3
+
4
+ const View = (props) => {
5
+ const { data = {} } = props;
6
+ return <Item {...data} />;
7
+ };
8
+
9
+ export default View;
@@ -0,0 +1,32 @@
1
+ import codeSVG from '@plone/volto/icons/code.svg';
2
+ import ItemEdit from './Edit';
3
+ import ItemView from './View';
4
+ import { stylingSchema } from './schema';
5
+
6
+ export default (config) => {
7
+ config.blocks.blocksConfig.item = {
8
+ id: 'item',
9
+ title: 'Item',
10
+ icon: codeSVG,
11
+ group: 'common',
12
+ edit: ItemEdit,
13
+ view: ItemView,
14
+ blockHasOwnFocusManagement: true,
15
+ stylesSchema: stylingSchema,
16
+ enableStyling: true,
17
+ restricted: false,
18
+ mostUsed: false,
19
+ sidebarTab: 1,
20
+ security: {
21
+ addPermission: [],
22
+ view: [],
23
+ },
24
+ };
25
+
26
+ config.settings.blocksWithFootnotesSupport = {
27
+ ...(config.settings.blocksWithFootnotesSupport || {}),
28
+ item: ['description'],
29
+ };
30
+
31
+ return config;
32
+ };
@@ -0,0 +1,101 @@
1
+ export default ({ data }) => {
2
+ const { assetType = 'image' } = data;
3
+ return {
4
+ title: 'Item',
5
+ fieldsets: [
6
+ {
7
+ id: 'default',
8
+ title: 'Default',
9
+ fields: ['assetType'],
10
+ },
11
+ ...(assetType === 'image'
12
+ ? [{ id: 'image', title: 'Image', fields: ['image', 'imageSize'] }]
13
+ : []),
14
+ ...(assetType === 'icon'
15
+ ? [{ id: 'icon', title: 'Icon', fields: ['icon', 'iconSize'] }]
16
+ : []),
17
+ ],
18
+ properties: {
19
+ assetType: {
20
+ title: 'Asset type',
21
+ choices: [
22
+ ['image', 'Image'],
23
+ ['icon', 'Icon'],
24
+ ],
25
+ default: 'image',
26
+ },
27
+ image: {
28
+ title: 'Image',
29
+ widget: 'attachedimage',
30
+ },
31
+ imageSize: {
32
+ title: 'Image size',
33
+ choices: [
34
+ ['mini', 'Mini'],
35
+ ['tile', 'Tile'],
36
+ ['tiny', 'Tiny'],
37
+ ['small', 'Small'],
38
+ ['large', 'Large'],
39
+ ['big', 'Big'],
40
+ ['huge', 'Huge'],
41
+ ['massive', 'Massive'],
42
+ ],
43
+ default: 'tile',
44
+ },
45
+ icon: {
46
+ title: 'Icon name',
47
+ },
48
+ iconSize: {
49
+ title: 'Icon size',
50
+ choices: [
51
+ ['mini', 'Mini'],
52
+ ['tiny', 'Tiny'],
53
+ ['small', 'Small'],
54
+ ['large', 'Large'],
55
+ ['big', 'Big'],
56
+ ['huge', 'Huge'],
57
+ ['massive', 'Massive'],
58
+ ],
59
+ default: 'huge',
60
+ },
61
+ iconTheme: {
62
+ title: 'Icon theme',
63
+ choices: [
64
+ ['primary', 'Primary'],
65
+ ['secondary', 'Secondary'],
66
+ ],
67
+ },
68
+ },
69
+ required: [],
70
+ };
71
+ };
72
+
73
+ export const stylingSchema = ({ intl }) => ({
74
+ title: 'Item style',
75
+ block: 'item',
76
+ fieldsets: [
77
+ {
78
+ id: 'default',
79
+ title: 'Default',
80
+ fields: ['theme', 'verticalAlign'],
81
+ },
82
+ ],
83
+ properties: {
84
+ theme: {
85
+ title: 'Theme',
86
+ choices: [
87
+ ['primary', 'Primary'],
88
+ ['secondary', 'Secondary'],
89
+ ],
90
+ },
91
+ verticalAlign: {
92
+ title: 'Vertical align',
93
+ choices: [
94
+ ['top', 'Top'],
95
+ ['middle', 'Middle'],
96
+ ['bottom', 'Bottom'],
97
+ ],
98
+ },
99
+ },
100
+ required: [],
101
+ });
@@ -0,0 +1,79 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { Message } from 'semantic-ui-react';
4
+ import { defineMessages, useIntl } from 'react-intl';
5
+ import imageBlockSVG from '@plone/volto/components/manage/Blocks/Image/block-image.svg';
6
+ import { flattenToAppURL } from '@plone/volto/helpers';
7
+ import { getTeaserImageURL } from './utils';
8
+ import { MaybeWrap } from '@plone/volto/components';
9
+ import { UniversalLink } from '@plone/volto/components';
10
+ import cx from 'classnames';
11
+
12
+ const messages = defineMessages({
13
+ PleaseChooseContent: {
14
+ id: 'Please choose an existing content as source for this element',
15
+ defaultMessage:
16
+ 'Please choose an existing content as source for this element',
17
+ },
18
+ });
19
+
20
+ const TeaserCardTemplate = (props) => {
21
+ const { data, isEditMode } = props;
22
+ const intl = useIntl();
23
+ const href = data.href?.[0];
24
+ const image = data.preview_image?.[0];
25
+
26
+ return (
27
+ <>
28
+ {!href && isEditMode && (
29
+ <Message>
30
+ <div className="grid-teaser-item placeholder">
31
+ <img src={imageBlockSVG} alt="" />
32
+ <p>{intl.formatMessage(messages.PleaseChooseContent)}</p>
33
+ </div>
34
+ </Message>
35
+ )}
36
+ {href && (
37
+ <MaybeWrap
38
+ condition={!isEditMode}
39
+ as={UniversalLink}
40
+ href={href['@id']}
41
+ target={data.openLinkInNewTab ? '_blank' : null}
42
+ >
43
+ <div
44
+ className={cx(
45
+ 'ui fluid card',
46
+ data?.styles?.theme,
47
+ data?.styles?.rounded ? 'rounded big' : '',
48
+ )}
49
+ >
50
+ {(href.hasPreviewImage || href.image_field || image) && (
51
+ <div className="image">
52
+ <img
53
+ src={flattenToAppURL(getTeaserImageURL(href, image))}
54
+ alt="a"
55
+ />
56
+ </div>
57
+ )}
58
+ <div className="content">
59
+ {data?.head_title && (
60
+ <div className="meta">{data?.head_title}</div>
61
+ )}
62
+ <div className="header">{data?.title}</div>
63
+ {!data.hide_description && (
64
+ <p className="description">{data?.description}</p>
65
+ )}
66
+ </div>
67
+ </div>
68
+ </MaybeWrap>
69
+ )}
70
+ </>
71
+ );
72
+ };
73
+
74
+ TeaserCardTemplate.propTypes = {
75
+ data: PropTypes.objectOf(PropTypes.any).isRequired,
76
+ isEditMode: PropTypes.bool,
77
+ };
78
+
79
+ export default TeaserCardTemplate;
@@ -0,0 +1,70 @@
1
+ import { defineMessages } from 'react-intl';
2
+
3
+ const messages = defineMessages({
4
+ Type: {
5
+ id: 'Teaser',
6
+ defaultMessage: 'Teaser',
7
+ },
8
+ Theme: {
9
+ id: 'Theme',
10
+ defaultMessage: 'Theme',
11
+ },
12
+ ThemeHelp: {
13
+ id: 'Theme',
14
+ defaultMessage: 'Theme',
15
+ },
16
+ ThemeDefault: {
17
+ id: 'Default',
18
+ defaultMessage: 'Default',
19
+ },
20
+ ThemePrimary: {
21
+ id: 'Primary',
22
+ defaultMessage: 'Primary',
23
+ },
24
+ ThemeSecondary: {
25
+ id: 'Secondary',
26
+ defaultMessage: 'Secondary',
27
+ },
28
+ ThemeTertiary: {
29
+ id: 'Tertiary',
30
+ defaultMessage: 'Tertiary',
31
+ },
32
+ Rounded: {
33
+ id: 'Rounded',
34
+ defaultMessage: 'Rounded',
35
+ },
36
+ RoundedHelp: {
37
+ id: 'Rounded Image',
38
+ defaultMessage: 'Rounded Image',
39
+ },
40
+ });
41
+
42
+ export const StylingSchema = ({ intl }) => ({
43
+ title: intl.formatMessage(messages.Type),
44
+ block: 'teaserGrid',
45
+ fieldsets: [
46
+ {
47
+ id: 'default',
48
+ title: 'Default',
49
+ fields: ['theme', 'rounded'],
50
+ },
51
+ ],
52
+ properties: {
53
+ theme: {
54
+ title: intl.formatMessage(messages.Theme),
55
+ description: intl.formatMessage(messages.ThemeHelp),
56
+ choices: [
57
+ ['', intl.formatMessage(messages.ThemeDefault)],
58
+ ['primary', intl.formatMessage(messages.ThemePrimary)],
59
+ ['secondary', intl.formatMessage(messages.ThemeSecondary)],
60
+ ['tertiary', intl.formatMessage(messages.ThemeTertiary)],
61
+ ],
62
+ },
63
+ rounded: {
64
+ title: intl.formatMessage(messages.Rounded),
65
+ description: intl.formatMessage(messages.RoundedHelp),
66
+ type: 'boolean',
67
+ },
68
+ },
69
+ required: [],
70
+ });
@@ -0,0 +1,26 @@
1
+ import TeaserCardTemplate from './Card';
2
+ import { StylingSchema } from './Schema';
3
+
4
+ export default (config) => {
5
+ // Teaser
6
+ if (config.blocks.blocksConfig.teaser) {
7
+ config.blocks.blocksConfig.teaser.variations = [
8
+ ...(config.blocks.blocksConfig.teaser.variations || []),
9
+ {
10
+ id: 'card',
11
+ isDefault: true,
12
+ title: 'Card (top image)',
13
+ template: TeaserCardTemplate,
14
+ },
15
+ ];
16
+ config.blocks.blocksConfig.teaser.enableStyling = true;
17
+ config.blocks.blocksConfig.teaser.stylesSchema = StylingSchema;
18
+ }
19
+
20
+ // Teaser Grid
21
+ if (config.blocks.blocksConfig.teaserGrid) {
22
+ config.blocks.blocksConfig.teaserGrid.title = 'Teaser (Cards)';
23
+ }
24
+
25
+ return config;
26
+ };
@@ -0,0 +1,18 @@
1
+ import { isInternalURL } from '@plone/volto/helpers';
2
+ import config from '@plone/volto/registry';
3
+
4
+ export function getTeaserImageURL(href, image) {
5
+ const imageScale =
6
+ config.blocks.blocksConfig['teaser'].imageScale || 'preview';
7
+ if (image) {
8
+ if (isInternalURL(image['@id'])) {
9
+ return `${image['@id']}/@@images/image/${imageScale}`;
10
+ } else {
11
+ return image['@id'];
12
+ }
13
+ } else {
14
+ return `${href['@id']}/@@images/${
15
+ href.image_field || 'preview_image'
16
+ }/${imageScale}`;
17
+ }
18
+ }
package/src/helpers.js ADDED
@@ -0,0 +1,11 @@
1
+ import { isArray } from 'lodash';
2
+ import config from '@plone/volto/registry';
3
+ import { serializeNodes } from 'volto-slate/editor/render';
4
+
5
+ export const createSlateParagraph = (text) => {
6
+ return isArray(text) ? text : config.settings.slate.defaultValue();
7
+ };
8
+
9
+ export const serializeText = (text) => {
10
+ return isArray(text) ? serializeNodes(text) : text;
11
+ };
package/src/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  import { runtimeConfig } from '@plone/volto/runtime_config';
2
2
  import installCallout from 'volto-slate/editor/plugins/Callout';
3
+ import installItemBlock from '@eeacms/volto-eea-website-policy/components/Blocks/Item';
4
+ import customizeTeaserBlock from '@eeacms/volto-eea-website-policy/components/Blocks/Teaser';
3
5
 
4
6
  const applyConfig = (config) => {
5
7
  // if (process.env.NODE_ENV === 'production') {
@@ -8,7 +10,6 @@ const applyConfig = (config) => {
8
10
  // // Restrict slate metadata mentions to Layout only
9
11
  // config.settings.layoutOnlySlateMetadataMentions = true;
10
12
  // }
11
-
12
13
  // Callout slate button
13
14
  config = installCallout(config);
14
15
 
@@ -62,6 +63,53 @@ const applyConfig = (config) => {
62
63
  (item) => item.code,
63
64
  ) || ['en'];
64
65
 
66
+ // Block chooser
67
+ config.blocks.blocksConfig.image.mostUsed = false;
68
+ config.blocks.blocksConfig.video.mostUsed = false;
69
+
70
+ // Grid/Teaser block (kitconcept)
71
+ if (config.blocks.blocksConfig.__grid) {
72
+ config.blocks.blocksConfig.__grid.restricted = true;
73
+ }
74
+ if (config.blocks.blocksConfig.imagesGrid) {
75
+ config.blocks.blocksConfig.imagesGrid.restricted = true;
76
+ }
77
+ if (config.blocks.blocksConfig.teaser) {
78
+ config.blocks.blocksConfig.teaser.restricted = true;
79
+ }
80
+
81
+ // Divider
82
+ if (config.blocks.blocksConfig.dividerBlock) {
83
+ config.blocks.blocksConfig.dividerBlock.mostUsed = true;
84
+ }
85
+
86
+ // Call to Action
87
+ if (config.blocks.blocksConfig.callToActionBlock) {
88
+ config.blocks.blocksConfig.callToActionBlock.mostUsed = true;
89
+ }
90
+
91
+ // Columns
92
+ if (config.blocks.blocksConfig.columnsBlock) {
93
+ config.blocks.blocksConfig.columnsBlock.mostUsed = true;
94
+ }
95
+
96
+ // Listing
97
+ if (config.blocks.blocksConfig.listing) {
98
+ config.blocks.blocksConfig.listing.title = 'Listing (Content)';
99
+ }
100
+
101
+ // Custom blocks
102
+ config = [installItemBlock, customizeTeaserBlock].reduce(
103
+ (acc, apply) => apply(acc),
104
+ config,
105
+ );
106
+ config.blocks.blocksConfig.item.mostUsed = true;
107
+
108
+ // Disable some blocks
109
+ if (config.blocks.blocksConfig.imagecards) {
110
+ config.blocks.blocksConfig.imagecards.restricted = true;
111
+ }
112
+
65
113
  // Done
66
114
  return config;
67
115
  };