@xuda.io/runtime-bundle 1.0.1027 → 1.0.1029

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.
@@ -11732,7 +11732,8 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
11732
11732
  if (val?.includes(field_id)) {
11733
11733
  const parent_element_ui_id = node_id;
11734
11734
  debugger;
11735
- let _$elem = $(`[xu-ui-id^=${parent_element_ui_id}]`);
11735
+ // let _$elem = $(`[xu-ui-id^=${parent_element_ui_id}]`);
11736
+ let _$elem = $(`[xu-node-id=${parent_element_ui_id}]`);
11736
11737
 
11737
11738
  const _elem_key = parent_element_ui_id;
11738
11739
  const _elem_val = { attributes: [], $elm: _$elem };
@@ -11761,6 +11762,13 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
11761
11762
  break;
11762
11763
  }
11763
11764
  }
11765
+
11766
+ if (glb.new_xu_render) {
11767
+ if (attr === 'xu-exp:xu-render' || attr === 'xu-render') {
11768
+ let _$elem = $(`[xu-node-id=${parent_element_ui_id}]`);
11769
+ debugger;
11770
+ }
11771
+ }
11764
11772
  }
11765
11773
  }
11766
11774
  if (found) break;
@@ -12634,6 +12642,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12634
12642
  };
12635
12643
 
