@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.
@@ -8043,10 +8043,10 @@ func.utils.get_last_datasource_no = function (SESSION_ID) {
8043
8043
  func.UI.utils.indicator = {};
8044
8044
  func.UI.utils.indicator.worker = {};
8045
8045
  func.UI.utils.indicator.worker.busy = function () {
8046
- $(".progressLoader").addClass("progress_busy");
8046
+ $('.progressLoader').addClass('progress_busy');
8047
8047
  };
8048
8048
  func.UI.utils.indicator.worker.normal = function () {
8049
- $(".progressLoader").removeClass("progress_busy");
8049
+ $('.progressLoader').removeClass('progress_busy');
8050
8050
  };
8051
8051
  func.UI.utils.indicator.server = {};
8052
8052
  func.UI.utils.indicator.server.busy = function () {
@@ -8058,10 +8058,10 @@ func.UI.utils.indicator.server.normal = function () {
8058
8058
 
8059
8059
  func.UI.utils.indicator.screen = {};
8060
8060
  func.UI.utils.indicator.screen.busy = function () {
8061
- $(".progressLoader").addClass("progress_busy2");
8061
+ $('.progressLoader').addClass('progress_busy2');
8062
8062
  };
8063
8063
  func.UI.utils.indicator.screen.normal = function () {
8064
- $(".progressLoader").removeClass("progress_busy2");
8064
+ $('.progressLoader').removeClass('progress_busy2');
8065
8065
  };
8066
8066
 
8067
8067
  func.UI.utils.save = function (SESSION_ID, stateP) {
@@ -8071,7 +8071,7 @@ func.UI.utils.save = function (SESSION_ID, stateP) {
8071
8071
 
8072
8072
  func.UI.utils.screen_blocker = function (onP, idP, dsP) {
8073
8073
  if (!idP) {
8074
- func.utils.debug_report("", "Worker", "Missing reference id", "E");
8074
+ func.utils.debug_report('', 'Worker', 'Missing reference id', 'E');
8075
8075
  return;
8076
8076
  }
8077
8077
  window.oncontextmenu = function () {
@@ -8084,33 +8084,20 @@ func.UI.utils.screen_blocker = function (onP, idP, dsP) {
8084
8084
  return;
8085
8085
  }
8086
8086
 
8087
- if (idP !== "Worker") {
8087
+ if (idP !== 'Worker') {
8088
8088
  SCREEN_BLOCKER_OBJ[idP] = Date.now();
8089
8089
  }
8090
8090
  };
8091
8091
 
8092
- func.UI.utils.get_node_elm = function (
8093
- SESSION_ID,
8094
- dsSessionP,
8095
- ui_idP,
8096
- $container,
8097
- is_app_panel,
8098
- ui_type,
8099
- functionP
8100
- ) {
8092
+ func.UI.utils.get_node_elm = function (SESSION_ID, dsSessionP, ui_idP, $container, is_app_panel, ui_type, functionP) {
8101
8093
  if (!$container) {
8102
- $container = $("body");
8094
+ $container = $('body');
8103
8095
  }
8104
- var $elm = func.UI.utils.find_in_element_data(
8105
- is_app_panel ? "xuPanelData" : "xuData",
8106
- $container,
8107
- "ui_id",
8108
- ui_idP
8109
- );
8096
+ var $elm = func.UI.utils.find_in_element_data(is_app_panel ? 'xuPanelData' : 'xuData', $container, 'ui_id', ui_idP);
8110
8097
  const _session = SESSION_OBJ[SESSION_ID];
8111
8098
  var _ds = _session.DS_GLB[dsSessionP];
8112
8099
 
8113
- if (_ds.tree_obj.renderType === "form") {
8100
+ if (_ds.tree_obj.renderType === 'form') {
8114
8101
  return $elm;
8115
8102
  }
8116
8103
  var $grid_elm;
@@ -8124,47 +8111,17 @@ func.UI.utils.get_node_elm = function (
8124
8111
 
8125
8112
  return $elm;
8126
8113
  };
8127
- func.UI.utils.get_nodeId = function (
8128
- SESSION_ID,
8129
- dsSessionP,
8130
- ui_idP,
8131
- $container,
8132
- is_app_panel
8133
- ) {
8134
- var $elm = func.UI.utils.get_node_elm(
8135
- SESSION_ID,
8136
- dsSessionP,
8137
- ui_idP,
8138
- $container,
8139
- is_app_panel,
8140
- null,
8141
- null
8142
- );
8114
+ func.UI.utils.get_nodeId = function (SESSION_ID, dsSessionP, ui_idP, $container, is_app_panel) {
8115
+ var $elm = func.UI.utils.get_node_elm(SESSION_ID, dsSessionP, ui_idP, $container, is_app_panel, null, null);
8143
8116
 
8144
8117
  if (is_app_panel) {
8145
8118
  return $elm.data().xuData.panel_info.prop.id;
8146
8119
  } else {
8147
- return $elm.attr("nodeId");
8120
+ return $elm.attr('nodeId');
8148
8121
  }
8149
8122
  };
8150
- func.UI.utils.get_element_info = function (
8151
- SESSION_ID,
8152
- dsSessionP,
8153
- ui_idP,
8154
- $container,
8155
- is_app_panel,
8156
- ui_type,
8157
- functionP
8158
- ) {
8159
- var $elm = func.UI.utils.get_node_elm(
8160
- SESSION_ID,
8161
- dsSessionP,
8162
- ui_idP,
8163
- $container,
8164
- is_app_panel,
8165
- ui_type,
8166
- functionP
8167
- );
8123
+ func.UI.utils.get_element_info = function (SESSION_ID, dsSessionP, ui_idP, $container, is_app_panel, ui_type, functionP) {
8124
+ var $elm = func.UI.utils.get_node_elm(SESSION_ID, dsSessionP, ui_idP, $container, is_app_panel, ui_type, functionP);
8168
8125
  var ret = {};
8169
8126
  if ($elm?.length) {
8170
8127
  //length added 20210209
@@ -8182,40 +8139,14 @@ func.UI.utils.get_element_info = function (
8182
8139
  ret.$elm = $elm;
8183
8140
  return ret;
8184
8141
  };
8185
- func.UI.utils.get_ui_id_count = function (
8186
- SESSION_ID,
8187
- dsSessionP,
8188
- ui_idP,
8189
- $container
8190
- ) {
8191
- return func.UI.utils.get_node_elm(
8192
- SESSION_ID,
8193
- dsSessionP,
8194
- ui_idP,
8195
- $container,
8196
- null,
8197
- null
8198
- ).length;
8142
+ func.UI.utils.get_ui_id_count = function (SESSION_ID, dsSessionP, ui_idP, $container) {
8143
+ return func.UI.utils.get_node_elm(SESSION_ID, dsSessionP, ui_idP, $container, null, null).length;
8199
8144
  };
8200
- func.UI.utils.get_ui_info_tree_scope = function (
8201
- SESSION_ID,
8202
- dsP,
8203
- ui_id,
8204
- is_app_panel,
8205
- ui_type,
8206
- $container,
8207
- functionP
8208
- ) {
8145
+ func.UI.utils.get_ui_info_tree_scope = function (SESSION_ID, dsP, ui_id, is_app_panel, ui_type, $container, functionP) {
8209
8146
  var drill_parent = function () {
8210
8147
  if (SESSION_OBJ[SESSION_ID].DS_GLB[dsP].parentDataSourceNo) {
8211
- return func.UI.utils.get_ui_info_tree_scope(
8212
- SESSION_ID,
8213
- SESSION_OBJ[SESSION_ID].DS_GLB[dsP].parentDataSourceNo,
8214
- ui_id,
8215
- is_app_panel,
8216
- ui_type
8217
- );
8218
- } else if (ui_type === "xu-app-page") {
8148
+ 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);
8149
+ } else if (ui_type === 'xu-app-page') {
8219
8150
  if (elm_info.$elm.length) {
8220
8151
  return {
8221
8152
  ds: dsP,
@@ -8227,15 +8158,7 @@ func.UI.utils.get_ui_info_tree_scope = function (
8227
8158
  };
8228
8159
  if (!SESSION_OBJ[SESSION_ID].DS_GLB[dsP]) return;
8229
8160
 
8230
- var elm_info = func.UI.utils.get_element_info(
8231
- SESSION_ID,
8232
- dsP,
8233
- ui_id,
8234
- $container,
8235
- is_app_panel,
8236
- ui_type,
8237
- functionP
8238
- );
8161
+ var elm_info = func.UI.utils.get_element_info(SESSION_ID, dsP, ui_id, $container, is_app_panel, ui_type, functionP);
8239
8162
  var id = elm_info.nodeId;
8240
8163
 
8241
8164
  if (!id) {
@@ -8243,9 +8166,7 @@ func.UI.utils.get_ui_info_tree_scope = function (
8243
8166
  } else {
8244
8167
  if (is_app_panel) {
8245
8168
  return {
8246
- ds: func.UI.utils
8247
- .get_node_elm(SESSION_ID, dsP, ui_id, $container, is_app_panel)
8248
- .data().xuData.paramsP.dsSessionP,
8169
+ ds: func.UI.utils.get_node_elm(SESSION_ID, dsP, ui_id, $container, is_app_panel).data().xuData.paramsP.dsSessionP,
8249
8170
  id: id,
8250
8171
  $elm: elm_info.$elm,
8251
8172
  };
@@ -8270,43 +8191,19 @@ func.UI.utils.clean_node_busy = function (node) {
8270
8191
  return node;
8271
8192
  };
8272
8193
 
8273
- func.UI.utils.get_ui_info_tree_scope_sync = function (
8274
- SESSION_ID,
8275
- dsP,
8276
- ui_id,
8277
- ui_type,
8278
- callback,
8279
- $container,
8280
- functionP
8281
- ) {
8194
+ func.UI.utils.get_ui_info_tree_scope_sync = function (SESSION_ID, dsP, ui_id, ui_type, callback, $container, functionP) {
8282
8195
  var ret;
8283
8196
  var is_app_panel = false;
8284
- if (ui_type === "xu-panel") {
8197
+ if (ui_type === 'xu-panel') {
8285
8198
  is_app_panel = true;
8286
8199
  }
8287
8200
 
8288
- ret = func.UI.utils.get_ui_info_tree_scope(
8289
- SESSION_ID,
8290
- dsP,
8291
- ui_id,
8292
- is_app_panel,
8293
- ui_type,
8294
- $container,
8295
- functionP
8296
- );
8201
+ ret = func.UI.utils.get_ui_info_tree_scope(SESSION_ID, dsP, ui_id, is_app_panel, ui_type, $container, functionP);
8297
8202
 
8298
8203
  if (!ret) {
8299
8204
  var attempts = 0;
8300
8205
  const run = function () {
8301
- ret = func.UI.utils.get_ui_info_tree_scope(
8302
- SESSION_ID,
8303
- dsP,
8304
- ui_id,
8305
- is_app_panel,
8306
- ui_type,
8307
- $container,
8308
- functionP
8309
- );
8206
+ ret = func.UI.utils.get_ui_info_tree_scope(SESSION_ID, dsP, ui_id, is_app_panel, ui_type, $container, functionP);
8310
8207
  if (ret || attempts > 10) {
8311
8208
  callback(ret);
8312
8209
  } else {
@@ -8324,22 +8221,19 @@ func.UI.utils.get_ui_info_tree_scope_sync = function (
8324
8221
  };
8325
8222
 
8326
8223
  func.UI.utils.live_preview_element_inspect_on = function (SESSION_ID, service) {
8327
- $.each($("[xu-ui-id]"), function (key, val) {
8328
- $(val).on("mouseenter.live_preview_element_inspector", function () {
8329
- $("body")
8330
- .find(".preview_mark")
8331
- .removeClass("preview_mark")
8332
- .off("click.live_preview_element_inspector");
8333
- $(this).addClass("preview_mark");
8334
- $(this).on("click.live_preview_element_inspector", function (e) {
8224
+ $.each($('[xu-ui-id]'), function (key, val) {
8225
+ $(val).on('mouseenter.live_preview_element_inspector', function () {
8226
+ $('body').find('.preview_mark').removeClass('preview_mark').off('click.live_preview_element_inspector');
8227
+ $(this).addClass('preview_mark');
8228
+ $(this).on('click.live_preview_element_inspector', function (e) {
8335
8229
  const _session = SESSION_OBJ[SESSION_ID];
8336
8230
  console.log($(this).data());
8337
8231
  const data = $(this).data();
8338
8232
  const obj = {
8339
- service: service + "_result",
8233
+ service: service + '_result',
8340
8234
  id: STUDIO_WEBSOCKET_CONNECTION_ID,
8341
8235
  uid: _session.USR_OBJ._id,
8342
- source: "runtime",
8236
+ source: 'runtime',
8343
8237
  app_id: _session.app_id,
8344
8238
  gtp_token: _session.gtp_token,
8345
8239
  session_id: SESSION_ID,
@@ -8347,16 +8241,16 @@ func.UI.utils.live_preview_element_inspect_on = function (SESSION_ID, service) {
8347
8241
  };
8348
8242
 
8349
8243
  switch (service) {
8350
- case "live_preview_element_reference":
8244
+ case 'live_preview_element_reference':
8351
8245
  obj.data = { prog_id: data.xuData.prog_id, node: data.xuData.node };
8352
8246
  break;
8353
- case "live_preview_element_info":
8247
+ case 'live_preview_element_info':
8354
8248
  obj.data = {
8355
8249
  element_info: data.debug_info,
8356
8250
  datasource: _session.DS_GLB[data.paramsP.dsSessionP],
8357
8251
  };
8358
8252
  break;
8359
- case "live_preview_element_dnd":
8253
+ case 'live_preview_element_dnd':
8360
8254
  // code block
8361
8255
  break;
8362
8256
  default:
@@ -8368,49 +8262,37 @@ func.UI.utils.live_preview_element_inspect_on = function (SESSION_ID, service) {
8368
8262
 
8369
8263
  func.UI.utils.live_preview_element_inspect_off();
8370
8264
 
8371
- if (typeof LIVE_PREVIEW_APP_ACTIVE !== "undefined") {
8372
- $(`#live_preview_element_reference_btn`).css("color", "unset");
8373
- $(`#live_preview_element_info_btn`).css("color", "unset");
8265
+ if (typeof LIVE_PREVIEW_APP_ACTIVE !== 'undefined') {
8266
+ $(`#live_preview_element_reference_btn`).css('color', 'unset');
8267
+ $(`#live_preview_element_info_btn`).css('color', 'unset');
8374
8268
  }
8375
8269
  });
8376
8270
  });
8377
8271
 
8378
- $(val).on("mouseleave.live_preview_element_inspector", function () {
8379
- $(this).removeClass("preview_mark");
8380
- $(this).off("click.live_preview_element_inspector");
8272
+ $(val).on('mouseleave.live_preview_element_inspector', function () {
8273
+ $(this).removeClass('preview_mark');
8274
+ $(this).off('click.live_preview_element_inspector');
8381
8275
  });
8382
8276
  });
8383
8277
  };
8384
8278
 
8385
8279
  func.UI.utils.live_preview_element_inspect_off = function () {
8386
- $.each($("[xu-ui-id]"), function (key, val) {
8387
- $(val).off(
8388
- "mouseenter.live_preview_element_inspector mouseleave.live_preview_element_inspector"
8389
- );
8280
+ $.each($('[xu-ui-id]'), function (key, val) {
8281
+ $(val).off('mouseenter.live_preview_element_inspector mouseleave.live_preview_element_inspector');
8390
8282
  });
8391
- $("body")
8392
- .find(".preview_mark")
8393
- .removeClass("preview_mark")
8394
- .off("click.live_preview_element_inspector");
8283
+ $('body').find('.preview_mark').removeClass('preview_mark').off('click.live_preview_element_inspector');
8395
8284
  };
8396
8285
 
8397
8286
  func.UI.utils.live_preview_show_selected_element = function (nodeid) {
8398
- $("body").find(".preview_mark").removeClass("preview_mark");
8399
- $(`[nodeid="${nodeid}"]`).addClass("preview_mark");
8287
+ $('body').find('.preview_mark').removeClass('preview_mark');
8288
+ $(`[nodeid="${nodeid}"]`).addClass('preview_mark');
8400
8289
  };
8401
8290
 
8402
8291
  func.UI.utils.get_url_attribute = function (SESSION_ID, key) {
8403
8292
  var ret = glb.URL_PARAMS.get(key);
8404
8293
 
8405
8294
  const _session = SESSION_OBJ[SESSION_ID];
8406
- return (
8407
- glb.URL_PARAMS.get(key) ||
8408
- $(_session.root_element).attr(key) ||
8409
- _session.opt?.params?.[key] ||
8410
- _session.opt[key] ||
8411
- $.cookie(key) ||
8412
- window.localStorage.getItem(key)
8413
- );
8295
+ return glb.URL_PARAMS.get(key) || $(_session.root_element).attr(key) || _session.opt?.params?.[key] || _session.opt[key] || $.cookie(key) || window.localStorage.getItem(key);
8414
8296
  };
8415
8297
 
8416
8298
  func.UI.utils.get_root_element_attributes = function (SESSION_ID) {
@@ -8429,21 +8311,12 @@ func.UI.utils.get_root_element_attributes = function (SESSION_ID) {
8429
8311
  return ret;
8430
8312
  };
8431
8313
 
8432
- func.UI.utils.prompt_confirm_window = async function (
8433
- SESSION_ID,
8434
- messageP,
8435
- picP,
8436
- confirmYesFuncP,
8437
- confirmNoFuncP,
8438
- confirmCancelFuncP,
8439
- title,
8440
- colorP
8441
- ) {
8314
+ func.UI.utils.prompt_confirm_window = async function (SESSION_ID, messageP, picP, confirmYesFuncP, confirmNoFuncP, confirmCancelFuncP, title, colorP) {
8442
8315
  if (confirmNoFuncP) {
8443
8316
  buttons.push({
8444
- text: "Disagree",
8445
- role: "no",
8446
- cssClass: "secondary",
8317
+ text: 'Disagree',
8318
+ role: 'no',
8319
+ cssClass: 'secondary',
8447
8320
  handler: () => {
8448
8321
  confirmNoFuncP();
8449
8322
  },
@@ -8451,9 +8324,9 @@ func.UI.utils.prompt_confirm_window = async function (
8451
8324
  }
8452
8325
  if (confirmYesFuncP) {
8453
8326
  buttons.push({
8454
- text: "Agree",
8455
- role: "yes",
8456
- cssClass: "secondary",
8327
+ text: 'Agree',
8328
+ role: 'yes',
8329
+ cssClass: 'secondary',
8457
8330
  handler: () => {
8458
8331
  confirmYesFuncP();
8459
8332
  },
@@ -8462,9 +8335,9 @@ func.UI.utils.prompt_confirm_window = async function (
8462
8335
 
8463
8336
  if (confirmCancelFuncP) {
8464
8337
  buttons.push({
8465
- text: "Dismiss",
8466
- role: "cancel",
8467
- cssClass: "secondary",
8338
+ text: 'Dismiss',
8339
+ role: 'cancel',
8340
+ cssClass: 'secondary',
8468
8341
  handler: () => {
8469
8342
  confirmCancelFuncP();
8470
8343
  },
@@ -8479,22 +8352,14 @@ func.UI.utils.alert = function (msg) {
8479
8352
  };
8480
8353
 
8481
8354
  func.UI.utils.progressScreen = {};
8482
- func.UI.utils.progressScreen.show = function (
8483
- SESSION_ID,
8484
- textP,
8485
- show_bytesP,
8486
- error,
8487
- progress_off,
8488
- logo_off
8489
- ) {
8355
+ func.UI.utils.progressScreen.show = function (SESSION_ID, textP, show_bytesP, error, progress_off, logo_off) {
8490
8356
  if (glb.IS_WORKER) {
8491
8357
  return;
8492
8358
  }
8493
8359
  const app_obj = APP_OBJ?.[SESSION_OBJ?.[SESSION_ID]?.app_id];
8494
8360
 
8495
- var background_color = "";
8496
- var icon =
8497
- app_obj?._conf?.logo_url || "https://xuda.io/dist/images/xuda_logo.png";
8361
+ var background_color = '';
8362
+ var icon = app_obj?._conf?.logo_url || 'https://xuda.io/dist/images/xuda_logo.png';
8498
8363
  if (app_obj?.app_pic) {
8499
8364
  icon = app_obj.app_pic;
8500
8365
  }
@@ -8512,14 +8377,14 @@ func.UI.utils.progressScreen.show = function (
8512
8377
  }
8513
8378
 
8514
8379
  IS_PROGRESS_SCREEN_OPEN = true;
8515
- var $progressScreen = $("#progressScreen2").empty();
8516
- $(".loader").hide();
8517
- $progressScreen = $("#progressScreen2").css({});
8380
+ var $progressScreen = $('#progressScreen2').empty();
8381
+ $('.loader').hide();
8382
+ $progressScreen = $('#progressScreen2').css({});
8518
8383
 
8519
8384
  if (background_color) {
8520
8385
  $progressScreen.css({
8521
8386
  color: func.common.getContrast_color(background_color),
8522
- "background-color": background_color,
8387
+ 'background-color': background_color,
8523
8388
  });
8524
8389
  }
8525
8390
 
@@ -8540,26 +8405,17 @@ func.UI.utils.progressScreen.show = function (
8540
8405
  // );
8541
8406
  // });
8542
8407
 
8543
- $("#progressScreen2_text").show(500, function () {
8408
+ $('#progressScreen2_text').show(500, function () {
8544
8409
  if (!logo_off) {
8545
8410
  $(this).prepend(`<img class='progressScreen_logo' src='${icon}'>`);
8546
8411
  }
8547
- $(this).append(
8548
- error
8549
- ? error_msg
8550
- : typeof textP === "object"
8551
- ? textP
8552
- : `<p>${textP}</p>`
8553
- );
8412
+ $(this).append(error ? error_msg : typeof textP === 'object' ? textP : `<p>${textP}</p>`);
8554
8413
  });
8555
8414
  }
8556
8415
  }, 500);
8557
8416
 
8558
- $("#progressScreen2").show();
8559
- $("<div>")
8560
- .attr("id", "progressScreen2_text")
8561
- .hide()
8562
- .appendTo($progressScreen);
8417
+ $('#progressScreen2').show();
8418
+ $('<div>').attr('id', 'progressScreen2_text').hide().appendTo($progressScreen);
8563
8419
  // .hide()
8564
8420
  // .fadeIn("slow"); //.append(textP)
8565
8421
  };
@@ -8570,8 +8426,8 @@ func.UI.utils.progressScreen.hide = function () {
8570
8426
  IS_PROGRESS_SCREEN_OPEN = false;
8571
8427
  // window.clearInterval(PROGRESS_INTERVAL);
8572
8428
  // setTimeout(function () {
8573
- $("#progressScreen2").hide(); //fadeOut('fast');
8574
- $("#progressScreen2_text").empty(); //.fadeOut('fast').empty();
8429
+ $('#progressScreen2').hide(); //fadeOut('fast');
8430
+ $('#progressScreen2_text').empty(); //.fadeOut('fast').empty();
8575
8431
  // $("#progressScreen2").css({
8576
8432
  // height: "0px",
8577
8433
  // top: "-100px",
@@ -8580,8 +8436,8 @@ func.UI.utils.progressScreen.hide = function () {
8580
8436
  };
8581
8437
 
8582
8438
  func.UI.utils.find_in_element_data = function (folder, $elm, key, val) {
8583
- return $elm.find("*").filter(function () {
8584
- if (typeof val === "undefined") {
8439
+ return $elm.find('*').filter(function () {
8440
+ if (typeof val === 'undefined') {
8585
8441
  return $(this).data()?.[folder]?.[key];
8586
8442
  }
8587
8443
 
@@ -8590,53 +8446,50 @@ func.UI.utils.find_in_element_data = function (folder, $elm, key, val) {
8590
8446
  };
8591
8447
 
8592
8448
  func.UI.utils.init_ui_framework = async function (SESSION_ID, prog_id) {
8593
- if (typeof glb.SLIM_BUNDLE !== "undefined" || glb.SLIM_BUNDLE) return;
8449
+ if (typeof glb.SLIM_BUNDLE !== 'undefined' || glb.SLIM_BUNDLE) return;
8594
8450
 
8595
8451
  var _session = SESSION_OBJ[SESSION_ID];
8596
8452
  var tree_obj = await func.utils.TREE_OBJ.get(SESSION_ID, prog_id);
8597
8453
  if (_.isEmpty(tree_obj)) {
8598
- return console.error("Error: prog " + prog_id + " not found.");
8454
+ return console.error('Error: prog ' + prog_id + ' not found.');
8599
8455
  }
8600
8456
  const report_error = function (descP, warn) {
8601
8457
  func.utils.debug.log(SESSION_ID, prog_id, {
8602
- module: "component",
8603
- action: "Init",
8604
- source: "install ui framework",
8458
+ module: 'component',
8459
+ action: 'Init',
8460
+ source: 'install ui framework',
8605
8461
  prop: descP,
8606
8462
  details: descP,
8607
8463
  result: null,
8608
8464
  error: warn ? false : true,
8609
8465
  fields: null,
8610
- type: "component",
8466
+ type: 'component',
8611
8467
  prog_id: prog_id,
8612
8468
  });
8613
8469
  };
8614
8470
  const plugin_name = tree_obj.uiFramework;
8615
8471
 
8616
8472
  if (!plugin_name) {
8617
- return report_error("no frameworks plugin defined", true);
8473
+ return report_error('no frameworks plugin defined', true);
8618
8474
  }
8619
8475
 
8620
8476
  if (plugin_name === UI_FRAMEWORK_INSTALLED) return;
8621
8477
 
8622
- const _plugin =
8623
- APP_OBJ[_session.app_id]?.app_plugins_purchased?.[plugin_name];
8478
+ const _plugin = APP_OBJ[_session.app_id]?.app_plugins_purchased?.[plugin_name];
8624
8479
 
8625
8480
  if (!_plugin?.installed) {
8626
8481
  return report_error(`plugin ${plugin_name} not installed`);
8627
8482
  }
8628
8483
 
8629
8484
  const get_path = function (plugin_name, resource) {
8630
- var path = `https://${_session.domain}/plugins/${plugin_name}${resource ? "/" + resource : ""
8631
- }?app_id=${_session.app_id}`;
8485
+ var path = `https://${_session.domain}/plugins/${plugin_name}${resource ? '/' + resource : ''}?app_id=${_session.app_id}`;
8632
8486
 
8633
8487
  return path;
8634
8488
  };
8635
8489
 
8636
8490
  var _ui_framework_index;
8637
8491
  try {
8638
- const runtime_mjs = `${_plugin.manifest["runtime.mjs"].dist ? "dist/" : ""
8639
- }runtime.mjs`;
8492
+ const runtime_mjs = `${_plugin.manifest['runtime.mjs'].dist ? 'dist/' : ''}runtime.mjs`;
8640
8493
 
8641
8494
  _ui_framework_index = await import(get_path(plugin_name, runtime_mjs));
8642
8495
  } catch (error) {
@@ -8659,31 +8512,23 @@ func.UI.utils.init_ui_framework = async function (SESSION_ID, prog_id) {
8659
8512
  const ui_framework_core = new _ui_framework_index.core();
8660
8513
  if (ui_framework_core.init) {
8661
8514
  try {
8662
- const setup_mjs = `${_plugin.manifest["index.mjs"].dist ? "dist/" : ""
8663
- }index.mjs`;
8664
- _ui_framework_dashboard_setup = await import(
8665
- get_path(plugin_name, setup_mjs)
8666
- );
8515
+ const setup_mjs = `${_plugin.manifest['index.mjs'].dist ? 'dist/' : ''}index.mjs`;
8516
+ _ui_framework_dashboard_setup = await import(get_path(plugin_name, setup_mjs));
8667
8517
  if (_ui_framework_dashboard_setup) {
8668
- _ui_framework_dashboard_setup_data_ret =
8669
- await func.utils.get_plugin_setup(SESSION_ID, plugin_name);
8518
+ _ui_framework_dashboard_setup_data_ret = await func.utils.get_plugin_setup(SESSION_ID, plugin_name);
8670
8519
  }
8671
- } catch (error) { }
8520
+ } catch (error) {}
8672
8521
  }
8673
8522
 
8674
8523
  if (plugin_name !== UI_FRAMEWORK_INSTALLED) {
8675
8524
  UI_FRAMEWORK_INSTALLED = plugin_name;
8676
- const _plugin_INSTALLED =
8677
- APP_OBJ[_session.app_id]?.app_plugins_purchased?.[UI_FRAMEWORK_INSTALLED];
8525
+ const _plugin_INSTALLED = APP_OBJ[_session.app_id]?.app_plugins_purchased?.[UI_FRAMEWORK_INSTALLED];
8678
8526
  UI_FRAMEWORK_PLUGIN = _ui_framework_index;
8679
8527
  if (UI_FRAMEWORK_INSTALLED) {
8680
8528
  var _current_ui_framework_runtime;
8681
8529
  try {
8682
- const _runtime_mjs = `${_plugin_INSTALLED.manifest["runtime.mjs"].dist ? "dist/" : ""
8683
- }runtime.mjs`;
8684
- _current_ui_framework_runtime = await import(
8685
- get_path(UI_FRAMEWORK_INSTALLED, _runtime_mjs)
8686
- );
8530
+ const _runtime_mjs = `${_plugin_INSTALLED.manifest['runtime.mjs'].dist ? 'dist/' : ''}runtime.mjs`;
8531
+ _current_ui_framework_runtime = await import(get_path(UI_FRAMEWORK_INSTALLED, _runtime_mjs));
8687
8532
  } catch (error) {
8688
8533
  return report_error(`plugin ${UI_FRAMEWORK_INSTALLED} not found`);
8689
8534
  }
@@ -8707,19 +8552,19 @@ func.UI.utils.init_ui_framework = async function (SESSION_ID, prog_id) {
8707
8552
 
8708
8553
  var url = val.url;
8709
8554
  switch (val.type) {
8710
- case "module":
8555
+ case 'module':
8711
8556
  try {
8712
8557
  // ret = await load_module(url);
8713
- ret = await func.utils.load_js_on_demand(url, "module");
8558
+ ret = await func.utils.load_js_on_demand(url, 'module');
8714
8559
  } catch (error) {
8715
8560
  debugger;
8716
8561
  }
8717
8562
 
8718
8563
  break;
8719
- case "css":
8564
+ case 'css':
8720
8565
  ret = func.utils.load_css_on_demand(url);
8721
8566
  break;
8722
- case "js":
8567
+ case 'js':
8723
8568
  ret = await func.utils.load_js_on_demand(url);
8724
8569
  break;
8725
8570
 
@@ -8732,25 +8577,18 @@ func.UI.utils.init_ui_framework = async function (SESSION_ID, prog_id) {
8732
8577
  }
8733
8578
  }
8734
8579
  if (ui_framework_core.init) {
8735
- init_id = await ui_framework_core.init(
8736
- _ui_framework_dashboard_setup_data_ret?.code > -1 &&
8737
- _ui_framework_dashboard_setup_data_ret.data
8738
- );
8580
+ init_id = await ui_framework_core.init(_ui_framework_dashboard_setup_data_ret?.code > -1 && _ui_framework_dashboard_setup_data_ret.data);
8739
8581
  UI_FRAMEWORK_PLUGIN.init_id = init_id;
8740
8582
  }
8741
8583
  }
8742
8584
  };
8743
8585
  func.UI.utils.get_panels_from_dom = function (SESSION_ID, ignore_disableAutoRefresh) {
8744
- const $elm = func.UI.utils.find_in_element_data(
8745
- "xuPanelData",
8746
- $(SESSION_OBJ[SESSION_ID].root_element),
8747
- "parent_element_ui_id"
8748
- );
8586
+ const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
8749
8587
  var panels_obj = {};
8750
8588
 
8751
8589
  // set panels_obj
8752
8590
  for (const [elem_key, elem_val] of Object.entries($elm)) {
8753
- if (elem_key === "length") break;
8591
+ if (elem_key === 'length') break;
8754
8592
  var $div = $(elem_val);
8755
8593
  let xuData = $div.data().xuData;
8756
8594
 
@@ -8773,11 +8611,11 @@ func.UI.utils.get_panels_from_dom = function (SESSION_ID, ignore_disableAutoRefr
8773
8611
  ids: [],
8774
8612
  };
8775
8613
  }
8776
- panels_obj[parent_element_ui_id].ids.push($div.attr("xu-ui-id"));
8614
+ panels_obj[parent_element_ui_id].ids.push($div.attr('xu-ui-id'));
8777
8615
  }
8778
8616
 
8779
- return panels_obj
8780
- }
8617
+ return panels_obj;
8618
+ };
8781
8619
 
8782
8620
  func.UI.worker = {};
8783
8621
  func.UI.worker.ID = null;
@@ -8853,11 +8691,7 @@ func.UI.worker.init = async function (SESSION_ID) {
8853
8691
  let from_job_num_to_run = last_job_in_queue;
8854
8692
  last_job_in_queue = UI_WORKER_OBJ.num - from_job_num_to_run;
8855
8693
 
8856
- if (
8857
- typeof UI_WORKER_OBJ.stat === "undefined" ||
8858
- UI_WORKER_OBJ.stat === "undefined" ||
8859
- UI_WORKER_OBJ.stat === null
8860
- ) {
8694
+ if (typeof UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === null) {
8861
8695
  // idle
8862
8696
  this.attempt = 0;
8863
8697
  if (UI_WORKER_OBJ.jobs.length) {
@@ -8901,16 +8735,7 @@ func.UI.worker.init = async function (SESSION_ID) {
8901
8735
  func.UI.garbage_collector();
8902
8736
  }, 10000);
8903
8737
  };
8904
- func.UI.worker.add_to_queue = async function (
8905
- SESSION_ID,
8906
- source,
8907
- functionP,
8908
- paramsP,
8909
- calling_job,
8910
- elementP,
8911
- dsSession,
8912
- calling_trigger_prop
8913
- ) {
8738
+ func.UI.worker.add_to_queue = async function (SESSION_ID, source, functionP, paramsP, calling_job, elementP, dsSession, calling_trigger_prop) {
8914
8739
  // try {
8915
8740
  // let params = _.cloneDeep(paramsP);
8916
8741
 
@@ -8955,15 +8780,8 @@ func.UI.worker.add_to_queue = async function (
8955
8780
  // obj.parentDataSourceNo = _ds.parentDataSourceNo;
8956
8781
  // obj.nodeId = _ds.nodeId;
8957
8782
  // }
8958
- if (functionP === "execute_xu_all_attributes") {
8959
- const queue_key =
8960
- source +
8961
- "_" +
8962
- functionP +
8963
- "_" +
8964
- (elementP?.attr("xu-ui-id") || "") +
8965
- "_" +
8966
- (paramsP?.fields_arr?.toString() || "");
8783
+ if (functionP === 'execute_xu_all_attributes') {
8784
+ const queue_key = source + '_' + functionP + '_' + (elementP?.attr('xu-ui-id') || '') + '_' + (paramsP?.fields_arr?.toString() || '');
8967
8785
 
8968
8786
  obj.queue_key = queue_key;
8969
8787
 
@@ -8985,21 +8803,17 @@ func.UI.worker.add_to_queue = async function (
8985
8803
  if (calling_job) {
8986
8804
  var job_index = func.UI.worker.find_job_index(SESSION_ID, calling_job);
8987
8805
 
8988
- if (job_index === null || typeof job_index === "undefined") return;
8806
+ if (job_index === null || typeof job_index === 'undefined') return;
8989
8807
 
8990
8808
  try {
8991
8809
  if (!UI_WORKER_OBJ.jobs[job_index].splice_count) {
8992
8810
  UI_WORKER_OBJ.jobs[job_index].splice_count = 0;
8993
8811
  }
8994
8812
  UI_WORKER_OBJ.jobs[job_index].splice_count++;
8995
- UI_WORKER_OBJ.jobs.splice(
8996
- job_index + UI_WORKER_OBJ.jobs[job_index].splice_count,
8997
- 0,
8998
- obj
8999
- );
8813
+ UI_WORKER_OBJ.jobs.splice(job_index + UI_WORKER_OBJ.jobs[job_index].splice_count, 0, obj);
9000
8814
  // }
9001
8815
  } catch (e) {
9002
- console.error("bug");
8816
+ console.error('bug');
9003
8817
  // UI_WORKER_OBJ.jobs.splice(0, 0, obj);
9004
8818
  }
9005
8819
  } else {
@@ -9030,16 +8844,9 @@ func.UI.worker.delete_job = async function (SESSION_ID, jobNoP) {
9030
8844
  var dsSession = UI_WORKER_OBJ.jobs[job_index].dsSession;
9031
8845
  let ds_obj = _session?.DS_GLB[dsSession];
9032
8846
  if (ds_obj) {
9033
- delete SCREEN_BLOCKER_OBJ[
9034
- ds_obj.screenId +
9035
- (ds_obj.callingScreenId ? "_" + ds_obj.callingScreenId : "")
9036
- ];
8847
+ delete SCREEN_BLOCKER_OBJ[ds_obj.screenId + (ds_obj.callingScreenId ? '_' + ds_obj.callingScreenId : '')];
9037
8848
  }
9038
- if (
9039
- dsSession &&
9040
- ds_obj?.loops_limit &&
9041
- ds_obj?.loops_count < ds_obj?.loops_limit - 1
9042
- ) {
8849
+ if (dsSession && ds_obj?.loops_limit && ds_obj?.loops_count < ds_obj?.loops_limit - 1) {
9043
8850
  return;
9044
8851
  }
9045
8852
  UI_WORKER_OBJ.stat = null;
@@ -9048,7 +8855,7 @@ func.UI.worker.delete_job = async function (SESSION_ID, jobNoP) {
9048
8855
  };
9049
8856
  func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
9050
8857
  var job_index = func.UI.worker.find_job_index(SESSION_ID, queue_obj.job_num);
9051
- if (UI_WORKER_OBJ.jobs?.[job_index]?.stat === "busy") {
8858
+ if (UI_WORKER_OBJ.jobs?.[job_index]?.stat === 'busy') {
9052
8859
  if (queue_obj.jobNoP) UI_WORKER_OBJ.stat = job_index;
9053
8860
  return;
9054
8861
  }
@@ -9059,7 +8866,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
9059
8866
 
9060
8867
  if (queue_obj.jobNoP) UI_WORKER_OBJ.stat = job_index;
9061
8868
  if (UI_WORKER_OBJ.jobs[job_index]) {
9062
- UI_WORKER_OBJ.jobs[job_index].stat = "busy";
8869
+ UI_WORKER_OBJ.jobs[job_index].stat = 'busy';
9063
8870
  }
9064
8871
 
9065
8872
  const fx = {
@@ -9068,7 +8875,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
9068
8875
  _ds.currentRecordId = queue_obj.paramsP.currentRecordId;
9069
8876
 
9070
8877
  var datasource_changes = {
9071
- [_ds.dsSession]: { [_ds.currentRecordId]: "set" },
8878
+ [_ds.dsSession]: { [_ds.currentRecordId]: 'set' },
9072
8879
  };
9073
8880
  await func.datasource.update(SESSION_ID, datasource_changes);
9074
8881
 
@@ -9088,26 +8895,12 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
9088
8895
  execute_xu_render_attributes: async function () {
9089
8896
  const _data = queue_obj.paramsP.elem_val.$elm.data();
9090
8897
  if (_data?.xuData?.paramsP) {
9091
- await func.UI.screen.execute_xu_functions(
9092
- SESSION_ID,
9093
- null,
9094
- _data.xuData.$root_container,
9095
- _data.xuData.node,
9096
- _data.xuData.$container,
9097
- _data.xuData.paramsP,
9098
- {},
9099
- queue_obj.jobNoP,
9100
- null,
9101
- null,
9102
- "xu-render",
9103
- queue_obj.paramsP.elem_val.$elm,
9104
- {
9105
- key: "xu-render",
9106
- value: queue_obj.paramsP.attr_value, //? "Y" : "N",
9107
- fields_arr: queue_obj.paramsP.fields_arr,
9108
- jobNoP: queue_obj.jobNoP,
9109
- }
9110
- );
8898
+ 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, {
8899
+ key: 'xu-render',
8900
+ value: queue_obj.paramsP.attr_value, //? "Y" : "N",
8901
+ fields_arr: queue_obj.paramsP.fields_arr,
8902
+ jobNoP: queue_obj.jobNoP,
8903
+ });
9111
8904
  }
9112
8905
 
9113
8906
  return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
@@ -9117,49 +8910,39 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
9117
8910
  return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
9118
8911
  };
9119
8912
 
9120
- var $elm = func.UI.utils.find_in_element_data(
9121
- "xuData",
9122
- $(SESSION_OBJ[SESSION_ID].root_element),
9123
- "xu_id",
9124
- queue_obj.paramsP.elem_key
9125
- );
8913
+ var $elm = func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', queue_obj.paramsP.elem_key);
9126
8914
 
9127
8915
  if (!$elm.length) {
9128
8916
  return done();
9129
8917
  }
9130
- for await (const [key, attr] of Object.entries(
9131
- queue_obj.paramsP.elem_val.attributes
9132
- )) {
9133
- if (attr === "xu-exp:xu-render" || attr === "xu-exp:xu-for" || attr === "xu-for" || attr === "xu-exp:xu-bind") {
8918
+ for await (const [key, attr] of Object.entries(queue_obj.paramsP.elem_val.attributes)) {
8919
+ if (attr === 'xu-exp:xu-render' || attr === 'xu-exp:xu-for' || attr === 'xu-for' || attr === 'xu-exp:xu-bind') {
9134
8920
  continue;
9135
8921
  }
9136
8922
 
9137
8923
  var res = {
9138
8924
  result: queue_obj.paramsP.elem_val.$elm.data().xuAttributes[attr],
9139
8925
  };
9140
- if (attr !== "xu-class") {
8926
+ if (attr !== 'xu-class') {
9141
8927
  res = await func.expression.get(
9142
8928
  queue_obj.paramsP.SESSION_ID,
9143
8929
  queue_obj.paramsP.elem_val.$elm.data().xuAttributes[attr],
9144
8930
  queue_obj.paramsP.elem_val.$elm.data().xuData.paramsP.dsSessionP,
9145
- "UI Property EXP",
8931
+ 'UI Property EXP',
9146
8932
  queue_obj.paramsP.elem_val.$elm.data().xuData.recordid,
9147
8933
  null,
9148
8934
  null,
9149
8935
  null,
9150
8936
  null,
9151
8937
  null,
9152
- queue_obj.paramsP.elem_val.$elm.data().xuData.iterate_info
8938
+ queue_obj.paramsP.elem_val.$elm.data().xuData.iterate_info,
9153
8939
  );
9154
8940
  }
9155
8941
 
9156
- const attr_new = attr.split("xu-exp:")[1];
8942
+ const attr_new = attr.split('xu-exp:')[1];
9157
8943
  // REGULAR ATTRIBUTE
9158
- if (attr_new && attr_new.substr(0, 2) !== "xu") {
9159
- queue_obj.paramsP.elem_val.$elm.attr(
9160
- attr_new !== "viewBox" ? attr_new.toLowerCase() : attr_new,
9161
- res.result
9162
- );
8944
+ if (attr_new && attr_new.substr(0, 2) !== 'xu') {
8945
+ queue_obj.paramsP.elem_val.$elm.attr(attr_new !== 'viewBox' ? attr_new.toLowerCase() : attr_new, res.result);
9163
8946
  } else {
9164
8947
  try {
9165
8948
  // XU ATTRIBUTE
@@ -9167,24 +8950,10 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
9167
8950
  if (!_data || _.isEmpty(_data)) {
9168
8951
  continue;
9169
8952
  }
9170
- await func.UI.screen.execute_xu_functions(
9171
- SESSION_ID,
9172
- null,
9173
- _data.xuData.$root_container,
9174
- _data.xuData.node,
9175
- _data.xuData.$container,
9176
- _data.xuData.paramsP,
9177
- {},
9178
- queue_obj.jobNoP,
9179
- null,
9180
- null,
9181
- attr_new || attr,
9182
- queue_obj.paramsP.elem_val.$elm,
9183
- {
9184
- key: attr_new || attr,
9185
- value: res.result,
9186
- }
9187
- );
8953
+ 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, {
8954
+ key: attr_new || attr,
8955
+ value: res.result,
8956
+ });
9188
8957
  } catch (error) {
9189
8958
  debugger;
9190
8959
  }
@@ -9201,7 +8970,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
9201
8970
  // queue_obj.paramsP.elem_key
9202
8971
  // );
9203
8972
 
9204
- var $elm = queue_obj?.paramsP?.elem_val?.$elm;// $(SESSION_OBJ[SESSION_ID].root_element).find(`[xu-ui-id=${queue_obj.paramsP.elem_key}]`)
8973
+ var $elm = queue_obj?.paramsP?.elem_val?.$elm; // $(SESSION_OBJ[SESSION_ID].root_element).find(`[xu-ui-id=${queue_obj.paramsP.elem_key}]`)
9205
8974
 
9206
8975
  if (!$elm?.length) {
9207
8976
  // return func.events.delete_job(SESSION_ID, queue_obj.jobNoP);
@@ -9221,7 +8990,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
9221
8990
  null,
9222
8991
  _data.xuData.parent_node,
9223
8992
  null,
9224
- _data.xuData.$root_container
8993
+ _data.xuData.$root_container,
9225
8994
  );
9226
8995
 
9227
8996
  return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
@@ -9242,10 +9011,7 @@ func.UI.worker.find_job_index = function (SESSION_ID, jobNoP) {
9242
9011
  return ret;
9243
9012
  };
9244
9013
 
9245
- func.UI.garbage_collector = function (
9246
- SESSION_ID = Object.keys(SESSION_OBJ)[0],
9247
- re_check
9248
- ) {
9014
+ func.UI.garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0], re_check) {
9249
9015
  // return;
9250
9016
  let _session = SESSION_OBJ[SESSION_ID];
9251
9017
 
@@ -9253,10 +9019,16 @@ func.UI.garbage_collector = function (
9253
9019
  if (_data_system?.SYS_GLOBAL_BOL_AJAX_BUSY) return;
9254
9020
  if (!_data_system?.SYS_GLOBAL_BOL_IDLE) return;
9255
9021
 
9022
+ for (const [key, val] of Object.entries(_data_system?.SYS_GLOBAL_OBJ_REFS || {})) {
9023
+ if (!val?.$el?.length) {
9024
+ delete _data_system._data_system[key];
9025
+ }
9026
+ }
9027
+
9256
9028
  let abort;
9257
9029
 
9258
9030
  for (const [dsP, _ds] of Object.entries(_session.DS_GLB)) {
9259
- if (_ds.stat === "busy") {
9031
+ if (_ds.stat === 'busy') {
9260
9032
  abort = true;
9261
9033
  break;
9262
9034
  }
@@ -9268,7 +9040,7 @@ func.UI.garbage_collector = function (
9268
9040
 
9269
9041
  let ds_pending_to_delete = [],
9270
9042
  ds_approve_to_delete = [];
9271
- const $elm = $("body").find("*");
9043
+ const $elm = $('body').find('*');
9272
9044
  for (const [dsP, _ds] of Object.entries(_session.DS_GLB)) {
9273
9045
  if (!_ds.screen_params) continue;
9274
9046
  let found;
@@ -9286,19 +9058,11 @@ func.UI.garbage_collector = function (
9286
9058
  }
9287
9059
  // console.log(ds_pending_to_delete);
9288
9060
 
9289
- const sortedKeys = Object.keys(_session.DS_GLB).sort((a, b) =>
9290
- b.localeCompare(a)
9291
- );
9061
+ const sortedKeys = Object.keys(_session.DS_GLB).sort((a, b) => b.localeCompare(a));
9292
9062
  sortedKeys.forEach((key) => {
9293
9063
  const val = _session.DS_GLB[key];
9294
- if (
9295
- !ds_pending_to_delete.includes(key) &&
9296
- typeof val.parentDataSourceNo !== "undefined" &&
9297
- ds_pending_to_delete.includes(val.parentDataSourceNo.toString())
9298
- ) {
9299
- ds_pending_to_delete = ds_pending_to_delete.filter(
9300
- (item) => item !== val.parentDataSourceNo.toString()
9301
- );
9064
+ if (!ds_pending_to_delete.includes(key) && typeof val.parentDataSourceNo !== 'undefined' && ds_pending_to_delete.includes(val.parentDataSourceNo.toString())) {
9065
+ ds_pending_to_delete = ds_pending_to_delete.filter((item) => item !== val.parentDataSourceNo.toString());
9302
9066
  }
9303
9067
  });
9304
9068
 
@@ -9307,7 +9071,6 @@ func.UI.garbage_collector = function (
9307
9071
  func.datasource.del(SESSION_ID, val);
9308
9072
  }
9309
9073
  };
9310
-
9311
9074
  func.UI.screen = {};
9312
9075
  func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callingDataSource_objP, $callingContainerP, triggerIdP, rowIdP, jobNoP, is_panelP, parameters_obj_inP, source_functionP, call_screen_propertiesP) {
9313
9076
  if (!prog_id) return console.error('program is empty');
@@ -10267,12 +10030,12 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10267
10030
 
10268
10031
  const common_fx = {
10269
10032
  'xu-ref': async function ($elm, val) {
10270
- console.log('xu-ref', $elm, val);
10033
+ // console.log('xu-ref', $elm, val);
10271
10034
  const _session = SESSION_OBJ[SESSION_ID];
10272
10035
  let _ds_0 = _session.DS_GLB[0];
10273
- if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS']) {
10274
- _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
10275
- }
10036
+ // if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS']) {
10037
+ // _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
10038
+ // }
10276
10039
  // if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val]) {
10277
10040
  const _ds = _session.DS_GLB[paramsP.dsSessionP];
10278
10041
  _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val.value] = { $el: $elm, ds: _ds, data: _ds?.data_feed?.rows || {}, props: $elm?.data()?.xuData?.properties };