@xuda.io/runtime-bundle 1.0.1249 → 1.0.1251
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 +296 -133
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +296 -133
- package/js/xuda-runtime-slim.min.es.js +296 -133
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +34 -21
- package/js/xuda-worker-bundle.js +34 -21
- package/js/xuda-worker-bundle.min.js +1 -1
- package/js/xuda_common-bundle.js +34 -21
- package/js/xuda_common-bundle.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -2674,27 +2674,40 @@ func.common.get_data_from_websocket = async function (SESSION_ID, serviceP, data
|
|
|
2674
2674
|
});
|
|
2675
2675
|
};
|
|
2676
2676
|
|
|
2677
|
-
func.common.sha256 = async function (inputString) {
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2677
|
+
// func.common.sha256 = async function (inputString) {
|
|
2678
|
+
// // 1. Create a hash buffer from the input string using SHA-256.
|
|
2679
|
+
// // This part remains the same as it provides a strong, unique cryptographic starting point.
|
|
2680
|
+
// const buffer = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(inputString));
|
|
2681
|
+
|
|
2682
|
+
// // 2. Interpret the first 8 bytes (64 bits) of the hash as one big number.
|
|
2683
|
+
// const view = new DataView(buffer);
|
|
2684
|
+
// const bigInt = view.getBigUint64(0, false); // `false` for big-endian
|
|
2685
|
+
|
|
2686
|
+
// // 3. Convert the BigInt to a Base36 string.
|
|
2687
|
+
// // The .toString(36) method handles the conversion to an alphanumeric representation (0-9, a-z).
|
|
2688
|
+
// const base36Hash = bigInt.toString(36);
|
|
2689
|
+
|
|
2690
|
+
// // 4. Take the first 10 characters. If it's shorter, it will just return the whole string.
|
|
2691
|
+
// // For a 64-bit integer, the Base36 representation will be about 13 characters long,
|
|
2692
|
+
// // so slicing is a reliable way to get a fixed length.
|
|
2693
|
+
// const shortHash = base36Hash.slice(0, 10);
|
|
2694
|
+
|
|
2695
|
+
// // 5. Pad the start in the unlikely case the hash is shorter than 10 characters.
|
|
2696
|
+
// // This ensures the output is always exactly 10 characters long.
|
|
2697
|
+
// return shortHash.padStart(10, '0');
|
|
2698
|
+
// };
|
|
2699
|
+
|
|
2700
|
+
func.common.fastHash = function (inputString) {
|
|
2701
|
+
let hash = 0x811c9dc5; // FNV offset basis
|
|
2702
|
+
|
|
2703
|
+
for (let i = 0; i < inputString.length; i++) {
|
|
2704
|
+
hash ^= inputString.charCodeAt(i);
|
|
2705
|
+
// FNV prime multiplication with 32-bit overflow
|
|
2706
|
+
hash += (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + (hash << 24);
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
// Convert to base36 and pad to 10 characters
|
|
2710
|
+
return ((hash >>> 0).toString(36) + '0000000000').slice(0, 10);
|
|
2698
2711
|
};
|
|
2699
2712
|
|
|
2700
2713
|
glb.new_xu_render = false;
|
|
@@ -14756,162 +14769,312 @@ func.UI.screen.panel_post_render_handler = async function (
|
|
|
14756
14769
|
return jobNoP;
|
|
14757
14770
|
};
|
|
14758
14771
|
|
|
14772
|
+
// const generate_xu_ui_id = async function (SESSION_ID, nodeP, $container, paramsP, keyP) {
|
|
14773
|
+
// // const _paramsP = _.cloneDeep(paramsP);
|
|
14774
|
+
// const _paramsP = klona.klona(paramsP);
|
|
14775
|
+
// var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_paramsP.dsSessionP];
|
|
14776
|
+
|
|
14777
|
+
// const currentRecordId = $container?.data?.()?.xuData?.recordid || (_ds ? _ds.currentRecordId : '');
|
|
14778
|
+
// const key_path = `${$container?.data()?.xuData?.key_path || '0'}-${keyP || '0'}`;
|
|
14779
|
+
// const elem_key = `${nodeP.xu_tree_id || nodeP.id}-${key_path}-${currentRecordId}`;
|
|
14780
|
+
// let ui_id = `${nodeP.id}-${elem_key}-${_paramsP?.dsSessionP?.toString() || ''}`; //nodeP.xu_tree_id ||
|
|
14781
|
+
|
|
14782
|
+
// const new_ui_id = await func.common.sha256(ui_id);
|
|
14783
|
+
// return new_ui_id;
|
|
14784
|
+
// };
|
|
14785
|
+
|
|
14759
14786
|
const generate_xu_ui_id = async function (SESSION_ID, nodeP, $container, paramsP, keyP) {
|
|
14760
|
-
//
|
|
14761
|
-
const
|
|
14762
|
-
|
|
14787
|
+
// Avoid cloning if we only need dsSessionP
|
|
14788
|
+
const dsSessionP = paramsP.dsSessionP;
|
|
14789
|
+
const _ds = SESSION_OBJ[SESSION_ID].DS_GLB[dsSessionP];
|
|
14790
|
+
|
|
14791
|
+
// Cache container data access
|
|
14792
|
+
const containerXuData = $container?.data?.()?.xuData;
|
|
14793
|
+
const currentRecordId = containerXuData?.recordid || _ds?.currentRecordId || '';
|
|
14763
14794
|
|
|
14764
|
-
|
|
14765
|
-
const key_path = `${
|
|
14766
|
-
const
|
|
14767
|
-
|
|
14795
|
+
// Build strings efficiently
|
|
14796
|
+
const key_path = `${containerXuData?.key_path || '0'}-${keyP || '0'}`;
|
|
14797
|
+
const nodeId = nodeP.xu_tree_id || nodeP.id;
|
|
14798
|
+
const elem_key = `${nodeId}-${key_path}-${currentRecordId}`;
|
|
14799
|
+
const ui_id = `${nodeP.id}-${elem_key}-${dsSessionP?.toString() || ''}`;
|
|
14768
14800
|
|
|
14769
|
-
|
|
14770
|
-
return new_ui_id;
|
|
14801
|
+
return await func.common.fastHash(ui_id);
|
|
14771
14802
|
};
|
|
14772
14803
|
|
|
14804
|
+
// func.UI.screen.create_container = async function (SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, classP, elem_propP, div_typeP, $appendToP, attr_str, is_placeholder) {
|
|
14805
|
+
// // const _paramsP = _.cloneDeep(paramsP);
|
|
14806
|
+
// const _paramsP = klona.klona(paramsP);
|
|
14807
|
+
// var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_paramsP.dsSessionP];
|
|
14808
|
+
// var $appendTo = $container;
|
|
14809
|
+
// if ($appendToP) $appendTo = $appendToP;
|
|
14810
|
+
// if (!$appendTo || !$appendTo.length) return null; // screen closed or not exist abort build
|
|
14811
|
+
// var div = 'div';
|
|
14812
|
+
// if (div_typeP) div = div_typeP;
|
|
14813
|
+
// var items = [];
|
|
14814
|
+
// if (nodeP.children)
|
|
14815
|
+
// items = nodeP.children.map(function (val) {
|
|
14816
|
+
// return val.xu_tree_id || val.id;
|
|
14817
|
+
// });
|
|
14818
|
+
// var currentRecordId = $container?.data?.()?.xuData?.recordid || (_ds ? _ds.currentRecordId : '');
|
|
14819
|
+
// // var xu_id = (glb.screen_num++).toString();
|
|
14820
|
+
// // xu_id = xu_id += '_' + currentRecordId;
|
|
14821
|
+
|
|
14822
|
+
// try {
|
|
14823
|
+
// const key_path = `${$container?.data()?.xuData?.key_path || '0'}-${keyP || '0'}`;
|
|
14824
|
+
// const elem_key = `${nodeP.xu_tree_id || nodeP.id}-${key_path}-${currentRecordId}`;
|
|
14825
|
+
// // let ui_id = `${nodeP.id}-${elem_key}-${_paramsP?.dsSessionP?.toString() || ''}`; //nodeP.xu_tree_id ||
|
|
14826
|
+
|
|
14827
|
+
// /////////////////////////////////
|
|
14828
|
+
|
|
14829
|
+
// var $div;
|
|
14830
|
+
|
|
14831
|
+
// if (div === 'svg') {
|
|
14832
|
+
// const draw_svg = function (element) {
|
|
14833
|
+
// const get_tag_str = function (element, prop, val) {
|
|
14834
|
+
// let class_str = '';
|
|
14835
|
+
// let attr_str = '';
|
|
14836
|
+
// for (const [key, val] of Object.entries(prop)) {
|
|
14837
|
+
// if (key.substr(0, 2) !== 'xu') {
|
|
14838
|
+
// attr_str += ` ${key}="${val}" `;
|
|
14839
|
+
// }
|
|
14840
|
+
// }
|
|
14841
|
+
// if (element === 'svg') {
|
|
14842
|
+
// return `<${element} ${attr_str} > `;
|
|
14843
|
+
// }
|
|
14844
|
+
// let ret = '';
|
|
14845
|
+
// if (val?.children?.length) {
|
|
14846
|
+
// ret = iterate_svg(val);
|
|
14847
|
+
// }
|
|
14848
|
+
|
|
14849
|
+
// return `<${element} ${class_str} ${attr_str} > ${ret} </${element}>`;
|
|
14850
|
+
// };
|
|
14851
|
+
// let svg_str = get_tag_str(element, prop);
|
|
14852
|
+
// let inner_str = '';
|
|
14853
|
+
// const iterate_svg = function (node) {
|
|
14854
|
+
// let ret = '';
|
|
14855
|
+
// if (node.children) {
|
|
14856
|
+
// for (let val of node.children) {
|
|
14857
|
+
// let prop = val.attributes;
|
|
14858
|
+
// ret += get_tag_str(val.tagName, prop, val);
|
|
14859
|
+
// }
|
|
14860
|
+
// }
|
|
14861
|
+
// return ret;
|
|
14862
|
+
// };
|
|
14863
|
+
// inner_str = iterate_svg(nodeP);
|
|
14864
|
+
|
|
14865
|
+
// $div = $(svg_str + inner_str + '</svg>').appendTo($appendTo);
|
|
14866
|
+
// };
|
|
14867
|
+
|
|
14868
|
+
// draw_svg(div_typeP);
|
|
14869
|
+
// } else {
|
|
14870
|
+
// $div = $(`<${div} ${attr_str ? attr_str : ''}>`);
|
|
14871
|
+
// }
|
|
14872
|
+
|
|
14873
|
+
// // // Returns a 32-bit unsigned integer hash of a string (FNV-1a)
|
|
14874
|
+
// // function hash32(str) {
|
|
14875
|
+
// // let h = 0x811c9dc5; // FNV offset basis
|
|
14876
|
+
// // for (let i = 0; i < str.length; i++) {
|
|
14877
|
+
// // h ^= str.charCodeAt(i);
|
|
14878
|
+
// // // multiply by FNV prime (2^24 + 2^8 + 0x93) with 32-bit overflow
|
|
14879
|
+
// // h += (h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24);
|
|
14880
|
+
// // }
|
|
14881
|
+
// // // Convert to unsigned 32-bit
|
|
14882
|
+
// // return h >>> 0;
|
|
14883
|
+
// // }
|
|
14884
|
+
|
|
14885
|
+
// // function hash32hex(str) {
|
|
14886
|
+
// // return (hash32(str) >>> 0).toString(16).padStart(8, '0');
|
|
14887
|
+
// // }
|
|
14888
|
+
|
|
14889
|
+
// // const new_ui_id = hash32hex(ui_id);
|
|
14890
|
+
// // const new_ui_id = await func.common.sha256(ui_id);
|
|
14891
|
+
// const new_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
|
|
14892
|
+
|
|
14893
|
+
// $div
|
|
14894
|
+
// .attr('xu-ui-id', new_ui_id)
|
|
14895
|
+
// // .attr('xu-node-id', nodeP.id)
|
|
14896
|
+
// .data({
|
|
14897
|
+
// xuData: {
|
|
14898
|
+
// prog_id: _paramsP.prog_id,
|
|
14899
|
+
// nodeid: nodeP.id,
|
|
14900
|
+
// ui_type: nodeP.tagName,
|
|
14901
|
+
// // xu_id,
|
|
14902
|
+
// recordid: currentRecordId,
|
|
14903
|
+
// paramsP: _paramsP,
|
|
14904
|
+
// key: keyP,
|
|
14905
|
+
// key_path, //:($container?.data()?.xuData?.key || "0") + "-" + (keyP || "0"),
|
|
14906
|
+
// screenId: _paramsP.screenId,
|
|
14907
|
+
// parent_container: $container?.attr('id'),
|
|
14908
|
+
// elem_key,
|
|
14909
|
+
// properties: prop,
|
|
14910
|
+
// node: nodeP,
|
|
14911
|
+
// node_org: _.cloneDeep(nodeP),
|
|
14912
|
+
// is_panelP: _paramsP.is_panelP,
|
|
14913
|
+
// ui_id: new_ui_id,
|
|
14914
|
+
// elem_prop: elem_propP,
|
|
14915
|
+
// debug_info: {
|
|
14916
|
+
// id: nodeP.id,
|
|
14917
|
+
// parent_id: $container?.data()?.xuData?.ui_id,
|
|
14918
|
+
// items: items,
|
|
14919
|
+
// },
|
|
14920
|
+
// parent_node: parent_nodeP,
|
|
14921
|
+
// currentRecordId: currentRecordId,
|
|
14922
|
+
// $root_container: $root_container,
|
|
14923
|
+
// parent_element_ui_id: $container?.data()?.xuData?.ui_id,
|
|
14924
|
+
// },
|
|
14925
|
+
// xuAttributes: {},
|
|
14926
|
+
// });
|
|
14927
|
+
// if (is_placeholder) {
|
|
14928
|
+
// $div.addClass('display_none');
|
|
14929
|
+
// }
|
|
14930
|
+
|
|
14931
|
+
// if (div_typeP !== 'svg') {
|
|
14932
|
+
// $div.appendTo($appendTo);
|
|
14933
|
+
// }
|
|
14934
|
+
// } catch (e) {
|
|
14935
|
+
// console.error(e);
|
|
14936
|
+
// }
|
|
14937
|
+
|
|
14938
|
+
// if (parent_infoP?.iterate_info) {
|
|
14939
|
+
// $div.data().xuData.iterate_info = parent_infoP.iterate_info;
|
|
14940
|
+
// }
|
|
14941
|
+
|
|
14942
|
+
// if (classP) $div.addClass(classP);
|
|
14943
|
+
|
|
14944
|
+
// return $div;
|
|
14945
|
+
// };
|
|
14946
|
+
|
|
14773
14947
|
func.UI.screen.create_container = async function (SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, classP, elem_propP, div_typeP, $appendToP, attr_str, is_placeholder) {
|
|
14774
|
-
// const _paramsP = _.cloneDeep(paramsP);
|
|
14775
14948
|
const _paramsP = klona.klona(paramsP);
|
|
14776
|
-
|
|
14777
|
-
|
|
14778
|
-
|
|
14779
|
-
|
|
14780
|
-
|
|
14781
|
-
|
|
14782
|
-
|
|
14783
|
-
|
|
14784
|
-
|
|
14785
|
-
|
|
14786
|
-
|
|
14787
|
-
|
|
14788
|
-
|
|
14789
|
-
//
|
|
14949
|
+
const _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_paramsP.dsSessionP];
|
|
14950
|
+
const $appendTo = $appendToP || $container;
|
|
14951
|
+
|
|
14952
|
+
// Early exit if container doesn't exist
|
|
14953
|
+
if (!$appendTo?.length) return null;
|
|
14954
|
+
|
|
14955
|
+
const div = div_typeP || 'div';
|
|
14956
|
+
|
|
14957
|
+
// Cache container data to avoid repeated access
|
|
14958
|
+
const containerData = $container?.data?.();
|
|
14959
|
+
const containerXuData = containerData?.xuData;
|
|
14960
|
+
const currentRecordId = containerXuData?.recordid || (_ds ? _ds.currentRecordId : '');
|
|
14961
|
+
|
|
14962
|
+
// Pre-compute items array
|
|
14963
|
+
const items = nodeP.children ? nodeP.children.map((val) => val.xu_tree_id || val.id) : [];
|
|
14790
14964
|
|
|
14791
14965
|
try {
|
|
14792
|
-
const key_path = `${
|
|
14966
|
+
const key_path = `${containerXuData?.key_path || '0'}-${keyP || '0'}`;
|
|
14793
14967
|
const elem_key = `${nodeP.xu_tree_id || nodeP.id}-${key_path}-${currentRecordId}`;
|
|
14794
|
-
// let ui_id = `${nodeP.id}-${elem_key}-${_paramsP?.dsSessionP?.toString() || ''}`; //nodeP.xu_tree_id ||
|
|
14795
14968
|
|
|
14796
|
-
|
|
14797
|
-
|
|
14798
|
-
var $div;
|
|
14969
|
+
let $div;
|
|
14799
14970
|
|
|
14971
|
+
// Handle SVG creation
|
|
14800
14972
|
if (div === 'svg') {
|
|
14801
14973
|
const draw_svg = function (element) {
|
|
14802
14974
|
const get_tag_str = function (element, prop, val) {
|
|
14803
|
-
|
|
14804
|
-
|
|
14805
|
-
for (const [key,
|
|
14806
|
-
if (key.
|
|
14807
|
-
|
|
14975
|
+
const attrs = [];
|
|
14976
|
+
|
|
14977
|
+
for (const [key, value] of Object.entries(prop)) {
|
|
14978
|
+
if (!key.startsWith('xu')) {
|
|
14979
|
+
attrs.push(`${key}="${value}"`);
|
|
14808
14980
|
}
|
|
14809
14981
|
}
|
|
14982
|
+
|
|
14983
|
+
const attr_str = attrs.join(' ');
|
|
14984
|
+
|
|
14810
14985
|
if (element === 'svg') {
|
|
14811
|
-
return `<${element}
|
|
14812
|
-
}
|
|
14813
|
-
let ret = '';
|
|
14814
|
-
if (val?.children?.length) {
|
|
14815
|
-
ret = iterate_svg(val);
|
|
14986
|
+
return `<${element} ${attr_str}>`;
|
|
14816
14987
|
}
|
|
14817
14988
|
|
|
14818
|
-
|
|
14989
|
+
const inner = val?.children?.length ? iterate_svg(val) : '';
|
|
14990
|
+
return `<${element} ${attr_str}>${inner}</${element}>`;
|
|
14819
14991
|
};
|
|
14820
|
-
|
|
14821
|
-
let inner_str = '';
|
|
14992
|
+
|
|
14822
14993
|
const iterate_svg = function (node) {
|
|
14823
|
-
|
|
14824
|
-
|
|
14825
|
-
|
|
14826
|
-
let prop = val.attributes;
|
|
14827
|
-
ret += get_tag_str(val.tagName, prop, val);
|
|
14828
|
-
}
|
|
14829
|
-
}
|
|
14830
|
-
return ret;
|
|
14994
|
+
if (!node.children) return '';
|
|
14995
|
+
|
|
14996
|
+
return node.children.map((val) => get_tag_str(val.tagName, val.attributes, val)).join('');
|
|
14831
14997
|
};
|
|
14832
|
-
|
|
14998
|
+
|
|
14999
|
+
const svg_str = get_tag_str(element, prop);
|
|
15000
|
+
const inner_str = iterate_svg(nodeP);
|
|
14833
15001
|
|
|
14834
15002
|
$div = $(svg_str + inner_str + '</svg>').appendTo($appendTo);
|
|
14835
15003
|
};
|
|
14836
15004
|
|
|
14837
15005
|
draw_svg(div_typeP);
|
|
14838
15006
|
} else {
|
|
14839
|
-
$div = $(`<${div}
|
|
15007
|
+
$div = $(`<${div}${attr_str ? ' ' + attr_str : ''}>`);
|
|
14840
15008
|
}
|
|
14841
15009
|
|
|
14842
|
-
//
|
|
14843
|
-
|
|
14844
|
-
// let h = 0x811c9dc5; // FNV offset basis
|
|
14845
|
-
// for (let i = 0; i < str.length; i++) {
|
|
14846
|
-
// h ^= str.charCodeAt(i);
|
|
14847
|
-
// // multiply by FNV prime (2^24 + 2^8 + 0x93) with 32-bit overflow
|
|
14848
|
-
// h += (h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24);
|
|
14849
|
-
// }
|
|
14850
|
-
// // Convert to unsigned 32-bit
|
|
14851
|
-
// return h >>> 0;
|
|
14852
|
-
// }
|
|
15010
|
+
// Generate UI ID
|
|
15011
|
+
const new_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
|
|
14853
15012
|
|
|
14854
|
-
//
|
|
14855
|
-
|
|
14856
|
-
|
|
15013
|
+
// Set attributes and data in one go
|
|
15014
|
+
$div.attr('xu-ui-id', new_ui_id);
|
|
15015
|
+
|
|
15016
|
+
// Build xuData object efficiently
|
|
15017
|
+
const xuData = {
|
|
15018
|
+
prog_id: _paramsP.prog_id,
|
|
15019
|
+
nodeid: nodeP.id,
|
|
15020
|
+
ui_type: nodeP.tagName,
|
|
15021
|
+
recordid: currentRecordId,
|
|
15022
|
+
paramsP: _paramsP,
|
|
15023
|
+
key: keyP,
|
|
15024
|
+
key_path,
|
|
15025
|
+
screenId: _paramsP.screenId,
|
|
15026
|
+
parent_container: containerData?.id,
|
|
15027
|
+
elem_key,
|
|
15028
|
+
properties: prop,
|
|
15029
|
+
node: nodeP,
|
|
15030
|
+
node_org: _.cloneDeep(nodeP),
|
|
15031
|
+
is_panelP: _paramsP.is_panelP,
|
|
15032
|
+
ui_id: new_ui_id,
|
|
15033
|
+
elem_prop: elem_propP,
|
|
15034
|
+
debug_info: {
|
|
15035
|
+
id: nodeP.id,
|
|
15036
|
+
parent_id: containerXuData?.ui_id,
|
|
15037
|
+
items: items,
|
|
15038
|
+
},
|
|
15039
|
+
parent_node: parent_nodeP,
|
|
15040
|
+
currentRecordId: currentRecordId,
|
|
15041
|
+
$root_container: $root_container,
|
|
15042
|
+
parent_element_ui_id: containerXuData?.ui_id,
|
|
15043
|
+
};
|
|
14857
15044
|
|
|
14858
|
-
//
|
|
14859
|
-
|
|
14860
|
-
|
|
15045
|
+
// Add iterate_info if present
|
|
15046
|
+
if (parent_infoP?.iterate_info) {
|
|
15047
|
+
xuData.iterate_info = parent_infoP.iterate_info;
|
|
15048
|
+
}
|
|
14861
15049
|
|
|
14862
|
-
|
|
14863
|
-
|
|
14864
|
-
|
|
14865
|
-
|
|
14866
|
-
|
|
14867
|
-
|
|
14868
|
-
|
|
14869
|
-
ui_type: nodeP.tagName,
|
|
14870
|
-
// xu_id,
|
|
14871
|
-
recordid: currentRecordId,
|
|
14872
|
-
paramsP: _paramsP,
|
|
14873
|
-
key: keyP,
|
|
14874
|
-
key_path, //:($container?.data()?.xuData?.key || "0") + "-" + (keyP || "0"),
|
|
14875
|
-
screenId: _paramsP.screenId,
|
|
14876
|
-
parent_container: $container?.attr('id'),
|
|
14877
|
-
elem_key,
|
|
14878
|
-
properties: prop,
|
|
14879
|
-
node: nodeP,
|
|
14880
|
-
node_org: _.cloneDeep(nodeP),
|
|
14881
|
-
is_panelP: _paramsP.is_panelP,
|
|
14882
|
-
ui_id: new_ui_id,
|
|
14883
|
-
elem_prop: elem_propP,
|
|
14884
|
-
debug_info: {
|
|
14885
|
-
id: nodeP.id,
|
|
14886
|
-
parent_id: $container?.data()?.xuData?.ui_id,
|
|
14887
|
-
items: items,
|
|
14888
|
-
},
|
|
14889
|
-
parent_node: parent_nodeP,
|
|
14890
|
-
currentRecordId: currentRecordId,
|
|
14891
|
-
$root_container: $root_container,
|
|
14892
|
-
parent_element_ui_id: $container?.data()?.xuData?.ui_id,
|
|
14893
|
-
},
|
|
14894
|
-
xuAttributes: {},
|
|
14895
|
-
});
|
|
15050
|
+
// Set data once
|
|
15051
|
+
$div.data({
|
|
15052
|
+
xuData: xuData,
|
|
15053
|
+
xuAttributes: {},
|
|
15054
|
+
});
|
|
15055
|
+
|
|
15056
|
+
// Apply placeholder class if needed
|
|
14896
15057
|
if (is_placeholder) {
|
|
14897
15058
|
$div.addClass('display_none');
|
|
14898
15059
|
}
|
|
14899
15060
|
|
|
15061
|
+
// Apply custom class if provided
|
|
15062
|
+
if (classP) {
|
|
15063
|
+
$div.addClass(classP);
|
|
15064
|
+
}
|
|
15065
|
+
|
|
15066
|
+
// Append to DOM (only for non-SVG elements)
|
|
14900
15067
|
if (div_typeP !== 'svg') {
|
|
14901
15068
|
$div.appendTo($appendTo);
|
|
14902
15069
|
}
|
|
14903
|
-
} catch (e) {
|
|
14904
|
-
console.error(e);
|
|
14905
|
-
}
|
|
14906
15070
|
|
|
14907
|
-
|
|
14908
|
-
|
|
15071
|
+
return $div;
|
|
15072
|
+
} catch (e) {
|
|
15073
|
+
console.error('create_container error:', e);
|
|
15074
|
+
return null;
|
|
14909
15075
|
}
|
|
14910
|
-
|
|
14911
|
-
if (classP) $div.addClass(classP);
|
|
14912
|
-
|
|
14913
|
-
return $div;
|
|
14914
15076
|
};
|
|
15077
|
+
|
|
14915
15078
|
func.UI.screen.execute_screen_ready_events = async function (SESSION_ID, paramsP, sourceP, $div, jobNoP, $div_objP) {
|
|
14916
15079
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP];
|
|
14917
15080
|
if (!_ds) return;
|