@xuda.io/runtime-bundle 1.0.587 → 1.0.589
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.
|
@@ -31706,75 +31706,76 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
31706
31706
|
|
|
31707
31707
|
var found, refresh_reason, refresh_details;
|
|
31708
31708
|
if (fields_changed_arr) {
|
|
31709
|
-
if (fields_changed_datasource && panel_val._ds.dsSession < fields_changed_datasource) {
|
|
31710
|
-
continue;
|
|
31711
|
-
|
|
31712
|
-
|
|
31713
|
-
|
|
31714
|
-
|
|
31715
|
-
|
|
31716
|
-
// detect if program changed
|
|
31717
|
-
found = _attributes['xu-exp:program']?.includes('@' + field_id);
|
|
31718
|
-
|
|
31719
|
-
if (found) {
|
|
31720
|
-
refresh_reason = `program ${_attributes['xu-exp:program']} ${field_id} changed `;
|
|
31721
|
-
refresh_details = _attributes;
|
|
31722
|
-
break;
|
|
31723
|
-
}
|
|
31709
|
+
if (fields_changed_datasource && panel_val._ds.dsSession < Number(fields_changed_datasource)) {
|
|
31710
|
+
// continue;
|
|
31711
|
+
// }
|
|
31712
|
+
for (const field_id of fields_changed_arr) {
|
|
31713
|
+
// get panel attributes
|
|
31714
|
+
const _attributes = panel_val?.panelXuAttributes || {};
|
|
31724
31715
|
|
|
31725
|
-
|
|
31726
|
-
|
|
31727
|
-
for (const [attr, value] of Object.entries(_attributes)) {
|
|
31728
|
-
const pattern = /xu-exp:(\w+)/;
|
|
31729
|
-
const match = attr.match(pattern);
|
|
31716
|
+
// detect if program changed
|
|
31717
|
+
found = _attributes['xu-exp:program']?.includes('@' + field_id);
|
|
31730
31718
|
|
|
31731
|
-
if (
|
|
31732
|
-
|
|
31733
|
-
|
|
31719
|
+
if (found) {
|
|
31720
|
+
refresh_reason = `program ${_attributes['xu-exp:program']} ${field_id} changed `;
|
|
31721
|
+
refresh_details = _attributes;
|
|
31722
|
+
break;
|
|
31734
31723
|
}
|
|
31735
|
-
// code_in
|
|
31736
|
-
const parameter_in_field_id = match?.[1];
|
|
31737
|
-
// @code
|
|
31738
|
-
if (value.includes(field_id)) {
|
|
31739
|
-
// search parameter in field in the target program's progDataSource
|
|
31740
|
-
found = progDataSource_str?.includes('@' + parameter_in_field_id);
|
|
31741
31724
|
|
|
31742
|
-
|
|
31743
|
-
|
|
31744
|
-
|
|
31725
|
+
// _attributes holds also info of parameters in code_in: @code
|
|
31726
|
+
// search field changed in panel call send parameters exp
|
|
31727
|
+
for (const [attr, value] of Object.entries(_attributes)) {
|
|
31728
|
+
const pattern = /xu-exp:(\w+)/;
|
|
31729
|
+
const match = attr.match(pattern);
|
|
31745
31730
|
|
|
31746
|
-
|
|
31731
|
+
if (!match) {
|
|
31732
|
+
// continue if attribute is not expression
|
|
31733
|
+
continue;
|
|
31747
31734
|
}
|
|
31735
|
+
// code_in
|
|
31736
|
+
const parameter_in_field_id = match?.[1];
|
|
31737
|
+
// @code
|
|
31738
|
+
if (value.includes(field_id)) {
|
|
31739
|
+
// search parameter in field in the target program's progDataSource
|
|
31740
|
+
found = progDataSource_str?.includes('@' + parameter_in_field_id);
|
|
31748
31741
|
|
|
31749
|
-
|
|
31750
|
-
|
|
31742
|
+
if (found) {
|
|
31743
|
+
refresh_reason = `field ${field_id} in progDataSource parameter_in changed`;
|
|
31744
|
+
refresh_details = panel_val?.prog_doc?.progDataSource;
|
|
31751
31745
|
|
|
31752
|
-
|
|
31753
|
-
|
|
31754
|
-
refresh_details = found;
|
|
31746
|
+
break;
|
|
31747
|
+
}
|
|
31755
31748
|
|
|
31756
|
-
|
|
31749
|
+
// found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
|
|
31750
|
+
found = func.UI.find_field_in_progUi_attributes(panel_val.prog_doc.progUi, parameter_in_field_id, 'xu-for').length;
|
|
31751
|
+
|
|
31752
|
+
if (found) {
|
|
31753
|
+
refresh_reason = `field ${field_id} in progUi xu-for parameter_in changed`;
|
|
31754
|
+
refresh_details = found;
|
|
31755
|
+
|
|
31756
|
+
break;
|
|
31757
|
+
}
|
|
31757
31758
|
}
|
|
31758
31759
|
}
|
|
31759
|
-
}
|
|
31760
31760
|
|
|
31761
|
-
|
|
31761
|
+
if (found) break;
|
|
31762
31762
|
|
|
31763
|
-
|
|
31764
|
-
|
|
31765
|
-
|
|
31766
|
-
|
|
31767
|
-
|
|
31763
|
+
// search field changed in the target program's progDataSource // @code
|
|
31764
|
+
found = progDataSource_str?.includes('@' + field_id);
|
|
31765
|
+
if (found) {
|
|
31766
|
+
refresh_reason = `field ${field_id} in progDataSource changed`;
|
|
31767
|
+
refresh_details = panel_val?.prog_doc?.progDataSource;
|
|
31768
31768
|
|
|
31769
|
-
|
|
31770
|
-
|
|
31769
|
+
break;
|
|
31770
|
+
}
|
|
31771
31771
|
|
|
31772
|
-
|
|
31773
|
-
|
|
31774
|
-
|
|
31775
|
-
|
|
31772
|
+
found = func.UI.find_field_in_progUi_attributes(panel_val.prog_doc.progUi, field_id, 'xu-for').length;
|
|
31773
|
+
if (found) {
|
|
31774
|
+
refresh_reason = `field ${field_id} in progUi xu-for changed`;
|
|
31775
|
+
refresh_details = found;
|
|
31776
31776
|
|
|
31777
|
-
|
|
31777
|
+
break;
|
|
31778
|
+
}
|
|
31778
31779
|
}
|
|
31779
31780
|
}
|
|
31780
31781
|
}
|