@movable/studio-framework 3.14.1-canary.0 → 3.14.3-canary.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
@@ -1477,11 +1477,9 @@ class AsyncComputed {
1477
1477
 
1478
1478
  getProperty(...args) {
1479
1479
  const [grouping, path, context = {}] = parseGetPropertyArgs(args);
1480
- console.log(`getProperty called: ${grouping}.${path}`);
1481
1480
  const property = this.getPropertyInstance(grouping, path);
1482
1481
 
1483
1482
  if (!property) {
1484
- console.log(`⚠️ Property not found: ${grouping}.${path}`);
1485
1483
  return null;
1486
1484
  }
1487
1485
 
@@ -1499,9 +1497,7 @@ class AsyncComputed {
1499
1497
  requestEvent = createInertEvent();
1500
1498
  }
1501
1499
 
1502
- const result = property.compute(context, requestEvent);
1503
- console.log(`getProperty result for ${grouping}.${path}:`, result);
1504
- return result;
1500
+ return property.compute(context, requestEvent);
1505
1501
  }
1506
1502
 
1507
1503
  async getPropertyTuple(...args) {
@@ -2737,8 +2733,6 @@ class StudioFramework {
2737
2733
  }
2738
2734
 
2739
2735
  async evaluateOperand(operand) {
2740
- console.log('evaluateOperand');
2741
-
2742
2736
  if ('operator' in operand) {
2743
2737
  return this.resolveCondition(operand);
2744
2738
  }
@@ -2748,37 +2742,30 @@ class StudioFramework {
2748
2742
  propertyPath = '',
2749
2743
  context = {}
2750
2744
  } = operand;
2751
- return this.getPropertyTuple(propertyGroupKey, propertyPath, this.resolveDynamicFieldContext(context));
2745
+ const resolvedContext = await this.resolveDynamicFieldContext(context);
2746
+ return this.getPropertyTuple(propertyGroupKey, propertyPath, resolvedContext);
2752
2747
  }
2753
2748
  /** resolves `context` values that are property references (Dynamic Fields, Custom Properties, Data Source Properties, etc.) */
2754
2749
 
2755
2750
 
2756
- resolveDynamicFieldContext(context) {
2751
+ async resolveDynamicFieldContext(context) {
2757
2752
  const resolvedContext = {};
2758
- console.log('===== resolveDynamicFieldContext START =====');
2759
- console.log('Full context object:', context);
2760
2753
 
2761
2754
  for (const [contextKey, contextValue] of Object.entries(context)) {
2762
- console.log(`\n--- Processing context key: "${contextKey}" ---`);
2763
- console.log('contextValue:', contextValue);
2764
- console.log('contextValue type:', typeof contextValue);
2765
- console.log('contextValue has propertyPath?', contextValue?.propertyPath !== undefined);
2766
- console.log('contextValue.propertyPath value:', contextValue?.propertyPath);
2767
- console.log('contextValue.propertyGroupKey value:', contextValue?.propertyGroupKey);
2768
-
2769
2755
  if (isDynamicProperty(contextValue)) {
2770
- console.log('✓ isDynamicProperty=true - will resolve');
2771
- const resolvedValue = this.getProperty(contextValue.propertyGroupKey, contextValue.propertyPath, contextValue.context || {});
2772
- console.log('resolvedValue:', resolvedValue);
2773
- resolvedContext[contextKey] = resolvedValue;
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
+ }
2774
2764
  } else {
2775
- console.log('✗ isDynamicProperty=false - using as-is');
2776
2765
  resolvedContext[contextKey] = contextValue;
2777
2766
  }
2778
2767
  }
2779
2768
 
2780
- console.log('\n===== resolveDynamicFieldContext END =====');
2781
- console.log('Resolved context:', resolvedContext);
2782
2769
  return resolvedContext;
2783
2770
  }
2784
2771
 
package/dist/index.js CHANGED
@@ -1487,11 +1487,9 @@ class AsyncComputed {
1487
1487
 
1488
1488
  getProperty(...args) {
1489
1489
  const [grouping, path, context = {}] = parseGetPropertyArgs(args);
1490
- console.log(`getProperty called: ${grouping}.${path}`);
1491
1490
  const property = this.getPropertyInstance(grouping, path);
1492
1491
 
1493
1492
  if (!property) {
1494
- console.log(`⚠️ Property not found: ${grouping}.${path}`);
1495
1493
  return null;
1496
1494
  }
1497
1495
 
@@ -1509,9 +1507,7 @@ class AsyncComputed {
1509
1507
  requestEvent = createInertEvent();
1510
1508
  }
1511
1509
 
1512
- const result = property.compute(context, requestEvent);
1513
- console.log(`getProperty result for ${grouping}.${path}:`, result);
1514
- return result;
1510
+ return property.compute(context, requestEvent);
1515
1511
  }
1516
1512
 
1517
1513
  async getPropertyTuple(...args) {
@@ -2747,8 +2743,6 @@ class StudioFramework {
2747
2743
  }
2748
2744
 
2749
2745
  async evaluateOperand(operand) {
2750
- console.log('evaluateOperand');
2751
-
2752
2746
  if ('operator' in operand) {
2753
2747
  return this.resolveCondition(operand);
2754
2748
  }
@@ -2758,37 +2752,30 @@ class StudioFramework {
2758
2752
  propertyPath = '',
2759
2753
  context = {}
2760
2754
  } = operand;
2761
- return this.getPropertyTuple(propertyGroupKey, propertyPath, this.resolveDynamicFieldContext(context));
2755
+ const resolvedContext = await this.resolveDynamicFieldContext(context);
2756
+ return this.getPropertyTuple(propertyGroupKey, propertyPath, resolvedContext);
2762
2757
  }
2763
2758
  /** resolves `context` values that are property references (Dynamic Fields, Custom Properties, Data Source Properties, etc.) */
2764
2759
 
2765
2760
 
2766
- resolveDynamicFieldContext(context) {
2761
+ async resolveDynamicFieldContext(context) {
2767
2762
  const resolvedContext = {};
2768
- console.log('===== resolveDynamicFieldContext START =====');
2769
- console.log('Full context object:', context);
2770
2763
 
2771
2764
  for (const [contextKey, contextValue] of Object.entries(context)) {
2772
- console.log(`\n--- Processing context key: "${contextKey}" ---`);
2773
- console.log('contextValue:', contextValue);
2774
- console.log('contextValue type:', typeof contextValue);
2775
- console.log('contextValue has propertyPath?', contextValue?.propertyPath !== undefined);
2776
- console.log('contextValue.propertyPath value:', contextValue?.propertyPath);
2777
- console.log('contextValue.propertyGroupKey value:', contextValue?.propertyGroupKey);
2778
-
2779
2765
  if (isDynamicProperty(contextValue)) {
2780
- console.log('✓ isDynamicProperty=true - will resolve');
2781
- const resolvedValue = this.getProperty(contextValue.propertyGroupKey, contextValue.propertyPath, contextValue.context || {});
2782
- console.log('resolvedValue:', resolvedValue);
2783
- resolvedContext[contextKey] = resolvedValue;
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
+ }
2784
2774
  } else {
2785
- console.log('✗ isDynamicProperty=false - using as-is');
2786
2775
  resolvedContext[contextKey] = contextValue;
2787
2776
  }
2788
2777
  }
2789
2778
 
2790
- console.log('\n===== resolveDynamicFieldContext END =====');
2791
- console.log('Resolved context:', resolvedContext);
2792
2779
  return resolvedContext;
2793
2780
  }
2794
2781
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movable/studio-framework",
3
- "version": "3.14.1-canary.0",
3
+ "version": "3.14.3-canary.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.1-canary.0",
35
- "@movable/studio-framework-test-helpers": "^3.14.1-canary.0",
34
+ "@movable/framework-types": "^3.14.3-canary.0",
35
+ "@movable/studio-framework-test-helpers": "^3.14.3-canary.0",
36
36
  "@types/qunit": "^2.11.1",
37
37
  "@types/qunit-dom": "^0.7.0",
38
38
  "@types/react": "^17.0.6",