@movable/studio-framework 3.14.0-canary.0 → 3.14.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 +11 -4
- package/dist/index.js +11 -4
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
|
@@ -2742,18 +2742,25 @@ class StudioFramework {
|
|
|
2742
2742
|
propertyPath = '',
|
|
2743
2743
|
context = {}
|
|
2744
2744
|
} = operand;
|
|
2745
|
-
|
|
2745
|
+
const resolvedContext = await this.resolveDynamicFieldContext(context);
|
|
2746
|
+
return this.getPropertyTuple(propertyGroupKey, propertyPath, resolvedContext);
|
|
2746
2747
|
}
|
|
2747
2748
|
/** resolves `context` values that are property references (Dynamic Fields, Custom Properties, Data Source Properties, etc.) */
|
|
2748
2749
|
|
|
2749
2750
|
|
|
2750
|
-
resolveDynamicFieldContext(context) {
|
|
2751
|
+
async resolveDynamicFieldContext(context) {
|
|
2751
2752
|
const resolvedContext = {};
|
|
2752
2753
|
|
|
2753
2754
|
for (const [contextKey, contextValue] of Object.entries(context)) {
|
|
2754
2755
|
if (isDynamicProperty(contextValue)) {
|
|
2755
|
-
const resolvedValue = this.
|
|
2756
|
-
|
|
2756
|
+
const [resolvedValue, error] = await this.getPropertyTuple(contextValue.propertyGroupKey, contextValue.propertyPath, contextValue.context || {});
|
|
2757
|
+
|
|
2758
|
+
if (error) {
|
|
2759
|
+
console.warn(`Failed to resolve ${contextValue.propertyPath}:`, error);
|
|
2760
|
+
resolvedContext[contextKey] = null;
|
|
2761
|
+
} else {
|
|
2762
|
+
resolvedContext[contextKey] = resolvedValue;
|
|
2763
|
+
}
|
|
2757
2764
|
} else {
|
|
2758
2765
|
resolvedContext[contextKey] = contextValue;
|
|
2759
2766
|
}
|
package/dist/index.js
CHANGED
|
@@ -2752,18 +2752,25 @@ class StudioFramework {
|
|
|
2752
2752
|
propertyPath = '',
|
|
2753
2753
|
context = {}
|
|
2754
2754
|
} = operand;
|
|
2755
|
-
|
|
2755
|
+
const resolvedContext = await this.resolveDynamicFieldContext(context);
|
|
2756
|
+
return this.getPropertyTuple(propertyGroupKey, propertyPath, resolvedContext);
|
|
2756
2757
|
}
|
|
2757
2758
|
/** resolves `context` values that are property references (Dynamic Fields, Custom Properties, Data Source Properties, etc.) */
|
|
2758
2759
|
|
|
2759
2760
|
|
|
2760
|
-
resolveDynamicFieldContext(context) {
|
|
2761
|
+
async resolveDynamicFieldContext(context) {
|
|
2761
2762
|
const resolvedContext = {};
|
|
2762
2763
|
|
|
2763
2764
|
for (const [contextKey, contextValue] of Object.entries(context)) {
|
|
2764
2765
|
if (isDynamicProperty(contextValue)) {
|
|
2765
|
-
const resolvedValue = this.
|
|
2766
|
-
|
|
2766
|
+
const [resolvedValue, error] = await this.getPropertyTuple(contextValue.propertyGroupKey, contextValue.propertyPath, contextValue.context || {});
|
|
2767
|
+
|
|
2768
|
+
if (error) {
|
|
2769
|
+
console.warn(`Failed to resolve ${contextValue.propertyPath}:`, error);
|
|
2770
|
+
resolvedContext[contextKey] = null;
|
|
2771
|
+
} else {
|
|
2772
|
+
resolvedContext[contextKey] = resolvedValue;
|
|
2773
|
+
}
|
|
2767
2774
|
} else {
|
|
2768
2775
|
resolvedContext[contextKey] = contextValue;
|
|
2769
2776
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@movable/studio-framework",
|
|
3
|
-
"version": "3.14.0
|
|
3
|
+
"version": "3.14.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.14.0
|
|
35
|
-
"@movable/studio-framework-test-helpers": "^3.14.0
|
|
34
|
+
"@movable/framework-types": "^3.14.0",
|
|
35
|
+
"@movable/studio-framework-test-helpers": "^3.14.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": "
|
|
69
|
+
"gitHead": "15063656c0521af765b465548ce3001b363e4163"
|
|
70
70
|
}
|