@contentful/experiences-core 3.7.0-dev-20250917T1357-4fbbff5.0 → 3.7.0-dev-20250918T1641-6da833a.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/dist/constants.cjs +196 -0
- package/dist/constants.cjs.map +1 -0
- package/dist/index.cjs +5372 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/utils/sanitizeNodeProps.d.ts +3 -2
- package/package.json +21 -8
- package/dist/exports.js +0 -2
- package/dist/exports.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z, ZodIssueCode } from 'zod';
|
|
2
|
-
import
|
|
2
|
+
import cloneDeep from 'lodash.clonedeep';
|
|
3
3
|
import md5 from 'md5';
|
|
4
4
|
import { BLOCKS } from '@contentful/rich-text-types';
|
|
5
5
|
import { create } from 'zustand';
|
|
@@ -2148,7 +2148,9 @@ const stylesToRemove = CF_STYLE_ATTRIBUTES.filter((style) => !stylesToKeep.inclu
|
|
|
2148
2148
|
// cfWrapColumns & cfWrapColumnsCount are no real style attributes as they are handled on the editor side
|
|
2149
2149
|
const propsToRemove = ['cfSsrClassName', 'cfWrapColumns', 'cfWrapColumnsCount'];
|
|
2150
2150
|
const sanitizeNodeProps = (nodeProps) => {
|
|
2151
|
-
|
|
2151
|
+
const keysToRemove = [...stylesToRemove, ...propsToRemove];
|
|
2152
|
+
const sanitizedProps = Object.fromEntries(Object.entries(nodeProps).filter(([key]) => !keysToRemove.includes(key)));
|
|
2153
|
+
return sanitizedProps;
|
|
2152
2154
|
};
|
|
2153
2155
|
|
|
2154
2156
|
/** Turn the visibility value into a style object that can be used for inline styles in React */
|
|
@@ -3279,7 +3281,7 @@ function getArrayValue(entryOrAsset, path, entityStore) {
|
|
|
3279
3281
|
}
|
|
3280
3282
|
const fieldName = path.split('/').slice(2, -1);
|
|
3281
3283
|
const arrayValue = get(entryOrAsset, fieldName);
|
|
3282
|
-
if (!isArray(arrayValue)) {
|
|
3284
|
+
if (!Array.isArray(arrayValue)) {
|
|
3283
3285
|
debug.warn(`[experiences-core::getArrayValue] A field '${fieldName}' of an entity was bound to an Array variable. Expected value of that field to be an array, but got: ${JSON.stringify(arrayValue)}`, { entity: entryOrAsset });
|
|
3284
3286
|
return;
|
|
3285
3287
|
}
|
|
@@ -4806,8 +4808,8 @@ const fetchAllEntries = async ({ client, ids, locale, skip = 0, limit = 100, res
|
|
|
4806
4808
|
responseIncludes,
|
|
4807
4809
|
});
|
|
4808
4810
|
}
|
|
4809
|
-
const dedupedEntries =
|
|
4810
|
-
const dedupedAssets =
|
|
4811
|
+
const dedupedEntries = uniqueById(responseIncludes?.Entry);
|
|
4812
|
+
const dedupedAssets = uniqueById(responseIncludes?.Asset);
|
|
4811
4813
|
return {
|
|
4812
4814
|
items: responseItems,
|
|
4813
4815
|
includes: {
|