@xuda.io/runtime-bundle 1.0.275 → 1.0.277
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-slim.js
CHANGED
|
@@ -14398,7 +14398,8 @@ func.UI.screen.execute_xu_functions = async function (
|
|
|
14398
14398
|
|
|
14399
14399
|
let is_dynamic_field = false
|
|
14400
14400
|
let field_prop;
|
|
14401
|
-
let bind_field_id
|
|
14401
|
+
let bind_field_id;
|
|
14402
|
+
let bind_field_exp
|
|
14402
14403
|
|
|
14403
14404
|
const get_bind_field = async function (field_id) {
|
|
14404
14405
|
if (["_FOR_VAL", "_FOR_KEY"].includes(field_id)) {
|
|
@@ -14444,10 +14445,11 @@ func.UI.screen.execute_xu_functions = async function (
|
|
|
14444
14445
|
} catch (err) {
|
|
14445
14446
|
try {
|
|
14446
14447
|
if (!_.isEmpty($elm?.data()?.xuAttributes?.["xu-exp:xu-bind"])) {
|
|
14448
|
+
bind_field_exp = $elm.data().xuAttributes["xu-exp:xu-bind"]
|
|
14447
14449
|
const res = (
|
|
14448
14450
|
await func.expression.get(
|
|
14449
14451
|
SESSION_ID,
|
|
14450
|
-
|
|
14452
|
+
bind_field_exp,
|
|
14451
14453
|
paramsP.dsSessionP,
|
|
14452
14454
|
"UI Attr EXP"
|
|
14453
14455
|
)
|
|
@@ -14481,9 +14483,11 @@ func.UI.screen.execute_xu_functions = async function (
|
|
|
14481
14483
|
bind.getter($elm[0])
|
|
14482
14484
|
);
|
|
14483
14485
|
|
|
14484
|
-
if (!
|
|
14485
|
-
|
|
14486
|
+
if (field_prop.props.fieldType === "object" && !val_is_reference_field) {
|
|
14487
|
+
value = bind.getter($elm[0])
|
|
14488
|
+
}
|
|
14486
14489
|
|
|
14490
|
+
if (!_ds.currentRecordId) return;
|
|
14487
14491
|
|
|
14488
14492
|
let datasource_changes = {
|
|
14489
14493
|
[_dsP]: {
|
|
@@ -14499,8 +14503,16 @@ func.UI.screen.execute_xu_functions = async function (
|
|
|
14499
14503
|
if (reference_source_obj) {
|
|
14500
14504
|
if (reference_source_obj.ret.type === "array") {
|
|
14501
14505
|
if (iterate_info.iterator_val === bind_field_id) {
|
|
14506
|
+
const arr_idx = Number($elm?.data()?.xuData?.iterate_info._key)
|
|
14502
14507
|
let new_arr = reference_source_obj.ret.value
|
|
14503
|
-
|
|
14508
|
+
if (field_prop.props.fieldType === "object" && !val_is_reference_field) {
|
|
14509
|
+
let obj_item = new_arr[arr_idx]
|
|
14510
|
+
let e_exp = bind_field_exp.replace("@_FOR_VAL", obj_item);
|
|
14511
|
+
let new_val = eval(e_exp)
|
|
14512
|
+
new_arr[arr_idx] = new_val
|
|
14513
|
+
} else {
|
|
14514
|
+
new_arr[arr_idx] = value
|
|
14515
|
+
}
|
|
14504
14516
|
datasource_changes[_dsP][_ds.currentRecordId][reference_source_obj.fieldIdP] = new_arr
|
|
14505
14517
|
|
|
14506
14518
|
datasource_changes = {
|
|
@@ -14541,7 +14553,7 @@ func.UI.screen.execute_xu_functions = async function (
|
|
|
14541
14553
|
value = _ds.data_feed.rows?.[row_idx]?.[val.value];
|
|
14542
14554
|
}
|
|
14543
14555
|
} else {
|
|
14544
|
-
value = val
|
|
14556
|
+
value = val.value
|
|
14545
14557
|
}
|
|
14546
14558
|
if (typeof value === "undefined") return;
|
|
14547
14559
|
bind.setter($elm[0], value);
|
|
@@ -11808,7 +11808,8 @@ func.UI.screen.execute_xu_functions = async function (
|
|
|
11808
11808
|
|
|
11809
11809
|
let is_dynamic_field = false
|
|
11810
11810
|
let field_prop;
|
|
11811
|
-
let bind_field_id
|
|
11811
|
+
let bind_field_id;
|
|
11812
|
+
let bind_field_exp
|
|
11812
11813
|
|
|
11813
11814
|
const get_bind_field = async function (field_id) {
|
|
11814
11815
|
if (["_FOR_VAL", "_FOR_KEY"].includes(field_id)) {
|
|
@@ -11854,10 +11855,11 @@ func.UI.screen.execute_xu_functions = async function (
|
|
|
11854
11855
|
} catch (err) {
|
|
11855
11856
|
try {
|
|
11856
11857
|
if (!_.isEmpty($elm?.data()?.xuAttributes?.["xu-exp:xu-bind"])) {
|
|
11858
|
+
bind_field_exp = $elm.data().xuAttributes["xu-exp:xu-bind"]
|
|
11857
11859
|
const res = (
|
|
11858
11860
|
await func.expression.get(
|
|
11859
11861
|
SESSION_ID,
|
|
11860
|
-
|
|
11862
|
+
bind_field_exp,
|
|
11861
11863
|
paramsP.dsSessionP,
|
|
11862
11864
|
"UI Attr EXP"
|
|
11863
11865
|
)
|
|
@@ -11891,9 +11893,11 @@ func.UI.screen.execute_xu_functions = async function (
|
|
|
11891
11893
|
bind.getter($elm[0])
|
|
11892
11894
|
);
|
|
11893
11895
|
|
|
11894
|
-
if (!
|
|
11895
|
-
|
|
11896
|
+
if (field_prop.props.fieldType === "object" && !val_is_reference_field) {
|
|
11897
|
+
value = bind.getter($elm[0])
|
|
11898
|
+
}
|
|
11896
11899
|
|
|
11900
|
+
if (!_ds.currentRecordId) return;
|
|
11897
11901
|
|
|
11898
11902
|
let datasource_changes = {
|
|
11899
11903
|
[_dsP]: {
|
|
@@ -11909,8 +11913,16 @@ func.UI.screen.execute_xu_functions = async function (
|
|
|
11909
11913
|
if (reference_source_obj) {
|
|
11910
11914
|
if (reference_source_obj.ret.type === "array") {
|
|
11911
11915
|
if (iterate_info.iterator_val === bind_field_id) {
|
|
11916
|
+
const arr_idx = Number($elm?.data()?.xuData?.iterate_info._key)
|
|
11912
11917
|
let new_arr = reference_source_obj.ret.value
|
|
11913
|
-
|
|
11918
|
+
if (field_prop.props.fieldType === "object" && !val_is_reference_field) {
|
|
11919
|
+
let obj_item = new_arr[arr_idx]
|
|
11920
|
+
let e_exp = bind_field_exp.replace("@_FOR_VAL", obj_item);
|
|
11921
|
+
let new_val = eval(e_exp)
|
|
11922
|
+
new_arr[arr_idx] = new_val
|
|
11923
|
+
} else {
|
|
11924
|
+
new_arr[arr_idx] = value
|
|
11925
|
+
}
|
|
11914
11926
|
datasource_changes[_dsP][_ds.currentRecordId][reference_source_obj.fieldIdP] = new_arr
|
|
11915
11927
|
|
|
11916
11928
|
datasource_changes = {
|
|
@@ -11951,7 +11963,7 @@ func.UI.screen.execute_xu_functions = async function (
|
|
|
11951
11963
|
value = _ds.data_feed.rows?.[row_idx]?.[val.value];
|
|
11952
11964
|
}
|
|
11953
11965
|
} else {
|
|
11954
|
-
value = val
|
|
11966
|
+
value = val.value
|
|
11955
11967
|
}
|
|
11956
11968
|
if (typeof value === "undefined") return;
|
|
11957
11969
|
bind.setter($elm[0], value);
|