@xuda.io/runtime-bundle 1.0.404 → 1.0.406

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.
@@ -28078,6 +28078,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
28078
28078
  null,
28079
28079
  queue_obj.paramsP.elem_val.$elm.data().xuData.iterate_info,
28080
28080
  );
28081
+ console.log(res);
28081
28082
  }
28082
28083
 
28083
28084
  const attr_new = attr.split('xu-exp:')[1];
@@ -31589,7 +31590,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31589
31590
  }
31590
31591
  }
31591
31592
  }
31592
- if (found) break;
31593
+ // if (found) break;
31593
31594
 
31594
31595
  if (item.children) {
31595
31596
  await iterate_progUi(item.children, item.id);
@@ -31625,8 +31626,8 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31625
31626
  };
31626
31627
 
31627
31628
  func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr, datasource_changed, fields_changed_datasource) {
31628
- const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
31629
- // var panels_obj = {};
31629
+ // const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
31630
+
31630
31631
  const panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, false);
31631
31632
 
31632
31633
  const find_field_in_progUi = function (progUi, field_id, prop) {
@@ -31655,9 +31656,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
31655
31656
  for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
31656
31657
  const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id);
31657
31658
  const progDataSource_str = JSON.stringify(prog_doc.progDataSource);
31658
- // const progUi_str = JSON.stringify(prog_doc.progUi);
31659
-
31660
- // console.log("panel_val", panel_val)
31661
31659
 
31662
31660
  var found;
31663
31661
  if (fields_changed_arr) {
@@ -31677,7 +31675,7 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
31677
31675
  for (const [attr, value] of Object.entries(_attributes)) {
31678
31676
  const pattern = /xu-exp:(\w+)/;
31679
31677
  const match = attr.match(pattern);
31680
- // if (!match && value !== "@" + field_id) {
31678
+
31681
31679
  if (!match) {
31682
31680
  // continue if attribute is not expression
31683
31681
  continue;
@@ -31690,9 +31688,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
31690
31688
  found = progDataSource_str?.includes('@' + parameter_in_field_id);
31691
31689
  if (found) break;
31692
31690
 
31693
- // found = progUi_str?.includes("@" + parameter_in_field_id);
31694
- // if (found) return false;
31695
-
31696
31691
  found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
31697
31692
  if (found) break;
31698
31693
  }
@@ -31703,12 +31698,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
31703
31698
  // search field changed in the target program's progDataSource // @code
31704
31699
  found = progDataSource_str?.includes('@' + field_id);
31705
31700
  if (found) break;
31706
-
31707
- // found = progUi_str?.includes("@" + field_id);
31708
- // if (found) return false;
31709
-
31710
- // found = find_field_in_progUi(prog_doc.progUi, field_id)
31711
- // if (found) break
31712
31701
  }
31713
31702
  }
31714
31703
 
@@ -31725,26 +31714,10 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
31725
31714
 
31726
31715
  // restore original panel
31727
31716
  try {
31728
- const $org_panel = panel_val.$div.data().xuPanelData.$panel_div; //panel_val.$div.clone(true);
31729
-
31730
- // const old_ds = $($org_panel).data().xuData.paramsP.dsSessionP;
31731
- // func.datasource.del(SESSION_ID, old_ds);
31717
+ // const $org_panel = panel_val.$div.data().xuPanelData.$panel_div;
31732
31718
 
31733
31719
  const new_$div = await func.UI.screen.render_ui_tree(SESSION_ID, $div_elm, _.cloneDeep(panel_val.$div.data().xuPanelData.node), {}, $div_elm.data().xuData.paramsP, null, null, $div_elm.data().xuData.key, null, $div_elm.data().xuData.parent_node, null, $div_elm.data().xuData.$root_container);
31734
- // const new_$div = await func.UI.screen.render_ui_tree(
31735
- // SESSION_ID,
31736
- // $div_elm,
31737
- // _.cloneDeep(panel_val.$div.data().xuPanelData.node),
31738
- // {},
31739
- // $org_panel.data().xuData.paramsP,
31740
- // null,
31741
- // null,
31742
- // $org_panel.data().xuData.key,
31743
- // null,
31744
- // $org_panel.data().xuData.parent_node,
31745
- // null,
31746
- // $org_panel.data().xuData.$root_container
31747
- // );
31720
+
31748
31721
  // remove old panel content
31749
31722
  $.each(panel_val.ids, async function (key, val) {
31750
31723
  $("[xu-ui-id='" + val + "']").remove();
@@ -31994,14 +31967,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
31994
31967
  // Callback function to execute when mutations are observed
31995
31968
  const callback = (mutationList, observer) => {
31996
31969
  func.UI.screen.refresh_xu_attributes(SESSION_ID, [val.value]);
31997
- return;
31998
- for (const mutation of mutationList) {
31999
- if (mutation.type === 'childList') {
32000
- console.log('A child node has been added or removed.');
32001
- } else if (mutation.type === 'attributes') {
32002
- console.log(`The ${mutation.attributeName} attribute was modified.`);
32003
- }
32004
- }
32005
31970
  };
32006
31971
 
32007
31972
  // Create an observer instance linked to the callback function
@@ -32787,7 +32752,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
32787
32752
 
32788
32753
  // ALL
32789
32754
 
32790
- // let svg_attributes_str = ""
32791
32755
  for await (const [key, val] of Object.entries(nodeP.attributes)) {
32792
32756
  if (_ret.abort) break;
32793
32757
  if (glb.html5_events_handler.includes(key) || execute_attributes.includes(key)) {
@@ -32801,12 +32765,7 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
32801
32765
  ) {
32802
32766
  // handle common html attributes
32803
32767
  try {
32804
- // $elm.attr(key, val);
32805
- // if (nodeP.tagName === "svg") {
32806
- // svg_attributes_str += `${key}="${val}" `
32807
- // } else {
32808
32768
  $elm.get(0).setAttribute(key, val);
32809
- // }
32810
32769
  } catch (err) {
32811
32770
  console.error(err.message);
32812
32771
  }
@@ -32815,7 +32774,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
32815
32774
  }
32816
32775
  // handle xu attributes
32817
32776
  try {
32818
- // console.log(">>>> attributes", key, val);
32819
32777
  $elm.data().xuAttributes[key] = val;
32820
32778
  } catch (error) {
32821
32779
  debugger;