@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.
@@ -8878,6 +8878,8 @@ func.UI.utils.get_panels_wrapper_from_dom = async function (SESSION_ID, $xu_embe
8878
8878
  var _session = SESSION_OBJ[SESSION_ID];
8879
8879
  let _ds = _session?.DS_GLB[panelDivData.xuData.paramsP.dsSessionP];
8880
8880
 
8881
+ if (!_ds) continue;
8882
+
8881
8883
  let prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, _ds.prog_id);
8882
8884
  if (!ignore_disableAutoRefresh && prog_doc.properties.disableAutoRefresh) {
8883
8885
  continue;
@@ -9324,47 +9326,31 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
9324
9326
  let _ds_0 = _session.DS_GLB[0];
9325
9327
 
9326
9328
  const _ds = func.utils.clean_returned_datasource(SESSION_ID, dsSessionP);
9329
+ try {
9330
+ const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
9327
9331
 
9328
- const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
9329
-
9330
- let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
9331
-
9332
- // if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
9333
- // SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
9334
- // }
9335
- // SYS_GLOBAL_OBJ_REFS[ref_field_id].ds = _ds;
9336
- // SYS_GLOBAL_OBJ_REFS[ref_field_id].data = _ds?.data_feed?.rows?.[row_idx] || {};
9337
- // SYS_GLOBAL_OBJ_REFS[ref_field_id].props = _ds.in_parameters || {};
9338
-
9339
- // if ($elm) {
9340
- // const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
9341
- // SYS_GLOBAL_OBJ_REFS[ref_field_id].attributes = attributes;
9342
- // SYS_GLOBAL_OBJ_REFS[ref_field_id].xu_ui_id = $elm.attr('xu-ui-id');
9343
- // }
9332
+ let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
9344
9333
 
9345
- let obj = { ds: _ds, data: _ds?.data_feed?.rows?.[row_idx] || {}, props: _ds.in_parameters || {} };
9334
+ let obj = { ds: _ds, data: _ds?.data_feed?.rows?.[row_idx] || {}, props: _ds.in_parameters || {} };
9346
9335
 
9347
- if ($elm) {
9348
- const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
9349
- obj.attributes = attributes;
9350
- obj.xu_ui_id = $elm.attr('xu-ui-id');
9351
- }
9336
+ if ($elm) {
9337
+ const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
9338
+ obj.attributes = attributes;
9339
+ obj.xu_ui_id = $elm.attr('xu-ui-id');
9340
+ }
9352
9341
 
9353
- if (!_.isEqual(SYS_GLOBAL_OBJ_REFS?.[ref_field_id] || {}, obj)) {
9354
- if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
9355
- SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
9342
+ if (!_.isEqual(SYS_GLOBAL_OBJ_REFS?.[ref_field_id] || {}, obj)) {
9343
+ if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
9344
+ SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
9345
+ }
9346
+ SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
9347
+ ret = true;
9356
9348
  }
9357
- SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
9358
- ret = true;
9349
+ } catch (error) {
9350
+ // error normal if find_ROWID_idx fail
9359
9351
  }
9352
+
9360
9353
  return ret;
9361
- // func.datasource.update(SESSION_ID, {
9362
- // [0]: {
9363
- // ['datasource_main']: {
9364
- // 'data_system.SYS_GLOBAL_OBJ_REFS': { [`${ref_field_id}`]: obj },
9365
- // },
9366
- // },
9367
- // });
9368
9354
  };
9369
9355
 
9370
9356
  func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_name) {
@@ -8879,6 +8879,8 @@ func.UI.utils.get_panels_wrapper_from_dom = async function (SESSION_ID, $xu_embe
8879
8879
  var _session = SESSION_OBJ[SESSION_ID];
8880
8880
  let _ds = _session?.DS_GLB[panelDivData.xuData.paramsP.dsSessionP];
8881
8881
 
8882
+ if (!_ds) continue;
8883
+
8882
8884
  let prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, _ds.prog_id);
8883
8885
  if (!ignore_disableAutoRefresh && prog_doc.properties.disableAutoRefresh) {
8884
8886
  continue;
@@ -9325,47 +9327,31 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
9325
9327
  let _ds_0 = _session.DS_GLB[0];
9326
9328
 
9327
9329
  const _ds = func.utils.clean_returned_datasource(SESSION_ID, dsSessionP);
9330
+ try {
9331
+ const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
9328
9332
 
9329
- const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
9330
-
9331
- let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
9332
-
9333
- // if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
9334
- // SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
9335
- // }
9336
- // SYS_GLOBAL_OBJ_REFS[ref_field_id].ds = _ds;
9337
- // SYS_GLOBAL_OBJ_REFS[ref_field_id].data = _ds?.data_feed?.rows?.[row_idx] || {};
9338
- // SYS_GLOBAL_OBJ_REFS[ref_field_id].props = _ds.in_parameters || {};
9339
-
9340
- // if ($elm) {
9341
- // const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
9342
- // SYS_GLOBAL_OBJ_REFS[ref_field_id].attributes = attributes;
9343
- // SYS_GLOBAL_OBJ_REFS[ref_field_id].xu_ui_id = $elm.attr('xu-ui-id');
9344
- // }
9333
+ let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
9345
9334
 
9346
- let obj = { ds: _ds, data: _ds?.data_feed?.rows?.[row_idx] || {}, props: _ds.in_parameters || {} };
9335
+ let obj = { ds: _ds, data: _ds?.data_feed?.rows?.[row_idx] || {}, props: _ds.in_parameters || {} };
9347
9336
 
9348
- if ($elm) {
9349
- const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
9350
- obj.attributes = attributes;
9351
- obj.xu_ui_id = $elm.attr('xu-ui-id');
9352
- }
9337
+ if ($elm) {
9338
+ const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
9339
+ obj.attributes = attributes;
9340
+ obj.xu_ui_id = $elm.attr('xu-ui-id');
9341
+ }
9353
9342
 
9354
- if (!_.isEqual(SYS_GLOBAL_OBJ_REFS?.[ref_field_id] || {}, obj)) {
9355
- if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
9356
- SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
9343
+ if (!_.isEqual(SYS_GLOBAL_OBJ_REFS?.[ref_field_id] || {}, obj)) {
9344
+ if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
9345
+ SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
9346
+ }
9347
+ SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
9348
+ ret = true;
9357
9349
  }
9358
- SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
9359
- ret = true;
9350
+ } catch (error) {
9351
+ // error normal if find_ROWID_idx fail
9360
9352
  }
9353
+
9361
9354
  return ret;
9362
- // func.datasource.update(SESSION_ID, {
9363
- // [0]: {
9364
- // ['datasource_main']: {
9365
- // 'data_system.SYS_GLOBAL_OBJ_REFS': { [`${ref_field_id}`]: obj },
9366
- // },
9367
- // },
9368
- // });
9369
9355
  };
9370
9356
 
9371
9357
  func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_name) {