@contentful/experiences-visual-editor-react 0.0.1-alpha.3 → 0.0.1-alpha.4
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 +14 -5
- package/dist/index.js.map +1 -1
- package/dist/renderApp.js +14 -5
- package/dist/renderApp.js.map +1 -1
- package/package.json +4 -4
package/dist/renderApp.js
CHANGED
|
@@ -34360,7 +34360,7 @@ helpers.isText = isText;
|
|
|
34360
34360
|
|
|
34361
34361
|
const INCOMING_EVENTS$1 = {
|
|
34362
34362
|
RequestEditorMode: 'requestEditorMode',
|
|
34363
|
-
|
|
34363
|
+
ExperienceUpdated: 'componentTreeUpdated',
|
|
34364
34364
|
ComponentDraggingChanged: 'componentDraggingChanged',
|
|
34365
34365
|
ComponentDragCanceled: 'componentDragCanceled',
|
|
34366
34366
|
ComponentDragStarted: 'componentDragStarted',
|
|
@@ -35531,6 +35531,13 @@ class EntityStoreBase {
|
|
|
35531
35531
|
}
|
|
35532
35532
|
return this.entryMap.get(id);
|
|
35533
35533
|
}
|
|
35534
|
+
toJSON() {
|
|
35535
|
+
return {
|
|
35536
|
+
entryMap: Object.fromEntries(this.entryMap),
|
|
35537
|
+
assetMap: Object.fromEntries(this.assetMap),
|
|
35538
|
+
locale: this.locale,
|
|
35539
|
+
};
|
|
35540
|
+
}
|
|
35534
35541
|
}
|
|
35535
35542
|
|
|
35536
35543
|
/**
|
|
@@ -46193,7 +46200,7 @@ const OUTGOING_EVENTS = {
|
|
|
46193
46200
|
};
|
|
46194
46201
|
const INCOMING_EVENTS = {
|
|
46195
46202
|
RequestEditorMode: 'requestEditorMode',
|
|
46196
|
-
|
|
46203
|
+
ExperienceUpdated: 'componentTreeUpdated',
|
|
46197
46204
|
ComponentDraggingChanged: 'componentDraggingChanged',
|
|
46198
46205
|
ComponentDragCanceled: 'componentDragCanceled',
|
|
46199
46206
|
ComponentDragStarted: 'componentDragStarted',
|
|
@@ -51245,7 +51252,9 @@ const resolveAssembly = ({ node, entityStore, }) => {
|
|
|
51245
51252
|
});
|
|
51246
51253
|
return node;
|
|
51247
51254
|
}
|
|
51248
|
-
const componentFields = entityStore?.getValue(assembly, [
|
|
51255
|
+
const componentFields = entityStore?.getValue(assembly, [
|
|
51256
|
+
'fields',
|
|
51257
|
+
]);
|
|
51249
51258
|
if (!componentFields) {
|
|
51250
51259
|
console.warn(`Entry for assembly with ID '${componentId}' not found`, { entityStore });
|
|
51251
51260
|
return node;
|
|
@@ -52626,7 +52635,7 @@ const EmptyContainer = ({ isDragging }) => {
|
|
|
52626
52635
|
React.createElement("rect", { width: "11.676", height: "11.676", x: "18.011", y: "18.625", rx: "1.621", transform: "rotate(45 18.01 18.625)" }),
|
|
52627
52636
|
React.createElement("rect", { width: "11.676", height: "11.676", x: "30.557", y: "10.131", rx: "1.621", transform: "rotate(60 30.557 10.13)" }),
|
|
52628
52637
|
React.createElement("path", { fill: "#fff", stroke: "#fff", strokeWidth: ".243", d: "M31.113 17.038a.463.463 0 0 0-.683-.517l-1.763 1.032-1.033-1.763a.464.464 0 0 0-.8.469l1.034 1.763-1.763 1.033a.463.463 0 1 0 .468.8l1.763-1.033 1.033 1.763a.463.463 0 1 0 .8-.469l-1.033-1.763 1.763-1.033a.463.463 0 0 0 .214-.282Z" })),
|
|
52629
|
-
React.createElement("span", { className: styles$1.label }, "Add
|
|
52638
|
+
React.createElement("span", { className: styles$1.label }, "Add components to begin")));
|
|
52630
52639
|
};
|
|
52631
52640
|
|
|
52632
52641
|
const getZoneParents = (zoneId) => {
|
|
@@ -53253,7 +53262,7 @@ function useEditorSubscriber() {
|
|
|
53253
53262
|
console.debug(`[experiences-sdk-react::onMessage] Received message [${eventData.eventType}]`, eventData);
|
|
53254
53263
|
const { payload } = eventData;
|
|
53255
53264
|
switch (eventData.eventType) {
|
|
53256
|
-
case INCOMING_EVENTS.
|
|
53265
|
+
case INCOMING_EVENTS.ExperienceUpdated: {
|
|
53257
53266
|
const { tree, locale, changedNode, changedValueType, assemblies, } = payload;
|
|
53258
53267
|
// Make sure to first store the assemblies before setting the tree and thus triggering a rerender
|
|
53259
53268
|
if (assemblies) {
|