@xuda.io/runtime-bundle 1.0.879 → 1.0.880

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.
@@ -8459,43 +8459,19 @@ func.UI.worker.init = async function (SESSION_ID) {
8459
8459
  break;
8460
8460
  }
8461
8461
 
8462
- // var _session = SESSION_OBJ[val.SESSION_ID];
8463
- // if (!UI_WORKER_OBJ.jobs[Number(key)] || val.job_num === 9999999)
8464
- // continue;
8465
-
8466
- // if (val.dsSessionP && !_session.DS_GLB[val.dsSessionP]) {
8467
- // func.UI.worker.delete_job(val.SESSION_ID, val.job_num);
8468
- // continue;
8469
- // }
8470
-
8471
- // if (val?.elementP && !val.elementP.isInViewport()) {
8472
- // continue;
8473
- // }
8474
-
8475
8462
  await func.UI.worker.execute(val.SESSION_ID, val);
8476
8463
  // break;
8477
8464
  } catch (err) {
8478
8465
  console.error(err);
8479
8466
  }
8480
8467
  }
8481
- // setTimeout(job_iterator, 1);
8482
8468
  }
8483
8469
  } else {
8484
8470
  //busy
8485
8471
 
8486
8472
  this.attempt++;
8487
8473
  }
8488
- // return job_iterator();
8489
- // run_stat = 0;
8490
8474
  };
8491
- // job_iterator();
8492
- // this._interval = setInterval(() => {
8493
- // if (!run_stat) {
8494
- // var testId = crypto.randomUUID();
8495
- // run_stat = 1;
8496
- // job_iterator(testId);
8497
- // }
8498
- // }, 10);
8499
8475
 
8500
8476
  this._interval = setInterval(job_iterator, 1);
8501
8477
 
@@ -8768,24 +8744,8 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
8768
8744
  for await (const [key, val] of Object.entries(nodeP.children)) {
8769
8745
  const ret = await func.UI.screen.render_ui_tree(SESSION_ID, $div, nodeP.children[key], parent_infoP, paramsP, jobNoP, is_skeleton, Number(key), null, nodeP, null, $root_container);
8770
8746
  }
8771
-
8772
- // const parent_id = $div.parent().attr('xu-ui-id');
8773
- // if (!UI_WORKER_OBJ.viewport_height_set_ids.includes(parent_id)) {
8774
- // UI_WORKER_OBJ.viewport_height_set_ids.push(parent_id);
8775
- // func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'set_viewport_height', { $elm: $div.parent(), height: $div.height() }, null, null, paramsP.dsSessionP);
8776
- // }
8777
-
8778
- // if ($div.hasClass('viewport_height')) {
8779
- // $div.css('height', 'unset');
8780
- // }
8781
-
8782
- // const height = $div.data().xuData.viewport_height;
8783
- // if (typeof height !== 'undefined') {
8784
- // $div.css('height', 'unset');
8785
- // } else {
8747
+ $div[0].style.removeProperty('height');
8786
8748
  $div.data().xuData.viewport_height = $div.height();
8787
- // func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'set_viewport_height', { $elm: $div.parent(), height: $div.height() }, null, null, paramsP.dsSessionP);
8788
- // }
8789
8749
 
8790
8750
  // set initial default height for all children
8791
8751
  const parent_id = $div.parent().attr('xu-ui-id');
@@ -8800,12 +8760,9 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
8800
8760
  set_viewport_height: async function () {
8801
8761
  const { $div, height } = queue_obj?.paramsP || {};
8802
8762
 
8803
- // $elm.data().xuData.viewport_height = $div.height();
8804
-
8805
8763
  $.each($div.parent().children(), function (key, elm) {
8806
8764
  if (!$(elm)[0].style.height && !$(elm).children().length) {
8807
- $(elm).css('height', height); //.addClass('viewport_height');
8808
- // $(elm).data().xuData.viewport_height = $div.height();
8765
+ $(elm).css('height', height);
8809
8766
  }
8810
8767
  });
8811
8768
 
@@ -11400,115 +11357,15 @@ func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callin
11400
11357
  $rootFrame.css('display', 'contents');
11401
11358
  }
11402
11359
 
11403
- // ////////// skeleton
11404
-
11405
11360
  var node = JSON.parse(JSON.stringify(screen_ret.progUi));
