@servlyadmin/runtime-core 0.1.21 → 0.1.23
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 +14 -3
- package/dist/index.js +14 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -19697,6 +19697,9 @@ function resolveComponentViewInputs(bindings, context, parentInputs) {
|
|
|
19697
19697
|
for (const [key, binding] of Object.entries(bindings)) {
|
|
19698
19698
|
if (!binding) continue;
|
|
19699
19699
|
const source = (binding.source || "").toLowerCase();
|
|
19700
|
+
if (source === "function") {
|
|
19701
|
+
continue;
|
|
19702
|
+
}
|
|
19700
19703
|
switch (source) {
|
|
19701
19704
|
case "static":
|
|
19702
19705
|
case "value":
|
|
@@ -19763,8 +19766,14 @@ function renderElement(element, tree, context, eventHandlers, elementStates, sta
|
|
|
19763
19766
|
}
|
|
19764
19767
|
const elementBindings = element.configuration?.bindings?.inputs;
|
|
19765
19768
|
const resolvedInputs = elementBindings ? resolveComponentViewInputs(elementBindings, context, context.props) : {};
|
|
19769
|
+
const filteredContextProps = {};
|
|
19770
|
+
for (const [key, value] of Object.entries(context.props || {})) {
|
|
19771
|
+
if (typeof value !== "function") {
|
|
19772
|
+
filteredContextProps[key] = value;
|
|
19773
|
+
}
|
|
19774
|
+
}
|
|
19766
19775
|
const elementContext = {
|
|
19767
|
-
props: { ...
|
|
19776
|
+
props: { ...filteredContextProps, ...resolvedInputs },
|
|
19768
19777
|
state: context.state,
|
|
19769
19778
|
context: context.context
|
|
19770
19779
|
};
|
|
@@ -20081,8 +20090,10 @@ function render(options) {
|
|
|
20081
20090
|
} else {
|
|
20082
20091
|
const wrapper = document.createElement("div");
|
|
20083
20092
|
wrapper.setAttribute("data-servly-wrapper", "true");
|
|
20084
|
-
for (
|
|
20085
|
-
const
|
|
20093
|
+
for (let i = 0; i < rootElements.length; i++) {
|
|
20094
|
+
const root = rootElements[i];
|
|
20095
|
+
const isFirstRoot = i === 0;
|
|
20096
|
+
const rootElement = renderElement(root, tree, context, eventHandlers, state.elementStates, state, isFirstRoot);
|
|
20086
20097
|
wrapper.appendChild(rootElement);
|
|
20087
20098
|
}
|
|
20088
20099
|
state.rootElement = wrapper;
|
package/dist/index.js
CHANGED
|
@@ -2901,6 +2901,9 @@ function resolveComponentViewInputs(bindings, context, parentInputs) {
|
|
|
2901
2901
|
for (const [key, binding] of Object.entries(bindings)) {
|
|
2902
2902
|
if (!binding) continue;
|
|
2903
2903
|
const source = (binding.source || "").toLowerCase();
|
|
2904
|
+
if (source === "function") {
|
|
2905
|
+
continue;
|
|
2906
|
+
}
|
|
2904
2907
|
switch (source) {
|
|
2905
2908
|
case "static":
|
|
2906
2909
|
case "value":
|
|
@@ -2967,8 +2970,14 @@ function renderElement(element, tree, context, eventHandlers, elementStates, sta
|
|
|
2967
2970
|
}
|
|
2968
2971
|
const elementBindings = element.configuration?.bindings?.inputs;
|
|
2969
2972
|
const resolvedInputs = elementBindings ? resolveComponentViewInputs(elementBindings, context, context.props) : {};
|
|
2973
|
+
const filteredContextProps = {};
|
|
2974
|
+
for (const [key, value] of Object.entries(context.props || {})) {
|
|
2975
|
+
if (typeof value !== "function") {
|
|
2976
|
+
filteredContextProps[key] = value;
|
|
2977
|
+
}
|
|
2978
|
+
}
|
|
2970
2979
|
const elementContext = {
|
|
2971
|
-
props: { ...
|
|
2980
|
+
props: { ...filteredContextProps, ...resolvedInputs },
|
|
2972
2981
|
state: context.state,
|
|
2973
2982
|
context: context.context
|
|
2974
2983
|
};
|
|
@@ -3285,8 +3294,10 @@ function render(options) {
|
|
|
3285
3294
|
} else {
|
|
3286
3295
|
const wrapper = document.createElement("div");
|
|
3287
3296
|
wrapper.setAttribute("data-servly-wrapper", "true");
|
|
3288
|
-
for (
|
|
3289
|
-
const
|
|
3297
|
+
for (let i = 0; i < rootElements.length; i++) {
|
|
3298
|
+
const root = rootElements[i];
|
|
3299
|
+
const isFirstRoot = i === 0;
|
|
3300
|
+
const rootElement = renderElement(root, tree, context, eventHandlers, state.elementStates, state, isFirstRoot);
|
|
3290
3301
|
wrapper.appendChild(rootElement);
|
|
3291
3302
|
}
|
|
3292
3303
|
state.rootElement = wrapper;
|