@xuda.io/runtime-bundle 1.0.981 → 1.0.983

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.
@@ -10371,7 +10371,7 @@ func.expression.get = async function (SESSION_ID, valP, dsSessionP, sourceP, row
10371
10371
  }
10372
10372
 
10373
10373
  const validate_email = async function () {
10374
- const ret = await func.expression.secure_eval(SESSION_ID, sourceP, valP, jobNo, dsSessionP, js_script_callback);
10374
+ const ret = await func.expression.secure_eval(SESSION_ID, sourceP, valP, jobNo, dsSessionP, js_script_callback, null, true);
10375
10375
 
10376
10376
  return glb.emailRegex.test(ret);
10377
10377
  };
@@ -11123,7 +11123,7 @@ func.expression.remove_quotes = function (valP) {
11123
11123
  // }
11124
11124
  // };
11125
11125
 
11126
- func.expression.secure_eval = async function (SESSION_ID, sourceP, val, job_id, dsSessionP, js_script_callback, evt) {
11126
+ func.expression.secure_eval = async function (SESSION_ID, sourceP, val, job_id, dsSessionP, js_script_callback, evt, ignore_errors) {
11127
11127
  if (typeof val !== 'string') return val;
11128
11128
 
11129
11129
  const xu = await func.common.get_module(SESSION_ID, 'xuda-api-library.mjs', {
@@ -11144,10 +11144,10 @@ func.expression.secure_eval = async function (SESSION_ID, sourceP, val, job_id,
11144
11144
  return eval(val);
11145
11145
  } catch (err) {
11146
11146
  try {
11147
- if (sourceP === 'javascript') console.error(err);
11147
+ if (sourceP === 'javascript' && !ignore_errors) console.error(err);
11148
11148
  return JSON5.parse(val);
11149
11149
  } catch (err) {
11150
- if (sourceP === 'javascript') console.error(err);
11150
+ if (sourceP === 'javascript' && !ignore_errors) console.error(err);
11151
11151
  return val;
11152
11152
  }
11153
11153
  }
@@ -12083,7 +12083,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12083
12083
  // };
12084
12084
  const program = val.value?.prog || val.value;
12085
12085
  var $wrapper = $('<div>');
12086
- var $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, nodeP.attributes, null, null, null, $wrapper, '');
12086
+ var $div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, nodeP.attributes, null, null, null, $wrapper, '');
12087
12087
  const params_obj = await get_params_obj_new(SESSION_ID, program, nodeP, paramsP.dsSessionP);
12088
12088
  let ret_init = await func.UI.screen.init(SESSION_ID, program, paramsP.screenId, _ds, $div, null, _ds.currentRecordId, jobNoP, true, params_obj.params_res, 'alterXu_panel', undefined, undefined, params_obj.params_raw);
12089
12089
  ret = {
@@ -13410,7 +13410,7 @@ func.UI.screen.panel_post_render_handler = async function (
13410
13410
  return jobNoP;
13411
13411
  };
13412
13412
 
13413
- func.UI.screen.create_container = async function (SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, classP, elem_propP, div_typeP, $appendToP, attr_str) {
13413
+ func.UI.screen.create_container = function (SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, classP, elem_propP, div_typeP, $appendToP, attr_str) {
13414
13414
  const _paramsP = _.cloneDeep(paramsP);
13415
13415
  var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_paramsP.dsSessionP];
13416
13416
  var $appendTo = $container;
@@ -14206,7 +14206,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14206
14206
  var exist_elm_obj = get_element_info();
14207
14207
  var $div = exist_elm_obj.div;
14208
14208
  if (!exist_elm_obj.div) {
14209
- $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, 'widget_wrapper', null, null, null, null);
14209
+ $div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, 'widget_wrapper', null, null, null, null);
14210
14210
 
14211
14211
  //////////////////////////
14212
14212
 
@@ -14408,7 +14408,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14408
14408
 
14409
14409
  if (!exist_elm_obj.div) {
14410
14410
  var $wrapper = $('<div>');
14411
- $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, 'div', $wrapper, '');
14411
+ $div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, 'div', $wrapper, '');
14412
14412
 
14413
14413
  if (!$div) return;
14414
14414
 
@@ -14548,7 +14548,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14548
14548
  };
14549
14549
 
14550
14550
  var $wrapper = $('<div>');
14551
- $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, null, $wrapper, '');
14551
+ $div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, null, $wrapper, '');
14552
14552
 
14553
14553
  let ret = await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $div.clone(true), true, undefined, refreshed_ds);
14554
14554
  if (ret.abort) {
@@ -14578,7 +14578,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14578
14578
  if (!element || element === 'script') return await done();
14579
14579
  let str = '';
14580
14580
 
14581
- var $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, element, null, str);
14581
+ 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);
14582
14582
 
