@xuda.io/runtime-bundle 1.0.404 → 1.0.406
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-slim.js
CHANGED
|
@@ -8896,6 +8896,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
|
8896
8896
|
null,
|
|
8897
8897
|
queue_obj.paramsP.elem_val.$elm.data().xuData.iterate_info,
|
|
8898
8898
|
);
|
|
8899
|
+
console.log(res);
|
|
8899
8900
|
}
|
|
8900
8901
|
|
|
8901
8902
|
const attr_new = attr.split('xu-exp:')[1];
|
|
@@ -11557,7 +11558,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11557
11558
|
}
|
|
11558
11559
|
}
|
|
11559
11560
|
}
|
|
11560
|
-
if (found) break;
|
|
11561
|
+
// if (found) break;
|
|
11561
11562
|
|
|
11562
11563
|
if (item.children) {
|
|
11563
11564
|
await iterate_progUi(item.children, item.id);
|
|
@@ -11593,8 +11594,8 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11593
11594
|
};
|
|
11594
11595
|
|
|
11595
11596
|
func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr, datasource_changed, fields_changed_datasource) {
|
|
11596
|
-
const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
|
|
11597
|
-
|
|
11597
|
+
// const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
|
|
11598
|
+
|
|
11598
11599
|
const panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, false);
|
|
11599
11600
|
|
|
11600
11601
|
const find_field_in_progUi = function (progUi, field_id, prop) {
|
|
@@ -11623,9 +11624,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
11623
11624
|
for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
|
|
11624
11625
|
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id);
|
|
11625
11626
|
const progDataSource_str = JSON.stringify(prog_doc.progDataSource);
|
|
11626
|
-
// const progUi_str = JSON.stringify(prog_doc.progUi);
|
|
11627
|
-
|
|
11628
|
-
// console.log("panel_val", panel_val)
|
|
11629
11627
|
|
|
11630
11628
|
var found;
|
|
11631
11629
|
if (fields_changed_arr) {
|
|
@@ -11645,7 +11643,7 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
11645
11643
|
for (const [attr, value] of Object.entries(_attributes)) {
|
|
11646
11644
|
const pattern = /xu-exp:(\w+)/;
|
|
11647
11645
|
const match = attr.match(pattern);
|
|
11648
|
-
|
|
11646
|
+
|
|
11649
11647
|
if (!match) {
|
|
11650
11648
|
// continue if attribute is not expression
|
|
11651
11649
|
continue;
|
|
@@ -11658,9 +11656,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
11658
11656
|
found = progDataSource_str?.includes('@' + parameter_in_field_id);
|
|
11659
11657
|
if (found) break;
|
|
11660
11658
|
|
|
11661
|
-
// found = progUi_str?.includes("@" + parameter_in_field_id);
|
|
11662
|
-
// if (found) return false;
|
|
11663
|
-
|
|
11664
11659
|
found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
|
|
11665
11660
|
if (found) break;
|
|
11666
11661
|
}
|
|
@@ -11671,12 +11666,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
11671
11666
|
// search field changed in the target program's progDataSource // @code
|
|
11672
11667
|
found = progDataSource_str?.includes('@' + field_id);
|
|
11673
11668
|
if (found) break;
|
|
11674
|
-
|
|
11675
|
-
// found = progUi_str?.includes("@" + field_id);
|
|
11676
|
-
// if (found) return false;
|
|
11677
|
-
|
|
11678
|
-
// found = find_field_in_progUi(prog_doc.progUi, field_id)
|
|
11679
|
-
// if (found) break
|
|
11680
11669
|
}
|
|
11681
11670
|
}
|
|
11682
11671
|
|
|
@@ -11693,26 +11682,10 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
11693
11682
|
|
|
11694
11683
|
// restore original panel
|
|
11695
11684
|
try {
|
|
11696
|
-
const $org_panel = panel_val.$div.data().xuPanelData.$panel_div;
|
|
11697
|
-
|
|
11698
|
-
// const old_ds = $($org_panel).data().xuData.paramsP.dsSessionP;
|
|
11699
|
-
// func.datasource.del(SESSION_ID, old_ds);
|
|
11685
|
+
// const $org_panel = panel_val.$div.data().xuPanelData.$panel_div;
|
|
11700
11686
|
|
|
11701
11687
|
const new_$div = await func.UI.screen.render_ui_tree(SESSION_ID, $div_elm, _.cloneDeep(panel_val.$div.data().xuPanelData.node), {}, $div_elm.data().xuData.paramsP, null, null, $div_elm.data().xuData.key, null, $div_elm.data().xuData.parent_node, null, $div_elm.data().xuData.$root_container);
|
|
11702
|
-
|
|
11703
|
-
// SESSION_ID,
|
|
11704
|
-
// $div_elm,
|
|
11705
|
-
// _.cloneDeep(panel_val.$div.data().xuPanelData.node),
|
|
11706
|
-
// {},
|
|
11707
|
-
// $org_panel.data().xuData.paramsP,
|
|
11708
|
-
// null,
|
|
11709
|
-
// null,
|
|
11710
|
-
// $org_panel.data().xuData.key,
|
|
11711
|
-
// null,
|
|
11712
|
-
// $org_panel.data().xuData.parent_node,
|
|
11713
|
-
// null,
|
|
11714
|
-
// $org_panel.data().xuData.$root_container
|
|
11715
|
-
// );
|
|
11688
|
+
|
|
11716
11689
|
// remove old panel content
|
|
11717
11690
|
$.each(panel_val.ids, async function (key, val) {
|
|
11718
11691
|
$("[xu-ui-id='" + val + "']").remove();
|
|
@@ -11962,14 +11935,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
11962
11935
|
// Callback function to execute when mutations are observed
|
|
11963
11936
|
const callback = (mutationList, observer) => {
|
|
11964
11937
|
func.UI.screen.refresh_xu_attributes(SESSION_ID, [val.value]);
|
|
11965
|
-
return;
|
|
11966
|
-
for (const mutation of mutationList) {
|
|
11967
|
-
if (mutation.type === 'childList') {
|
|
11968
|
-
console.log('A child node has been added or removed.');
|
|
11969
|
-
} else if (mutation.type === 'attributes') {
|
|
11970
|
-
console.log(`The ${mutation.attributeName} attribute was modified.`);
|
|
11971
|
-
}
|
|
11972
|
-
}
|
|
11973
11938
|
};
|
|
11974
11939
|
|
|
11975
11940
|
// Create an observer instance linked to the callback function
|
|
@@ -12755,7 +12720,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
12755
12720
|
|
|
12756
12721
|
// ALL
|
|
12757
12722
|
|
|
12758
|
-
// let svg_attributes_str = ""
|
|
12759
12723
|
for await (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
12760
12724
|
if (_ret.abort) break;
|
|
12761
12725
|
if (glb.html5_events_handler.includes(key) || execute_attributes.includes(key)) {
|
|
@@ -12769,12 +12733,7 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
12769
12733
|
) {
|
|
12770
12734
|
// handle common html attributes
|
|
12771
12735
|
try {
|
|
12772
|
-
// $elm.attr(key, val);
|
|
12773
|
-
// if (nodeP.tagName === "svg") {
|
|
12774
|
-
// svg_attributes_str += `${key}="${val}" `
|
|
12775
|
-
// } else {
|
|
12776
12736
|
$elm.get(0).setAttribute(key, val);
|
|
12777
|
-
// }
|
|
12778
12737
|
} catch (err) {
|
|
12779
12738
|
console.error(err.message);
|
|
12780
12739
|
}
|
|
@@ -12783,7 +12742,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
12783
12742
|
}
|
|
12784
12743
|
// handle xu attributes
|
|
12785
12744
|
try {
|
|
12786
|
-
// console.log(">>>> attributes", key, val);
|
|
12787
12745
|
$elm.data().xuAttributes[key] = val;
|
|
12788
12746
|
} catch (error) {
|
|
12789
12747
|
debugger;
|
|
@@ -8897,6 +8897,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
|
8897
8897
|
null,
|
|
8898
8898
|
queue_obj.paramsP.elem_val.$elm.data().xuData.iterate_info,
|
|
8899
8899
|
);
|
|
8900
|
+
console.log(res);
|
|
8900
8901
|
}
|
|
8901
8902
|
|
|
8902
8903
|
const attr_new = attr.split('xu-exp:')[1];
|
|
@@ -9630,7 +9631,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9630
9631
|
}
|
|
9631
9632
|
}
|
|
9632
9633
|
}
|
|
9633
|
-
if (found) break;
|
|
9634
|
+
// if (found) break;
|
|
9634
9635
|
|
|
9635
9636
|
if (item.children) {
|
|
9636
9637
|
await iterate_progUi(item.children, item.id);
|
|
@@ -9666,8 +9667,8 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9666
9667
|
};
|
|
9667
9668
|
|
|
9668
9669
|
func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr, datasource_changed, fields_changed_datasource) {
|
|
9669
|
-
const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
|
|
9670
|
-
|
|
9670
|
+
// const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
|
|
9671
|
+
|
|
9671
9672
|
const panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, false);
|
|
9672
9673
|
|
|
9673
9674
|
const find_field_in_progUi = function (progUi, field_id, prop) {
|
|
@@ -9696,9 +9697,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9696
9697
|
for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
|
|
9697
9698
|
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id);
|
|
9698
9699
|
const progDataSource_str = JSON.stringify(prog_doc.progDataSource);
|
|
9699
|
-
// const progUi_str = JSON.stringify(prog_doc.progUi);
|
|
9700
|
-
|
|
9701
|
-
// console.log("panel_val", panel_val)
|
|
9702
9700
|
|
|
9703
9701
|
var found;
|
|
9704
9702
|
if (fields_changed_arr) {
|
|
@@ -9718,7 +9716,7 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9718
9716
|
for (const [attr, value] of Object.entries(_attributes)) {
|
|
9719
9717
|
const pattern = /xu-exp:(\w+)/;
|
|
9720
9718
|
const match = attr.match(pattern);
|
|
9721
|
-
|
|
9719
|
+
|
|
9722
9720
|
if (!match) {
|
|
9723
9721
|
// continue if attribute is not expression
|
|
9724
9722
|
continue;
|
|
@@ -9731,9 +9729,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9731
9729
|
found = progDataSource_str?.includes('@' + parameter_in_field_id);
|
|
9732
9730
|
if (found) break;
|
|
9733
9731
|
|
|
9734
|
-
// found = progUi_str?.includes("@" + parameter_in_field_id);
|
|
9735
|
-
// if (found) return false;
|
|
9736
|
-
|
|
9737
9732
|
found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
|
|
9738
9733
|
if (found) break;
|
|
9739
9734
|
}
|
|
@@ -9744,12 +9739,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9744
9739
|
// search field changed in the target program's progDataSource // @code
|
|
9745
9740
|
found = progDataSource_str?.includes('@' + field_id);
|
|
9746
9741
|
if (found) break;
|
|
9747
|
-
|
|
9748
|
-
// found = progUi_str?.includes("@" + field_id);
|
|
9749
|
-
// if (found) return false;
|
|
9750
|
-
|
|
9751
|
-
// found = find_field_in_progUi(prog_doc.progUi, field_id)
|
|
9752
|
-
// if (found) break
|
|
9753
9742
|
}
|
|
9754
9743
|
}
|
|
9755
9744
|
|
|
@@ -9766,26 +9755,10 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9766
9755
|
|
|
9767
9756
|
// restore original panel
|
|
9768
9757
|
try {
|
|
9769
|
-
const $org_panel = panel_val.$div.data().xuPanelData.$panel_div;
|
|
9770
|
-
|
|
9771
|
-
// const old_ds = $($org_panel).data().xuData.paramsP.dsSessionP;
|
|
9772
|
-
// func.datasource.del(SESSION_ID, old_ds);
|
|
9758
|
+
// const $org_panel = panel_val.$div.data().xuPanelData.$panel_div;
|
|
9773
9759
|
|
|
9774
9760
|
const new_$div = await func.UI.screen.render_ui_tree(SESSION_ID, $div_elm, _.cloneDeep(panel_val.$div.data().xuPanelData.node), {}, $div_elm.data().xuData.paramsP, null, null, $div_elm.data().xuData.key, null, $div_elm.data().xuData.parent_node, null, $div_elm.data().xuData.$root_container);
|
|
9775
|
-
|
|
9776
|
-
// SESSION_ID,
|
|
9777
|
-
// $div_elm,
|
|
9778
|
-
// _.cloneDeep(panel_val.$div.data().xuPanelData.node),
|
|
9779
|
-
// {},
|
|
9780
|
-
// $org_panel.data().xuData.paramsP,
|
|
9781
|
-
// null,
|
|
9782
|
-
// null,
|
|
9783
|
-
// $org_panel.data().xuData.key,
|
|
9784
|
-
// null,
|
|
9785
|
-
// $org_panel.data().xuData.parent_node,
|
|
9786
|
-
// null,
|
|
9787
|
-
// $org_panel.data().xuData.$root_container
|
|
9788
|
-
// );
|
|
9761
|
+
|
|
9789
9762
|
// remove old panel content
|
|
9790
9763
|
$.each(panel_val.ids, async function (key, val) {
|
|
9791
9764
|
$("[xu-ui-id='" + val + "']").remove();
|
|
@@ -10035,14 +10008,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10035
10008
|
// Callback function to execute when mutations are observed
|
|
10036
10009
|
const callback = (mutationList, observer) => {
|
|
10037
10010
|
func.UI.screen.refresh_xu_attributes(SESSION_ID, [val.value]);
|
|
10038
|
-
return;
|
|
10039
|
-
for (const mutation of mutationList) {
|
|
10040
|
-
if (mutation.type === 'childList') {
|
|
10041
|
-
console.log('A child node has been added or removed.');
|
|
10042
|
-
} else if (mutation.type === 'attributes') {
|
|
10043
|
-
console.log(`The ${mutation.attributeName} attribute was modified.`);
|
|
10044
|
-
}
|
|
10045
|
-
}
|
|
10046
10011
|
};
|
|
10047
10012
|
|
|
10048
10013
|
// Create an observer instance linked to the callback function
|
|
@@ -10828,7 +10793,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
10828
10793
|
|
|
10829
10794
|
// ALL
|
|
10830
10795
|
|
|
10831
|
-
// let svg_attributes_str = ""
|
|
10832
10796
|
for await (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
10833
10797
|
if (_ret.abort) break;
|
|
10834
10798
|
if (glb.html5_events_handler.includes(key) || execute_attributes.includes(key)) {
|
|
@@ -10842,12 +10806,7 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
10842
10806
|
) {
|
|
10843
10807
|
// handle common html attributes
|
|
10844
10808
|
try {
|
|
10845
|
-
// $elm.attr(key, val);
|
|
10846
|
-
// if (nodeP.tagName === "svg") {
|
|
10847
|
-
// svg_attributes_str += `${key}="${val}" `
|
|
10848
|
-
// } else {
|
|
10849
10809
|
$elm.get(0).setAttribute(key, val);
|
|
10850
|
-
// }
|
|
10851
10810
|
} catch (err) {
|
|
10852
10811
|
console.error(err.message);
|
|
10853
10812
|
}
|
|
@@ -10856,7 +10815,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
10856
10815
|
}
|
|
10857
10816
|
// handle xu attributes
|
|
10858
10817
|
try {
|
|
10859
|
-
// console.log(">>>> attributes", key, val);
|
|
10860
10818
|
$elm.data().xuAttributes[key] = val;
|
|
10861
10819
|
} catch (error) {
|
|
10862
10820
|
debugger;
|