@xuda.io/runtime-bundle 1.0.975 → 1.0.977
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-slim.js
CHANGED
|
@@ -11704,7 +11704,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11704
11704
|
if (attr === 'xu-exp:xu-for' || attr === 'xu-for') {
|
|
11705
11705
|
if (val?.includes(field_id)) {
|
|
11706
11706
|
const parent_element_ui_id = node_id;
|
|
11707
|
-
|
|
11707
|
+
debugger;
|
|
11708
11708
|
let _$elem = $(`[xu-ui-id^=${parent_element_ui_id}]`);
|
|
11709
11709
|
|
|
11710
11710
|
const _elem_key = parent_element_ui_id;
|
|
@@ -13476,21 +13476,38 @@ func.UI.screen.create_container = async function (SESSION_ID, $root_container, n
|
|
|
13476
13476
|
// } else {
|
|
13477
13477
|
// $div = $(`<${div} ${attr_str ? attr_str : ""}>`);
|
|
13478
13478
|
|
|
13479
|
-
async function generateHash(str, algorithm = 'SHA-256') {
|
|
13480
|
-
|
|
13481
|
-
|
|
13479
|
+
// async function generateHash(str, algorithm = 'SHA-256') {
|
|
13480
|
+
// // Encode the string as UTF-8
|
|
13481
|
+
// const msgBuffer = new TextEncoder().encode(str);
|
|
13482
|
+
|
|
13483
|
+
// // Hash the string
|
|
13484
|
+
// const hashBuffer = await crypto.subtle.digest(algorithm, msgBuffer);
|
|
13485
|
+
|
|
13486
|
+
// // Convert to hex string
|
|
13487
|
+
// const hashArray = Array.from(new Uint8Array(hashBuffer));
|
|
13488
|
+
// const hashHex = hashArray.map((b) => b.toString(16).padStart(2, '0')).join('');
|
|
13482
13489
|
|
|
13483
|
-
|
|
13484
|
-
|
|
13490
|
+
// return hashHex;
|
|
13491
|
+
// }
|
|
13485
13492
|
|
|
13486
|
-
|
|
13487
|
-
|
|
13488
|
-
|
|
13493
|
+
// Returns a 32-bit unsigned integer hash of a string (FNV-1a)
|
|
13494
|
+
function hash32(str) {
|
|
13495
|
+
let h = 0x811c9dc5; // FNV offset basis
|
|
13496
|
+
for (let i = 0; i < str.length; i++) {
|
|
13497
|
+
h ^= str.charCodeAt(i);
|
|
13498
|
+
// multiply by FNV prime (2^24 + 2^8 + 0x93) with 32-bit overflow
|
|
13499
|
+
h += (h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24);
|
|
13500
|
+
}
|
|
13501
|
+
// Convert to unsigned 32-bit
|
|
13502
|
+
return h >>> 0;
|
|
13503
|
+
}
|
|
13489
13504
|
|
|
13490
|
-
|
|
13505
|
+
function hash32hex(str) {
|
|
13506
|
+
return (hash32(str) >>> 0).toString(16).padStart(8, '0');
|
|
13491
13507
|
}
|
|
13492
13508
|
|
|
13493
|
-
const new_ui_id = await generateHash(ui_id);
|
|
13509
|
+
// const new_ui_id = await generateHash(ui_id);
|
|
13510
|
+
const new_ui_id = hash32hex(ui_id);
|
|
13494
13511
|
|
|
13495
13512
|
$div.attr('xu-ui-id', new_ui_id).data({
|
|
13496
13513
|
xuData: {
|
|
@@ -9431,7 +9431,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9431
9431
|
if (attr === 'xu-exp:xu-for' || attr === 'xu-for') {
|
|
9432
9432
|
if (val?.includes(field_id)) {
|
|
9433
9433
|
const parent_element_ui_id = node_id;
|
|
9434
|
-
|
|
9434
|
+
debugger;
|
|
9435
9435
|
let _$elem = $(`[xu-ui-id^=${parent_element_ui_id}]`);
|
|
9436
9436
|
|
|
9437
9437
|
const _elem_key = parent_element_ui_id;
|
|
@@ -11203,21 +11203,38 @@ func.UI.screen.create_container = async function (SESSION_ID, $root_container, n
|
|
|
11203
11203
|
// } else {
|
|
11204
11204
|
// $div = $(`<${div} ${attr_str ? attr_str : ""}>`);
|
|
11205
11205
|
|
|
11206
|
-
async function generateHash(str, algorithm = 'SHA-256') {
|
|
11207
|
-
|
|
11208
|
-
|
|
11206
|
+
// async function generateHash(str, algorithm = 'SHA-256') {
|
|
11207
|
+
// // Encode the string as UTF-8
|
|
11208
|
+
// const msgBuffer = new TextEncoder().encode(str);
|
|
11209
|
+
|
|
11210
|
+
// // Hash the string
|
|
11211
|
+
// const hashBuffer = await crypto.subtle.digest(algorithm, msgBuffer);
|
|
11212
|
+
|
|
11213
|
+
// // Convert to hex string
|
|
11214
|
+
// const hashArray = Array.from(new Uint8Array(hashBuffer));
|
|
11215
|
+
// const hashHex = hashArray.map((b) => b.toString(16).padStart(2, '0')).join('');
|
|
11209
11216
|
|
|
11210
|
-
|
|
11211
|
-
|
|
11217
|
+
// return hashHex;
|
|
11218
|
+
// }
|
|
11212
11219
|
|
|
11213
|
-
|
|
11214
|
-
|
|
11215
|
-
|
|
11220
|
+
// Returns a 32-bit unsigned integer hash of a string (FNV-1a)
|
|
11221
|
+
function hash32(str) {
|
|
11222
|
+
let h = 0x811c9dc5; // FNV offset basis
|
|
11223
|
+
for (let i = 0; i < str.length; i++) {
|
|
11224
|
+
h ^= str.charCodeAt(i);
|
|
11225
|
+
// multiply by FNV prime (2^24 + 2^8 + 0x93) with 32-bit overflow
|
|
11226
|
+
h += (h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24);
|
|
11227
|
+
}
|
|
11228
|
+
// Convert to unsigned 32-bit
|
|
11229
|
+
return h >>> 0;
|
|
11230
|
+
}
|
|
11216
11231
|
|
|
11217
|
-
|
|
11232
|
+
function hash32hex(str) {
|
|
11233
|
+
return (hash32(str) >>> 0).toString(16).padStart(8, '0');
|
|
11218
11234
|
}
|
|
11219
11235
|
|
|
11220
|
-
const new_ui_id = await generateHash(ui_id);
|
|
11236
|
+
// const new_ui_id = await generateHash(ui_id);
|
|
11237
|
+
const new_ui_id = hash32hex(ui_id);
|
|
11221
11238
|
|
|
11222
11239
|
$div.attr('xu-ui-id', new_ui_id).data({
|
|
11223
11240
|
xuData: {
|