11406
11361
 
11407
- // const change_tree_to_skeleton = (node) => {
11408
- // var tags = ["input", "button", "li", "xu-panel"];
11409
- // $.each(node.children, (key, val) => {
11410
- // if (val.type !== "element") return true;
11411
-
11412
- // if (val.attributes) {
11413
- // delete val.attributes.placeholder;
11414
-
11415
- // var class_skeleton = "";
11416
-
11417
- // if (tags.includes(val.tagName) || !val.children.length) {
11418
- // class_skeleton = "skeleton";
11419
- // }
11420
- // if (class_skeleton) {
11421
- // if (val.attributes?.class) {
11422
- // val.attributes.class += ` ${class_skeleton}`;
11423
- // } else {
11424
- // val.attributes.class = class_skeleton;
11425
- // }
11426
- // if (val.tagName === "xu-panel") {
11427
- // val.tagName = "div";
11428
- // val.attributes.class += " skeleton-panel";
11429
- // }
11430
- // }
11431
- // change_tree_to_skeleton(val);
11432
- // }
11433
- // });
11434
- // };
11435
- // if (!is_panelP) {
11436
- // change_tree_to_skeleton(node[0]);
11437
-
11438
- // const $skeleton_wrapper = $("<div class='skeleton_wrapper'>");
11439
- // const ret_skelton = await func.UI.screen.render_ui_tree(
11440
- // SESSION_ID,
11441
- // $skeleton_wrapper,
11442
- // node[0].children[0],
11443
- // {},
11444
- // params,
11445
- // jobNoP,
11446
- // true,
11447
- // 0,
11448
- // null,
11449
- // node,
11450
- // null,
11451
- // $rootFrame
11452
- // );
11453
- // $rootFrame.append($skeleton_wrapper);
11454
- // }
11455
-
11456
- // const activate_skeleton = () => {
11457
- // let $parent_div = $(
11458
- // `[xu-ui-id="${$callingContainerP_data?.xuData?.parent_element_ui_id}"]`
11459
- // );
11460
- // if (!$parent_div?.length) return;
11461
-
11462
- // var tags = ["SPAN", "INPUT", "BUTTON", "LI", "XU-PANEL"];
11463
- // $.each($($parent_div).find("*"), (key, val) => {
11464
- // if (tags.includes($(val).prop("tagName")) || !$(val).children().length) {
11465
- // $(val).addClass("skeleton");
11466
- // }
11467
- // if ($(val).prop("tagName") === "XU-PANEL") {
11468
- // $(val).addClass("skeleton-panel");
11469
- // }
11470
- // if ($(val).prop("tagName") === "IMG") {
11471
- // let src = func.common.get_url(
11472
- // SESSION_ID,
11473
- // "dist",
11474
- // "runtime/images/skeleton-img.png"
11475
- // );
11476
- // $(val).attr("src", src);
11477
- // }
11478
- // });
11479
- // };
11480
- // if (is_panelP) {
11481
- // activate_skeleton();
11482
- // }
11483
- // console.log("***");
11484
11362
  func.UI.utils.indicator.screen.busy();
11485
11363
 
11486
- const ret = await func.datasource.create(
11487
- SESSION_ID,
11488
- prog_id,
11489
- refreshed_ds, //params?.callingDataSource_objP?.dsSession
11490
- params.parentDataSourceNoP,
11491
- $rootFrame.attr('id'),
11492
- rowIdP,
11493
- jobNoP,
11494
- null,
11495
- parameters_raw_obj,
11496
- null,
11497
- null,
11498
- null,
11499
- null,
11500
- null,
11501
- parameters_obj_inP,
11502
- );
11364
+ const ret = await func.datasource.create(SESSION_ID, prog_id, refreshed_ds, params.parentDataSourceNoP, $rootFrame.attr('id'), rowIdP, jobNoP, null, parameters_raw_obj, null, null, null, null, null, parameters_obj_inP);
11503
11365
 
11504
11366
  var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[ret.dsSessionP];
11505
11367
  _ds.screen_params = params;
11506
11368
 
11507
- // _ds.is_panel = is_panelP;
11508
- // setInterval(() => {
11509
- // _ds.ts = Date.now();
11510
- // }, 10000);
11511
-
11512
11369
  params.dsSessionP = ret.dsSessionP;
