@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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z, ZodIssueCode } from 'zod';
2
- import { cloneDeep, omit, isArray, uniqBy } from 'lodash-es';
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
- return omit(nodeProps, stylesToRemove, propsToRemove);
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 = uniqBy(responseIncludes?.Entry, (entry) => entry.sys.id);
4810
- const dedupedAssets = uniqBy(responseIncludes?.Asset, (asset) => asset.sys.id);
4811
+ const dedupedEntries = uniqueById(responseIncludes?.Entry);
4812
+ const dedupedAssets = uniqueById(responseIncludes?.Asset);
4811
4813
  return {
4812
4814
  items: responseItems,
4813
4815
  includes: {