@xuda.io/runtime-bundle 1.0.1010 → 1.0.1012

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.
@@ -12584,11 +12584,13 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12584
12584
  },
12585
12585
  'xu-render': async function ($elm, val, from_panel) {
12586
12586
  var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
12587
- const init_render = function () {
12587
+ const init_render = async function () {
12588
12588
  if (!value) {
12589
12589
  var cloned_$div = $elm.clone(true);
12590
12590
 
12591
- let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).attr('hidden', true).appendTo($container).hide();
12591
+ const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
12592
+
12593
+ let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).attr('hidden', true).appendTo($container).hide();
12592
12594
  let original_data_obj = {
12593
12595
  force_render: true,
12594
12596
  $container: cloned_$div,
@@ -12695,7 +12697,9 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12695
12697
  }
12696
12698
 
12697
12699
  let tmp_$div = $('<div>');
12698
- const xu_ui_id = $elm.attr('xu-ui-id');
12700
+ // const xu_ui_id = $elm.attr('xu-ui-id');
12701
+ const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
12702
+
12699
12703
  let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).appendTo(tmp_$div).hide();
12700
12704
  // // was true before
12701
12705
  // if ($elm.data().xuData.xurender_node) {
@@ -12730,7 +12734,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12730
12734
  func.events.delete_job(SESSION_ID, jobNoP);
12731
12735
  };
12732
12736
  if (is_init) {
12733
- return init_render();
12737
+ return await init_render();
12734
12738
  }
12735
12739
  return await post_render();
12736
12740
  },
@@ -13570,6 +13574,19 @@ func.UI.screen.panel_post_render_handler = async function (
13570
13574
  return jobNoP;
13571
13575
  };
13572
13576
 
13577
+ const generate_xu_ui_id = async function (SESSION_ID, nodeP, $container, paramsP, keyP) {
13578
+ const _paramsP = _.cloneDeep(paramsP);
13579
+ var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_paramsP.dsSessionP];
13580
+
13581
+ const currentRecordId = $container?.data?.()?.xuData?.recordid || (_ds ? _ds.currentRecordId : '');
13582
+ const key_path = `${$container?.data()?.xuData?.key_path || '0'}-${keyP || '0'}`;
13583
+ const elem_key = `${nodeP.xu_tree_id || nodeP.id}-${key_path}-${currentRecordId}`;
13584
+ let ui_id = `${nodeP.id}-${elem_key}-${_paramsP?.dsSessionP?.toString() || ''}`; //nodeP.xu_tree_id ||
13585
+
13586
+ const new_ui_id = await func.common.sha256(ui_id);
13587
+ return new_ui_id;
13588
+ };
13589
+
13573
13590
  func.UI.screen.create_container = async function (SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, classP, elem_propP, div_typeP, $appendToP, attr_str) {
13574
13591
  const _paramsP = _.cloneDeep(paramsP);
13575
13592
  var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_paramsP.dsSessionP];
