@xuda.io/runtime-bundle 1.0.739 → 1.0.741
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-slim.js
CHANGED
|
@@ -8848,28 +8848,28 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
|
8848
8848
|
let _ds_0 = _session.DS_GLB[0];
|
|
8849
8849
|
|
|
8850
8850
|
const _ds = func.utils.clean_returned_datasource(SESSION_ID, dsSessionP);
|
|
8851
|
+
|
|
8852
|
+
let obj = { ds: _ds, data: {}, props: _ds.in_parameters || {} };
|
|
8851
8853
|
try {
|
|
8852
8854
|
const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
8855
|
+
obj.data = _ds?.data_feed?.rows?.[row_idx];
|
|
8856
|
+
} catch (error) {
|
|
8857
|
+
// error normal if find_ROWID_idx fail
|
|
8858
|
+
}
|
|
8859
|
+
let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
|
|
8853
8860
|
|
|
8854
|
-
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
|
|
8858
|
-
|
|
8859
|
-
const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
|
|
8860
|
-
obj.attributes = attributes;
|
|
8861
|
-
obj.xu_ui_id = $elm.attr('xu-ui-id');
|
|
8862
|
-
}
|
|
8861
|
+
if ($elm) {
|
|
8862
|
+
const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
|
|
8863
|
+
obj.attributes = attributes;
|
|
8864
|
+
obj.xu_ui_id = $elm.attr('xu-ui-id');
|
|
8865
|
+
}
|
|
8863
8866
|
|
|
8864
|
-
|
|
8865
|
-
|
|
8866
|
-
|
|
8867
|
-
}
|
|
8868
|
-
SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
|
|
8869
|
-
ret = true;
|
|
8867
|
+
if (!_.isEqual(SYS_GLOBAL_OBJ_REFS?.[ref_field_id] || {}, obj)) {
|
|
8868
|
+
if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
|
|
8869
|
+
SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
|
|
8870
8870
|
}
|
|
8871
|
-
|
|
8872
|
-
|
|
8871
|
+
SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
|
|
8872
|
+
ret = true;
|
|
8873
8873
|
}
|
|
8874
8874
|
|
|
8875
8875
|
return ret;
|
|
@@ -11569,7 +11569,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11569
11569
|
// console.log(key, val);
|
|
11570
11570
|
|
|
11571
11571
|
if (key.substr(0, 6) === 'xu-exp' && key.substr(6, 1) === ':') {
|
|
11572
|
-
if (val?.includes?.(val_field) || val?.includes?.(parameter_in_filed_id)) {
|
|
11572
|
+
if (val?.includes?.('@' + val_field) || val?.includes?.('@' + parameter_in_filed_id)) {
|
|
11573
11573
|
attr.push(key);
|
|
11574
11574
|
}
|
|
11575
11575
|
return true;
|
|
@@ -11583,17 +11583,26 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11583
11583
|
const classes_obj = _.isString(classes_string) ? JSON.parse(classes_string) : _.defaults(classes_string, {});
|
|
11584
11584
|
|
|
11585
11585
|
$.each(classes_obj, function (cla, cond) {
|
|
11586
|
-
if (cond.includes(val_field) || cond?.includes?.(parameter_in_filed_id)) {
|
|
11587
|
-
// attr.push("xuClass");
|
|
11586
|
+
if (cond.includes('@' + val_field) || cond?.includes?.('@' + parameter_in_filed_id)) {
|
|
11588
11587
|
attr.push('xu-class');
|
|
11589
11588
|
return false;
|
|
11590
11589
|
}
|
|
11591
11590
|
});
|
|
11591
|
+
if (attr.length) {
|
|
11592
|
+
return false;
|
|
11593
|
+
}
|
|
11592
11594
|
} catch (e) {
|
|
11593
11595
|
console.warn('parse error:' + val);
|
|
11594
11596
|
}
|
|
11595
11597
|
}
|
|
11596
|
-
|
|
11598
|
+
|
|
11599
|
+
if (key === 'xu-ui-plugin') {
|
|
11600
|
+
const plugin_str = JSON.stringify(val);
|
|
11601
|
+
if (plugin_str.includes('@' + val_field) || plugin_str?.includes?.('@' + parameter_in_filed_id)) {
|
|
11602
|
+
attr.push(key);
|
|
11603
|
+
return false;
|
|
11604
|
+
}
|
|
11605
|
+
}
|
|
11597
11606
|
});
|
|
11598
11607
|
|
|
11599
11608
|
const selector_id = $(this).data()?.xuData?.xu_id;
|
|
@@ -12240,8 +12249,10 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12240
12249
|
const params_obj = await get_params_obj_new(SESSION_ID, prog_id, nodeP, paramsP.dsSessionP);
|
|
12241
12250
|
let ret_panel = await func.UI.screen.init(SESSION_ID, prog_id, paramsP.screenId, _ds, $elm, null, _ds.currentRecordId, null, true, params_obj.params_res, 'initXu_panel', undefined, prog_id !== _ds.prog_id ? null : refreshed_ds, params_obj.params_raw);
|
|
12242
12251
|
ret = { $new_div: ret_panel };
|
|
12243
|
-
$container.data().xuData
|
|
12244
|
-
|
|
12252
|
+
if ($container.data().xuData) {
|
|
12253
|
+
$container.data().xuData.xuPanelProps = $elm.data().xuAttributes;
|
|
12254
|
+
$container.data().xuData.xuPanelData = ret_panel.data();
|
|
12255
|
+
}
|
|
12245
12256
|
return ret;
|
|
12246
12257
|
}
|
|
12247
12258
|
|
|
@@ -8849,28 +8849,28 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
|
8849
8849
|
let _ds_0 = _session.DS_GLB[0];
|
|
8850
8850
|
|
|
8851
8851
|
const _ds = func.utils.clean_returned_datasource(SESSION_ID, dsSessionP);
|
|
8852
|
+
|
|
8853
|
+
let obj = { ds: _ds, data: {}, props: _ds.in_parameters || {} };
|
|
8852
8854
|
try {
|
|
8853
8855
|
const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
8856
|
+
obj.data = _ds?.data_feed?.rows?.[row_idx];
|
|
8857
|
+
} catch (error) {
|
|
8858
|
+
// error normal if find_ROWID_idx fail
|
|
8859
|
+
}
|
|
8860
|
+
let SYS_GLOBAL_OBJ_REFS = _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'];
|
|
8854
8861
|
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
|
|
8858
|
-
|
|
8859
|
-
|
|
8860
|
-
const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
|
|
8861
|
-
obj.attributes = attributes;
|
|
8862
|
-
obj.xu_ui_id = $elm.attr('xu-ui-id');
|
|
8863
|
-
}
|
|
8862
|
+
if ($elm) {
|
|
8863
|
+
const attributes = $elm?.data()?.xuData?.xuPanelProps || $elm?.data()?.xuData?.debug_info?.attribute_stat || {};
|
|
8864
|
+
obj.attributes = attributes;
|
|
8865
|
+
obj.xu_ui_id = $elm.attr('xu-ui-id');
|
|
8866
|
+
}
|
|
8864
8867
|
|
|
8865
|
-
|
|
8866
|
-
|
|
8867
|
-
|
|
8868
|
-
}
|
|
8869
|
-
SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
|
|
8870
|
-
ret = true;
|
|
8868
|
+
if (!_.isEqual(SYS_GLOBAL_OBJ_REFS?.[ref_field_id] || {}, obj)) {
|
|
8869
|
+
if (!SYS_GLOBAL_OBJ_REFS[ref_field_id]) {
|
|
8870
|
+
SYS_GLOBAL_OBJ_REFS[ref_field_id] = {};
|
|
8871
8871
|
}
|
|
8872
|
-
|
|
8873
|
-
|
|
8872
|
+
SYS_GLOBAL_OBJ_REFS[ref_field_id] = obj;
|
|
8873
|
+
ret = true;
|
|
8874
8874
|
}
|
|
8875
8875
|
|
|
8876
8876
|
return ret;
|
|
@@ -9279,7 +9279,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9279
9279
|
// console.log(key, val);
|
|
9280
9280
|
|
|
9281
9281
|
if (key.substr(0, 6) === 'xu-exp' && key.substr(6, 1) === ':') {
|
|
9282
|
-
if (val?.includes?.(val_field) || val?.includes?.(parameter_in_filed_id)) {
|
|
9282
|
+
if (val?.includes?.('@' + val_field) || val?.includes?.('@' + parameter_in_filed_id)) {
|
|
9283
9283
|
attr.push(key);
|
|
9284
9284
|
}
|
|
9285
9285
|
return true;
|
|
@@ -9293,17 +9293,26 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9293
9293
|
const classes_obj = _.isString(classes_string) ? JSON.parse(classes_string) : _.defaults(classes_string, {});
|
|
9294
9294
|
|
|
9295
9295
|
$.each(classes_obj, function (cla, cond) {
|
|
9296
|
-
if (cond.includes(val_field) || cond?.includes?.(parameter_in_filed_id)) {
|
|
9297
|
-
// attr.push("xuClass");
|
|
9296
|
+
if (cond.includes('@' + val_field) || cond?.includes?.('@' + parameter_in_filed_id)) {
|
|
9298
9297
|
attr.push('xu-class');
|
|
9299
9298
|
return false;
|
|
9300
9299
|
}
|
|
9301
9300
|
});
|
|
9301
|
+
if (attr.length) {
|
|
9302
|
+
return false;
|
|
9303
|
+
}
|
|
9302
9304
|
} catch (e) {
|
|
9303
9305
|
console.warn('parse error:' + val);
|
|
9304
9306
|
}
|
|
9305
9307
|
}
|
|
9306
|
-
|
|
9308
|
+
|
|
9309
|
+
if (key === 'xu-ui-plugin') {
|
|
9310
|
+
const plugin_str = JSON.stringify(val);
|
|
9311
|
+
if (plugin_str.includes('@' + val_field) || plugin_str?.includes?.('@' + parameter_in_filed_id)) {
|
|
9312
|
+
attr.push(key);
|
|
9313
|
+
return false;
|
|
9314
|
+
}
|
|
9315
|
+
}
|
|
9307
9316
|
});
|
|
9308
9317
|
|
|
9309
9318
|
const selector_id = $(this).data()?.xuData?.xu_id;
|
|
@@ -9950,8 +9959,10 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
9950
9959
|
const params_obj = await get_params_obj_new(SESSION_ID, prog_id, nodeP, paramsP.dsSessionP);
|
|
9951
9960
|
let ret_panel = await func.UI.screen.init(SESSION_ID, prog_id, paramsP.screenId, _ds, $elm, null, _ds.currentRecordId, null, true, params_obj.params_res, 'initXu_panel', undefined, prog_id !== _ds.prog_id ? null : refreshed_ds, params_obj.params_raw);
|
|
9952
9961
|
ret = { $new_div: ret_panel };
|
|
9953
|
-
$container.data().xuData
|
|
9954
|
-
|
|
9962
|
+
if ($container.data().xuData) {
|
|
9963
|
+
$container.data().xuData.xuPanelProps = $elm.data().xuAttributes;
|
|
9964
|
+
$container.data().xuData.xuPanelData = ret_panel.data();
|
|
9965
|
+
}
|
|
9955
9966
|
return ret;
|
|
9956
9967
|
}
|
|
9957
9968
|
|