11513
11370
 
11514
11371
  func.UI.screen.update_SYS_OBJ_WIN_INFO(SESSION_ID, params.dsSessionP);
@@ -11990,23 +11847,8 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
11990
11847
  if ($elm?.length) {
11991
11848
  const elm_data = $elm.data();
11992
11849
  const $wrapper = $elm.parent();
11993
- // const wrapper_data = $wrapper.data();
11994
- const refreshed_ds = _ds.dsSession;
11995
11850
 
11996
- // let elm_to_delete = [];
11997
- // const ts = Date.now();
11998
- // $.each($elm.find('xu-root-component-' + SESSION_ID).find('*'), function (key, val) {
11999
- // let xu_ui_id = $(val).attr('xu-ui-id');
12000
- // if (xu_ui_id) {
12001
- // let new_id = xu_ui_id + ts;
12002
- // elm_to_delete.push(new_id);
12003
-
12004
- // $(val).attr('xu-ui-id', new_id).removeData();
12005
- // }
12006
- // // else {
12007
- // // $(val).remove();
12008
- // // }
12009
- // });
11851
+ const refreshed_ds = _ds.dsSession;
12010
11852
 
12011
11853
  $elm.empty();
12012
11854
  if ($elm.data()) {
@@ -12025,11 +11867,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
12025
11867
  elm_data.xuData.$root_container, // the wrapper root container
12026
11868
  );
12027
11869
 
12028
- // // remove old screen content
12029
- // $.each(elm_to_delete, async function (key, val) {
12030
- // $("[xu-ui-id='" + elm_to_delete + "']").remove();
12031
- // });
12032
-
12033
11870
  if (glb.DEBUG_MODE) {
12034
11871
  console.info('========= refresh main info ==============');
12035
11872
  console.info('reason:', refresh_reason);
@@ -12125,169 +11962,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
12125
11962
  }
12126
11963
  };
12127
11964
 
