@servlyadmin/runtime-core 0.1.23 → 0.1.24

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 CHANGED
@@ -19697,9 +19697,6 @@ 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
- }
19703
19700
  switch (source) {
19704
19701
  case "static":
19705
19702
  case "value":
@@ -19735,6 +19732,15 @@ function resolveComponentViewInputs(bindings, context, parentInputs) {
19735
19732
  resolved[key] = binding.value;
19736
19733
  }
19737
19734
  break;
19735
+ case "function":
19736
+ if (binding.path) {
19737
+ const source2 = parentInputs || context.props;
19738
+ const resolvedValue = getValueByPath2(source2, binding.path);
19739
+ if (resolvedValue !== void 0 && typeof resolvedValue === "function") {
19740
+ resolved[key] = resolvedValue;
19741
+ }
19742
+ }
19743
+ break;
19738
19744
  default:
19739
19745
  resolved[key] = binding.value;
19740
19746
  }
@@ -19766,14 +19772,8 @@ function renderElement(element, tree, context, eventHandlers, elementStates, sta
19766
19772
  }
19767
19773
  const elementBindings = element.configuration?.bindings?.inputs;
19768
19774
  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
- }
19775
19775
  const elementContext = {
19776
- props: { ...filteredContextProps, ...resolvedInputs },
19776
+ props: { ...context.props, ...resolvedInputs },
19777
19777
  state: context.state,
19778
19778
  context: context.context
19779
19779
  };
package/dist/index.js CHANGED
@@ -2901,9 +2901,6 @@ 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
- }
2907
2904
  switch (source) {
2908
2905
  case "static":
2909
2906
  case "value":
@@ -2939,6 +2936,15 @@ function resolveComponentViewInputs(bindings, context, parentInputs) {
2939
2936
  resolved[key] = binding.value;
2940
2937
  }
2941
2938
  break;
2939
+ case "function":
2940
+ if (binding.path) {
2941
+ const source2 = parentInputs || context.props;
2942
+ const resolvedValue = getValueByPath2(source2, binding.path);
2943
+ if (resolvedValue !== void 0 && typeof resolvedValue === "function") {
2944
+ resolved[key] = resolvedValue;
2945
+ }
2946
+ }
2947
+ break;
2942
2948
  default:
2943
2949
  resolved[key] = binding.value;
2944
2950
  }
@@ -2970,14 +2976,8 @@ function renderElement(element, tree, context, eventHandlers, elementStates, sta
2970
2976
  }
2971
2977
  const elementBindings = element.configuration?.bindings?.inputs;
2972
2978
  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
- }
2979
2979
  const elementContext = {
2980
- props: { ...filteredContextProps, ...resolvedInputs },
2980
+ props: { ...context.props, ...resolvedInputs },
2981
2981
  state: context.state,
2982
2982
  context: context.context
2983
2983
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servlyadmin/runtime-core",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "Framework-agnostic core renderer for Servly components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",