@xuda.io/runtime-bundle 1.0.993 → 1.0.995
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 +152 -23
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +152 -23
- package/js/xuda-runtime-slim.min.es.js +152 -23
- package/js/xuda-runtime-slim.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -12446,6 +12446,135 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12446
12446
|
return {};
|
|
12447
12447
|
},
|
|
12448
12448
|
'xu-render': async function ($elm, val, from_panel) {
|
|
12449
|
+
var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
|
|
12450
|
+
const init_render = function () {
|
|
12451
|
+
if (!value) {
|
|
12452
|
+
var cloned_$div = $elm.clone(true);
|
|
12453
|
+
|
|
12454
|
+
let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).attr('hidden', true).appendTo($container).hide();
|
|
12455
|
+
let original_data_obj = {
|
|
12456
|
+
$container: cloned_$div,
|
|
12457
|
+
nodeP: _.cloneDeep(nodeP),
|
|
12458
|
+
parent_infoP,
|
|
12459
|
+
paramsP,
|
|
12460
|
+
keyP,
|
|
12461
|
+
parent_nodeP,
|
|
12462
|
+
$root_container,
|
|
12463
|
+
};
|
|
12464
|
+
$xurender.data('xuData', cloned_$div.data().xuData);
|
|
12465
|
+
$xurender.data().xuData.original_data_obj = original_data_obj;
|
|
12466
|
+
$xurender.data().xuData.xurender_node = cloned_$div;
|
|
12467
|
+
$xurender.data().xuAttributes = nodeP.attributes || {};
|
|
12468
|
+
$xurender.hide();
|
|
12469
|
+
|
|
12470
|
+
$elm.remove();
|
|
12471
|
+
return { abort: true };
|
|
12472
|
+
}
|
|
12473
|
+
return {};
|
|
12474
|
+
};
|
|
12475
|
+
|
|
12476
|
+
const post_render = async function () {
|
|
12477
|
+
if (value) {
|
|
12478
|
+
try {
|
|
12479
|
+
// abort if already rended
|
|
12480
|
+
if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
|
|
12481
|
+
return func.events.delete_job(SESSION_ID, jobNoP);
|
|
12482
|
+
}
|
|
12483
|
+
|
|
12484
|
+
let original_data_obj = $elm.data().xuData.original_data_obj;
|
|
12485
|
+
|
|
12486
|
+
if (!original_data_obj) {
|
|
12487
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12488
|
+
return { delete_job: jobNoP };
|
|
12489
|
+
}
|
|
12490
|
+
|
|
12491
|
+
const new_$div = await func.UI.screen.render_ui_tree(
|
|
12492
|
+
SESSION_ID,
|
|
12493
|
+
$elm, //original_data_obj.$container,
|
|
12494
|
+
_.cloneDeep(original_data_obj.nodeP),
|
|
12495
|
+
original_data_obj.parent_infoP,
|
|
12496
|
+
original_data_obj.paramsP,
|
|
12497
|
+
jobNoP,
|
|
12498
|
+
null,
|
|
12499
|
+
original_data_obj.keyP,
|
|
12500
|
+
null,
|
|
12501
|
+
original_data_obj.parent_nodeP,
|
|
12502
|
+
null,
|
|
12503
|
+
original_data_obj.$root_container,
|
|
12504
|
+
);
|
|
12505
|
+
|
|
12506
|
+
new_$div.data().xuData.original_data_obj = original_data_obj;
|
|
12507
|
+
new_$div.data().xuData.xurender_node = $elm.clone(true);
|
|
12508
|
+
new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
|
|
12509
|
+
|
|
12510
|
+
const replace = async function () {
|
|
12511
|
+
$elm.replaceWith(new_$div);
|
|
12512
|
+
if (from_panel) {
|
|
12513
|
+
const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
|
|
12514
|
+
$elm.parent().data().xuPanelWrapper = xuPanelWrapper;
|
|
12515
|
+
$elm.replaceWith(new_$div.children());
|
|
12516
|
+
}
|
|
12517
|
+
|
|
12518
|
+
if (val.fields_arr) {
|
|
12519
|
+
return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
|
|
12520
|
+
}
|
|
12521
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12522
|
+
};
|
|
12523
|
+
|
|
12524
|
+
if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
|
|
12525
|
+
if (new_$div.data().xuData.paramsP) {
|
|
12526
|
+
return await replace();
|
|
12527
|
+
}
|
|
12528
|
+
|
|
12529
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12530
|
+
}
|
|
12531
|
+
} catch (error) {
|
|
12532
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12533
|
+
}
|
|
12534
|
+
return;
|
|
12535
|
+
}
|
|
12536
|
+
// if (!value) {
|
|
12537
|
+
if ($elm.prop('tagName') === 'XURENDER') {
|
|
12538
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12539
|
+
return;
|
|
12540
|
+
}
|
|
12541
|
+
|
|
12542
|
+
let tmp_$div = $('<div>');
|
|
12543
|
+
|
|
12544
|
+
let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).appendTo(tmp_$div).hide();
|
|
12545
|
+
// was true before
|
|
12546
|
+
if ($elm.data().xuData.xurender_node) {
|
|
12547
|
+
$xurender.data({
|
|
12548
|
+
xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
|
|
12549
|
+
xuData: $elm.data().xuData.xurender_node.data().xuData || {},
|
|
12550
|
+
});
|
|
12551
|
+
} else {
|
|
12552
|
+
// default new state
|
|
12553
|
+
|
|
12554
|
+
$xurender.data({
|
|
12555
|
+
xuAttributes: $elm.data().xuAttributes || {},
|
|
12556
|
+
xuData: $elm.data().xuData || {},
|
|
12557
|
+
});
|
|
12558
|
+
const original_data_obj = {
|
|
12559
|
+
nodeP: _.cloneDeep($elm.data().xuData.node_org),
|
|
12560
|
+
paramsP: $elm.data().xuData.paramsP,
|
|
12561
|
+
$container: $elm.clone(true),
|
|
12562
|
+
parent_infoP: parent_infoP,
|
|
12563
|
+
};
|
|
12564
|
+
|
|
12565
|
+
$xurender.data().xuData.original_data_obj = original_data_obj;
|
|
12566
|
+
}
|
|
12567
|
+
|
|
12568
|
+
$elm.replaceWith(tmp_$div.children());
|
|
12569
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12570
|
+
// }
|
|
12571
|
+
};
|
|
12572
|
+
if (is_init) {
|
|
12573
|
+
return init_render();
|
|
12574
|
+
}
|
|
12575
|
+
return await post_render();
|
|
12576
|
+
},
|
|
12577
|
+
'xu-render-new': async function ($elm, val, from_panel) {
|
|
12449
12578
|
var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
|
|
12450
12579
|
const init_render = function () {
|
|
12451
12580
|
if (!value) {
|
|
@@ -12458,7 +12587,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12458
12587
|
.appendTo($container)
|
|
12459
12588
|
.hide();
|
|
12460
12589
|
let original_data_obj = {
|
|
12461
|
-
|
|
12590
|
+
force_render: true,
|
|
12462
12591
|
$container: cloned_$div,
|
|
12463
12592
|
nodeP: _.cloneDeep(nodeP),
|
|
12464
12593
|
parent_infoP,
|
|
@@ -12496,7 +12625,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12496
12625
|
|
|
12497
12626
|
let new_$div = original_data_obj.$container.clone(true);
|
|
12498
12627
|
|
|
12499
|
-
if (original_data_obj.
|
|
12628
|
+
if (original_data_obj.force_render) {
|
|
12500
12629
|
new_$div = await func.UI.screen.render_ui_tree(
|
|
12501
12630
|
SESSION_ID,
|
|
12502
12631
|
$elm, //original_data_obj.$container,
|
|
@@ -12556,28 +12685,28 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12556
12685
|
.attr('xu-ui-id', $elm.attr('xu-ui-id'))
|
|
12557
12686
|
.appendTo(tmp_$div)
|
|
12558
12687
|
.hide();
|
|
12559
|
-
// was true before
|
|
12560
|
-
if ($elm.data().xuData.xurender_node) {
|
|
12561
|
-
|
|
12562
|
-
|
|
12563
|
-
|
|
12564
|
-
|
|
12565
|
-
} else {
|
|
12566
|
-
|
|
12567
|
-
|
|
12568
|
-
|
|
12569
|
-
|
|
12570
|
-
|
|
12571
|
-
|
|
12572
|
-
|
|
12573
|
-
|
|
12574
|
-
|
|
12575
|
-
|
|
12576
|
-
|
|
12577
|
-
|
|
12688
|
+
// // was true before
|
|
12689
|
+
// if ($elm.data().xuData.xurender_node) {
|
|
12690
|
+
// $xurender.data({
|
|
12691
|
+
// xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
|
|
12692
|
+
// xuData: $elm.data().xuData.xurender_node.data().xuData || {},
|
|
12693
|
+
// });
|
|
12694
|
+
// } else {
|
|
12695
|
+
// default new state
|
|
12696
|
+
|
|
12697
|
+
$xurender.data({
|
|
12698
|
+
xuAttributes: $elm.data().xuAttributes || {},
|
|
12699
|
+
xuData: $elm.data().xuData || {},
|
|
12700
|
+
});
|
|
12701
|
+
const original_data_obj = {
|
|
12702
|
+
nodeP: _.cloneDeep($elm.data().xuData.node_org),
|
|
12703
|
+
paramsP: $elm.data().xuData.paramsP,
|
|
12704
|
+
$container: $elm.clone(true),
|
|
12705
|
+
parent_infoP: parent_infoP,
|
|
12706
|
+
};
|
|
12578
12707
|
|
|
12579
|
-
|
|
12580
|
-
}
|
|
12708
|
+
$xurender.data().xuData.original_data_obj = original_data_obj;
|
|
12709
|
+
// }
|
|
12581
12710
|
$elm.replaceWith(tmp_$div.children());
|
|
12582
12711
|
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12583
12712
|
// }
|
|
@@ -10171,6 +10171,135 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10171
10171
|
return {};
|
|
10172
10172
|
},
|
|
10173
10173
|
'xu-render': async function ($elm, val, from_panel) {
|
|
10174
|
+
var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
|
|
10175
|
+
const init_render = function () {
|
|
10176
|
+
if (!value) {
|
|
10177
|
+
var cloned_$div = $elm.clone(true);
|
|
10178
|
+
|
|
10179
|
+
let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).attr('hidden', true).appendTo($container).hide();
|
|
10180
|
+
let original_data_obj = {
|
|
10181
|
+
$container: cloned_$div,
|
|
10182
|
+
nodeP: _.cloneDeep(nodeP),
|
|
10183
|
+
parent_infoP,
|
|
10184
|
+
paramsP,
|
|
10185
|
+
keyP,
|
|
10186
|
+
parent_nodeP,
|
|
10187
|
+
$root_container,
|
|
10188
|
+
};
|
|
10189
|
+
$xurender.data('xuData', cloned_$div.data().xuData);
|
|
10190
|
+
$xurender.data().xuData.original_data_obj = original_data_obj;
|
|
10191
|
+
$xurender.data().xuData.xurender_node = cloned_$div;
|
|
10192
|
+
$xurender.data().xuAttributes = nodeP.attributes || {};
|
|
10193
|
+
$xurender.hide();
|
|
10194
|
+
|
|
10195
|
+
$elm.remove();
|
|
10196
|
+
return { abort: true };
|
|
10197
|
+
}
|
|
10198
|
+
return {};
|
|
10199
|
+
};
|
|
10200
|
+
|
|
10201
|
+
const post_render = async function () {
|
|
10202
|
+
if (value) {
|
|
10203
|
+
try {
|
|
10204
|
+
// abort if already rended
|
|
10205
|
+
if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
|
|
10206
|
+
return func.events.delete_job(SESSION_ID, jobNoP);
|
|
10207
|
+
}
|
|
10208
|
+
|
|
10209
|
+
let original_data_obj = $elm.data().xuData.original_data_obj;
|
|
10210
|
+
|
|
10211
|
+
if (!original_data_obj) {
|
|
10212
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
10213
|
+
return { delete_job: jobNoP };
|
|
10214
|
+
}
|
|
10215
|
+
|
|
10216
|
+
const new_$div = await func.UI.screen.render_ui_tree(
|
|
10217
|
+
SESSION_ID,
|
|
10218
|
+
$elm, //original_data_obj.$container,
|
|
10219
|
+
_.cloneDeep(original_data_obj.nodeP),
|
|
10220
|
+
original_data_obj.parent_infoP,
|
|
10221
|
+
original_data_obj.paramsP,
|
|
10222
|
+
jobNoP,
|
|
10223
|
+
null,
|
|
10224
|
+
original_data_obj.keyP,
|
|
10225
|
+
null,
|
|
10226
|
+
original_data_obj.parent_nodeP,
|
|
10227
|
+
null,
|
|
10228
|
+
original_data_obj.$root_container,
|
|
10229
|
+
);
|
|
10230
|
+
|
|
10231
|
+
new_$div.data().xuData.original_data_obj = original_data_obj;
|
|
10232
|
+
new_$div.data().xuData.xurender_node = $elm.clone(true);
|
|
10233
|
+
new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
|
|
10234
|
+
|
|
10235
|
+
const replace = async function () {
|
|
10236
|
+
$elm.replaceWith(new_$div);
|
|
10237
|
+
if (from_panel) {
|
|
10238
|
+
const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
|
|
10239
|
+
$elm.parent().data().xuPanelWrapper = xuPanelWrapper;
|
|
10240
|
+
$elm.replaceWith(new_$div.children());
|
|
10241
|
+
}
|
|
10242
|
+
|
|
10243
|
+
if (val.fields_arr) {
|
|
10244
|
+
return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
|
|
10245
|
+
}
|
|
10246
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
10247
|
+
};
|
|
10248
|
+
|
|
10249
|
+
if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
|
|
10250
|
+
if (new_$div.data().xuData.paramsP) {
|
|
10251
|
+
return await replace();
|
|
10252
|
+
}
|
|
10253
|
+
|
|
10254
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
10255
|
+
}
|
|
10256
|
+
} catch (error) {
|
|
10257
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
10258
|
+
}
|
|
10259
|
+
return;
|
|
10260
|
+
}
|
|
10261
|
+
// if (!value) {
|
|
10262
|
+
if ($elm.prop('tagName') === 'XURENDER') {
|
|
10263
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
10264
|
+
return;
|
|
10265
|
+
}
|
|
10266
|
+
|
|
10267
|
+
let tmp_$div = $('<div>');
|
|
10268
|
+
|
|
10269
|
+
let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).appendTo(tmp_$div).hide();
|
|
10270
|
+
// was true before
|
|
10271
|
+
if ($elm.data().xuData.xurender_node) {
|
|
10272
|
+
$xurender.data({
|
|
10273
|
+
xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
|
|
10274
|
+
xuData: $elm.data().xuData.xurender_node.data().xuData || {},
|
|
10275
|
+
});
|
|
10276
|
+
} else {
|
|
10277
|
+
// default new state
|
|
10278
|
+
|
|
10279
|
+
$xurender.data({
|
|
10280
|
+
xuAttributes: $elm.data().xuAttributes || {},
|
|
10281
|
+
xuData: $elm.data().xuData || {},
|
|
10282
|
+
});
|
|
10283
|
+
const original_data_obj = {
|
|
10284
|
+
nodeP: _.cloneDeep($elm.data().xuData.node_org),
|
|
10285
|
+
paramsP: $elm.data().xuData.paramsP,
|
|
10286
|
+
$container: $elm.clone(true),
|
|
10287
|
+
parent_infoP: parent_infoP,
|
|
10288
|
+
};
|
|
10289
|
+
|
|
10290
|
+
$xurender.data().xuData.original_data_obj = original_data_obj;
|
|
10291
|
+
}
|
|
10292
|
+
|
|
10293
|
+
$elm.replaceWith(tmp_$div.children());
|
|
10294
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
10295
|
+
// }
|
|
10296
|
+
};
|
|
10297
|
+
if (is_init) {
|
|
10298
|
+
return init_render();
|
|
10299
|
+
}
|
|
10300
|
+
return await post_render();
|
|
10301
|
+
},
|
|
10302
|
+
'xu-render-new': async function ($elm, val, from_panel) {
|
|
10174
10303
|
var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
|
|
10175
10304
|
const init_render = function () {
|
|
10176
10305
|
if (!value) {
|
|
@@ -10183,7 +10312,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10183
10312
|
.appendTo($container)
|
|
10184
10313
|
.hide();
|
|
10185
10314
|
let original_data_obj = {
|
|
10186
|
-
|
|
10315
|
+
force_render: true,
|
|
10187
10316
|
$container: cloned_$div,
|
|
10188
10317
|
nodeP: _.cloneDeep(nodeP),
|
|
10189
10318
|
parent_infoP,
|
|
@@ -10221,7 +10350,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10221
10350
|
|
|
10222
10351
|
let new_$div = original_data_obj.$container.clone(true);
|
|
10223
10352
|
|
|
10224
|
-
if (original_data_obj.
|
|
10353
|
+
if (original_data_obj.force_render) {
|
|
10225
10354
|
new_$div = await func.UI.screen.render_ui_tree(
|
|
10226
10355
|
SESSION_ID,
|
|
10227
10356
|
$elm, //original_data_obj.$container,
|
|
@@ -10281,28 +10410,28 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10281
10410
|
.attr('xu-ui-id', $elm.attr('xu-ui-id'))
|
|
10282
10411
|
.appendTo(tmp_$div)
|
|
10283
10412
|
.hide();
|
|
10284
|
-
// was true before
|
|
10285
|
-
if ($elm.data().xuData.xurender_node) {
|
|
10286
|
-
|
|
10287
|
-
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
} else {
|
|
10291
|
-
|
|
10292
|
-
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
|
|
10296
|
-
|
|
10297
|
-
|
|
10298
|
-
|
|
10299
|
-
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
|
|
10413
|
+
// // was true before
|
|
10414
|
+
// if ($elm.data().xuData.xurender_node) {
|
|
10415
|
+
// $xurender.data({
|
|
10416
|
+
// xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
|
|
10417
|
+
// xuData: $elm.data().xuData.xurender_node.data().xuData || {},
|
|
10418
|
+
// });
|
|
10419
|
+
// } else {
|
|
10420
|
+
// default new state
|
|
10421
|
+
|
|
10422
|
+
$xurender.data({
|
|
10423
|
+
xuAttributes: $elm.data().xuAttributes || {},
|
|
10424
|
+
xuData: $elm.data().xuData || {},
|
|
10425
|
+
});
|
|
10426
|
+
const original_data_obj = {
|
|
10427
|
+
nodeP: _.cloneDeep($elm.data().xuData.node_org),
|
|
10428
|
+
paramsP: $elm.data().xuData.paramsP,
|
|
10429
|
+
$container: $elm.clone(true),
|
|
10430
|
+
parent_infoP: parent_infoP,
|
|
10431
|
+
};
|
|
10303
10432
|
|
|
10304
|
-
|
|
10305
|
-
}
|
|
10433
|
+
$xurender.data().xuData.original_data_obj = original_data_obj;
|
|
10434
|
+
// }
|
|
10306
10435
|
$elm.replaceWith(tmp_$div.children());
|
|
10307
10436
|
func.events.delete_job(SESSION_ID, jobNoP);
|
|
10308
10437
|
// }
|