12128
- // func.UI.screen.refresh_screen_old = async function (SESSION_ID, fields_changed_arr, datasource_changed, fields_changed_datasource) {
12129
- // // check the main program
12130
- // if (fields_changed_datasource) {
12131
- // const _session = SESSION_OBJ[SESSION_ID];
12132
- // const _ds = _session.DS_GLB[fields_changed_datasource];
12133
- // const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, _ds.prog_id);
12134
- // const progDataSource_str = JSON.stringify(prog_doc.progDataSource);
12135
- // for (const field_id of fields_changed_arr || []) {
12136
- // }
12137
- // }
12138
-
12139
- // const panels_obj = await func.UI.utils.get_panels_wrapper_from_dom(SESSION_ID, $(SESSION_OBJ[SESSION_ID].root_element), false);
12140
-
12141
- // for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
12142
- // const progDataSource_str = JSON.stringify(panel_val.prog_doc.progDataSource);
12143
-
12144
- // var found, refresh_reason, refresh_details;
12145
- // if (fields_changed_arr) {
12146
- // if (fields_changed_datasource && panel_val._ds.dsSession <= Number(fields_changed_datasource)) {
12147
- // continue;
12148
- // }
12149
- // for (const field_id of fields_changed_arr) {
12150
- // // get panel attributes
12151
- // const _attributes = panel_val?.panelXuAttributes || {};
12152
-
12153
- // // detect if program changed
12154
- // found = _attributes['xu-exp:program']?.includes('@' + field_id);
12155
-
12156
- // if (found) {
12157
- // refresh_reason = `program ${_attributes['xu-exp:program']} ${field_id} changed `;
12158
- // refresh_details = _attributes;
12159
- // break;
12160
- // }
12161
-
12162
- // // _attributes holds also info of parameters in code_in: @code
12163
- // // search field changed in panel call send parameters exp
12164
- // for (const [attr, value] of Object.entries(_attributes)) {
12165
- // const pattern = /xu-exp:(\w+)/;
12166
- // const match = attr.match(pattern);
12167
-
12168
- // if (!match) {
12169
- // // continue if attribute is not expression
12170
- // continue;
12171
- // }
12172
- // // code_in
12173
- // const parameter_in_field_id = match?.[1];
12174
- // // @code
12175
- // if (value.includes(field_id)) {
12176
- // // search parameter in field in the target program's progDataSource
12177
- // found = progDataSource_str?.includes('@' + parameter_in_field_id);
12178
-
12179
- // if (found) {
12180
- // refresh_reason = `field ${field_id} in progDataSource parameter_in changed`;
12181
- // refresh_details = panel_val?.prog_doc?.progDataSource;
12182
-
12183
- // break;
12184
- // }
12185
-
12186
- // // found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
12187
- // found = func.UI.find_field_in_progUi_attributes(panel_val.prog_doc.progUi, parameter_in_field_id, 'xu-for').length;
12188
-
12189
- // if (found) {
12190
- // refresh_reason = `field ${field_id} in progUi xu-for parameter_in changed`;
12191
- // refresh_details = found;
12192
-
12193
- // break;
12194
- // }
12195
- // }
12196
- // }
12197
-
12198
- // if (found) break;
12199
-
12200
- // // search field changed in the target program's progDataSource // @code
12201
- // found = progDataSource_str?.includes('@' + field_id);
12202
- // if (found) {
12203
- // refresh_reason = `field ${field_id} in progDataSource changed`;
12204
- // refresh_details = panel_val?.prog_doc?.progDataSource;
12205
-
12206
- // break;
12207
- // }
12208
-
12209
- // found = func.UI.find_field_in_progUi_attributes(panel_val.prog_doc.progUi, field_id, 'xu-for').length;
12210
- // if (found) {
12211
- // refresh_reason = `field ${field_id} in progUi xu-for changed`;
12212
- // refresh_details = found;
12213
-
12214
- // break;
12215
- // }
12216
-
12217
- // if (found) {
12218
- // break;
12219
- // }
12220
- // }
12221
- // }
12222
-
12223
- // if (datasource_changed) {
12224
- // if (panel_val._ds.dsSession == datasource_changed) {
12225
- // refresh_reason = `panel datasource ${datasource_changed} changed`;
12226
- // refresh_details = '';
12227
-
12228
- // found = true;
12229
- // }
12230
- // }
12231
- // if (found) {
12232
- // const _session = SESSION_OBJ[SESSION_ID];
12233
- // if (_session.engine_mode === 'live_preview') {
12234
- // console.info('========= refresh info ==============');
12235
- // console.info('reason:', refresh_reason);
12236
- // console.info('details:', refresh_details);
12237
- // console.info('panel:', panel_val);
12238
- // console.info('=====================================');
12239
- // }
12240
- // const $div_elm = panel_val.$panel_div;
12241
- // const wrapper_data = $div_elm.data();
12242
-
12243
- // if (_.isEmpty(wrapper_data)) continue;
12244
-
12245
- // try {
12246
- // const ts = Date.now();
12247
- // // remove old panel content
12248
- // $.each(panel_val.ids, async function (key, val) {
12249
- // $("[xu-ui-id='" + val + "']")
12250
- // .attr('xu-ui-id', val + ts)
12251
- // .removeData();
12252
- // });
12253
-
12254
- // let refreshed_ds;
12255
- // // check if ds exist and deleted by garbage collector
12256
-
12257
- // if (_session.DS_GLB[panel_val._ds.dsSession]) {
12258
- // refreshed_ds = panel_val._ds.dsSession;
12259
- // }
12260
- // for await (const item of wrapper_data.xuData.node_org.children) {
12261
- // if (item.tagName !== 'xu-panel') continue;
12262
-
12263
- // const new_$div = await func.UI.screen.render_ui_tree(
12264
- // SESSION_ID,
12265
- // $div_elm, // the wrapper
12266
- // _.cloneDeep(item), // _.cloneDeep(wrapper_data.xuData.node_org.children[0]), // the xu-panel node
12267
- // {},
12268
- // wrapper_data.xuData.paramsP, // the wrapper params
12269
- // null,
12270
- // null,
12271
- // wrapper_data.xuData.key, // the wrapper key
12272
- // refreshed_ds, // the refreshed_ds
12273
- // wrapper_data.xuData.parent_node, // the wrapper parent node
12274
- // null,
12275
- // wrapper_data.xuData.$root_container, // the wrapper root container
12276
- // );
12277
- // }
12278
-
12279
- // // remove old panel content
12280
- // $.each(panel_val.ids, async function (key, val) {
12281
- // $("[xu-ui-id='" + val + ts + "']").remove();
12282
- // });
12283
- // } catch (error) {
12284
- // debugger;
12285
- // }
12286
- // // continue;
12287
- // }
12288
- // }
12289
- // };
12290
-
12291
11965
  const get_params_obj_new = async function (SESSION_ID, prog_id, nodeP, dsSession) {
12292
11966
  const _prog = await func.utils.VIEWS_OBJ.get(SESSION_ID, prog_id);
12293
11967
  if (!_prog) return;
@@ -12588,31 +12262,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12588
12262
  return field_id;
12589
12263
  };
