design-comuni-plone-theme 11.13.0 → 11.14.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/.yarn/cache/{volto-form-block-npm-3.8.5-43ba012c00-db8d56e91b.zip → volto-form-block-npm-3.8.6-70f0648a8f-b038d1b89e.zip} +0 -0
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +18 -0
- package/RELEASE.md +6 -0
- package/package.json +2 -2
- package/publiccode.yml +2 -2
- package/src/components/ItaliaTheme/MegaMenu/MegaMenu.jsx +5 -1
- package/src/config/italiaConfig.js +3 -3
- package/src/theme/_cms-ui.scss +5 -0
- package/src/customizations/volto/components/manage/BlockChooser/BlockChooserButton.jsx +0 -157
|
Binary file
|
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [11.14.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.13.0...v11.14.0) (2024-06-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* button block pos editor ([#704](https://github.com/RedTurtle/design-comuni-plone-theme/issues/704)) ([8cf55af](https://github.com/RedTurtle/design-comuni-plone-theme/commit/8cf55afe4d2864ec72a2eba166d9e838b2304899))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* megamenu active item ([#703](https://github.com/RedTurtle/design-comuni-plone-theme/issues/703)) ([f6668ef](https://github.com/RedTurtle/design-comuni-plone-theme/commit/f6668ef7e7f6eaf624a3c3bd2eaf557d7f32ac14))
|
|
14
|
+
* volto-form-block form result ([#700](https://github.com/RedTurtle/design-comuni-plone-theme/issues/700)) ([746502f](https://github.com/RedTurtle/design-comuni-plone-theme/commit/746502f827359205374d54eda99ac4efd47502ba))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Documentation
|
|
18
|
+
|
|
19
|
+
* updated publiccode and release log ([309474a](https://github.com/RedTurtle/design-comuni-plone-theme/commit/309474adfde862d56c35c9b0832925cc157ecef0))
|
|
20
|
+
|
|
3
21
|
## [11.13.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.12.9...v11.13.0) (2024-06-12)
|
|
4
22
|
|
|
5
23
|
|
package/RELEASE.md
CHANGED
|
@@ -41,6 +41,12 @@
|
|
|
41
41
|
- ...
|
|
42
42
|
-->
|
|
43
43
|
|
|
44
|
+
## Versione 11.14.0 (21/06/2024)
|
|
45
|
+
|
|
46
|
+
### Migliorie
|
|
47
|
+
|
|
48
|
+
- Il pulsante di aggiunta dei blocchi è stato spostato nella parte bassa del blocco (non si trova più alla sua sinistra), per migliorare l'usabilità della gestione dei blocchi anche su mobile/tablet.
|
|
49
|
+
|
|
44
50
|
## Versione 11.13.0 (12/06/2024)
|
|
45
51
|
|
|
46
52
|
### Migliorie
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "design-comuni-plone-theme",
|
|
3
3
|
"description": "Volto Theme for Italia design guidelines",
|
|
4
4
|
"license": "GPL-v3",
|
|
5
|
-
"version": "11.
|
|
5
|
+
"version": "11.14.0",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"volto-dropdownmenu": "4.1.3",
|
|
152
152
|
"volto-editablefooter": "5.1.6",
|
|
153
153
|
"volto-feedback": "0.3.2",
|
|
154
|
-
"volto-form-block": "3.8.
|
|
154
|
+
"volto-form-block": "3.8.6",
|
|
155
155
|
"volto-gdpr-privacy": "2.2.6",
|
|
156
156
|
"volto-google-analytics": "2.0.0",
|
|
157
157
|
"volto-multilingual-widget": "3.2.1",
|
package/publiccode.yml
CHANGED
|
@@ -227,9 +227,9 @@ maintenance:
|
|
|
227
227
|
name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici
|
|
228
228
|
platforms:
|
|
229
229
|
- web
|
|
230
|
-
releaseDate: '2024-06-
|
|
230
|
+
releaseDate: '2024-06-21'
|
|
231
231
|
softwareType: standalone/web
|
|
232
|
-
softwareVersion: 11.
|
|
232
|
+
softwareVersion: 11.14.0
|
|
233
233
|
url: 'https://github.com/italia/design-comuni-plone-theme'
|
|
234
234
|
usedBy:
|
|
235
235
|
- ASP Comuni Modenesi Area Nord
|
|
@@ -66,7 +66,10 @@ const isActive = (item, pathname) => {
|
|
|
66
66
|
);
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
const isChildActive = (itemUrl, pathname) => {
|
|
69
|
+
const isChildActive = (itemUrl, pathname, exact = false) => {
|
|
70
|
+
if (exact) {
|
|
71
|
+
return itemUrl === pathname;
|
|
72
|
+
}
|
|
70
73
|
return pathname.indexOf(itemUrl) > -1;
|
|
71
74
|
};
|
|
72
75
|
|
|
@@ -328,6 +331,7 @@ const MegaMenu = ({ item, pathname }) => {
|
|
|
328
331
|
active: isChildActive(
|
|
329
332
|
flattenToAppURL(child['@id']),
|
|
330
333
|
pathname,
|
|
334
|
+
true,
|
|
331
335
|
),
|
|
332
336
|
})}
|
|
333
337
|
role="menuitem"
|
|
@@ -66,8 +66,8 @@ import { schemaListing } from 'design-comuni-plone-theme/components/ItaliaTheme/
|
|
|
66
66
|
|
|
67
67
|
import reducers from 'design-comuni-plone-theme/reducers';
|
|
68
68
|
|
|
69
|
-
const ReleaseLog = loadable(
|
|
70
|
-
|
|
69
|
+
const ReleaseLog = loadable(() =>
|
|
70
|
+
import('design-comuni-plone-theme/components/ReleaseLog/ReleaseLog'),
|
|
71
71
|
);
|
|
72
72
|
|
|
73
73
|
const messages = defineMessages({
|
|
@@ -84,7 +84,7 @@ export default function applyConfig(voltoConfig) {
|
|
|
84
84
|
* SETTINGS
|
|
85
85
|
******************************************************************************/
|
|
86
86
|
const voltoSentryOptions = voltoConfig.settings.sentryOptions;
|
|
87
|
-
|
|
87
|
+
config.experimental.addBlockButton.enabled = true; //per spostare il bottone di aggiunta dei blocchi in basso, e fare in modo che i bottoni di edit dei blocchi siano usabili anche da tablet/mobile
|
|
88
88
|
config.settings = {
|
|
89
89
|
...config.settings,
|
|
90
90
|
openExternalLinkInNewTab: true,
|
package/src/theme/_cms-ui.scss
CHANGED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
/* CUSTOMIZATIONS
|
|
2
|
-
- zindex for handling overlapping in small pages
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { doesNodeContainClick } from 'semantic-ui-react/dist/commonjs/lib';
|
|
7
|
-
import addSVG from '@plone/volto/icons/circle-plus.svg';
|
|
8
|
-
import { blockHasValue } from '@plone/volto/helpers';
|
|
9
|
-
import { Icon, BlockChooser } from '@plone/volto/components';
|
|
10
|
-
import config from '@plone/volto/registry';
|
|
11
|
-
import { Button, Ref } from 'semantic-ui-react';
|
|
12
|
-
import { defineMessages, useIntl } from 'react-intl';
|
|
13
|
-
import { usePopper } from 'react-popper';
|
|
14
|
-
import { Portal } from 'react-portal';
|
|
15
|
-
|
|
16
|
-
const messages = defineMessages({
|
|
17
|
-
addBlock: {
|
|
18
|
-
id: 'Add block',
|
|
19
|
-
defaultMessage: 'Add block',
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export const ButtonComponent = (props) => {
|
|
24
|
-
const intl = useIntl();
|
|
25
|
-
const {
|
|
26
|
-
className = `block-add-button${
|
|
27
|
-
config.experimental.addBlockButton.enabled ? ' new-add-block' : ''
|
|
28
|
-
}`,
|
|
29
|
-
size = '19px',
|
|
30
|
-
onShowBlockChooser,
|
|
31
|
-
} = props;
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<Button
|
|
35
|
-
icon
|
|
36
|
-
basic
|
|
37
|
-
title={intl.formatMessage(messages.addBlock)}
|
|
38
|
-
onClick={(e) => {
|
|
39
|
-
e.preventDefault();
|
|
40
|
-
e.stopPropagation();
|
|
41
|
-
onShowBlockChooser();
|
|
42
|
-
}}
|
|
43
|
-
className={className}
|
|
44
|
-
>
|
|
45
|
-
<Icon name={addSVG} className={className} size={size} />
|
|
46
|
-
</Button>
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const BlockChooserButton = (props) => {
|
|
51
|
-
const {
|
|
52
|
-
block,
|
|
53
|
-
allowedBlocks,
|
|
54
|
-
showRestricted,
|
|
55
|
-
data,
|
|
56
|
-
onMutateBlock,
|
|
57
|
-
onInsertBlock,
|
|
58
|
-
blocksConfig,
|
|
59
|
-
buttonComponent,
|
|
60
|
-
properties,
|
|
61
|
-
} = props;
|
|
62
|
-
const { disableNewBlocks } = data;
|
|
63
|
-
const [addNewBlockOpened, setAddNewBlockOpened] = React.useState(false);
|
|
64
|
-
|
|
65
|
-
const blockChooserRef = React.useRef();
|
|
66
|
-
|
|
67
|
-
const handleClickOutside = React.useCallback((e) => {
|
|
68
|
-
if (
|
|
69
|
-
blockChooserRef.current &&
|
|
70
|
-
doesNodeContainClick(blockChooserRef.current, e)
|
|
71
|
-
)
|
|
72
|
-
return;
|
|
73
|
-
setAddNewBlockOpened(false);
|
|
74
|
-
}, []);
|
|
75
|
-
|
|
76
|
-
const Component = buttonComponent || ButtonComponent;
|
|
77
|
-
|
|
78
|
-
React.useEffect(() => {
|
|
79
|
-
document.addEventListener('mousedown', handleClickOutside, false);
|
|
80
|
-
return () => {
|
|
81
|
-
document.removeEventListener('mousedown', handleClickOutside, false);
|
|
82
|
-
};
|
|
83
|
-
}, [handleClickOutside]);
|
|
84
|
-
|
|
85
|
-
const [referenceElement, setReferenceElement] = React.useState(null);
|
|
86
|
-
const [popperElement, setPopperElement] = React.useState(null);
|
|
87
|
-
const { styles, attributes } = usePopper(referenceElement, popperElement, {
|
|
88
|
-
placement: config.experimental.addBlockButton.enabled
|
|
89
|
-
? 'bottom'
|
|
90
|
-
: 'right-start',
|
|
91
|
-
modifiers: [
|
|
92
|
-
{
|
|
93
|
-
name: 'offset',
|
|
94
|
-
options: {
|
|
95
|
-
offset: [-10, 5],
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
name: 'flip',
|
|
100
|
-
options: {
|
|
101
|
-
fallbackPlacements: ['right-end', 'top-start'],
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
],
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
return (
|
|
108
|
-
<>
|
|
109
|
-
{!disableNewBlocks &&
|
|
110
|
-
(config.experimental.addBlockButton.enabled ||
|
|
111
|
-
!blockHasValue(data)) && (
|
|
112
|
-
<Ref innerRef={setReferenceElement}>
|
|
113
|
-
<Component
|
|
114
|
-
{...props}
|
|
115
|
-
onShowBlockChooser={() => setAddNewBlockOpened(true)}
|
|
116
|
-
/>
|
|
117
|
-
</Ref>
|
|
118
|
-
)}
|
|
119
|
-
{addNewBlockOpened && (
|
|
120
|
-
<Portal node={document.getElementById('body')}>
|
|
121
|
-
<div
|
|
122
|
-
ref={setPopperElement}
|
|
123
|
-
style={{ ...styles.popper, zIndex: 1000 }}
|
|
124
|
-
{...attributes.popper}
|
|
125
|
-
>
|
|
126
|
-
<BlockChooser
|
|
127
|
-
onMutateBlock={
|
|
128
|
-
onMutateBlock
|
|
129
|
-
? (id, value) => {
|
|
130
|
-
setAddNewBlockOpened(false);
|
|
131
|
-
onMutateBlock(id, value);
|
|
132
|
-
}
|
|
133
|
-
: null
|
|
134
|
-
}
|
|
135
|
-
onInsertBlock={
|
|
136
|
-
onInsertBlock
|
|
137
|
-
? (id, value) => {
|
|
138
|
-
setAddNewBlockOpened(false);
|
|
139
|
-
onInsertBlock(id, value);
|
|
140
|
-
}
|
|
141
|
-
: null
|
|
142
|
-
}
|
|
143
|
-
currentBlock={block}
|
|
144
|
-
allowedBlocks={allowedBlocks}
|
|
145
|
-
blocksConfig={blocksConfig}
|
|
146
|
-
properties={properties}
|
|
147
|
-
showRestricted={showRestricted}
|
|
148
|
-
ref={blockChooserRef}
|
|
149
|
-
/>
|
|
150
|
-
</div>
|
|
151
|
-
</Portal>
|
|
152
|
-
)}
|
|
153
|
-
</>
|
|
154
|
-
);
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
export default BlockChooserButton;
|