@xuda.io/runtime-bundle 1.0.1018 → 1.0.1020

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.
@@ -2678,6 +2678,8 @@ func.common.sha256 = async function (str) {
2678
2678
  const bytes = new Uint8Array(buf);
2679
2679
  return [...bytes].map((b) => b.toString(16).padStart(2, '0')).join('');
2680
2680
  };
2681
+
2682
+ glb.new_xu_render = true;
2681
2683
  glb.DEBUG_INFO_OBJ = {};
2682
2684
  // var CONNECTION_ATTEMPTS = 0;
2683
2685
  glb.APP_INFO = {};
@@ -10192,300 +10194,310 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10192
10194
  set_value();
10193
10195
  return {};
10194
10196
  },
10195
- 'xu-render-org': async function ($elm, val, from_panel) {
10196
- var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
10197
- const init_render = function () {
10198
- if (!value) {
10199
- var cloned_$div = $elm.clone(true);
10197
+ 'xu-render': async function ($elm, val, from_panel) {
10198
+ const old_render = async function () {
10199
+ var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
10200
+ const init_render = function () {
10201
+ if (!value) {
10202
+ var cloned_$div = $elm.clone(true);
10203
+
10204
+ let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).attr('hidden', true).appendTo($container).hide();
10205
+ let original_data_obj = {
10206
+ $container: cloned_$div,
10207
+ nodeP: _.cloneDeep(nodeP),
10208
+ parent_infoP,
10209
+ paramsP,
10210
+ keyP,
10211
+ parent_nodeP,
10212
+ $root_container,
10213
+ };
10214
+ $xurender.data('xuData', cloned_$div.data().xuData);
10215
+ $xurender.data().xuData.original_data_obj = original_data_obj;
10216
+ $xurender.data().xuData.xurender_node = cloned_$div;
10217
+ $xurender.data().xuAttributes = nodeP.attributes || {};
10218
+ $xurender.hide();
10200
10219
 
10201
- let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).attr('hidden', true).appendTo($container).hide();
10202
- let original_data_obj = {
10203
- $container: cloned_$div,
10204
- nodeP: _.cloneDeep(nodeP),
10205
- parent_infoP,
10206
- paramsP,
10207
- keyP,
10208
- parent_nodeP,
10209
- $root_container,
10210
- };
10211
- $xurender.data('xuData', cloned_$div.data().xuData);
10212
- $xurender.data().xuData.original_data_obj = original_data_obj;
10213
- $xurender.data().xuData.xurender_node = cloned_$div;
10214
- $xurender.data().xuAttributes = nodeP.attributes || {};
10215
- $xurender.hide();
10220
+ $elm.remove();
10221
+ return { abort: true };
10222
+ }
10223
+ return {};
10224
+ };
10216
10225
 
10217
- $elm.remove();
10218
- return { abort: true };
10219
- }
10220
- return {};
10221
- };
10226
+ const post_render = async function () {
10227
+ if (value) {
10228
+ try {
10229
+ // abort if already rended
10230
+ if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
10231
+ return func.events.delete_job(SESSION_ID, jobNoP);
10232
+ }
10222
10233
 
10223
- const post_render = async function () {
10224
- if (value) {
10225
- try {
10226
- // abort if already rended
10227
- if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
10228
- return func.events.delete_job(SESSION_ID, jobNoP);
10229
- }
10234
+ let original_data_obj = $elm.data().xuData.original_data_obj;
10230
10235
 
10231
- let original_data_obj = $elm.data().xuData.original_data_obj;
10236
+ if (!original_data_obj) {
10237
+ func.events.delete_job(SESSION_ID, jobNoP);
10238
+ return { delete_job: jobNoP };
10239
+ }
10232
10240
 
10233
- if (!original_data_obj) {
10234
- func.events.delete_job(SESSION_ID, jobNoP);
10235
- return { delete_job: jobNoP };
10236
- }
10241
+ const new_$div = await func.UI.screen.render_ui_tree(
10242
+ SESSION_ID,
10243
+ $elm, //original_data_obj.$container,
10244
+ _.cloneDeep(original_data_obj.nodeP),
10245
+ original_data_obj.parent_infoP,
10246
+ original_data_obj.paramsP,
10247
+ jobNoP,
10248
+ null,
10249
+ original_data_obj.keyP,
10250
+ null,
10251
+ original_data_obj.parent_nodeP,
10252
+ null,
10253
+ original_data_obj.$root_container,
10254
+ );
10237
10255
 
10238
- const new_$div = await func.UI.screen.render_ui_tree(
10239
- SESSION_ID,
10240
- $elm, //original_data_obj.$container,
10241
- _.cloneDeep(original_data_obj.nodeP),
10242
- original_data_obj.parent_infoP,
10243
- original_data_obj.paramsP,
10244
- jobNoP,
10245
- null,
10246
- original_data_obj.keyP,
10247
- null,
10248
- original_data_obj.parent_nodeP,
10249
- null,
10250
- original_data_obj.$root_container,
10251
- );
10256
+ new_$div.data().xuData.original_data_obj = original_data_obj;
10257
+ new_$div.data().xuData.xurender_node = $elm.clone(true);
10258
+ new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
10252
10259
 
10253
- new_$div.data().xuData.original_data_obj = original_data_obj;
10254
- new_$div.data().xuData.xurender_node = $elm.clone(true);
10255
- new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
10260
+ const replace = async function () {
10261
+ $elm.replaceWith(new_$div);
10262
+ if (from_panel) {
10263
+ const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
10264
+ $elm.parent().data().xuPanelWrapper = xuPanelWrapper;
10265
+ $elm.replaceWith(new_$div.children());
10266
+ }
10256
10267
 
10257
- const replace = async function () {
10258
- $elm.replaceWith(new_$div);
10259
- if (from_panel) {
10260
- const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
10261
- $elm.parent().data().xuPanelWrapper = xuPanelWrapper;
10262
- $elm.replaceWith(new_$div.children());
10263
- }
10268
+ if (val.fields_arr) {
10269
+ return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
10270
+ }
10271
+ func.events.delete_job(SESSION_ID, jobNoP);
10272
+ };
10264
10273
 
10265
- if (val.fields_arr) {
10266
- return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
10267
- }
10268
- func.events.delete_job(SESSION_ID, jobNoP);
10269
- };
10274
+ if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
10275
+ if (new_$div.data().xuData.paramsP) {
10276
+ return await replace();
10277
+ }
10270
10278
 
10271
- if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
10272
- if (new_$div.data().xuData.paramsP) {
10273
- return await replace();
10279
+ func.events.delete_job(SESSION_ID, jobNoP);
10274
10280
  }
10275
-
10281
+ } catch (error) {
10276
10282
  func.events.delete_job(SESSION_ID, jobNoP);
10277
10283
  }
10278
- } catch (error) {
10284
+ return;
10285
+ }
10286
+ // if (!value) {
10287
+ if ($elm.prop('tagName') === 'XURENDER') {
10279
10288
  func.events.delete_job(SESSION_ID, jobNoP);
10289
+ return;
10280
10290
  }
10281
- return;
10282
- }
10283
- // if (!value) {
10284
- if ($elm.prop('tagName') === 'XURENDER') {
10285
- func.events.delete_job(SESSION_ID, jobNoP);
10286
- return;
10287
- }
10288
10291
 
10289
- let tmp_$div = $('<div>');
10292
+ let tmp_$div = $('<div>');
10290
10293
 
10291
- let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).appendTo(tmp_$div).hide();
10292
- // was true before
10293
- if ($elm.data().xuData.xurender_node) {
10294
- $xurender.data({
10295
- xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
10296
- xuData: $elm.data().xuData.xurender_node.data().xuData || {},
10297
- });
10298
- } else {
10299
- // default new state
10294
+ let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).appendTo(tmp_$div).hide();
10295
+ // was true before
10296
+ if ($elm.data().xuData.xurender_node) {
10297
+ $xurender.data({
10298
+ xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
10299
+ xuData: $elm.data().xuData.xurender_node.data().xuData || {},
10300
+ });
10301
+ } else {
10302
+ // default new state
10300
10303
 
10301
- $xurender.data({
10302
- xuAttributes: $elm.data().xuAttributes || {},
10303
- xuData: $elm.data().xuData || {},
10304
- });
10305
- const original_data_obj = {
10306
- nodeP: _.cloneDeep($elm.data().xuData.node_org),
10307
- paramsP: $elm.data().xuData.paramsP,
10308
- $container: $elm.clone(true),
10309
- parent_infoP: parent_infoP,
10310
- };
10304
+ $xurender.data({
10305
+ xuAttributes: $elm.data().xuAttributes || {},
10306
+ xuData: $elm.data().xuData || {},
10307
+ });
10308
+ const original_data_obj = {
10309
+ nodeP: _.cloneDeep($elm.data().xuData.node_org),
10310
+ paramsP: $elm.data().xuData.paramsP,
10311
+ $container: $elm.clone(true),
10312
+ parent_infoP: parent_infoP,
10313
+ };
10311
10314
 
10312
- $xurender.data().xuData.original_data_obj = original_data_obj;
10313
- }
10315
+ $xurender.data().xuData.original_data_obj = original_data_obj;
10316
+ }
10314
10317
 
