@xuda.io/runtime-bundle 1.0.580 → 1.0.581

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.
@@ -12013,7 +12013,7 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
12013
12013
  for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
12014
12014
  const progDataSource_str = JSON.stringify(panel_val.prog_doc.progDataSource);
12015
12015
 
12016
- var found;
12016
+ var found, refresh_reason;
12017
12017
  if (fields_changed_arr) {
12018
12018
  if (fields_changed_datasource && panel_val._ds.dsSession < fields_changed_datasource) {
12019
12019
  continue;
@@ -12024,7 +12024,11 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
12024
12024
 
12025
12025
  // detect if program changed
12026
12026
  found = _attributes['xu-exp:program']?.includes('@' + field_id);
12027
- if (found) break;
12027
+
12028
+ if (found) {
12029
+ refresh_reason = 'program changed';
12030
+ break;
12031
+ }
12028
12032
 
12029
12033
  // _attributes holds also info of parameters in code_in: @code
12030
12034
  // search field changed in panel call send parameters exp
@@ -12042,11 +12046,19 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
12042
12046
  if (value.includes(field_id)) {
12043
12047
  // search parameter in field in the target program's progDataSource
12044
12048
  found = progDataSource_str?.includes('@' + parameter_in_field_id);
12045
- if (found) break;
12049
+
12050
+ if (found) {
12051
+ refresh_reason = 'field in progDataSource parameter_in changed';
12052
+ break;
12053
+ }
12046
12054
 
12047
12055
  // found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
12048
12056
  found = func.UI.find_field_in_progUi_attributes(panel_val.prog_doc.progUi, parameter_in_field_id, 'xu-for').length;
12049
- if (found) break;
12057
+
12058
+ if (found) {
12059
+ refresh_reason = 'field in progUi xu-for parameter_in changed';
12060
+ break;
12061
+ }
12050
12062
  }
12051
12063
  }
12052
12064
 
@@ -12054,19 +12066,30 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
12054
12066
 
12055
12067
  // search field changed in the target program's progDataSource // @code
12056
12068
  found = progDataSource_str?.includes('@' + field_id);
12057
- if (found) break;
12069
+ if (found) {
12070
+ refresh_reason = 'field in progDataSource changed';
12071
+ break;
12072
+ }
12058
12073
 
12059
12074
  found = func.UI.find_field_in_progUi_attributes(panel_val.prog_doc.progUi, field_id, 'xu-for').length;
12060
- if (found) break;
12075
+ if (found) {
12076
+ refresh_reason = 'field in progUi xu-for changed';
12077
+ break;
12078
+ }
12061
12079
  }
12062
12080
  }
12063
12081
 
12064
12082
  if (datasource_changed) {
12065
12083
  if (panel_val._ds.dsSession == datasource_changed) {
12084
+ refresh_reason = 'panel datasource changed';
12066
12085
  found = true;
12067
12086
  }
12068
12087
  }
12069
12088
  if (found) {
12089
+ const _session = SESSION_OBJ[SESSION_ID];
12090
+ if (_session.engine_mode === 'live_preview') {
12091
+ console.log('refresh reason', refresh_reason);
12092
+ }
12070
12093
  const $div_elm = panel_val.$panel_div;
12071
12094
  const wrapper_data = $div_elm.data();
12072
12095
 
@@ -12085,7 +12108,8 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
12085
12108
 
12086
12109
  let refreshed_ds;
12087
12110
  // check if ds exist and deleted by garbage collector
12088
- const _session = SESSION_OBJ[SESSION_ID];
12111
+
12112
+ // const _session = SESSION_OBJ[SESSION_ID];
12089
12113
  if (_session.DS_GLB[panel_val._ds.dsSession]) {
12090
12114
  refreshed_ds = panel_val._ds.dsSession;
12091
12115
  }
@@ -9745,7 +9745,7 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
9745
9745
  for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
9746
9746
  const progDataSource_str = JSON.stringify(panel_val.prog_doc.progDataSource);
9747
9747
 
9748
- var found;
9748
+ var found, refresh_reason;
9749
9749
  if (fields_changed_arr) {
9750
9750
  if (fields_changed_datasource && panel_val._ds.dsSession < fields_changed_datasource) {
9751
9751
  continue;
@@ -9756,7 +9756,11 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
9756
9756
 
9757
9757
  // detect if program changed
9758
9758
  found = _attributes['xu-exp:program']?.includes('@' + field_id);
9759
- if (found) break;
9759
+
9760
+ if (found) {
9761
+ refresh_reason = 'program changed';
9762
+ break;
9763
+ }
9760
9764
 
9761
9765
  // _attributes holds also info of parameters in code_in: @code
9762
9766
  // search field changed in panel call send parameters exp
@@ -9774,11 +9778,19 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
9774
9778
  if (value.includes(field_id)) {
9775
9779
  // search parameter in field in the target program's progDataSource
9776
9780
  found = progDataSource_str?.includes('@' + parameter_in_field_id);
9777
- if (found) break;
9781
+
9782
+ if (found) {
9783
+ refresh_reason = 'field in progDataSource parameter_in changed';
9784
+ break;
9785
+ }
9778
9786
 
9779
9787
  // found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
9780
9788
  found = func.UI.find_field_in_progUi_attributes(panel_val.prog_doc.progUi, parameter_in_field_id, 'xu-for').length;
9781
- if (found) break;
9789
+
9790
+ if (found) {
9791
+ refresh_reason = 'field in progUi xu-for parameter_in changed';
9792
+ break;
9793
+ }
9782
9794
  }
9783
9795
  }
9784
9796
 
@@ -9786,19 +9798,30 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
9786
9798
 
9787
9799
  // search field changed in the target program's progDataSource // @code
9788
9800
  found = progDataSource_str?.includes('@' + field_id);
9789
- if (found) break;
9801
+ if (found) {
9802
+ refresh_reason = 'field in progDataSource changed';
9803
+ break;
9804
+ }
9790
9805
 
9791
9806
  found = func.UI.find_field_in_progUi_attributes(panel_val.prog_doc.progUi, field_id, 'xu-for').length;
9792
- if (found) break;
9807
+ if (found) {
9808
+ refresh_reason = 'field in progUi xu-for changed';
9809
+ break;
9810
+ }
9793
9811
  }
9794
9812
  }
9795
9813
 
9796
9814
  if (datasource_changed) {
9797
9815
  if (panel_val._ds.dsSession == datasource_changed) {
9816
+ refresh_reason = 'panel datasource changed';
9798
9817
  found = true;
9799
9818
  }
9800
9819
  }
9801
9820
  if (found) {
9821
+ const _session = SESSION_OBJ[SESSION_ID];
9822
+ if (_session.engine_mode === 'live_preview') {
9823
+ console.log('refresh reason', refresh_reason);
9824
+ }
9802
9825
  const $div_elm = panel_val.$panel_div;
9803
9826
  const wrapper_data = $div_elm.data();
9804
9827
 
@@ -9817,7 +9840,8 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
9817
9840
 
9818
9841
  let refreshed_ds;
9819
9842
  // check if ds exist and deleted by garbage collector
9820
- const _session = SESSION_OBJ[SESSION_ID];
9843
+
9844
+ // const _session = SESSION_OBJ[SESSION_ID];
9821
9845
  if (_session.DS_GLB[panel_val._ds.dsSession]) {
9822
9846
  refreshed_ds = panel_val._ds.dsSession;
9823
9847
  }