@movable/studio-framework 3.6.1-canary.0 → 3.7.0

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.es.js CHANGED
@@ -2747,7 +2747,26 @@ class StudioFramework {
2747
2747
  propertyPath = '',
2748
2748
  context = {}
2749
2749
  } = operand;
2750
- return this.getPropertyTuple(propertyGroupKey, propertyPath, context);
2750
+ return this.getPropertyTuple(propertyGroupKey, propertyPath, this.resolveDynamicFieldContext(context));
2751
+ }
2752
+ /** resolves `context` values that are Dynamic Fields */
2753
+
2754
+
2755
+ resolveDynamicFieldContext(context) {
2756
+ const resolvedContext = {};
2757
+
2758
+ for (const [contextKey, contextValue] of Object.entries(context)) {
2759
+ if (isDynamicProperty(contextValue) && contextValue.propertyGroupKey === 'param') {
2760
+ const resolvedValue = this.getProperty(contextValue.propertyGroupKey, // "param"
2761
+ contextValue.propertyPath // "params.[something]"
2762
+ );
2763
+ resolvedContext[contextKey] = resolvedValue;
2764
+ } else {
2765
+ resolvedContext[contextKey] = contextValue;
2766
+ }
2767
+ }
2768
+
2769
+ return resolvedContext;
2751
2770
  }
2752
2771
 
2753
2772
  async getCurrentCanvas() {
package/dist/index.js CHANGED
@@ -2757,7 +2757,26 @@ class StudioFramework {
2757
2757
  propertyPath = '',
2758
2758
  context = {}
2759
2759
  } = operand;
2760
- return this.getPropertyTuple(propertyGroupKey, propertyPath, context);
2760
+ return this.getPropertyTuple(propertyGroupKey, propertyPath, this.resolveDynamicFieldContext(context));
2761
+ }
2762
+ /** resolves `context` values that are Dynamic Fields */
2763
+
2764
+
2765
+ resolveDynamicFieldContext(context) {
2766
+ const resolvedContext = {};
2767
+
2768
+ for (const [contextKey, contextValue] of Object.entries(context)) {
2769
+ if (isDynamicProperty(contextValue) && contextValue.propertyGroupKey === 'param') {
2770
+ const resolvedValue = this.getProperty(contextValue.propertyGroupKey, // "param"
2771
+ contextValue.propertyPath // "params.[something]"
2772
+ );
2773
+ resolvedContext[contextKey] = resolvedValue;
2774
+ } else {
2775
+ resolvedContext[contextKey] = contextValue;
2776
+ }
2777
+ }
2778
+
2779
+ return resolvedContext;
2761
2780
  }
2762
2781
 
2763
2782
  async getCurrentCanvas() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movable/studio-framework",
3
- "version": "3.6.1-canary.0",
3
+ "version": "3.7.0",
4
4
  "description": "A Component library for reactive Studio apps.",
5
5
  "author": "Movable Ink",
6
6
  "repository": "movableink/studio-framework",
@@ -31,8 +31,8 @@
31
31
  "@babel/preset-react": "^7.14.5",
32
32
  "@babel/preset-typescript": "^7.13.0",
33
33
  "@movable/eslint-config-react": "^1.0.1",
34
- "@movable/framework-types": "^3.6.1-canary.0",
35
- "@movable/studio-framework-test-helpers": "^3.6.1-canary.0",
34
+ "@movable/framework-types": "^3.7.0",
35
+ "@movable/studio-framework-test-helpers": "^3.7.0",
36
36
  "@types/qunit": "^2.11.1",
37
37
  "@types/qunit-dom": "^0.7.0",
38
38
  "@types/react": "^17.0.6",
@@ -66,5 +66,5 @@
66
66
  "volta": {
67
67
  "extends": "../../package.json"
68
68
  },
69
- "gitHead": "47c70c8a89abd3cdb3086a30c11b7033c4ba671f"
69
+ "gitHead": "7139b3a40f09d65c236aa3a47571806dbc28fd40"
70
70
  }