12590
12264
 
12591
- // try {
12592
- // bind_field_id = await get_bind_field(val.value);
12593
- // val_is_reference_field = true;
12594
- // } catch (err) {
12595
- // try {
12596
- // if (!_.isEmpty($elm?.data()?.xuAttributes?.['xu-exp:xu-bind'])) {
12597
- // bind_field_exp = $elm.data().xuAttributes['xu-exp:xu-bind'];
12598
- // const res = await func.expression.get(SESSION_ID, bind_field_exp, paramsP.dsSessionP, 'UI Attr EXP');
12599
-
12600
- // if (Object.keys(res.fields).length) {
12601
- // const field_id_from_exp = Object.keys(res.fields)[0];
12602
- // bind_field_id = await get_bind_field(field_id_from_exp);
12603
- // } else {
12604
- // throw err?.message || err;
12605
- // }
12606
- // } else {
12607
- // throw err?.message || err;
12608
- // }
12609
- // } catch (err) {
12610
- // console.error(err?.message || err);
12611
- // return {};
12612
- // }
12613
- // // return {};
12614
- // }
12615
-
12616
12265
  try {
12617
12266
  bind_field_id = await get_bind_field(val.value.split('.')[0]);
12618
12267
  val_is_reference_field = true;
@@ -12665,10 +12314,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12665
12314
 
12666
12315
  var value = await func.common.get_cast_val(SESSION_ID, 'xu-bind', 'value', field_prop.props.fieldType, bind.getter($elm[0]));
12667
12316
 
12668
- // if (field_prop.props.fieldType === 'object' && !val_is_reference_field) {
12669
- // value = bind.getter($elm[0]);
12670
- // }
12671
-
12672
12317
  if (field_prop.props.fieldType === 'object') {
12673
12318
  value = await func.common.get_cast_val(SESSION_ID, 'xu-bind', 'value', input_field_type, bind.getter($elm[0]));
12674
12319
  }
@@ -12690,14 +12335,13 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12690
12335
  if (reference_source_obj.ret.type === 'array') {
12691
12336
  if (iterate_info.iterator_val === bind_field_id) {
12692
12337
  const arr_idx = Number($elm?.data()?.xuData?.iterate_info._key);
12693
- // let new_arr = _.cloneDeep(reference_source_obj.ret.value);
12338
+
12694
12339
  const dataset_arr = await func.datasource.get_value(SESSION_ID, reference_source_obj.fieldIdP, _dsP, reference_source_obj.currentRecordId);
12695
12340
  let new_arr = _.cloneDeep(dataset_arr.ret.value);
12696
- // if (field_prop.props.fieldType === 'object' && !val_is_reference_field) {
12341
+
12697
12342
  if (field_prop.props.fieldType === 'object' && val_is_reference_field) {
12698
12343
  let obj_item = new_arr[arr_idx];
12699
- // let e_exp = bind_field_exp.replace('@' + bind_field_id, 'obj_item');
12700
- // let new_val = eval(e_exp + `="${value}"`);
12344
+
12701
12345
  let e_exp = val.value.replace(bind_field_id, 'obj_item');
12702
12346
 
12703
12347
  let new_val = eval(e_exp + (input_field_type === 'string' ? `="${value}"` : `=${value}`));
@@ -12715,7 +12359,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12715
12359
  },
12716
12360
  },
12717
12361
  };
12718
- // await func.datasource.update(SESSION_ID, datasource_changes, null, ['radio', 'checkbox'].includes(input_field_type) ? true : false);
12362
+
12719
12363
  await func.datasource.update(SESSION_ID, datasource_changes, null, true);
12720
12364
  }
