@xuda.io/runtime-bundle 1.0.461 → 1.0.463
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 +112 -176
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-mini-bundle.js +98 -131
- package/js/xuda-runtime-slim.js +112 -176
- package/js/xuda-runtime-slim.min.es.js +112 -176
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +110 -143
- package/js/xuda-worker-bundle.js +110 -143
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -3053,18 +3053,7 @@ var STUDIO_PEER_CONN_MSG_QUEUE = [];
|
|
|
3053
3053
|
|
|
3054
3054
|
var CLIENT_ACTIVITY_TS;
|
|
3055
3055
|
|
|
3056
|
-
glb.REFERENCE_LESS_FUNCTIONS = [
|
|
3057
|
-
"update",
|
|
3058
|
-
"raise_event",
|
|
3059
|
-
"call_library",
|
|
3060
|
-
"invoke_action",
|
|
3061
|
-
"loader_on",
|
|
3062
|
-
"loader_off",
|
|
3063
|
-
"emit_event",
|
|
3064
|
-
"delay",
|
|
3065
|
-
"execute_evaluate_javascript",
|
|
3066
|
-
"execute_native_javascript",
|
|
3067
|
-
];
|
|
3056
|
+
glb.REFERENCE_LESS_FUNCTIONS = ['update', 'raise_event', 'call_library', 'invoke_action', 'loader_on', 'loader_off', 'emit_event', 'delay', 'execute_evaluate_javascript', 'execute_native_javascript'];
|
|
3068
3057
|
|
|
3069
3058
|
var CACHE_PROG_UI = {};
|
|
3070
3059
|
|
|
@@ -3081,7 +3070,7 @@ var ELEMENT_CLICK_EVENT = null;
|
|
|
3081
3070
|
var posX = 0; //cursor x
|
|
3082
3071
|
var posY = 0; //cursor x
|
|
3083
3072
|
var LOADER_ACTIVE = false;
|
|
3084
|
-
var LOADER_TEXT =
|
|
3073
|
+
var LOADER_TEXT = '';
|
|
3085
3074
|
var REFRESHER_IN_PROGRESS = false;
|
|
3086
3075
|
|
|
3087
3076
|
glb.screen_num = 0;
|
|
@@ -3094,115 +3083,105 @@ var IS_PROGRESS_SCREEN_OPEN = null;
|
|
|
3094
3083
|
var UI_WORKER_OBJ = { jobs: [], num: 9000 };
|
|
3095
3084
|
|
|
3096
3085
|
glb.html5_events_handler = [
|
|
3097
|
-
|
|
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
|
-
|
|
3086
|
+
'onabort',
|
|
3087
|
+
'onafterprint',
|
|
3088
|
+
'onautocomplete',
|
|
3089
|
+
'onautocompleteerror',
|
|
3090
|
+
'onbeforeprint',
|
|
3091
|
+
'onbeforeunload',
|
|
3092
|
+
'onblur',
|
|
3093
|
+
'oncancel',
|
|
3094
|
+
'oncanplay',
|
|
3095
|
+
'oncanplaythrough',
|
|
3096
|
+
'onchange',
|
|
3097
|
+
'onclick',
|
|
3098
|
+
'onclose',
|
|
3099
|
+
'oncontextmenu',
|
|
3100
|
+
'oncopy',
|
|
3101
|
+
'oncuechange',
|
|
3102
|
+
'oncut',
|
|
3103
|
+
'ondblclick',
|
|
3104
|
+
'ondrag',
|
|
3105
|
+
'ondragend',
|
|
3106
|
+
'ondragenter',
|
|
3107
|
+
'ondragexit',
|
|
3108
|
+
'ondragleave',
|
|
3109
|
+
'ondragover',
|
|
3110
|
+
'ondragstart',
|
|
3111
|
+
'ondrop',
|
|
3112
|
+
'ondurationchange',
|
|
3113
|
+
'onemptied',
|
|
3114
|
+
'onended',
|
|
3115
|
+
'onerror',
|
|
3116
|
+
'onfocus',
|
|
3117
|
+
'onhashchange',
|
|
3118
|
+
'oninput',
|
|
3119
|
+
'oninvalid',
|
|
3120
|
+
'onkeydown',
|
|
3121
|
+
'onkeypress',
|
|
3122
|
+
'onkeyup',
|
|
3123
|
+
'onload',
|
|
3124
|
+
'onloadeddata',
|
|
3125
|
+
'onloadedmetadata',
|
|
3126
|
+
'onloadstart',
|
|
3127
|
+
'onmessage',
|
|
3128
|
+
'onmousedown',
|
|
3129
|
+
'onmouseenter',
|
|
3130
|
+
'onmouseleave',
|
|
3131
|
+
'onmousemove',
|
|
3132
|
+
'onmouseout',
|
|
3133
|
+
'onmouseover',
|
|
3134
|
+
'onmouseup',
|
|
3135
|
+
'onmousewheel',
|
|
3136
|
+
'onoffline',
|
|
3137
|
+
'ononline',
|
|
3138
|
+
'onpagehide',
|
|
3139
|
+
'onpageshow',
|
|
3140
|
+
'onpaste',
|
|
3141
|
+
'onpause',
|
|
3142
|
+
'onplay',
|
|
3143
|
+
'onplaying',
|
|
3144
|
+
'onpopstate',
|
|
3145
|
+
'onprogress',
|
|
3146
|
+
'onratechange',
|
|
3147
|
+
'onreset',
|
|
3148
|
+
'onresize',
|
|
3149
|
+
'onscroll',
|
|
3150
|
+
'onsearch',
|
|
3151
|
+
'onseeked',
|
|
3152
|
+
'onseeking',
|
|
3153
|
+
'onselect',
|
|
3154
|
+
'onshow',
|
|
3155
|
+
'onsort',
|
|
3156
|
+
'onstalled',
|
|
3157
|
+
'onstorage',
|
|
3158
|
+
'onsubmit',
|
|
3159
|
+
'onsuspend',
|
|
3160
|
+
'ontimeupdate',
|
|
3161
|
+
'ontoggle',
|
|
3162
|
+
'onunload',
|
|
3163
|
+
'onvolumechange',
|
|
3164
|
+
'onwaiting',
|
|
3176
3165
|
];
|
|
3177
3166
|
|
|
3178
3167
|
glb.lifecycle = {
|
|
3179
3168
|
plugins: {},
|
|
3180
3169
|
// queue: [],
|
|
3181
|
-
fn_arr: [
|
|
3182
|
-
"beforeInit",
|
|
3183
|
-
"initialized",
|
|
3184
|
-
"systemReady",
|
|
3185
|
-
"beforeMounted",
|
|
3186
|
-
"mounted",
|
|
3187
|
-
],
|
|
3170
|
+
fn_arr: ['beforeInit', 'initialized', 'systemReady', 'beforeMounted', 'mounted'],
|
|
3188
3171
|
// add(type, fn, params) {
|
|
3189
3172
|
// this.queue.push({ type, fn, params });
|
|
3190
3173
|
// },
|
|
3191
3174
|
execute: async function (SESSION_ID, event) {
|
|
3192
3175
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
3193
3176
|
|
|
3194
|
-
const xu_api = await func.common.get_module(
|
|
3177
|
+
const xu_api = await func.common.get_module(SESSION_ID, 'xuda-api-library.mjs', {
|
|
3178
|
+
func,
|
|
3179
|
+
glb,
|
|
3180
|
+
SESSION_OBJ,
|
|
3195
3181
|
SESSION_ID,
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
glb,
|
|
3200
|
-
SESSION_OBJ,
|
|
3201
|
-
SESSION_ID,
|
|
3202
|
-
APP_OBJ,
|
|
3203
|
-
dsSession: func.utils.get_last_datasource_no(SESSION_ID),
|
|
3204
|
-
}
|
|
3205
|
-
);
|
|
3182
|
+
APP_OBJ,
|
|
3183
|
+
dsSession: func.utils.get_last_datasource_no(SESSION_ID),
|
|
3184
|
+
});
|
|
3206
3185
|
|
|
3207
3186
|
var params = {
|
|
3208
3187
|
SESSION_ID,
|
|
@@ -3211,9 +3190,7 @@ glb.lifecycle = {
|
|
|
3211
3190
|
xu_api,
|
|
3212
3191
|
};
|
|
3213
3192
|
|
|
3214
|
-
for await (const [plugin_name, val] of Object.entries(
|
|
3215
|
-
glb.lifecycle.plugins
|
|
3216
|
-
)) {
|
|
3193
|
+
for await (const [plugin_name, val] of Object.entries(glb.lifecycle.plugins)) {
|
|
3217
3194
|
if (val?.plugin_script?.[event]) {
|
|
3218
3195
|
params.setup_data = val.setup_data;
|
|
3219
3196
|
await val.plugin_script[event](params);
|
|
@@ -3223,27 +3200,17 @@ glb.lifecycle = {
|
|
|
3223
3200
|
};
|
|
3224
3201
|
|
|
3225
3202
|
glb.run_xu_before = [
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3203
|
+
'xu-cdn',
|
|
3204
|
+
'xu-style',
|
|
3205
|
+
'xu-render',
|
|
3206
|
+
'xu-for-key',
|
|
3207
|
+
'xu-for-val',
|
|
3231
3208
|
// "xu-ui-plugin",
|
|
3232
3209
|
// "programParameters",
|
|
3233
3210
|
];
|
|
3234
|
-
glb.run_xu_after = [
|
|
3235
|
-
glb.attr_abbreviations_arr = [
|
|
3236
|
-
|
|
3237
|
-
"xu-dblclick",
|
|
3238
|
-
"xu-contextmenu",
|
|
3239
|
-
"xu-focus",
|
|
3240
|
-
"xu-keyup",
|
|
3241
|
-
"xu-change",
|
|
3242
|
-
"xu-blur",
|
|
3243
|
-
"xu-init",
|
|
3244
|
-
];
|
|
3245
|
-
glb.solid_attributes = ["disabled"];
|
|
3246
|
-
|
|
3211
|
+
glb.run_xu_after = ['xu-bind', 'xu-class', 'xu-script', 'xu-ui-plugin'];
|
|
3212
|
+
glb.attr_abbreviations_arr = ['xu-click', 'xu-dblclick', 'xu-contextmenu', 'xu-focus', 'xu-keyup', 'xu-change', 'xu-blur', 'xu-init'];
|
|
3213
|
+
glb.solid_attributes = ['disabled'];
|
|
3247
3214
|
func.datasource = {};
|
|
3248
3215
|
func.datasource.create = async function (
|
|
3249
3216
|
SESSION_ID,
|
|
@@ -3886,7 +3853,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
3886
3853
|
_ds.data_feed.rows = [];
|
|
3887
3854
|
|
|
3888
3855
|
switch (prog_obj.progDataSource?.dataSourceType) {
|
|
3889
|
-
case 'table':
|
|
3856
|
+
case 'table': {
|
|
3890
3857
|
_ds._dataSourceTableId = prog_obj.progDataSource?.dataSourceTableId; // get file id
|
|
3891
3858
|
|
|
3892
3859
|
if (prog_obj.progDataSource?.dataSourceTableIdExp) {
|
|
@@ -3928,8 +3895,6 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
3928
3895
|
filterModelUserSql: _ds.progDataSource.filterModelUserSql,
|
|
3929
3896
|
};
|
|
3930
3897
|
|
|
3931
|
-
// _ds.data_feed = {};
|
|
3932
|
-
|
|
3933
3898
|
_ds.v.raw_data = await func.db.get_query(
|
|
3934
3899
|
SESSION_ID,
|
|
3935
3900
|
_ds._dataSourceTableId,
|
|
@@ -3947,6 +3912,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
3947
3912
|
filterModel,
|
|
3948
3913
|
_ds?.progDataSource?.dataSourceFilterModelType,
|
|
3949
3914
|
);
|
|
3915
|
+
|
|
3950
3916
|
if (_ds?.progDataSource?.dataSourceLimit) {
|
|
3951
3917
|
const ret_rows_found = await func.db.get_query(
|
|
3952
3918
|
SESSION_ID,
|
|
@@ -3970,7 +3936,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
3970
3936
|
_ds.rows_found = _ds?.v?.raw_data?.rows?.length || 0;
|
|
3971
3937
|
}
|
|
3972
3938
|
break;
|
|
3973
|
-
|
|
3939
|
+
}
|
|
3974
3940
|
case 'array': {
|
|
3975
3941
|
let data = await get_data_from_source();
|
|
3976
3942
|
|
|
@@ -4018,7 +3984,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4018
3984
|
break;
|
|
4019
3985
|
}
|
|
4020
3986
|
|
|
4021
|
-
case 'csv':
|
|
3987
|
+
case 'csv': {
|
|
4022
3988
|
let data = await get_data_from_source();
|
|
4023
3989
|
if (data === null) {
|
|
4024
3990
|
data = '';
|
|
@@ -4047,7 +4013,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4047
4013
|
}
|
|
4048
4014
|
_ds.rows_found = arr?.length || 0;
|
|
4049
4015
|
break;
|
|
4050
|
-
|
|
4016
|
+
}
|
|
4051
4017
|
default:
|
|
4052
4018
|
break;
|
|
4053
4019
|
}
|
|
@@ -4141,7 +4107,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4141
4107
|
break;
|
|
4142
4108
|
}
|
|
4143
4109
|
|
|
4144
|
-
case 'get_data':
|
|
4110
|
+
case 'get_data': {
|
|
4145
4111
|
if (await get_before_record_count()) {
|
|
4146
4112
|
await func.datasource.execute_view_events(SESSION_ID, dataSourceSession, 'before_record');
|
|
4147
4113
|
}
|
|
@@ -4153,8 +4119,8 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4153
4119
|
}
|
|
4154
4120
|
await func.datasource.set_outputField(SESSION_ID, dataSourceSession, _ds?.v?.raw_data?.rows, _ds.args);
|
|
4155
4121
|
break;
|
|
4156
|
-
|
|
4157
|
-
case 'set_data':
|
|
4122
|
+
}
|
|
4123
|
+
case 'set_data': {
|
|
4158
4124
|
if (!prog_obj.progDataSource?.dataSourceType || _ds.progDataSource.dataSourceType !== 'table' || !_ds._dataSourceTableId) {
|
|
4159
4125
|
return func.utils.debug_report(SESSION_ID, 'Data source', 'Datasource DB Table must be defined for Set Data operation', 'E');
|
|
4160
4126
|
}
|
|
@@ -4244,8 +4210,9 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4244
4210
|
// ret = await callback_datasource();
|
|
4245
4211
|
await func.datasource.set_outputField(SESSION_ID, dataSourceSession, _ds?.v?.raw_data?.rows, _ds.args);
|
|
4246
4212
|
break;
|
|
4247
|
-
|
|
4248
|
-
case 'component':
|
|
4213
|
+
}
|
|
4214
|
+
case 'component': {
|
|
4215
|
+
debugger;
|
|
4249
4216
|
_raw_data_rows = _ds?.v.raw_data?.rows || [];
|
|
4250
4217
|
_ds.rows_processed = 0;
|
|
4251
4218
|
_ds.viewRangeExp_rows_deleted = 0;
|
|
@@ -4343,7 +4310,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4343
4310
|
await finish_form();
|
|
4344
4311
|
|
|
4345
4312
|
break;
|
|
4346
|
-
|
|
4313
|
+
}
|
|
4347
4314
|
default:
|
|
4348
4315
|
return func.utils.debug_report(SESSION_ID, 'Data source', 'Program type not defined', 'E');
|
|
4349
4316
|
}
|
|
@@ -8593,6 +8560,7 @@ func.UI.utils.init_ui_framework = async function (SESSION_ID, prog_id) {
|
|
|
8593
8560
|
}
|
|
8594
8561
|
}
|
|
8595
8562
|
};
|
|
8563
|
+
// old
|
|
8596
8564
|
func.UI.utils.get_panels_from_dom = function (SESSION_ID, ignore_disableAutoRefresh) {
|
|
8597
8565
|
const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
|
|
8598
8566
|
var panels_obj = {};
|
|
@@ -8642,13 +8610,6 @@ func.UI.utils.get_panels_wrapper_from_dom = async function (SESSION_ID, $xu_embe
|
|
|
8642
8610
|
|
|
8643
8611
|
if (!panelXuAttributes) continue; // skip if no longer in dom
|
|
8644
8612
|
|
|
8645
|
-
// let prog_id = panelXuAttributes?.program;
|
|
8646
|
-
// const exp = panelXuAttributes?.['xu-exp:program'];
|
|
8647
|
-
// if (exp) {
|
|
8648
|
-
// let exp_ret = await func.expression.get(SESSION_ID, exp, $xu_embed_container?.data()?.xuData?.paramsP?.dsSessionP, 'UI Attr EXP');
|
|
8649
|
-
// prog_id = func.UI.screen.fix_val_defaults('program', exp_ret.result);
|
|
8650
|
-
// }
|
|
8651
|
-
|
|
8652
8613
|
const xu_ui_id = $panel_div.attr('xu-ui-id');
|
|
8653
8614
|
|
|
8654
8615
|
if (!panels_obj[xu_ui_id]) {
|
|
@@ -11820,34 +11781,9 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
11820
11781
|
}
|
|
11821
11782
|
};
|
|
11822
11783
|
|
|
11823
|
-
func.UI.screen.
|
|
11824
|
-
// const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
|
|
11825
|
-
|
|
11784
|
+
func.UI.screen.refresh_screen_old = async function (SESSION_ID, fields_changed_arr, datasource_changed, fields_changed_datasource) {
|
|
11826
11785
|
const panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, false);
|
|
11827
11786
|
|
|
11828
|
-
// const find_field_in_progUi = function (progUi, field_id, prop) {
|
|
11829
|
-
// let found;
|
|
11830
|
-
// const iterate_progUi = function (node) {
|
|
11831
|
-
// for (let item of node) {
|
|
11832
|
-
// // if (item.tagName === "xu-panel") {
|
|
11833
|
-
// if (!_.isEmpty(item.attributes)) {
|
|
11834
|
-
// for (const [attr, val] of Object.entries(item.attributes)) {
|
|
11835
|
-
// if (attr === `xu-exp:${prop}`) {
|
|
11836
|
-
// found = val.includes('@' + field_id);
|
|
11837
|
-
// }
|
|
11838
|
-
// }
|
|
11839
|
-
// }
|
|
11840
|
-
// if (found) break;
|
|
11841
|
-
// // }
|
|
11842
|
-
// if (item.children) {
|
|
11843
|
-
// iterate_progUi(item.children);
|
|
11844
|
-
// }
|
|
11845
|
-
// }
|
|
11846
|
-
// };
|
|
11847
|
-
// iterate_progUi(progUi);
|
|
11848
|
-
// return found;
|
|
11849
|
-
// };
|
|
11850
|
-
|
|
11851
11787
|
for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
|
|
11852
11788
|
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id);
|
|
11853
11789
|
const progDataSource_str = JSON.stringify(prog_doc.progDataSource);
|