@contentful/experiences-core 1.16.1-beta.1 → 1.16.1-dev-20240923T1453-d839e4d.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.d.ts +1 -1
- package/dist/index.js +4 -10
- package/dist/index.js.map +1 -1
- package/dist/utils/components.d.ts +2 -8
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { isComponentAllowedOnRoot, isContentfulComponent, isContentfulStructureComponent,
|
|
1
|
+
export { isComponentAllowedOnRoot, isContentfulComponent, isContentfulStructureComponent, isStructureWithRelativeHeight } from './utils/components.js';
|
|
2
2
|
export { findOutermostCoordinates, getElementCoordinates } from './utils/domValues.js';
|
|
3
3
|
export { doesMismatchMessageSchema, tryParseMessage, validateExperienceBuilderConfig } from './utils/validations.js';
|
|
4
4
|
export { buildCfStyles, buildStyleTag, calculateNodeDefaultHeight, toCSSAttribute } from './utils/styleUtils/stylesUtils.js';
|
package/dist/index.js
CHANGED
|
@@ -76,9 +76,7 @@ const CONTENTFUL_COMPONENTS = {
|
|
|
76
76
|
name: 'Divider',
|
|
77
77
|
},
|
|
78
78
|
};
|
|
79
|
-
const ASSEMBLY_NODE_TYPE = 'assembly';
|
|
80
79
|
const ASSEMBLY_DEFAULT_CATEGORY = 'Assemblies';
|
|
81
|
-
const ASSEMBLY_BLOCK_NODE_TYPE = 'assemblyBlock';
|
|
82
80
|
const CF_STYLE_ATTRIBUTES = [
|
|
83
81
|
'cfVisibility',
|
|
84
82
|
'cfHorizontalAlignment',
|
|
@@ -132,15 +130,10 @@ const structureComponentIds = new Set([
|
|
|
132
130
|
CONTENTFUL_COMPONENTS.container.id,
|
|
133
131
|
CONTENTFUL_COMPONENTS.singleColumn.id,
|
|
134
132
|
]);
|
|
135
|
-
const patternTypes = new Set([ASSEMBLY_NODE_TYPE, ASSEMBLY_BLOCK_NODE_TYPE]);
|
|
136
133
|
const allContentfulComponentIds = new Set(Object.values(CONTENTFUL_COMPONENTS).map((component) => component.id));
|
|
137
|
-
const isPatternComponent = (type) => patternTypes.has(type ?? '');
|
|
138
134
|
const isContentfulStructureComponent = (componentId) => structureComponentIds.has(componentId ?? '');
|
|
139
135
|
const isContentfulComponent = (componentId) => allContentfulComponentIds.has(componentId ?? '');
|
|
140
|
-
const isComponentAllowedOnRoot = (
|
|
141
|
-
category === ASSEMBLY_DEFAULT_CATEGORY ||
|
|
142
|
-
isContentfulStructureComponent(componentId) ||
|
|
143
|
-
componentId === CONTENTFUL_COMPONENTS.divider.id;
|
|
136
|
+
const isComponentAllowedOnRoot = (componentId) => isContentfulStructureComponent(componentId) || componentId === CONTENTFUL_COMPONENTS.divider.id;
|
|
144
137
|
const isStructureWithRelativeHeight = (componentId, height) => {
|
|
145
138
|
return isContentfulStructureComponent(componentId) && !height?.toString().endsWith('px');
|
|
146
139
|
};
|
|
@@ -3413,7 +3406,8 @@ const fetchAllEntries = async ({ client, ids, locale, skip = 0, limit = 100, res
|
|
|
3413
3406
|
},
|
|
3414
3407
|
};
|
|
3415
3408
|
}
|
|
3416
|
-
const
|
|
3409
|
+
const query = { 'sys.id[in]': ids, locale, limit, skip };
|
|
3410
|
+
const { items, includes, total: responseTotal, } = await client.withoutLinkResolution.getEntries({ ...query });
|
|
3417
3411
|
responseItems.push(...items);
|
|
3418
3412
|
responseIncludes?.Entry?.push(...(includes?.Entry || []));
|
|
3419
3413
|
responseIncludes?.Asset?.push(...(includes?.Asset || []));
|
|
@@ -3655,5 +3649,5 @@ async function fetchById({ client, experienceTypeId, id, localeCode, }) {
|
|
|
3655
3649
|
}
|
|
3656
3650
|
}
|
|
3657
3651
|
|
|
3658
|
-
export { DeepReference, EditorModeEntityStore, EntityStore, EntityStoreBase, MEDIA_QUERY_REGEXP, VisualEditorMode, addLocale, breakpointsRegistry, buildCfStyles, buildStyleTag, buildTemplate, builtInStyles, calculateNodeDefaultHeight, checkIsAssembly, checkIsAssemblyDefinition, checkIsAssemblyEntry, checkIsAssemblyNode, columnsBuiltInStyles, columnsDefinition, containerBuiltInStyles, containerDefinition, createExperience, defineBreakpoints, defineDesignTokens, deserializePatternVariables, designTokensRegistry, detachExperienceStyles, dividerBuiltInStyles, dividerDefinition, doesMismatchMessageSchema, fetchAllAssets, fetchAllEntries, fetchById, fetchBySlug, findOutermostCoordinates, flattenDesignTokenRegistry, gatherDeepReferencesFromExperienceEntry, gatherDeepReferencesFromTree, generateRandomId, getActiveBreakpointIndex, getBreakpointRegistration, getDataFromTree, getDesignTokenRegistration, getElementCoordinates, getFallbackBreakpointIndex, getInsertionData, getTemplateValue, getValueForBreakpoint, indexByBreakpoint, isCfStyleAttribute, isComponentAllowedOnRoot, isContentfulComponent, isContentfulStructureComponent, isDeepPath, isExperienceEntry, isLink, isLinkToAsset,
|
|
3652
|
+
export { DeepReference, EditorModeEntityStore, EntityStore, EntityStoreBase, MEDIA_QUERY_REGEXP, VisualEditorMode, addLocale, breakpointsRegistry, buildCfStyles, buildStyleTag, buildTemplate, builtInStyles, calculateNodeDefaultHeight, checkIsAssembly, checkIsAssemblyDefinition, checkIsAssemblyEntry, checkIsAssemblyNode, columnsBuiltInStyles, columnsDefinition, containerBuiltInStyles, containerDefinition, createExperience, defineBreakpoints, defineDesignTokens, deserializePatternVariables, designTokensRegistry, detachExperienceStyles, dividerBuiltInStyles, dividerDefinition, doesMismatchMessageSchema, fetchAllAssets, fetchAllEntries, fetchById, fetchBySlug, findOutermostCoordinates, flattenDesignTokenRegistry, gatherDeepReferencesFromExperienceEntry, gatherDeepReferencesFromTree, generateRandomId, getActiveBreakpointIndex, getBreakpointRegistration, getDataFromTree, getDesignTokenRegistration, getElementCoordinates, getFallbackBreakpointIndex, getInsertionData, getTemplateValue, getValueForBreakpoint, indexByBreakpoint, isCfStyleAttribute, isComponentAllowedOnRoot, isContentfulComponent, isContentfulStructureComponent, isDeepPath, isExperienceEntry, isLink, isLinkToAsset, isStructureWithRelativeHeight, isValidBreakpointValue, lastPathNamedSegmentEq, maybePopulateDesignTokenValue, mediaQueryMatcher, optionalBuiltInStyles, parseDataSourcePathIntoFieldset, parseDataSourcePathWithL1DeepBindings, resetBreakpointsRegistry, resetDesignTokenRegistry, resolveBackgroundImageBinding, resolveHyperlinkPattern, runBreakpointsValidation, sectionBuiltInStyles, sectionDefinition, sendMessage, singleColumnBuiltInStyles, singleColumnDefinition, toCSSAttribute, toCSSString, toMediaQuery, transformBoundContentValue, tryParseMessage, validateExperienceBuilderConfig };
|
|
3659
3653
|
//# sourceMappingURL=index.js.map
|