@xuda.io/runtime-bundle 1.0.802 → 1.0.803
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.
|
@@ -27832,6 +27832,15 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
|
27832
27832
|
} catch (error) {}
|
|
27833
27833
|
return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
|
|
27834
27834
|
},
|
|
27835
|
+
render_viewport: async function () {
|
|
27836
|
+
const { nodeP, $divP, parent_infoP, $root_container, jobNoP, is_skeleton } = queue_obj?.paramsP || {};
|
|
27837
|
+
if (nodeP?.children?.length) {
|
|
27838
|
+
for await (const [key, val] of Object.entries(nodeP.children)) {
|
|
27839
|
+
const ret = await func.UI.screen.render_ui_tree(SESSION_ID, $divP, nodeP.children[key], parent_infoP, paramsP, jobNoP, is_skeleton, Number(key), null, nodeP, null, $root_container);
|
|
27840
|
+
}
|
|
27841
|
+
}
|
|
27842
|
+
return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
|
|
27843
|
+
},
|
|
27835
27844
|
};
|
|
27836
27845
|
|
|
27837
27846
|
return await fx[queue_obj.functionP]();
|
|
@@ -33694,7 +33703,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
33694
33703
|
});
|
|
33695
33704
|
});
|
|
33696
33705
|
};
|
|
33697
|
-
const iterate_child = async function ($divP, nodeP, parent_infoP,
|
|
33706
|
+
const iterate_child = async function ($divP, nodeP, parent_infoP, $root_container, before_record_function) {
|
|
33698
33707
|
if (!is_mobile && nodeP.busy) return;
|
|
33699
33708
|
nodeP.busy = true;
|
|
33700
33709
|
const done = async function ($divP) {
|
|
@@ -34209,7 +34218,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34209
34218
|
);
|
|
34210
34219
|
}
|
|
34211
34220
|
|
|
34212
|
-
const ret = await iterate_child($div, nodeP, null,
|
|
34221
|
+
const ret = await iterate_child($div, nodeP, null, $div);
|
|
34213
34222
|
if (_.isEmpty($container.data().xuAttributes)) {
|
|
34214
34223
|
await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $container, true);
|
|
34215
34224
|
}
|
|
@@ -34304,7 +34313,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34304
34313
|
var node = JSON.parse(JSON.stringify(nodeP));
|
|
34305
34314
|
|
|
34306
34315
|
_ds.currentRecordId = val._ROWID;
|
|
34307
|
-
const ret = await iterate_child($div, node, { continuous_idx },
|
|
34316
|
+
const ret = await iterate_child($div, node, { continuous_idx }, $root_container);
|
|
34308
34317
|
|
|
34309
34318
|
if (_.isEmpty($container.data().xuAttributes)) {
|
|
34310
34319
|
await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $container, true);
|
|
@@ -34379,9 +34388,10 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34379
34388
|
entries.forEach((entry) => {
|
|
34380
34389
|
if (entry.isIntersecting) {
|
|
34381
34390
|
// Element is in viewport - trigger custom event
|
|
34382
|
-
console.log('trigger>>', 'inViewport_' + $(entry.target).attr('xu-ui-id'));
|
|
34383
|
-
|
|
34384
|
-
$(entry.target).trigger('inViewport_' + $(entry.target).attr('xu-ui-id'));
|
|
34391
|
+
// console.log('trigger>>', 'inViewport_' + $(entry.target).attr('xu-ui-id'));
|
|
34392
|
+
|
|
34393
|
+
// $(entry.target).trigger('inViewport_' + $(entry.target).attr('xu-ui-id'));
|
|
34394
|
+
$(entry.target).trigger('inViewport');
|
|
34385
34395
|
|
|
34386
34396
|
// Optional: stop observing once triggered
|
|
34387
34397
|
observer.unobserve(entry.target);
|
|
@@ -34394,13 +34404,15 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34394
34404
|
);
|
|
34395
34405
|
|
|
34396
34406
|
const render_child = async function () {
|
|
34397
|
-
await iterate_child($div, nodeP, parent_infoP,
|
|
34407
|
+
await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
34398
34408
|
};
|
|
34399
34409
|
|
|
34400
34410
|
if (nodeP?.attributes?.['xu-viewport'] == 'true') {
|
|
34401
|
-
console.log('on>>', 'inViewport_' + $div.attr('xu-ui-id'));
|
|
34402
|
-
$div.on('inViewport_' + $div.attr('xu-ui-id'), function () {
|
|
34403
|
-
|
|
34411
|
+
// console.log('on>>', 'inViewport_' + $div.attr('xu-ui-id'));
|
|
34412
|
+
// $div.on('inViewport_' + $div.attr('xu-ui-id'), function () {
|
|
34413
|
+
$div.on('inViewport', function () {
|
|
34414
|
+
func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'render_viewport', { $div, nodeP, parent_infoP, $root_container, paramsP, jobNoP, is_skeleton, keyP, refreshed_ds, parent_nodeP, check_existP }, null, null, paramsP.dsSessionP);
|
|
34415
|
+
// render_child();
|
|
34404
34416
|
// iterate_child($div, nodeP, parent_infoP, null, $root_container);
|
|
34405
34417
|
});
|
|
34406
34418
|
|