@xuda.io/runtime-bundle 1.0.461 → 1.0.462
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/modules/xuda-actions-module.esm.js +111 -169
- package/js/modules/xuda-actions-module.esm.min.js +1 -1
- package/js/modules/xuda-studio-checker.min.mjs +1 -1
- package/js/modules/xuda-studio-checker.mjs +621 -982
- package/js/xuda-runtime-bundle.js +106 -170
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-mini-bundle.js +98 -131
- package/js/xuda-runtime-slim.js +106 -170
- package/js/xuda-runtime-slim.min.es.js +106 -170
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +104 -137
- package/js/xuda-worker-bundle.js +104 -137
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
|
@@ -3054,18 +3054,7 @@ var STUDIO_PEER_CONN_MSG_QUEUE = [];
|
|
|
3054
3054
|
|
|
3055
3055
|
var CLIENT_ACTIVITY_TS;
|
|
3056
3056
|
|
|
3057
|
-
glb.REFERENCE_LESS_FUNCTIONS = [
|
|
3058
|
-
"update",
|
|
3059
|
-
"raise_event",
|
|
3060
|
-
"call_library",
|
|
3061
|
-
"invoke_action",
|
|
3062
|
-
"loader_on",
|
|
3063
|
-
"loader_off",
|
|
3064
|
-
"emit_event",
|
|
3065
|
-
"delay",
|
|
3066
|
-
"execute_evaluate_javascript",
|
|
3067
|
-
"execute_native_javascript",
|
|
3068
|
-
];
|
|
3057
|
+
glb.REFERENCE_LESS_FUNCTIONS = ['update', 'raise_event', 'call_library', 'invoke_action', 'loader_on', 'loader_off', 'emit_event', 'delay', 'execute_evaluate_javascript', 'execute_native_javascript'];
|
|
3069
3058
|
|
|
3070
3059
|
var CACHE_PROG_UI = {};
|
|
3071
3060
|
|
|
@@ -3082,7 +3071,7 @@ var ELEMENT_CLICK_EVENT = null;
|
|
|
3082
3071
|
var posX = 0; //cursor x
|
|
3083
3072
|
var posY = 0; //cursor x
|
|
3084
3073
|
var LOADER_ACTIVE = false;
|
|
3085
|
-
var LOADER_TEXT =
|
|
3074
|
+
var LOADER_TEXT = '';
|
|
3086
3075
|
var REFRESHER_IN_PROGRESS = false;
|
|
3087
3076
|
|
|
3088
3077
|
glb.screen_num = 0;
|
|
@@ -3095,115 +3084,105 @@ var IS_PROGRESS_SCREEN_OPEN = null;
|
|
|
3095
3084
|
var UI_WORKER_OBJ = { jobs: [], num: 9000 };
|
|
3096
3085
|
|
|
3097
3086
|
glb.html5_events_handler = [
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3087
|
+
'onabort',
|
|
3088
|
+
'onafterprint',
|
|
3089
|
+
'onautocomplete',
|
|
3090
|
+
'onautocompleteerror',
|
|
3091
|
+
'onbeforeprint',
|
|
3092
|
+
'onbeforeunload',
|
|
3093
|
+
'onblur',
|
|
3094
|
+
'oncancel',
|
|
3095
|
+
'oncanplay',
|
|
3096
|
+
'oncanplaythrough',
|
|
3097
|
+
'onchange',
|
|
3098
|
+
'onclick',
|
|
3099
|
+
'onclose',
|
|
3100
|
+
'oncontextmenu',
|
|
3101
|
+
'oncopy',
|
|
3102
|
+
'oncuechange',
|
|
3103
|
+
'oncut',
|
|
3104
|
+
'ondblclick',
|
|
3105
|
+
'ondrag',
|
|
3106
|
+
'ondragend',
|
|
3107
|
+
'ondragenter',
|
|
3108
|
+
'ondragexit',
|
|
3109
|
+
'ondragleave',
|
|
3110
|
+
'ondragover',
|
|
3111
|
+
'ondragstart',
|
|
3112
|
+
'ondrop',
|
|
3113
|
+
'ondurationchange',
|
|
3114
|
+
'onemptied',
|
|
3115
|
+
'onended',
|
|
3116
|
+
'onerror',
|
|
3117
|
+
'onfocus',
|
|
3118
|
+
'onhashchange',
|
|
3119
|
+
'oninput',
|
|
3120
|
+
'oninvalid',
|
|
3121
|
+
'onkeydown',
|
|
3122
|
+
'onkeypress',
|
|
3123
|
+
'onkeyup',
|
|
3124
|
+
'onload',
|
|
3125
|
+
'onloadeddata',
|
|
3126
|
+
'onloadedmetadata',
|
|
3127
|
+
'onloadstart',
|
|
3128
|
+
'onmessage',
|
|
3129
|
+
'onmousedown',
|
|
3130
|
+
'onmouseenter',
|
|
3131
|
+
'onmouseleave',
|
|
3132
|
+
'onmousemove',
|
|
3133
|
+
'onmouseout',
|
|
3134
|
+
'onmouseover',
|
|
3135
|
+
'onmouseup',
|
|
3136
|
+
'onmousewheel',
|
|
3137
|
+
'onoffline',
|
|
3138
|
+
'ononline',
|
|
3139
|
+
'onpagehide',
|
|
3140
|
+
'onpageshow',
|
|
3141
|
+
'onpaste',
|
|
3142
|
+
'onpause',
|
|
3143
|
+
'onplay',
|
|
3144
|
+
'onplaying',
|
|
3145
|
+
'onpopstate',
|
|
3146
|
+
'onprogress',
|
|
3147
|
+
'onratechange',
|
|
3148
|
+
'onreset',
|
|
3149
|
+
'onresize',
|
|
3150
|
+
'onscroll',
|
|
3151
|
+
'onsearch',
|
|
3152
|
+
'onseeked',
|
|
3153
|
+
'onseeking',
|
|
3154
|
+
'onselect',
|
|
3155
|
+
'onshow',
|
|
3156
|
+
'onsort',
|
|
3157
|
+
'onstalled',
|
|
3158
|
+
'onstorage',
|
|
3159
|
+
'onsubmit',
|
|
3160
|
+
'onsuspend',
|
|
3161
|
+
'ontimeupdate',
|
|
3162
|
+
'ontoggle',
|
|
3163
|
+
'onunload',
|
|
3164
|
+
'onvolumechange',
|
|
3165
|
+
'onwaiting',
|
|
3177
3166
|
];
|
|
3178
3167
|
|
|
3179
3168
|
glb.lifecycle = {
|
|
3180
3169
|
plugins: {},
|
|
3181
3170
|
// queue: [],
|
|
3182
|
-
fn_arr: [
|
|
3183
|
-
"beforeInit",
|
|
3184
|
-
"initialized",
|
|
3185
|
-
"systemReady",
|
|
3186
|
-
"beforeMounted",
|
|
3187
|
-
"mounted",
|
|
3188
|
-
],
|
|
3171
|
+
fn_arr: ['beforeInit', 'initialized', 'systemReady', 'beforeMounted', 'mounted'],
|
|
3189
3172
|
// add(type, fn, params) {
|
|
3190
3173
|
// this.queue.push({ type, fn, params });
|
|
3191
3174
|
// },
|
|
3192
3175
|
execute: async function (SESSION_ID, event) {
|
|
3193
3176
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
3194
3177
|
|
|
3195
|
-
const xu_api = await func.common.get_module(
|
|
3178
|
+
const xu_api = await func.common.get_module(SESSION_ID, 'xuda-api-library.mjs', {
|
|
3179
|
+
func,
|
|
3180
|
+
glb,
|
|
3181
|
+
SESSION_OBJ,
|
|
3196
3182
|
SESSION_ID,
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
glb,
|
|
3201
|
-
SESSION_OBJ,
|
|
3202
|
-
SESSION_ID,
|
|
3203
|
-
APP_OBJ,
|
|
3204
|
-
dsSession: func.utils.get_last_datasource_no(SESSION_ID),
|
|
3205
|
-
}
|
|
3206
|
-
);
|
|
3183
|
+
APP_OBJ,
|
|
3184
|
+
dsSession: func.utils.get_last_datasource_no(SESSION_ID),
|
|
3185
|
+
});
|
|
3207
3186
|
|
|
3208
3187
|
var params = {
|
|
3209
3188
|
SESSION_ID,
|
|
@@ -3212,9 +3191,7 @@ glb.lifecycle = {
|
|
|
3212
3191
|
xu_api,
|
|
3213
3192
|
};
|
|
3214
3193
|
|
|
3215
|
-
for await (const [plugin_name, val] of Object.entries(
|
|
3216
|
-
glb.lifecycle.plugins
|
|
3217
|
-
)) {
|
|
3194
|
+
for await (const [plugin_name, val] of Object.entries(glb.lifecycle.plugins)) {
|
|
3218
3195
|
if (val?.plugin_script?.[event]) {
|
|
3219
3196
|
params.setup_data = val.setup_data;
|
|
3220
3197
|
await val.plugin_script[event](params);
|
|
@@ -3224,27 +3201,17 @@ glb.lifecycle = {
|
|
|
3224
3201
|
};
|
|
3225
3202
|
|
|
3226
3203
|
glb.run_xu_before = [
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3204
|
+
'xu-cdn',
|
|
3205
|
+
'xu-style',
|
|
3206
|
+
'xu-render',
|
|
3207
|
+
'xu-for-key',
|
|
3208
|
+
'xu-for-val',
|
|
3232
3209
|
// "xu-ui-plugin",
|
|
3233
3210
|
// "programParameters",
|
|
3234
3211
|
];
|
|
3235
|
-
glb.run_xu_after = [
|
|
3236
|
-
glb.attr_abbreviations_arr = [
|
|
3237
|
-
|
|
3238
|
-
"xu-dblclick",
|
|
3239
|
-
"xu-contextmenu",
|
|
3240
|
-
"xu-focus",
|
|
3241
|
-
"xu-keyup",
|
|
3242
|
-
"xu-change",
|
|
3243
|
-
"xu-blur",
|
|
3244
|
-
"xu-init",
|
|
3245
|
-
];
|
|
3246
|
-
glb.solid_attributes = ["disabled"];
|
|
3247
|
-
|
|
3212
|
+
glb.run_xu_after = ['xu-bind', 'xu-class', 'xu-script', 'xu-ui-plugin'];
|
|
3213
|
+
glb.attr_abbreviations_arr = ['xu-click', 'xu-dblclick', 'xu-contextmenu', 'xu-focus', 'xu-keyup', 'xu-change', 'xu-blur', 'xu-init'];
|
|
3214
|
+
glb.solid_attributes = ['disabled'];
|
|
3248
3215
|
func.datasource = {};
|
|
3249
3216
|
func.datasource.create = async function (
|
|
3250
3217
|
SESSION_ID,
|
|
@@ -3887,7 +3854,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
3887
3854
|
_ds.data_feed.rows = [];
|
|
3888
3855
|
|
|
3889
3856
|
switch (prog_obj.progDataSource?.dataSourceType) {
|
|
3890
|
-
case 'table':
|
|
3857
|
+
case 'table': {
|
|
3891
3858
|
_ds._dataSourceTableId = prog_obj.progDataSource?.dataSourceTableId; // get file id
|
|
3892
3859
|
|
|
3893
3860
|
if (prog_obj.progDataSource?.dataSourceTableIdExp) {
|
|
@@ -3929,8 +3896,6 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
3929
3896
|
filterModelUserSql: _ds.progDataSource.filterModelUserSql,
|
|
3930
3897
|
};
|
|
3931
3898
|
|
|
3932
|
-
// _ds.data_feed = {};
|
|
3933
|
-
|
|
3934
3899
|
_ds.v.raw_data = await func.db.get_query(
|
|
3935
3900
|
SESSION_ID,
|
|
3936
3901
|
_ds._dataSourceTableId,
|
|
@@ -3948,6 +3913,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
3948
3913
|
filterModel,
|
|
3949
3914
|
_ds?.progDataSource?.dataSourceFilterModelType,
|
|
3950
3915
|
);
|
|
3916
|
+
|
|
3951
3917
|
if (_ds?.progDataSource?.dataSourceLimit) {
|
|
3952
3918
|
const ret_rows_found = await func.db.get_query(
|
|
3953
3919
|
SESSION_ID,
|
|
@@ -3971,7 +3937,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
3971
3937
|
_ds.rows_found = _ds?.v?.raw_data?.rows?.length || 0;
|
|
3972
3938
|
}
|
|
3973
3939
|
break;
|
|
3974
|
-
|
|
3940
|
+
}
|
|
3975
3941
|
case 'array': {
|
|
3976
3942
|
let data = await get_data_from_source();
|
|
3977
3943
|
|
|
@@ -4019,7 +3985,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4019
3985
|
break;
|
|
4020
3986
|
}
|
|
4021
3987
|
|
|
4022
|
-
case 'csv':
|
|
3988
|
+
case 'csv': {
|
|
4023
3989
|
let data = await get_data_from_source();
|
|
4024
3990
|
if (data === null) {
|
|
4025
3991
|
data = '';
|
|
@@ -4048,7 +4014,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4048
4014
|
}
|
|
4049
4015
|
_ds.rows_found = arr?.length || 0;
|
|
4050
4016
|
break;
|
|
4051
|
-
|
|
4017
|
+
}
|
|
4052
4018
|
default:
|
|
4053
4019
|
break;
|
|
4054
4020
|
}
|
|
@@ -4264,6 +4230,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4264
4230
|
}
|
|
4265
4231
|
|
|
4266
4232
|
const row_not_found = async function () {
|
|
4233
|
+
debugger;
|
|
4267
4234
|
if (!prog_obj.progDataSource?.dataSourceType || (tree_obj.rwMode === 'U' && tree_obj.allowCreate)) {
|
|
4268
4235
|
_ds.currentRecordId = 'newRecord';
|
|
4269
4236
|
_ds.set_mode = 'C';
|
|
@@ -8594,6 +8561,7 @@ func.UI.utils.init_ui_framework = async function (SESSION_ID, prog_id) {
|
|
|
8594
8561
|
}
|
|
8595
8562
|
}
|
|
8596
8563
|
};
|
|
8564
|
+
// old
|
|
8597
8565
|
func.UI.utils.get_panels_from_dom = function (SESSION_ID, ignore_disableAutoRefresh) {
|
|
8598
8566
|
const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
|
|
8599
8567
|
var panels_obj = {};
|
|
@@ -8643,13 +8611,6 @@ func.UI.utils.get_panels_wrapper_from_dom = async function (SESSION_ID, $xu_embe
|
|
|
8643
8611
|
|
|
8644
8612
|
if (!panelXuAttributes) continue; // skip if no longer in dom
|
|
8645
8613
|
|
|
8646
|
-
// let prog_id = panelXuAttributes?.program;
|
|
8647
|
-
// const exp = panelXuAttributes?.['xu-exp:program'];
|
|
8648
|
-
// if (exp) {
|
|
8649
|
-
// let exp_ret = await func.expression.get(SESSION_ID, exp, $xu_embed_container?.data()?.xuData?.paramsP?.dsSessionP, 'UI Attr EXP');
|
|
8650
|
-
// prog_id = func.UI.screen.fix_val_defaults('program', exp_ret.result);
|
|
8651
|
-
// }
|
|
8652
|
-
|
|
8653
8614
|
const xu_ui_id = $panel_div.attr('xu-ui-id');
|
|
8654
8615
|
|
|
8655
8616
|
if (!panels_obj[xu_ui_id]) {
|
|
@@ -9893,34 +9854,9 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9893
9854
|
}
|
|
9894
9855
|
};
|
|
9895
9856
|
|
|
9896
|
-
func.UI.screen.
|
|
9897
|
-
// const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
|
|
9898
|
-
|
|
9857
|
+
func.UI.screen.refresh_screen_old = async function (SESSION_ID, fields_changed_arr, datasource_changed, fields_changed_datasource) {
|
|
9899
9858
|
const panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, false);
|
|
9900
9859
|
|
|
9901
|
-
// const find_field_in_progUi = function (progUi, field_id, prop) {
|
|
9902
|
-
// let found;
|
|
9903
|
-
// const iterate_progUi = function (node) {
|
|
9904
|
-
// for (let item of node) {
|
|
9905
|
-
// // if (item.tagName === "xu-panel") {
|
|
9906
|
-
// if (!_.isEmpty(item.attributes)) {
|
|
9907
|
-
// for (const [attr, val] of Object.entries(item.attributes)) {
|
|
9908
|
-
// if (attr === `xu-exp:${prop}`) {
|
|
9909
|
-
// found = val.includes('@' + field_id);
|
|
9910
|
-
// }
|
|
9911
|
-
// }
|
|
9912
|
-
// }
|
|
9913
|
-
// if (found) break;
|
|
9914
|
-
// // }
|
|
9915
|
-
// if (item.children) {
|
|
9916
|
-
// iterate_progUi(item.children);
|
|
9917
|
-
// }
|
|
9918
|
-
// }
|
|
9919
|
-
// };
|
|
9920
|
-
// iterate_progUi(progUi);
|
|
9921
|
-
// return found;
|
|
9922
|
-
// };
|
|
9923
|
-
|
|
9924
9860
|
for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
|
|
9925
9861
|
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id);
|
|
9926
9862
|
const progDataSource_str = JSON.stringify(prog_doc.progDataSource);
|