@xuda.io/runtime-bundle 1.0.482 → 1.0.483

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.
@@ -3475,6 +3475,15 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
3475
3475
  }
3476
3476
  };
3477
3477
 
3478
+ const update_xu_ref = async function () {
3479
+ let _ds_0 = _session.DS_GLB[0];
3480
+ for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
3481
+ if (val.ds.dsSession == dataSource) {
3482
+ func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
3483
+ }
3484
+ }
3485
+ };
3486
+
3478
3487
  var fields_changed = [];
3479
3488
  var datasource_changed = [];
3480
3489
  let client_datasource_changes = {};
@@ -3492,6 +3501,7 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
3492
3501
  // mechanism to make update directly on the datasource object
3493
3502
  if (record_id === 'datasource_main') {
3494
3503
  _.set(_ds, field_id, value);
3504
+ update_xu_ref();
3495
3505
  continue;
3496
3506
  }
3497
3507
 
@@ -3509,15 +3519,16 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
3509
3519
  await set_fieldComputed_dependencies(dataSource, field_id, null);
3510
3520
 
3511
3521
  // search the field in refs
3512
- let _ds_0 = _session.DS_GLB[0];
3513
- for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
3514
- if (val.ds.dsSession == dataSource) {
3515
- func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
3516
- // if (!fields_changed.includes(ref_name)) {
3517
- // fields_changed.push(ref_name);
3518
- // }
3519
- }
3520
- }
3522
+ update_xu_ref();
3523
+ // let _ds_0 = _session.DS_GLB[0];
3524
+ // for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
3525
+ // if (val.ds.dsSession == dataSource) {
3526
+ // func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
3527
+ // // if (!fields_changed.includes(ref_name)) {
3528
+ // // fields_changed.push(ref_name);
3529
+ // // }
3530
+ // }
3531
+ // }
3521
3532
 
3522
3533
  if (!update_local_scope_only) {
3523
3534
  let tree_ret = await func.utils.TREE_OBJ.get(SESSION_ID, _ds.prog_id);
@@ -3475,6 +3475,15 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
3475
3475
  }
3476
3476
  };
3477
3477
 
3478
+ const update_xu_ref = async function () {
3479
+ let _ds_0 = _session.DS_GLB[0];
3480
+ for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
3481
+ if (val.ds.dsSession == dataSource) {
3482
+ func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
3483
+ }
3484
+ }
3485
+ };
3486
+
3478
3487
  var fields_changed = [];
3479
3488
  var datasource_changed = [];
3480
3489
  let client_datasource_changes = {};
@@ -3492,6 +3501,7 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
3492
3501
  // mechanism to make update directly on the datasource object
3493
3502
  if (record_id === 'datasource_main') {
3494
3503
  _.set(_ds, field_id, value);
3504
+ update_xu_ref();
3495
3505
  continue;
3496
3506
  }
3497
3507
 
@@ -3509,15 +3519,16 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
3509
3519
  await set_fieldComputed_dependencies(dataSource, field_id, null);
3510
3520
 
3511
3521
  // search the field in refs
3512
- let _ds_0 = _session.DS_GLB[0];
3513
- for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
3514
- if (val.ds.dsSession == dataSource) {
3515
- func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
3516
- // if (!fields_changed.includes(ref_name)) {
3517
- // fields_changed.push(ref_name);
3518
- // }
3519
- }
3520
- }
3522
+ update_xu_ref();
3523
+ // let _ds_0 = _session.DS_GLB[0];
3524
+ // for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
3525
+ // if (val.ds.dsSession == dataSource) {
3526
+ // func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
3527
+ // // if (!fields_changed.includes(ref_name)) {
3528
+ // // fields_changed.push(ref_name);
3529
+ // // }
3530
+ // }
3531
+ // }
3521
3532
 
3522
3533
  if (!update_local_scope_only) {
3523
3534
  let tree_ret = await func.utils.TREE_OBJ.get(SESSION_ID, _ds.prog_id);