@xuda.io/runtime-bundle 1.0.330 → 1.0.332

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.
@@ -31586,28 +31586,53 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31586
31586
  $(search_from)
31587
31587
  .find('*')
31588
31588
  .filter(function () {
31589
- 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 = [];
31590
31611
 
31591
31612
  $.each($(this).data()?.xuAttributes, function (key, val) {
31613
+ if (key.substr(0, 2) !== 'xu') return true;
31614
+
31592
31615
  if (key === 'xu-for') {
31593
31616
  // match static value for xu-for
31594
- if (val?.includes?.(val_field)) {
31617
+ if (val?.includes?.(val_field) || val?.includes?.(parameter_in_filed_id)) {
31595
31618
  attr.push(key);
31596
31619
  }
31620
+ return true;
31597
31621
  }
31598
31622
  // console.log(key, val);
31599
- if (!key.substr(0, 2) === 'xu') return;
31623
+
31600
31624
  if (key.substr(0, 6) === 'xu-exp' && key.substr(6, 1) === ':') {
31601
- if (val?.includes?.(val_field)) {
31625
+ if (val?.includes?.(val_field) || val?.includes?.(parameter_in_filed_id)) {
31602
31626
  attr.push(key);
31603
31627
  }
31628
+ return true;
31604
31629
  }
31605
31630
 
31606
31631
  if (key.substr(0, 8) === 'xu-class') {
31607
31632
  try {
31608
31633
  let obj = JSON.parse(val);
31609
31634
  $.each(obj, function (cla, cond) {
31610
- if (cond.includes(val_field)) {
31635
+ if (cond.includes(val_field) || cond?.includes?.(parameter_in_filed_id)) {
31611
31636
  // attr.push("xuClass");
31612
31637
  attr.push('xu-class');
31613
31638
  return false;