@movable/studio-framework 3.14.0-canary.0 → 3.14.2-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 +41 -1
- package/dist/index.js +41 -1
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -1477,9 +1477,11 @@ class AsyncComputed {
|
|
|
1477
1477
|
|
|
1478
1478
|
getProperty(...args) {
|
|
1479
1479
|
const [grouping, path, context = {}] = parseGetPropertyArgs(args);
|
|
1480
|
+
console.log(`getProperty called: ${grouping}.${path}`);
|
|
1480
1481
|
const property = this.getPropertyInstance(grouping, path);
|
|
1481
1482
|
|
|
1482
1483
|
if (!property) {
|
|
1484
|
+
console.log(`⚠️ Property not found: ${grouping}.${path}`);
|
|
1483
1485
|
return null;
|
|
1484
1486
|
}
|
|
1485
1487
|
|
|
@@ -1497,7 +1499,22 @@ class AsyncComputed {
|
|
|
1497
1499
|
requestEvent = createInertEvent();
|
|
1498
1500
|
}
|
|
1499
1501
|
|
|
1500
|
-
|
|
1502
|
+
const result = property.compute(context, requestEvent);
|
|
1503
|
+
console.log(`getProperty result for ${grouping}.${path}:`, result);
|
|
1504
|
+
console.log(` - typeof result:`, typeof result);
|
|
1505
|
+
console.log(` - is Promise?`, result instanceof Promise);
|
|
1506
|
+
console.log(` - is Array?`, Array.isArray(result));
|
|
1507
|
+
|
|
1508
|
+
if (result && typeof result === 'object') {
|
|
1509
|
+
console.log(` - Object.keys():`, Object.keys(result));
|
|
1510
|
+
console.log(` - constructor name:`, result.constructor?.name); // Try to see if it's a primitive wrapper or has a valueOf
|
|
1511
|
+
|
|
1512
|
+
if (typeof result.valueOf === 'function') {
|
|
1513
|
+
console.log(` - valueOf():`, result.valueOf());
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
return result;
|
|
1501
1518
|
}
|
|
1502
1519
|
|
|
1503
1520
|
async getPropertyTuple(...args) {
|
|
@@ -2733,6 +2750,8 @@ class StudioFramework {
|
|
|
2733
2750
|
}
|
|
2734
2751
|
|
|
2735
2752
|
async evaluateOperand(operand) {
|
|
2753
|
+
console.log('evaluateOperand');
|
|
2754
|
+
|
|
2736
2755
|
if ('operator' in operand) {
|
|
2737
2756
|
return this.resolveCondition(operand);
|
|
2738
2757
|
}
|
|
@@ -2749,16 +2768,37 @@ class StudioFramework {
|
|
|
2749
2768
|
|
|
2750
2769
|
resolveDynamicFieldContext(context) {
|
|
2751
2770
|
const resolvedContext = {};
|
|
2771
|
+
console.log('===== resolveDynamicFieldContext START =====');
|
|
2772
|
+
console.log('Full context object:', context);
|
|
2752
2773
|
|
|
2753
2774
|
for (const [contextKey, contextValue] of Object.entries(context)) {
|
|
2775
|
+
console.log(`\n--- Processing context key: "${contextKey}" ---`);
|
|
2776
|
+
console.log('contextValue:', contextValue);
|
|
2777
|
+
console.log('contextValue type:', typeof contextValue);
|
|
2778
|
+
console.log('contextValue has propertyPath?', contextValue?.propertyPath !== undefined);
|
|
2779
|
+
console.log('contextValue.propertyPath value:', contextValue?.propertyPath);
|
|
2780
|
+
console.log('contextValue.propertyGroupKey value:', contextValue?.propertyGroupKey);
|
|
2781
|
+
|
|
2754
2782
|
if (isDynamicProperty(contextValue)) {
|
|
2783
|
+
console.log('✓ isDynamicProperty=true - will resolve'); // Debug: check what raw data is available
|
|
2784
|
+
|
|
2785
|
+
if (contextValue.propertyPath?.includes('product_current_price')) {
|
|
2786
|
+
console.log('DEBUG: Checking raw data.product_current_price');
|
|
2787
|
+
const rawData = this.getProperty('data', 'product_current_price', {});
|
|
2788
|
+
console.log(' raw data.product_current_price:', rawData);
|
|
2789
|
+
}
|
|
2790
|
+
|
|
2755
2791
|
const resolvedValue = this.getProperty(contextValue.propertyGroupKey, contextValue.propertyPath, contextValue.context || {});
|
|
2792
|
+
console.log('resolvedValue:', resolvedValue);
|
|
2756
2793
|
resolvedContext[contextKey] = resolvedValue;
|
|
2757
2794
|
} else {
|
|
2795
|
+
console.log('✗ isDynamicProperty=false - using as-is');
|
|
2758
2796
|
resolvedContext[contextKey] = contextValue;
|
|
2759
2797
|
}
|
|
2760
2798
|
}
|
|
2761
2799
|
|
|
2800
|
+
console.log('\n===== resolveDynamicFieldContext END =====');
|
|
2801
|
+
console.log('Resolved context:', resolvedContext);
|
|
2762
2802
|
return resolvedContext;
|
|
2763
2803
|
}
|
|
2764
2804
|
|
package/dist/index.js
CHANGED
|
@@ -1487,9 +1487,11 @@ class AsyncComputed {
|
|
|
1487
1487
|
|
|
1488
1488
|
getProperty(...args) {
|
|
1489
1489
|
const [grouping, path, context = {}] = parseGetPropertyArgs(args);
|
|
1490
|
+
console.log(`getProperty called: ${grouping}.${path}`);
|
|
1490
1491
|
const property = this.getPropertyInstance(grouping, path);
|
|
1491
1492
|
|
|
1492
1493
|
if (!property) {
|
|
1494
|
+
console.log(`⚠️ Property not found: ${grouping}.${path}`);
|
|
1493
1495
|
return null;
|
|
1494
1496
|
}
|
|
1495
1497
|
|
|
@@ -1507,7 +1509,22 @@ class AsyncComputed {
|
|
|
1507
1509
|
requestEvent = createInertEvent();
|
|
1508
1510
|
}
|
|
1509
1511
|
|
|
1510
|
-
|
|
1512
|
+
const result = property.compute(context, requestEvent);
|
|
1513
|
+
console.log(`getProperty result for ${grouping}.${path}:`, result);
|
|
1514
|
+
console.log(` - typeof result:`, typeof result);
|
|
1515
|
+
console.log(` - is Promise?`, result instanceof Promise);
|
|
1516
|
+
console.log(` - is Array?`, Array.isArray(result));
|
|
1517
|
+
|
|
1518
|
+
if (result && typeof result === 'object') {
|
|
1519
|
+
console.log(` - Object.keys():`, Object.keys(result));
|
|
1520
|
+
console.log(` - constructor name:`, result.constructor?.name); // Try to see if it's a primitive wrapper or has a valueOf
|
|
1521
|
+
|
|
1522
|
+
if (typeof result.valueOf === 'function') {
|
|
1523
|
+
console.log(` - valueOf():`, result.valueOf());
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
return result;
|
|
1511
1528
|
}
|
|
1512
1529
|
|
|
1513
1530
|
async getPropertyTuple(...args) {
|
|
@@ -2743,6 +2760,8 @@ class StudioFramework {
|
|
|
2743
2760
|
}
|
|
2744
2761
|
|
|
2745
2762
|
async evaluateOperand(operand) {
|
|
2763
|
+
console.log('evaluateOperand');
|
|
2764
|
+
|
|
2746
2765
|
if ('operator' in operand) {
|
|
2747
2766
|
return this.resolveCondition(operand);
|
|
2748
2767
|
}
|
|
@@ -2759,16 +2778,37 @@ class StudioFramework {
|
|
|
2759
2778
|
|
|
2760
2779
|
resolveDynamicFieldContext(context) {
|
|
2761
2780
|
const resolvedContext = {};
|
|
2781
|
+
console.log('===== resolveDynamicFieldContext START =====');
|
|
2782
|
+
console.log('Full context object:', context);
|
|
2762
2783
|
|
|
2763
2784
|
for (const [contextKey, contextValue] of Object.entries(context)) {
|
|
2785
|
+
console.log(`\n--- Processing context key: "${contextKey}" ---`);
|
|
2786
|
+
console.log('contextValue:', contextValue);
|
|
2787
|
+
console.log('contextValue type:', typeof contextValue);
|
|
2788
|
+
console.log('contextValue has propertyPath?', contextValue?.propertyPath !== undefined);
|
|
2789
|
+
console.log('contextValue.propertyPath value:', contextValue?.propertyPath);
|
|
2790
|
+
console.log('contextValue.propertyGroupKey value:', contextValue?.propertyGroupKey);
|
|
2791
|
+
|
|
2764
2792
|
if (isDynamicProperty(contextValue)) {
|
|
2793
|
+
console.log('✓ isDynamicProperty=true - will resolve'); // Debug: check what raw data is available
|
|
2794
|
+
|
|
2795
|
+
if (contextValue.propertyPath?.includes('product_current_price')) {
|
|
2796
|
+
console.log('DEBUG: Checking raw data.product_current_price');
|
|
2797
|
+
const rawData = this.getProperty('data', 'product_current_price', {});
|
|
2798
|
+
console.log(' raw data.product_current_price:', rawData);
|
|
2799
|
+
}
|
|
2800
|
+
|
|
2765
2801
|
const resolvedValue = this.getProperty(contextValue.propertyGroupKey, contextValue.propertyPath, contextValue.context || {});
|
|
2802
|
+
console.log('resolvedValue:', resolvedValue);
|
|
2766
2803
|
resolvedContext[contextKey] = resolvedValue;
|
|
2767
2804
|
} else {
|
|
2805
|
+
console.log('✗ isDynamicProperty=false - using as-is');
|
|
2768
2806
|
resolvedContext[contextKey] = contextValue;
|
|
2769
2807
|
}
|
|
2770
2808
|
}
|
|
2771
2809
|
|
|
2810
|
+
console.log('\n===== resolveDynamicFieldContext END =====');
|
|
2811
|
+
console.log('Resolved context:', resolvedContext);
|
|
2772
2812
|
return resolvedContext;
|
|
2773
2813
|
}
|
|
2774
2814
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@movable/studio-framework",
|
|
3
|
-
"version": "3.14.
|
|
3
|
+
"version": "3.14.2-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.
|
|
35
|
-
"@movable/studio-framework-test-helpers": "^3.14.
|
|
34
|
+
"@movable/framework-types": "^3.14.2-canary.0",
|
|
35
|
+
"@movable/studio-framework-test-helpers": "^3.14.2-canary.0",
|
|
36
36
|
"@types/qunit": "^2.11.1",
|
|
37
37
|
"@types/qunit-dom": "^0.7.0",
|
|
38
38
|
"@types/react": "^17.0.6",
|