10315
- $elm.replaceWith(tmp_$div.children());
10316
- func.events.delete_job(SESSION_ID, jobNoP);
10317
- // }
10318
+ $elm.replaceWith(tmp_$div.children());
10319
+ func.events.delete_job(SESSION_ID, jobNoP);
10320
+ // }
10321
+ };
10322
+ if (is_init) {
10323
+ return init_render();
10324
+ }
10325
+ return await post_render();
10318
10326
  };
10319
- if (is_init) {
10320
- return init_render();
10321
- }
10322
- return await post_render();
10323
- },
10324
- 'xu-render': async function ($elm, val, from_panel) {
10325
- var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
10326
- const init_render = async function () {
10327
- if (!value) {
10328
- const cloned_$div = $elm.clone(true);
10329
10327
 
10330
- const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
10328
+ const new_render = async function () {
10329
+ var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
10330
+ const init_render = async function () {
10331
+ nodeP.xu_render_made = value;
10332
+ if (!value) {
10333
+ // const cloned_$div = $elm.clone(true);
10334
+
10335
+ // const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
10336
+
10337
+ // let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).attr('hidden', true).appendTo($container).hide();
10338
+ // let original_data_obj = {
10339
+ // force_render: true,
10340
+ // $container: cloned_$div,
10341
+ // nodeP: _.cloneDeep(nodeP),
10342
+ // parent_infoP,
10343
+ // paramsP,
10344
+ // keyP,
10345
+ // parent_nodeP,
10346
+ // $root_container,
10347
+ // };
10348
+ // $xurender.data('xuData', cloned_$div.data().xuData);
10349
+ // $xurender.data().xuData.original_data_obj = original_data_obj;
10350
+ // $xurender.data().xuData.xurender_node = cloned_$div;
10351
+ // $xurender.data().xuAttributes = nodeP.attributes || {};
10352
+ // $xurender.hide();
10353
+
10354
+ // $elm.remove();
10355
+ // nodeP.xu_render_made = true;
10356
+ return { xu_render_in_process: true };
10357
+ }
10358
+ return {};
10359
+ };
10331
10360
 
10332
- let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).attr('hidden', true).appendTo($container).hide();
10333
- let original_data_obj = {
10334
- force_render: true,
10335
- $container: cloned_$div,
10336
- nodeP: _.cloneDeep(nodeP),
10337
- parent_infoP,
10338
- paramsP,
10339
- keyP,
10340
- parent_nodeP,
10341
- $root_container,
10342
- };
10343
- $xurender.data('xuData', cloned_$div.data().xuData);
10344
- $xurender.data().xuData.original_data_obj = original_data_obj;
10345
- $xurender.data().xuData.xurender_node = cloned_$div;
10346
- $xurender.data().xuAttributes = nodeP.attributes || {};
10347
- $xurender.hide();
10361
+ const post_render = async function () {
10362
+ if (value) {
10363
+ try {
10364
+ // abort if already rended
10365
+ if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
10366
+ return func.events.delete_job(SESSION_ID, jobNoP);
10367
+ }
10348
10368
 
10349
- $elm.remove();
10350
- return { abort: true };
10351
- }
10352
- return {};
10353
- };
10369
+ let original_data_obj = $elm.data().xuData.original_data_obj;
10354
10370
 
10355
- const post_render = async function () {
10356
- if (value) {
10357
- try {
10358
- // abort if already rended
10359
- if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
10360
- return func.events.delete_job(SESSION_ID, jobNoP);
10361
- }
10371
+ if (!original_data_obj) {
10372
+ func.events.delete_job(SESSION_ID, jobNoP);
10373
+ return { delete_job: jobNoP };
10374
+ }
10362
10375
 
10363
- let original_data_obj = $elm.data().xuData.original_data_obj;
10376
+ ////////////
10377
+ const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
10378
+ const xu_ui_id = $elm.attr('xu-ui-id');
10379
+ let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id]?.[cache_str]?.$container.clone(true);
10364
10380
 
10365
- if (!original_data_obj) {
10366
- func.events.delete_job(SESSION_ID, jobNoP);
10367
- return { delete_job: jobNoP };
10368
- }
10381
+ /////////////
10382
+ // let new_$div = original_data_obj.$container.clone(true);
10369
10383
 
10370
- ////////////
10371
- const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
10372
- const xu_ui_id = $elm.attr('xu-ui-id');
10373
- let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id]?.[cache_str]?.$container.clone(true);
10384
+ if (original_data_obj.force_render || !new_$div) {
10385
+ new_$div = await func.UI.screen.render_ui_tree(
10386
+ SESSION_ID,
10387
+ $elm, //original_data_obj.$container,
10388
+ _.cloneDeep(original_data_obj.nodeP),
10389
+ original_data_obj.parent_infoP,
10390
+ original_data_obj.paramsP,
10391
+ jobNoP,
10392
+ null,
10393
+ original_data_obj.keyP,
10394
+ null,
10395
+ original_data_obj.parent_nodeP,
10396
+ null,
10397
+ original_data_obj.$root_container,
10398
+ );
10399
+ }
10400
+ ////////////
10401
+ if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
10402
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
10403
+ }
10404
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
10405
+ //////////////
10406
+ new_$div.data().xuData.original_data_obj = original_data_obj;
10407
+ new_$div.data().xuData.xurender_node = $elm.clone(true);
10408
+ new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
10409
+
10410
+ const replace = async function () {
10411
+ $elm.replaceWith(new_$div);
10412
+ if (from_panel) {
10413
+ const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
10414
+ $elm.parent().data().xuPanelWrapper = xuPanelWrapper;
10415
+ $elm.replaceWith(new_$div.children());
10416
+ }
10374
10417
 
10375
- /////////////
10376
- // let new_$div = original_data_obj.$container.clone(true);
10418
+ if (val.fields_arr) {
10419
+ return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
10420
+ }
10421
+ func.events.delete_job(SESSION_ID, jobNoP);
10422
+ };
10377
10423
 
10378
- if (original_data_obj.force_render || !new_$div) {
10379
- new_$div = await func.UI.screen.render_ui_tree(
10380
- SESSION_ID,
10381
- $elm, //original_data_obj.$container,
10382
- _.cloneDeep(original_data_obj.nodeP),
10383
- original_data_obj.parent_infoP,
10384
- original_data_obj.paramsP,
10385
- jobNoP,
10386
- null,
10387
- original_data_obj.keyP,
10388
- null,
10389
- original_data_obj.parent_nodeP,
10390
- null,
10391
- original_data_obj.$root_container,
10392
- );
10393
- }
10394
- ////////////
10395
- if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
10396
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
10397
- }
10398
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
10399
- //////////////
10400
- new_$div.data().xuData.original_data_obj = original_data_obj;
10401
- new_$div.data().xuData.xurender_node = $elm.clone(true);
10402
- new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
10403
-
10404
- const replace = async function () {
10405
- $elm.replaceWith(new_$div);
10406
- if (from_panel) {
10407
- const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
10408
- $elm.parent().data().xuPanelWrapper = xuPanelWrapper;
10409
- $elm.replaceWith(new_$div.children());
10410
- }
10424
+ if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
10425
+ if (new_$div.data().xuData.paramsP) {
10426
+ return await replace();
10427
+ }
10411
10428
 
10412
- if (val.fields_arr) {
10413
- return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
10429
+ func.events.delete_job(SESSION_ID, jobNoP);
10414
10430
  }
10431
+ } catch (error) {
10415
10432
  func.events.delete_job(SESSION_ID, jobNoP);
10416
- };
10433
+ }
10434
+ return;
10435
+ }
10417
10436
 
