@xuda.io/runtime-bundle 1.0.1419 → 1.0.1420
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js/xuda-runtime-bundle.js +21 -8
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +21 -8
- package/js/xuda-runtime-slim.min.es.js +21 -8
- package/js/xuda-runtime-slim.min.js +2 -2
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +2 -4
- package/js/xuda-worker-bundle.js +2 -4
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -3926,10 +3926,8 @@ func.datasource.create = async function (
|
|
|
3926
3926
|
|
|
3927
3927
|
var run_at = _prog_obj?.properties?.runAt;
|
|
3928
3928
|
|
|
3929
|
-
if (
|
|
3930
|
-
|
|
3931
|
-
run_at = 'client';
|
|
3932
|
-
}
|
|
3929
|
+
if (_session.opt.app_computing_mode === 'main') {
|
|
3930
|
+
run_at = 'client';
|
|
3933
3931
|
}
|
|
3934
3932
|
|
|
3935
3933
|
if (_prog_obj?.properties.menuType === 'globals') {
|
|
@@ -9051,6 +9049,9 @@ func.runtime.ui.get_meta = function (xu_ui_id, key) {
|
|
|
9051
9049
|
return key ? entry[key] : entry;
|
|
9052
9050
|
};
|
|
9053
9051
|
func.runtime.ui.delete_meta = function (xu_ui_id) {
|
|
9052
|
+
if (func.runtime.ui._meta_store[xu_ui_id]) {
|
|
9053
|
+
console.info('[xu-render-debug] delete_meta called for', xu_ui_id, new Error().stack?.split('\n').slice(1, 4).join(' <- '));
|
|
9054
|
+
}
|
|
9054
9055
|
delete func.runtime.ui._meta_store[xu_ui_id];
|
|
9055
9056
|
// clean reverse lookup
|
|
9056
9057
|
for (const id in func.runtime.ui._element_id_to_xu_ui_id) {
|
|
@@ -11483,6 +11484,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
|
11483
11484
|
const perf_end = func.runtime?.perf?.start?.(SESSION_ID, 'execute_xu_render_attributes');
|
|
11484
11485
|
const live_context = fx.get_live_element_context(queue_obj.paramsP?.elem_key, queue_obj.elementP || queue_obj.paramsP?.elem_val?.$elm, queue_obj.paramsP);
|
|
11485
11486
|
const _data = live_context.data;
|
|
11487
|
+
console.info('[xu-render-debug] execute_xu_render_attributes', { elem_key: queue_obj.paramsP?.elem_key, has_live_elm: !!live_context.$elm?.length, has_data: !!_data, has_xuData: !!_data?.xuData, has_paramsP: !!_data?.xuData?.paramsP, attr_value: queue_obj.paramsP?.attr_value, elm_tag: func.runtime.ui.get_first_node(live_context.$elm)?.tagName, data_keys: Object.keys(_data || {}), xuData_keys: Object.keys(_data?.xuData || {}) });
|
|
11486
11488
|
try {
|
|
11487
11489
|
if (_data?.xuData?.paramsP) {
|
|
11488
11490
|
const live_xu_data = _data.xuData;
|
|
@@ -14734,6 +14736,7 @@ func.runtime.ui.refresh_xu_attributes = async function (options) {
|
|
|
14734
14736
|
const attr_value = await func.common.get_cast_val(options.SESSION_ID, 'refresh xu-attributes', 'xu-render', 'bool', res.result);
|
|
14735
14737
|
|
|
14736
14738
|
const _elm_node = func.runtime.ui.get_first_node($elm);
|
|
14739
|
+
console.info('[xu-render-debug] refresh has_xu_exp_render', { elem_key, attr_value, elm_tag: _elm_node?.tagName, exp_value: xuAttributes['xu-exp:xu-render'], result: res.result });
|
|
14737
14740
|
if (!attr_value && _elm_node?.tagName === 'XURENDER') continue;
|
|
14738
14741
|
|
|
14739
14742
|
if (attr_value && _elm_node?.tagName !== 'XURENDER') {
|
|
@@ -17629,6 +17632,8 @@ func.runtime.widgets = func.runtime.widgets || {};
|
|
|
17629
17632
|
|
|
17630
17633
|
func.runtime.render.handle_legacy_xu_render = async function (options) {
|
|
17631
17634
|
const value = await func.common.get_cast_val(options.SESSION_ID, 'common fx', 'xu-render', 'bool', options.val.value);
|
|
17635
|
+
const _xu_ui_id_dbg = func.runtime.ui.get_attr(options.$elm, 'xu-ui-id');
|
|
17636
|
+
console.info('[xu-render-debug] handle_legacy_xu_render called', { value, is_init: options.is_init, xu_ui_id: _xu_ui_id_dbg, elm_tag: func.runtime.ui.get_first_node(options.$elm)?.tagName });
|
|
17632
17637
|
|
|
17633
17638
|
const init_render = function () {
|
|
17634
17639
|
if (!value) {
|
|
@@ -17647,11 +17652,9 @@ func.runtime.render.handle_legacy_xu_render = async function (options) {
|
|
|
17647
17652
|
const snapshot_xuAttributes = options.nodeP.attributes || {};
|
|
17648
17653
|
const xu_ui_id = func.runtime.ui.get_attr(options.$elm, 'xu-ui-id');
|
|
17649
17654
|
|
|
17655
|
+
console.info('[xu-render-debug] init_render hiding', { xu_ui_id, has_snapshot_xuData: !!snapshot_xuData, has_paramsP: !!snapshot_xuData?.paramsP, has_original_data_obj: !!original_data_obj, snapshot_xuAttributes_keys: Object.keys(snapshot_xuAttributes) });
|
|
17656
|
+
|
|
17650
17657
|
// Remove original element from DOM WITHOUT deleting _meta_store.
|
|
17651
|
-
// Using func.runtime.ui.remove() would call delete_meta(xu_ui_id),
|
|
17652
|
-
// wiping the meta entry before create_xu_render_placeholder can write it.
|
|
17653
|
-
// The XURENDER placeholder reuses the same xu-ui-id, so the meta entry
|
|
17654
|
-
// will be overwritten below — no orphaned data.
|
|
17655
17658
|
const _elm_node = func.runtime.ui.get_first_node(options.$elm);
|
|
17656
17659
|
if (_elm_node?.remove) {
|
|
17657
17660
|
_elm_node.remove();
|
|
@@ -17666,6 +17669,10 @@ func.runtime.render.handle_legacy_xu_render = async function (options) {
|
|
|
17666
17669
|
xuAttributes: snapshot_xuAttributes,
|
|
17667
17670
|
});
|
|
17668
17671
|
|
|
17672
|
+
// Verify data was written correctly
|
|
17673
|
+
const verify_meta = func.runtime.ui._meta_store[xu_ui_id];
|
|
17674
|
+
console.info('[xu-render-debug] init_render DONE', { xu_ui_id, meta_exists: !!verify_meta, has_xuData: !!verify_meta?.xuData, has_paramsP: !!verify_meta?.xuData?.paramsP, has_original_data_obj: !!verify_meta?.xuData?.original_data_obj, has_xuAttributes: !!verify_meta?.xuAttributes });
|
|
17675
|
+
|
|
17669
17676
|
return { abort: true };
|
|
17670
17677
|
}
|
|
17671
17678
|
return {};
|
|
@@ -17697,12 +17704,18 @@ func.runtime.render.handle_legacy_xu_render = async function (options) {
|
|
|
17697
17704
|
if (value) {
|
|
17698
17705
|
try {
|
|
17699
17706
|
const elm_node = func.runtime.ui.get_first_node(options.$elm);
|
|
17707
|
+
const _post_xu_ui_id = func.runtime.ui.get_attr(options.$elm, 'xu-ui-id');
|
|
17708
|
+
const _post_meta = func.runtime.ui._meta_store[_post_xu_ui_id];
|
|
17709
|
+
const _post_data = func.runtime.ui.get_data(options.$elm);
|
|
17710
|
+
console.info('[xu-render-debug] post_render value=true', { xu_ui_id: _post_xu_ui_id, elm_tag: elm_node?.tagName, meta_exists: !!_post_meta, has_xuData: !!_post_data?.xuData, has_paramsP: !!_post_data?.xuData?.paramsP, has_original_data_obj: !!_post_data?.xuData?.original_data_obj, xuData_keys: Object.keys(_post_data?.xuData || {}), data_keys: Object.keys(_post_data || {}) });
|
|
17700
17711
|
if (elm_node?.tagName !== 'XURENDER' && elm_node) {
|
|
17712
|
+
console.info('[xu-render-debug] post_render SKIP: not XURENDER tag', elm_node?.tagName);
|
|
17701
17713
|
return func.events.delete_job(options.SESSION_ID, options.jobNoP);
|
|
17702
17714
|
}
|
|
17703
17715
|
|
|
17704
17716
|
const original_data_obj = func.runtime.ui.get_data(options.$elm).xuData.original_data_obj;
|
|
17705
17717
|
if (!original_data_obj) {
|
|
17718
|
+
console.info('[xu-render-debug] post_render SKIP: no original_data_obj');
|
|
17706
17719
|
func.events.delete_job(options.SESSION_ID, options.jobNoP);
|
|
17707
17720
|
return { delete_job: options.jobNoP };
|
|
17708
17721
|
}
|
|
@@ -3852,10 +3852,8 @@ func.datasource.create = async function (
|
|
|
3852
3852
|
|
|
3853
3853
|
var run_at = _prog_obj?.properties?.runAt;
|
|
3854
3854
|
|
|
3855
|
-
if (
|
|
3856
|
-
|
|
3857
|
-
run_at = 'client';
|
|
3858
|
-
}
|
|
3855
|
+
if (_session.opt.app_computing_mode === 'main') {
|
|
3856
|
+
run_at = 'client';
|
|
3859
3857
|
}
|
|
3860
3858
|
|
|
3861
3859
|
if (_prog_obj?.properties.menuType === 'globals') {
|
|
@@ -8977,6 +8975,9 @@ func.runtime.ui.get_meta = function (xu_ui_id, key) {
|
|
|
8977
8975
|
return key ? entry[key] : entry;
|
|
8978
8976
|
};
|
|
8979
8977
|
func.runtime.ui.delete_meta = function (xu_ui_id) {
|
|
8978
|
+
if (func.runtime.ui._meta_store[xu_ui_id]) {
|
|
8979
|
+
console.info('[xu-render-debug] delete_meta called for', xu_ui_id, new Error().stack?.split('\n').slice(1, 4).join(' <- '));
|
|
8980
|
+
}
|
|
8980
8981
|
delete func.runtime.ui._meta_store[xu_ui_id];
|
|
8981
8982
|
// clean reverse lookup
|
|
8982
8983
|
for (const id in func.runtime.ui._element_id_to_xu_ui_id) {
|
|
@@ -11409,6 +11410,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
|
11409
11410
|
const perf_end = func.runtime?.perf?.start?.(SESSION_ID, 'execute_xu_render_attributes');
|
|
11410
11411
|
const live_context = fx.get_live_element_context(queue_obj.paramsP?.elem_key, queue_obj.elementP || queue_obj.paramsP?.elem_val?.$elm, queue_obj.paramsP);
|
|
11411
11412
|
const _data = live_context.data;
|
|
11413
|
+
console.info('[xu-render-debug] execute_xu_render_attributes', { elem_key: queue_obj.paramsP?.elem_key, has_live_elm: !!live_context.$elm?.length, has_data: !!_data, has_xuData: !!_data?.xuData, has_paramsP: !!_data?.xuData?.paramsP, attr_value: queue_obj.paramsP?.attr_value, elm_tag: func.runtime.ui.get_first_node(live_context.$elm)?.tagName, data_keys: Object.keys(_data || {}), xuData_keys: Object.keys(_data?.xuData || {}) });
|
|
11412
11414
|
try {
|
|
11413
11415
|
if (_data?.xuData?.paramsP) {
|
|
11414
11416
|
const live_xu_data = _data.xuData;
|
|
@@ -14660,6 +14662,7 @@ func.runtime.ui.refresh_xu_attributes = async function (options) {
|
|
|
14660
14662
|
const attr_value = await func.common.get_cast_val(options.SESSION_ID, 'refresh xu-attributes', 'xu-render', 'bool', res.result);
|
|
14661
14663
|
|
|
14662
14664
|
const _elm_node = func.runtime.ui.get_first_node($elm);
|
|
14665
|
+
console.info('[xu-render-debug] refresh has_xu_exp_render', { elem_key, attr_value, elm_tag: _elm_node?.tagName, exp_value: xuAttributes['xu-exp:xu-render'], result: res.result });
|
|
14663
14666
|
if (!attr_value && _elm_node?.tagName === 'XURENDER') continue;
|
|
14664
14667
|
|
|
14665
14668
|
if (attr_value && _elm_node?.tagName !== 'XURENDER') {
|
|
@@ -17555,6 +17558,8 @@ func.runtime.widgets = func.runtime.widgets || {};
|
|
|
17555
17558
|
|
|
17556
17559
|
func.runtime.render.handle_legacy_xu_render = async function (options) {
|
|
17557
17560
|
const value = await func.common.get_cast_val(options.SESSION_ID, 'common fx', 'xu-render', 'bool', options.val.value);
|
|
17561
|
+
const _xu_ui_id_dbg = func.runtime.ui.get_attr(options.$elm, 'xu-ui-id');
|
|
17562
|
+
console.info('[xu-render-debug] handle_legacy_xu_render called', { value, is_init: options.is_init, xu_ui_id: _xu_ui_id_dbg, elm_tag: func.runtime.ui.get_first_node(options.$elm)?.tagName });
|
|
17558
17563
|
|
|
17559
17564
|
const init_render = function () {
|
|
17560
17565
|
if (!value) {
|
|
@@ -17573,11 +17578,9 @@ func.runtime.render.handle_legacy_xu_render = async function (options) {
|
|
|
17573
17578
|
const snapshot_xuAttributes = options.nodeP.attributes || {};
|
|
17574
17579
|
const xu_ui_id = func.runtime.ui.get_attr(options.$elm, 'xu-ui-id');
|
|
17575
17580
|
|
|
17581
|
+
console.info('[xu-render-debug] init_render hiding', { xu_ui_id, has_snapshot_xuData: !!snapshot_xuData, has_paramsP: !!snapshot_xuData?.paramsP, has_original_data_obj: !!original_data_obj, snapshot_xuAttributes_keys: Object.keys(snapshot_xuAttributes) });
|
|
17582
|
+
|
|
17576
17583
|
// Remove original element from DOM WITHOUT deleting _meta_store.
|
|
17577
|
-
// Using func.runtime.ui.remove() would call delete_meta(xu_ui_id),
|
|
17578
|
-
// wiping the meta entry before create_xu_render_placeholder can write it.
|
|
17579
|
-
// The XURENDER placeholder reuses the same xu-ui-id, so the meta entry
|
|
17580
|
-
// will be overwritten below — no orphaned data.
|
|
17581
17584
|
const _elm_node = func.runtime.ui.get_first_node(options.$elm);
|
|
17582
17585
|
if (_elm_node?.remove) {
|
|
17583
17586
|
_elm_node.remove();
|
|
@@ -17592,6 +17595,10 @@ func.runtime.render.handle_legacy_xu_render = async function (options) {
|
|
|
17592
17595
|
xuAttributes: snapshot_xuAttributes,
|
|
17593
17596
|
});
|
|
17594
17597
|
|
|
17598
|
+
// Verify data was written correctly
|
|
17599
|
+
const verify_meta = func.runtime.ui._meta_store[xu_ui_id];
|
|
17600
|
+
console.info('[xu-render-debug] init_render DONE', { xu_ui_id, meta_exists: !!verify_meta, has_xuData: !!verify_meta?.xuData, has_paramsP: !!verify_meta?.xuData?.paramsP, has_original_data_obj: !!verify_meta?.xuData?.original_data_obj, has_xuAttributes: !!verify_meta?.xuAttributes });
|
|
17601
|
+
|
|
17595
17602
|
return { abort: true };
|
|
17596
17603
|
}
|
|
17597
17604
|
return {};
|
|
@@ -17623,12 +17630,18 @@ func.runtime.render.handle_legacy_xu_render = async function (options) {
|
|
|
17623
17630
|
if (value) {
|
|
17624
17631
|
try {
|
|
17625
17632
|
const elm_node = func.runtime.ui.get_first_node(options.$elm);
|
|
17633
|
+
const _post_xu_ui_id = func.runtime.ui.get_attr(options.$elm, 'xu-ui-id');
|
|
17634
|
+
const _post_meta = func.runtime.ui._meta_store[_post_xu_ui_id];
|
|
17635
|
+
const _post_data = func.runtime.ui.get_data(options.$elm);
|
|
17636
|
+
console.info('[xu-render-debug] post_render value=true', { xu_ui_id: _post_xu_ui_id, elm_tag: elm_node?.tagName, meta_exists: !!_post_meta, has_xuData: !!_post_data?.xuData, has_paramsP: !!_post_data?.xuData?.paramsP, has_original_data_obj: !!_post_data?.xuData?.original_data_obj, xuData_keys: Object.keys(_post_data?.xuData || {}), data_keys: Object.keys(_post_data || {}) });
|
|
17626
17637
|
if (elm_node?.tagName !== 'XURENDER' && elm_node) {
|
|
17638
|
+
console.info('[xu-render-debug] post_render SKIP: not XURENDER tag', elm_node?.tagName);
|
|
17627
17639
|
return func.events.delete_job(options.SESSION_ID, options.jobNoP);
|
|
17628
17640
|
}
|
|
17629
17641
|
|
|
17630
17642
|
const original_data_obj = func.runtime.ui.get_data(options.$elm).xuData.original_data_obj;
|
|
17631
17643
|
if (!original_data_obj) {
|
|
17644
|
+
console.info('[xu-render-debug] post_render SKIP: no original_data_obj');
|
|
17632
17645
|
func.events.delete_job(options.SESSION_ID, options.jobNoP);
|
|
17633
17646
|
return { delete_job: options.jobNoP };
|
|
17634
17647
|
}
|