12636
12644
  const post_render = async function () {
12645
+ nodeP.xu_render_made = value;
12637
12646
  if (value) {
12638
12647
  try {
12639
12648
  // abort if already rended
@@ -13702,37 +13711,40 @@ func.UI.screen.create_container = async function (SESSION_ID, $root_container, n
13702
13711
  // const new_ui_id = await func.common.sha256(ui_id);
13703
13712
  const new_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
13704
13713
 
13705
- $div.attr('xu-ui-id', new_ui_id).data({
13706
- xuData: {
13707
- prog_id: _paramsP.prog_id,
13708
- nodeid: nodeP.id,
13709
- ui_type: nodeP.tagName,
13710
- xu_id,
13711
- recordid: currentRecordId,
13712
- paramsP: _paramsP,
13713
- key: keyP,
13714
- key_path, //:($container?.data()?.xuData?.key || "0") + "-" + (keyP || "0"),
13715
- screenId: _paramsP.screenId,
13716
- parent_container: $container?.attr('id'),
13717
- elem_key,
13718
- properties: prop,
13719
- node: nodeP,
13720
- node_org: _.cloneDeep(nodeP),
13721
- is_panelP: _paramsP.is_panelP,
13722
- ui_id: new_ui_id,
13723
- elem_prop: elem_propP,
13724
- debug_info: {
13725
- id: nodeP.id,
13726
- parent_id: $container?.data()?.xuData?.ui_id,
13727
- items: items,
13714
+ $div
13715
+ .attr('xu-ui-id', new_ui_id)
13716
+ .attr('xu-node-id', nodeP.id)
13717
+ .data({
13718
+ xuData: {
13719
+ prog_id: _paramsP.prog_id,
13720
+ nodeid: nodeP.id,
13721
+ ui_type: nodeP.tagName,
13722
+ xu_id,
13723
+ recordid: currentRecordId,
13724
+ paramsP: _paramsP,
13725
+ key: keyP,
13726
+ key_path, //:($container?.data()?.xuData?.key || "0") + "-" + (keyP || "0"),
13727
+ screenId: _paramsP.screenId,
13728
+ parent_container: $container?.attr('id'),
13729
+ elem_key,
13730
+ properties: prop,
13731
+ node: nodeP,
13732
+ node_org: _.cloneDeep(nodeP),
13733
+ is_panelP: _paramsP.is_panelP,
13734
+ ui_id: new_ui_id,
13735
+ elem_prop: elem_propP,
13736
+ debug_info: {
13737
+ id: nodeP.id,
13738
+ parent_id: $container?.data()?.xuData?.ui_id,
13739
+ items: items,
13740
+ },
13741
+ parent_node: parent_nodeP,
13742
+ currentRecordId: currentRecordId,
13743
+ $root_container: $root_container,
13744
+ parent_element_ui_id: $container?.data()?.xuData?.ui_id,
13728
13745
  },
13729
- parent_node: parent_nodeP,
13730
- currentRecordId: currentRecordId,
13731
- $root_container: $root_container,
13732
- parent_element_ui_id: $container?.data()?.xuData?.ui_id,
13733
- },
13734
- xuAttributes: {},
13735
- });
13746
+ xuAttributes: {},
13747
+ });
13736
13748
 
13737
13749
  if (div_typeP !== 'svg') {
13738
13750
  $div.appendTo($appendTo);
@@ -14772,7 +14784,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14772
14784
  const done = async function (ret = {}) {
14773
14785
  if (glb.new_xu_render) {
14774
14786
  if (ret.xu_render_in_process) {
14775
- debugger;
14776
14787
  const xu_ui_id = $div.attr('xu-ui-id');
14777
14788
  if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
14778
14789
  UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
@@ -9457,7 +9457,8 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
9457
9457
  if (val?.includes(field_id)) {
9458
9458
  const parent_element_ui_id = node_id;
9459
9459
  debugger;
9460
- let _$elem = $(`[xu-ui-id^=${parent_element_ui_id}]`);
9460
+ // let _$elem = $(`[xu-ui-id^=${parent_element_ui_id}]`);
9461
+ let _$elem = $(`[xu-node-id=${parent_element_ui_id}]`);
9461
9462
 
9462
9463
  const _elem_key = parent_element_ui_id;
9463
9464
  const _elem_val = { attributes: [], $elm: _$elem };
@@ -9486,6 +9487,13 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
9486
9487
  break;
9487
9488
  }
9488
9489
  }
9490
+
9491
+ if (glb.new_xu_render) {
9492
+ if (attr === 'xu-exp:xu-render' || attr === 'xu-render') {
9493
+ let _$elem = $(`[xu-node-id=${parent_element_ui_id}]`);
9494
+ debugger;
9495
+ }
9496
+ }
9489
9497
  }
9490
9498
  }
9491
9499
  if (found) break;
@@ -10359,6 +10367,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10359
10367
  };
10360
10368
 
10361
10369
  const post_render = async function () {
10370
+ nodeP.xu_render_made = value;
10362
10371
  if (value) {
10363
10372
  try {
10364
10373
  // abort if already rended
@@ -11427,37 +11436,40 @@ func.UI.screen.create_container = async function (SESSION_ID, $root_container, n
11427
11436
  // const new_ui_id = await func.common.sha256(ui_id);
11428
11437
  const new_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
11429
11438
 
11430
- $div.attr('xu-ui-id', new_ui_id).data({
11431
- xuData: {
11432
- prog_id: _paramsP.prog_id,
11433
- nodeid: nodeP.id,
11434
- ui_type: nodeP.tagName,
11435
- xu_id,
11436
- recordid: currentRecordId,
11437
- paramsP: _paramsP,
11438
- key: keyP,
11439
- key_path, //:($container?.data()?.xuData?.key || "0") + "-" + (keyP || "0"),
11440
- screenId: _paramsP.screenId,
11441
- parent_container: $container?.attr('id'),
11442
- elem_key,
11443
- properties: prop,
11444
- node: nodeP,
11445
- node_org: _.cloneDeep(nodeP),
11446
- is_panelP: _paramsP.is_panelP,
11447
- ui_id: new_ui_id,
11448
- elem_prop: elem_propP,
11449
- debug_info: {
11450
- id: nodeP.id,
11451
- parent_id: $container?.data()?.xuData?.ui_id,
11452
- items: items,
11439
+ $div
11440
+ .attr('xu-ui-id', new_ui_id)
11441
+ .attr('xu-node-id', nodeP.id)
11442
+ .data({
11443
+ xuData: {
11444
+ prog_id: _paramsP.prog_id,
11445
+ nodeid: nodeP.id,
11446
+ ui_type: nodeP.tagName,
11447
+ xu_id,
11448
+ recordid: currentRecordId,
11449
+ paramsP: _paramsP,
11450
+ key: keyP,
11451
+ key_path, //:($container?.data()?.xuData?.key || "0") + "-" + (keyP || "0"),
11452
+ screenId: _paramsP.screenId,
11453
+ parent_container: $container?.attr('id'),
11454
+ elem_key,
11455
+ properties: prop,
11456
+ node: nodeP,
11457
+ node_org: _.cloneDeep(nodeP),
11458
+ is_panelP: _paramsP.is_panelP,
11459
+ ui_id: new_ui_id,
11460
+ elem_prop: elem_propP,
11461
+ debug_info: {
11462
+ id: nodeP.id,
11463
+ parent_id: $container?.data()?.xuData?.ui_id,
11464
+ items: items,
11465
+ },
11466
+ parent_node: parent_nodeP,
11467
+ currentRecordId: currentRecordId,
11468
+ $root_container: $root_container,
11469
+ parent_element_ui_id: $container?.data()?.xuData?.ui_id,
11453
11470
  },
11454
- parent_node: parent_nodeP,
11455
- currentRecordId: currentRecordId,
11456
- $root_container: $root_container,
11457
- parent_element_ui_id: $container?.data()?.xuData?.ui_id,
11458
- },
11459
- xuAttributes: {},
11460
- });
11471
+ xuAttributes: {},
11472
+ });
11461
11473
 
11462
11474
  if (div_typeP !== 'svg') {
11463
11475
  $div.appendTo($appendTo);
@@ -12497,7 +12509,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12497
12509
  const done = async function (ret = {}) {
12498
12510
  if (glb.new_xu_render) {
12499
12511
  if (ret.xu_render_in_process) {
12500
- debugger;
12501
12512
  const xu_ui_id = $div.attr('xu-ui-id');
12502
12513
  if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
12503
12514
  UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};