@xuda.io/runtime-bundle 1.0.831 → 1.0.833
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 +142 -117
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +143 -118
- package/js/xuda-runtime-slim.min.es.js +143 -118
- package/js/xuda-runtime-slim.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -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,21 @@ 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);
|
|
14792
|
+
observer_outViewport.observe($div[0]);
|
|
14774
14793
|
});
|
|
14775
14794
|
|
|
14776
|
-
|
|
14795
|
+
$div.on('outViewport', function () {
|
|
14796
|
+
$div.empty();
|
|
14797
|
+
observer_inViewport.observe($div[0]);
|
|
14798
|
+
});
|
|
14799
|
+
|
|
14800
|
+
observer_inViewport.observe($div[0]);
|
|
14801
|
+
// observer_outViewport.observe($div[0]);
|
|
14777
14802
|
} else {
|
|
14778
14803
|
// await render_child();
|
|
14779
14804
|
await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
@@ -14825,127 +14850,127 @@ func.UI.screen.refresh_document_changes_for_realtime_update = async function (SE
|
|
|
14825
14850
|
}
|
|
14826
14851
|
};
|
|
14827
14852
|
|
|
14828
|
-
func.UI.screen.hover_in = function (SESSION_ID, $div, $container, paramsP, is_skeleton) {
|
|
14829
|
-
|
|
14853
|
+
// func.UI.screen.hover_in = function (SESSION_ID, $div, $container, paramsP, is_skeleton) {
|
|
14854
|
+
// if (is_skeleton || EXP_BUSY) return;
|
|
14830
14855
|
|
|
14831
|
-
|
|
14832
|
-
|
|
14856
|
+
// var _session = SESSION_OBJ[SESSION_ID];
|
|
14857
|
+
// var _ds = _session.DS_GLB[paramsP.dsSessionP];
|
|
14833
14858
|
|
|
14834
|
-
|
|
14835
|
-
|
|
14836
|
-
|
|
14837
|
-
|
|
14838
|
-
|
|
14839
|
-
|
|
14840
|
-
if ($el.length > 1) {
|
|
14841
|
-
console.warn('Multiple elements for xu-ui-id: ' + id, $el);
|
|
14842
|
-
}
|
|
14859
|
+
// const _$ = function ($elm) {
|
|
14860
|
+
// try {
|
|
14861
|
+
// const id = $elm.attr('xu-ui-id');
|
|
14862
|
+
// if (!id) return $elm;
|
|
14863
|
+
// const $el = $(`[xu-ui-id="${id}"]`); // $("#" + id);
|
|
14843
14864
|
|
|
14844
|
-
|
|
14845
|
-
|
|
14846
|
-
|
|
14847
|
-
}
|
|
14848
|
-
};
|
|
14865
|
+
// if ($el.length > 1) {
|
|
14866
|
+
// console.warn('Multiple elements for xu-ui-id: ' + id, $el);
|
|
14867
|
+
// }
|
|
14849
14868
|
|
|
14850
|
-
|
|
14851
|
-
|
|
14852
|
-
|
|
14853
|
-
|
|
14854
|
-
|
|
14855
|
-
$.each($div[0].attributes, function (index, attr) {
|
|
14856
|
-
attributes[attr.name] = attr.value;
|
|
14857
|
-
});
|
|
14869
|
+
// return $($el[0]);
|
|
14870
|
+
// } catch (e) {
|
|
14871
|
+
// console.error(e);
|
|
14872
|
+
// }
|
|
14873
|
+
// };
|
|
14858
14874
|
|
|
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
|
-
}
|
|
14875
|
+
// CLIENT_ACTIVITY_TS = Date.now();
|
|
14876
|
+
// if (_$($container)?.data()?.xuData?.debug_info) _$($container).data().xuData.debug_info.hover_item = $div.attr('xu-ui-id');
|
|
14877
|
+
// if (!_ds) return;
|
|
14878
|
+
// ///////// SET Attributes///////////
|
|
14879
|
+
// let attributes = {};
|
|
14880
|
+
// $.each($div[0].attributes, function (index, attr) {
|
|
14881
|
+
// attributes[attr.name] = attr.value;
|
|
14882
|
+
// });
|
|
14874
14883
|
|
|
14875
|
-
|
|
14876
|
-
|
|
14877
|
-
|
|
14878
|
-
|
|
14879
|
-
|
|
14880
|
-
|
|
14881
|
-
|
|
14882
|
-
|
|
14883
|
-
|
|
14884
|
-
|
|
14885
|
-
|
|
14884
|
+
// SESSION_OBJ[SESSION_ID].DS_GLB[0].data_system.SYS_OBJ_WIN_ELEMENT_HOVERED_ATTRIBUTES = attributes;
|
|
14885
|
+
// //////////////////////////////////
|
|
14886
|
+
// if (!$div.data()?.xuData) return;
|
|
14887
|
+
// const _iterate_info = $div.data().xuData.iterate_info;
|
|
14888
|
+
// if (_iterate_info) {
|
|
14889
|
+
// if (_iterate_info.is_key_dynamic_field) {
|
|
14890
|
+
// _ds.dynamic_fields[_iterate_info.iterator_key].value = _iterate_info._key;
|
|
14891
|
+
// } else {
|
|
14892
|
+
// try {
|
|
14893
|
+
// const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
14894
|
+
// _ds.data_feed.rows[row_idx][_iterate_info.iterator_key] = _iterate_info._key;
|
|
14895
|
+
// } catch (err) {
|
|
14896
|
+
// console.error(err);
|
|
14897
|
+
// }
|
|
14898
|
+
// }
|
|
14886
14899
|
|
|
14887
|
-
|
|
14888
|
-
|
|
14889
|
-
|
|
14900
|
+
// if (_iterate_info.is_val_dynamic_field) {
|
|
14901
|
+
// _ds.dynamic_fields[_iterate_info.iterator_val].value = _iterate_info._val;
|
|
14902
|
+
// } else {
|
|
14903
|
+
// try {
|
|
14904
|
+
// const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
14905
|
+
// _ds.data_feed.rows[row_idx][_iterate_info.iterator_val] = _iterate_info._val;
|
|
14906
|
+
// } catch (err) {
|
|
14907
|
+
// console.error(err);
|
|
14908
|
+
// }
|
|
14909
|
+
// }
|
|
14910
|
+
// }
|
|
14890
14911
|
|
|
14891
|
-
|
|
14892
|
-
|
|
14912
|
+
// if ($div && _$($div) && _ds && paramsP.renderType === 'grid') {
|
|
14913
|
+
// func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'update_datasource', { currentRecordId: _$($div).data().xuData.currentRecordId }, null, null, paramsP.dsSessionP);
|
|
14914
|
+
// }
|
|
14893
14915
|
|
|
14894
|
-
|
|
14895
|
-
|
|
14896
|
-
|
|
14897
|
-
|
|
14898
|
-
|
|
14899
|
-
|
|
14900
|
-
|
|
14901
|
-
|
|
14902
|
-
|
|
14903
|
-
|
|
14904
|
-
|
|
14905
|
-
|
|
14906
|
-
|
|
14907
|
-
|
|
14916
|
+
// const set_value = function (field_id, value) {
|
|
14917
|
+
// var currentRecordId = _$($div).data().xuData.currentRecordId;
|
|
14918
|
+
|
|
14919
|
+
// func.UI.worker.add_to_queue(
|
|
14920
|
+
// SESSION_ID,
|
|
14921
|
+
// 'gui event',
|
|
14922
|
+
// 'update_datasource',
|
|
14923
|
+
// {
|
|
14924
|
+
// currentRecordId,
|
|
14925
|
+
// field_id,
|
|
14926
|
+
// field_value: value,
|
|
14927
|
+
// },
|
|
14928
|
+
// null,
|
|
14929
|
+
// null,
|
|
14930
|
+
// paramsP.dsSessionP,
|
|
14931
|
+
// );
|
|
14932
|
+
// };
|
|
14908
14933
|
|
|
14909
|
-
|
|
14910
|
-
|
|
14911
|
-
|
|
14912
|
-
|
|
14913
|
-
|
|
14914
|
-
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
14918
|
-
};
|
|
14919
|
-
func.UI.screen.hover_out = function (SESSION_ID, $container, is_skeleton, paramsP) {
|
|
14920
|
-
|
|
14934
|
+
// if ($div?.data()?.iterate_info) {
|
|
14935
|
+
// var data = $div.data().xuData.iterate_info;
|
|
14936
|
+
// if (data.iterator_key) {
|
|
14937
|
+
// set_value(data.iterator_key, data._key);
|
|
14938
|
+
// }
|
|
14939
|
+
// if (data.iterator_val) {
|
|
14940
|
+
// set_value(data.iterator_val, data._val);
|
|
14941
|
+
// }
|
|
14942
|
+
// }
|
|
14943
|
+
// };
|
|
14944
|
+
// func.UI.screen.hover_out = function (SESSION_ID, $container, is_skeleton, paramsP) {
|
|
14945
|
+
// if (is_skeleton || EXP_BUSY) return;
|
|
14921
14946
|
|
|
14922
|
-
|
|
14923
|
-
|
|
14947
|
+
// var _session = SESSION_OBJ[SESSION_ID];
|
|
14948
|
+
// var _ds = _session.DS_GLB[paramsP.dsSessionP];
|
|
14924
14949
|
|
|
14925
|
-
|
|
14926
|
-
|
|
14927
|
-
|
|
14928
|
-
|
|
14929
|
-
|
|
14950
|
+
// const _$ = function ($elm) {
|
|
14951
|
+
// try {
|
|
14952
|
+
// const id = $elm.attr('xu-ui-id');
|
|
14953
|
+
// if (!id) return $elm;
|
|
14954
|
+
// const $el = $(`[xu-ui-id="${id}"]`); // $("#" + id);
|
|
14930
14955
|
|
|
14931
|
-
|
|
14932
|
-
|
|
14933
|
-
|
|
14956
|
+
// if ($el.length > 1) {
|
|
14957
|
+
// console.warn('Multiple elements for xu-ui-id: ' + id, $el);
|
|
14958
|
+
// }
|
|
14934
14959
|
|
|
14935
|
-
|
|
14936
|
-
|
|
14937
|
-
|
|
14938
|
-
|
|
14939
|
-
|
|
14960
|
+
// return $($el[0]);
|
|
14961
|
+
// } catch (e) {
|
|
14962
|
+
// console.error(e);
|
|
14963
|
+
// }
|
|
14964
|
+
// };
|
|
14940
14965
|
|
|
14941
|
-
|
|
14942
|
-
|
|
14943
|
-
|
|
14944
|
-
|
|
14945
|
-
|
|
14946
|
-
|
|
14947
|
-
|
|
14948
|
-
};
|
|
14966
|
+
// CLIENT_ACTIVITY_TS = Date.now();
|
|
14967
|
+
// if (_$($container)?.data()?.xuData?.debug_info) {
|
|
14968
|
+
// _$($container).data().xuData.debug_info.hover_item = null;
|
|
14969
|
+
// }
|
|
14970
|
+
// if (_ds?.data_system) {
|
|
14971
|
+
// SESSION_OBJ[SESSION_ID].DS_GLB[0].data_system.SYS_OBJ_WIN_ELEMENT_HOVERED_ATTRIBUTES = {};
|
|
14972
|
+
// }
|
|
14973
|
+
// };
|
|
14949
14974
|
func.UI.component = {};
|
|
14950
14975
|
|
|
14951
14976
|
func.UI.component.create_app_modal_component = function (
|