@xuda.io/runtime-bundle 1.0.943 → 1.0.944

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
  }
@@ -31130,8 +31134,12 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31130
31134
 
31131
31135
  get_selectors();
31132
31136
  // console.log('selectors>>>>', selectors);
31137
+ let children_items_ignore_list = [];
31133
31138
  for await (let [elem_key, elem_val] of Object.entries(selectors)) {
31134
31139
  if (elem_key === 'length') break;
31140
+ const xu_ui_id = $(elem_val.$elm).attr('xu-ui-id');
31141
+ if (!xu_ui_id) continue;
31142
+ if (children_items_ignore_list.includes(xu_ui_id)) continue;
31135
31143
 
31136
31144
  const add_execute_queue = async function (type) {
31137
31145
  if (!elem_val.$elm?.data?.()?.xuData) return;
@@ -31168,6 +31176,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31168
31176
  }
31169
31177
 
31170
31178
  if (!elem_val?.$elm?.data()?.xuData?.ui_type) continue;
31179
+
31171
31180
  const obj = {
31172
31181
  ui_type: elem_val.$elm.data().xuData.ui_type,
31173
31182
  SESSION_ID,
@@ -31179,6 +31188,12 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31179
31188
  new_job = jobNoP;
31180
31189
  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
31190
  performed_render = true;
31191
+
31192
+ // mark children items ignore list
31193
+ $.each(elem_val.$elm.find('*'), function (key, val) {
31194
+ children_items_ignore_list.push($(val).attr('xu-ui-id'));
31195
+ });
31196
+
31182
31197
  if (glb.DEBUG_MODE) {
31183
31198
  console.info('execute_xu_render_attributes', obj);
31184
31199
  }
@@ -31187,6 +31202,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31187
31202
  if (performed_render || elem_val.$elm[0].tagName === 'XURENDER') continue; // bypass job
31188
31203
 
31189
31204
  if (elem_val.attributes.includes('xu-exp:xu-for') || elem_val.attributes.includes('xu-for')) continue;
31205
+
31190
31206
  add_execute_queue('execute_xu_all_attributes');
31191
31207
  }
31192
31208