@xuda.io/runtime-bundle 1.0.482 → 1.0.484

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.
@@ -5109,6 +5109,16 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
5109
5109
  if (!_ds) {
5110
5110
  continue;
5111
5111
  }
5112
+
5113
+ const update_xu_ref = async function () {
5114
+ let _ds_0 = _session.DS_GLB[0];
5115
+ for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
5116
+ if (val.ds.dsSession == dataSource) {
5117
+ func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
5118
+ }
5119
+ }
5120
+ };
5121
+
5112
5122
  // iterate changes records
5113
5123
  for (const [record_id, fields_data] of Object.entries(row_data)) {
5114
5124
  // iterate changes fields
@@ -5116,6 +5126,7 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
5116
5126
  // mechanism to make update directly on the datasource object
5117
5127
  if (record_id === 'datasource_main') {
5118
5128
  _.set(_ds, field_id, value);
5129
+ update_xu_ref();
5119
5130
  continue;
5120
5131
  }
5121
5132
 
@@ -5133,15 +5144,16 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
5133
5144
  await set_fieldComputed_dependencies(dataSource, field_id, null);
5134
5145
 
5135
5146
  // search the field in refs
5136
- let _ds_0 = _session.DS_GLB[0];
5137
- for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
5138
- if (val.ds.dsSession == dataSource) {
5139
- func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
5140
- // if (!fields_changed.includes(ref_name)) {
5141
- // fields_changed.push(ref_name);
5142
- // }
5143
- }
5144
- }
5147
+ update_xu_ref();
5148
+ // let _ds_0 = _session.DS_GLB[0];
5149
+ // for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
5150
+ // if (val.ds.dsSession == dataSource) {
5151
+ // func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
5152
+ // // if (!fields_changed.includes(ref_name)) {
5153
+ // // fields_changed.push(ref_name);
5154
+ // // }
5155
+ // }
5156
+ // }
5145
5157
 
5146
5158
  if (!update_local_scope_only) {
5147
5159
  let tree_ret = await func.utils.TREE_OBJ.get(SESSION_ID, _ds.prog_id);
@@ -5110,6 +5110,16 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
5110
5110
  if (!_ds) {
5111
5111
  continue;
5112
5112
  }
5113
+
5114
+ const update_xu_ref = async function () {
5115
+ let _ds_0 = _session.DS_GLB[0];
5116
+ for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
5117
+ if (val.ds.dsSession == dataSource) {
5118
+ func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
5119
+ }
5120
+ }
5121
+ };
5122
+
5113
5123
  // iterate changes records
5114
5124
  for (const [record_id, fields_data] of Object.entries(row_data)) {
5115
5125
  // iterate changes fields
@@ -5117,6 +5127,7 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
5117
5127
  // mechanism to make update directly on the datasource object
5118
5128
  if (record_id === 'datasource_main') {
5119
5129
  _.set(_ds, field_id, value);
5130
+ update_xu_ref();
5120
5131
  continue;
5121
5132
  }
5122
5133
 
@@ -5134,15 +5145,16 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
5134
5145
  await set_fieldComputed_dependencies(dataSource, field_id, null);
5135
5146
 
5136
5147
  // search the field in refs
5137
- let _ds_0 = _session.DS_GLB[0];
5138
- for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
5139
- if (val.ds.dsSession == dataSource) {
5140
- func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
5141
- // if (!fields_changed.includes(ref_name)) {
5142
- // fields_changed.push(ref_name);
5143
- // }
5144
- }
5145
- }
5148
+ update_xu_ref();
5149
+ // let _ds_0 = _session.DS_GLB[0];
5150
+ // for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
5151
+ // if (val.ds.dsSession == dataSource) {
5152
+ // func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
5153
+ // // if (!fields_changed.includes(ref_name)) {
5154
+ // // fields_changed.push(ref_name);
5155
+ // // }
5156
+ // }
5157
+ // }
5146
5158
 
5147
5159
  if (!update_local_scope_only) {
5148
5160
  let tree_ret = await func.utils.TREE_OBJ.get(SESSION_ID, _ds.prog_id);