@xuda.io/runtime-bundle 1.0.368 → 1.0.370

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.
@@ -8970,19 +8970,12 @@ func.UI.worker.find_job_index = function (SESSION_ID, jobNoP) {
8970
8970
  };
8971
8971
 
8972
8972
  func.UI.ds_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0], re_check) {
8973
- // return;
8974
8973
  let _session = SESSION_OBJ[SESSION_ID];
8975
8974
 
8976
8975
  const _data_system = _session?.DS_GLB?.[0]?.data_system;
8977
8976
  if (_data_system?.SYS_GLOBAL_BOL_AJAX_BUSY) return;
8978
8977
  if (!_data_system?.SYS_GLOBAL_BOL_IDLE) return;
8979
8978
 
8980
- // for (const [key, val] of Object.entries(_data_system?.SYS_GLOBAL_OBJ_REFS || {})) {
8981
- // if (!$(`[xu-ui-id='${val?.$el.attr('xu-ui-id')}'`)?.length) {
8982
- // delete _data_system.SYS_GLOBAL_OBJ_REFS[key];
8983
- // }
8984
- // }
8985
-
8986
8979
  let abort;
8987
8980
 
8988
8981
  for (const [dsP, _ds] of Object.entries(_session.DS_GLB)) {
@@ -9029,7 +9022,7 @@ func.UI.ds_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0
9029
9022
  func.datasource.del(SESSION_ID, val);
9030
9023
  }
9031
9024
  };
