@xuda.io/runtime-bundle 1.0.1127 → 1.0.1129
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 +33 -11
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-mini-bundle.js +2 -2
- package/js/xuda-runtime-mini-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +33 -11
- package/js/xuda-runtime-slim.min.es.js +33 -11
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +28 -7
- package/js/xuda-worker-bundle.js +28 -7
- package/js/xuda-worker-bundle.min.js +1 -1
- package/js/xuda_common-bundle.js +26 -5
- package/js/xuda_common-bundle.min.js +1 -1
- package/package.json +1 -1
|
@@ -24631,11 +24631,32 @@ func.common.get_data_from_websocket = async function (SESSION_ID, serviceP, data
|
|
|
24631
24631
|
});
|
|
24632
24632
|
};
|
|
24633
24633
|
|
|
24634
|
-
func.common.sha256 = async function (
|
|
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('');
|
|
24634
|
+
func.common.sha256 = async function (inputString) {
|
|
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
|
+
|
|
24640
|
+
// 1. Create a hash buffer from the input string using SHA-256.
|
|
24641
|
+
// This part remains the same as it provides a strong, unique cryptographic starting point.
|
|
24642
|
+
const buffer = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(inputString));
|
|
24643
|
+
|
|
24644
|
+
// 2. Interpret the first 8 bytes (64 bits) of the hash as one big number.
|
|
24645
|
+
const view = new DataView(buffer);
|
|
24646
|
+
const bigInt = view.getBigUint64(0, false); // `false` for big-endian
|
|
24647
|
+
|
|
24648
|
+
// 3. Convert the BigInt to a Base36 string.
|
|
24649
|
+
// The .toString(36) method handles the conversion to an alphanumeric representation (0-9, a-z).
|
|
24650
|
+
const base36Hash = bigInt.toString(36);
|
|
24651
|
+
|
|
24652
|
+
// 4. Take the first 10 characters. If it's shorter, it will just return the whole string.
|
|
24653
|
+
// For a 64-bit integer, the Base36 representation will be about 13 characters long,
|
|
24654
|
+
// so slicing is a reliable way to get a fixed length.
|
|
24655
|
+
const shortHash = base36Hash.slice(0, 10);
|
|
24656
|
+
|
|
24657
|
+
// 5. Pad the start in the unlikely case the hash is shorter than 10 characters.
|
|
24658
|
+
// This ensures the output is always exactly 10 characters long.
|
|
24659
|
+
return shortHash.padStart(10, '0');
|
|
24639
24660
|
};
|
|
24640
24661
|
|
|
24641
24662
|
glb.new_xu_render = false;
|
|
@@ -26730,7 +26751,7 @@ func.utils.get_plugin_resource = function (SESSION_ID, plugin_name, plugin_resou
|
|
|
26730
26751
|
return `${_conf.plugins_drive_path}/${_session.app_id}/node_modules/${plugin_name}/${resource}`;
|
|
26731
26752
|
} else {
|
|
26732
26753
|
// return `./node_modules/${plugin_name}/${resource}?app_id=${_session.app_id}`;
|
|
26733
|
-
return `https://${_session.domain}/plugins/${plugin_name}/${resource}?app_id=${_session.app_id}`;
|
|
26754
|
+
return `https://${_session.domain}/plugins/${plugin_name}/${resource}?app_id=${_session.app_id}&ts=${_session?.opt?.app_build_id || 0}`;
|
|
26734
26755
|
}
|
|
26735
26756
|
};
|
|
26736
26757
|
|
|
@@ -26806,7 +26827,7 @@ func.utils.get_plugin_npm_cdn = async function (SESSION_ID, plugin_name, resourc
|
|
|
26806
26827
|
return `../../plugins/${plugin_name}/${resource}`;
|
|
26807
26828
|
}
|
|
26808
26829
|
|
|
26809
|
-
return `https://${_session.domain}/plugins/${plugin_name}/${resource}?app_id=${_session.app_id}`;
|
|
26830
|
+
return `https://${_session.domain}/plugins/${plugin_name}/${resource}?app_id=${_session.app_id}&ts=${_session?.opt?.app_build_id || 0}`;
|
|
26810
26831
|
};
|
|
26811
26832
|
|
|
26812
26833
|
return get_path(resource);
|
|
@@ -26952,7 +26973,7 @@ func.UI.utils.get_element_info = function (SESSION_ID, dsSessionP, ui_idP, $cont
|
|
|
26952
26973
|
// }
|
|
26953
26974
|
// } else {
|
|
26954
26975
|
// ret.nodeId = $elm.data().xuData.nodeId;
|
|
26955
|
-
ret.nodeId = $elm.data().xuData.xu_id;
|
|
26976
|
+
ret.nodeId = $elm.attr('xu-ui-id'); //$elm.data().xuData.xu_id;
|
|
26956
26977
|
// }
|
|
26957
26978
|
}
|
|
26958
26979
|
ret.$elm = $elm;
|
|
@@ -27816,7 +27837,8 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
|
27816
27837
|
return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
|
|
27817
27838
|
};
|
|
27818
27839
|
|
|
27819
|
-
var $elm = func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', queue_obj.paramsP.elem_key);
|
|
27840
|
+
// var $elm = func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', queue_obj.paramsP.elem_key);
|
|
27841
|
+
var $elm = $(`[xu-ui-id="${queue_obj.paramsP.elem_key}"]`);
|
|
27820
27842
|
|
|
27821
27843
|
if (glb.new_xu_render) {
|
|
27822
27844
|
$elm = $(`[xu-ui-id="${queue_obj.paramsP.elem_key}"]`);
|
|
@@ -31269,7 +31291,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
31269
31291
|
}
|
|
31270
31292
|
}
|
|
31271
31293
|
});
|
|
31272
|
-
|
|
31294
|
+
debugger;
|
|
31273
31295
|
const selector_id = glb.new_xu_render ? $(this).data()?.xuData?.ui_id : $(this).data()?.xuData?.xu_id;
|
|
31274
31296
|
|
|
31275
31297
|
if (attr.length) {
|
|
@@ -34460,7 +34482,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34460
34482
|
|
|
34461
34483
|
let $ret_panel_div = ret.$new_div;
|
|
34462
34484
|
|
|
34463
|
-
if (!$ret_panel_div
|
|
34485
|
+
if (!$ret_panel_div?.children()?.length) {
|
|
34464
34486
|
////// render default children tree
|
|
34465
34487
|
if (nodeP.children.length) {
|
|
34466
34488
|
$ret_panel_div = await func.UI.screen.render_ui_tree(SESSION_ID, $container, nodeP.children[0], parent_infoP, paramsP, jobNoP, null, 0, null, nodeP, null, $root_container);
|