@xuda.io/runtime-bundle 1.0.329 → 1.0.331

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.
@@ -25552,7 +25552,7 @@ func.utils.job_worker = function (session_id) {
25552
25552
  // }
25553
25553
  unlock();
25554
25554
  if (_session.WORKER_OBJ.jobs.length) {
25555
- for await (const [key, val] of Object.entries(_session.WORKER_OBJ.jobs.reverse())) {
25555
+ for await (const [key, val] of Object.entries(_session.WORKER_OBJ.jobs)) {
25556
25556
  if (val.stat) {
25557
25557
  break;
25558
25558
  }
@@ -30462,8 +30462,9 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
30462
30462
  }
30463
30463
  ///// REFRESH SCREEN
30464
30464
  if (!avoid_refresh && fields_changed.length) {
30465
- await func.UI.screen.refresh_xu_attributes(SESSION_ID, fields_changed);
30466
- await func.UI.screen.refresh_screen(
30465
+ // await removed from the below function cause to dead lock Mar 3 25
30466
+ func.UI.screen.refresh_xu_attributes(SESSION_ID, fields_changed);
30467
+ func.UI.screen.refresh_screen(
30467
30468
  SESSION_ID,
30468
30469
  fields_changed,
30469
30470
  null,
@@ -31585,28 +31586,53 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31585
31586
  $(search_from)
31586
31587
  .find('*')
31587
31588
  .filter(function () {
31588
- var attr = [];
31589
+ // look if the changed field include in the calling in parameters
31590
+ let parameter_in_filed_id;
31591
+ const _$callingContainer = this.data()?.xuData?.paramsP?.$callingContainerP;
31592
+ if (_$callingContainer) {
31593
+ const _source_xuAttributes = _$callingContainer.data()?.xuAttributes;
31594
+ if (_source_xuAttributes) {
31595
+ for (const [attr, value] of Object.entries(_source_xuAttributes)) {
31596
+ if (value.includes(val_field)) {
31597
+ const pattern = /xu-exp:(\w+)/;
31598
+ const match = attr.match(pattern);
31599
+ if (match) {
31600
+ parameter_in_filed_id = attr.split(':')[1];
31601
+ } else {
31602
+ parameter_in_filed_id = attr;
31603
+ }
31604
+ break;
31605
+ }
31606
+ }
31607
+ }
31608
+ }
31609
+
31610
+ let attr = [];
31589
31611
 
31590
31612
  $.each($(this).data()?.xuAttributes, function (key, val) {
31613
+ if (key.substr(0, 2) !== 'xu') return true;
31614
+
31591
31615
  if (key === 'xu-for') {
31592
31616
  // match static value for xu-for
31593
- if (val?.includes?.(val_field)) {
31617
+ if (val?.includes?.(val_field) || val?.includes?.(parameter_in_filed_id)) {
31594
31618
  attr.push(key);
31595
31619
  }
31620
+ return true;
31596
31621
  }
31597
31622
  // console.log(key, val);
31598
- if (!key.substr(0, 2) === 'xu') return;
31623
+
31599
31624
  if (key.substr(0, 6) === 'xu-exp' && key.substr(6, 1) === ':') {
31600
- if (val?.includes?.(val_field)) {
31625
+ if (val?.includes?.(val_field) || val?.includes?.(parameter_in_filed_id)) {
31601
31626
  attr.push(key);
31602
31627
  }
31628
+ return true;
31603
31629
  }
31604
31630
 
31605
31631
  if (key.substr(0, 8) === 'xu-class') {
31606
31632
  try {
31607
31633
  let obj = JSON.parse(val);
31608
31634
  $.each(obj, function (cla, cond) {
31609
- if (cond.includes(val_field)) {
31635
+ if (cond.includes(val_field) || cond?.includes?.(parameter_in_filed_id)) {
31610
31636
  // attr.push("xuClass");
31611
31637
  attr.push('xu-class');
31612
31638
  return false;