@xuda.io/runtime-bundle 1.0.898 → 1.0.900
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.
|
@@ -31119,19 +31119,30 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
31119
31119
|
|
|
31120
31120
|
let attr = [];
|
|
31121
31121
|
|
|
31122
|
+
const validate_param_in = function (exp) {
|
|
31123
|
+
if (!typeof exp === 'string') return;
|
|
31124
|
+
if (!exp.includes('@')) return;
|
|
31125
|
+
if (_.isEmpty(elm_data?.xuData?.paramsP?.parameters_raw_obj)) return;
|
|
31126
|
+
let exp_val_for_parameter_in_validation = _.clone(exp);
|
|
31127
|
+
for (const [param_key, param_val] of Object.entries(elm_data?.xuData?.paramsP?.parameters_raw_obj)) {
|
|
31128
|
+
exp_val_for_parameter_in_validation = exp_val_for_parameter_in_validation.replaceAll('@' + param_key, param_val);
|
|
31129
|
+
}
|
|
31130
|
+
return exp_val_for_parameter_in_validation?.includes?.('@' + val_field);
|
|
31131
|
+
};
|
|
31132
|
+
|
|
31122
31133
|
$.each(elm_data?.xuAttributes, function (key, val) {
|
|
31123
31134
|
if (key.substr(0, 3) !== 'xu-') return true;
|
|
31124
31135
|
|
|
31125
31136
|
let parameter_in_filed_id; //= elm_data?.xuData?.paramsP?.parameters_raw_obj?.[val.substr(1)] ? val.substr(1) : undefined;
|
|
31126
|
-
let exp_val_for_parameter_in_validation = _.clone(val);
|
|
31127
|
-
if (!_.isEmpty(elm_data?.xuData?.paramsP?.parameters_raw_obj) && typeof exp_val_for_parameter_in_validation === 'string') {
|
|
31128
|
-
|
|
31129
|
-
|
|
31130
|
-
|
|
31131
|
-
}
|
|
31137
|
+
// let exp_val_for_parameter_in_validation = _.clone(val);
|
|
31138
|
+
// if (!_.isEmpty(elm_data?.xuData?.paramsP?.parameters_raw_obj) && typeof exp_val_for_parameter_in_validation === 'string') {
|
|
31139
|
+
// for (const [param_key, param_val] of Object.entries(elm_data?.xuData?.paramsP?.parameters_raw_obj)) {
|
|
31140
|
+
// exp_val_for_parameter_in_validation = exp_val_for_parameter_in_validation.replaceAll(param_val, '@' + param_key);
|
|
31141
|
+
// }
|
|
31142
|
+
// }
|
|
31132
31143
|
|
|
31133
31144
|
if (key === 'xu-bind') {
|
|
31134
|
-
if (val?.includes?.(val_field) ||
|
|
31145
|
+
if (val?.includes?.(val_field) || validate_param_in(val)) {
|
|
31135
31146
|
attr.push(key);
|
|
31136
31147
|
}
|
|
31137
31148
|
return true;
|
|
@@ -31139,7 +31150,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
31139
31150
|
|
|
31140
31151
|
if (key === 'xu-for') {
|
|
31141
31152
|
// match static value for xu-for
|
|
31142
|
-
if (val?.includes?.(val_field) ||
|
|
31153
|
+
if (val?.includes?.(val_field) || validate_param_in(val)) {
|
|
31143
31154
|
attr.push(key);
|
|
31144
31155
|
}
|
|
31145
31156
|
return true;
|
|
@@ -31147,7 +31158,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
31147
31158
|
// console.log(key, val);
|
|
31148
31159
|
|
|
31149
31160
|
if (key.substr(0, 6) === 'xu-exp' && key.substr(6, 1) === ':') {
|
|
31150
|
-
if (val?.includes?.('@' + val_field) ||
|
|
31161
|
+
if (val?.includes?.('@' + val_field) || validate_param_in(val)) {
|
|
31151
31162
|
attr.push(key);
|
|
31152
31163
|
}
|
|
31153
31164
|
return true;
|