@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.
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -11561,28 +11561,53 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11561
11561
|
$(search_from)
|
|
11562
11562
|
.find('*')
|
|
11563
11563
|
.filter(function () {
|
|
11564
|
-
|
|
11564
|
+
// look if the changed field include in the calling in parameters
|
|
11565
|
+
let parameter_in_filed_id;
|
|
11566
|
+
const _$callingContainer = $(this).data()?.xuData?.paramsP?.$callingContainerP;
|
|
11567
|
+
if (_$callingContainer) {
|
|
11568
|
+
const _source_xuAttributes = _$callingContainer.data()?.xuAttributes;
|
|
11569
|
+
if (_source_xuAttributes) {
|
|
11570
|
+
for (const [attr, value] of Object.entries(_source_xuAttributes)) {
|
|
11571
|
+
if (value.includes(val_field)) {
|
|
11572
|
+
const pattern = /xu-exp:(\w+)/;
|
|
11573
|
+
const match = attr.match(pattern);
|
|
11574
|
+
if (match) {
|
|
11575
|
+
parameter_in_filed_id = attr.split(':')[1];
|
|
11576
|
+
} else {
|
|
11577
|
+
parameter_in_filed_id = attr;
|
|
11578
|
+
}
|
|
11579
|
+
break;
|
|
11580
|
+
}
|
|
11581
|
+
}
|
|
11582
|
+
}
|
|
11583
|
+
}
|
|
11584
|
+
|
|
11585
|
+
let attr = [];
|
|
11565
11586
|
|
|
11566
11587
|
$.each($(this).data()?.xuAttributes, function (key, val) {
|
|
11588
|
+
if (key.substr(0, 2) !== 'xu') return true;
|
|
11589
|
+
|
|
11567
11590
|
if (key === 'xu-for') {
|
|
11568
11591
|
// match static value for xu-for
|
|
11569
|
-
if (val?.includes?.(val_field)) {
|
|
11592
|
+
if (val?.includes?.(val_field) || val?.includes?.(parameter_in_filed_id)) {
|
|
11570
11593
|
attr.push(key);
|
|
11571
11594
|
}
|
|
11595
|
+
return true;
|
|
11572
11596
|
}
|
|
11573
11597
|
// console.log(key, val);
|
|
11574
|
-
|
|
11598
|
+
|
|
11575
11599
|
if (key.substr(0, 6) === 'xu-exp' && key.substr(6, 1) === ':') {
|
|
11576
|
-
if (val?.includes?.(val_field)) {
|
|
11600
|
+
if (val?.includes?.(val_field) || val?.includes?.(parameter_in_filed_id)) {
|
|
11577
11601
|
attr.push(key);
|
|
11578
11602
|
}
|
|
11603
|
+
return true;
|
|
11579
11604
|
}
|
|
11580
11605
|
|
|
11581
11606
|
if (key.substr(0, 8) === 'xu-class') {
|
|
11582
11607
|
try {
|
|
11583
11608
|
let obj = JSON.parse(val);
|
|
11584
11609
|
$.each(obj, function (cla, cond) {
|
|
11585
|
-
if (cond.includes(val_field)) {
|
|
11610
|
+
if (cond.includes(val_field) || cond?.includes?.(parameter_in_filed_id)) {
|
|
11586
11611
|
// attr.push("xuClass");
|
|
11587
11612
|
attr.push('xu-class');
|
|
11588
11613
|
return false;
|
|
@@ -9627,28 +9627,53 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9627
9627
|
$(search_from)
|
|
9628
9628
|
.find('*')
|
|
9629
9629
|
.filter(function () {
|
|
9630
|
-
|
|
9630
|
+
// look if the changed field include in the calling in parameters
|
|
9631
|
+
let parameter_in_filed_id;
|
|
9632
|
+
const _$callingContainer = $(this).data()?.xuData?.paramsP?.$callingContainerP;
|
|
9633
|
+
if (_$callingContainer) {
|
|
9634
|
+
const _source_xuAttributes = _$callingContainer.data()?.xuAttributes;
|
|
9635
|
+
if (_source_xuAttributes) {
|
|
9636
|
+
for (const [attr, value] of Object.entries(_source_xuAttributes)) {
|
|
9637
|
+
if (value.includes(val_field)) {
|
|
9638
|
+
const pattern = /xu-exp:(\w+)/;
|
|
9639
|
+
const match = attr.match(pattern);
|
|
9640
|
+
if (match) {
|
|
9641
|
+
parameter_in_filed_id = attr.split(':')[1];
|
|
9642
|
+
} else {
|
|
9643
|
+
parameter_in_filed_id = attr;
|
|
9644
|
+
}
|
|
9645
|
+
break;
|
|
9646
|
+
}
|
|
9647
|
+
}
|
|
9648
|
+
}
|
|
9649
|
+
}
|
|
9650
|
+
|
|
9651
|
+
let attr = [];
|
|
9631
9652
|
|
|
9632
9653
|
$.each($(this).data()?.xuAttributes, function (key, val) {
|
|
9654
|
+
if (key.substr(0, 2) !== 'xu') return true;
|
|
9655
|
+
|
|
9633
9656
|
if (key === 'xu-for') {
|
|
9634
9657
|
// match static value for xu-for
|
|
9635
|
-
if (val?.includes?.(val_field)) {
|
|
9658
|
+
if (val?.includes?.(val_field) || val?.includes?.(parameter_in_filed_id)) {
|
|
9636
9659
|
attr.push(key);
|
|
9637
9660
|
}
|
|
9661
|
+
return true;
|
|
9638
9662
|
}
|
|
9639
9663
|
// console.log(key, val);
|
|
9640
|
-
|
|
9664
|
+
|
|
9641
9665
|
if (key.substr(0, 6) === 'xu-exp' && key.substr(6, 1) === ':') {
|
|
9642
|
-
if (val?.includes?.(val_field)) {
|
|
9666
|
+
if (val?.includes?.(val_field) || val?.includes?.(parameter_in_filed_id)) {
|
|
9643
9667
|
attr.push(key);
|
|
9644
9668
|
}
|
|
9669
|
+
return true;
|
|
9645
9670
|
}
|
|
9646
9671
|
|
|
9647
9672
|
if (key.substr(0, 8) === 'xu-class') {
|
|
9648
9673
|
try {
|
|
9649
9674
|
let obj = JSON.parse(val);
|
|
9650
9675
|
$.each(obj, function (cla, cond) {
|
|
9651
|
-
if (cond.includes(val_field)) {
|
|
9676
|
+
if (cond.includes(val_field) || cond?.includes?.(parameter_in_filed_id)) {
|
|
9652
9677
|
// attr.push("xuClass");
|
|
9653
9678
|
attr.push('xu-class');
|
|
9654
9679
|
return false;
|