@servlyadmin/runtime-core 0.1.12 → 0.1.13
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.cjs +13 -1
- package/dist/index.js +13 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -19774,6 +19774,9 @@ function getValueByPath2(obj, path) {
|
|
|
19774
19774
|
return current;
|
|
19775
19775
|
}
|
|
19776
19776
|
function renderElement(element, tree, context, eventHandlers, elementStates, state, isRootElement = false) {
|
|
19777
|
+
if (element.isComponentView) {
|
|
19778
|
+
console.log("[Servly] Element has isComponentView=true:", element.i, "componentId:", element.componentId);
|
|
19779
|
+
}
|
|
19777
19780
|
if (element.isComponentView) {
|
|
19778
19781
|
return renderComponentViewElement(element, tree, context, eventHandlers, elementStates, state, isRootElement);
|
|
19779
19782
|
}
|
|
@@ -19835,6 +19838,13 @@ function renderIconElement(element, context, eventHandlers, elementStates, state
|
|
|
19835
19838
|
return wrapper;
|
|
19836
19839
|
}
|
|
19837
19840
|
function renderComponentViewElement(element, tree, context, eventHandlers, elementStates, state, isRootElement) {
|
|
19841
|
+
console.log("[Servly] renderComponentViewElement called:", {
|
|
19842
|
+
elementId: element.i,
|
|
19843
|
+
componentId: element.componentId,
|
|
19844
|
+
isComponentView: element.isComponentView,
|
|
19845
|
+
hasViews: !!state.views,
|
|
19846
|
+
viewsKeys: state.views ? Array.from(state.views.keys()).slice(0, 5) : []
|
|
19847
|
+
});
|
|
19838
19848
|
const componentViewId = `${element.componentId}-${element.i}`;
|
|
19839
19849
|
if (globalRenderingStack.has(componentViewId)) {
|
|
19840
19850
|
const placeholder = document.createElement("div");
|
|
@@ -19846,11 +19856,13 @@ function renderComponentViewElement(element, tree, context, eventHandlers, eleme
|
|
|
19846
19856
|
if (state.views?.has(element.componentId)) {
|
|
19847
19857
|
const view = state.views.get(element.componentId);
|
|
19848
19858
|
viewLayout = view?.layout;
|
|
19859
|
+
console.log("[Servly] Found view in views map:", element.componentId, "layout length:", viewLayout?.length);
|
|
19849
19860
|
}
|
|
19850
19861
|
if (!viewLayout && state.componentRegistry) {
|
|
19851
19862
|
const component = state.componentRegistry.get(element.componentId);
|
|
19852
19863
|
if (component) {
|
|
19853
19864
|
viewLayout = component.layout;
|
|
19865
|
+
console.log("[Servly] Found view in registry:", element.componentId);
|
|
19854
19866
|
}
|
|
19855
19867
|
}
|
|
19856
19868
|
if (!viewLayout && state.views === void 0 && state.viewsArray) {
|
|
@@ -19861,7 +19873,7 @@ function renderComponentViewElement(element, tree, context, eventHandlers, eleme
|
|
|
19861
19873
|
}
|
|
19862
19874
|
}
|
|
19863
19875
|
if (!viewLayout) {
|
|
19864
|
-
console.warn(`[Servly] Component not found: ${element.componentId}. Available in views: ${state.views ? Array.from(state.views.keys()).join(", ") : "none"}. Registry has: ${state.componentRegistry?.has(element.componentId) ? "yes" : "no"}`);
|
|
19876
|
+
console.warn(`[Servly] Component not found: ${element.componentId}. Element ID: ${element.i}. Available in views: ${state.views ? Array.from(state.views.keys()).join(", ") : "none"}. Registry has: ${state.componentRegistry?.has(element.componentId) ? "yes" : "no"}`);
|
|
19865
19877
|
const placeholder = document.createElement("div");
|
|
19866
19878
|
placeholder.className = "border-2 border-yellow-500 border-dashed p-4 bg-yellow-50";
|
|
19867
19879
|
placeholder.innerHTML = `<p class="text-yellow-600 text-sm">Component not found: ${element.componentId}</p>`;
|
package/dist/index.js
CHANGED
|
@@ -2978,6 +2978,9 @@ function getValueByPath2(obj, path) {
|
|
|
2978
2978
|
return current;
|
|
2979
2979
|
}
|
|
2980
2980
|
function renderElement(element, tree, context, eventHandlers, elementStates, state, isRootElement = false) {
|
|
2981
|
+
if (element.isComponentView) {
|
|
2982
|
+
console.log("[Servly] Element has isComponentView=true:", element.i, "componentId:", element.componentId);
|
|
2983
|
+
}
|
|
2981
2984
|
if (element.isComponentView) {
|
|
2982
2985
|
return renderComponentViewElement(element, tree, context, eventHandlers, elementStates, state, isRootElement);
|
|
2983
2986
|
}
|
|
@@ -3039,6 +3042,13 @@ function renderIconElement(element, context, eventHandlers, elementStates, state
|
|
|
3039
3042
|
return wrapper;
|
|
3040
3043
|
}
|
|
3041
3044
|
function renderComponentViewElement(element, tree, context, eventHandlers, elementStates, state, isRootElement) {
|
|
3045
|
+
console.log("[Servly] renderComponentViewElement called:", {
|
|
3046
|
+
elementId: element.i,
|
|
3047
|
+
componentId: element.componentId,
|
|
3048
|
+
isComponentView: element.isComponentView,
|
|
3049
|
+
hasViews: !!state.views,
|
|
3050
|
+
viewsKeys: state.views ? Array.from(state.views.keys()).slice(0, 5) : []
|
|
3051
|
+
});
|
|
3042
3052
|
const componentViewId = `${element.componentId}-${element.i}`;
|
|
3043
3053
|
if (globalRenderingStack.has(componentViewId)) {
|
|
3044
3054
|
const placeholder = document.createElement("div");
|
|
@@ -3050,11 +3060,13 @@ function renderComponentViewElement(element, tree, context, eventHandlers, eleme
|
|
|
3050
3060
|
if (state.views?.has(element.componentId)) {
|
|
3051
3061
|
const view = state.views.get(element.componentId);
|
|
3052
3062
|
viewLayout = view?.layout;
|
|
3063
|
+
console.log("[Servly] Found view in views map:", element.componentId, "layout length:", viewLayout?.length);
|
|
3053
3064
|
}
|
|
3054
3065
|
if (!viewLayout && state.componentRegistry) {
|
|
3055
3066
|
const component = state.componentRegistry.get(element.componentId);
|
|
3056
3067
|
if (component) {
|
|
3057
3068
|
viewLayout = component.layout;
|
|
3069
|
+
console.log("[Servly] Found view in registry:", element.componentId);
|
|
3058
3070
|
}
|
|
3059
3071
|
}
|
|
3060
3072
|
if (!viewLayout && state.views === void 0 && state.viewsArray) {
|
|
@@ -3065,7 +3077,7 @@ function renderComponentViewElement(element, tree, context, eventHandlers, eleme
|
|
|
3065
3077
|
}
|
|
3066
3078
|
}
|
|
3067
3079
|
if (!viewLayout) {
|
|
3068
|
-
console.warn(`[Servly] Component not found: ${element.componentId}. Available in views: ${state.views ? Array.from(state.views.keys()).join(", ") : "none"}. Registry has: ${state.componentRegistry?.has(element.componentId) ? "yes" : "no"}`);
|
|
3080
|
+
console.warn(`[Servly] Component not found: ${element.componentId}. Element ID: ${element.i}. Available in views: ${state.views ? Array.from(state.views.keys()).join(", ") : "none"}. Registry has: ${state.componentRegistry?.has(element.componentId) ? "yes" : "no"}`);
|
|
3069
3081
|
const placeholder = document.createElement("div");
|
|
3070
3082
|
placeholder.className = "border-2 border-yellow-500 border-dashed p-4 bg-yellow-50";
|
|
3071
3083
|
placeholder.innerHTML = `<p class="text-yellow-600 text-sm">Component not found: ${element.componentId}</p>`;
|