10418
- if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
10419
- if (new_$div.data().xuData.paramsP) {
10420
- return await replace();
10421
- }
10437
+ /////////// !value ///////////
10422
10438
 
10423
- func.events.delete_job(SESSION_ID, jobNoP);
10424
- }
10425
- } catch (error) {
10439
+ if ($elm.prop('tagName') === 'XURENDER') {
10426
10440
  func.events.delete_job(SESSION_ID, jobNoP);
10441
+ return;
10427
10442
  }
10428
- return;
10429
- }
10430
10443
 
10431
- /////////// !value ///////////
10444
+ let tmp_$div = $('<div>');
10445
+ // const xu_ui_id = $elm.attr('xu-ui-id');
10446
+ const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
10432
10447
 
10433
- if ($elm.prop('tagName') === 'XURENDER') {
10434
- func.events.delete_job(SESSION_ID, jobNoP);
10435
- return;
10436
- }
10448
+ let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).appendTo(tmp_$div).hide();
10449
+ // // was true before
10450
+ // if ($elm.data().xuData.xurender_node) {
10451
+ // $xurender.data({
10452
+ // xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
10453
+ // xuData: $elm.data().xuData.xurender_node.data().xuData || {},
10454
+ // });
10455
+ // } else {
10456
+ // default new state
10437
10457
 
