@kitconcept/volto-light-theme 6.0.0-alpha.4 → 6.0.0-alpha.6
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,7 +1,7 @@
|
|
|
1
|
-
## 6.0.0-alpha.
|
|
1
|
+
## 6.0.0-alpha.6 (2024-12-10)
|
|
2
2
|
|
|
3
3
|
### Bugfix
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- Fixed footerlinks error if the link is created but not set. @sneridagh [#445](https://github.com/kitconcept/volto-light-theme/pull/445)
|
|
6
6
|
|
|
7
7
|
|
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,22 @@
|
|
|
8
8
|
|
|
9
9
|
<!-- towncrier release notes start -->
|
|
10
10
|
|
|
11
|
+
## 6.0.0-alpha.6 (2024-12-10)
|
|
12
|
+
|
|
13
|
+
### Bugfix
|
|
14
|
+
|
|
15
|
+
- Fixed footerlinks error if the link is created but not set. @sneridagh [#445](https://github.com/kitconcept/volto-light-theme/pull/445)
|
|
16
|
+
|
|
17
|
+
## 6.0.0-alpha.5 (2024-12-09)
|
|
18
|
+
|
|
19
|
+
### Bugfix
|
|
20
|
+
|
|
21
|
+
- Added guard in case blocks are corrupted or malformed. @sneridagh [#442](https://github.com/kitconcept/volto-light-theme/pull/442)
|
|
22
|
+
|
|
23
|
+
### Internal
|
|
24
|
+
|
|
25
|
+
- Updated to latest 18.2.2 @sneridagh [#443](https://github.com/kitconcept/volto-light-theme/pull/443)
|
|
26
|
+
|
|
11
27
|
## 6.0.0-alpha.4 (2024-12-08)
|
|
12
28
|
|
|
13
29
|
### Bugfix
|
package/package.json
CHANGED
|
@@ -14,8 +14,11 @@ const FooterLinks = (props: FooterLinksProps) => {
|
|
|
14
14
|
{!isEmpty(links?.blocks)
|
|
15
15
|
? links.blocks_layout.items.map((itemId) => {
|
|
16
16
|
const link = links.blocks[itemId];
|
|
17
|
+
|
|
18
|
+
if (isEmpty(link) || !link.href) return null;
|
|
19
|
+
|
|
17
20
|
const title = link.title || link.href[0]['title'];
|
|
18
|
-
const href = flattenToAppURL(link.href[0]['@id']);
|
|
21
|
+
const href = flattenToAppURL(link.href[0]?.['@id']);
|
|
19
22
|
|
|
20
23
|
if (!href) return null;
|
|
21
24
|
|
|
@@ -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) {
|