9032
- func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0], re_check) {
9025
+ func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0]) {
9033
9026
  let _session = SESSION_OBJ[SESSION_ID];
9034
9027
  const _data_system = _session?.DS_GLB?.[0]?.data_system;
9035
9028
 
@@ -9480,9 +9473,6 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
9480
9473
 
9481
9474
  if (!elem_val?.$elm?.data()?.xuData?.ui_type) continue;
9482
9475
 
9483
- // // already rended
9484
- // if (elem_val.$elm[0].tagName !== 'XURENDER' && elem_val?.$elm?.length) continue;
9485
-
9486
9476
  new_job = await func.UI.worker.add_to_queue(
9487
9477
  SESSION_ID,
9488
9478
  'gui event',
@@ -9998,16 +9988,20 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
9998
9988
 
9999
9989
  const common_fx = {
10000
9990
  'xu-ref': async function ($elm, val) {
10001
- // console.log('xu-ref', $elm, val);
10002
9991
  const _session = SESSION_OBJ[SESSION_ID];
10003
9992
  let _ds_0 = _session.DS_GLB[0];
10004
- // if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS']) {
10005
- // _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
10006
- // }
10007
- // if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val]) {
9993
+
10008
9994
  const _ds = _session.DS_GLB[paramsP.dsSessionP];
10009
- _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val.value] = { $el: $elm, ds: _ds, data: _ds?.data_feed?.rows || {}, props: $elm?.data()?.xuData?.properties };
10010
- // }
9995
+
9996
+ const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
9997
+ const data = _.clone(_ds?.data_feed?.rows?.[row_idx]) || {};
9998
+
9999
+ const props = _ds.in_parameters || {};
10000
+ const attributes = $elm?.data()?.xuData?.properties || {};
10001
+
10002
+ // _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val.value] = { $el: $elm, ds: _ds, data, attributes, props };
10003
+ _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val.value] = { $el: $elm, data, attributes, props };
10004
+
10011
10005
  return {};
10012
10006
  },
10013
10007
  'xu-bind': async function ($elm, val) {
@@ -10340,14 +10334,12 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10340
10334
  if (!custom_iterator_key) {
10341
10335
  is_key_dynamic_field = true;
10342
10336
 
10343
- // iterator_key = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_KEY";
10344
10337
  iterator_key = '_FOR_KEY';
10345
10338
  }
10346
10339
 
10347
10340
  if (!custom_iterator_val) {
10348
10341
  is_val_dynamic_field = true;
10349
10342
 
10350
- // iterator_val = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_VAL";
10351
10343
  iterator_val = '_FOR_VAL';
10352
10344
  }
10353
10345
 
@@ -10394,13 +10386,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10394
10386
  };
10395
10387
  let _parent_info = _.cloneDeep(parent_infoP) || {};
10396
10388
  _parent_info.iterate_info = iterate_info;
10397
- // if (parent_infoP) {
10398
- // _parent_info = iterate_info;
10399
- // } else {
10400
- // _parent_info = {
10401
- // iterate_info,
10402
- // };
10403
- // }
10389
+
10404
10390
  const $divP = await func.UI.screen.render_ui_tree(
10405
10391
  SESSION_ID,
10406
10392
  $container,
@@ -10441,8 +10427,11 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10441
10427
  },
10442
10428
  'xu-class': async function ($elm, val) {
10443
10429
  try {
10444
- let obj = JSON.parse(val.value);
10445
- for await (const [cla, cond] of Object.entries(obj)) {
10430
+ const classes_string = val.value;
10431
+ // let obj = _.isString(classes_string) ? JSON.parse(classes_string) : _.defaults(classes_string, {});
10432
+
10433
+ const classes_obj = _.isString(classes_string) ? JSON.parse(classes_string) : _.defaults(classes_string, {});
10434
+ for await (const [cla, cond] of Object.entries(classes_obj)) {
10446
10435
  let res = (
10447
10436
  await func.expression.get(
10448
10437
  SESSION_ID,
@@ -10466,13 +10455,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10466
10455
  },
10467
10456
  'xu-exp': async function ($elm, val) {
10468
10457
  let exp = val.value === null ? true : val.value;
10469
- // if (val.value.includes("@_FOR_KEY")) {
10470
- // exp = exp.replaceAll("@_FOR_KEY", "@" + $elm.data().xuData.iterate_info.iterator_key);
10471
- // }
10472
-
10473
- // if (val.value.includes("@_FOR_VAL")) {
10474
- // exp = exp.replaceAll("@_FOR_VAL", "@" + $elm.data().xuData.iterate_info.iterator_val);
10475
- // }
10476
10458
 
10477
10459
  let exp_ret = await func.expression.get(SESSION_ID, exp, paramsP.dsSessionP, 'UI Attr EXP', SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP].currentRecordId);
10478
10460
 
@@ -10881,10 +10863,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
10881
10863
  _ret = _.assignIn(_ret, ret);
10882
10864
  }
10883
10865
 
10884
- // if (nodeP.tagName === "svg") {
10885
- // console.log(svg_attributes_str);
10886
- // }
10887
-
10888
10866
  // EXP for
10889
10867
 
10890
10868
  for await (const [key, val] of Object.entries(nodeP.attributes)) {
@@ -10993,20 +10971,6 @@ func.UI.screen.panel_post_render_handler = async function (
10993
10971
  if ($old_panel_div?.length) {
10994
10972
  $($old_panel_div[0]).after($wrapper.children());
10995
10973
  } else {
10996
- // $container.append($wrapper.children());
10997
-
10998
- // find existing xurender
10999
- // $.each($wrapper.children(), function (key, val) {
11000
- // console.log(">", `[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
11001
- // const $elm = $container.find(`[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
11002
- // if (
11003
- // // $(val).data().xuData.key_path === cloned_$div.data().xuData.key_path
11004
- // $elm.length
11005
- // ) {
11006
- // $elm.remove();
11007
- // }
11008
- // $container.append($(val));
11009
- // });
11010
10974
  $.each($wrapper.children(), function (key, child) {
11011
10975
  $.each($container.children(), function (key, elm) {
11012
10976
  if ($(elm).data().xuData.elem_key === $(child).data().xuData.elem_key) {
@@ -11134,59 +11098,7 @@ func.UI.screen.create_container = function (SESSION_ID, $root_container, nodeP,
11134
11098
  },
11135
11099
  xuAttributes: {},
11136
11100
  });
11137
- // }
11138
11101
 
11139
- // $div.appendTo($appendTo);
11140
-
11141
- ////////////////////////
11142
-
11143
- // let svg_attributes_str = ""
11144
- // if (div_typeP === "svg") {
11145
- // for (const [key, val] of Object.entries(nodeP.attributes)) {
11146
- // svg_attributes_str += `${key}="${val}" `
11147
- // }
11148
- // }
11149
-
11150
- // var $div =
11151
- // // $(`<${div} ${attr_str ? attr_str : ""} ${svg_attributes_str}>`)
11152
- // $(`<${div} ${attr_str ? attr_str : ""}>`)
11153
- // .attr("xu-ui-id", ui_id)
11154
- // .data({
11155
- // xuData: {
11156
- // prog_id: _paramsP.prog_id,
11157
- // nodeid: nodeP.id,
11158
- // ui_type: nodeP.tagName,
11159
- // xu_id: xu_id,
11160
- // recordid: currentRecordId,
11161
- // paramsP: _paramsP,
11162
- // key: keyP,
11163
- // key_path, //:($container?.data()?.xuData?.key || "0") + "-" + (keyP || "0"),
11164
- // screenId: _paramsP.screenId,
11165
- // parent_container: $container?.attr("id"),
11166
- // elem_key,
11167
- // ui_id,
11168
- // properties: prop,
11169
- // node: nodeP,
11170
- // node_org: _.cloneDeep(nodeP),
11171
- // is_panelP: _paramsP.is_panelP,
11172
-
11173
- // elem_prop: elem_propP,
11174
- // debug_info: {
11175
- // id: nodeP.id,
11176
- // parent_id: $container?.data()?.xuData?.ui_id,
11177
- // items: items,
11178
- // },
11179
- // parent_node: parent_nodeP,
11180
- // currentRecordId: currentRecordId,
11181
- // $root_container: $root_container,
11182
- // parent_element_ui_id: $container?.data()?.xuData?.ui_id,
11183
- // },
11184
- // xuAttributes: {},
11185
- // })
11186
-
11187
- // if (div_typeP === "svg") {
11188
- // $div.removeAttr("xu-ui-id")
11189
- // }
11190
11102
  if (div_typeP !== 'svg') {
11191
11103
  $div.appendTo($appendTo);
11192
11104
  }
@@ -11749,20 +11661,8 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
11749
11661
  await func.UI.component.create_app_page_component(SESSION_ID, paramsP.dsSessionP);
11750
11662
  const page = new UI_FRAMEWORK_PLUGIN.page();
11751
11663
  await set_call_screen_properties_values(page);
11752
- await page.create(
11753
- params,
11754
- // SESSION_ID,
11755
- // paramsP.dsSessionP,
11756
- // nav,
11757
- // $nav.data().xuData.nav_params[paramsP.dsSessionP]
11758
- );
11759
- await page.init(
11760
- params,
11761
- // SESSION_ID,
11762
- // paramsP.dsSessionP,
11763
- // nav,
11764
- // $nav.data().xuData.nav_params[paramsP.dsSessionP]
11765
- );
11664
+ await page.create(params);
11665
+ await page.init(params);
11766
11666
  nav.push(component_name, { params });
11767
11667
  } else {
11768
11668
  debugger;
@@ -11998,20 +11898,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
11998
11898
  } catch (err) {
11999
11899
  func.utils.debug_report(SESSION_ID, `${plugin_name} widget`, err.message, 'E');
12000
11900
  }
12001
-
12002
- // glb.lifecycle.plugins[plugin_name] = {
12003
- // plugin_script: fx,
12004
- // setup_data: plugin_setup_ret.data,
12005
- // fields,
12006
- // params,
12007
- // };
12008
-
12009
- // await glb.lifecycle.execute(SESSION_ID, "initialized");
12010
- // await glb.lifecycle.execute(SESSION_ID, method);
12011
-
12012
- // } catch (err) {
12013
- // report_error(err);
12014
- // }
12015
11901
  }
12016
11902
  return $div;
12017
11903
  },
@@ -12023,10 +11909,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12023
11909
  var $wrapper = $('<div>');
12024
11910
  $div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, 'div', $wrapper, '');
12025
11911
 
12026
- // if (paramsP.is_panelP) {
12027
- // var id = $div.attr('id');
12028
- // }
12029
-
12030
11912
  if (!$div) return;
12031
11913
 
12032
11914
  if (!REFRESHER_IN_PROGRESS && (paramsP.is_mobile_popover || paramsP.is_mobile_page)) {
@@ -12055,107 +11937,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12055
11937
  $container.data().xuAttributes[key] = _.cloneDeep(val);
12056
11938
  });
12057
11939
 
12058
- // var $div_content = $div.children();
12059
-
12060
- // $.each($div_content, function (key, val) {
12061
- // $(val).data().xuData.parent_container =
12062
- // $div.data().xuData.parent_container;
12063
- // });
12064
-
12065
11940
  return await render_screen_type($div);
12066
-
12067
- // if (paramsP.is_mobile_modal) {
12068
- // return await open_modal($div);
12069
- // }
12070
- // if (paramsP.is_mobile_popover) {
12071
- // open_popover($div);
12072
- // func.UI.utils.screen_blocker(
12073
- // false,
12074
- // paramsP.prog_id + "_" + paramsP.sourceScreenP
12075
- // );
12076
- // return;
12077
- // }
12078
-
12079
- // if (paramsP.is_mobile_page) {
12080
- // const $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
12081
- // const nav = $nav[0];
12082
-
12083
- // var params = {
12084
- // div: $div_content,
12085
- // name: paramsP.screenInfo.properties?.menuTitle,
12086
- // screenId: paramsP.screenId,
12087
- // $container: $container,
12088
- // // icon: $div.data().xuData.paramsP.screenInfo.rICN,
12089
- // dsSession: paramsP.dsSessionP,
12090
- // };
12091
- // var component_name = "xu-page-component-" + paramsP.dsSessionP;
12092
- // if (!$(nav).data().xuData.nav_params) {
12093
- // $(nav).data().xuData.nav_params = {};
12094
- // }
12095
-
12096
- // //restore validate
12097
- // if ($(nav)?.data()?.xuData?.params?.[paramsP.dsSessionP]) {
12098
- // params.$container.data().xuData.validate_screen_ready = $(nav)
12099
- // .data()
12100
- // .xuData.params[
12101
- // paramsP.dsSessionP
12102
- // ].$container.data().xuData.validate_screen_ready;
12103
- // }
12104
-
12105
- // if (!$(nav)?.data()?.xuData) return;
12106
- // $(nav).data().xuData.nav_params[paramsP.dsSessionP] = params;
12107
- // if (!$(component_name).length) {
12108
- // await func.UI.component.create_app_page_component(
12109
- // SESSION_ID,
12110
- // paramsP.dsSessionP
12111
- // );
12112
- // const page = new UI_FRAMEWORK_PLUGIN.page();
12113
- // await page.create(
12114
- // SESSION_ID,
12115
- // paramsP.dsSessionP,
12116
- // nav,
12117
- // $nav.data().xuData.nav_params[paramsP.dsSessionP]
12118
- // );
12119
- // await page.init(
12120
- // SESSION_ID,
12121
- // paramsP.dsSessionP,
12122
- // nav,
12123
- // $nav.data().xuData.nav_params[paramsP.dsSessionP]
12124
- // );
12125
- // nav.push(component_name, { params });
12126
- // } else {
12127
- // debugger;
12128
- // $(component_name).empty();
12129
-
12130
- // await UI_FRAMEWORK_PLUGIN.page(SESSION_ID, paramsP.dsSessionP);
12131
- // }
12132
- // $div.data().xuData.paramsP = $container.data().xuData.paramsP;
12133
-
12134
- // return $div;
12135
- // }
12136
-
12137
- // if (
12138
- // !paramsP.is_mobile_page &&
12139
- // !paramsP.is_mobile_modal &&
12140
- // !paramsP.is_mobile_popover &&
12141
- // !paramsP.is_panelP
12142
- // ) {
12143
- // var $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
12144
- // if ($nav && $nav.length) {
12145
- // // refresh made
12146
- // } else {
12147
- // $nav = $("<xu-nav>");
12148
- // $container.append($nav);
12149
- // func.UI.component.init_xu_nav($container, $nav);
12150
- // }
12151
-
12152
- // $nav.data().xuData.$div = $div_content; // set data to nav to use in the component
12153
-
12154
- // await $nav[0].setRoot("xu-root-component-" + SESSION_ID);
12155
- // } else {
12156
- // $container.append($div_content);
12157
- // }
12158
- // return $container;
12159
11941
  },
12160
11942
  [`xu-multi-view`]: async function () {
12161
11943
  var $div = $container;
@@ -12172,60 +11954,26 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12172
11954
  }
12173
11955
 
12174
11956
  const done = async function (continuous_idx) {
12175
- const do_callback = async function ($div) {
12176
- // if ($root_container.data().xuData.progress_bar_circle) {
12177
- // setTimeout(function () {
12178
- // $.each(
12179
- // $root_container.data().xuData.progress_bar_circle,
12180
- // function (key, val) {
12181
- // val.bar.set(parseFloat(val.value)); // Number from 0.0 to 1.0
12182
- // }
12183
- // );
12184
- // }, 2000);
12185
- // }
12186
-
12187
- if (paramsP.screenInfo.properties?.rtl) {
12188
- $div_content.attr('dir', 'rtl');
12189
- }
12190
-
12191
- return $div;
12192
- };
12193
- await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $container, true);
12194
- // var $div_content = $div.children();
12195
-
12196
- // if (continuous_idx !== null || !prop.app_items_per_page) {
12197
- // $.each($div.data().xuData, function (key, val) {
12198
- // $container.data().xuData[key] = val;
12199
- // });
12200
- // $.each($div.data().xuAttributes, function (key, val) {
12201
- // $container.data().xuAttributes[key] = val;
12202
- // });
12203
-
12204
- // if (!$container.data().xuData.node) {
12205
- // $container.data().xuData.node = {};
11957
+ // const do_callback = async function ($div) {
11958
+ // // if ($root_container.data().xuData.progress_bar_circle) {
11959
+ // // setTimeout(function () {
11960
+ // // $.each(
11961
+ // // $root_container.data().xuData.progress_bar_circle,
11962
+ // // function (key, val) {
11963
+ // // val.bar.set(parseFloat(val.value)); // Number from 0.0 to 1.0
11964
+ // // }
11965
+ // // );
11966
+ // // }, 2000);
11967
+ // // }
11968
+
11969
+ // if (paramsP.screenInfo.properties?.rtl) {
11970
+ // $div_content.attr('dir', 'rtl');
12206
11971
  // }
12207
11972
 
12208
- // $container.data().xuData.node.children = [];
12209
-
12210
- // $.each($div_content, function (key, val) {
12211
- // if (!$(val)?.data()?.xuData) return;
12212
- // if (
12213
- // continuous_idx === null ||
12214
- // (continuous_idx && key > continuous_idx)
12215
- // ) {
12216
- // $(val).data().xuData.parent_container =
12217
- // $div.data().xuData.parent_container;
12218
- // $container
12219
- // .data()
12220
- // .xuData.node.children.push($(val).data().xuData.node);
12221
- // }
12222
- // });
12223
- // }
11973
+ // return $div;
11974
+ // };
11975
+ await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $container, true);
12224
11976
 
12225
- // if (continuous_idx !== null) {
12226
- // if (glb.CURRENT_APP_LOADING === 1) glb.CURRENT_APP_LOADING = 0; // re-activate loader
12227
- // return;
12228
- // }
12229
11977
  return await render_screen_type($div);
12230
11978
  };
12231
11979
 
@@ -12259,38 +12007,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12259
12007
  const ret = await func.UI.screen.render_ui_tree(SESSION_ID, $container, empty_result_node, parent_infoP, paramsP, jobNoP, null, 0, null, nodeP, null, $root_container);
12260
12008
  await func.events.validate(SESSION_ID, 'record_not_found', paramsP.dsSessionP);
12261
12009
  return await done(null);
12262
-
12263
- // var text = "";
12264
- // if (prop?.app_empty_result_text !== "undefined") {
12265
- // text = prop.app_empty_result_text;
12266
- // }
12267
- // if (
12268
- // prop.app_empty_result_text_EXP &&
12269
- // prop.app_empty_result_text_EXP !== "undefined"
12270
- // ) {
12271
- // let exp = prop.app_empty_result_text_EXP;
12272
- // if (exp && exp !== "undefined") {
12273
- // var res = func.expression.get(
12274
- // SESSION_ID,
12275
- // exp,
12276
- // paramsP.dsSessionP,
12277
- // "app_empty_result_text_EXP",
12278
- // _ds.currentRecordId
12279
- // );
12280
- // text = res.result;
12281
- // }
12282
- // }
12283
- // if (icon || text) {
12284
- // $container.append(
12285
- // `<div style="width: 100%;" >${img}<h6 style="text-align: center;">${text}</h6></div>`
12286
- // );
12287
- // }
12288
- // await func.events.validate(
12289
- // SESSION_ID,
12290
- // "record_not_found",
12291
- // paramsP.dsSessionP
12292
- // );
12293
- // return await done(null);
12294
12010
  };
12295
12011
  var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP];
12296
12012
 
@@ -12303,25 +12019,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12303
12019
  var i = 0;
12304
12020
  for await (const [key, val] of Object.entries(_ds.data_feed.rows)) {
12305
12021
  var node = JSON.parse(JSON.stringify(nodeP));
12306
- // TO FIX
12307
- // if (
12308
- // continuous_idx === null &&
12309
- // prop.app_items_per_page &&
12310
- // i >= Number(prop.app_items_per_page)
12311
- // ) {
12312
- // continuous_idx = i;
12313
- // await done(null);
12314
-
12315
- // setTimeout(async function () {
12316
- // await run_item(continuous_idx);
12317
- // if (!glb.CURRENT_APP_LOADING) {
12318
- // glb.CURRENT_APP_LOADING = 1;
12319
- // } // deactivate loader
12320
- // }, 1000);
12321
-
12322
- // continue;
12323
- // }
12324
- ////////
12022
+
12325
12023
  _ds.currentRecordId = val._ROWID;
12326
12024
  const ret = await iterate_child($div, node, { continuous_idx }, null, $root_container);
12327
12025
 
@@ -12373,46 +12071,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12373
12071
  };
12374
12072
  if (!element || element === 'script') return await done();
12375
12073
  let str = '';
12376
- // var $div
12377
- // const draw_svg = function () {
12378
- // const get_tag_str = function (element, prop, val) {
12379
- // let class_str = "";
12380
- // let attr_str = "";
12381
- // for (const [key, val] of Object.entries(prop)) {
12382
- // if (key.substr(0, 2) !== "xu") {
12383
- // attr_str += ` ${key}="${val}" `;
12384
- // }
12385
- // }
12386
- // if (element === "svg") {
12387
- // return `<${element} ${attr_str} > `;
12388
- // }
12389
- // let ret = "";
12390
- // if (val?.children?.length) {
12391
- // ret = iterate_svg(val);
12392
- // }
12393
-
12394
- // return `<${element} ${class_str} ${attr_str} > ${ret} </${element}>`;
12395
- // };
12396
- // let svg_str = get_tag_str(element, prop);
12397
- // let inner_str = "";
12398
- // const iterate_svg = function (node) {
12399
- // let ret = "";
12400
- // if (node.children) {
12401
- // for (let val of node.children) {
12402
- // let prop = val.attributes;
12403
- // ret += get_tag_str(val.tagName, prop, val);
12404
- // }
12405
- // }
12406
- // return ret;
12407
- // };
12408
- // inner_str = iterate_svg(nodeP);
12409
-
12410
- // $div = $(svg_str + inner_str + "</svg>").appendTo($container);
12411
- // };
12412
- // if (element === "svg") {
12413
- // draw_svg();
12414
- // // return await done();
12415
- // }
12416
12074
 
12417
12075
  var $div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, element, null, str);
12418
12076
 
@@ -14522,6 +14180,7 @@ func.expression.get = async function (SESSION_ID, valP, dsSessionP, sourceP, row
14522
14180
  var split = [];
14523
14181
  var var_Arr = [];
14524
14182
  split = func.expression.parse(ret);
14183
+
14525
14184
  for await (const [arr_key, val] of Object.entries(split)) {
14526
14185
  // run each field
14527
14186
  const key = Number(arr_key);
@@ -14612,14 +14271,8 @@ func.expression.get = async function (SESSION_ID, valP, dsSessionP, sourceP, row
14612
14271
  } // put default
14613
14272
  fields[val.fieldId] = var_Arr[key].value;
14614
14273
 
14615
- const ret = await func.datasource.get_value(
14616
- SESSION_ID,
14617
- val.fieldId,
14618
- dsSessionP,
14619
-
14620
- rowIdP,
14621
- ); // find field in dataSources
14622
-
14274
+ const ret = await func.datasource.get_value(SESSION_ID, val.fieldId, dsSessionP, rowIdP); // find field in dataSources
14275
+ console.log(valP, val.fieldId, ret);
14623
14276
  await replace_value_in_string(ret.ret, ret.fieldIdP);
14624
14277
  }
14625
14278
  }