@servlyadmin/runtime-core 0.1.21 → 0.1.22
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 +10 -1
- package/dist/index.js +10 -1
- 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
|
};
|
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
|
};
|