@xuda.io/runtime-bundle 1.0.738 → 1.0.740

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.
@@ -8848,28 +8848,28 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
8848
8848
  let _ds_0 = _session.DS_GLB[0];
8849
8849
 
8850
8850
  const _ds = func.utils.clean_returned_datasource(SESSION_ID, dsSessionP);
8851
+
8852
+ let obj = { ds: _ds, data: {}, props: _ds.in_parameters || {} };
8851
8853
  try {
8852
8854
  const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
8855
+ obj.data = _ds?.data_feed?.rows?.[row_idx];
8856
+ } catch (error) {
8857
+ // error normal if find_ROWID_idx fail
8858
+ }
8859
+ let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
8853
8860
 
8854
- let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
8855
-
8856
- let obj = { ds: _ds, data: _ds?.data_feed?.rows?.[row_idx] || {}, props: _ds.in_parameters || {} };
8857
-
8858
- if ($elm) {
8859
- const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
8860
- obj.attributes = attributes;
8861
- obj.xu_ui_id = $elm.attr('xu-ui-id');
8862
- }
8861
+ if ($elm) {
8862
+ const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
8863
+ obj.attributes = attributes;
8864
+ obj.xu_ui_id = $elm.attr('xu-ui-id');
8865
+ }
8863
8866
 
8864
- if (!_.isEqual(SYS_GLOBAL_OBJ_REFS?.[ref_field_id] || {}, obj)) {
8865
- if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
8866
- SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
8867
- }
8868
- SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
8869
- ret = true;
8867
+ if (!_.isEqual(SYS_GLOBAL_OBJ_REFS?.[ref_field_id] || {}, obj)) {
8868
+ if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
8869
+ SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
8870
8870
  }
8871
- } catch (error) {
8872
- // error normal if find_ROWID_idx fail
8871
+ SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
8872
+ ret = true;
8873
8873
  }
8874
8874
 
8875
8875
  return ret;
@@ -12240,8 +12240,10 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12240
12240
  const params_obj = await get_params_obj_new(SESSION_ID, prog_id, nodeP, paramsP.dsSessionP);
12241
12241
  let ret_panel = await func.UI.screen.init(SESSION_ID, prog_id, paramsP.screenId, _ds, $elm, null, _ds.currentRecordId, null, true, params_obj.params_res, 'initXu_panel', undefined, prog_id !== _ds.prog_id ? null : refreshed_ds, params_obj.params_raw);
12242
12242
  ret = { $new_div: ret_panel };
12243
- $container.data().xuData.xuPanelProps = $elm.data().xuAttributes;
12244
- $container.data().xuData.xuPanelData = ret_panel.data();
12243
+ if ($container.data().xuData) {
12244
+ $container.data().xuData.xuPanelProps = $elm.data().xuAttributes;
12245
+ $container.data().xuData.xuPanelData = ret_panel.data();
12246
+ }
12245
12247
  return ret;
12246
12248
  }
12247
12249
 
@@ -13098,7 +13100,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
13098
13100
  for await (let [prop_name, prop_val] of Object.entries(properties)) {
13099
13101
  prop_val.value = value?.attributes?.[prop_name];
13100
13102
  if (value?.attributes?.[`xu-exp:${prop_name}`]) {
13101
- const res = await func.expression.get(SESSION_ID, `xu-exp:${prop_name}`, paramsP.dsSessionP, 'UI Attr EXP');
13103
+ const res = await func.expression.get(SESSION_ID, value?.attributes?.[`xu-exp:${prop_name}`], paramsP.dsSessionP, 'UI Attr EXP');
13102
13104
  prop_val.value = res.result;
13103
13105
  }
13104
13106
  }
@@ -8849,28 +8849,28 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
8849
8849
  let _ds_0 = _session.DS_GLB[0];
8850
8850
 
8851
8851
  const _ds = func.utils.clean_returned_datasource(SESSION_ID, dsSessionP);
8852
+
8853
+ let obj = { ds: _ds, data: {}, props: _ds.in_parameters || {} };
8852
8854
  try {
8853
8855
  const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
8856
+ obj.data = _ds?.data_feed?.rows?.[row_idx];
8857
+ } catch (error) {
8858
+ // error normal if find_ROWID_idx fail
8859
+ }
8860
+ let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
8854
8861
 
8855
- let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
8856
-
8857
- let obj = { ds: _ds, data: _ds?.data_feed?.rows?.[row_idx] || {}, props: _ds.in_parameters || {} };
8858
-
8859
- if ($elm) {
8860
- const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
8861
- obj.attributes = attributes;
8862
- obj.xu_ui_id = $elm.attr('xu-ui-id');
8863
- }
8862
+ if ($elm) {
8863
+ const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
8864
+ obj.attributes = attributes;
8865
+ obj.xu_ui_id = $elm.attr('xu-ui-id');
8866
+ }
8864
8867
 
8865
- if (!_.isEqual(SYS_GLOBAL_OBJ_REFS?.[ref_field_id] || {}, obj)) {
8866
- if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
8867
- SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
8868
- }
8869
- SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
8870
- ret = true;
8868
+ if (!_.isEqual(SYS_GLOBAL_OBJ_REFS?.[ref_field_id] || {}, obj)) {
8869
+ if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
8870
+ SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
8871
8871
  }
8872
- } catch (error) {
8873
- // error normal if find_ROWID_idx fail
8872
+ SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
8873
+ ret = true;
8874
8874
  }
8875
8875
 
8876
8876
  return ret;
@@ -9950,8 +9950,10 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
9950
9950
  const params_obj = await get_params_obj_new(SESSION_ID, prog_id, nodeP, paramsP.dsSessionP);
9951
9951
  let ret_panel = await func.UI.screen.init(SESSION_ID, prog_id, paramsP.screenId, _ds, $elm, null, _ds.currentRecordId, null, true, params_obj.params_res, 'initXu_panel', undefined, prog_id !== _ds.prog_id ? null : refreshed_ds, params_obj.params_raw);
9952
9952
  ret = { $new_div: ret_panel };
9953
- $container.data().xuData.xuPanelProps = $elm.data().xuAttributes;
9954
- $container.data().xuData.xuPanelData = ret_panel.data();
9953
+ if ($container.data().xuData) {
9954
+ $container.data().xuData.xuPanelProps = $elm.data().xuAttributes;
9955
+ $container.data().xuData.xuPanelData = ret_panel.data();
9956
+ }
9955
9957
  return ret;
9956
9958
  }
9957
9959
 
@@ -10808,7 +10810,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10808
10810
  for await (let [prop_name, prop_val] of Object.entries(properties)) {
10809
10811
  prop_val.value = value?.attributes?.[prop_name];
10810
10812
  if (value?.attributes?.[`xu-exp:${prop_name}`]) {
10811
- const res = await func.expression.get(SESSION_ID, `xu-exp:${prop_name}`, paramsP.dsSessionP, 'UI Attr EXP');
10813
+ const res = await func.expression.get(SESSION_ID, value?.attributes?.[`xu-exp:${prop_name}`], paramsP.dsSessionP, 'UI Attr EXP');
10812
10814
  prop_val.value = res.result;
10813
10815
  }
10814
10816
  }