10438
- let tmp_$div = $('<div>');
10439
- // const xu_ui_id = $elm.attr('xu-ui-id');
10440
- const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
10441
-
10442
- let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).appendTo(tmp_$div).hide();
10443
- // // was true before
10444
- // if ($elm.data().xuData.xurender_node) {
10445
- // $xurender.data({
10446
- // xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
10447
- // xuData: $elm.data().xuData.xurender_node.data().xuData || {},
10448
- // });
10449
- // } else {
10450
- // default new state
10451
-
10452
- $xurender.data({
10453
- xuAttributes: $elm.data().xuAttributes || {},
10454
- xuData: $elm.data().xuData || {},
10455
- });
10456
- // const original_data_obj = {
10457
- // nodeP: _.cloneDeep($elm.data().xuData.node_org),
10458
- // paramsP: $elm.data().xuData.paramsP,
10459
- // $container: $elm.clone(true),
10460
- // parent_infoP: parent_infoP,
10461
- // };
10462
- const cloned_$div = $elm.clone(true);
10463
- let original_data_obj = {
10464
- force_render: false,
10465
- $container: cloned_$div,
10466
- nodeP: cloned_$div.data().xuData.node_org,
10467
- parent_infoP,
10468
- paramsP,
10469
- keyP,
10470
- parent_nodeP, //:cloned_$div.data().xuData.original_data_obj.parent_nodeP,
10471
- $root_container,
10472
- };
10458
+ $xurender.data({
10459
+ xuAttributes: $elm.data().xuAttributes || {},
10460
+ xuData: $elm.data().xuData || {},
10461
+ });
10462
+ // const original_data_obj = {
10463
+ // nodeP: _.cloneDeep($elm.data().xuData.node_org),
10464
+ // paramsP: $elm.data().xuData.paramsP,
10465
+ // $container: $elm.clone(true),
10466
+ // parent_infoP: parent_infoP,
10467
+ // };
10468
+ const cloned_$div = $elm.clone(true);
10469
+ let original_data_obj = {
10470
+ force_render: false,
10471
+ $container: cloned_$div,
10472
+ nodeP: cloned_$div.data().xuData.node_org,
10473
+ parent_infoP,
10474
+ paramsP,
10475
+ keyP,
10476
+ parent_nodeP, //:cloned_$div.data().xuData.original_data_obj.parent_nodeP,
10477
+ $root_container,
10478
+ };
10473
10479
 
