@xuda.io/runtime-bundle 1.0.943 → 1.0.945
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-bundle.js +22 -3
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +22 -3
- package/js/xuda-runtime-slim.min.es.js +22 -3
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +5 -1
- package/js/xuda-worker-bundle.js +5 -1
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -4860,7 +4860,11 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
4860
4860
|
}
|
|
4861
4861
|
///// REFRESH SCREEN
|
|
4862
4862
|
if (fields_changed.length) {
|
|
4863
|
-
|
|
4863
|
+
function findMin(arr) {
|
|
4864
|
+
return Math.min(...arr.map(Number));
|
|
4865
|
+
}
|
|
4866
|
+
|
|
4867
|
+
await func.UI.screen.refresh_xu_attributes(SESSION_ID, _.cloneDeep(fields_changed), null, null, findMin(datasource_changed), avoid_xu_for_refresh);
|
|
4864
4868
|
// await removed from the below function cause to dead lock Mar 3 25
|
|
4865
4869
|
await func.UI.screen.refresh_screen(
|
|
4866
4870
|
SESSION_ID,
|
|
@@ -11322,11 +11326,11 @@ func.UI.screen.call_embed = function (SESSION_ID, prog) {
|
|
|
11322
11326
|
});
|
|
11323
11327
|
func.UI.main.embed_prog_execute(SESSION_ID, prog);
|
|
11324
11328
|
};
|
|
11325
|
-
func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, jobNoP, $elm_to_search,
|
|
11329
|
+
func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, jobNoP, $elm_to_search, dsSession_changed, avoid_xu_for_refresh) {
|
|
11326
11330
|
if (!_.isEmpty(SCREEN_BLOCKER_OBJ)) {
|
|
11327
11331
|
// let dom to finish
|
|
11328
11332
|
setTimeout(() => {
|
|
11329
|
-
func.UI.screen.refresh_xu_attributes(SESSION_ID, fields_arr, jobNoP, $elm_to_search,
|
|
11333
|
+
func.UI.screen.refresh_xu_attributes(SESSION_ID, fields_arr, jobNoP, $elm_to_search, dsSession_changed);
|
|
11330
11334
|
}, 100);
|
|
11331
11335
|
return;
|
|
11332
11336
|
}
|
|
@@ -11351,6 +11355,9 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11351
11355
|
.filter(function () {
|
|
11352
11356
|
// check if the changed field include in the calling in parameters
|
|
11353
11357
|
const elm_data = $(this).data();
|
|
11358
|
+
if (!elm_data.xuData) return true;
|
|
11359
|
+
|
|
11360
|
+
if (typeof dsSession_changed !== 'undefined' && elm_data.xuData.paramsP.dsSessionP < dsSession_changed) return true;
|
|
11354
11361
|
|
|
11355
11362
|
let attr = [];
|
|
11356
11363
|
|
|
@@ -11444,8 +11451,12 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11444
11451
|
|
|
11445
11452
|
get_selectors();
|
|
11446
11453
|
// console.log('selectors>>>>', selectors);
|
|
11454
|
+
let children_items_ignore_list = [];
|
|
11447
11455
|
for await (let [elem_key, elem_val] of Object.entries(selectors)) {
|
|
11448
11456
|
if (elem_key === 'length') break;
|
|
11457
|
+
const xu_ui_id = $(elem_val.$elm).attr('xu-ui-id');
|
|
11458
|
+
if (!xu_ui_id) continue;
|
|
11459
|
+
if (children_items_ignore_list.includes(xu_ui_id)) continue;
|
|
11449
11460
|
|
|
11450
11461
|
const add_execute_queue = async function (type) {
|
|
11451
11462
|
if (!elem_val.$elm?.data?.()?.xuData) return;
|
|
@@ -11482,6 +11493,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11482
11493
|
}
|
|
11483
11494
|
|
|
11484
11495
|
if (!elem_val?.$elm?.data()?.xuData?.ui_type) continue;
|
|
11496
|
+
|
|
11485
11497
|
const obj = {
|
|
11486
11498
|
ui_type: elem_val.$elm.data().xuData.ui_type,
|
|
11487
11499
|
SESSION_ID,
|
|
@@ -11493,6 +11505,12 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11493
11505
|
new_job = jobNoP;
|
|
11494
11506
|
new_job = await func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'execute_xu_render_attributes', obj, new_job, elem_val.$elm, elem_val.$elm.data().xuData.paramsP.dsSessionP);
|
|
11495
11507
|
performed_render = true;
|
|
11508
|
+
|
|
11509
|
+
// mark children items ignore list
|
|
11510
|
+
$.each(elem_val.$elm.find('*'), function (key, val) {
|
|
11511
|
+
children_items_ignore_list.push($(val).attr('xu-ui-id'));
|
|
11512
|
+
});
|
|
11513
|
+
|
|
11496
11514
|
if (glb.DEBUG_MODE) {
|
|
11497
11515
|
console.info('execute_xu_render_attributes', obj);
|
|
11498
11516
|
}
|
|
@@ -11501,6 +11519,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11501
11519
|
if (performed_render || elem_val.$elm[0].tagName === 'XURENDER') continue; // bypass job
|
|
11502
11520
|
|
|
11503
11521
|
if (elem_val.attributes.includes('xu-exp:xu-for') || elem_val.attributes.includes('xu-for')) continue;
|
|
11522
|
+
|
|
11504
11523
|
add_execute_queue('execute_xu_all_attributes');
|
|
11505
11524
|
}
|
|
11506
11525
|
|
|
@@ -4861,7 +4861,11 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
4861
4861
|
}
|
|
4862
4862
|
///// REFRESH SCREEN
|
|
4863
4863
|
if (fields_changed.length) {
|
|
4864
|
-
|
|
4864
|
+
function findMin(arr) {
|
|
4865
|
+
return Math.min(...arr.map(Number));
|
|
4866
|
+
}
|
|
4867
|
+
|
|
4868
|
+
await func.UI.screen.refresh_xu_attributes(SESSION_ID, _.cloneDeep(fields_changed), null, null, findMin(datasource_changed), avoid_xu_for_refresh);
|
|
4865
4869
|
// await removed from the below function cause to dead lock Mar 3 25
|
|
4866
4870
|
await func.UI.screen.refresh_screen(
|
|
4867
4871
|
SESSION_ID,
|
|
@@ -9049,11 +9053,11 @@ func.UI.screen.call_embed = function (SESSION_ID, prog) {
|
|
|
9049
9053
|
});
|
|
9050
9054
|
func.UI.main.embed_prog_execute(SESSION_ID, prog);
|
|
9051
9055
|
};
|
|
9052
|
-
func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, jobNoP, $elm_to_search,
|
|
9056
|
+
func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, jobNoP, $elm_to_search, dsSession_changed, avoid_xu_for_refresh) {
|
|
9053
9057
|
if (!_.isEmpty(SCREEN_BLOCKER_OBJ)) {
|
|
9054
9058
|
// let dom to finish
|
|
9055
9059
|
setTimeout(() => {
|
|
9056
|
-
func.UI.screen.refresh_xu_attributes(SESSION_ID, fields_arr, jobNoP, $elm_to_search,
|
|
9060
|
+
func.UI.screen.refresh_xu_attributes(SESSION_ID, fields_arr, jobNoP, $elm_to_search, dsSession_changed);
|
|
9057
9061
|
}, 100);
|
|
9058
9062
|
return;
|
|
9059
9063
|
}
|
|
@@ -9078,6 +9082,9 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9078
9082
|
.filter(function () {
|
|
9079
9083
|
// check if the changed field include in the calling in parameters
|
|
9080
9084
|
const elm_data = $(this).data();
|
|
9085
|
+
if (!elm_data.xuData) return true;
|
|
9086
|
+
|
|
9087
|
+
if (typeof dsSession_changed !== 'undefined' && elm_data.xuData.paramsP.dsSessionP < dsSession_changed) return true;
|
|
9081
9088
|
|
|
9082
9089
|
let attr = [];
|
|
9083
9090
|
|
|
@@ -9171,8 +9178,12 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9171
9178
|
|
|
9172
9179
|
get_selectors();
|
|
9173
9180
|
// console.log('selectors>>>>', selectors);
|
|
9181
|
+
let children_items_ignore_list = [];
|
|
9174
9182
|
for await (let [elem_key, elem_val] of Object.entries(selectors)) {
|
|
9175
9183
|
if (elem_key === 'length') break;
|
|
9184
|
+
const xu_ui_id = $(elem_val.$elm).attr('xu-ui-id');
|
|
9185
|
+
if (!xu_ui_id) continue;
|
|
9186
|
+
if (children_items_ignore_list.includes(xu_ui_id)) continue;
|
|
9176
9187
|
|
|
9177
9188
|
const add_execute_queue = async function (type) {
|
|
9178
9189
|
if (!elem_val.$elm?.data?.()?.xuData) return;
|
|
@@ -9209,6 +9220,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9209
9220
|
}
|
|
9210
9221
|
|
|
9211
9222
|
if (!elem_val?.$elm?.data()?.xuData?.ui_type) continue;
|
|
9223
|
+
|
|
9212
9224
|
const obj = {
|
|
9213
9225
|
ui_type: elem_val.$elm.data().xuData.ui_type,
|
|
9214
9226
|
SESSION_ID,
|
|
@@ -9220,6 +9232,12 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9220
9232
|
new_job = jobNoP;
|
|
9221
9233
|
new_job = await func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'execute_xu_render_attributes', obj, new_job, elem_val.$elm, elem_val.$elm.data().xuData.paramsP.dsSessionP);
|
|
9222
9234
|
performed_render = true;
|
|
9235
|
+
|
|
9236
|
+
// mark children items ignore list
|
|
9237
|
+
$.each(elem_val.$elm.find('*'), function (key, val) {
|
|
9238
|
+
children_items_ignore_list.push($(val).attr('xu-ui-id'));
|
|
9239
|
+
});
|
|
9240
|
+
|
|
9223
9241
|
if (glb.DEBUG_MODE) {
|
|
9224
9242
|
console.info('execute_xu_render_attributes', obj);
|
|
9225
9243
|
}
|
|
@@ -9228,6 +9246,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9228
9246
|
if (performed_render || elem_val.$elm[0].tagName === 'XURENDER') continue; // bypass job
|
|
9229
9247
|
|
|
9230
9248
|
if (elem_val.attributes.includes('xu-exp:xu-for') || elem_val.attributes.includes('xu-for')) continue;
|
|
9249
|
+
|
|
9231
9250
|
add_execute_queue('execute_xu_all_attributes');
|
|
9232
9251
|
}
|
|
9233
9252
|
|