@kitconcept/volto-light-theme 6.0.0-alpha.3 → 6.0.0-alpha.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.draft
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
## 6.0.0-alpha.
|
|
1
|
+
## 6.0.0-alpha.5 (2024-12-09)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### Bugfix
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
Added two slots: `preFooter` and `postFooter`. [#437](https://github.com/kitconcept/volto-light-theme/pull/437)
|
|
5
|
+
- Added guard in case blocks are corrupted or malformed. @sneridagh [#442](https://github.com/kitconcept/volto-light-theme/pull/442)
|
|
7
6
|
|
|
8
|
-
###
|
|
7
|
+
### Internal
|
|
9
8
|
|
|
10
|
-
-
|
|
11
|
-
- Fixed layout shift jumps on RAC Popovers. @sneridagh [#440](https://github.com/kitconcept/volto-light-theme/pull/440)
|
|
9
|
+
- Updated to latest 18.2.2 @sneridagh [#443](https://github.com/kitconcept/volto-light-theme/pull/443)
|
|
12
10
|
|
|
13
11
|
|
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,22 @@
|
|
|
8
8
|
|
|
9
9
|
<!-- towncrier release notes start -->
|
|
10
10
|
|
|
11
|
+
## 6.0.0-alpha.5 (2024-12-09)
|
|
12
|
+
|
|
13
|
+
### Bugfix
|
|
14
|
+
|
|
15
|
+
- Added guard in case blocks are corrupted or malformed. @sneridagh [#442](https://github.com/kitconcept/volto-light-theme/pull/442)
|
|
16
|
+
|
|
17
|
+
### Internal
|
|
18
|
+
|
|
19
|
+
- Updated to latest 18.2.2 @sneridagh [#443](https://github.com/kitconcept/volto-light-theme/pull/443)
|
|
20
|
+
|
|
21
|
+
## 6.0.0-alpha.4 (2024-12-08)
|
|
22
|
+
|
|
23
|
+
### Bugfix
|
|
24
|
+
|
|
25
|
+
- Fix initialBlocks config, do not override the whole thing. @sneridagh [#441](https://github.com/kitconcept/volto-light-theme/pull/441)
|
|
26
|
+
|
|
11
27
|
## 6.0.0-alpha.3 (2024-12-05)
|
|
12
28
|
|
|
13
29
|
### Feature
|
package/package.json
CHANGED
package/src/config/blocks.tsx
CHANGED
|
@@ -63,13 +63,11 @@ declare module '@plone/types' {
|
|
|
63
63
|
|
|
64
64
|
export default function install(config: ConfigType) {
|
|
65
65
|
// Initial block for event content type
|
|
66
|
-
config.blocks.initialBlocks =
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
],
|
|
72
|
-
};
|
|
66
|
+
config.blocks.initialBlocks.Event = [
|
|
67
|
+
{ '@type': 'title' },
|
|
68
|
+
{ '@type': 'eventMetadata', fixed: true, required: true },
|
|
69
|
+
{ '@type': 'slate' },
|
|
70
|
+
];
|
|
73
71
|
|
|
74
72
|
// Palettes
|
|
75
73
|
config.blocks.themes = [
|
|
@@ -21,7 +21,8 @@ import {
|
|
|
21
21
|
findStyleByName,
|
|
22
22
|
} from '@plone/volto/helpers/Blocks/Blocks';
|
|
23
23
|
import { defineMessages, useIntl } from 'react-intl';
|
|
24
|
-
import
|
|
24
|
+
import map from 'lodash/map';
|
|
25
|
+
import isEmpty from 'lodash/isEmpty';
|
|
25
26
|
import StyleWrapper from '@plone/volto/components/manage/Blocks/Block/StyleWrapper';
|
|
26
27
|
import config from '@plone/volto/registry';
|
|
27
28
|
import ViewDefaultBlock from '@plone/volto/components/manage/Blocks/Block/DefaultView';
|
|
@@ -45,6 +46,11 @@ export function groupByBGColor(blocks, blocks_layout, colorDefinitions) {
|
|
|
45
46
|
let currentArr = [];
|
|
46
47
|
let currentBGColor;
|
|
47
48
|
|
|
49
|
+
// Guard in case the block layout is empty or corrupted for some reason
|
|
50
|
+
if (blocks_layout.items.length === 0 || isEmpty(blocks)) {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
|
|
48
54
|
blocks_layout.items.forEach((blockId) => {
|
|
49
55
|
let currentBlockColor = blocks[blockId]?.theme || 'default';
|
|
50
56
|
if (currentBlockColor !== currentBGColor) {
|