@xuda.io/runtime-bundle 1.0.348 → 1.0.350

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.
@@ -27232,10 +27232,10 @@ func.utils.get_last_datasource_no = function (SESSION_ID) {
27232
27232
  func.UI.utils.indicator = {};
27233
27233
  func.UI.utils.indicator.worker = {};
27234
27234
  func.UI.utils.indicator.worker.busy = function () {
27235
- $(".progressLoader").addClass("progress_busy");
27235
+ $('.progressLoader').addClass('progress_busy');
27236
27236
  };
27237
27237
  func.UI.utils.indicator.worker.normal = function () {
27238
- $(".progressLoader").removeClass("progress_busy");
27238
+ $('.progressLoader').removeClass('progress_busy');
27239
27239
  };
27240
27240
  func.UI.utils.indicator.server = {};
27241
27241
  func.UI.utils.indicator.server.busy = function () {
@@ -27247,10 +27247,10 @@ func.UI.utils.indicator.server.normal = function () {
27247
27247
 
27248
27248
  func.UI.utils.indicator.screen = {};
27249
27249
  func.UI.utils.indicator.screen.busy = function () {
27250
- $(".progressLoader").addClass("progress_busy2");
27250
+ $('.progressLoader').addClass('progress_busy2');
27251
27251
  };
27252
27252
  func.UI.utils.indicator.screen.normal = function () {
27253
- $(".progressLoader").removeClass("progress_busy2");
27253
+ $('.progressLoader').removeClass('progress_busy2');
27254
27254
  };
27255
27255
 
27256
27256
  func.UI.utils.save = function (SESSION_ID, stateP) {
@@ -27260,7 +27260,7 @@ func.UI.utils.save = function (SESSION_ID, stateP) {
27260
27260
 
27261
27261
  func.UI.utils.screen_blocker = function (onP, idP, dsP) {
27262
27262
  if (!idP) {
27263
- func.utils.debug_report("", "Worker", "Missing reference id", "E");
27263
+ func.utils.debug_report('', 'Worker', 'Missing reference id', 'E');
27264
27264
  return;
27265
27265
  }
27266
27266
  window.oncontextmenu = function () {
@@ -27273,33 +27273,20 @@ func.UI.utils.screen_blocker = function (onP, idP, dsP) {
27273
27273
  return;
27274
27274
  }
27275
27275
 
27276
- if (idP !== "Worker") {
27276
+ if (idP !== 'Worker') {
27277
27277
  SCREEN_BLOCKER_OBJ[idP] = Date.now();
27278
27278
  }
27279
27279
  };
27280
27280
 
27281
- func.UI.utils.get_node_elm = function (
27282
- SESSION_ID,
27283
- dsSessionP,
27284
- ui_idP,
27285
- $container,
27286
- is_app_panel,
27287
- ui_type,
27288
- functionP
27289
- ) {
27281
+ func.UI.utils.get_node_elm = function (SESSION_ID, dsSessionP, ui_idP, $container, is_app_panel, ui_type, functionP) {
27290
27282
  if (!$container) {
27291
- $container = $("body");
27283
+ $container = $('body');
27292
27284
  }
27293
- var $elm = func.UI.utils.find_in_element_data(
27294
- is_app_panel ? "xuPanelData" : "xuData",
27295
- $container,
27296
- "ui_id",
27297
- ui_idP
27298
- );
27285
+ var $elm = func.UI.utils.find_in_element_data(is_app_panel ? 'xuPanelData' : 'xuData', $container, 'ui_id', ui_idP);
27299
27286
  const _session = SESSION_OBJ[SESSION_ID];
27300
27287
  var _ds = _session.DS_GLB[dsSessionP];
27301
27288
 
27302
- if (_ds.tree_obj.renderType === "form") {
27289
+ if (_ds.tree_obj.renderType === 'form') {
27303
27290
  return $elm;
27304
27291
  }
27305
27292
  var $grid_elm;
@@ -27313,47 +27300,17 @@ func.UI.utils.get_node_elm = function (
27313
27300
 
27314
27301
  return $elm;
27315
27302
  };
27316
- func.UI.utils.get_nodeId = function (
27317
- SESSION_ID,
27318
- dsSessionP,
27319
- ui_idP,
27320
- $container,
27321
- is_app_panel
27322
- ) {
27323
- var $elm = func.UI.utils.get_node_elm(
27324
- SESSION_ID,
27325
- dsSessionP,
27326
- ui_idP,
27327
- $container,
27328
- is_app_panel,
27329
- null,
27330
- null
27331
- );
27303
+ func.UI.utils.get_nodeId = function (SESSION_ID, dsSessionP, ui_idP, $container, is_app_panel) {
27304
+ var $elm = func.UI.utils.get_node_elm(SESSION_ID, dsSessionP, ui_idP, $container, is_app_panel, null, null);
27332
27305
 
27333
27306
  if (is_app_panel) {
27334
27307
  return $elm.data().xuData.panel_info.prop.id;
27335
27308
  } else {
27336
- return $elm.attr("nodeId");
27309
+ return $elm.attr('nodeId');
27337
27310
  }
27338
27311
  };
27339
- func.UI.utils.get_element_info = function (
27340
- SESSION_ID,
27341
- dsSessionP,
27342
- ui_idP,
27343
- $container,
27344
- is_app_panel,
27345
- ui_type,
27346
- functionP
27347
- ) {
27348
- var $elm = func.UI.utils.get_node_elm(
27349
- SESSION_ID,
27350
- dsSessionP,
27351
- ui_idP,
27352
- $container,
27353
- is_app_panel,
27354
- ui_type,
27355
- functionP
27356
- );
27312
+ func.UI.utils.get_element_info = function (SESSION_ID, dsSessionP, ui_idP, $container, is_app_panel, ui_type, functionP) {
27313
+ var $elm = func.UI.utils.get_node_elm(SESSION_ID, dsSessionP, ui_idP, $container, is_app_panel, ui_type, functionP);
27357
27314
  var ret = {};
27358
27315
  if ($elm?.length) {
27359
27316
  //length added 20210209
@@ -27371,40 +27328,14 @@ func.UI.utils.get_element_info = function (
27371
27328
  ret.$elm = $elm;
27372
27329
  return ret;
27373
27330
  };
27374
- func.UI.utils.get_ui_id_count = function (
27375
- SESSION_ID,
27376
- dsSessionP,
27377
- ui_idP,
27378
- $container
27379
- ) {
27380
- return func.UI.utils.get_node_elm(
27381
- SESSION_ID,
27382
- dsSessionP,
27383
- ui_idP,
27384
- $container,
27385
- null,
27386
- null
27387
- ).length;
27331
+ func.UI.utils.get_ui_id_count = function (SESSION_ID, dsSessionP, ui_idP, $container) {
27332
+ return func.UI.utils.get_node_elm(SESSION_ID, dsSessionP, ui_idP, $container, null, null).length;
27388
27333
  };
27389
- func.UI.utils.get_ui_info_tree_scope = function (
27390
- SESSION_ID,
27391
- dsP,
27392
- ui_id,
27393
- is_app_panel,
27394
- ui_type,
27395
- $container,
27396
- functionP
27397
- ) {
27334
+ func.UI.utils.get_ui_info_tree_scope = function (SESSION_ID, dsP, ui_id, is_app_panel, ui_type, $container, functionP) {
27398
27335
  var drill_parent = function () {
27399
27336
  if (SESSION_OBJ[SESSION_ID].DS_GLB[dsP].parentDataSourceNo) {
27400
- return func.UI.utils.get_ui_info_tree_scope(
27401
- SESSION_ID,
27402
- SESSION_OBJ[SESSION_ID].DS_GLB[dsP].parentDataSourceNo,
27403
- ui_id,
27404
- is_app_panel,
27405
- ui_type
27406
- );
27407
- } else if (ui_type === "xu-app-page") {
27337
+ return func.UI.utils.get_ui_info_tree_scope(SESSION_ID, SESSION_OBJ[SESSION_ID].DS_GLB[dsP].parentDataSourceNo, ui_id, is_app_panel, ui_type);
27338
+ } else if (ui_type === 'xu-app-page') {
27408
27339
  if (elm_info.$elm.length) {
27409
27340
  return {
27410
27341
  ds: dsP,
@@ -27416,15 +27347,7 @@ func.UI.utils.get_ui_info_tree_scope = function (
27416
27347
  };
27417
27348
  if (!SESSION_OBJ[SESSION_ID].DS_GLB[dsP]) return;
27418
27349
 
27419
- var elm_info = func.UI.utils.get_element_info(
27420
- SESSION_ID,
27421
- dsP,
27422
- ui_id,
27423
- $container,
27424
- is_app_panel,
27425
- ui_type,
27426
- functionP
27427
- );
27350
+ var elm_info = func.UI.utils.get_element_info(SESSION_ID, dsP, ui_id, $container, is_app_panel, ui_type, functionP);
27428
27351
  var id = elm_info.nodeId;
27429
27352
 
27430
27353
  if (!id) {
@@ -27432,9 +27355,7 @@ func.UI.utils.get_ui_info_tree_scope = function (
27432
27355
  } else {
27433
27356
  if (is_app_panel) {
27434
27357
  return {
27435
- ds: func.UI.utils
27436
- .get_node_elm(SESSION_ID, dsP, ui_id, $container, is_app_panel)
27437
- .data().xuData.paramsP.dsSessionP,
27358
+ ds: func.UI.utils.get_node_elm(SESSION_ID, dsP, ui_id, $container, is_app_panel).data().xuData.paramsP.dsSessionP,
27438
27359
  id: id,
27439
27360
  $elm: elm_info.$elm,
27440
27361
  };
@@ -27459,43 +27380,19 @@ func.UI.utils.clean_node_busy = function (node) {
27459
27380
  return node;
27460
27381
  };
27461
27382
 
27462
- func.UI.utils.get_ui_info_tree_scope_sync = function (
27463
- SESSION_ID,
27464
- dsP,
27465
- ui_id,
27466
- ui_type,
27467
- callback,
27468
- $container,
27469
- functionP
27470
- ) {
27383
+ func.UI.utils.get_ui_info_tree_scope_sync = function (SESSION_ID, dsP, ui_id, ui_type, callback, $container, functionP) {
27471
27384
  var ret;
27472
27385
  var is_app_panel = false;
27473
- if (ui_type === "xu-panel") {
27386
+ if (ui_type === 'xu-panel') {
27474
27387
  is_app_panel = true;
27475
27388
  }
27476
27389
 
27477
- ret = func.UI.utils.get_ui_info_tree_scope(
27478
- SESSION_ID,
27479
- dsP,
27480
- ui_id,
27481
- is_app_panel,
27482
- ui_type,
27483
- $container,
27484
- functionP
27485
- );
27390
+ ret = func.UI.utils.get_ui_info_tree_scope(SESSION_ID, dsP, ui_id, is_app_panel, ui_type, $container, functionP);
27486
27391
 
27487
27392
  if (!ret) {
27488
27393
  var attempts = 0;
27489
27394
  const run = function () {
27490
- ret = func.UI.utils.get_ui_info_tree_scope(
27491
- SESSION_ID,
27492
- dsP,
27493
- ui_id,
27494
- is_app_panel,
27495
- ui_type,
27496
- $container,
27497
- functionP
27498
- );
27395
+ ret = func.UI.utils.get_ui_info_tree_scope(SESSION_ID, dsP, ui_id, is_app_panel, ui_type, $container, functionP);
27499
27396
  if (ret || attempts > 10) {
27500
27397
  callback(ret);
27501
27398
  } else {
@@ -27513,22 +27410,19 @@ func.UI.utils.get_ui_info_tree_scope_sync = function (
27513
27410
  };
27514
27411
 
27515
27412
  func.UI.utils.live_preview_element_inspect_on = function (SESSION_ID, service) {
27516
- $.each($("[xu-ui-id]"), function (key, val) {
27517
- $(val).on("mouseenter.live_preview_element_inspector", function () {
27518
- $("body")
27519
- .find(".preview_mark")
27520
- .removeClass("preview_mark")
27521
- .off("click.live_preview_element_inspector");
27522
- $(this).addClass("preview_mark");
27523
- $(this).on("click.live_preview_element_inspector", function (e) {
27413
+ $.each($('[xu-ui-id]'), function (key, val) {
27414
+ $(val).on('mouseenter.live_preview_element_inspector', function () {
27415
+ $('body').find('.preview_mark').removeClass('preview_mark').off('click.live_preview_element_inspector');
27416
+ $(this).addClass('preview_mark');
27417
+ $(this).on('click.live_preview_element_inspector', function (e) {
27524
27418
  const _session = SESSION_OBJ[SESSION_ID];
27525
27419
  console.log($(this).data());
27526
27420
  const data = $(this).data();
27527
27421
  const obj = {
27528
- service: service + "_result",
27422
+ service: service + '_result',
27529
27423
  id: STUDIO_WEBSOCKET_CONNECTION_ID,
27530
27424
  uid: _session.USR_OBJ._id,
27531
- source: "runtime",
27425
+ source: 'runtime',
27532
27426
  app_id: _session.app_id,
27533
27427
  gtp_token: _session.gtp_token,
27534
27428
  session_id: SESSION_ID,
@@ -27536,16 +27430,16 @@ func.UI.utils.live_preview_element_inspect_on = function (SESSION_ID, service) {
27536
27430
  };
27537
27431
 
27538
27432
  switch (service) {
27539
- case "live_preview_element_reference":
27433
+ case 'live_preview_element_reference':
27540
27434
  obj.data = { prog_id: data.xuData.prog_id, node: data.xuData.node };
27541
27435
  break;
27542
- case "live_preview_element_info":
27436
+ case 'live_preview_element_info':
27543
27437
  obj.data = {
27544
27438
  element_info: data.debug_info,
27545
27439
  datasource: _session.DS_GLB[data.paramsP.dsSessionP],
27546
27440
  };
27547
27441
  break;
27548
- case "live_preview_element_dnd":
27442
+ case 'live_preview_element_dnd':
27549
27443
  // code block
27550
27444
  break;
27551
27445
  default:
@@ -27557,49 +27451,37 @@ func.UI.utils.live_preview_element_inspect_on = function (SESSION_ID, service) {
27557
27451
 
27558
27452
  func.UI.utils.live_preview_element_inspect_off();
27559
27453
 
27560
- if (typeof LIVE_PREVIEW_APP_ACTIVE !== "undefined") {
27561
- $(`#live_preview_element_reference_btn`).css("color", "unset");
27562
- $(`#live_preview_element_info_btn`).css("color", "unset");
27454
+ if (typeof LIVE_PREVIEW_APP_ACTIVE !== 'undefined') {
27455
+ $(`#live_preview_element_reference_btn`).css('color', 'unset');
27456
+ $(`#live_preview_element_info_btn`).css('color', 'unset');
27563
27457
  }
27564
27458
  });
27565
27459
  });
27566
27460
 
27567
- $(val).on("mouseleave.live_preview_element_inspector", function () {
27568
- $(this).removeClass("preview_mark");
27569
- $(this).off("click.live_preview_element_inspector");
27461
+ $(val).on('mouseleave.live_preview_element_inspector', function () {
27462
+ $(this).removeClass('preview_mark');
27463
+ $(this).off('click.live_preview_element_inspector');
27570
27464
  });
27571
27465
  });
27572
27466
  };
27573
27467
 
27574
27468
  func.UI.utils.live_preview_element_inspect_off = function () {
27575
- $.each($("[xu-ui-id]"), function (key, val) {
27576
- $(val).off(
27577
- "mouseenter.live_preview_element_inspector mouseleave.live_preview_element_inspector"
27578
- );
27469
+ $.each($('[xu-ui-id]'), function (key, val) {
27470
+ $(val).off('mouseenter.live_preview_element_inspector mouseleave.live_preview_element_inspector');
27579
27471
  });
27580
- $("body")
27581
- .find(".preview_mark")
27582
- .removeClass("preview_mark")
27583
- .off("click.live_preview_element_inspector");
27472
+ $('body').find('.preview_mark').removeClass('preview_mark').off('click.live_preview_element_inspector');
27584
27473
  };
27585
27474
 
27586
27475
  func.UI.utils.live_preview_show_selected_element = function (nodeid) {
27587
- $("body").find(".preview_mark").removeClass("preview_mark");
27588
- $(`[nodeid="${nodeid}"]`).addClass("preview_mark");
27476
+ $('body').find('.preview_mark').removeClass('preview_mark');
27477
+ $(`[nodeid="${nodeid}"]`).addClass('preview_mark');
27589
27478
  };
27590
27479
 
27591
27480
  func.UI.utils.get_url_attribute = function (SESSION_ID, key) {
27592
27481
  var ret = glb.URL_PARAMS.get(key);
27593
27482
 
27594
27483
  const _session = SESSION_OBJ[SESSION_ID];
27595
- return (
27596
- glb.URL_PARAMS.get(key) ||
27597
- $(_session.root_element).attr(key) ||
27598
- _session.opt?.params?.[key] ||
27599
- _session.opt[key] ||
27600
- $.cookie(key) ||
27601
- window.localStorage.getItem(key)
27602
- );
27484
+ return glb.URL_PARAMS.get(key) || $(_session.root_element).attr(key) || _session.opt?.params?.[key] || _session.opt[key] || $.cookie(key) || window.localStorage.getItem(key);
27603
27485
  };
27604
27486
 
27605
27487
  func.UI.utils.get_root_element_attributes = function (SESSION_ID) {
@@ -27618,21 +27500,12 @@ func.UI.utils.get_root_element_attributes = function (SESSION_ID) {
27618
27500
  return ret;
27619
27501
  };
27620
27502
 
27621
- func.UI.utils.prompt_confirm_window = async function (
27622
- SESSION_ID,
27623
- messageP,
27624
- picP,
27625
- confirmYesFuncP,
27626
- confirmNoFuncP,
27627
- confirmCancelFuncP,
27628
- title,
27629
- colorP
27630
- ) {
27503
+ func.UI.utils.prompt_confirm_window = async function (SESSION_ID, messageP, picP, confirmYesFuncP, confirmNoFuncP, confirmCancelFuncP, title, colorP) {
27631
27504
  if (confirmNoFuncP) {
27632
27505
  buttons.push({
27633
- text: "Disagree",
27634
- role: "no",
27635
- cssClass: "secondary",
27506
+ text: 'Disagree',
27507
+ role: 'no',
27508
+ cssClass: 'secondary',
27636
27509
  handler: () => {
27637
27510
  confirmNoFuncP();
27638
27511
  },
@@ -27640,9 +27513,9 @@ func.UI.utils.prompt_confirm_window = async function (
27640
27513
  }
27641
27514
  if (confirmYesFuncP) {
27642
27515
  buttons.push({
27643
- text: "Agree",
27644
- role: "yes",
27645
- cssClass: "secondary",
27516
+ text: 'Agree',
27517
+ role: 'yes',
27518
+ cssClass: 'secondary',
27646
27519
  handler: () => {
27647
27520
  confirmYesFuncP();
27648
27521
  },
@@ -27651,9 +27524,9 @@ func.UI.utils.prompt_confirm_window = async function (
27651
27524
 
27652
27525
  if (confirmCancelFuncP) {
27653
27526
  buttons.push({
27654
- text: "Dismiss",
27655
- role: "cancel",
27656
- cssClass: "secondary",
27527
+ text: 'Dismiss',
27528
+ role: 'cancel',
27529
+ cssClass: 'secondary',
27657
27530
  handler: () => {
27658
27531
  confirmCancelFuncP();
27659
27532
  },
@@ -27668,22 +27541,14 @@ func.UI.utils.alert = function (msg) {
27668
27541
  };
27669
27542
 
27670
27543
  func.UI.utils.progressScreen = {};
27671
- func.UI.utils.progressScreen.show = function (
27672
- SESSION_ID,
27673
- textP,
27674
- show_bytesP,
27675
- error,
27676
- progress_off,
27677
- logo_off
27678
- ) {
27544
+ func.UI.utils.progressScreen.show = function (SESSION_ID, textP, show_bytesP, error, progress_off, logo_off) {
27679
27545
  if (glb.IS_WORKER) {
27680
27546
  return;
27681
27547
  }
27682
27548
  const app_obj = APP_OBJ?.[SESSION_OBJ?.[SESSION_ID]?.app_id];
27683
27549
 
27684
- var background_color = "";
27685
- var icon =
27686
- app_obj?._conf?.logo_url || "https://xuda.io/dist/images/xuda_logo.png";
27550
+ var background_color = '';
27551
+ var icon = app_obj?._conf?.logo_url || 'https://xuda.io/dist/images/xuda_logo.png';
27687
27552
  if (app_obj?.app_pic) {
27688
27553
  icon = app_obj.app_pic;
27689
27554
  }
@@ -27701,14 +27566,14 @@ func.UI.utils.progressScreen.show = function (
27701
27566
  }
27702
27567
 
27703
27568
  IS_PROGRESS_SCREEN_OPEN = true;
27704
- var $progressScreen = $("#progressScreen2").empty();
27705
- $(".loader").hide();
27706
- $progressScreen = $("#progressScreen2").css({});
27569
+ var $progressScreen = $('#progressScreen2').empty();
27570
+ $('.loader').hide();
27571
+ $progressScreen = $('#progressScreen2').css({});
27707
27572
 
27708
27573
  if (background_color) {
27709
27574
  $progressScreen.css({
27710
27575
  color: func.common.getContrast_color(background_color),
27711
- "background-color": background_color,
27576
+ 'background-color': background_color,
27712
27577
  });
27713
27578
  }
27714
27579
 
@@ -27729,26 +27594,17 @@ func.UI.utils.progressScreen.show = function (
27729
27594
  // );
27730
27595
  // });
27731
27596
 
27732
- $("#progressScreen2_text").show(500, function () {
27597
+ $('#progressScreen2_text').show(500, function () {
27733
27598
  if (!logo_off) {
27734
27599
  $(this).prepend(`<img class='progressScreen_logo' src='${icon}'>`);
27735
27600
  }
27736
- $(this).append(
27737
- error
27738
- ? error_msg
27739
- : typeof textP === "object"
27740
- ? textP
27741
- : `<p>${textP}</p>`
27742
- );
27601
+ $(this).append(error ? error_msg : typeof textP === 'object' ? textP : `<p>${textP}</p>`);
27743
27602
  });
27744
27603
  }
27745
27604
  }, 500);
27746
27605
 
27747
- $("#progressScreen2").show();
27748
- $("<div>")
27749
- .attr("id", "progressScreen2_text")
27750
- .hide()
27751
- .appendTo($progressScreen);
27606
+ $('#progressScreen2').show();
27607
+ $('<div>').attr('id', 'progressScreen2_text').hide().appendTo($progressScreen);
27752
27608
  // .hide()
27753
27609
  // .fadeIn("slow"); //.append(textP)
27754
27610
  };
@@ -27759,8 +27615,8 @@ func.UI.utils.progressScreen.hide = function () {
27759
27615
  IS_PROGRESS_SCREEN_OPEN = false;
27760
27616
  // window.clearInterval(PROGRESS_INTERVAL);
27761
27617
  // setTimeout(function () {
27762
- $("#progressScreen2").hide(); //fadeOut('fast');
27763
- $("#progressScreen2_text").empty(); //.fadeOut('fast').empty();
27618
+ $('#progressScreen2').hide(); //fadeOut('fast');
27619
+ $('#progressScreen2_text').empty(); //.fadeOut('fast').empty();
27764
27620
  // $("#progressScreen2").css({
27765
27621
  // height: "0px",
27766
27622
  // top: "-100px",
@@ -27769,8 +27625,8 @@ func.UI.utils.progressScreen.hide = function () {
27769
27625
  };
27770
27626
 
27771
27627
  func.UI.utils.find_in_element_data = function (folder, $elm, key, val) {
27772
- return $elm.find("*").filter(function () {
27773
- if (typeof val === "undefined") {
27628
+ return $elm.find('*').filter(function () {
27629
+ if (typeof val === 'undefined') {
27774
27630
  return $(this).data()?.[folder]?.[key];
27775
27631
  }
27776
27632
 
@@ -27779,53 +27635,50 @@ func.UI.utils.find_in_element_data = function (folder, $elm, key, val) {
27779
27635
  };
27780
27636
 
27781
27637
  func.UI.utils.init_ui_framework = async function (SESSION_ID, prog_id) {
27782
- if (typeof glb.SLIM_BUNDLE !== "undefined" || glb.SLIM_BUNDLE) return;
27638
+ if (typeof glb.SLIM_BUNDLE !== 'undefined' || glb.SLIM_BUNDLE) return;
27783
27639
 
27784
27640
  var _session = SESSION_OBJ[SESSION_ID];
27785
27641
  var tree_obj = await func.utils.TREE_OBJ.get(SESSION_ID, prog_id);
27786
27642
  if (_.isEmpty(tree_obj)) {
27787
- return console.error("Error: prog " + prog_id + " not found.");
27643
+ return console.error('Error: prog ' + prog_id + ' not found.');
27788
27644
  }
27789
27645
  const report_error = function (descP, warn) {
27790
27646
  func.utils.debug.log(SESSION_ID, prog_id, {
27791
- module: "component",
27792
- action: "Init",
27793
- source: "install ui framework",
27647
+ module: 'component',
27648
+ action: 'Init',
27649
+ source: 'install ui framework',
27794
27650
  prop: descP,
27795
27651
  details: descP,
27796
27652
  result: null,
27797
27653
  error: warn ? false : true,
27798
27654
  fields: null,
27799
- type: "component",
27655
+ type: 'component',
27800
27656
  prog_id: prog_id,
27801
27657
  });
27802
27658
  };
27803
27659
  const plugin_name = tree_obj.uiFramework;
27804
27660
 
27805
27661
  if (!plugin_name) {
27806
- return report_error("no frameworks plugin defined", true);
27662
+ return report_error('no frameworks plugin defined', true);
27807
27663
  }
27808
27664
 
27809
27665
  if (plugin_name === UI_FRAMEWORK_INSTALLED) return;
27810
27666
 
27811
- const _plugin =
27812
- APP_OBJ[_session.app_id]?.app_plugins_purchased?.[plugin_name];
27667
+ const _plugin = APP_OBJ[_session.app_id]?.app_plugins_purchased?.[plugin_name];
27813
27668
 
27814
27669
  if (!_plugin?.installed) {
27815
27670
  return report_error(`plugin ${plugin_name} not installed`);
27816
27671
  }
27817
27672
 
27818
27673
  const get_path = function (plugin_name, resource) {
27819
- var path = `https://${_session.domain}/plugins/${plugin_name}${resource ? "/" + resource : ""
27820
- }?app_id=${_session.app_id}`;
27674
+ var path = `https://${_session.domain}/plugins/${plugin_name}${resource ? '/' + resource : ''}?app_id=${_session.app_id}`;
27821
27675
 
27822
27676
  return path;
27823
27677
  };
27824
27678
 
27825
27679
  var _ui_framework_index;
27826
27680
  try {
27827
- const runtime_mjs = `${_plugin.manifest["runtime.mjs"].dist ? "dist/" : ""
27828
- }runtime.mjs`;
27681
+ const runtime_mjs = `${_plugin.manifest['runtime.mjs'].dist ? 'dist/' : ''}runtime.mjs`;
27829
27682
 
27830
27683
  _ui_framework_index = await import(get_path(plugin_name, runtime_mjs));
27831
27684
  } catch (error) {
@@ -27848,31 +27701,23 @@ func.UI.utils.init_ui_framework = async function (SESSION_ID, prog_id) {
27848
27701
  const ui_framework_core = new _ui_framework_index.core();
27849
27702
  if (ui_framework_core.init) {
27850
27703
  try {
27851
- const setup_mjs = `${_plugin.manifest["index.mjs"].dist ? "dist/" : ""
27852
- }index.mjs`;
27853
- _ui_framework_dashboard_setup = await import(
27854
- get_path(plugin_name, setup_mjs)
27855
- );
27704
+ const setup_mjs = `${_plugin.manifest['index.mjs'].dist ? 'dist/' : ''}index.mjs`;
27705
+ _ui_framework_dashboard_setup = await import(get_path(plugin_name, setup_mjs));
27856
27706
  if (_ui_framework_dashboard_setup) {
27857
- _ui_framework_dashboard_setup_data_ret =
27858
- await func.utils.get_plugin_setup(SESSION_ID, plugin_name);
27707
+ _ui_framework_dashboard_setup_data_ret = await func.utils.get_plugin_setup(SESSION_ID, plugin_name);
27859
27708
  }
27860
- } catch (error) { }
27709
+ } catch (error) {}
27861
27710
  }
27862
27711
 
27863
27712
  if (plugin_name !== UI_FRAMEWORK_INSTALLED) {
27864
27713
  UI_FRAMEWORK_INSTALLED = plugin_name;
27865
- const _plugin_INSTALLED =
27866
- APP_OBJ[_session.app_id]?.app_plugins_purchased?.[UI_FRAMEWORK_INSTALLED];
27714
+ const _plugin_INSTALLED = APP_OBJ[_session.app_id]?.app_plugins_purchased?.[UI_FRAMEWORK_INSTALLED];
27867
27715
  UI_FRAMEWORK_PLUGIN = _ui_framework_index;
27868
27716
  if (UI_FRAMEWORK_INSTALLED) {
27869
27717
  var _current_ui_framework_runtime;
27870
27718
  try {
27871
- const _runtime_mjs = `${_plugin_INSTALLED.manifest["runtime.mjs"].dist ? "dist/" : ""
27872
- }runtime.mjs`;
27873
- _current_ui_framework_runtime = await import(
27874
- get_path(UI_FRAMEWORK_INSTALLED, _runtime_mjs)
27875
- );
27719
+ const _runtime_mjs = `${_plugin_INSTALLED.manifest['runtime.mjs'].dist ? 'dist/' : ''}runtime.mjs`;
27720
+ _current_ui_framework_runtime = await import(get_path(UI_FRAMEWORK_INSTALLED, _runtime_mjs));
27876
27721
  } catch (error) {
27877
27722
  return report_error(`plugin ${UI_FRAMEWORK_INSTALLED} not found`);
27878
27723
  }
@@ -27896,19 +27741,19 @@ func.UI.utils.init_ui_framework = async function (SESSION_ID, prog_id) {
27896
27741
 
27897
27742
  var url = val.url;
27898
27743
  switch (val.type) {
27899
- case "module":
27744
+ case 'module':
27900
27745
  try {
27901
27746
  // ret = await load_module(url);
27902
- ret = await func.utils.load_js_on_demand(url, "module");
27747
+ ret = await func.utils.load_js_on_demand(url, 'module');
27903
27748
  } catch (error) {
27904
27749
  debugger;
27905
27750
  }
27906
27751
 
27907
27752
  break;
27908
- case "css":
27753
+ case 'css':
27909
27754
  ret = func.utils.load_css_on_demand(url);
27910
27755
  break;
27911
- case "js":
27756
+ case 'js':
27912
27757
  ret = await func.utils.load_js_on_demand(url);
27913
27758
  break;
27914
27759
 
@@ -27921,25 +27766,18 @@ func.UI.utils.init_ui_framework = async function (SESSION_ID, prog_id) {
27921
27766
  }
27922
27767
  }
27923
27768
  if (ui_framework_core.init) {
27924
- init_id = await ui_framework_core.init(
27925
- _ui_framework_dashboard_setup_data_ret?.code > -1 &&
27926
- _ui_framework_dashboard_setup_data_ret.data
27927
- );
27769
+ init_id = await ui_framework_core.init(_ui_framework_dashboard_setup_data_ret?.code > -1 && _ui_framework_dashboard_setup_data_ret.data);
27928
27770
  UI_FRAMEWORK_PLUGIN.init_id = init_id;
27929
27771
  }
27930
27772
  }
27931
27773
  };
27932
27774
  func.UI.utils.get_panels_from_dom = function (SESSION_ID, ignore_disableAutoRefresh) {
27933
- const $elm = func.UI.utils.find_in_element_data(
27934
- "xuPanelData",
27935
- $(SESSION_OBJ[SESSION_ID].root_element),
27936
- "parent_element_ui_id"
27937
- );
27775
+ const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
27938
27776
  var panels_obj = {};
27939
27777
 
27940
27778
  // set panels_obj
27941
27779
  for (const [elem_key, elem_val] of Object.entries($elm)) {
27942
- if (elem_key === "length") break;
27780
+ if (elem_key === 'length') break;
27943
27781
  var $div = $(elem_val);
27944
27782
  let xuData = $div.data().xuData;
27945
27783
 
@@ -27962,11 +27800,11 @@ func.UI.utils.get_panels_from_dom = function (SESSION_ID, ignore_disableAutoRefr
27962
27800
  ids: [],
27963
27801
  };
27964
27802
  }
27965
- panels_obj[parent_element_ui_id].ids.push($div.attr("xu-ui-id"));
27803
+ panels_obj[parent_element_ui_id].ids.push($div.attr('xu-ui-id'));
27966
27804
  }
27967
27805
 
27968
- return panels_obj
27969
- }
27806
+ return panels_obj;
27807
+ };
27970
27808
 
27971
27809
  func.UI.worker = {};
27972
27810
  func.UI.worker.ID = null;
@@ -28042,11 +27880,7 @@ func.UI.worker.init = async function (SESSION_ID) {
28042
27880
  let from_job_num_to_run = last_job_in_queue;
28043
27881
  last_job_in_queue = UI_WORKER_OBJ.num - from_job_num_to_run;
28044
27882
 
28045
- if (
28046
- typeof UI_WORKER_OBJ.stat === "undefined" ||
28047
- UI_WORKER_OBJ.stat === "undefined" ||
28048
- UI_WORKER_OBJ.stat === null
28049
- ) {
27883
+ if (typeof UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === null) {
28050
27884
  // idle
28051
27885
  this.attempt = 0;
28052
27886
  if (UI_WORKER_OBJ.jobs.length) {
@@ -28090,16 +27924,7 @@ func.UI.worker.init = async function (SESSION_ID) {
28090
27924
  func.UI.garbage_collector();
28091
27925
  }, 10000);
28092
27926
  };
28093
- func.UI.worker.add_to_queue = async function (
28094
- SESSION_ID,
28095
- source,
28096
- functionP,
28097
- paramsP,
28098
- calling_job,
28099
- elementP,
28100
- dsSession,
28101
- calling_trigger_prop
28102
- ) {
27927
+ func.UI.worker.add_to_queue = async function (SESSION_ID, source, functionP, paramsP, calling_job, elementP, dsSession, calling_trigger_prop) {
28103
27928
  // try {
28104
27929
  // let params = _.cloneDeep(paramsP);
28105
27930
 
@@ -28144,15 +27969,8 @@ func.UI.worker.add_to_queue = async function (
28144
27969
  // obj.parentDataSourceNo = _ds.parentDataSourceNo;
28145
27970
  // obj.nodeId = _ds.nodeId;
28146
27971
  // }
28147
- if (functionP === "execute_xu_all_attributes") {
28148
- const queue_key =
28149
- source +
28150
- "_" +
28151
- functionP +
28152
- "_" +
28153
- (elementP?.attr("xu-ui-id") || "") +
28154
- "_" +
28155
- (paramsP?.fields_arr?.toString() || "");
27972
+ if (functionP === 'execute_xu_all_attributes') {
27973
+ const queue_key = source + '_' + functionP + '_' + (elementP?.attr('xu-ui-id') || '') + '_' + (paramsP?.fields_arr?.toString() || '');
28156
27974
 
28157
27975
  obj.queue_key = queue_key;
28158
27976
 
@@ -28174,21 +27992,17 @@ func.UI.worker.add_to_queue = async function (
28174
27992
  if (calling_job) {
28175
27993
  var job_index = func.UI.worker.find_job_index(SESSION_ID, calling_job);
28176
27994
 
28177
- if (job_index === null || typeof job_index === "undefined") return;
27995
+ if (job_index === null || typeof job_index === 'undefined') return;
28178
27996
 
28179
27997
  try {
28180
27998
  if (!UI_WORKER_OBJ.jobs[job_index].splice_count) {
28181
27999
  UI_WORKER_OBJ.jobs[job_index].splice_count = 0;
28182
28000
  }
28183
28001
  UI_WORKER_OBJ.jobs[job_index].splice_count++;
28184
- UI_WORKER_OBJ.jobs.splice(
28185
- job_index + UI_WORKER_OBJ.jobs[job_index].splice_count,
28186
- 0,
28187
- obj
28188
- );
28002
+ UI_WORKER_OBJ.jobs.splice(job_index + UI_WORKER_OBJ.jobs[job_index].splice_count, 0, obj);
28189
28003
  // }
28190
28004
  } catch (e) {
28191
- console.error("bug");
28005
+ console.error('bug');
28192
28006
  // UI_WORKER_OBJ.jobs.splice(0, 0, obj);
28193
28007
  }
28194
28008
  } else {
@@ -28219,16 +28033,9 @@ func.UI.worker.delete_job = async function (SESSION_ID, jobNoP) {
28219
28033
  var dsSession = UI_WORKER_OBJ.jobs[job_index].dsSession;
28220
28034
  let ds_obj = _session?.DS_GLB[dsSession];
28221
28035
  if (ds_obj) {
28222
- delete SCREEN_BLOCKER_OBJ[
28223
- ds_obj.screenId +
28224
- (ds_obj.callingScreenId ? "_" + ds_obj.callingScreenId : "")
28225
- ];
28036
+ delete SCREEN_BLOCKER_OBJ[ds_obj.screenId + (ds_obj.callingScreenId ? '_' + ds_obj.callingScreenId : '')];
28226
28037
  }
28227
- if (
28228
- dsSession &&
28229
- ds_obj?.loops_limit &&
28230
- ds_obj?.loops_count < ds_obj?.loops_limit - 1
28231
- ) {
28038
+ if (dsSession && ds_obj?.loops_limit && ds_obj?.loops_count < ds_obj?.loops_limit - 1) {
28232
28039
  return;
28233
28040
  }
28234
28041
  UI_WORKER_OBJ.stat = null;
@@ -28237,7 +28044,7 @@ func.UI.worker.delete_job = async function (SESSION_ID, jobNoP) {
28237
28044
  };
28238
28045
  func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
28239
28046
  var job_index = func.UI.worker.find_job_index(SESSION_ID, queue_obj.job_num);
28240
- if (UI_WORKER_OBJ.jobs?.[job_index]?.stat === "busy") {
28047
+ if (UI_WORKER_OBJ.jobs?.[job_index]?.stat === 'busy') {
28241
28048
  if (queue_obj.jobNoP) UI_WORKER_OBJ.stat = job_index;
28242
28049
  return;
28243
28050
  }
@@ -28248,7 +28055,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
28248
28055
 
28249
28056
  if (queue_obj.jobNoP) UI_WORKER_OBJ.stat = job_index;
28250
28057
  if (UI_WORKER_OBJ.jobs[job_index]) {
28251
- UI_WORKER_OBJ.jobs[job_index].stat = "busy";
28058
+ UI_WORKER_OBJ.jobs[job_index].stat = 'busy';
28252
28059
  }
28253
28060
 
28254
28061
  const fx = {
@@ -28257,7 +28064,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
28257
28064
  _ds.currentRecordId = queue_obj.paramsP.currentRecordId;
28258
28065
 
28259
28066
  var datasource_changes = {
28260
- [_ds.dsSession]: { [_ds.currentRecordId]: "set" },
28067
+ [_ds.dsSession]: { [_ds.currentRecordId]: 'set' },
28261
28068
  };
28262
28069
  await func.datasource.update(SESSION_ID, datasource_changes);
28263
28070
 
@@ -28277,26 +28084,12 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
28277
28084
  execute_xu_render_attributes: async function () {
28278
28085
  const _data = queue_obj.paramsP.elem_val.$elm.data();
28279
28086
  if (_data?.xuData?.paramsP) {
28280
- await func.UI.screen.execute_xu_functions(
28281
- SESSION_ID,
28282
- null,
28283
- _data.xuData.$root_container,
28284
- _data.xuData.node,
28285
- _data.xuData.$container,
28286
- _data.xuData.paramsP,
28287
- {},
28288
- queue_obj.jobNoP,
28289
- null,
28290
- null,
28291
- "xu-render",
28292
- queue_obj.paramsP.elem_val.$elm,
28293
- {
28294
- key: "xu-render",
28295
- value: queue_obj.paramsP.attr_value, //? "Y" : "N",
28296
- fields_arr: queue_obj.paramsP.fields_arr,
28297
- jobNoP: queue_obj.jobNoP,
28298
- }
28299
- );
28087
+ await func.UI.screen.execute_xu_functions(SESSION_ID, null, _data.xuData.$root_container, _data.xuData.node, _data.xuData.$container, _data.xuData.paramsP, {}, queue_obj.jobNoP, null, null, 'xu-render', queue_obj.paramsP.elem_val.$elm, {
28088
+ key: 'xu-render',
28089
+ value: queue_obj.paramsP.attr_value, //? "Y" : "N",
28090
+ fields_arr: queue_obj.paramsP.fields_arr,
28091
+ jobNoP: queue_obj.jobNoP,
28092
+ });
28300
28093
  }
28301
28094
 
28302
28095
  return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
@@ -28306,49 +28099,39 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
28306
28099
  return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
28307
28100
  };
28308
28101
 
28309
- var $elm = func.UI.utils.find_in_element_data(
28310
- "xuData",
28311
- $(SESSION_OBJ[SESSION_ID].root_element),
28312
- "xu_id",
28313
- queue_obj.paramsP.elem_key
28314
- );
28102
+ var $elm = func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', queue_obj.paramsP.elem_key);
28315
28103
 
28316
28104
  if (!$elm.length) {
28317
28105
  return done();
28318
28106
  }
28319
- for await (const [key, attr] of Object.entries(
28320
- queue_obj.paramsP.elem_val.attributes
28321
- )) {
28322
- if (attr === "xu-exp:xu-render" || attr === "xu-exp:xu-for" || attr === "xu-for" || attr === "xu-exp:xu-bind") {
28107
+ for await (const [key, attr] of Object.entries(queue_obj.paramsP.elem_val.attributes)) {
28108
+ if (attr === 'xu-exp:xu-render' || attr === 'xu-exp:xu-for' || attr === 'xu-for' || attr === 'xu-exp:xu-bind') {
28323
28109
  continue;
28324
28110
  }
28325
28111
 
28326
28112
  var res = {
28327
28113
  result: queue_obj.paramsP.elem_val.$elm.data().xuAttributes[attr],
28328
28114
  };
28329
- if (attr !== "xu-class") {
28115
+ if (attr !== 'xu-class') {
28330
28116
  res = await func.expression.get(
28331
28117
  queue_obj.paramsP.SESSION_ID,
28332
28118
  queue_obj.paramsP.elem_val.$elm.data().xuAttributes[attr],
28333
28119
  queue_obj.paramsP.elem_val.$elm.data().xuData.paramsP.dsSessionP,
28334
- "UI Property EXP",
28120
+ 'UI Property EXP',
28335
28121
  queue_obj.paramsP.elem_val.$elm.data().xuData.recordid,
28336
28122
  null,
28337
28123
  null,
28338
28124
  null,
28339
28125
  null,
28340
28126
  null,
28341
- queue_obj.paramsP.elem_val.$elm.data().xuData.iterate_info
28127
+ queue_obj.paramsP.elem_val.$elm.data().xuData.iterate_info,
28342
28128
  );
28343
28129
  }
28344
28130
 
28345
- const attr_new = attr.split("xu-exp:")[1];
28131
+ const attr_new = attr.split('xu-exp:')[1];
28346
28132
  // REGULAR ATTRIBUTE
28347
- if (attr_new && attr_new.substr(0, 2) !== "xu") {
28348
- queue_obj.paramsP.elem_val.$elm.attr(
28349
- attr_new !== "viewBox" ? attr_new.toLowerCase() : attr_new,
28350
- res.result
28351
- );
28133
+ if (attr_new && attr_new.substr(0, 2) !== 'xu') {
28134
+ queue_obj.paramsP.elem_val.$elm.attr(attr_new !== 'viewBox' ? attr_new.toLowerCase() : attr_new, res.result);
28352
28135
  } else {
28353
28136
  try {
28354
28137
  // XU ATTRIBUTE
@@ -28356,24 +28139,10 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
28356
28139
  if (!_data || _.isEmpty(_data)) {
28357
28140
  continue;
28358
28141
  }
28359
- await func.UI.screen.execute_xu_functions(
28360
- SESSION_ID,
28361
- null,
28362
- _data.xuData.$root_container,
28363
- _data.xuData.node,
28364
- _data.xuData.$container,
28365
- _data.xuData.paramsP,
28366
- {},
28367
- queue_obj.jobNoP,
28368
- null,
28369
- null,
28370
- attr_new || attr,
28371
- queue_obj.paramsP.elem_val.$elm,
28372
- {
28373
- key: attr_new || attr,
28374
- value: res.result,
28375
- }
28376
- );
28142
+ await func.UI.screen.execute_xu_functions(SESSION_ID, null, _data.xuData.$root_container, _data.xuData.node, _data.xuData.$container, _data.xuData.paramsP, {}, queue_obj.jobNoP, null, null, attr_new || attr, queue_obj.paramsP.elem_val.$elm, {
28143
+ key: attr_new || attr,
28144
+ value: res.result,
28145
+ });
28377
28146
  } catch (error) {
28378
28147
  debugger;
28379
28148
  }
@@ -28390,7 +28159,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
28390
28159
  // queue_obj.paramsP.elem_key
28391
28160
  // );
28392
28161
 
28393
- var $elm = queue_obj?.paramsP?.elem_val?.$elm;// $(SESSION_OBJ[SESSION_ID].root_element).find(`[xu-ui-id=${queue_obj.paramsP.elem_key}]`)
28162
+ var $elm = queue_obj?.paramsP?.elem_val?.$elm; // $(SESSION_OBJ[SESSION_ID].root_element).find(`[xu-ui-id=${queue_obj.paramsP.elem_key}]`)
28394
28163
 
28395
28164
  if (!$elm?.length) {
28396
28165
  // return func.events.delete_job(SESSION_ID, queue_obj.jobNoP);
@@ -28410,7 +28179,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
28410
28179
  null,
28411
28180
  _data.xuData.parent_node,
28412
28181
  null,
28413
- _data.xuData.$root_container
28182
+ _data.xuData.$root_container,
28414
28183
  );
28415
28184
 
28416
28185
  return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
@@ -28431,10 +28200,7 @@ func.UI.worker.find_job_index = function (SESSION_ID, jobNoP) {
28431
28200
  return ret;
28432
28201
  };
28433
28202
 
28434
- func.UI.garbage_collector = function (
28435
- SESSION_ID = Object.keys(SESSION_OBJ)[0],
28436
- re_check
28437
- ) {
28203
+ func.UI.garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0], re_check) {
28438
28204
  // return;
28439
28205
  let _session = SESSION_OBJ[SESSION_ID];
28440
28206
 
@@ -28442,10 +28208,16 @@ func.UI.garbage_collector = function (
28442
28208
  if (_data_system?.SYS_GLOBAL_BOL_AJAX_BUSY) return;
28443
28209
  if (!_data_system?.SYS_GLOBAL_BOL_IDLE) return;
28444
28210
 
28211
+ for (const [key, val] of Object.entries(_data_system?.SYS_GLOBAL_OBJ_REFS || {})) {
28212
+ if (!val?.$el?.length) {
28213
+ delete _data_system._data_system[key];
28214
+ }
28215
+ }
28216
+
28445
28217
  let abort;
28446
28218
 
28447
28219
  for (const [dsP, _ds] of Object.entries(_session.DS_GLB)) {
28448
- if (_ds.stat === "busy") {
28220
+ if (_ds.stat === 'busy') {
28449
28221
  abort = true;
28450
28222
  break;
28451
28223
  }
@@ -28457,7 +28229,7 @@ func.UI.garbage_collector = function (
28457
28229
 
28458
28230
  let ds_pending_to_delete = [],
28459
28231
  ds_approve_to_delete = [];
28460
- const $elm = $("body").find("*");
28232
+ const $elm = $('body').find('*');
28461
28233
  for (const [dsP, _ds] of Object.entries(_session.DS_GLB)) {
28462
28234
  if (!_ds.screen_params) continue;
28463
28235
  let found;
@@ -28475,19 +28247,11 @@ func.UI.garbage_collector = function (
28475
28247
  }
28476
28248
  // console.log(ds_pending_to_delete);
28477
28249
 
28478
- const sortedKeys = Object.keys(_session.DS_GLB).sort((a, b) =>
28479
- b.localeCompare(a)
28480
- );
28250
+ const sortedKeys = Object.keys(_session.DS_GLB).sort((a, b) => b.localeCompare(a));
28481
28251
  sortedKeys.forEach((key) => {
28482
28252
  const val = _session.DS_GLB[key];
28483
- if (
28484
- !ds_pending_to_delete.includes(key) &&
28485
- typeof val.parentDataSourceNo !== "undefined" &&
28486
- ds_pending_to_delete.includes(val.parentDataSourceNo.toString())
28487
- ) {
28488
- ds_pending_to_delete = ds_pending_to_delete.filter(
28489
- (item) => item !== val.parentDataSourceNo.toString()
28490
- );
28253
+ if (!ds_pending_to_delete.includes(key) && typeof val.parentDataSourceNo !== 'undefined' && ds_pending_to_delete.includes(val.parentDataSourceNo.toString())) {
28254
+ ds_pending_to_delete = ds_pending_to_delete.filter((item) => item !== val.parentDataSourceNo.toString());
28491
28255
  }
28492
28256
  });
28493
28257
 
@@ -28496,7 +28260,6 @@ func.UI.garbage_collector = function (
28496
28260
  func.datasource.del(SESSION_ID, val);
28497
28261
  }
28498
28262
  };
28499
-
28500
28263
  func.datasource = {};
28501
28264
  func.datasource.create = async function (
28502
28265
  SESSION_ID,
@@ -32226,12 +31989,12 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
32226
31989
 
32227
31990
  const common_fx = {
32228
31991
  'xu-ref': async function ($elm, val) {
32229
- console.log('xu-ref', $elm, val);
31992
+ // console.log('xu-ref', $elm, val);
32230
31993
  const _session = SESSION_OBJ[SESSION_ID];
32231
31994
  let _ds_0 = _session.DS_GLB[0];
32232
- if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS']) {
32233
- _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
32234
- }
31995
+ // if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS']) {
31996
+ // _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
31997
+ // }
32235
31998
  // if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val]) {
32236
31999
  const _ds = _session.DS_GLB[paramsP.dsSessionP];
32237
32000
  _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val.value] = { $el: $elm, ds: _ds, data: _ds?.data_feed?.rows || {}, props: $elm?.data()?.xuData?.properties };