@xuda.io/runtime-bundle 1.0.1423 → 1.0.1424
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/js/xuda-runtime-bundle.js +20 -1
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +20 -1
- package/js/xuda-runtime-slim.min.es.js +20 -1
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +20 -1
- package/js/xuda-worker-bundle.js +20 -1
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
|
@@ -41513,6 +41513,25 @@ func.expression.get = async function (SESSION_ID, valP, dsSessionP, sourceP, row
|
|
|
41513
41513
|
|
|
41514
41514
|
// var split = [];
|
|
41515
41515
|
var var_Arr = [];
|
|
41516
|
+
const get_iterate_value_ret = function (fieldIdP) {
|
|
41517
|
+
if (!iterate_info || (iterate_info.iterator_key !== fieldIdP && iterate_info.iterator_val !== fieldIdP)) {
|
|
41518
|
+
return null;
|
|
41519
|
+
}
|
|
41520
|
+
|
|
41521
|
+
const iter_value = iterate_info.iterator_key === fieldIdP ? iterate_info._key : iterate_info._val;
|
|
41522
|
+
const iter_type = typeof iter_value !== 'undefined' ? {}.toString.call(iter_value).match(/\s([a-zA-Z]+)/)[1].toLowerCase() : 'string';
|
|
41523
|
+
|
|
41524
|
+
return {
|
|
41525
|
+
ret: {
|
|
41526
|
+
value: iter_value,
|
|
41527
|
+
type: iter_type,
|
|
41528
|
+
prop: ['array', 'object'].includes(iter_type) ? iter_value : null,
|
|
41529
|
+
},
|
|
41530
|
+
fieldIdP,
|
|
41531
|
+
currentRecordId: rowIdP,
|
|
41532
|
+
found: typeof iter_value !== 'undefined',
|
|
41533
|
+
};
|
|
41534
|
+
};
|
|
41516
41535
|
const split = func.expression.parse(ret) || [];
|
|
41517
41536
|
// console.log(valP, split);
|
|
41518
41537
|
const split_entries = Object.entries(split);
|
|
@@ -41609,7 +41628,7 @@ func.expression.get = async function (SESSION_ID, valP, dsSessionP, sourceP, row
|
|
|
41609
41628
|
} // put default
|
|
41610
41629
|
fields[val.fieldId] = var_Arr[key].value;
|
|
41611
41630
|
|
|
41612
|
-
const ret = await func.datasource.get_value(SESSION_ID, val.fieldId, dsSessionP, rowIdP); // find field in dataSources
|
|
41631
|
+
const ret = get_iterate_value_ret(val.fieldId) || (await func.datasource.get_value(SESSION_ID, val.fieldId, dsSessionP, rowIdP)); // find field in dataSources
|
|
41613
41632
|
|
|
41614
41633
|
await replace_value_in_string(ret.ret, ret.fieldIdP);
|
|
41615
41634
|
}
|