@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.
@@ -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 = {};
@@ -32151,300 +32153,310 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
32151
32153
  set_value();
32152
32154
  return {};
32153
32155
  },
32154
- 'xu-render-org': async function ($elm, val, from_panel) {
32155
- var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
32156
- const init_render = function () {
32157
- if (!value) {
32158
- var cloned_$div = $elm.clone(true);
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
- let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).attr('hidden', true).appendTo($container).hide();
32161
- let original_data_obj = {
32162
- $container: cloned_$div,
32163
- nodeP: _.cloneDeep(nodeP),
32164
- parent_infoP,
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
- $elm.remove();
32177
- return { abort: true };
32178
- }
32179
- return {};
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
- const post_render = async function () {
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
- let original_data_obj = $elm.data().xuData.original_data_obj;
32195
+ if (!original_data_obj) {
32196
+ func.events.delete_job(SESSION_ID, jobNoP);
32197
+ return { delete_job: jobNoP };
32198
+ }
32191
32199
 
32192
- if (!original_data_obj) {
32193
- func.events.delete_job(SESSION_ID, jobNoP);
32194
- return { delete_job: jobNoP };
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
- const new_$div = await func.UI.screen.render_ui_tree(
32198
- SESSION_ID,
32199
- $elm, //original_data_obj.$container,
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
- new_$div.data().xuData.original_data_obj = original_data_obj;
32213
- new_$div.data().xuData.xurender_node = $elm.clone(true);
32214
- new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
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
- const replace = async function () {
32217
- $elm.replaceWith(new_$div);
32218
- if (from_panel) {
32219
- const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
32220
- $elm.parent().data().xuPanelWrapper = xuPanelWrapper;
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 (val.fields_arr) {
32225
- return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
32226
- }
32227
- func.events.delete_job(SESSION_ID, jobNoP);
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
- if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
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
- } catch (error) {
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
- let tmp_$div = $('<div>');
32251
+ let tmp_$div = $('<div>');
32249
32252
 
32250
- let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).appendTo(tmp_$div).hide();
32251
- // was true before
32252
- if ($elm.data().xuData.xurender_node) {
32253
- $xurender.data({
32254
- xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
32255
- xuData: $elm.data().xuData.xurender_node.data().xuData || {},
32256
- });
32257
- } else {
32258
- // default new state
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
- $xurender.data({
32261
- xuAttributes: $elm.data().xuAttributes || {},
32262
- xuData: $elm.data().xuData || {},
32263
- });
32264
- const original_data_obj = {
32265
- nodeP: _.cloneDeep($elm.data().xuData.node_org),
32266
- paramsP: $elm.data().xuData.paramsP,
32267
- $container: $elm.clone(true),
32268
- parent_infoP: parent_infoP,
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
- $xurender.data().xuData.original_data_obj = original_data_obj;
32272
- }
32274
+ $xurender.data().xuData.original_data_obj = original_data_obj;
32275
+ }
32273
32276
 
32274
- $elm.replaceWith(tmp_$div.children());
32275
- func.events.delete_job(SESSION_ID, jobNoP);
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
- const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
32290
-
32291
- let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).attr('hidden', true).appendTo($container).hide();
32292
- let original_data_obj = {
32293
- force_render: true,
32294
- $container: cloned_$div,
32295
- nodeP: _.cloneDeep(nodeP),
32296
- parent_infoP,
32297
- paramsP,
32298
- keyP,
32299
- parent_nodeP,
32300
- $root_container,
32301
- };
32302
- $xurender.data('xuData', cloned_$div.data().xuData);
32303
- $xurender.data().xuData.original_data_obj = original_data_obj;
32304
- $xurender.data().xuData.xurender_node = cloned_$div;
32305
- $xurender.data().xuAttributes = nodeP.attributes || {};
32306
- $xurender.hide();
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
+ nodeP.xu_render_made = value;
32291
+ if (!value) {
32292
+ // const cloned_$div = $elm.clone(true);
32293
+
32294
+ // const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
32295
+
32296
+ // let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).attr('hidden', true).appendTo($container).hide();
32297
+ // let original_data_obj = {
32298
+ // force_render: true,
32299
+ // $container: cloned_$div,
32300
+ // nodeP: _.cloneDeep(nodeP),
32301
+ // parent_infoP,
32302
+ // paramsP,
32303
+ // keyP,
32304
+ // parent_nodeP,
32305
+ // $root_container,
32306
+ // };
32307
+ // $xurender.data('xuData', cloned_$div.data().xuData);
32308
+ // $xurender.data().xuData.original_data_obj = original_data_obj;
32309
+ // $xurender.data().xuData.xurender_node = cloned_$div;
32310
+ // $xurender.data().xuAttributes = nodeP.attributes || {};
32311
+ // $xurender.hide();
32307
32312
 
32308
- $elm.remove();
32309
- return { abort: true };
32310
- }
32311
- return {};
32312
- };
32313
+ // $elm.remove();
32314
+ // nodeP.xu_render_made = true;
32315
+ return { xu_render_in_process: true };
32316
+ }
32317
+ return {};
32318
+ };
32313
32319
 
32314
- const post_render = async function () {
32315
- if (value) {
32316
- try {
32317
- // abort if already rended
32318
- if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
32319
- return func.events.delete_job(SESSION_ID, jobNoP);
32320
- }
32320
+ const post_render = async function () {
32321
+ if (value) {
32322
+ try {
32323
+ // abort if already rended
32324
+ if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
32325
+ return func.events.delete_job(SESSION_ID, jobNoP);
32326
+ }
32321
32327
 
32322
- let original_data_obj = $elm.data().xuData.original_data_obj;
32328
+ let original_data_obj = $elm.data().xuData.original_data_obj;
32323
32329
 
32324
- if (!original_data_obj) {
32325
- func.events.delete_job(SESSION_ID, jobNoP);
32326
- return { delete_job: jobNoP };
32327
- }
32330
+ if (!original_data_obj) {
32331
+ func.events.delete_job(SESSION_ID, jobNoP);
32332
+ return { delete_job: jobNoP };
32333
+ }
32328
32334
 
32329
- ////////////
32330
- const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
32331
- const xu_ui_id = $elm.attr('xu-ui-id');
32332
- let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id]?.[cache_str]?.$container.clone(true);
32335
+ ////////////
32336
+ const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
32337
+ const xu_ui_id = $elm.attr('xu-ui-id');
32338
+ let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id]?.[cache_str]?.$container.clone(true);
32333
32339
 
32334
- /////////////
32335
- // let new_$div = original_data_obj.$container.clone(true);
32340
+ /////////////
32341
+ // let new_$div = original_data_obj.$container.clone(true);
32336
32342
 
32337
- if (original_data_obj.force_render || !new_$div) {
32338
- new_$div = await func.UI.screen.render_ui_tree(
32339
- SESSION_ID,
32340
- $elm, //original_data_obj.$container,
32341
- _.cloneDeep(original_data_obj.nodeP),
32342
- original_data_obj.parent_infoP,
32343
- original_data_obj.paramsP,
32344
- jobNoP,
32345
- null,
32346
- original_data_obj.keyP,
32347
- null,
32348
- original_data_obj.parent_nodeP,
32349
- null,
32350
- original_data_obj.$root_container,
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());
32343
+ if (original_data_obj.force_render || !new_$div) {
32344
+ new_$div = await func.UI.screen.render_ui_tree(
32345
+ SESSION_ID,
32346
+ $elm, //original_data_obj.$container,
32347
+ _.cloneDeep(original_data_obj.nodeP),
32348
+ original_data_obj.parent_infoP,
32349
+ original_data_obj.paramsP,
32350
+ jobNoP,
32351
+ null,
32352
+ original_data_obj.keyP,
32353
+ null,
32354
+ original_data_obj.parent_nodeP,
32355
+ null,
32356
+ original_data_obj.$root_container,
32357
+ );
32369
32358
  }
32370
-
32371
- if (val.fields_arr) {
32372
- return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
32359
+ ////////////
32360
+ if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
32361
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
32373
32362
  }
32374
- func.events.delete_job(SESSION_ID, jobNoP);
32375
- };
32363
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
32364
+ //////////////
32365
+ new_$div.data().xuData.original_data_obj = original_data_obj;
32366
+ new_$div.data().xuData.xurender_node = $elm.clone(true);
32367
+ new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
32368
+
32369
+ const replace = async function () {
32370
+ $elm.replaceWith(new_$div);
32371
+ if (from_panel) {
32372
+ const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
32373
+ $elm.parent().data().xuPanelWrapper = xuPanelWrapper;
32374
+ $elm.replaceWith(new_$div.children());
32375
+ }
32376
32376
 
32377
- if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
32378
- if (new_$div.data().xuData.paramsP) {
32379
- return await replace();
32380
- }
32377
+ if (val.fields_arr) {
32378
+ return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
32379
+ }
32380
+ func.events.delete_job(SESSION_ID, jobNoP);
32381
+ };
32382
+
32383
+ if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
32384
+ if (new_$div.data().xuData.paramsP) {
32385
+ return await replace();
32386
+ }
32381
32387
 
32388
+ func.events.delete_job(SESSION_ID, jobNoP);
32389
+ }
32390
+ } catch (error) {
32382
32391
  func.events.delete_job(SESSION_ID, jobNoP);
32383
32392
  }
32384
- } catch (error) {
32385
- func.events.delete_job(SESSION_ID, jobNoP);
32393
+ return;
32386
32394
  }
32387
- return;
32388
- }
32389
32395
 
