@amplifyup/sdk 0.1.59 → 0.1.60
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 +16 -3
- package/dist/AmplifyRenderer.js.map +1 -1
- package/dist/AmplifyRenderer.mjs +16 -3
- package/dist/AmplifyRenderer.mjs.map +1 -1
- package/dist/index.js +16 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -3
- package/dist/index.mjs.map +1 -1
- package/dist/react.js +48 -4
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +48 -4
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2265,12 +2265,17 @@ Available Console Commands:
|
|
|
2265
2265
|
}
|
|
2266
2266
|
try {
|
|
2267
2267
|
if (event.data?.type === "AMPLIFYUP_RICHTEXT_EDITING") {
|
|
2268
|
-
document.querySelectorAll(".amplifyup-richtext-editing").forEach((el) =>
|
|
2268
|
+
document.querySelectorAll(".amplifyup-richtext-editing").forEach((el) => {
|
|
2269
|
+
el.classList.remove("amplifyup-richtext-editing");
|
|
2270
|
+
el.style.minHeight = "";
|
|
2271
|
+
el.style.height = "";
|
|
2272
|
+
el.style.display = "";
|
|
2273
|
+
});
|
|
2269
2274
|
if (event.data.active && event.data.fieldName) {
|
|
2270
2275
|
if (!document.getElementById("amplifyup-richtext-editing-style")) {
|
|
2271
2276
|
const style = document.createElement("style");
|
|
2272
2277
|
style.id = "amplifyup-richtext-editing-style";
|
|
2273
|
-
style.textContent = "[data-amplifyup-field].amplifyup-richtext-editing{outline:none!important;visibility:hidden!important;}";
|
|
2278
|
+
style.textContent = "[data-amplifyup-field].amplifyup-richtext-editing{outline:none!important;visibility:hidden!important;display:block!important;box-sizing:border-box!important;}";
|
|
2274
2279
|
document.head.appendChild(style);
|
|
2275
2280
|
}
|
|
2276
2281
|
const editRoot = event.data.layoutNodeId ? document.querySelector(
|
|
@@ -2279,7 +2284,15 @@ Available Console Commands:
|
|
|
2279
2284
|
const editField = editRoot.querySelector(
|
|
2280
2285
|
`[data-amplifyup-field="${event.data.fieldName}"]`
|
|
2281
2286
|
);
|
|
2282
|
-
if (editField)
|
|
2287
|
+
if (editField) {
|
|
2288
|
+
editField.classList.add("amplifyup-richtext-editing");
|
|
2289
|
+
const editHeight = Number(event.data.height) || 0;
|
|
2290
|
+
if (editHeight > 0) {
|
|
2291
|
+
editField.style.display = "block";
|
|
2292
|
+
editField.style.minHeight = `${editHeight}px`;
|
|
2293
|
+
editField.style.height = `${editHeight}px`;
|
|
2294
|
+
}
|
|
2295
|
+
}
|
|
2283
2296
|
}
|
|
2284
2297
|
return;
|
|
2285
2298
|
}
|