@xuda.io/runtime-bundle 1.0.519 → 1.0.520

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.
@@ -28244,6 +28244,7 @@ func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)
28244
28244
  };
28245
28245
 
28246
28246
  func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
28247
+ let ret;
28247
28248
  const _session = SESSION_OBJ[SESSION_ID];
28248
28249
  let _ds_0 = _session.DS_GLB[0];
28249
28250
 
@@ -28253,27 +28254,35 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
28253
28254
 
28254
28255
  let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
28255
28256
 
28256
- if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
28257
- SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
28258
- }
28259
- SYS_GLOBAL_OBJ_REFS[ref_field_id].ds = _ds;
28260
- SYS_GLOBAL_OBJ_REFS[ref_field_id].data = _ds?.data_feed?.rows?.[row_idx] || {};
28261
- SYS_GLOBAL_OBJ_REFS[ref_field_id].props = _ds.in_parameters || {};
28262
-
28263
- if ($elm) {
28264
- const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
28265
- SYS_GLOBAL_OBJ_REFS[ref_field_id].attributes = attributes;
28266
- SYS_GLOBAL_OBJ_REFS[ref_field_id].xu_ui_id = $elm.attr('xu-ui-id');
28267
- }
28268
-
28269
- // let obj = { ds: _ds, data: _ds?.data_feed?.rows?.[row_idx] || {}, props: _ds.in_parameters || {} };
28257
+ // if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
28258
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
28259
+ // }
28260
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id].ds = _ds;
28261
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id].data = _ds?.data_feed?.rows?.[row_idx] || {};
28262
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id].props = _ds.in_parameters || {};
28270
28263
 
28271
28264
  // if ($elm) {
28272
28265
  // const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
28273
- // obj.attributes = attributes;
28274
- // obj.xu_ui_id = $elm.attr('xu-ui-id');
28266
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id].attributes = attributes;
28267
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id].xu_ui_id = $elm.attr('xu-ui-id');
28275
28268
  // }
28276
28269
 
28270
+ let obj = { ds: _ds, data: _ds?.data_feed?.rows?.[row_idx] || {}, props: _ds.in_parameters || {} };
28271
+
28272
+ if ($elm) {
28273
+ const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
28274
+ obj.attributes = attributes;
28275
+ obj.xu_ui_id = $elm.attr('xu-ui-id');
28276
+ }
28277
+
28278
+ if (!_.isEqual(SYS_GLOBAL_OBJ_REFS?.[ref_field_id] || {}, obj)) {
28279
+ if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
28280
+ SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
28281
+ }
28282
+ SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
28283
+ ret = true;
28284
+ }
28285
+ return ret;
28277
28286
  // func.datasource.update(SESSION_ID, {
28278
28287
  // [0]: {
28279
28288
  // ['datasource_main']: {
@@ -30436,8 +30445,7 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
30436
30445
  let _ds_0 = _session.DS_GLB[0];
30437
30446
  for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
30438
30447
  if (val.ds.dsSession == dataSource) {
30439
- func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
30440
- ret = true;
30448
+ ret = func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
30441
30449
  }
30442
30450
  }
30443
30451
  return ret;