32390
- /////////// !value ///////////
32396
+ /////////// !value ///////////
32391
32397
 
32392
- if ($elm.prop('tagName') === 'XURENDER') {
32393
- func.events.delete_job(SESSION_ID, jobNoP);
32394
- return;
32395
- }
32398
+ if ($elm.prop('tagName') === 'XURENDER') {
32399
+ func.events.delete_job(SESSION_ID, jobNoP);
32400
+ return;
32401
+ }
32396
32402
 
32397
- let tmp_$div = $('<div>');
32398
- // const xu_ui_id = $elm.attr('xu-ui-id');
32399
- const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
32403
+ let tmp_$div = $('<div>');
32404
+ // const xu_ui_id = $elm.attr('xu-ui-id');
32405
+ const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
32400
32406
 
32401
- let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).appendTo(tmp_$div).hide();
32402
- // // was true before
32403
- // if ($elm.data().xuData.xurender_node) {
32404
- // $xurender.data({
32405
- // xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
32406
- // xuData: $elm.data().xuData.xurender_node.data().xuData || {},
32407
- // });
32408
- // } else {
32409
- // default new state
32407
+ let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).appendTo(tmp_$div).hide();
32408
+ // // was true before
32409
+ // if ($elm.data().xuData.xurender_node) {
32410
+ // $xurender.data({
32411
+ // xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
32412
+ // xuData: $elm.data().xuData.xurender_node.data().xuData || {},
32413
+ // });
32414
+ // } else {
32415
+ // default new state
32410
32416
 
