@xuda.io/runtime-bundle 1.0.974 → 1.0.975
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.
|
@@ -31767,7 +31767,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
31767
31767
|
// };
|
|
31768
31768
|
const program = val.value?.prog || val.value;
|
|
31769
31769
|
var $wrapper = $('<div>');
|
|
31770
|
-
var $div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, nodeP.attributes, null, null, null, $wrapper, '');
|
|
31770
|
+
var $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, nodeP.attributes, null, null, null, $wrapper, '');
|
|
31771
31771
|
const params_obj = await get_params_obj_new(SESSION_ID, program, nodeP, paramsP.dsSessionP);
|
|
31772
31772
|
let ret_init = await func.UI.screen.init(SESSION_ID, program, paramsP.screenId, _ds, $div, null, _ds.currentRecordId, jobNoP, true, params_obj.params_res, 'alterXu_panel', undefined, undefined, params_obj.params_raw);
|
|
31773
31773
|
ret = {
|
|
@@ -33090,7 +33090,7 @@ func.UI.screen.panel_post_render_handler = async function (
|
|
|
33090
33090
|
return jobNoP;
|
|
33091
33091
|
};
|
|
33092
33092
|
|
|
33093
|
-
func.UI.screen.create_container = function (SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, classP, elem_propP, div_typeP, $appendToP, attr_str) {
|
|
33093
|
+
func.UI.screen.create_container = async function (SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, classP, elem_propP, div_typeP, $appendToP, attr_str) {
|
|
33094
33094
|
const _paramsP = _.cloneDeep(paramsP);
|
|
33095
33095
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_paramsP.dsSessionP];
|
|
33096
33096
|
var $appendTo = $container;
|
|
@@ -33161,7 +33161,24 @@ func.UI.screen.create_container = function (SESSION_ID, $root_container, nodeP,
|
|
|
33161
33161
|
// $div = $(`<${div} ${attr_str ? attr_str : ""} ${svg_attributes_str}>`);
|
|
33162
33162
|
// } else {
|
|
33163
33163
|
// $div = $(`<${div} ${attr_str ? attr_str : ""}>`);
|
|
33164
|
-
|
|
33164
|
+
|
|
33165
|
+
async function generateHash(str, algorithm = 'SHA-256') {
|
|
33166
|
+
// Encode the string as UTF-8
|
|
33167
|
+
const msgBuffer = new TextEncoder().encode(str);
|
|
33168
|
+
|
|
33169
|
+
// Hash the string
|
|
33170
|
+
const hashBuffer = await crypto.subtle.digest(algorithm, msgBuffer);
|
|
33171
|
+
|
|
33172
|
+
// Convert to hex string
|
|
33173
|
+
const hashArray = Array.from(new Uint8Array(hashBuffer));
|
|
33174
|
+
const hashHex = hashArray.map((b) => b.toString(16).padStart(2, '0')).join('');
|
|
33175
|
+
|
|
33176
|
+
return hashHex;
|
|
33177
|
+
}
|
|
33178
|
+
|
|
33179
|
+
const new_ui_id = await generateHash(ui_id);
|
|
33180
|
+
|
|
33181
|
+
$div.attr('xu-ui-id', new_ui_id).data({
|
|
33165
33182
|
xuData: {
|
|
33166
33183
|
prog_id: _paramsP.prog_id,
|
|
33167
33184
|
nodeid: nodeP.id,
|
|
@@ -33178,7 +33195,7 @@ func.UI.screen.create_container = function (SESSION_ID, $root_container, nodeP,
|
|
|
33178
33195
|
node: nodeP,
|
|
33179
33196
|
node_org: _.cloneDeep(nodeP),
|
|
33180
33197
|
is_panelP: _paramsP.is_panelP,
|
|
33181
|
-
ui_id,
|
|
33198
|
+
ui_id: new_ui_id,
|
|
33182
33199
|
elem_prop: elem_propP,
|
|
33183
33200
|
debug_info: {
|
|
33184
33201
|
id: nodeP.id,
|
|
@@ -33852,7 +33869,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
33852
33869
|
var exist_elm_obj = get_element_info();
|
|
33853
33870
|
var $div = exist_elm_obj.div;
|
|
33854
33871
|
if (!exist_elm_obj.div) {
|
|
33855
|
-
$div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, 'widget_wrapper', null, null, null, null);
|
|
33872
|
+
$div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, 'widget_wrapper', null, null, null, null);
|
|
33856
33873
|
|
|
33857
33874
|
//////////////////////////
|
|
33858
33875
|
|
|
@@ -34054,7 +34071,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34054
34071
|
|
|
34055
34072
|
if (!exist_elm_obj.div) {
|
|
34056
34073
|
var $wrapper = $('<div>');
|
|
34057
|
-
$div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, 'div', $wrapper, '');
|
|
34074
|
+
$div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, 'div', $wrapper, '');
|
|
34058
34075
|
|
|
34059
34076
|
if (!$div) return;
|
|
34060
34077
|
|
|
@@ -34194,7 +34211,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34194
34211
|
};
|
|
34195
34212
|
|
|
34196
34213
|
var $wrapper = $('<div>');
|
|
34197
|
-
$div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, null, $wrapper, '');
|
|
34214
|
+
$div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, null, $wrapper, '');
|
|
34198
34215
|
|
|
34199
34216
|
let ret = await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $div.clone(true), true, undefined, refreshed_ds);
|
|
34200
34217
|
if (ret.abort) {
|
|
@@ -34224,7 +34241,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34224
34241
|
if (!element || element === 'script') return await done();
|
|
34225
34242
|
let str = '';
|
|
34226
34243
|
|
|
34227
|
-
var $div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, element, null, str);
|
|
34244
|
+
var $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, element, null, str);
|
|
34228
34245
|
|
|
34229
34246
|
$div.hover(
|
|
34230
34247
|
function (e) {
|