@amplifyup/sdk 0.1.18 → 0.1.19
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 +25 -0
- package/dist/AmplifyRenderer.js.map +1 -1
- package/dist/AmplifyRenderer.mjs +25 -0
- package/dist/AmplifyRenderer.mjs.map +1 -1
- package/dist/react.js +25 -0
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +25 -0
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -2569,6 +2569,31 @@ function AmplifyRenderer({
|
|
|
2569
2569
|
pageConfig.layout?.header !== false;
|
|
2570
2570
|
pageConfig.layout?.footer !== false;
|
|
2571
2571
|
const renderNode = (node) => {
|
|
2572
|
+
const zoneIdFromProps = node.componentId === "AmplifyZone" ? String(node.props?.zoneId || "") : "";
|
|
2573
|
+
if (node.componentId === "AmplifyZone") {
|
|
2574
|
+
const contentSlot = node.slots?.find((s) => s.slotId === "content") || node.slots?.[0];
|
|
2575
|
+
const children = Array.isArray(contentSlot?.children) ? contentSlot.children : [];
|
|
2576
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2577
|
+
"div",
|
|
2578
|
+
{
|
|
2579
|
+
"data-node-id": node.id,
|
|
2580
|
+
"data-amplifyup-node": "",
|
|
2581
|
+
"data-amplifyup-component": "AmplifyZone",
|
|
2582
|
+
"data-amplifyup-zone": zoneIdFromProps || void 0,
|
|
2583
|
+
"data-zone-id": zoneIdFromProps || void 0,
|
|
2584
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2585
|
+
"div",
|
|
2586
|
+
{
|
|
2587
|
+
"data-slot-id": "content",
|
|
2588
|
+
"data-amplifyup-slot": "content",
|
|
2589
|
+
"data-parent-node-id": node.id,
|
|
2590
|
+
"data-parent-component-id": "AmplifyZone",
|
|
2591
|
+
children: children.filter(Boolean).map((child) => /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, { children: renderNode(child) }, child.id))
|
|
2592
|
+
}
|
|
2593
|
+
)
|
|
2594
|
+
}
|
|
2595
|
+
);
|
|
2596
|
+
}
|
|
2572
2597
|
let slotChildren = {};
|
|
2573
2598
|
console.log(`[AmplifyRenderer] Rendering node ${node.id} (${node.componentId})`, {
|
|
2574
2599
|
hasSlots: !!(node.slots && node.slots.length > 0),
|