@xuda.io/runtime-bundle 1.0.556 → 1.0.558

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.
@@ -27803,6 +27803,8 @@ func.UI.utils.get_panels_wrapper_from_dom = async function (SESSION_ID, $xu_embe
27803
27803
  var _session = SESSION_OBJ[SESSION_ID];
27804
27804
  let _ds = _session?.DS_GLB[panelDivData.xuData.paramsP.dsSessionP];
27805
27805
 
27806
+ if (!_ds) continue;
27807
+
27806
27808
  let prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, _ds.prog_id);
27807
27809
  if (!ignore_disableAutoRefresh && prog_doc.properties.disableAutoRefresh) {
27808
27810
  continue;
@@ -28249,47 +28251,31 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
28249
28251
  let _ds_0 = _session.DS_GLB[0];
28250
28252
 
28251
28253
  const _ds = func.utils.clean_returned_datasource(SESSION_ID, dsSessionP);
28254
+ try {
28255
+ const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
28252
28256
 
28253
- const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
28254
-
28255
- let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
28256
-
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 || {};
28263
-
28264
- // if ($elm) {
28265
- // const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
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');
28268
- // }
28257
+ let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
28269
28258
 
28270
- let obj = { ds: _ds, data: _ds?.data_feed?.rows?.[row_idx] || {}, props: _ds.in_parameters || {} };
28259
+ let obj = { ds: _ds, data: _ds?.data_feed?.rows?.[row_idx] || {}, props: _ds.in_parameters || {} };
28271
28260
 
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
- }
28261
+ if ($elm) {
28262
+ const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
28263
+ obj.attributes = attributes;
28264
+ obj.xu_ui_id = $elm.attr('xu-ui-id');
28265
+ }
28277
28266
 
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] = {};
28267
+ if (!_.isEqual(SYS_GLOBAL_OBJ_REFS?.[ref_field_id] || {}, obj)) {
28268
+ if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
28269
+ SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
28270
+ }
28271
+ SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
28272
+ ret = true;
28281
28273
  }
28282
- SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
28283
- ret = true;
28274
+ } catch (error) {
28275
+ // error normal if find_ROWID_idx fail
28284
28276
  }
28277
+
28285
28278
  return ret;
28286
- // func.datasource.update(SESSION_ID, {
28287
- // [0]: {
28288
- // ['datasource_main']: {
28289
- // 'data_system.SYS_GLOBAL_OBJ_REFS': { [`${ref_field_id}`]: obj },
28290
- // },
28291
- // },
28292
- // });
28293
28279
  };
28294
28280
 
28295
28281
  func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_name) {