@xuda.io/runtime-bundle 1.0.694 → 1.0.696
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.
|
@@ -31441,7 +31441,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
31441
31441
|
|
|
31442
31442
|
func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr, datasource_changed, fields_changed_datasource) {
|
|
31443
31443
|
var found, refresh_reason, refresh_details;
|
|
31444
|
-
const validate_change = function (prog_doc, panelXuAttributes) {
|
|
31444
|
+
const validate_change = function (prog_doc, panelXuAttributes, skip_ui_check) {
|
|
31445
31445
|
found = null;
|
|
31446
31446
|
refresh_reason = null;
|
|
31447
31447
|
refresh_details = null;
|
|
@@ -31482,14 +31482,15 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
31482
31482
|
|
|
31483
31483
|
break;
|
|
31484
31484
|
}
|
|
31485
|
+
if (!skip_ui_check) {
|
|
31486
|
+
found = func.UI.find_field_in_progUi_attributes(prog_doc.progUi, parameter_in_field_id, 'xu-for').length;
|
|
31485
31487
|
|
|
31486
|
-
|
|
31488
|
+
if (found) {
|
|
31489
|
+
refresh_reason = `field ${field_id} in progUi xu-for parameter_in changed`;
|
|
31490
|
+
refresh_details = found;
|
|
31487
31491
|
|
|
31488
|
-
|
|
31489
|
-
|
|
31490
|
-
refresh_details = found;
|
|
31491
|
-
|
|
31492
|
-
break;
|
|
31492
|
+
break;
|
|
31493
|
+
}
|
|
31493
31494
|
}
|
|
31494
31495
|
}
|
|
31495
31496
|
}
|
|
@@ -31504,13 +31505,14 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
31504
31505
|
|
|
31505
31506
|
break;
|
|
31506
31507
|
}
|
|
31508
|
+
if (!skip_ui_check) {
|
|
31509
|
+
found = func.UI.find_field_in_progUi_attributes(prog_doc.progUi, field_id, 'xu-for').length;
|
|
31510
|
+
if (found) {
|
|
31511
|
+
refresh_reason = `field ${field_id} in progUi xu-for changed`;
|
|
31512
|
+
refresh_details = found;
|
|
31507
31513
|
|
|
31508
|
-
|
|
31509
|
-
|
|
31510
|
-
refresh_reason = `field ${field_id} in progUi xu-for changed`;
|
|
31511
|
-
refresh_details = found;
|
|
31512
|
-
|
|
31513
|
-
break;
|
|
31514
|
+
break;
|
|
31515
|
+
}
|
|
31514
31516
|
}
|
|
31515
31517
|
|
|
31516
31518
|
if (found) {
|
|
@@ -31525,51 +31527,53 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
31525
31527
|
const _ds = _session.DS_GLB[fields_changed_datasource];
|
|
31526
31528
|
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, _ds.prog_id);
|
|
31527
31529
|
if (prog_doc.progUi) {
|
|
31528
|
-
validate_change(prog_doc);
|
|
31530
|
+
validate_change(prog_doc, null, true);
|
|
31529
31531
|
if (found) {
|
|
31530
|
-
const $elm = $(
|
|
31531
|
-
|
|
31532
|
-
|
|
31533
|
-
|
|
31534
|
-
|
|
31535
|
-
|
|
31536
|
-
|
|
31537
|
-
|
|
31538
|
-
|
|
31539
|
-
|
|
31540
|
-
|
|
31541
|
-
|
|
31542
|
-
|
|
31543
|
-
|
|
31544
|
-
|
|
31545
|
-
|
|
31546
|
-
|
|
31547
|
-
|
|
31548
|
-
|
|
31532
|
+
const $elm = $(`#container_${_ds.prog_id}_0`);
|
|
31533
|
+
if ($elm?.length) {
|
|
31534
|
+
const elm_data = $elm.data();
|
|
31535
|
+
const $wrapper = $elm.parent();
|
|
31536
|
+
const wrapper_data = $wrapper.data();
|
|
31537
|
+
const refreshed_ds = _ds.dsSession;
|
|
31538
|
+
|
|
31539
|
+
// let elm_to_delete = [];
|
|
31540
|
+
// const ts = Date.now();
|
|
31541
|
+
// $.each($elm.find('*'), function (key, val) {
|
|
31542
|
+
// let xu_ui_id = $(val).attr('xu-ui-id');
|
|
31543
|
+
// if (xu_ui_id) {
|
|
31544
|
+
// let new_id = xu_ui_id + ts;
|
|
31545
|
+
// elm_to_delete.push(new_id);
|
|
31546
|
+
|
|
31547
|
+
// $(val).attr('xu-ui-id', new_id).removeData();
|
|
31548
|
+
// } else {
|
|
31549
|
+
// $(val).remove();
|
|
31550
|
+
// }
|
|
31551
|
+
// });
|
|
31549
31552
|
|
|
31550
|
-
|
|
31551
|
-
|
|
31552
|
-
|
|
31553
|
-
|
|
31554
|
-
|
|
31555
|
-
|
|
31556
|
-
|
|
31557
|
-
|
|
31558
|
-
|
|
31559
|
-
|
|
31560
|
-
|
|
31561
|
-
|
|
31562
|
-
|
|
31563
|
-
|
|
31564
|
-
|
|
31565
|
-
|
|
31553
|
+
$elm.empty();
|
|
31554
|
+
if ($elm.data()) {
|
|
31555
|
+
const new_$div = await func.UI.screen.render_ui_tree(
|
|
31556
|
+
SESSION_ID,
|
|
31557
|
+
$elm, // the wrapper
|
|
31558
|
+
_.cloneDeep($elm.data().xuData.node), // the xu-panel node
|
|
31559
|
+
{},
|
|
31560
|
+
elm_data.xuData.paramsP, // the wrapper params
|
|
31561
|
+
null,
|
|
31562
|
+
null,
|
|
31563
|
+
elm_data.xuData.key, // the wrapper key
|
|
31564
|
+
refreshed_ds, // the refreshed_ds
|
|
31565
|
+
elm_data.xuData.parent_node, // the wrapper parent node
|
|
31566
|
+
null,
|
|
31567
|
+
elm_data.xuData.$root_container, // the wrapper root container
|
|
31568
|
+
);
|
|
31566
31569
|
|
|
31567
|
-
|
|
31568
|
-
|
|
31569
|
-
|
|
31570
|
-
|
|
31570
|
+
// // remove old screen content
|
|
31571
|
+
// $.each(elm_to_delete, async function (key, val) {
|
|
31572
|
+
// $("[xu-ui-id='" + elm_to_delete + "']").remove();
|
|
31573
|
+
// });
|
|
31571
31574
|
|
|
31572
|
-
|
|
31575
|
+
return;
|
|
31576
|
+
}
|
|
31573
31577
|
}
|
|
31574
31578
|
}
|
|
31575
31579
|
}
|