@contentful/experiences-core 1.8.1-prerelease-20240624T1524-6eb49d2.0 → 1.8.2-beta.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/communication/sendMessage.d.ts +2 -3
- package/dist/constants.d.ts +40 -41
- package/dist/constants.js +2 -3
- package/dist/constants.js.map +1 -1
- package/dist/exports.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +196 -1
- package/dist/utils/validations.d.ts +3 -8
- package/package.json +3 -3
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { OutgoingEvent } from '../types.js';
|
|
1
|
+
import { SendMessageParams } from '../types.js';
|
|
3
2
|
|
|
4
|
-
declare const sendMessage:
|
|
3
|
+
declare const sendMessage: SendMessageParams;
|
|
5
4
|
|
|
6
5
|
export { sendMessage };
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,51 +1,50 @@
|
|
|
1
1
|
declare const SCROLL_STATES: {
|
|
2
|
-
Start:
|
|
3
|
-
IsScrolling:
|
|
4
|
-
End:
|
|
2
|
+
readonly Start: "scrollStart";
|
|
3
|
+
readonly IsScrolling: "isScrolling";
|
|
4
|
+
readonly End: "scrollEnd";
|
|
5
5
|
};
|
|
6
6
|
declare const OUTGOING_EVENTS: {
|
|
7
|
-
Connected:
|
|
8
|
-
DesignTokens:
|
|
9
|
-
RegisteredBreakpoints:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
SDKFeatures: string;
|
|
7
|
+
readonly Connected: "connected";
|
|
8
|
+
readonly DesignTokens: "registerDesignTokens";
|
|
9
|
+
readonly RegisteredBreakpoints: "registeredBreakpoints";
|
|
10
|
+
readonly MouseMove: "mouseMove";
|
|
11
|
+
readonly NewHoveredElement: "newHoveredElement";
|
|
12
|
+
readonly ComponentSelected: "componentSelected";
|
|
13
|
+
readonly RegisteredComponents: "registeredComponents";
|
|
14
|
+
readonly RequestComponentTreeUpdate: "requestComponentTreeUpdate";
|
|
15
|
+
readonly ComponentDragCanceled: "componentDragCanceled";
|
|
16
|
+
readonly ComponentDropped: "componentDropped";
|
|
17
|
+
readonly ComponentMoved: "componentMoved";
|
|
18
|
+
readonly CanvasReload: "canvasReload";
|
|
19
|
+
readonly UpdateSelectedComponentCoordinates: "updateSelectedComponentCoordinates";
|
|
20
|
+
readonly CanvasScroll: "canvasScrolling";
|
|
21
|
+
readonly CanvasError: "canvasError";
|
|
22
|
+
readonly ComponentMoveStarted: "componentMoveStarted";
|
|
23
|
+
readonly ComponentMoveEnded: "componentMoveEnded";
|
|
24
|
+
readonly OutsideCanvasClick: "outsideCanvasClick";
|
|
25
|
+
readonly SDKFeatures: "sdkFeatures";
|
|
26
|
+
readonly RequestEntities: "REQUEST_ENTITIES";
|
|
28
27
|
};
|
|
29
28
|
declare const INCOMING_EVENTS: {
|
|
30
|
-
RequestEditorMode:
|
|
31
|
-
ExperienceUpdated:
|
|
32
|
-
ComponentDraggingChanged:
|
|
33
|
-
ComponentDragCanceled:
|
|
34
|
-
ComponentDragStarted:
|
|
35
|
-
ComponentDragEnded:
|
|
36
|
-
ComponentMoveEnded:
|
|
37
|
-
CanvasResized:
|
|
38
|
-
SelectComponent:
|
|
39
|
-
HoverComponent:
|
|
40
|
-
UpdatedEntity:
|
|
41
|
-
AssembliesAdded:
|
|
42
|
-
AssembliesRegistered:
|
|
43
|
-
|
|
44
|
-
|
|
29
|
+
readonly RequestEditorMode: "requestEditorMode";
|
|
30
|
+
readonly ExperienceUpdated: "componentTreeUpdated";
|
|
31
|
+
readonly ComponentDraggingChanged: "componentDraggingChanged";
|
|
32
|
+
readonly ComponentDragCanceled: "componentDragCanceled";
|
|
33
|
+
readonly ComponentDragStarted: "componentDragStarted";
|
|
34
|
+
readonly ComponentDragEnded: "componentDragEnded";
|
|
35
|
+
readonly ComponentMoveEnded: "componentMoveEnded";
|
|
36
|
+
readonly CanvasResized: "canvasResized";
|
|
37
|
+
readonly SelectComponent: "selectComponent";
|
|
38
|
+
readonly HoverComponent: "hoverComponent";
|
|
39
|
+
readonly UpdatedEntity: "updatedEntity";
|
|
40
|
+
readonly AssembliesAdded: "assembliesAdded";
|
|
41
|
+
readonly AssembliesRegistered: "assembliesRegistered";
|
|
42
|
+
readonly MouseMove: "mouseMove";
|
|
43
|
+
readonly RequestedEntities: "REQUESTED_ENTITIES";
|
|
45
44
|
};
|
|
46
45
|
declare const INTERNAL_EVENTS: {
|
|
47
|
-
ComponentsRegistered:
|
|
48
|
-
VisualEditorInitialize:
|
|
46
|
+
readonly ComponentsRegistered: "cfComponentsRegistered";
|
|
47
|
+
readonly VisualEditorInitialize: "cfVisualEditorInitialize";
|
|
49
48
|
};
|
|
50
49
|
declare const VISUAL_EDITOR_EVENTS: {
|
|
51
50
|
Ready: string;
|
package/dist/constants.js
CHANGED
|
@@ -7,7 +7,6 @@ const OUTGOING_EVENTS = {
|
|
|
7
7
|
Connected: 'connected',
|
|
8
8
|
DesignTokens: 'registerDesignTokens',
|
|
9
9
|
RegisteredBreakpoints: 'registeredBreakpoints',
|
|
10
|
-
HoveredSection: 'hoveredSection',
|
|
11
10
|
MouseMove: 'mouseMove',
|
|
12
11
|
NewHoveredElement: 'newHoveredElement',
|
|
13
12
|
ComponentSelected: 'componentSelected',
|
|
@@ -18,13 +17,13 @@ const OUTGOING_EVENTS = {
|
|
|
18
17
|
ComponentMoved: 'componentMoved',
|
|
19
18
|
CanvasReload: 'canvasReload',
|
|
20
19
|
UpdateSelectedComponentCoordinates: 'updateSelectedComponentCoordinates',
|
|
21
|
-
UpdateHoveredComponentCoordinates: 'updateHoveredComponentCoordinates',
|
|
22
20
|
CanvasScroll: 'canvasScrolling',
|
|
23
21
|
CanvasError: 'canvasError',
|
|
24
22
|
ComponentMoveStarted: 'componentMoveStarted',
|
|
25
23
|
ComponentMoveEnded: 'componentMoveEnded',
|
|
26
24
|
OutsideCanvasClick: 'outsideCanvasClick',
|
|
27
25
|
SDKFeatures: 'sdkFeatures',
|
|
26
|
+
RequestEntities: 'REQUEST_ENTITIES',
|
|
28
27
|
};
|
|
29
28
|
const INCOMING_EVENTS = {
|
|
30
29
|
RequestEditorMode: 'requestEditorMode',
|
|
@@ -40,8 +39,8 @@ const INCOMING_EVENTS = {
|
|
|
40
39
|
UpdatedEntity: 'updatedEntity',
|
|
41
40
|
AssembliesAdded: 'assembliesAdded',
|
|
42
41
|
AssembliesRegistered: 'assembliesRegistered',
|
|
43
|
-
InitEditor: 'initEditor',
|
|
44
42
|
MouseMove: 'mouseMove',
|
|
43
|
+
RequestedEntities: 'REQUESTED_ENTITIES',
|
|
45
44
|
};
|
|
46
45
|
const INTERNAL_EVENTS = {
|
|
47
46
|
ComponentsRegistered: 'cfComponentsRegistered',
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["export const SCROLL_STATES = {\n Start: 'scrollStart',\n IsScrolling: 'isScrolling',\n End: 'scrollEnd',\n};\n\nexport const OUTGOING_EVENTS = {\n Connected: 'connected',\n DesignTokens: 'registerDesignTokens',\n RegisteredBreakpoints: 'registeredBreakpoints',\n
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["export const SCROLL_STATES = {\n Start: 'scrollStart',\n IsScrolling: 'isScrolling',\n End: 'scrollEnd',\n} as const;\n\nexport const OUTGOING_EVENTS = {\n Connected: 'connected',\n DesignTokens: 'registerDesignTokens',\n RegisteredBreakpoints: 'registeredBreakpoints',\n MouseMove: 'mouseMove',\n NewHoveredElement: 'newHoveredElement',\n ComponentSelected: 'componentSelected',\n RegisteredComponents: 'registeredComponents',\n RequestComponentTreeUpdate: 'requestComponentTreeUpdate',\n ComponentDragCanceled: 'componentDragCanceled',\n ComponentDropped: 'componentDropped',\n ComponentMoved: 'componentMoved',\n CanvasReload: 'canvasReload',\n UpdateSelectedComponentCoordinates: 'updateSelectedComponentCoordinates',\n CanvasScroll: 'canvasScrolling',\n CanvasError: 'canvasError',\n ComponentMoveStarted: 'componentMoveStarted',\n ComponentMoveEnded: 'componentMoveEnded',\n OutsideCanvasClick: 'outsideCanvasClick',\n SDKFeatures: 'sdkFeatures',\n RequestEntities: 'REQUEST_ENTITIES',\n} as const;\n\nexport const INCOMING_EVENTS = {\n RequestEditorMode: 'requestEditorMode',\n ExperienceUpdated: 'componentTreeUpdated',\n ComponentDraggingChanged: 'componentDraggingChanged',\n ComponentDragCanceled: 'componentDragCanceled',\n ComponentDragStarted: 'componentDragStarted',\n ComponentDragEnded: 'componentDragEnded',\n ComponentMoveEnded: 'componentMoveEnded',\n CanvasResized: 'canvasResized',\n SelectComponent: 'selectComponent',\n HoverComponent: 'hoverComponent',\n UpdatedEntity: 'updatedEntity',\n AssembliesAdded: 'assembliesAdded',\n AssembliesRegistered: 'assembliesRegistered',\n MouseMove: 'mouseMove',\n RequestedEntities: 'REQUESTED_ENTITIES',\n} as const;\n\nexport const INTERNAL_EVENTS = {\n ComponentsRegistered: 'cfComponentsRegistered',\n VisualEditorInitialize: 'cfVisualEditorInitialize',\n} as const;\n\nexport const VISUAL_EDITOR_EVENTS = {\n Ready: 'cfVisualEditorReady',\n};\n\nexport const VISUAL_EDITOR_CONTAINER_ID = 'cf-visual-editor';\nexport const CONTENTFUL_COMPONENT_CATEGORY = 'contentful-component';\nexport const CONTENTFUL_DEFAULT_CATEGORY = 'Contentful';\n\nexport const CONTENTFUL_COMPONENTS = {\n section: {\n id: 'contentful-section',\n name: 'Section',\n },\n container: {\n id: 'contentful-container',\n name: 'Container',\n },\n columns: {\n id: 'contentful-columns',\n name: 'Columns',\n },\n singleColumn: {\n id: 'contentful-single-column',\n name: 'Column',\n },\n button: {\n id: 'contentful-button',\n name: 'Button',\n },\n heading: {\n id: 'contentful-heading',\n name: 'Heading',\n },\n image: {\n id: 'contentful-image',\n name: 'Image',\n },\n richText: {\n id: 'contentful-richText',\n name: 'Rich Text',\n },\n text: {\n id: 'contentful-text',\n name: 'Text',\n },\n divider: {\n id: 'contentful-divider',\n name: 'Divider',\n },\n};\n\nexport const ASSEMBLY_NODE_TYPE = 'assembly';\nexport const ASSEMBLY_DEFAULT_CATEGORY = 'Assemblies';\nexport const ASSEMBLY_BLOCK_NODE_TYPE = 'assemblyBlock';\nexport const ASSEMBLY_NODE_TYPES = [ASSEMBLY_NODE_TYPE, ASSEMBLY_BLOCK_NODE_TYPE];\nexport const LATEST_SCHEMA_VERSION = '2023-09-28';\nexport const CF_STYLE_ATTRIBUTES = [\n 'cfHorizontalAlignment',\n 'cfVerticalAlignment',\n 'cfMargin',\n 'cfPadding',\n 'cfBackgroundColor',\n 'cfWidth',\n 'cfMaxWidth',\n 'cfHeight',\n 'cfImageAsset',\n 'cfImageOptions',\n 'cfBackgroundImageUrl',\n 'cfBackgroundImageOptions',\n 'cfFlexDirection',\n 'cfFlexWrap',\n 'cfBorder',\n 'cfBorderRadius',\n 'cfGap',\n 'cfFontSize',\n 'cfFontWeight',\n 'cfLineHeight',\n 'cfLetterSpacing',\n 'cfTextColor',\n 'cfTextAlign',\n 'cfTextTransform',\n 'cfTextBold',\n 'cfTextItalic',\n 'cfTextUnderline',\n // For backwards compatibility\n // we need to keep those in this constant array\n // so that omit() in <VisualEditorBlock> and <CompositionBlock>\n // can filter them out and not pass as props\n 'cfBackgroundImageScaling',\n 'cfBackgroundImageAlignment',\n 'cfBackgroundImageAlignmentVertical',\n 'cfBackgroundImageAlignmentHorizontal',\n];\n\nexport const EMPTY_CONTAINER_HEIGHT = '80px';\n\nexport const HYPERLINK_DEFAULT_PATTERN = `/{locale}/{entry.fields.slug}/`;\n\nexport const DEFAULT_IMAGE_WIDTH = '500px';\n\nexport enum PostMessageMethods {\n REQUEST_ENTITIES = 'REQUEST_ENTITIES',\n REQUESTED_ENTITIES = 'REQUESTED_ENTITIES',\n}\n\nexport const SUPPORTED_IMAGE_FORMATS = ['jpg', 'png', 'webp', 'gif', 'avif'] as const;\n"],"names":[],"mappings":"AAAa,MAAA,aAAa,GAAG;AAC3B,IAAA,KAAK,EAAE,aAAa;AACpB,IAAA,WAAW,EAAE,aAAa;AAC1B,IAAA,GAAG,EAAE,WAAW;EACP;AAEE,MAAA,eAAe,GAAG;AAC7B,IAAA,SAAS,EAAE,WAAW;AACtB,IAAA,YAAY,EAAE,sBAAsB;AACpC,IAAA,qBAAqB,EAAE,uBAAuB;AAC9C,IAAA,SAAS,EAAE,WAAW;AACtB,IAAA,iBAAiB,EAAE,mBAAmB;AACtC,IAAA,iBAAiB,EAAE,mBAAmB;AACtC,IAAA,oBAAoB,EAAE,sBAAsB;AAC5C,IAAA,0BAA0B,EAAE,4BAA4B;AACxD,IAAA,qBAAqB,EAAE,uBAAuB;AAC9C,IAAA,gBAAgB,EAAE,kBAAkB;AACpC,IAAA,cAAc,EAAE,gBAAgB;AAChC,IAAA,YAAY,EAAE,cAAc;AAC5B,IAAA,kCAAkC,EAAE,oCAAoC;AACxE,IAAA,YAAY,EAAE,iBAAiB;AAC/B,IAAA,WAAW,EAAE,aAAa;AAC1B,IAAA,oBAAoB,EAAE,sBAAsB;AAC5C,IAAA,kBAAkB,EAAE,oBAAoB;AACxC,IAAA,kBAAkB,EAAE,oBAAoB;AACxC,IAAA,WAAW,EAAE,aAAa;AAC1B,IAAA,eAAe,EAAE,kBAAkB;EAC1B;AAEE,MAAA,eAAe,GAAG;AAC7B,IAAA,iBAAiB,EAAE,mBAAmB;AACtC,IAAA,iBAAiB,EAAE,sBAAsB;AACzC,IAAA,wBAAwB,EAAE,0BAA0B;AACpD,IAAA,qBAAqB,EAAE,uBAAuB;AAC9C,IAAA,oB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CAAA;AACrC,IAAA,kBAAA,CAAA,oBAAA,CAAA,GAAA,oBAAyC,CAAA;AAC3C,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,GAG7B,EAAA,CAAA,CAAA,CAAA;AAEM,MAAM,uBAAuB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;"}
|
package/dist/exports.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { ASSEMBLY_BLOCK_NODE_TYPE, ASSEMBLY_DEFAULT_CATEGORY, ASSEMBLY_NODE_TYPE, ASSEMBLY_NODE_TYPES, CF_STYLE_ATTRIBUTES, CONTENTFUL_COMPONENTS, CONTENTFUL_COMPONENT_CATEGORY, CONTENTFUL_DEFAULT_CATEGORY, DEFAULT_IMAGE_WIDTH, EMPTY_CONTAINER_HEIGHT, HYPERLINK_DEFAULT_PATTERN, INCOMING_EVENTS, INTERNAL_EVENTS, LATEST_SCHEMA_VERSION, OUTGOING_EVENTS, PostMessageMethods, SCROLL_STATES, SUPPORTED_IMAGE_FORMATS, VISUAL_EDITOR_CONTAINER_ID, VISUAL_EDITOR_EVENTS } from './constants.js';
|
|
2
|
-
export { BackgroundImageAlignmentOption, BackgroundImageOptions, BackgroundImageScalingOption, Binding, BindingMap, BindingMapByBlockId, BoundComponentPropertyTypes, CSSProperties, ComponentBinding, ComponentDefinition, ComponentDefinitionVariable, ComponentDefinitionVariableBase, ComponentDefinitionVariableValidation, ComponentRegistration, ComponentRegistrationOptions, ContainerStyleVariableName, Coordinates, DataSourceEntryValueType, DesignTokensDefinition, Experience, ExperienceEntry, ExperienceFields, ExperienceTree, ExperienceTreeNode, ExternalSDKMode, HoveredElement, ImageLoadingOption, ImageObjectFitOption, ImageObjectPositionOption, ImageOptions, IncomingEvent, InternalEvent, InternalSDKMode, Link, ManagementEntity, OptimizedBackgroundImageAsset, OptimizedImageAsset, OutgoingEvent, RawCoordinates, RecursiveDesignTokenDefinition, RequestEntitiesMessage, RequestedEntitiesMessage, ResolveDesignValueType, ScrollState, StyleProps, ValidationOption, VariableFormats } from './types.js';
|
|
2
|
+
export { AssembliesAddedPayload, AssembliesRegisteredPayload, BackgroundImageAlignmentOption, BackgroundImageOptions, BackgroundImageScalingOption, Binding, BindingMap, BindingMapByBlockId, BoundComponentPropertyTypes, CSSProperties, CanvasErrorPayload, CanvasReloadPayload, CanvasResizedPayload, CanvasScrollPayload, ComponentBinding, ComponentDefinition, ComponentDefinitionVariable, ComponentDefinitionVariableBase, ComponentDefinitionVariableValidation, ComponentDragCanceledPayload, ComponentDragEndedPayload, ComponentDragStartedPayload, ComponentDraggingChangedPayload, ComponentDroppedPayload, ComponentMoveEndedPayload, ComponentMoveStartedPayload, ComponentMovedPayload, ComponentRegistration, ComponentRegistrationOptions, ComponentSelectedPayload, ConnectedPayload, ContainerStyleVariableName, Coordinates, DataSourceEntryValueType, DesignTokensDefinition, DesignTokensPayload, DragWrapperProps, Experience, ExperienceEntry, ExperienceFields, ExperienceTree, ExperienceTreeNode, ExperienceUpdatedPayload, ExternalSDKMode, HoverComponentPayload, HoveredElement, ImageLoadingOption, ImageObjectFitOption, ImageObjectPositionOption, ImageOptions, IncomingComponentDragCanceledPayload, IncomingComponentMoveEndedPayload, IncomingEvent, IncomingMessage, IncomingMouseMovePayload, InternalEvent, InternalSDKMode, Link, ManagementEntity, MouseMovePayload, NewHoveredElementPayload, OptimizedBackgroundImageAsset, OptimizedImageAsset, OutgoingEvent, OutgoingMessage, OutsideCanvasClickPayload, RawCoordinates, RecursiveDesignTokenDefinition, RegisteredBreakpointsPayload, RegisteredComponentsPayload, RequestComponentTreeUpdatePayload, RequestEditorModePayload, RequestEntitiesMessage, RequestEntitiesPayload, RequestedEntitiesMessage, RequestedEntitiesPayload, ResolveDesignValueType, SDKFeaturesPayload, ScrollState, SelectComponentPayload, SendMessageParams, StyleProps, UpdateSelectedComponentCoordinatesPayload, UpdatedEntityPayload, ValidationOption, VariableFormats, WrapperTags } from './types.js';
|
|
3
3
|
export { BoundValue, Breakpoint, ComponentDefinitionPropertyType as ComponentDefinitionVariableType, ComponentPropertyValue, ComponentTreeNode, ComponentValue, DesignValue, ExperienceComponentSettings, ExperienceDataSource, ExperienceUnboundValues, PrimitiveValue, SchemaVersions, UnboundValue, ValuesByBreakpoint } from '@contentful/experiences-validators';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { isComponentAllowedOnRoot, isContentfulStructureComponent, isStructureWithRelativeHeight } from './utils/components.js';
|
|
2
2
|
export { findOutermostCoordinates, getElementCoordinates } from './utils/domValues.js';
|
|
3
|
-
export {
|
|
3
|
+
export { doesMismatchMessageSchema, tryParseMessage, validateExperienceBuilderConfig } from './utils/validations.js';
|
|
4
4
|
export { buildCfStyles, buildStyleTag, calculateNodeDefaultHeight, toCSSAttribute } from './utils/styleUtils/stylesUtils.js';
|
|
5
5
|
export { detachExperienceStyles, flattenDesignTokenRegistry, indexByBreakpoint, isCfStyleAttribute, maybePopulateDesignTokenValue, resolveBackgroundImageBinding, toCSSString, toMediaQuery } from './utils/styleUtils/ssrStyles.js';
|
|
6
6
|
export { transformBoundContentValue } from './utils/transformers/transformBoundContentValue.js';
|
package/dist/index.js
CHANGED
|
@@ -17,8 +17,8 @@ const INCOMING_EVENTS = {
|
|
|
17
17
|
UpdatedEntity: 'updatedEntity',
|
|
18
18
|
AssembliesAdded: 'assembliesAdded',
|
|
19
19
|
AssembliesRegistered: 'assembliesRegistered',
|
|
20
|
-
InitEditor: 'initEditor',
|
|
21
20
|
MouseMove: 'mouseMove',
|
|
21
|
+
RequestedEntities: 'REQUESTED_ENTITIES',
|
|
22
22
|
};
|
|
23
23
|
const CONTENTFUL_COMPONENT_CATEGORY = 'contentful-component';
|
|
24
24
|
const CONTENTFUL_DEFAULT_CATEGORY = 'Contentful';
|
|
@@ -3079,27 +3079,29 @@ function gatherAutoFetchedReferentsFromIncludes(deepReferences, entriesResponse)
|
|
|
3079
3079
|
for (const reference of deepReferences) {
|
|
3080
3080
|
const headEntry = entriesResponse.items.find((entry) => entry.sys.id === reference.headEntityId);
|
|
3081
3081
|
if (!headEntry) {
|
|
3082
|
-
|
|
3082
|
+
console.debug(`[experiences-sdk-core::fetchers] When resolving deep-references could not find headEntry with id '${reference.entityId}'`);
|
|
3083
|
+
continue;
|
|
3083
3084
|
}
|
|
3084
3085
|
const linkToReferent = headEntry.fields[reference.field];
|
|
3085
3086
|
if (undefined === linkToReferent) {
|
|
3086
|
-
console.debug(`[experiences-sdk-
|
|
3087
|
+
console.debug(`[experiences-sdk-core::fetchers] Empty reference in headEntity. Probably reference is simply not set.`);
|
|
3087
3088
|
continue;
|
|
3088
3089
|
}
|
|
3089
3090
|
if (!isLink(linkToReferent)) {
|
|
3090
|
-
console.debug(`[experiences-sdk-
|
|
3091
|
+
console.debug(`[experiences-sdk-core::fetchers] Non-link value in headEntity. Probably broken path '${reference.originalPath}'`);
|
|
3091
3092
|
continue;
|
|
3092
3093
|
}
|
|
3093
3094
|
const linkType = linkToReferent.sys.linkType;
|
|
3094
3095
|
if (!['Entry', 'Asset'].includes(linkType)) {
|
|
3095
|
-
console.debug(`[experiences-sdk-
|
|
3096
|
+
console.debug(`[experiences-sdk-core::fetchers] Unhandled linkType :${JSON.stringify(linkToReferent)}`);
|
|
3096
3097
|
continue;
|
|
3097
3098
|
}
|
|
3098
3099
|
const referentEntity = entriesResponse.includes?.[linkType]?.find((entity) => entity.sys.id === linkToReferent.sys.id);
|
|
3099
3100
|
if (!referentEntity) {
|
|
3100
|
-
|
|
3101
|
+
console.debug(`[experiences-sdk-core::fetchers] L2-referent ${linkType} was not found within .includes (${JSON.stringify({
|
|
3101
3102
|
linkToReferent,
|
|
3102
3103
|
})})`);
|
|
3104
|
+
continue;
|
|
3103
3105
|
}
|
|
3104
3106
|
linkType === 'Entry'
|
|
3105
3107
|
? autoFetchedReferentEntries.push(referentEntity)
|