@@ -13590,7 +13607,7 @@ func.UI.screen.create_container = async function (SESSION_ID, $root_container, n
13590
13607
  try {
13591
13608
  const key_path = `${$container?.data()?.xuData?.key_path || '0'}-${keyP || '0'}`;
13592
13609
  const elem_key = `${nodeP.xu_tree_id || nodeP.id}-${key_path}-${currentRecordId}`;
13593
- let ui_id = `${nodeP.id}-${elem_key}-${_paramsP?.dsSessionP?.toString() || ''}`; //nodeP.xu_tree_id ||
13610
+ // let ui_id = `${nodeP.id}-${elem_key}-${_paramsP?.dsSessionP?.toString() || ''}`; //nodeP.xu_tree_id ||
13594
13611
 
13595
13612
  /////////////////////////////////
13596
13613
 
@@ -13654,7 +13671,8 @@ func.UI.screen.create_container = async function (SESSION_ID, $root_container, n
13654
13671
  // }
13655
13672
 
13656
13673
  // const new_ui_id = hash32hex(ui_id);
13657
- const new_ui_id = await func.common.sha256(ui_id);
13674
+ // const new_ui_id = await func.common.sha256(ui_id);
13675
+ const new_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
13658
13676
 
13659
13677
  $div.attr('xu-ui-id', new_ui_id).data({
13660
13678
  xuData: {
@@ -10309,11 +10309,13 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10309
10309
  },
10310
10310
  'xu-render': async function ($elm, val, from_panel) {
10311
10311
  var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
10312
- const init_render = function () {
10312
+ const init_render = async function () {
10313
10313
  if (!value) {
10314
10314
  var cloned_$div = $elm.clone(true);
10315
10315
 
10316
- let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).attr('hidden', true).appendTo($container).hide();
10316
+ const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
10317
+
10318
+ let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).attr('hidden', true).appendTo($container).hide();
10317
10319
  let original_data_obj = {
10318
10320
  force_render: true,
10319
10321
  $container: cloned_$div,
@@ -10420,7 +10422,9 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10420
10422
  }
10421
10423
 
10422
10424
  let tmp_$div = $('<div>');
10423
- const xu_ui_id = $elm.attr('xu-ui-id');
10425
+ // const xu_ui_id = $elm.attr('xu-ui-id');
10426
+ const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
10427
+
10424
10428
  let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).appendTo(tmp_$div).hide();
10425
10429
  // // was true before
10426
10430
  // if ($elm.data().xuData.xurender_node) {
@@ -10455,7 +10459,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10455
10459
  func.events.delete_job(SESSION_ID, jobNoP);
10456
10460
  };
10457
10461
  if (is_init) {
10458
- return init_render();
10462
+ return await init_render();
10459
10463
  }
10460
10464
  return await post_render();
10461
10465
  },
@@ -11295,6 +11299,19 @@ func.UI.screen.panel_post_render_handler = async function (
11295
11299
  return jobNoP;
11296
11300
  };
11297
11301
 
11302
+ const generate_xu_ui_id = async function (SESSION_ID, nodeP, $container, paramsP, keyP) {
11303
+ const _paramsP = _.cloneDeep(paramsP);
11304
+ var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_paramsP.dsSessionP];
11305
+
11306
+ const currentRecordId = $container?.data?.()?.xuData?.recordid || (_ds ? _ds.currentRecordId : '');
11307
+ const key_path = `${$container?.data()?.xuData?.key_path || '0'}-${keyP || '0'}`;
11308
+ const elem_key = `${nodeP.xu_tree_id || nodeP.id}-${key_path}-${currentRecordId}`;
11309
+ let ui_id = `${nodeP.id}-${elem_key}-${_paramsP?.dsSessionP?.toString() || ''}`; //nodeP.xu_tree_id ||
11310
+
11311
+ const new_ui_id = await func.common.sha256(ui_id);
11312
+ return new_ui_id;
11313
+ };
11314
+
11298
11315
  func.UI.screen.create_container = async function (SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, classP, elem_propP, div_typeP, $appendToP, attr_str) {
11299
11316
  const _paramsP = _.cloneDeep(paramsP);
11300
11317
  var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_paramsP.dsSessionP];
@@ -11315,7 +11332,7 @@ func.UI.screen.create_container = async function (SESSION_ID, $root_container, n
11315
11332
  try {
11316
11333
  const key_path = `${$container?.data()?.xuData?.key_path || '0'}-${keyP || '0'}`;
11317
11334
  const elem_key = `${nodeP.xu_tree_id || nodeP.id}-${key_path}-${currentRecordId}`;
11318
- let ui_id = `${nodeP.id}-${elem_key}-${_paramsP?.dsSessionP?.toString() || ''}`; //nodeP.xu_tree_id ||
11335
+ // let ui_id = `${nodeP.id}-${elem_key}-${_paramsP?.dsSessionP?.toString() || ''}`; //nodeP.xu_tree_id ||
11319
11336
 
11320
11337
  /////////////////////////////////
11321
11338
 
@@ -11379,7 +11396,8 @@ func.UI.screen.create_container = async function (SESSION_ID, $root_container, n
11379
11396
  // }
11380
11397
 
11381
11398
  // const new_ui_id = hash32hex(ui_id);
11382
- const new_ui_id = await func.common.sha256(ui_id);
11399
+ // const new_ui_id = await func.common.sha256(ui_id);
11400
+ const new_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
11383
11401
 
11384
11402
  $div.attr('xu-ui-id', new_ui_id).data({
11385
11403
  xuData: {