@xuda.io/runtime-bundle 1.0.696 → 1.0.697

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.
@@ -11855,21 +11855,22 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
11855
11855
  const wrapper_data = $wrapper.data();
11856
11856
  const refreshed_ds = _ds.dsSession;
11857
11857
 
11858
- // let elm_to_delete = [];
11859
- // const ts = Date.now();
11860
- // $.each($elm.find('*'), function (key, val) {
11861
- // let xu_ui_id = $(val).attr('xu-ui-id');
11862
- // if (xu_ui_id) {
11863
- // let new_id = xu_ui_id + ts;
11864
- // elm_to_delete.push(new_id);
11865
-
11866
- // $(val).attr('xu-ui-id', new_id).removeData();
11867
- // } else {
11868
- // $(val).remove();
11869
- // }
11870
- // });
11858
+ let elm_to_delete = [];
11859
+ const ts = Date.now();
11860
+ $.each($elm.find('xu-root-component-' + SESSION_ID).find('*'), function (key, val) {
11861
+ let xu_ui_id = $(val).attr('xu-ui-id');
11862
+ if (xu_ui_id) {
11863
+ let new_id = xu_ui_id + ts;
11864
+ elm_to_delete.push(new_id);
11865
+
11866
+ $(val).attr('xu-ui-id', new_id).removeData();
11867
+ }
11868
+ // else {
11869
+ // $(val).remove();
11870
+ // }
11871
+ });
11871
11872
 
11872
- $elm.empty();
11873
+ // $elm.empty();
11873
11874
  if ($elm.data()) {
11874
11875
  const new_$div = await func.UI.screen.render_ui_tree(
11875
11876
  SESSION_ID,
@@ -11886,10 +11887,10 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
11886
11887
  elm_data.xuData.$root_container, // the wrapper root container
11887
11888
  );
11888
11889
 
11889
- // // remove old screen content
11890
- // $.each(elm_to_delete, async function (key, val) {
11891
- // $("[xu-ui-id='" + elm_to_delete + "']").remove();
11892
- // });
11890
+ // remove old screen content
11891
+ $.each(elm_to_delete, async function (key, val) {
11892
+ $("[xu-ui-id='" + elm_to_delete + "']").remove();
11893
+ });
11893
11894
 
11894
11895
  return;
11895
11896
  }
@@ -14195,7 +14196,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14195
14196
  if ($nav && $nav.length) {
14196
14197
  // refresh made
14197
14198
  } else {
14198
- $nav = $('<xu-nav>');
14199
+ $nav = $('<xu-nav>'); //.attr('xu-ui-id', SESSION_ID);
14199
14200
  $container.append($nav);
14200
14201
  func.UI.component.init_xu_nav($container, $nav);
14201
14202
  }
@@ -9577,21 +9577,22 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
9577
9577
  const wrapper_data = $wrapper.data();
9578
9578
  const refreshed_ds = _ds.dsSession;
9579
9579
 
9580
- // let elm_to_delete = [];
9581
- // const ts = Date.now();
9582
- // $.each($elm.find('*'), function (key, val) {
9583
- // let xu_ui_id = $(val).attr('xu-ui-id');
9584
- // if (xu_ui_id) {
9585
- // let new_id = xu_ui_id + ts;
9586
- // elm_to_delete.push(new_id);
9587
-
9588
- // $(val).attr('xu-ui-id', new_id).removeData();
9589
- // } else {
9590
- // $(val).remove();
9591
- // }
9592
- // });
9580
+ let elm_to_delete = [];
9581
+ const ts = Date.now();
9582
+ $.each($elm.find('xu-root-component-' + SESSION_ID).find('*'), function (key, val) {
9583
+ let xu_ui_id = $(val).attr('xu-ui-id');
9584
+ if (xu_ui_id) {
9585
+ let new_id = xu_ui_id + ts;
9586
+ elm_to_delete.push(new_id);
9587
+
9588
+ $(val).attr('xu-ui-id', new_id).removeData();
9589
+ }
9590
+ // else {
9591
+ // $(val).remove();
9592
+ // }
9593
+ });
9593
9594
 
9594
- $elm.empty();
9595
+ // $elm.empty();
9595
9596
  if ($elm.data()) {
9596
9597
  const new_$div = await func.UI.screen.render_ui_tree(
9597
9598
  SESSION_ID,
@@ -9608,10 +9609,10 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
9608
9609
  elm_data.xuData.$root_container, // the wrapper root container
9609
9610
  );
9610
9611
 
9611
- // // remove old screen content
9612
- // $.each(elm_to_delete, async function (key, val) {
9613
- // $("[xu-ui-id='" + elm_to_delete + "']").remove();
9614
- // });
9612
+ // remove old screen content
9613
+ $.each(elm_to_delete, async function (key, val) {
9614
+ $("[xu-ui-id='" + elm_to_delete + "']").remove();
9615
+ });
9615
9616
 
9616
9617
  return;
9617
9618
  }
@@ -11917,7 +11918,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
11917
11918
  if ($nav && $nav.length) {
11918
11919
  // refresh made
11919
11920
  } else {
11920
- $nav = $('<xu-nav>');
11921
+ $nav = $('<xu-nav>'); //.attr('xu-ui-id', SESSION_ID);
11921
11922
  $container.append($nav);
11922
11923
  func.UI.component.init_xu_nav($container, $nav);
11923
11924
  }