14583
14583
  $div.hover(
14584
14584
  function (e) {
@@ -9808,7 +9808,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
9808
9808
  // };
9809
9809
  const program = val.value?.prog || val.value;
9810
9810
  var $wrapper = $('<div>');
9811
- var $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, nodeP.attributes, null, null, null, $wrapper, '');
9811
+ var $div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, nodeP.attributes, null, null, null, $wrapper, '');
9812
9812
  const params_obj = await get_params_obj_new(SESSION_ID, program, nodeP, paramsP.dsSessionP);
9813
9813
  let ret_init = await func.UI.screen.init(SESSION_ID, program, paramsP.screenId, _ds, $div, null, _ds.currentRecordId, jobNoP, true, params_obj.params_res, 'alterXu_panel', undefined, undefined, params_obj.params_raw);
9814
9814
  ret = {
@@ -11135,7 +11135,7 @@ func.UI.screen.panel_post_render_handler = async function (
11135
11135
  return jobNoP;
11136
11136
  };
11137
11137
 
11138
- func.UI.screen.create_container = async function (SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, classP, elem_propP, div_typeP, $appendToP, attr_str) {
11138
+ func.UI.screen.create_container = function (SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, classP, elem_propP, div_typeP, $appendToP, attr_str) {
11139
11139
  const _paramsP = _.cloneDeep(paramsP);
11140
11140
  var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_paramsP.dsSessionP];
11141
11141
  var $appendTo = $container;
@@ -11931,7 +11931,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
11931
11931
  var exist_elm_obj = get_element_info();
11932
11932
  var $div = exist_elm_obj.div;
11933
11933
  if (!exist_elm_obj.div) {
11934
- $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, 'widget_wrapper', null, null, null, null);
11934
+ $div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, 'widget_wrapper', null, null, null, null);
11935
11935
 
11936
11936
  //////////////////////////
11937
11937
 
@@ -12133,7 +12133,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12133
12133
 
12134
12134
  if (!exist_elm_obj.div) {
12135
12135
  var $wrapper = $('<div>');
12136
- $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, 'div', $wrapper, '');
12136
+ $div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, 'div', $wrapper, '');
12137
12137
 
12138
12138
  if (!$div) return;
12139
12139
 
@@ -12273,7 +12273,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12273
12273
  };
12274
12274
 
12275
12275
  var $wrapper = $('<div>');
12276
- $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, null, $wrapper, '');
12276
+ $div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, null, $wrapper, '');
12277
12277
 
12278
12278
  let ret = await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $div.clone(true), true, undefined, refreshed_ds);
12279
12279
  if (ret.abort) {
@@ -12303,7 +12303,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12303
12303
  if (!element || element === 'script') return await done();
12304
12304
  let str = '';
12305
12305
 
12306
- var $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, element, null, str);
12306
+ 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);
12307
12307
 
12308
12308
  $div.hover(
12309
12309
  function (e) {
@@ -14510,7 +14510,7 @@ func.expression.get = async function (SESSION_ID, valP, dsSessionP, sourceP, row
14510
14510
  }
14511
14511
 
14512
14512
  const validate_email = async function () {
14513
- const ret = await func.expression.secure_eval(SESSION_ID, sourceP, valP, jobNo, dsSessionP, js_script_callback);
14513
+ const ret = await func.expression.secure_eval(SESSION_ID, sourceP, valP, jobNo, dsSessionP, js_script_callback, null, true);
14514
14514
 
14515
14515
  return glb.emailRegex.test(ret);
14516
14516
  };
@@ -15262,7 +15262,7 @@ func.expression.remove_quotes = function (valP) {
15262
15262
  // }
15263
15263
  // };
15264
15264
 
15265
- func.expression.secure_eval = async function (SESSION_ID, sourceP, val, job_id, dsSessionP, js_script_callback, evt) {
15265
+ func.expression.secure_eval = async function (SESSION_ID, sourceP, val, job_id, dsSessionP, js_script_callback, evt, ignore_errors) {
15266
15266
  if (typeof val !== 'string') return val;
15267
15267
 
15268
15268
  const xu = await func.common.get_module(SESSION_ID, 'xuda-api-library.mjs', {
@@ -15283,10 +15283,10 @@ func.expression.secure_eval = async function (SESSION_ID, sourceP, val, job_id,
15283
15283
  return eval(val);
15284
15284
  } catch (err) {
15285
15285
  try {
15286
- if (sourceP === 'javascript') console.error(err);
15286
+ if (sourceP === 'javascript' && !ignore_errors) console.error(err);
15287
15287
  return JSON5.parse(val);
15288
15288
  } catch (err) {
15289
- if (sourceP === 'javascript') console.error(err);
15289
+ if (sourceP === 'javascript' && !ignore_errors) console.error(err);
15290
15290
  return val;
15291
15291
  }
15292
15292
  }