10474
- $xurender.data().xuData.original_data_obj = original_data_obj;
10480
+ $xurender.data().xuData.original_data_obj = original_data_obj;
10475
10481
 
10476
- const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
10477
- if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
10478
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
10482
+ const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
10483
+ if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
10484
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
10485
+ }
10486
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
10487
+ // }
10488
+ $elm.replaceWith(tmp_$div.children());
10489
+ func.events.delete_job(SESSION_ID, jobNoP);
10490
+ };
10491
+ if (is_init) {
10492
+ return await init_render();
10479
10493
  }
10480
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
10481
- // }
10482
- $elm.replaceWith(tmp_$div.children());
10483
- func.events.delete_job(SESSION_ID, jobNoP);
10494
+ return await post_render();
10484
10495
  };
10485
- if (is_init) {
10486
- return await init_render();
10496
+
10497
+ if (glb.new_xu_render) {
10498
+ return new_render();
10487
10499
  }
10488
- return await post_render();
10500
+ return old_render();
10489
10501
  },
10490
10502
  'xu-show': async function ($elm, val) {
10491
10503
  var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-show', 'bool', val.value);
@@ -11044,22 +11056,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
11044
11056
  continue;
11045
11057
  }
11046
11058
 
11047
- // if (!nodeP.attributes || !nodeP.attributes[attr] & !nodeP.attributes[`xu-exp:${attr}`]) {
11048
- // continue;
11049
- // }
11050
-
11051
- // if (_.isEmpty(nodeP.attributes)) {
11052
- // break;
11053
- // }
11054
-
11055
- // if (typeof nodeP.attributes[attr] === 'undefined') {
11056
- // continue;
11057
- // }
11058
-
11059
- // if (typeof func.UI.screen.fix_val_defaults(attr, (await get_xuExp(attr)) || nodeP.attributes[attr]) === 'undefined') {
11060
- // continue;
11061
- // }
11062
-
11063
11059
  if (!nodeP?.attributes?.hasOwnProperty(attr) && !nodeP?.attributes?.hasOwnProperty(`xu-exp:${attr}`)) {
11064
11060
  continue;
11065
11061
  }
