@redneckz/wildless-cms-uni-blocks 0.14.563 → 0.14.564

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.
@@ -0,0 +1,29 @@
1
+ export const description = 'v0.14.563';
2
+ import { traversePageBlocks } from '../utils.js';
3
+
4
+ export default traversePageBlocks(adjustDataAttributes);
5
+
6
+ function adjustDataAttributes(block) {
7
+ const content = block?.content;
8
+
9
+ if (content) {
10
+ findAttributes(content);
11
+ }
12
+ }
13
+
14
+ function findAttributes(object) {
15
+ for (const [key, val] of Object.entries(object)) {
16
+ if (typeof val === 'object' && val !== null) {
17
+ findAttributes(val);
18
+ }
19
+ const mindbox = val?.find?.((_) => _?.aspectName === 'mindboxEvent');
20
+ const snowplow = val?.find?.((_) => _?.aspectName === 'snowplowEvent');
21
+
22
+ if (key === 'data' && mindbox && !snowplow) {
23
+ val.push({
24
+ aspectName: 'snowplowEvent',
25
+ params: mindbox.params,
26
+ });
27
+ }
28
+ }
29
+ }
@@ -6565,7 +6565,7 @@
6565
6565
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6566
6566
  });
6567
6567
 
6568
- const packageVersion = "0.14.562";
6568
+ const packageVersion = "0.14.563";
6569
6569
 
6570
6570
  exports.Blocks = Blocks;
6571
6571
  exports.ContentPage = ContentPage;