32411
- $xurender.data({
32412
- xuAttributes: $elm.data().xuAttributes || {},
32413
- xuData: $elm.data().xuData || {},
32414
- });
32415
- // const original_data_obj = {
32416
- // nodeP: _.cloneDeep($elm.data().xuData.node_org),
32417
- // paramsP: $elm.data().xuData.paramsP,
32418
- // $container: $elm.clone(true),
32419
- // parent_infoP: parent_infoP,
32420
- // };
32421
- const cloned_$div = $elm.clone(true);
32422
- let original_data_obj = {
32423
- force_render: false,
32424
- $container: cloned_$div,
32425
- nodeP: cloned_$div.data().xuData.node_org,
32426
- parent_infoP,
32427
- paramsP,
32428
- keyP,
32429
- parent_nodeP, //:cloned_$div.data().xuData.original_data_obj.parent_nodeP,
32430
- $root_container,
32431
- };
32417
+ $xurender.data({
32418
+ xuAttributes: $elm.data().xuAttributes || {},
32419
+ xuData: $elm.data().xuData || {},
32420
+ });
32421
+ // const original_data_obj = {
32422
+ // nodeP: _.cloneDeep($elm.data().xuData.node_org),
32423
+ // paramsP: $elm.data().xuData.paramsP,
32424
+ // $container: $elm.clone(true),
32425
+ // parent_infoP: parent_infoP,
32426
+ // };
32427
+ const cloned_$div = $elm.clone(true);
32428
+ let original_data_obj = {
32429
+ force_render: false,
32430
+ $container: cloned_$div,
32431
+ nodeP: cloned_$div.data().xuData.node_org,
32432
+ parent_infoP,
32433
+ paramsP,
32434
+ keyP,
32435
+ parent_nodeP, //:cloned_$div.data().xuData.original_data_obj.parent_nodeP,
32436
+ $root_container,
32437
+ };
32432
32438
 
32433
- $xurender.data().xuData.original_data_obj = original_data_obj;
32439
+ $xurender.data().xuData.original_data_obj = original_data_obj;
32434
32440
 
32435
- const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
32436
- if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
32437
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
32441
+ const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
32442
+ if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
32443
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
32444
+ }
32445
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
32446
+ // }
32447
+ $elm.replaceWith(tmp_$div.children());
32448
+ func.events.delete_job(SESSION_ID, jobNoP);
32449
+ };
32450
+ if (is_init) {
32451
+ return await init_render();
32438
32452
  }
