@xuda.io/runtime-bundle 1.0.1427 → 1.0.1429
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 +38 -3
- package/js/xuda-runtime-bundle.min.js +2 -2
- package/js/xuda-runtime-slim.js +38 -3
- package/js/xuda-runtime-slim.min.es.js +38 -3
- package/js/xuda-runtime-slim.min.js +2 -2
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +24 -2
- package/js/xuda-worker-bundle.js +24 -2
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
|
@@ -30570,6 +30570,18 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
|
30570
30570
|
'xu-on': true,
|
|
30571
30571
|
'xu-for-key': true,
|
|
30572
30572
|
'xu-for-val': true,
|
|
30573
|
+
'xu-click': true,
|
|
30574
|
+
'xu-change': true,
|
|
30575
|
+
'xu-blur': true,
|
|
30576
|
+
'xu-focus': true,
|
|
30577
|
+
'xu-init': true,
|
|
30578
|
+
'xu-attrs': true,
|
|
30579
|
+
'xu-cdn': true,
|
|
30580
|
+
'xu-style': true,
|
|
30581
|
+
'xu-style-global': true,
|
|
30582
|
+
'xu-script': true,
|
|
30583
|
+
'xu-viewport': true,
|
|
30584
|
+
'xu-ui-plugin': true,
|
|
30573
30585
|
};
|
|
30574
30586
|
|
|
30575
30587
|
const execution_plan = [];
|
|
@@ -30581,12 +30593,13 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
|
30581
30593
|
|
|
30582
30594
|
const attr_new = attr.split('xu-exp:')[1];
|
|
30583
30595
|
const xu_func = attr_new || attr;
|
|
30596
|
+
const is_raw_value_attribute = !!raw_value_attributes[attr] || attr.substr(0, 6) === 'xu-on:';
|
|
30584
30597
|
execution_plan.push({
|
|
30585
30598
|
attr,
|
|
30586
30599
|
attr_new,
|
|
30587
30600
|
xu_func,
|
|
30588
30601
|
is_regular_attribute: !!(attr_new && attr_new.substr(0, 2) !== 'xu'),
|
|
30589
|
-
requires_expression: !
|
|
30602
|
+
requires_expression: !is_raw_value_attribute && attr !== 'xu-class' && attr !== 'xu-ui-plugin',
|
|
30590
30603
|
regular_attr_name: attr_new ? (attr_new !== 'viewBox' ? attr_new.toLowerCase() : attr_new) : null,
|
|
30591
30604
|
});
|
|
30592
30605
|
}
|
|
@@ -43403,6 +43416,29 @@ func.events.execute = async function (
|
|
|
43403
43416
|
return result;
|
|
43404
43417
|
},
|
|
43405
43418
|
update: async function () {
|
|
43419
|
+
const resolve_update_field_id = async function (field_expr, iterate_info) {
|
|
43420
|
+
let trimmed = field_expr?.trim?.() || '';
|
|
43421
|
+
if (!trimmed) {
|
|
43422
|
+
return trimmed;
|
|
43423
|
+
}
|
|
43424
|
+
|
|
43425
|
+
const first = trimmed.substring(0, 1);
|
|
43426
|
+
const last = trimmed.substring(trimmed.length - 1);
|
|
43427
|
+
if ((first === "'" || first === '"' || first === '`') && last === first) {
|
|
43428
|
+
trimmed = trimmed.substring(1, trimmed.length - 1).trim();
|
|
43429
|
+
}
|
|
43430
|
+
|
|
43431
|
+
if (/^@?[A-Za-z_][\w\-\:\.]*$/.test(trimmed)) {
|
|
43432
|
+
return trimmed.substring(0, 1) === '@' ? trimmed.substring(1) : trimmed;
|
|
43433
|
+
}
|
|
43434
|
+
|
|
43435
|
+
let ret_field_id = await func.expression.get(SESSION_ID, trimmed, dsSessionP, 'update', null, null, null, null, null, null, iterate_info);
|
|
43436
|
+
if (typeof ret_field_id?.result === 'string' && ret_field_id.result.substring(0, 1) === '@') {
|
|
43437
|
+
return ret_field_id.result.substring(1);
|
|
43438
|
+
}
|
|
43439
|
+
return ret_field_id?.result;
|
|
43440
|
+
};
|
|
43441
|
+
|
|
43406
43442
|
const obj_values_to_update = func.datasource.get_viewFields_for_update_function(SESSION_ID, calling_trigger_prop, null, dsSessionP);
|
|
43407
43443
|
if (!obj_values_to_update || xu_isEmpty(obj_values_to_update)) {
|
|
43408
43444
|
func.utils.debug_report(SESSION_ID, 'Update values object is empty', '', 'W');
|
|
@@ -43420,9 +43456,8 @@ func.events.execute = async function (
|
|
|
43420
43456
|
iterate_info = element_meta?.iterate_info || null;
|
|
43421
43457
|
}
|
|
43422
43458
|
|
|
43423
|
-
let ret_field_id = await func.expression.get(SESSION_ID, val.id.trim(), dsSessionP, 'update', null, null, null, null, null, null, iterate_info);
|
|
43424
43459
|
let ret_value = await func.expression.get(SESSION_ID, val.val.trim(), dsSessionP, 'update', null, null, null, null, null, null, iterate_info);
|
|
43425
|
-
let _field_id =
|
|
43460
|
+
let _field_id = await resolve_update_field_id(val.id, iterate_info);
|
|
43426
43461
|
let _value = ret_value.result;
|
|
43427
43462
|
|
|
43428
43463
|
updates.push({ _field_id, _value });
|