@@ -11084,7 +11080,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
11084
11080
  {
11085
11081
  key: attr,
11086
11082
 
11087
- // value: (await get_xuExp(attr)) || func.UI.screen.fix_val_defaults(attr, nodeP.attributes[attr]),
11088
11083
  value: await get_attr_value(attr),
11089
11084
  },
11090
11085
  is_init,
@@ -11658,6 +11653,11 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
11658
11653
  // debugger;
11659
11654
  }
11660
11655
 
11656
+ ///////////
11657
+ if (glb.new_xu_render) {
11658
+ }
11659
+
11660
+ ///////////
11661
11661
  var is_mobile = glb.MOBILE_ARR.includes(paramsP.screenInfo.properties?.menuType) ? true : false;
11662
11662
 
11663
11663
  const get_element_info = function () {
@@ -11810,6 +11810,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
11810
11810
  node_promises.push(
11811
11811
  new Promise(async (resolve, reject) => {
11812
11812
  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);
11813
+ debugger;
11813
11814
  resolve();
11814
11815
  }),
11815
11816
  );
@@ -12480,13 +12481,27 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12480
12481
  };
12481
12482
 
12482
12483
  const draw_html_element = async function (element) {
12483
- const done = async function () {
12484
- return $div;
12484
+ let temp_$container = $('<tmp>');
12485
+ if (!glb.new_xu_render) {
12486
+ temp_$container = $container;
12487
+ }
12488
+ const done = async function (ret) {
12489
+ if (glb.new_xu_render) {
12490
+ if (ret.xu_render_in_process) {
12491
+ debugger;
12492
+ $container.append(temp_$container.children());
12493
+ return $div;
12494
+ } else {
12495
+ return $div;
12496
+ }
12497
+ } else {
12498
+ return $div;
12499
+ }
12485
12500
  };
12486
12501
  if (!element || element === 'script') return await done();
12487
12502
  let str = '';
12488
12503
 
12489
- var $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, element, null, str);
12504
+ var $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, temp_$container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, element, null, str);
12490
12505
 
