@xuda.io/runtime-bundle 1.0.897 → 1.0.899

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.
@@ -11433,19 +11433,29 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
11433
11433
 
11434
11434
  let attr = [];
11435
11435
 
11436
+ const validate_param_in = function (exp) {
11437
+ if (!typeof exp === 'string') return;
11438
+ if (_.isEmpty(elm_data?.xuData?.paramsP?.parameters_raw_obj)) return;
11439
+ let exp_val_for_parameter_in_validation = _.clone(exp);
11440
+ for (const [param_key, param_val] of Object.entries(elm_data?.xuData?.paramsP?.parameters_raw_obj)) {
11441
+ exp_val_for_parameter_in_validation = exp_val_for_parameter_in_validation.replaceAll(param_val, '@' + param_key);
11442
+ }
11443
+ return exp_val_for_parameter_in_validation?.includes?.('@' + val_field);
11444
+ };
11445
+
11436
11446
  $.each(elm_data?.xuAttributes, function (key, val) {
11437
11447
  if (key.substr(0, 3) !== 'xu-') return true;
11438
11448
 
11439
11449
  let parameter_in_filed_id; //= elm_data?.xuData?.paramsP?.parameters_raw_obj?.[val.substr(1)] ? val.substr(1) : undefined;
11440
- let exp_val_for_parameter_in_validation = _.clone(val);
11441
- if (!_.isEmpty(elm_data?.xuData?.paramsP?.parameters_raw_obj)) {
11442
- for (const [param_key, param_val] of Object.entries(elm_data?.xuData?.paramsP?.parameters_raw_obj)) {
11443
- exp_val_for_parameter_in_validation = exp_val_for_parameter_in_validation.replaceAll(param_val, param_key);
11444
- }
11445
- }
11450
+ // let exp_val_for_parameter_in_validation = _.clone(val);
11451
+ // if (!_.isEmpty(elm_data?.xuData?.paramsP?.parameters_raw_obj) && typeof exp_val_for_parameter_in_validation === 'string') {
11452
+ // for (const [param_key, param_val] of Object.entries(elm_data?.xuData?.paramsP?.parameters_raw_obj)) {
11453
+ // exp_val_for_parameter_in_validation = exp_val_for_parameter_in_validation.replaceAll(param_val, '@' + param_key);
11454
+ // }
11455
+ // }
11446
11456
 
11447
11457
  if (key === 'xu-bind') {
11448
- if (val?.includes?.(val_field) || exp_val_for_parameter_in_validation?.includes?.(val_field)) {
11458
+ if (val?.includes?.(val_field) || validate_param_in(val)) {
11449
11459
  attr.push(key);
11450
11460
  }
11451
11461
  return true;
@@ -11453,7 +11463,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
11453
11463
 
11454
11464
  if (key === 'xu-for') {
11455
11465
  // match static value for xu-for
11456
- if (val?.includes?.(val_field) || exp_val_for_parameter_in_validation?.includes?.(val_field)) {
11466
+ if (val?.includes?.(val_field) || validate_param_in(val)) {
11457
11467
  attr.push(key);
11458
11468
  }
11459
11469
  return true;
@@ -11461,7 +11471,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
11461
11471
  // console.log(key, val);
11462
11472
 
11463
11473
  if (key.substr(0, 6) === 'xu-exp' && key.substr(6, 1) === ':') {
11464
- if (val?.includes?.('@' + val_field) || exp_val_for_parameter_in_validation?.includes?.('@' + val_field)) {
11474
+ if (val?.includes?.('@' + val_field) || validate_param_in(val)) {
11465
11475
  attr.push(key);
11466
11476
  }
11467
11477
  return true;
@@ -9160,19 +9160,29 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
9160
9160
 
9161
9161
  let attr = [];
9162
9162
 
9163
+ const validate_param_in = function (exp) {
9164
+ if (!typeof exp === 'string') return;
9165
+ if (_.isEmpty(elm_data?.xuData?.paramsP?.parameters_raw_obj)) return;
9166
+ let exp_val_for_parameter_in_validation = _.clone(exp);
9167
+ for (const [param_key, param_val] of Object.entries(elm_data?.xuData?.paramsP?.parameters_raw_obj)) {
9168
+ exp_val_for_parameter_in_validation = exp_val_for_parameter_in_validation.replaceAll(param_val, '@' + param_key);
9169
+ }
9170
+ return exp_val_for_parameter_in_validation?.includes?.('@' + val_field);
9171
+ };
9172
+
9163
9173
  $.each(elm_data?.xuAttributes, function (key, val) {
9164
9174
  if (key.substr(0, 3) !== 'xu-') return true;
9165
9175
 
9166
9176
  let parameter_in_filed_id; //= elm_data?.xuData?.paramsP?.parameters_raw_obj?.[val.substr(1)] ? val.substr(1) : undefined;
9167
- let exp_val_for_parameter_in_validation = _.clone(val);
9168
- if (!_.isEmpty(elm_data?.xuData?.paramsP?.parameters_raw_obj)) {
9169
- for (const [param_key, param_val] of Object.entries(elm_data?.xuData?.paramsP?.parameters_raw_obj)) {
9170
- exp_val_for_parameter_in_validation = exp_val_for_parameter_in_validation.replaceAll(param_val, param_key);
9171
- }
9172
- }
9177
+ // let exp_val_for_parameter_in_validation = _.clone(val);
9178
+ // if (!_.isEmpty(elm_data?.xuData?.paramsP?.parameters_raw_obj) && typeof exp_val_for_parameter_in_validation === 'string') {
9179
+ // for (const [param_key, param_val] of Object.entries(elm_data?.xuData?.paramsP?.parameters_raw_obj)) {
9180
+ // exp_val_for_parameter_in_validation = exp_val_for_parameter_in_validation.replaceAll(param_val, '@' + param_key);
9181
+ // }
9182
+ // }
9173
9183
 
9174
9184
  if (key === 'xu-bind') {
9175
- if (val?.includes?.(val_field) || exp_val_for_parameter_in_validation?.includes?.(val_field)) {
9185
+ if (val?.includes?.(val_field) || validate_param_in(val)) {
9176
9186
  attr.push(key);
9177
9187
  }
9178
9188
  return true;
@@ -9180,7 +9190,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
9180
9190
 
9181
9191
  if (key === 'xu-for') {
9182
9192
  // match static value for xu-for
9183
- if (val?.includes?.(val_field) || exp_val_for_parameter_in_validation?.includes?.(val_field)) {
9193
+ if (val?.includes?.(val_field) || validate_param_in(val)) {
9184
9194
  attr.push(key);
9185
9195
  }
9186
9196
  return true;
@@ -9188,7 +9198,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
9188
9198
  // console.log(key, val);
9189
9199
 
9190
9200
  if (key.substr(0, 6) === 'xu-exp' && key.substr(6, 1) === ':') {
9191
- if (val?.includes?.('@' + val_field) || exp_val_for_parameter_in_validation?.includes?.('@' + val_field)) {
9201
+ if (val?.includes?.('@' + val_field) || validate_param_in(val)) {
9192
9202
  attr.push(key);
9193
9203
  }
9194
9204
  return true;