12721
12365
  }
@@ -12769,7 +12413,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12769
12413
  $('body').on('xu-bind-refresh.' + _ds.dsSession.toString(), () => {
12770
12414
  set_value();
12771
12415
  });
12772
- // $("body").trigger("xu-bind-refresh." + _ds.dsSession.toString());
12416
+
12773
12417
  set_value();
12774
12418
  return {};
12775
12419
  },
@@ -14820,10 +14464,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14820
14464
  function (entries) {
14821
14465
  entries.forEach((entry) => {
14822
14466
  if (entry.isIntersecting) {
14823
- // Element is in viewport - trigger custom event
14824
- // console.log('trigger>>', 'inViewport_' + $(entry.target).attr('xu-ui-id'));
14825
-
14826
- // $(entry.target).trigger('inViewport_' + $(entry.target).attr('xu-ui-id'));
14827
14467
  $(entry.target).trigger('inViewport');
14828
14468
 
14829
14469
  // Optional: stop observing once triggered
@@ -14853,9 +14493,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14853
14493
  },
14854
14494
  );
14855
14495
 
14856
- // if ($div.parent().data().xuData.viewport_elm_height) {
14857
- // $div.css(height, $div.parent().data().xuData.viewport_elm_height);
14858
- // }
14859
14496
  let ui_job_id;
14860
14497
  $div.on('inViewport', function () {
14861
14498
  if ($div.children().length) {
@@ -14863,13 +14500,8 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14863
14500
  return;
14864
14501
  }
14865
14502
 
14866
- // const height = $div.data().xuData.viewport_height;
14867
- // if (typeof height !== 'undefined') {
14868
- // $div.css('height', 'unset');
14869
- $div[0].style.removeProperty('height');
14870
- // }
14871
-
14872
14503
  if (UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')]) {
14504
+ $div[0].style.removeProperty('height');
14873
14505
  $div.removeClass('skeleton');
14874
14506
  $div.html(UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')]);
14875
14507
  } else {
@@ -14940,13 +14572,6 @@ func.UI.screen.refresh_document_changes_for_realtime_update = async function (SE
14940
14572
  try {
14941
14573
  // disabled in purpose to support create row
14942
14574
 
14943
- // const row_idx = func.common.find_ROWID_idx(_ds, doc_change.row_id);
14944
-
14945
- // console.log(
14946
- // "refresh_document_changes_for_realtime_update",
14947
- // _ds.data_feed.rows[row_idx]
14948
- // );
14949
-
14950
14575
  if (!_ds.screen_params) continue;
14951
14576
  if (_ds.screen_params.is_panelP) {
14952
14577
  func.UI.screen.refresh_screen(SESSION_ID, null, key);
@@ -14959,128 +14584,6 @@ func.UI.screen.refresh_document_changes_for_realtime_update = async function (SE
14959
14584
  }
14960
14585
  }
14961
14586
  };
14962
-
14963
- // func.UI.screen.hover_in = function (SESSION_ID, $div, $container, paramsP, is_skeleton) {
14964
- // if (is_skeleton || EXP_BUSY) return;
14965
-
14966
- // var _session = SESSION_OBJ[SESSION_ID];
14967
- // var _ds = _session.DS_GLB[paramsP.dsSessionP];
14968
-
14969
- // const _$ = function ($elm) {
14970
- // try {
14971
- // const id = $elm.attr('xu-ui-id');
14972
- // if (!id) return $elm;
14973
- // const $el = $(`[xu-ui-id="${id}"]`); // $("#" + id);
14974
-
14975
- // if ($el.length > 1) {
14976
- // console.warn('Multiple elements for xu-ui-id: ' + id, $el);
14977
- // }
14978
-
14979
- // return $($el[0]);
14980
- // } catch (e) {
14981
- // console.error(e);
14982
- // }
14983
- // };
14984
-
14985
- // CLIENT_ACTIVITY_TS = Date.now();
14986
- // if (_$($container)?.data()?.xuData?.debug_info) _$($container).data().xuData.debug_info.hover_item = $div.attr('xu-ui-id');
14987
- // if (!_ds) return;
14988
- // ///////// SET Attributes///////////
14989
- // let attributes = {};
14990
- // $.each($div[0].attributes, function (index, attr) {
14991
- // attributes[attr.name] = attr.value;
14992
- // });
14993
-
14994
- // SESSION_OBJ[SESSION_ID].DS_GLB[0].data_system.SYS_OBJ_WIN_ELEMENT_HOVERED_ATTRIBUTES = attributes;
14995
- // //////////////////////////////////
14996
- // if (!$div.data()?.xuData) return;
14997
- // const _iterate_info = $div.data().xuData.iterate_info;
14998
- // if (_iterate_info) {
14999
- // if (_iterate_info.is_key_dynamic_field) {
15000
- // _ds.dynamic_fields[_iterate_info.iterator_key].value = _iterate_info._key;
15001
- // } else {
15002
- // try {
15003
- // const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
15004
- // _ds.data_feed.rows[row_idx][_iterate_info.iterator_key] = _iterate_info._key;
15005
- // } catch (err) {
15006
- // console.error(err);
15007
- // }
15008
- // }
15009
-
15010
- // if (_iterate_info.is_val_dynamic_field) {
15011
- // _ds.dynamic_fields[_iterate_info.iterator_val].value = _iterate_info._val;
15012
- // } else {
15013
- // try {
15014
- // const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
15015
- // _ds.data_feed.rows[row_idx][_iterate_info.iterator_val] = _iterate_info._val;
15016
- // } catch (err) {
15017
- // console.error(err);
15018
- // }
15019
- // }
15020
- // }
15021
-
15022
- // if ($div && _$($div) && _ds && paramsP.renderType === 'grid') {
15023
- // func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'update_datasource', { currentRecordId: _$($div).data().xuData.currentRecordId }, null, null, paramsP.dsSessionP);
15024
- // }
15025
-
15026
- // const set_value = function (field_id, value) {
15027
- // var currentRecordId = _$($div).data().xuData.currentRecordId;
15028
-
15029
- // func.UI.worker.add_to_queue(
15030
- // SESSION_ID,
15031
- // 'gui event',
15032
- // 'update_datasource',
15033
- // {
15034
- // currentRecordId,
15035
- // field_id,
15036
- // field_value: value,
15037
- // },
15038
- // null,
15039
- // null,
15040
- // paramsP.dsSessionP,
15041
- // );
15042
- // };
15043
-
15044
- // if ($div?.data()?.iterate_info) {
15045
- // var data = $div.data().xuData.iterate_info;
15046
- // if (data.iterator_key) {
15047
- // set_value(data.iterator_key, data._key);
15048
- // }
15049
- // if (data.iterator_val) {
15050
- // set_value(data.iterator_val, data._val);
15051
- // }
15052
- // }
15053
- // };
15054
- // func.UI.screen.hover_out = function (SESSION_ID, $container, is_skeleton, paramsP) {
15055
- // if (is_skeleton || EXP_BUSY) return;
15056
-
15057
- // var _session = SESSION_OBJ[SESSION_ID];
15058
- // var _ds = _session.DS_GLB[paramsP.dsSessionP];
15059
-
15060
- // const _$ = function ($elm) {
15061
- // try {
15062
- // const id = $elm.attr('xu-ui-id');
15063
- // if (!id) return $elm;
15064
- // const $el = $(`[xu-ui-id="${id}"]`); // $("#" + id);
15065
-
15066
- // if ($el.length > 1) {
15067
- // console.warn('Multiple elements for xu-ui-id: ' + id, $el);
15068
- // }
15069
-
15070
- // return $($el[0]);
15071
- // } catch (e) {
15072
- // console.error(e);
15073
- // }
15074
- // };
15075
-
15076
- // CLIENT_ACTIVITY_TS = Date.now();
15077
- // if (_$($container)?.data()?.xuData?.debug_info) {
15078
- // _$($container).data().xuData.debug_info.hover_item = null;
15079
- // }
15080
- // if (_ds?.data_system) {
15081
- // SESSION_OBJ[SESSION_ID].DS_GLB[0].data_system.SYS_OBJ_WIN_ELEMENT_HOVERED_ATTRIBUTES = {};
15082
- // }
15083
- // };
15084
14587
  func.UI.component = {};
15085
14588
 
15086
14589
  func.UI.component.create_app_modal_component = function (