@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.
|
@@ -31390,7 +31390,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
31390
31390
|
if (attr === 'xu-exp:xu-for' || attr === 'xu-for') {
|
|
31391
31391
|
if (val?.includes(field_id)) {
|
|
31392
31392
|
const parent_element_ui_id = node_id;
|
|
31393
|
-
|
|
31393
|
+
debugger;
|
|
31394
31394
|
let _$elem = $(`[xu-ui-id^=${parent_element_ui_id}]`);
|
|
31395
31395
|
|
|
31396
31396
|
const _elem_key = parent_element_ui_id;
|
|
@@ -33162,21 +33162,38 @@ func.UI.screen.create_container = async function (SESSION_ID, $root_container, n
|
|
|
33162
33162
|
// } else {
|
|
33163
33163
|
// $div = $(`<${div} ${attr_str ? attr_str : ""}>`);
|
|
33164
33164
|
|
|
33165
|
-
async function generateHash(str, algorithm = 'SHA-256') {
|
|
33166
|
-
|
|
33167
|
-
|
|
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('');
|
|
33168
33175
|
|
|
33169
|
-
|
|
33170
|
-
|
|
33176
|
+
// return hashHex;
|
|
33177
|
+
// }
|
|
33171
33178
|
|
|
33172
|
-
|
|
33173
|
-
|
|
33174
|
-
|
|
33179
|
+
// Returns a 32-bit unsigned integer hash of a string (FNV-1a)
|
|
33180
|
+
function hash32(str) {
|
|
33181
|
+
let h = 0x811c9dc5; // FNV offset basis
|
|
33182
|
+
for (let i = 0; i < str.length; i++) {
|
|
33183
|
+
h ^= str.charCodeAt(i);
|
|
33184
|
+
// multiply by FNV prime (2^24 + 2^8 + 0x93) with 32-bit overflow
|
|
33185
|
+
h += (h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24);
|
|
33186
|
+
}
|
|
33187
|
+
// Convert to unsigned 32-bit
|
|
33188
|
+
return h >>> 0;
|
|
33189
|
+
}
|
|
33175
33190
|
|
|
33176
|
-
|
|
33191
|
+
function hash32hex(str) {
|
|
33192
|
+
return (hash32(str) >>> 0).toString(16).padStart(8, '0');
|
|
33177
33193
|
}
|
|
33178
33194
|
|
|
33179
|
-
const new_ui_id = await generateHash(ui_id);
|
|
33195
|
+
// const new_ui_id = await generateHash(ui_id);
|
|
33196
|
+
const new_ui_id = hash32hex(ui_id);
|
|
33180
33197
|
|
|
33181
33198
|
$div.attr('xu-ui-id', new_ui_id).data({
|
|
33182
33199
|
xuData: {
|