@xuda.io/runtime-bundle 1.0.943 → 1.0.945

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.
@@ -29961,7 +29961,11 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
29961
29961
  }
29962
29962
  ///// REFRESH SCREEN
29963
29963
  if (fields_changed.length) {
29964
- await func.UI.screen.refresh_xu_attributes(SESSION_ID, _.cloneDeep(fields_changed), null, null, null, avoid_xu_for_refresh);
29964
+ function findMin(arr) {
29965
+ return Math.min(...arr.map(Number));
29966
+ }
29967
+
29968
+ await func.UI.screen.refresh_xu_attributes(SESSION_ID, _.cloneDeep(fields_changed), null, null, findMin(datasource_changed), avoid_xu_for_refresh);
29965
29969
  // await removed from the below function cause to dead lock Mar 3 25
29966
29970
  await func.UI.screen.refresh_screen(
29967
29971
  SESSION_ID,
@@ -31008,11 +31012,11 @@ func.UI.screen.call_embed = function (SESSION_ID, prog) {
31008
31012
  });
31009
31013
  func.UI.main.embed_prog_execute(SESSION_ID, prog);
31010
31014
  };
31011
- func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, jobNoP, $elm_to_search, dsSession, avoid_xu_for_refresh) {
31015
+ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, jobNoP, $elm_to_search, dsSession_changed, avoid_xu_for_refresh) {
31012
31016
  if (!_.isEmpty(SCREEN_BLOCKER_OBJ)) {
31013
31017
  // let dom to finish
31014
31018
  setTimeout(() => {
31015
- func.UI.screen.refresh_xu_attributes(SESSION_ID, fields_arr, jobNoP, $elm_to_search, dsSession);
31019
+ func.UI.screen.refresh_xu_attributes(SESSION_ID, fields_arr, jobNoP, $elm_to_search, dsSession_changed);
31016
31020
  }, 100);
31017
31021
  return;
31018
31022
  }
@@ -31037,6 +31041,9 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31037
31041
  .filter(function () {
31038
31042
  // check if the changed field include in the calling in parameters
31039
31043
  const elm_data = $(this).data();
31044
+ if (!elm_data.xuData) return true;
31045
+
31046
+ if (typeof dsSession_changed !== 'undefined' && elm_data.xuData.paramsP.dsSessionP < dsSession_changed) return true;
31040
31047
 
31041
31048
  let attr = [];
31042
31049
 
@@ -31130,8 +31137,12 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31130
31137
 
31131
31138
  get_selectors();
31132
31139
  // console.log('selectors>>>>', selectors);
31140
+ let children_items_ignore_list = [];
31133
31141
  for await (let [elem_key, elem_val] of Object.entries(selectors)) {
31134
31142
  if (elem_key === 'length') break;
31143
+ const xu_ui_id = $(elem_val.$elm).attr('xu-ui-id');
31144
+ if (!xu_ui_id) continue;
31145
+ if (children_items_ignore_list.includes(xu_ui_id)) continue;
31135
31146
 
31136
31147
  const add_execute_queue = async function (type) {
31137
31148
  if (!elem_val.$elm?.data?.()?.xuData) return;
@@ -31168,6 +31179,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31168
31179
  }
31169
31180
 
31170
31181
  if (!elem_val?.$elm?.data()?.xuData?.ui_type) continue;
31182
+
31171
31183
  const obj = {
31172
31184
  ui_type: elem_val.$elm.data().xuData.ui_type,
31173
31185
  SESSION_ID,
@@ -31179,6 +31191,12 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31179
31191
  new_job = jobNoP;
31180
31192
  new_job = await func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'execute_xu_render_attributes', obj, new_job, elem_val.$elm, elem_val.$elm.data().xuData.paramsP.dsSessionP);
31181
31193
  performed_render = true;
31194
+
31195
+ // mark children items ignore list
31196
+ $.each(elem_val.$elm.find('*'), function (key, val) {
31197
+ children_items_ignore_list.push($(val).attr('xu-ui-id'));
31198
+ });
31199
+
31182
31200
  if (glb.DEBUG_MODE) {
31183
31201
  console.info('execute_xu_render_attributes', obj);
31184
31202
  }
@@ -31187,6 +31205,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31187
31205
  if (performed_render || elem_val.$elm[0].tagName === 'XURENDER') continue; // bypass job
31188
31206
 
31189
31207
  if (elem_val.attributes.includes('xu-exp:xu-for') || elem_val.attributes.includes('xu-for')) continue;
31208
+
31190
31209
  add_execute_queue('execute_xu_all_attributes');
31191
31210
  }
31192
31211