@xuda.io/runtime-bundle 1.0.1008 → 1.0.1009
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 +30 -29
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +30 -29
- package/js/xuda-runtime-slim.min.es.js +30 -29
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +7 -0
- package/js/xuda-worker-bundle.js +7 -0
- package/js/xuda-worker-bundle.min.js +1 -1
- package/js/xuda_common-bundle.js +7 -0
- package/js/xuda_common-bundle.min.js +1 -1
- package/package.json +1 -1
|
@@ -24630,6 +24630,13 @@ func.common.get_data_from_websocket = async function (SESSION_ID, serviceP, data
|
|
|
24630
24630
|
dbs_calls();
|
|
24631
24631
|
});
|
|
24632
24632
|
};
|
|
24633
|
+
|
|
24634
|
+
func.common.sha256 = async function (str) {
|
|
24635
|
+
const enc = new TextEncoder();
|
|
24636
|
+
const buf = await crypto.subtle.digest('SHA-256', enc.encode(str));
|
|
24637
|
+
const bytes = new Uint8Array(buf);
|
|
24638
|
+
return [...bytes].map((b) => b.toString(16).padStart(2, '0')).join('');
|
|
24639
|
+
};
|
|
24633
24640
|
glb.DEBUG_INFO_OBJ = {};
|
|
24634
24641
|
// var CONNECTION_ATTEMPTS = 0;
|
|
24635
24642
|
glb.APP_INFO = {};
|
|
@@ -31769,7 +31776,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
31769
31776
|
// };
|
|
31770
31777
|
const program = val.value?.prog || val.value;
|
|
31771
31778
|
var $wrapper = $('<div>');
|
|
31772
|
-
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, '');
|
|
31779
|
+
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, '');
|
|
31773
31780
|
const params_obj = await get_params_obj_new(SESSION_ID, program, nodeP, paramsP.dsSessionP);
|
|
31774
31781
|
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);
|
|
31775
31782
|
ret = {
|
|
@@ -33247,7 +33254,7 @@ func.UI.screen.panel_post_render_handler = async function (
|
|
|
33247
33254
|
return jobNoP;
|
|
33248
33255
|
};
|
|
33249
33256
|
|
|
33250
|
-
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) {
|
|
33257
|
+
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) {
|
|
33251
33258
|
const _paramsP = _.cloneDeep(paramsP);
|
|
33252
33259
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_paramsP.dsSessionP];
|
|
33253
33260
|
var $appendTo = $container;
|
|
@@ -33314,23 +33321,24 @@ func.UI.screen.create_container = function (SESSION_ID, $root_container, nodeP,
|
|
|
33314
33321
|
$div = $(`<${div} ${attr_str ? attr_str : ''}>`);
|
|
33315
33322
|
}
|
|
33316
33323
|
|
|
33317
|
-
// Returns a 32-bit unsigned integer hash of a string (FNV-1a)
|
|
33318
|
-
function hash32(str) {
|
|
33319
|
-
|
|
33320
|
-
|
|
33321
|
-
|
|
33322
|
-
|
|
33323
|
-
|
|
33324
|
-
|
|
33325
|
-
|
|
33326
|
-
|
|
33327
|
-
}
|
|
33324
|
+
// // Returns a 32-bit unsigned integer hash of a string (FNV-1a)
|
|
33325
|
+
// function hash32(str) {
|
|
33326
|
+
// let h = 0x811c9dc5; // FNV offset basis
|
|
33327
|
+
// for (let i = 0; i < str.length; i++) {
|
|
33328
|
+
// h ^= str.charCodeAt(i);
|
|
33329
|
+
// // multiply by FNV prime (2^24 + 2^8 + 0x93) with 32-bit overflow
|
|
33330
|
+
// h += (h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24);
|
|
33331
|
+
// }
|
|
33332
|
+
// // Convert to unsigned 32-bit
|
|
33333
|
+
// return h >>> 0;
|
|
33334
|
+
// }
|
|
33328
33335
|
|
|
33329
|
-
function hash32hex(str) {
|
|
33330
|
-
|
|
33331
|
-
}
|
|
33336
|
+
// function hash32hex(str) {
|
|
33337
|
+
// return (hash32(str) >>> 0).toString(16).padStart(8, '0');
|
|
33338
|
+
// }
|
|
33332
33339
|
|
|
33333
|
-
const new_ui_id = hash32hex(ui_id);
|
|
33340
|
+
// const new_ui_id = hash32hex(ui_id);
|
|
33341
|
+
const new_ui_id = await func.common.sha256(ui_id);
|
|
33334
33342
|
|
|
33335
33343
|
$div.attr('xu-ui-id', new_ui_id).data({
|
|
33336
33344
|
xuData: {
|
|
@@ -34023,7 +34031,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34023
34031
|
var exist_elm_obj = get_element_info();
|
|
34024
34032
|
var $div = exist_elm_obj.div;
|
|
34025
34033
|
if (!exist_elm_obj.div) {
|
|
34026
|
-
$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);
|
|
34034
|
+
$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);
|
|
34027
34035
|
|
|
34028
34036
|
//////////////////////////
|
|
34029
34037
|
|
|
@@ -34225,7 +34233,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34225
34233
|
|
|
34226
34234
|
if (!exist_elm_obj.div) {
|
|
34227
34235
|
var $wrapper = $('<div>');
|
|
34228
|
-
$div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, 'div', $wrapper, '');
|
|
34236
|
+
$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, '');
|
|
34229
34237
|
|
|
34230
34238
|
if (!$div) return;
|
|
34231
34239
|
|
|
@@ -34365,7 +34373,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34365
34373
|
};
|
|
34366
34374
|
|
|
34367
34375
|
var $wrapper = $('<div>');
|
|
34368
|
-
$div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, null, $wrapper, '');
|
|
34376
|
+
$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, '');
|
|
34369
34377
|
|
|
34370
34378
|
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);
|
|
34371
34379
|
if (ret.abort) {
|
|
@@ -34395,7 +34403,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34395
34403
|
if (!element || element === 'script') return await done();
|
|
34396
34404
|
let str = '';
|
|
34397
34405
|
|
|
34398
|
-
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);
|
|
34406
|
+
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);
|
|
34399
34407
|
|
|
34400
34408
|
$div.hover(
|
|
34401
34409
|
function (e) {
|
|
@@ -34579,14 +34587,7 @@ const get_xu_render_cache_str = async function (SESSION_ID, dsSessionP) {
|
|
|
34579
34587
|
str += await get_xu_render_cache_str(SESSION_ID, _ds.parentDataSourceNo);
|
|
34580
34588
|
}
|
|
34581
34589
|
|
|
34582
|
-
|
|
34583
|
-
const enc = new TextEncoder();
|
|
34584
|
-
const buf = await crypto.subtle.digest('SHA-256', enc.encode(str));
|
|
34585
|
-
const bytes = new Uint8Array(buf);
|
|
34586
|
-
return [...bytes].map((b) => b.toString(16).padStart(2, '0')).join('');
|
|
34587
|
-
}
|
|
34588
|
-
|
|
34589
|
-
return await sha256(str);
|
|
34590
|
+
return await func.common.sha256(str);
|
|
34590
34591
|
};
|
|
34591
34592
|
func.UI.component = {};
|
|
34592
34593
|
|