@xuda.io/runtime-bundle 1.0.1155 → 1.0.1157

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.
@@ -27877,7 +27877,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
27877
27877
 
27878
27878
  const attr_new = attr.split('xu-exp:')[1];
27879
27879
  // REGULAR ATTRIBUTE
27880
- if (attr_new && attr_new.substr(0, 2) !== 'xu' && queue_obj.paramsP.ui_type !== 'xu-widget') {
27880
+ if (attr_new && attr_new.substr(0, 2) !== 'xu') {
27881
27881
  queue_obj.paramsP.elem_val.$elm.attr(attr_new !== 'viewBox' ? attr_new.toLowerCase() : attr_new, res.result);
27882
27882
  } else {
27883
27883
  try {
@@ -27953,6 +27953,30 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
27953
27953
 
27954
27954
  return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
27955
27955
  },
27956
+ execute_xu_widget: async function () {
27957
+ try {
27958
+ var $elm = queue_obj?.paramsP?.elem_val?.$elm; // $(SESSION_OBJ[SESSION_ID].root_element).find(`[xu-ui-id=${queue_obj.paramsP.elem_key}]`)
27959
+
27960
+ if (!$elm?.length) {
27961
+ return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
27962
+ }
27963
+
27964
+ // $elm.empty();
27965
+
27966
+ $.each($elm.children(), (key, val) => {
27967
+ if (!$(val)?.data()?.xuData) return true;
27968
+
27969
+ if ($(val).data().xuData.nodeid === queue_obj?.paramsP?.xu_for_item_id) {
27970
+ $(val).remove();
27971
+ }
27972
+ });
27973
+
27974
+ let _data = queue_obj.paramsP.elem_val.$elm.data();
27975
+ const node_to_render = _data.xuData.node_org.children?.find((e) => e.id === queue_obj?.paramsP?.xu_for_item_id);
27976
+ await func.UI.screen.render_ui_tree(queue_obj.paramsP.SESSION_ID, queue_obj.paramsP.elem_val.$elm, node_to_render, null, _data.xuData.paramsP, queue_obj.jobNoP, null, _data.xuData.key, null, _data.xuData.parent_node, null, _data.xuData.$root_container);
27977
+ } catch (error) {}
27978
+ return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
27979
+ },
27956
27980
  };
27957
27981
 
27958
27982
  return await fx[queue_obj.functionP]();
@@ -31391,8 +31415,11 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31391
31415
  if (performed_render || elem_val.$elm[0].tagName === 'XURENDER') continue; // bypass job
31392
31416
 
31393
31417
  if (elem_val.attributes.includes('xu-exp:xu-for') || elem_val.attributes.includes('xu-for')) continue;
31394
-
31395
- add_execute_queue('execute_xu_all_attributes');
31418
+ if (elem_val.$elm.data().xuData.ui_type === 'xu-widget') {
31419
+ add_execute_queue('execute_xu_all_attributes');
31420
+ } else {
31421
+ add_execute_queue('execute_xu_all_attributes');
31422
+ }
31396
31423
  }
31397
31424
 
31398
31425
  // xu-for