32439
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
32440
- // }
32441
- $elm.replaceWith(tmp_$div.children());
32442
- func.events.delete_job(SESSION_ID, jobNoP);
32453
+ return await post_render();
32443
32454
  };
32444
- if (is_init) {
32445
- return await init_render();
32455
+
32456
+ if (glb.new_xu_render) {
32457
+ return new_render();
32446
32458
  }
32447
- return await post_render();
32459
+ return old_render();
32448
32460
  },
32449
32461
  'xu-show': async function ($elm, val) {
32450
32462
  var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-show', 'bool', val.value);
@@ -33003,22 +33015,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
33003
33015
  continue;
33004
33016
  }
33005
33017
 
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
33018
  if (!nodeP?.attributes?.hasOwnProperty(attr) && !nodeP?.attributes?.hasOwnProperty(`xu-exp:${attr}`)) {
33023
33019
  continue;
33024
33020
  }
@@ -33043,7 +33039,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
33043
33039
  {
33044
33040
  key: attr,
33045
33041
 
33046
- // value: (await get_xuExp(attr)) || func.UI.screen.fix_val_defaults(attr, nodeP.attributes[attr]),
33047
33042
  value: await get_attr_value(attr),
33048
33043
  },
33049
33044
  is_init,
@@ -33617,6 +33612,11 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
33617
33612
  // debugger;
33618
33613
  }
33619
33614
 
33615
+ ///////////
33616
+ if (glb.new_xu_render) {
33617
+ }
33618
+
33619
+ ///////////
33620
33620
  var is_mobile = glb.MOBILE_ARR.includes(paramsP.screenInfo.properties?.menuType) ? true : false;
33621
33621
 
33622
33622
  const get_element_info = function () {
@@ -33769,6 +33769,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
33769
33769
  node_promises.push(
33770
33770
  new Promise(async (resolve, reject) => {
33771
33771
  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);
33772
+ debugger;
33772
33773
  resolve();
33773
33774
  }),
33774
33775
  );
@@ -34439,13 +34440,27 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
34439
34440
  };
34440
34441
 
34441
34442
  const draw_html_element = async function (element) {
34442
- const done = async function () {
34443
- return $div;
34443
+ let temp_$container = $('<tmp>');
34444
+ if (!glb.new_xu_render) {
34445
+ temp_$container = $container;
34446
+ }
34447
+ const done = async function (ret) {
34448
+ if (glb.new_xu_render) {
34449
+ if (ret.xu_render_in_process) {
34450
+ debugger;
34451
+ $container.append(temp_$container.children());
34452
+ return $div;
34453
+ } else {
34454
+ return $div;
34455
+ }
34456
+ } else {
34457
+ return $div;
34458
+ }
34444
34459
  };
34445
34460
  if (!element || element === 'script') return await done();
34446
34461
  let str = '';
34447
34462
 
34448
- 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);
34463
+ 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);
34449
34464
 
34450
34465
  $div.hover(
34451
34466
  function (e) {
@@ -34461,8 +34476,10 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
34461
34476
  });
34462
34477
  }
34463
34478
 
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'])) return await done();
34479
+ 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);
34480
+ 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'])) {
34481
+ return await done();
34482
+ }
34466
34483
  // check if iterator made to prevent children render
34467
34484
 
34468
34485
  if (nodeP?.attributes?.['xu-viewport'] == 'true') {
@@ -34532,7 +34549,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
34532
34549
  // $div.html(UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')]);
34533
34550
  // } else {
34534
34551
  hover_in($div);
34535
- 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);
34552
+ 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);
34536
34553
  // }
34537
34554
  observer_outViewport.observe($div[0]);
34538
34555
  });
@@ -34556,11 +34573,19 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
34556
34573
  };
34557
34574
  xu_viewport();
34558
34575
  } else {
34559
- await iterate_child($div, nodeP, parent_infoP, $root_container);
34576
+ if (glb.new_xu_render) {
34577
+ if (ret.xu_render_in_process) {
34578
+ iterate_child($div, nodeP, parent_infoP, $root_container);
34579
+ } else {
34580
+ await iterate_child($div, nodeP, parent_infoP, $root_container);
34581
+ }
34582
+ } else {
34583
+ await iterate_child($div, nodeP, parent_infoP, $root_container);
34584
+ }
34560
34585
  }
34561
34586
 
34562
34587
  // const ret_iterate_child = await iterate_child($div, nodeP, parent_infoP, null, $root_container);
34563
- return await done();
34588
+ return await done(ret);
34564
34589
  };
34565
34590
 
34566
34591
  if (nodeP.content && nodeP.attributes) {