@xuda.io/runtime-bundle 1.0.504 → 1.0.506

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.
@@ -3602,6 +3602,19 @@ func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, pa
3602
3602
 
3603
3603
  _ds.stat = 'busy';
3604
3604
  _ds._run_at = run_atP;
3605
+
3606
+ if (_ds.refreshed) {
3607
+ await func.datasource.update(SESSION_ID, {
3608
+ [_ds.dsSession]: {
3609
+ ['datasource_main']: {
3610
+ stat: 'busy',
3611
+ stat_ts: Date.now(),
3612
+ is_worker: glb.IS_WORKER,
3613
+ },
3614
+ },
3615
+ });
3616
+ }
3617
+
3605
3618
  // init_v();
3606
3619
 
3607
3620
  if (IS_DATASOURCE_REFRESH) {
@@ -11418,7 +11431,7 @@ func.expression.secure_eval = async function (SESSION_ID, sourceP, val, job_id,
11418
11431
  }
11419
11432
  };
11420
11433
  func.UI.screen = {};
11421
- 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) {
11434
+ 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, refreshed_ds) {
11422
11435
  if (!prog_id) return console.error('program is empty');
11423
11436
  let screen_ret = await func.utils.get_screen_obj(SESSION_ID, prog_id);
11424
11437
  if (!screen_ret) return console.error('program is not a screen object');
@@ -11631,7 +11644,7 @@ func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callin
11631
11644
  const ret = await func.datasource.create(
11632
11645
  SESSION_ID,
11633
11646
  prog_id,
11634
- null, //params?.callingDataSource_objP?.dsSession
11647
+ refreshed_ds, //params?.callingDataSource_objP?.dsSession
11635
11648
  params.parentDataSourceNoP,
11636
11649
  $rootFrame.attr('id'),
11637
11650
  rowIdP,
@@ -12333,7 +12346,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12333
12346
  async function render_panel() {
12334
12347
  const prog_id = val.value?.prog || val.value;
12335
12348
  const param_obj = await get_params_obj_new(SESSION_ID, prog_id, nodeP, paramsP.dsSessionP);
12336
- let ret_panel = await func.UI.screen.init(SESSION_ID, prog_id, paramsP.screenId, _ds, $elm, null, _ds.currentRecordId, null, true, param_obj, 'initXu_panel');
12349
+ let ret_panel = await func.UI.screen.init(SESSION_ID, prog_id, paramsP.screenId, _ds, $elm, null, _ds.currentRecordId, null, true, param_obj, 'initXu_panel', undefined, refreshed_ds);
12337
12350
  ret = { $new_div: ret_panel };
12338
12351
  $container.data().xuData.xuPanelProps = $elm.data().xuAttributes;
12339
12352
  return ret;
@@ -3603,6 +3603,19 @@ func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, pa
3603
3603
 
3604
3604
  _ds.stat = 'busy';
3605
3605
  _ds._run_at = run_atP;
3606
+
3607
+ if (_ds.refreshed) {
3608
+ await func.datasource.update(SESSION_ID, {
3609
+ [_ds.dsSession]: {
3610
+ ['datasource_main']: {
3611
+ stat: 'busy',
3612
+ stat_ts: Date.now(),
3613
+ is_worker: glb.IS_WORKER,
3614
+ },
3615
+ },
3616
+ });
3617
+ }
3618
+
3606
3619
  // init_v();
3607
3620
 
3608
3621
  if (IS_DATASOURCE_REFRESH) {
@@ -9150,7 +9163,7 @@ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_
9150
9163
  return elm_nodes;
9151
9164
  };
9152
9165
  func.UI.screen = {};
9153
- 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) {
9166
+ 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, refreshed_ds) {
9154
9167
  if (!prog_id) return console.error('program is empty');
9155
9168
  let screen_ret = await func.utils.get_screen_obj(SESSION_ID, prog_id);
9156
9169
  if (!screen_ret) return console.error('program is not a screen object');
@@ -9363,7 +9376,7 @@ func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callin
9363
9376
  const ret = await func.datasource.create(
9364
9377
  SESSION_ID,
9365
9378
  prog_id,
9366
- null, //params?.callingDataSource_objP?.dsSession
9379
+ refreshed_ds, //params?.callingDataSource_objP?.dsSession
9367
9380
  params.parentDataSourceNoP,
9368
9381
  $rootFrame.attr('id'),
9369
9382
  rowIdP,
@@ -10065,7 +10078,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10065
10078
  async function render_panel() {
10066
10079
  const prog_id = val.value?.prog || val.value;
10067
10080
  const param_obj = await get_params_obj_new(SESSION_ID, prog_id, nodeP, paramsP.dsSessionP);
10068
- let ret_panel = await func.UI.screen.init(SESSION_ID, prog_id, paramsP.screenId, _ds, $elm, null, _ds.currentRecordId, null, true, param_obj, 'initXu_panel');
10081
+ let ret_panel = await func.UI.screen.init(SESSION_ID, prog_id, paramsP.screenId, _ds, $elm, null, _ds.currentRecordId, null, true, param_obj, 'initXu_panel', undefined, refreshed_ds);
10069
10082
  ret = { $new_div: ret_panel };
10070
10083
  $container.data().xuData.xuPanelProps = $elm.data().xuAttributes;
10071
10084
  return ret;