@amplifyup/sdk 0.1.26 → 0.1.27
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/AmplifyRenderer.js +24 -0
- package/dist/AmplifyRenderer.js.map +1 -1
- package/dist/AmplifyRenderer.mjs +24 -0
- package/dist/AmplifyRenderer.mjs.map +1 -1
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -0
- package/dist/index.mjs.map +1 -1
- package/dist/react.js +209 -2
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +210 -3
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1770,6 +1770,12 @@ Available Console Commands:
|
|
|
1770
1770
|
return;
|
|
1771
1771
|
}
|
|
1772
1772
|
try {
|
|
1773
|
+
if (event.data?.type === "AMPLIFYUP_FIELD_PATCH") {
|
|
1774
|
+
window.dispatchEvent(
|
|
1775
|
+
new CustomEvent("amplifyup:field-patch", { detail: event.data })
|
|
1776
|
+
);
|
|
1777
|
+
return;
|
|
1778
|
+
}
|
|
1773
1779
|
if (event.data?.type === "COMPONENT_DELETABLE_STATUS") {
|
|
1774
1780
|
const { componentId, deletable, nodeId } = event.data;
|
|
1775
1781
|
const element = document.querySelector(`[data-component-id="${componentId}"]`);
|
|
@@ -1956,6 +1962,10 @@ Available Console Commands:
|
|
|
1956
1962
|
setEventSelectionMode(enabled) {
|
|
1957
1963
|
if (typeof document === "undefined") return;
|
|
1958
1964
|
this.eventSelectionMode = enabled;
|
|
1965
|
+
if (typeof window !== "undefined") {
|
|
1966
|
+
window.__AMPLIFYUP_EVENT_SELECTION__ = enabled;
|
|
1967
|
+
window.dispatchEvent(new CustomEvent("amplifyup:composer-edit"));
|
|
1968
|
+
}
|
|
1959
1969
|
if (this.eventSelectionClickHandler) {
|
|
1960
1970
|
document.removeEventListener("click", this.eventSelectionClickHandler, true);
|
|
1961
1971
|
this.eventSelectionClickHandler = null;
|
|
@@ -2193,6 +2203,14 @@ Available Console Commands:
|
|
|
2193
2203
|
el.classList.add("amplifyup-selected");
|
|
2194
2204
|
}
|
|
2195
2205
|
});
|
|
2206
|
+
if (typeof window !== "undefined") {
|
|
2207
|
+
window.__AMPLIFYUP_COMPOSER_EDIT__ = highlightComponents;
|
|
2208
|
+
window.dispatchEvent(
|
|
2209
|
+
new CustomEvent("amplifyup:composer-edit", {
|
|
2210
|
+
detail: { enabled: highlightComponents }
|
|
2211
|
+
})
|
|
2212
|
+
);
|
|
2213
|
+
}
|
|
2196
2214
|
}
|
|
2197
2215
|
/** Document-level drag/drop for cross-iframe drags from Composer sidebar. */
|
|
2198
2216
|
setupComposerDragDrop() {
|
|
@@ -2501,6 +2519,12 @@ Available Console Commands:
|
|
|
2501
2519
|
const clearSelection = opts?.clearSelection !== false;
|
|
2502
2520
|
this.highlightingEnabled = false;
|
|
2503
2521
|
this.teardownComposerDragDrop();
|
|
2522
|
+
if (opts?.clearSelection !== false && typeof window !== "undefined") {
|
|
2523
|
+
window.__AMPLIFYUP_COMPOSER_EDIT__ = false;
|
|
2524
|
+
window.dispatchEvent(
|
|
2525
|
+
new CustomEvent("amplifyup:composer-edit", { detail: { enabled: false } })
|
|
2526
|
+
);
|
|
2527
|
+
}
|
|
2504
2528
|
if (this.mutationObserver) {
|
|
2505
2529
|
this.mutationObserver.disconnect();
|
|
2506
2530
|
this.mutationObserver = null;
|