@xuda.io/runtime-bundle 1.0.1017 → 1.0.1019
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 +278 -268
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +279 -269
- package/js/xuda-runtime-slim.min.es.js +279 -269
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +2 -0
- package/js/xuda-worker-bundle.js +2 -0
- package/js/xuda-worker-bundle.min.js +1 -1
- package/js/xuda_common-bundle.js +2 -0
- package/js/xuda_common-bundle.min.js +1 -1
- package/package.json +1 -1
|
@@ -24637,6 +24637,8 @@ func.common.sha256 = async function (str) {
|
|
|
24637
24637
|
const bytes = new Uint8Array(buf);
|
|
24638
24638
|
return [...bytes].map((b) => b.toString(16).padStart(2, '0')).join('');
|
|
24639
24639
|
};
|
|
24640
|
+
|
|
24641
|
+
glb.new_xu_render = true;
|
|
24640
24642
|
glb.DEBUG_INFO_OBJ = {};
|
|
24641
24643
|
// var CONNECTION_ATTEMPTS = 0;
|
|
24642
24644
|
glb.APP_INFO = {};
|
|
@@ -27795,7 +27797,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
|
27795
27797
|
{},
|
|
27796
27798
|
queue_obj.jobNoP,
|
|
27797
27799
|
_data.xuData.key,
|
|
27798
|
-
_data.xuData.
|
|
27800
|
+
_data.xuData.parent_node,
|
|
27799
27801
|
'xu-render',
|
|
27800
27802
|
queue_obj.paramsP.elem_val.$elm,
|
|
27801
27803
|
{
|
|
@@ -32151,300 +32153,309 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
32151
32153
|
set_value();
|
|
32152
32154
|
return {};
|
|
32153
32155
|
},
|
|
32154
|
-
'xu-render
|
|
32155
|
-
|
|
32156
|
-
|
|
32157
|
-
|
|
32158
|
-
|
|
32156
|
+
'xu-render': async function ($elm, val, from_panel) {
|
|
32157
|
+
const old_render = async function () {
|
|
32158
|
+
var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
|
|
32159
|
+
const init_render = function () {
|
|
32160
|
+
if (!value) {
|
|
32161
|
+
var cloned_$div = $elm.clone(true);
|
|
32162
|
+
|
|
32163
|
+
let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).attr('hidden', true).appendTo($container).hide();
|
|
32164
|
+
let original_data_obj = {
|
|
32165
|
+
$container: cloned_$div,
|
|
32166
|
+
nodeP: _.cloneDeep(nodeP),
|
|
32167
|
+
parent_infoP,
|
|
32168
|
+
paramsP,
|
|
32169
|
+
keyP,
|
|
32170
|
+
parent_nodeP,
|
|
32171
|
+
$root_container,
|
|
32172
|
+
};
|
|
32173
|
+
$xurender.data('xuData', cloned_$div.data().xuData);
|
|
32174
|
+
$xurender.data().xuData.original_data_obj = original_data_obj;
|
|
32175
|
+
$xurender.data().xuData.xurender_node = cloned_$div;
|
|
32176
|
+
$xurender.data().xuAttributes = nodeP.attributes || {};
|
|
32177
|
+
$xurender.hide();
|
|
32159
32178
|
|
|
32160
|
-
|
|
32161
|
-
|
|
32162
|
-
|
|
32163
|
-
|
|
32164
|
-
|
|
32165
|
-
paramsP,
|
|
32166
|
-
keyP,
|
|
32167
|
-
parent_nodeP,
|
|
32168
|
-
$root_container,
|
|
32169
|
-
};
|
|
32170
|
-
$xurender.data('xuData', cloned_$div.data().xuData);
|
|
32171
|
-
$xurender.data().xuData.original_data_obj = original_data_obj;
|
|
32172
|
-
$xurender.data().xuData.xurender_node = cloned_$div;
|
|
32173
|
-
$xurender.data().xuAttributes = nodeP.attributes || {};
|
|
32174
|
-
$xurender.hide();
|
|
32179
|
+
$elm.remove();
|
|
32180
|
+
return { abort: true };
|
|
32181
|
+
}
|
|
32182
|
+
return {};
|
|
32183
|
+
};
|
|
32175
32184
|
|
|
32176
|
-
|
|
32177
|
-
|
|
32178
|
-
|
|
32179
|
-
|
|
32180
|
-
|
|
32185
|
+
const post_render = async function () {
|
|
32186
|
+
if (value) {
|
|
32187
|
+
try {
|
|
32188
|
+
// abort if already rended
|
|
32189
|
+
if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
|
|
32190
|
+
return func.events.delete_job(SESSION_ID, jobNoP);
|
|
32191
|
+
}
|
|
32181
32192
|
|
|
32182
|
-
|
|
32183
|
-
if (value) {
|
|
32184
|
-
try {
|
|
32185
|
-
// abort if already rended
|
|
32186
|
-
if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
|
|
32187
|
-
return func.events.delete_job(SESSION_ID, jobNoP);
|
|
32188
|
-
}
|
|
32193
|
+
let original_data_obj = $elm.data().xuData.original_data_obj;
|
|
32189
32194
|
|
|
32190
|
-
|
|
32195
|
+
if (!original_data_obj) {
|
|
32196
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
32197
|
+
return { delete_job: jobNoP };
|
|
32198
|
+
}
|
|
32191
32199
|
|
|
32192
|
-
|
|
32193
|
-
|
|
32194
|
-
|
|
32195
|
-
|
|
32200
|
+
const new_$div = await func.UI.screen.render_ui_tree(
|
|
32201
|
+
SESSION_ID,
|
|
32202
|
+
$elm, //original_data_obj.$container,
|
|
32203
|
+
_.cloneDeep(original_data_obj.nodeP),
|
|
32204
|
+
original_data_obj.parent_infoP,
|
|
32205
|
+
original_data_obj.paramsP,
|
|
32206
|
+
jobNoP,
|
|
32207
|
+
null,
|
|
32208
|
+
original_data_obj.keyP,
|
|
32209
|
+
null,
|
|
32210
|
+
original_data_obj.parent_nodeP,
|
|
32211
|
+
null,
|
|
32212
|
+
original_data_obj.$root_container,
|
|
32213
|
+
);
|
|
32196
32214
|
|
|
32197
|
-
|
|
32198
|
-
|
|
32199
|
-
$elm
|
|
32200
|
-
_.cloneDeep(original_data_obj.nodeP),
|
|
32201
|
-
original_data_obj.parent_infoP,
|
|
32202
|
-
original_data_obj.paramsP,
|
|
32203
|
-
jobNoP,
|
|
32204
|
-
null,
|
|
32205
|
-
original_data_obj.keyP,
|
|
32206
|
-
null,
|
|
32207
|
-
original_data_obj.parent_nodeP,
|
|
32208
|
-
null,
|
|
32209
|
-
original_data_obj.$root_container,
|
|
32210
|
-
);
|
|
32215
|
+
new_$div.data().xuData.original_data_obj = original_data_obj;
|
|
32216
|
+
new_$div.data().xuData.xurender_node = $elm.clone(true);
|
|
32217
|
+
new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
|
|
32211
32218
|
|
|
32212
|
-
|
|
32213
|
-
|
|
32214
|
-
|
|
32219
|
+
const replace = async function () {
|
|
32220
|
+
$elm.replaceWith(new_$div);
|
|
32221
|
+
if (from_panel) {
|
|
32222
|
+
const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
|
|
32223
|
+
$elm.parent().data().xuPanelWrapper = xuPanelWrapper;
|
|
32224
|
+
$elm.replaceWith(new_$div.children());
|
|
32225
|
+
}
|
|
32215
32226
|
|
|
32216
|
-
|
|
32217
|
-
|
|
32218
|
-
|
|
32219
|
-
|
|
32220
|
-
|
|
32221
|
-
$elm.replaceWith(new_$div.children());
|
|
32222
|
-
}
|
|
32227
|
+
if (val.fields_arr) {
|
|
32228
|
+
return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
|
|
32229
|
+
}
|
|
32230
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
32231
|
+
};
|
|
32223
32232
|
|
|
32224
|
-
if (
|
|
32225
|
-
|
|
32226
|
-
|
|
32227
|
-
|
|
32228
|
-
};
|
|
32233
|
+
if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
|
|
32234
|
+
if (new_$div.data().xuData.paramsP) {
|
|
32235
|
+
return await replace();
|
|
32236
|
+
}
|
|
32229
32237
|
|
|
32230
|
-
|
|
32231
|
-
if (new_$div.data().xuData.paramsP) {
|
|
32232
|
-
return await replace();
|
|
32238
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
32233
32239
|
}
|
|
32234
|
-
|
|
32240
|
+
} catch (error) {
|
|
32235
32241
|
func.events.delete_job(SESSION_ID, jobNoP);
|
|
32236
32242
|
}
|
|
32237
|
-
|
|
32243
|
+
return;
|
|
32244
|
+
}
|
|
32245
|
+
// if (!value) {
|
|
32246
|
+
if ($elm.prop('tagName') === 'XURENDER') {
|
|
32238
32247
|
func.events.delete_job(SESSION_ID, jobNoP);
|
|
32248
|
+
return;
|
|
32239
32249
|
}
|
|
32240
|
-
return;
|
|
32241
|
-
}
|
|
32242
|
-
// if (!value) {
|
|
32243
|
-
if ($elm.prop('tagName') === 'XURENDER') {
|
|
32244
|
-
func.events.delete_job(SESSION_ID, jobNoP);
|
|
32245
|
-
return;
|
|
32246
|
-
}
|
|
32247
32250
|
|
|
32248
|
-
|
|
32251
|
+
let tmp_$div = $('<div>');
|
|
32249
32252
|
|
|
32250
|
-
|
|
32251
|
-
|
|
32252
|
-
|
|
32253
|
-
|
|
32254
|
-
|
|
32255
|
-
|
|
32256
|
-
|
|
32257
|
-
|
|
32258
|
-
|
|
32253
|
+
let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).appendTo(tmp_$div).hide();
|
|
32254
|
+
// was true before
|
|
32255
|
+
if ($elm.data().xuData.xurender_node) {
|
|
32256
|
+
$xurender.data({
|
|
32257
|
+
xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
|
|
32258
|
+
xuData: $elm.data().xuData.xurender_node.data().xuData || {},
|
|
32259
|
+
});
|
|
32260
|
+
} else {
|
|
32261
|
+
// default new state
|
|
32259
32262
|
|
|
32260
|
-
|
|
32261
|
-
|
|
32262
|
-
|
|
32263
|
-
|
|
32264
|
-
|
|
32265
|
-
|
|
32266
|
-
|
|
32267
|
-
|
|
32268
|
-
|
|
32269
|
-
|
|
32263
|
+
$xurender.data({
|
|
32264
|
+
xuAttributes: $elm.data().xuAttributes || {},
|
|
32265
|
+
xuData: $elm.data().xuData || {},
|
|
32266
|
+
});
|
|
32267
|
+
const original_data_obj = {
|
|
32268
|
+
nodeP: _.cloneDeep($elm.data().xuData.node_org),
|
|
32269
|
+
paramsP: $elm.data().xuData.paramsP,
|
|
32270
|
+
$container: $elm.clone(true),
|
|
32271
|
+
parent_infoP: parent_infoP,
|
|
32272
|
+
};
|
|
32270
32273
|
|
|
32271
|
-
|
|
32272
|
-
|
|
32274
|
+
$xurender.data().xuData.original_data_obj = original_data_obj;
|
|
32275
|
+
}
|
|
32273
32276
|
|
|
32274
|
-
|
|
32275
|
-
|
|
32276
|
-
|
|
32277
|
+
$elm.replaceWith(tmp_$div.children());
|
|
32278
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
32279
|
+
// }
|
|
32280
|
+
};
|
|
32281
|
+
if (is_init) {
|
|
32282
|
+
return init_render();
|
|
32283
|
+
}
|
|
32284
|
+
return await post_render();
|
|
32277
32285
|
};
|
|
32278
|
-
if (is_init) {
|
|
32279
|
-
return init_render();
|
|
32280
|
-
}
|
|
32281
|
-
return await post_render();
|
|
32282
|
-
},
|
|
32283
|
-
'xu-render': async function ($elm, val, from_panel) {
|
|
32284
|
-
var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
|
|
32285
|
-
const init_render = async function () {
|
|
32286
|
-
if (!value) {
|
|
32287
|
-
const cloned_$div = $elm.clone(true);
|
|
32288
32286
|
|
|
32289
|
-
|
|
32290
|
-
|
|
32291
|
-
|
|
32292
|
-
|
|
32293
|
-
|
|
32294
|
-
|
|
32295
|
-
|
|
32296
|
-
|
|
32297
|
-
|
|
32298
|
-
|
|
32299
|
-
|
|
32300
|
-
$
|
|
32301
|
-
|
|
32302
|
-
|
|
32303
|
-
|
|
32304
|
-
|
|
32305
|
-
|
|
32306
|
-
|
|
32287
|
+
const new_render = async function () {
|
|
32288
|
+
var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
|
|
32289
|
+
const init_render = async function () {
|
|
32290
|
+
if (!value) {
|
|
32291
|
+
// const cloned_$div = $elm.clone(true);
|
|
32292
|
+
|
|
32293
|
+
// const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
|
|
32294
|
+
|
|
32295
|
+
// let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).attr('hidden', true).appendTo($container).hide();
|
|
32296
|
+
// let original_data_obj = {
|
|
32297
|
+
// force_render: true,
|
|
32298
|
+
// $container: cloned_$div,
|
|
32299
|
+
// nodeP: _.cloneDeep(nodeP),
|
|
32300
|
+
// parent_infoP,
|
|
32301
|
+
// paramsP,
|
|
32302
|
+
// keyP,
|
|
32303
|
+
// parent_nodeP,
|
|
32304
|
+
// $root_container,
|
|
32305
|
+
// };
|
|
32306
|
+
// $xurender.data('xuData', cloned_$div.data().xuData);
|
|
32307
|
+
// $xurender.data().xuData.original_data_obj = original_data_obj;
|
|
32308
|
+
// $xurender.data().xuData.xurender_node = cloned_$div;
|
|
32309
|
+
// $xurender.data().xuAttributes = nodeP.attributes || {};
|
|
32310
|
+
// $xurender.hide();
|
|
32307
32311
|
|
|
32308
|
-
|
|
32309
|
-
|
|
32310
|
-
|
|
32311
|
-
|
|
32312
|
-
|
|
32312
|
+
// $elm.remove();
|
|
32313
|
+
parent_nodeP.xu_render = true;
|
|
32314
|
+
return { xu_render: true };
|
|
32315
|
+
}
|
|
32316
|
+
return {};
|
|
32317
|
+
};
|
|
32313
32318
|
|
|
32314
|
-
|
|
32315
|
-
|
|
32316
|
-
|
|
32317
|
-
|
|
32318
|
-
|
|
32319
|
-
|
|
32320
|
-
|
|
32319
|
+
const post_render = async function () {
|
|
32320
|
+
if (value) {
|
|
32321
|
+
try {
|
|
32322
|
+
// abort if already rended
|
|
32323
|
+
if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
|
|
32324
|
+
return func.events.delete_job(SESSION_ID, jobNoP);
|
|
32325
|
+
}
|
|
32321
32326
|
|
|
32322
|
-
|
|
32327
|
+
let original_data_obj = $elm.data().xuData.original_data_obj;
|
|
32323
32328
|
|
|
32324
|
-
|
|
32325
|
-
|
|
32326
|
-
|
|
32327
|
-
|
|
32329
|
+
if (!original_data_obj) {
|
|
32330
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
32331
|
+
return { delete_job: jobNoP };
|
|
32332
|
+
}
|
|
32328
32333
|
|
|
32329
|
-
|
|
32330
|
-
|
|
32331
|
-
|
|
32332
|
-
|
|
32334
|
+
////////////
|
|
32335
|
+
const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
|
|
32336
|
+
const xu_ui_id = $elm.attr('xu-ui-id');
|
|
32337
|
+
let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id]?.[cache_str]?.$container.clone(true);
|
|
32333
32338
|
|
|
32334
|
-
|
|
32335
|
-
|
|
32339
|
+
/////////////
|
|
32340
|
+
// let new_$div = original_data_obj.$container.clone(true);
|
|
32336
32341
|
|
|
32337
|
-
|
|
32338
|
-
|
|
32339
|
-
|
|
32340
|
-
|
|
32341
|
-
|
|
32342
|
-
|
|
32343
|
-
|
|
32344
|
-
|
|
32345
|
-
|
|
32346
|
-
|
|
32347
|
-
|
|
32348
|
-
|
|
32349
|
-
|
|
32350
|
-
|
|
32351
|
-
|
|
32352
|
-
}
|
|
32353
|
-
////////////
|
|
32354
|
-
if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
|
|
32355
|
-
UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
|
|
32356
|
-
}
|
|
32357
|
-
UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
|
|
32358
|
-
//////////////
|
|
32359
|
-
new_$div.data().xuData.original_data_obj = original_data_obj;
|
|
32360
|
-
new_$div.data().xuData.xurender_node = $elm.clone(true);
|
|
32361
|
-
new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
|
|
32362
|
-
|
|
32363
|
-
const replace = async function () {
|
|
32364
|
-
$elm.replaceWith(new_$div);
|
|
32365
|
-
if (from_panel) {
|
|
32366
|
-
const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
|
|
32367
|
-
$elm.parent().data().xuPanelWrapper = xuPanelWrapper;
|
|
32368
|
-
$elm.replaceWith(new_$div.children());
|
|
32342
|
+
if (original_data_obj.force_render || !new_$div) {
|
|
32343
|
+
new_$div = await func.UI.screen.render_ui_tree(
|
|
32344
|
+
SESSION_ID,
|
|
32345
|
+
$elm, //original_data_obj.$container,
|
|
32346
|
+
_.cloneDeep(original_data_obj.nodeP),
|
|
32347
|
+
original_data_obj.parent_infoP,
|
|
32348
|
+
original_data_obj.paramsP,
|
|
32349
|
+
jobNoP,
|
|
32350
|
+
null,
|
|
32351
|
+
original_data_obj.keyP,
|
|
32352
|
+
null,
|
|
32353
|
+
original_data_obj.parent_nodeP,
|
|
32354
|
+
null,
|
|
32355
|
+
original_data_obj.$root_container,
|
|
32356
|
+
);
|
|
32369
32357
|
}
|
|
32370
|
-
|
|
32371
|
-
if (
|
|
32372
|
-
|
|
32358
|
+
////////////
|
|
32359
|
+
if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
|
|
32360
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
|
|
32373
32361
|
}
|
|
32374
|
-
|
|
32375
|
-
|
|
32362
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
|
|
32363
|
+
//////////////
|
|
32364
|
+
new_$div.data().xuData.original_data_obj = original_data_obj;
|
|
32365
|
+
new_$div.data().xuData.xurender_node = $elm.clone(true);
|
|
32366
|
+
new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
|
|
32367
|
+
|
|
32368
|
+
const replace = async function () {
|
|
32369
|
+
$elm.replaceWith(new_$div);
|
|
32370
|
+
if (from_panel) {
|
|
32371
|
+
const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
|
|
32372
|
+
$elm.parent().data().xuPanelWrapper = xuPanelWrapper;
|
|
32373
|
+
$elm.replaceWith(new_$div.children());
|
|
32374
|
+
}
|
|
32376
32375
|
|
|
32377
|
-
|
|
32378
|
-
|
|
32379
|
-
|
|
32380
|
-
|
|
32376
|
+
if (val.fields_arr) {
|
|
32377
|
+
return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
|
|
32378
|
+
}
|
|
32379
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
32380
|
+
};
|
|
32381
32381
|
|
|
32382
|
+
if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
|
|
32383
|
+
if (new_$div.data().xuData.paramsP) {
|
|
32384
|
+
return await replace();
|
|
32385
|
+
}
|
|
32386
|
+
|
|
32387
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
32388
|
+
}
|
|
32389
|
+
} catch (error) {
|
|
32382
32390
|
func.events.delete_job(SESSION_ID, jobNoP);
|
|
32383
32391
|
}
|
|
32384
|
-
|
|
32385
|
-
func.events.delete_job(SESSION_ID, jobNoP);
|
|
32392
|
+
return;
|
|
32386
32393
|
}
|
|
32387
|
-
return;
|
|
32388
|
-
}
|
|
32389
32394
|
|
|
32390
|
-
|
|
32395
|
+
/////////// !value ///////////
|
|
32391
32396
|
|
|
32392
|
-
|
|
32393
|
-
|
|
32394
|
-
|
|
32395
|
-
|
|
32397
|
+
if ($elm.prop('tagName') === 'XURENDER') {
|
|
32398
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
32399
|
+
return;
|
|
32400
|
+
}
|
|
32396
32401
|
|
|
32397
|
-
|
|
32398
|
-
|
|
32399
|
-
|
|
32402
|
+
let tmp_$div = $('<div>');
|
|
32403
|
+
// const xu_ui_id = $elm.attr('xu-ui-id');
|
|
32404
|
+
const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
|
|
32400
32405
|
|
|
32401
|
-
|
|
32402
|
-
|
|
32403
|
-
|
|
32404
|
-
|
|
32405
|
-
|
|
32406
|
-
|
|
32407
|
-
|
|
32408
|
-
|
|
32409
|
-
|
|
32406
|
+
let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).appendTo(tmp_$div).hide();
|
|
32407
|
+
// // was true before
|
|
32408
|
+
// if ($elm.data().xuData.xurender_node) {
|
|
32409
|
+
// $xurender.data({
|
|
32410
|
+
// xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
|
|
32411
|
+
// xuData: $elm.data().xuData.xurender_node.data().xuData || {},
|
|
32412
|
+
// });
|
|
32413
|
+
// } else {
|
|
32414
|
+
// default new state
|
|
32410
32415
|
|
|
32411
|
-
|
|
32412
|
-
|
|
32413
|
-
|
|
32414
|
-
|
|
32415
|
-
|
|
32416
|
-
|
|
32417
|
-
|
|
32418
|
-
|
|
32419
|
-
|
|
32420
|
-
|
|
32421
|
-
|
|
32422
|
-
|
|
32423
|
-
|
|
32424
|
-
|
|
32425
|
-
|
|
32426
|
-
|
|
32427
|
-
|
|
32428
|
-
|
|
32429
|
-
|
|
32430
|
-
|
|
32431
|
-
|
|
32416
|
+
$xurender.data({
|
|
32417
|
+
xuAttributes: $elm.data().xuAttributes || {},
|
|
32418
|
+
xuData: $elm.data().xuData || {},
|
|
32419
|
+
});
|
|
32420
|
+
// const original_data_obj = {
|
|
32421
|
+
// nodeP: _.cloneDeep($elm.data().xuData.node_org),
|
|
32422
|
+
// paramsP: $elm.data().xuData.paramsP,
|
|
32423
|
+
// $container: $elm.clone(true),
|
|
32424
|
+
// parent_infoP: parent_infoP,
|
|
32425
|
+
// };
|
|
32426
|
+
const cloned_$div = $elm.clone(true);
|
|
32427
|
+
let original_data_obj = {
|
|
32428
|
+
force_render: false,
|
|
32429
|
+
$container: cloned_$div,
|
|
32430
|
+
nodeP: cloned_$div.data().xuData.node_org,
|
|
32431
|
+
parent_infoP,
|
|
32432
|
+
paramsP,
|
|
32433
|
+
keyP,
|
|
32434
|
+
parent_nodeP, //:cloned_$div.data().xuData.original_data_obj.parent_nodeP,
|
|
32435
|
+
$root_container,
|
|
32436
|
+
};
|
|
32432
32437
|
|
|
32433
|
-
|
|
32438
|
+
$xurender.data().xuData.original_data_obj = original_data_obj;
|
|
32434
32439
|
|
|
32435
|
-
|
|
32436
|
-
|
|
32437
|
-
|
|
32440
|
+
const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
|
|
32441
|
+
if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
|
|
32442
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
|
|
32443
|
+
}
|
|
32444
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
|
|
32445
|
+
// }
|
|
32446
|
+
$elm.replaceWith(tmp_$div.children());
|
|
32447
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
32448
|
+
};
|
|
32449
|
+
if (is_init) {
|
|
32450
|
+
return await init_render();
|
|
32438
32451
|
}
|
|
32439
|
-
|
|
32440
|
-
// }
|
|
32441
|
-
$elm.replaceWith(tmp_$div.children());
|
|
32442
|
-
func.events.delete_job(SESSION_ID, jobNoP);
|
|
32452
|
+
return await post_render();
|
|
32443
32453
|
};
|
|
32444
|
-
|
|
32445
|
-
|
|
32454
|
+
|
|
32455
|
+
if (glb.new_xu_render) {
|
|
32456
|
+
return new_render();
|
|
32446
32457
|
}
|
|
32447
|
-
return
|
|
32458
|
+
return old_render();
|
|
32448
32459
|
},
|
|
32449
32460
|
'xu-show': async function ($elm, val) {
|
|
32450
32461
|
var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-show', 'bool', val.value);
|
|
@@ -33003,22 +33014,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
33003
33014
|
continue;
|
|
33004
33015
|
}
|
|
33005
33016
|
|
|
33006
|
-
// if (!nodeP.attributes || !nodeP.attributes[attr] & !nodeP.attributes[`xu-exp:${attr}`]) {
|
|
33007
|
-
// continue;
|
|
33008
|
-
// }
|
|
33009
|
-
|
|
33010
|
-
// if (_.isEmpty(nodeP.attributes)) {
|
|
33011
|
-
// break;
|
|
33012
|
-
// }
|
|
33013
|
-
|
|
33014
|
-
// if (typeof nodeP.attributes[attr] === 'undefined') {
|
|
33015
|
-
// continue;
|
|
33016
|
-
// }
|
|
33017
|
-
|
|
33018
|
-
// if (typeof func.UI.screen.fix_val_defaults(attr, (await get_xuExp(attr)) || nodeP.attributes[attr]) === 'undefined') {
|
|
33019
|
-
// continue;
|
|
33020
|
-
// }
|
|
33021
|
-
|
|
33022
33017
|
if (!nodeP?.attributes?.hasOwnProperty(attr) && !nodeP?.attributes?.hasOwnProperty(`xu-exp:${attr}`)) {
|
|
33023
33018
|
continue;
|
|
33024
33019
|
}
|
|
@@ -33043,7 +33038,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
33043
33038
|
{
|
|
33044
33039
|
key: attr,
|
|
33045
33040
|
|
|
33046
|
-
// value: (await get_xuExp(attr)) || func.UI.screen.fix_val_defaults(attr, nodeP.attributes[attr]),
|
|
33047
33041
|
value: await get_attr_value(attr),
|
|
33048
33042
|
},
|
|
33049
33043
|
is_init,
|
|
@@ -33617,6 +33611,11 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
33617
33611
|
// debugger;
|
|
33618
33612
|
}
|
|
33619
33613
|
|
|
33614
|
+
///////////
|
|
33615
|
+
if (glb.new_xu_render) {
|
|
33616
|
+
}
|
|
33617
|
+
|
|
33618
|
+
///////////
|
|
33620
33619
|
var is_mobile = glb.MOBILE_ARR.includes(paramsP.screenInfo.properties?.menuType) ? true : false;
|
|
33621
33620
|
|
|
33622
33621
|
const get_element_info = function () {
|
|
@@ -33769,6 +33768,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
33769
33768
|
node_promises.push(
|
|
33770
33769
|
new Promise(async (resolve, reject) => {
|
|
33771
33770
|
const ret = await func.UI.screen.render_ui_tree(SESSION_ID, $divP, nodeP.children[key], parent_infoP, paramsP, jobNoP, is_skeleton, Number(key), null, nodeP, null, $root_container);
|
|
33771
|
+
debugger;
|
|
33772
33772
|
resolve();
|
|
33773
33773
|
}),
|
|
33774
33774
|
);
|
|
@@ -34462,7 +34462,9 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34462
34462
|
}
|
|
34463
34463
|
|
|
34464
34464
|
let ret = await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $div, true);
|
|
34465
|
-
if (ret.abort || nodeP.tagName === 'svg' || !_.isEmpty(nodeP?.attributes?.['xu-text']) || !_.isEmpty(nodeP?.attributes?.['xu-html']) || !_.isEmpty(nodeP?.attributes?.['xu-exp:xu-text']) || !_.isEmpty(nodeP?.attributes?.['xu-exp:xu-html']))
|
|
34465
|
+
if (ret.abort || nodeP.tagName === 'svg' || !_.isEmpty(nodeP?.attributes?.['xu-text']) || !_.isEmpty(nodeP?.attributes?.['xu-html']) || !_.isEmpty(nodeP?.attributes?.['xu-exp:xu-text']) || !_.isEmpty(nodeP?.attributes?.['xu-exp:xu-html'])) {
|
|
34466
|
+
return await done();
|
|
34467
|
+
}
|
|
34466
34468
|
// check if iterator made to prevent children render
|
|
34467
34469
|
|
|
34468
34470
|
if (nodeP?.attributes?.['xu-viewport'] == 'true') {
|
|
@@ -34556,7 +34558,15 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34556
34558
|
};
|
|
34557
34559
|
xu_viewport();
|
|
34558
34560
|
} else {
|
|
34559
|
-
|
|
34561
|
+
if (glb.new_xu_render) {
|
|
34562
|
+
if (ret.xu_render) {
|
|
34563
|
+
iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
34564
|
+
} else {
|
|
34565
|
+
await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
34566
|
+
}
|
|
34567
|
+
} else {
|
|
34568
|
+
await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
34569
|
+
}
|
|
34560
34570
|
}
|
|
34561
34571
|
|
|
34562
34572
|
// const ret_iterate_child = await iterate_child($div, nodeP, parent_infoP, null, $root_container);
|