12491
12506
  $div.hover(
12492
12507
  function (e) {
@@ -12502,8 +12517,10 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12502
12517
  });
12503
12518
  }
12504
12519
 
12505
- 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);
12506
- 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'])) return await done();
12520
+ let ret = await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, temp_$container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $div, true);
12521
+ 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'])) {
12522
+ return await done();
12523
+ }
12507
12524
  // check if iterator made to prevent children render
12508
12525
 
12509
12526
  if (nodeP?.attributes?.['xu-viewport'] == 'true') {
@@ -12573,7 +12590,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12573
12590
  // $div.html(UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')]);
12574
12591
  // } else {
12575
12592
  hover_in($div);
12576
- ui_job_id = func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'render_viewport', { $div, nodeP, parent_infoP, $root_container, paramsP, jobNoP, is_skeleton, keyP, refreshed_ds, parent_nodeP, check_existP, $container }, null, null, paramsP.dsSessionP);
12593
+ ui_job_id = func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'render_viewport', { $div, nodeP, parent_infoP, $root_container, paramsP, jobNoP, is_skeleton, keyP, refreshed_ds, parent_nodeP, check_existP, temp_$container }, null, null, paramsP.dsSessionP);
12577
12594
  // }
12578
12595
  observer_outViewport.observe($div[0]);
12579
12596
  });
@@ -12597,11 +12614,19 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12597
12614
  };
12598
12615
  xu_viewport();
12599
12616
  } else {
12600
- await iterate_child($div, nodeP, parent_infoP, $root_container);
12617
+ if (glb.new_xu_render) {
12618
+ if (ret.xu_render_in_process) {
12619
+ iterate_child($div, nodeP, parent_infoP, $root_container);
12620
+ } else {
12621
+ await iterate_child($div, nodeP, parent_infoP, $root_container);
12622
+ }
12623
+ } else {
12624
+ await iterate_child($div, nodeP, parent_infoP, $root_container);
12625
+ }
12601
12626
  }
12602
12627
 
12603
12628
  // const ret_iterate_child = await iterate_child($div, nodeP, parent_infoP, null, $root_container);
12604
- return await done();
12629
+ return await done(ret);
12605
12630
  };
12606
12631
 
12607
12632
  if (nodeP.content && nodeP.attributes) {