@xuda.io/runtime-bundle 1.0.976 → 1.0.978
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
|
@@ -12477,55 +12477,59 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12477
12477
|
|
|
12478
12478
|
const post_render = async function () {
|
|
12479
12479
|
if (value) {
|
|
12480
|
-
|
|
12481
|
-
|
|
12482
|
-
|
|
12483
|
-
|
|
12480
|
+
try {
|
|
12481
|
+
// abort if already rended
|
|
12482
|
+
if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
|
|
12483
|
+
return func.events.delete_job(SESSION_ID, jobNoP);
|
|
12484
|
+
}
|
|
12484
12485
|
|
|
12485
|
-
|
|
12486
|
+
let original_data_obj = $elm.data().xuData.original_data_obj;
|
|
12486
12487
|
|
|
12487
|
-
|
|
12488
|
-
|
|
12489
|
-
|
|
12490
|
-
|
|
12491
|
-
|
|
12492
|
-
|
|
12493
|
-
|
|
12494
|
-
|
|
12495
|
-
|
|
12496
|
-
|
|
12497
|
-
|
|
12498
|
-
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
|
|
12502
|
-
|
|
12503
|
-
|
|
12504
|
-
|
|
12488
|
+
if (!original_data_obj) {
|
|
12489
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12490
|
+
return { delete_job: jobNoP };
|
|
12491
|
+
}
|
|
12492
|
+
const new_$div = await func.UI.screen.render_ui_tree(
|
|
12493
|
+
SESSION_ID,
|
|
12494
|
+
$elm, //original_data_obj.$container,
|
|
12495
|
+
_.cloneDeep(original_data_obj.nodeP),
|
|
12496
|
+
original_data_obj.parent_infoP,
|
|
12497
|
+
original_data_obj.paramsP,
|
|
12498
|
+
jobNoP,
|
|
12499
|
+
null,
|
|
12500
|
+
original_data_obj.keyP,
|
|
12501
|
+
null,
|
|
12502
|
+
original_data_obj.parent_nodeP,
|
|
12503
|
+
null,
|
|
12504
|
+
original_data_obj.$root_container,
|
|
12505
|
+
);
|
|
12505
12506
|
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
|
|
12507
|
+
new_$div.data().xuData.original_data_obj = original_data_obj;
|
|
12508
|
+
new_$div.data().xuData.xurender_node = $elm.clone(true);
|
|
12509
|
+
new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
|
|
12509
12510
|
|
|
12510
|
-
|
|
12511
|
-
|
|
12512
|
-
|
|
12513
|
-
|
|
12514
|
-
|
|
12515
|
-
|
|
12516
|
-
|
|
12511
|
+
const replace = async function () {
|
|
12512
|
+
$elm.replaceWith(new_$div);
|
|
12513
|
+
if (from_panel) {
|
|
12514
|
+
const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
|
|
12515
|
+
$elm.parent().data().xuPanelWrapper = xuPanelWrapper;
|
|
12516
|
+
$elm.replaceWith(new_$div.children());
|
|
12517
|
+
}
|
|
12517
12518
|
|
|
12518
|
-
|
|
12519
|
-
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
|
|
12519
|
+
if (val.fields_arr) {
|
|
12520
|
+
return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
|
|
12521
|
+
}
|
|
12522
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12523
|
+
};
|
|
12523
12524
|
|
|
12524
|
-
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12525
|
+
if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
|
|
12526
|
+
if (new_$div.data().xuData.paramsP) {
|
|
12527
|
+
return await replace();
|
|
12528
|
+
}
|
|
12528
12529
|
|
|
12530
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12531
|
+
}
|
|
12532
|
+
} catch (error) {
|
|
12529
12533
|
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12530
12534
|
}
|
|
12531
12535
|
return;
|
|
@@ -13490,6 +13494,18 @@ func.UI.screen.create_container = async function (SESSION_ID, $root_container, n
|
|
|
13490
13494
|
// return hashHex;
|
|
13491
13495
|
// }
|
|
13492
13496
|
|
|
13497
|
+
// Returns a 32-bit unsigned integer hash of a string (FNV-1a)
|
|
13498
|
+
function hash32(str) {
|
|
13499
|
+
let h = 0x811c9dc5; // FNV offset basis
|
|
13500
|
+
for (let i = 0; i < str.length; i++) {
|
|
13501
|
+
h ^= str.charCodeAt(i);
|
|
13502
|
+
// multiply by FNV prime (2^24 + 2^8 + 0x93) with 32-bit overflow
|
|
13503
|
+
h += (h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24);
|
|
13504
|
+
}
|
|
13505
|
+
// Convert to unsigned 32-bit
|
|
13506
|
+
return h >>> 0;
|
|
13507
|
+
}
|
|
13508
|
+
|
|
13493
13509
|
function hash32hex(str) {
|
|
13494
13510
|
return (hash32(str) >>> 0).toString(16).padStart(8, '0');
|
|
13495
13511
|
}
|
|
@@ -10204,55 +10204,59 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10204
10204
|
|
|
10205
10205
|
const post_render = async function () {
|
|
10206
10206
|
if (value) {
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
|
|
10210
|
-
|
|
10207
|
+
try {
|
|
10208
|
+
// abort if already rended
|
|
10209
|
+
if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
|
|
10210
|
+
return func.events.delete_job(SESSION_ID, jobNoP);
|
|
10211
|
+
}
|
|
10211
10212
|
|
|
10212
|
-
|
|
10213
|
+
let original_data_obj = $elm.data().xuData.original_data_obj;
|
|
10213
10214
|
|
|
10214
|
-
|
|
10215
|
-
|
|
10216
|
-
|
|
10217
|
-
|
|
10218
|
-
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
|
|
10223
|
-
|
|
10224
|
-
|
|
10225
|
-
|
|
10226
|
-
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
|
|
10230
|
-
|
|
10231
|
-
|
|
10215
|
+
if (!original_data_obj) {
|
|
10216
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
10217
|
+
return { delete_job: jobNoP };
|
|
10218
|
+
}
|
|
10219
|
+
const new_$div = await func.UI.screen.render_ui_tree(
|
|
10220
|
+
SESSION_ID,
|
|
10221
|
+
$elm, //original_data_obj.$container,
|
|
10222
|
+
_.cloneDeep(original_data_obj.nodeP),
|
|
10223
|
+
original_data_obj.parent_infoP,
|
|
10224
|
+
original_data_obj.paramsP,
|
|
10225
|
+
jobNoP,
|
|
10226
|
+
null,
|
|
10227
|
+
original_data_obj.keyP,
|
|
10228
|
+
null,
|
|
10229
|
+
original_data_obj.parent_nodeP,
|
|
10230
|
+
null,
|
|
10231
|
+
original_data_obj.$root_container,
|
|
10232
|
+
);
|
|
10232
10233
|
|
|
10233
|
-
|
|
10234
|
-
|
|
10235
|
-
|
|
10234
|
+
new_$div.data().xuData.original_data_obj = original_data_obj;
|
|
10235
|
+
new_$div.data().xuData.xurender_node = $elm.clone(true);
|
|
10236
|
+
new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
|
|
10236
10237
|
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
-
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
|
|
10238
|
+
const replace = async function () {
|
|
10239
|
+
$elm.replaceWith(new_$div);
|
|
10240
|
+
if (from_panel) {
|
|
10241
|
+
const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
|
|
10242
|
+
$elm.parent().data().xuPanelWrapper = xuPanelWrapper;
|
|
10243
|
+
$elm.replaceWith(new_$div.children());
|
|
10244
|
+
}
|
|
10244
10245
|
|
|
10245
|
-
|
|
10246
|
-
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
-
|
|
10246
|
+
if (val.fields_arr) {
|
|
10247
|
+
return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
|
|
10248
|
+
}
|
|
10249
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
10250
|
+
};
|
|
10250
10251
|
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
|
|
10252
|
+
if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
|
|
10253
|
+
if (new_$div.data().xuData.paramsP) {
|
|
10254
|
+
return await replace();
|
|
10255
|
+
}
|
|
10255
10256
|
|
|
10257
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
10258
|
+
}
|
|
10259
|
+
} catch (error) {
|
|
10256
10260
|
func.events.delete_job(SESSION_ID, jobNoP);
|
|
10257
10261
|
}
|
|
10258
10262
|
return;
|
|
@@ -11217,6 +11221,18 @@ func.UI.screen.create_container = async function (SESSION_ID, $root_container, n
|
|
|
11217
11221
|
// return hashHex;
|
|
11218
11222
|
// }
|
|
11219
11223
|
|
|
11224
|
+
// Returns a 32-bit unsigned integer hash of a string (FNV-1a)
|
|
11225
|
+
function hash32(str) {
|
|
11226
|
+
let h = 0x811c9dc5; // FNV offset basis
|
|
11227
|
+
for (let i = 0; i < str.length; i++) {
|
|
11228
|
+
h ^= str.charCodeAt(i);
|
|
11229
|
+
// multiply by FNV prime (2^24 + 2^8 + 0x93) with 32-bit overflow
|
|
11230
|
+
h += (h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24);
|
|
11231
|
+
}
|
|
11232
|
+
// Convert to unsigned 32-bit
|
|
11233
|
+
return h >>> 0;
|
|
11234
|
+
}
|
|
11235
|
+
|
|
11220
11236
|
function hash32hex(str) {
|
|
11221
11237
|
return (hash32(str) >>> 0).toString(16).padStart(8, '0');
|
|
11222
11238
|
}
|