@xuda.io/runtime-bundle 1.0.695 → 1.0.697
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,7 +31527,7 @@ 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
31532
|
const $elm = $(`#container_${_ds.prog_id}_0`);
|
|
31531
31533
|
if ($elm?.length) {
|
|
@@ -31534,21 +31536,22 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
31534
31536
|
const wrapper_data = $wrapper.data();
|
|
31535
31537
|
const refreshed_ds = _ds.dsSession;
|
|
31536
31538
|
|
|
31537
|
-
|
|
31538
|
-
|
|
31539
|
-
|
|
31540
|
-
|
|
31541
|
-
|
|
31542
|
-
|
|
31543
|
-
|
|
31539
|
+
let elm_to_delete = [];
|
|
31540
|
+
const ts = Date.now();
|
|
31541
|
+
$.each($elm.find('xu-root-component-' + SESSION_ID).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);
|
|
31544
31546
|
|
|
31545
|
-
|
|
31546
|
-
|
|
31547
|
-
|
|
31548
|
-
|
|
31549
|
-
|
|
31547
|
+
$(val).attr('xu-ui-id', new_id).removeData();
|
|
31548
|
+
}
|
|
31549
|
+
// else {
|
|
31550
|
+
// $(val).remove();
|
|
31551
|
+
// }
|
|
31552
|
+
});
|
|
31550
31553
|
|
|
31551
|
-
$elm.empty();
|
|
31554
|
+
// $elm.empty();
|
|
31552
31555
|
if ($elm.data()) {
|
|
31553
31556
|
const new_$div = await func.UI.screen.render_ui_tree(
|
|
31554
31557
|
SESSION_ID,
|
|
@@ -31565,10 +31568,10 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
31565
31568
|
elm_data.xuData.$root_container, // the wrapper root container
|
|
31566
31569
|
);
|
|
31567
31570
|
|
|
31568
|
-
//
|
|
31569
|
-
|
|
31570
|
-
|
|
31571
|
-
|
|
31571
|
+
// remove old screen content
|
|
31572
|
+
$.each(elm_to_delete, async function (key, val) {
|
|
31573
|
+
$("[xu-ui-id='" + elm_to_delete + "']").remove();
|
|
31574
|
+
});
|
|
31572
31575
|
|
|
31573
31576
|
return;
|
|
31574
31577
|
}
|
|
@@ -33874,7 +33877,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
33874
33877
|
if ($nav && $nav.length) {
|
|
33875
33878
|
// refresh made
|
|
33876
33879
|
} else {
|
|
33877
|
-
$nav = $('<xu-nav>');
|
|
33880
|
+
$nav = $('<xu-nav>'); //.attr('xu-ui-id', SESSION_ID);
|
|
33878
33881
|
$container.append($nav);
|
|
33879
33882
|
func.UI.component.init_xu_nav($container, $nav);
|
|
33880
33883
|
}
|