@xuda.io/runtime-bundle 1.0.830 → 1.0.832
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 +145 -121
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +146 -122
- package/js/xuda-runtime-slim.min.es.js +146 -122
- package/js/xuda-runtime-slim.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -8758,7 +8758,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
|
8758
8758
|
render_viewport: async function () {
|
|
8759
8759
|
const { nodeP, $div, parent_infoP, $root_container, jobNoP, is_skeleton, paramsP, $container } = queue_obj?.paramsP || {};
|
|
8760
8760
|
if (nodeP?.children?.length) {
|
|
8761
|
-
func.UI.screen.hover_in(SESSION_ID, $div, $container, paramsP, is_skeleton);
|
|
8761
|
+
// func.UI.screen.hover_in(SESSION_ID, $div, $container, paramsP, is_skeleton);
|
|
8762
8762
|
// setTimeout(async () => {
|
|
8763
8763
|
for await (const [key, val] of Object.entries(nodeP.children)) {
|
|
8764
8764
|
const ret = await func.UI.screen.render_ui_tree(SESSION_ID, $div, nodeP.children[key], parent_infoP, paramsP, jobNoP, is_skeleton, Number(key), null, nodeP, null, $root_container);
|
|
@@ -8766,9 +8766,9 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
|
8766
8766
|
// return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
|
|
8767
8767
|
// }, 1000);
|
|
8768
8768
|
}
|
|
8769
|
-
setTimeout(async () => {
|
|
8770
|
-
|
|
8771
|
-
}, 10000);
|
|
8769
|
+
// setTimeout(async () => {
|
|
8770
|
+
return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
|
|
8771
|
+
// }, 10000);
|
|
8772
8772
|
},
|
|
8773
8773
|
};
|
|
8774
8774
|
|
|
@@ -14562,12 +14562,12 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14562
14562
|
|
|
14563
14563
|
$div.hover(
|
|
14564
14564
|
function (e) {
|
|
14565
|
-
|
|
14566
|
-
func.UI.screen.hover_in(SESSION_ID, null, $container, paramsP, is_skeleton);
|
|
14565
|
+
hover_in();
|
|
14566
|
+
// func.UI.screen.hover_in(SESSION_ID, null, $container, paramsP, is_skeleton);
|
|
14567
14567
|
},
|
|
14568
14568
|
function (e) {
|
|
14569
|
-
func.UI.screen.hover_out(SESSION_ID, $container, is_skeleton, paramsP);
|
|
14570
|
-
|
|
14569
|
+
// func.UI.screen.hover_out(SESSION_ID, $container, is_skeleton, paramsP);
|
|
14570
|
+
hover_out();
|
|
14571
14571
|
},
|
|
14572
14572
|
);
|
|
14573
14573
|
}
|
|
@@ -14726,12 +14726,12 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14726
14726
|
|
|
14727
14727
|
$div.hover(
|
|
14728
14728
|
function (e) {
|
|
14729
|
-
|
|
14730
|
-
func.UI.screen.hover_in(SESSION_ID, $div, $container, paramsP, is_skeleton);
|
|
14729
|
+
hover_in($div);
|
|
14730
|
+
// func.UI.screen.hover_in(SESSION_ID, $div, $container, paramsP, is_skeleton);
|
|
14731
14731
|
},
|
|
14732
14732
|
function (e) {
|
|
14733
|
-
func.UI.screen.hover_out(SESSION_ID, $container, is_skeleton, paramsP);
|
|
14734
|
-
|
|
14733
|
+
// func.UI.screen.hover_out(SESSION_ID, $container, is_skeleton, paramsP);
|
|
14734
|
+
hover_out();
|
|
14735
14735
|
},
|
|
14736
14736
|
);
|
|
14737
14737
|
|
|
@@ -14739,7 +14739,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14739
14739
|
if (ret.abort || nodeP.tagName === 'svg') return await done();
|
|
14740
14740
|
// check if iterator made to prevent children render
|
|
14741
14741
|
|
|
14742
|
-
const
|
|
14742
|
+
const observer_inViewport = new IntersectionObserver(
|
|
14743
14743
|
function (entries) {
|
|
14744
14744
|
entries.forEach((entry) => {
|
|
14745
14745
|
if (entry.isIntersecting) {
|
|
@@ -14750,7 +14750,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14750
14750
|
$(entry.target).trigger('inViewport');
|
|
14751
14751
|
|
|
14752
14752
|
// Optional: stop observing once triggered
|
|
14753
|
-
|
|
14753
|
+
observer_inViewport.unobserve(entry.target);
|
|
14754
14754
|
}
|
|
14755
14755
|
});
|
|
14756
14756
|
},
|
|
@@ -14759,6 +14759,23 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14759
14759
|
},
|
|
14760
14760
|
);
|
|
14761
14761
|
|
|
14762
|
+
const observer_outViewport = new IntersectionObserver(
|
|
14763
|
+
function (entries) {
|
|
14764
|
+
entries.forEach((entry) => {
|
|
14765
|
+
if (!entry.isIntersecting) {
|
|
14766
|
+
// Element is OUT of viewport - trigger custom event
|
|
14767
|
+
$(entry.target).trigger('outViewport');
|
|
14768
|
+
|
|
14769
|
+
// Optional: stop observing once triggered
|
|
14770
|
+
observer_outViewport.unobserve(entry.target);
|
|
14771
|
+
}
|
|
14772
|
+
});
|
|
14773
|
+
},
|
|
14774
|
+
{
|
|
14775
|
+
threshold: 0, // Trigger when element is completely out of view
|
|
14776
|
+
},
|
|
14777
|
+
);
|
|
14778
|
+
|
|
14762
14779
|
// const render_child = async function () {
|
|
14763
14780
|
// await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
14764
14781
|
// };
|
|
@@ -14767,13 +14784,20 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14767
14784
|
// console.log('on>>', 'inViewport_' + $div.attr('xu-ui-id'));
|
|
14768
14785
|
// $div.on('inViewport_' + $div.attr('xu-ui-id'), function () {
|
|
14769
14786
|
$div.on('inViewport', function () {
|
|
14770
|
-
|
|
14787
|
+
hover_in($div);
|
|
14788
|
+
// func.UI.screen.hover_in(SESSION_ID, $div, $container, paramsP, is_skeleton);
|
|
14771
14789
|
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, $container }, null, null, paramsP.dsSessionP);
|
|
14772
14790
|
// render_child();
|
|
14773
14791
|
// iterate_child($div, nodeP, parent_infoP, null, $root_container);
|
|
14774
14792
|
});
|
|
14775
14793
|
|
|
14776
|
-
|
|
14794
|
+
$div.on('outViewport', function () {
|
|
14795
|
+
$div.empty();
|
|
14796
|
+
observer_inViewport.observe($div[0]);
|
|
14797
|
+
});
|
|
14798
|
+
|
|
14799
|
+
observer_inViewport.observe($div[0]);
|
|
14800
|
+
observer_outViewport.observe($div[0]);
|
|
14777
14801
|
} else {
|
|
14778
14802
|
// await render_child();
|
|
14779
14803
|
await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
@@ -14825,127 +14849,127 @@ func.UI.screen.refresh_document_changes_for_realtime_update = async function (SE
|
|
|
14825
14849
|
}
|
|
14826
14850
|
};
|
|
14827
14851
|
|
|
14828
|
-
func.UI.screen.hover_in = function (SESSION_ID, $div, $container, paramsP, is_skeleton) {
|
|
14829
|
-
|
|
14852
|
+
// func.UI.screen.hover_in = function (SESSION_ID, $div, $container, paramsP, is_skeleton) {
|
|
14853
|
+
// if (is_skeleton || EXP_BUSY) return;
|
|
14830
14854
|
|
|
14831
|
-
|
|
14832
|
-
|
|
14855
|
+
// var _session = SESSION_OBJ[SESSION_ID];
|
|
14856
|
+
// var _ds = _session.DS_GLB[paramsP.dsSessionP];
|
|
14833
14857
|
|
|
14834
|
-
|
|
14835
|
-
|
|
14836
|
-
|
|
14837
|
-
|
|
14838
|
-
|
|
14839
|
-
|
|
14840
|
-
if ($el.length > 1) {
|
|
14841
|
-
console.warn('Multiple elements for xu-ui-id: ' + id, $el);
|
|
14842
|
-
}
|
|
14858
|
+
// const _$ = function ($elm) {
|
|
14859
|
+
// try {
|
|
14860
|
+
// const id = $elm.attr('xu-ui-id');
|
|
14861
|
+
// if (!id) return $elm;
|
|
14862
|
+
// const $el = $(`[xu-ui-id="${id}"]`); // $("#" + id);
|
|
14843
14863
|
|
|
14844
|
-
|
|
14845
|
-
|
|
14846
|
-
|
|
14847
|
-
}
|
|
14848
|
-
};
|
|
14864
|
+
// if ($el.length > 1) {
|
|
14865
|
+
// console.warn('Multiple elements for xu-ui-id: ' + id, $el);
|
|
14866
|
+
// }
|
|
14849
14867
|
|
|
14850
|
-
|
|
14851
|
-
|
|
14852
|
-
|
|
14853
|
-
|
|
14854
|
-
|
|
14855
|
-
$.each($div[0].attributes, function (index, attr) {
|
|
14856
|
-
attributes[attr.name] = attr.value;
|
|
14857
|
-
});
|
|
14868
|
+
// return $($el[0]);
|
|
14869
|
+
// } catch (e) {
|
|
14870
|
+
// console.error(e);
|
|
14871
|
+
// }
|
|
14872
|
+
// };
|
|
14858
14873
|
|
|
14859
|
-
|
|
14860
|
-
|
|
14861
|
-
|
|
14862
|
-
|
|
14863
|
-
|
|
14864
|
-
|
|
14865
|
-
|
|
14866
|
-
|
|
14867
|
-
try {
|
|
14868
|
-
const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
14869
|
-
_ds.data_feed.rows[row_idx][_iterate_info.iterator_key] = _iterate_info._key;
|
|
14870
|
-
} catch (err) {
|
|
14871
|
-
console.error(err);
|
|
14872
|
-
}
|
|
14873
|
-
}
|
|
14874
|
+
// CLIENT_ACTIVITY_TS = Date.now();
|
|
14875
|
+
// if (_$($container)?.data()?.xuData?.debug_info) _$($container).data().xuData.debug_info.hover_item = $div.attr('xu-ui-id');
|
|
14876
|
+
// if (!_ds) return;
|
|
14877
|
+
// ///////// SET Attributes///////////
|
|
14878
|
+
// let attributes = {};
|
|
14879
|
+
// $.each($div[0].attributes, function (index, attr) {
|
|
14880
|
+
// attributes[attr.name] = attr.value;
|
|
14881
|
+
// });
|
|
14874
14882
|
|
|
14875
|
-
|
|
14876
|
-
|
|
14877
|
-
|
|
14878
|
-
|
|
14879
|
-
|
|
14880
|
-
|
|
14881
|
-
|
|
14882
|
-
|
|
14883
|
-
|
|
14884
|
-
|
|
14885
|
-
|
|
14883
|
+
// SESSION_OBJ[SESSION_ID].DS_GLB[0].data_system.SYS_OBJ_WIN_ELEMENT_HOVERED_ATTRIBUTES = attributes;
|
|
14884
|
+
// //////////////////////////////////
|
|
14885
|
+
// if (!$div.data()?.xuData) return;
|
|
14886
|
+
// const _iterate_info = $div.data().xuData.iterate_info;
|
|
14887
|
+
// if (_iterate_info) {
|
|
14888
|
+
// if (_iterate_info.is_key_dynamic_field) {
|
|
14889
|
+
// _ds.dynamic_fields[_iterate_info.iterator_key].value = _iterate_info._key;
|
|
14890
|
+
// } else {
|
|
14891
|
+
// try {
|
|
14892
|
+
// const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
14893
|
+
// _ds.data_feed.rows[row_idx][_iterate_info.iterator_key] = _iterate_info._key;
|
|
14894
|
+
// } catch (err) {
|
|
14895
|
+
// console.error(err);
|
|
14896
|
+
// }
|
|
14897
|
+
// }
|
|
14886
14898
|
|
|
14887
|
-
|
|
14888
|
-
|
|
14889
|
-
|
|
14899
|
+
// if (_iterate_info.is_val_dynamic_field) {
|
|
14900
|
+
// _ds.dynamic_fields[_iterate_info.iterator_val].value = _iterate_info._val;
|
|
14901
|
+
// } else {
|
|
14902
|
+
// try {
|
|
14903
|
+
// const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
14904
|
+
// _ds.data_feed.rows[row_idx][_iterate_info.iterator_val] = _iterate_info._val;
|
|
14905
|
+
// } catch (err) {
|
|
14906
|
+
// console.error(err);
|
|
14907
|
+
// }
|
|
14908
|
+
// }
|
|
14909
|
+
// }
|
|
14890
14910
|
|
|
14891
|
-
|
|
14892
|
-
|
|
14911
|
+
// if ($div && _$($div) && _ds && paramsP.renderType === 'grid') {
|
|
14912
|
+
// func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'update_datasource', { currentRecordId: _$($div).data().xuData.currentRecordId }, null, null, paramsP.dsSessionP);
|
|
14913
|
+
// }
|
|
14893
14914
|
|
|
14894
|
-
|
|
14895
|
-
|
|
14896
|
-
|
|
14897
|
-
|
|
14898
|
-
|
|
14899
|
-
|
|
14900
|
-
|
|
14901
|
-
|
|
14902
|
-
|
|
14903
|
-
|
|
14904
|
-
|
|
14905
|
-
|
|
14906
|
-
|
|
14907
|
-
|
|
14915
|
+
// const set_value = function (field_id, value) {
|
|
14916
|
+
// var currentRecordId = _$($div).data().xuData.currentRecordId;
|
|
14917
|
+
|
|
14918
|
+
// func.UI.worker.add_to_queue(
|
|
14919
|
+
// SESSION_ID,
|
|
14920
|
+
// 'gui event',
|
|
14921
|
+
// 'update_datasource',
|
|
14922
|
+
// {
|
|
14923
|
+
// currentRecordId,
|
|
14924
|
+
// field_id,
|
|
14925
|
+
// field_value: value,
|
|
14926
|
+
// },
|
|
14927
|
+
// null,
|
|
14928
|
+
// null,
|
|
14929
|
+
// paramsP.dsSessionP,
|
|
14930
|
+
// );
|
|
14931
|
+
// };
|
|
14908
14932
|
|
|
14909
|
-
|
|
14910
|
-
|
|
14911
|
-
|
|
14912
|
-
|
|
14913
|
-
|
|
14914
|
-
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
14918
|
-
};
|
|
14919
|
-
func.UI.screen.hover_out = function (SESSION_ID, $container, is_skeleton, paramsP) {
|
|
14920
|
-
|
|
14933
|
+
// if ($div?.data()?.iterate_info) {
|
|
14934
|
+
// var data = $div.data().xuData.iterate_info;
|
|
14935
|
+
// if (data.iterator_key) {
|
|
14936
|
+
// set_value(data.iterator_key, data._key);
|
|
14937
|
+
// }
|
|
14938
|
+
// if (data.iterator_val) {
|
|
14939
|
+
// set_value(data.iterator_val, data._val);
|
|
14940
|
+
// }
|
|
14941
|
+
// }
|
|
14942
|
+
// };
|
|
14943
|
+
// func.UI.screen.hover_out = function (SESSION_ID, $container, is_skeleton, paramsP) {
|
|
14944
|
+
// if (is_skeleton || EXP_BUSY) return;
|
|
14921
14945
|
|
|
14922
|
-
|
|
14923
|
-
|
|
14946
|
+
// var _session = SESSION_OBJ[SESSION_ID];
|
|
14947
|
+
// var _ds = _session.DS_GLB[paramsP.dsSessionP];
|
|
14924
14948
|
|
|
14925
|
-
|
|
14926
|
-
|
|
14927
|
-
|
|
14928
|
-
|
|
14929
|
-
|
|
14949
|
+
// const _$ = function ($elm) {
|
|
14950
|
+
// try {
|
|
14951
|
+
// const id = $elm.attr('xu-ui-id');
|
|
14952
|
+
// if (!id) return $elm;
|
|
14953
|
+
// const $el = $(`[xu-ui-id="${id}"]`); // $("#" + id);
|
|
14930
14954
|
|
|
14931
|
-
|
|
14932
|
-
|
|
14933
|
-
|
|
14955
|
+
// if ($el.length > 1) {
|
|
14956
|
+
// console.warn('Multiple elements for xu-ui-id: ' + id, $el);
|
|
14957
|
+
// }
|
|
14934
14958
|
|
|
14935
|
-
|
|
14936
|
-
|
|
14937
|
-
|
|
14938
|
-
|
|
14939
|
-
|
|
14959
|
+
// return $($el[0]);
|
|
14960
|
+
// } catch (e) {
|
|
14961
|
+
// console.error(e);
|
|
14962
|
+
// }
|
|
14963
|
+
// };
|
|
14940
14964
|
|
|
14941
|
-
|
|
14942
|
-
|
|
14943
|
-
|
|
14944
|
-
|
|
14945
|
-
|
|
14946
|
-
|
|
14947
|
-
|
|
14948
|
-
};
|
|
14965
|
+
// CLIENT_ACTIVITY_TS = Date.now();
|
|
14966
|
+
// if (_$($container)?.data()?.xuData?.debug_info) {
|
|
14967
|
+
// _$($container).data().xuData.debug_info.hover_item = null;
|
|
14968
|
+
// }
|
|
14969
|
+
// if (_ds?.data_system) {
|
|
14970
|
+
// SESSION_OBJ[SESSION_ID].DS_GLB[0].data_system.SYS_OBJ_WIN_ELEMENT_HOVERED_ATTRIBUTES = {};
|
|
14971
|
+
// }
|
|
14972
|
+
// };
|
|
14949
14973
|
func.UI.component = {};
|
|
14950
14974
|
|
|
14951
14975
|
func.UI.component.create_app_modal_component = function (
|