@xuda.io/runtime-bundle 1.0.519 → 1.0.521

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.
@@ -5326,13 +5326,12 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
5326
5326
  let client_datasource_changes = {};
5327
5327
  let server_datasource_changes = {};
5328
5328
 
5329
- const update_xu_ref = async function (dataSource, field_id) {
5329
+ const update_xu_ref = function (dataSource, field_id) {
5330
5330
  let ret;
5331
5331
  let _ds_0 = _session.DS_GLB[0];
5332
5332
  for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
5333
5333
  if (val.ds.dsSession == dataSource) {
5334
- func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
5335
- ret = true;
5334
+ ret = func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
5336
5335
  }
5337
5336
  }
5338
5337
  return ret;
@@ -9317,6 +9316,7 @@ func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)
9317
9316
  };
9318
9317
 
9319
9318
  func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
9319
+ let ret;
9320
9320
  const _session = SESSION_OBJ[SESSION_ID];
9321
9321
  let _ds_0 = _session.DS_GLB[0];
9322
9322
 
@@ -9326,27 +9326,35 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
9326
9326
 
9327
9327
  let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
9328
9328
 
9329
- if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
9330
- SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
9331
- }
9332
- SYS_GLOBAL_OBJ_REFS[ref_field_id].ds = _ds;
9333
- SYS_GLOBAL_OBJ_REFS[ref_field_id].data = _ds?.data_feed?.rows?.[row_idx] || {};
9334
- SYS_GLOBAL_OBJ_REFS[ref_field_id].props = _ds.in_parameters || {};
9335
-
9336
- if ($elm) {
9337
- const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
9338
- SYS_GLOBAL_OBJ_REFS[ref_field_id].attributes = attributes;
9339
- SYS_GLOBAL_OBJ_REFS[ref_field_id].xu_ui_id = $elm.attr('xu-ui-id');
9340
- }
9341
-
9342
- // let obj = { ds: _ds, data: _ds?.data_feed?.rows?.[row_idx] || {}, props: _ds.in_parameters || {} };
9329
+ // if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
9330
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
9331
+ // }
9332
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id].ds = _ds;
9333
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id].data = _ds?.data_feed?.rows?.[row_idx] || {};
9334
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id].props = _ds.in_parameters || {};
9343
9335
 
9344
9336
  // if ($elm) {
9345
9337
  // const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
9346
- // obj.attributes = attributes;
9347
- // obj.xu_ui_id = $elm.attr('xu-ui-id');
9338
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id].attributes = attributes;
9339
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id].xu_ui_id = $elm.attr('xu-ui-id');
9348
9340
  // }
9349
9341
 
9342
+ let obj = { ds: _ds, data: _ds?.data_feed?.rows?.[row_idx] || {}, props: _ds.in_parameters || {} };
9343
+
9344
+ if ($elm) {
9345
+ const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
9346
+ obj.attributes = attributes;
9347
+ obj.xu_ui_id = $elm.attr('xu-ui-id');
9348
+ }
9349
+
9350
+ if (!_.isEqual(SYS_GLOBAL_OBJ_REFS?.[ref_field_id] || {}, obj)) {
9351
+ if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
9352
+ SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
9353
+ }
9354
+ SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
9355
+ ret = true;
9356
+ }
9357
+ return ret;
9350
9358
  // func.datasource.update(SESSION_ID, {
9351
9359
  // [0]: {
9352
9360
  // ['datasource_main']: {
@@ -5327,13 +5327,12 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
5327
5327
  let client_datasource_changes = {};
5328
5328
  let server_datasource_changes = {};
5329
5329
 
5330
- const update_xu_ref = async function (dataSource, field_id) {
5330
+ const update_xu_ref = function (dataSource, field_id) {
5331
5331
  let ret;
5332
5332
  let _ds_0 = _session.DS_GLB[0];
5333
5333
  for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
5334
5334
  if (val.ds.dsSession == dataSource) {
5335
- func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
5336
- ret = true;
5335
+ ret = func.UI.update_xu_ref(SESSION_ID, dataSource, ref_name);
5337
5336
  }
5338
5337
  }
5339
5338
  return ret;
@@ -9318,6 +9317,7 @@ func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)
9318
9317
  };
9319
9318
 
9320
9319
  func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
9320
+ let ret;
9321
9321
  const _session = SESSION_OBJ[SESSION_ID];
9322
9322
  let _ds_0 = _session.DS_GLB[0];
9323
9323
 
@@ -9327,27 +9327,35 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
9327
9327
 
9328
9328
  let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
9329
9329
 
9330
- if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
9331
- SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
9332
- }
9333
- SYS_GLOBAL_OBJ_REFS[ref_field_id].ds = _ds;
9334
- SYS_GLOBAL_OBJ_REFS[ref_field_id].data = _ds?.data_feed?.rows?.[row_idx] || {};
9335
- SYS_GLOBAL_OBJ_REFS[ref_field_id].props = _ds.in_parameters || {};
9336
-
9337
- if ($elm) {
9338
- const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
9339
- SYS_GLOBAL_OBJ_REFS[ref_field_id].attributes = attributes;
9340
- SYS_GLOBAL_OBJ_REFS[ref_field_id].xu_ui_id = $elm.attr('xu-ui-id');
9341
- }
9342
-
9343
- // let obj = { ds: _ds, data: _ds?.data_feed?.rows?.[row_idx] || {}, props: _ds.in_parameters || {} };
9330
+ // if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
9331
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
9332
+ // }
9333
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id].ds = _ds;
9334
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id].data = _ds?.data_feed?.rows?.[row_idx] || {};
9335
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id].props = _ds.in_parameters || {};
9344
9336
 
9345
9337
  // if ($elm) {
9346
9338
  // const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
9347
- // obj.attributes = attributes;
9348
- // obj.xu_ui_id = $elm.attr('xu-ui-id');
9339
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id].attributes = attributes;
9340
+ // SYS_GLOBAL_OBJ_REFS[ref_field_id].xu_ui_id = $elm.attr('xu-ui-id');
9349
9341
  // }
9350
9342
 
9343
+ let obj = { ds: _ds, data: _ds?.data_feed?.rows?.[row_idx] || {}, props: _ds.in_parameters || {} };
9344
+
9345
+ if ($elm) {
9346
+ const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
9347
+ obj.attributes = attributes;
9348
+ obj.xu_ui_id = $elm.attr('xu-ui-id');
9349
+ }
9350
+
9351
+ if (!_.isEqual(SYS_GLOBAL_OBJ_REFS?.[ref_field_id] || {}, obj)) {
9352
+ if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
9353
+ SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
9354
+ }
9355
+ SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
9356
+ ret = true;
9357
+ }
9358
+ return ret;
9351
9359
  // func.datasource.update(SESSION_ID, {
9352
9360
  // [0]: {
9353
9361
  // ['datasource_main']: {