ui-core-abv 0.6.51 → 0.6.53

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.
@@ -9006,71 +9006,7 @@ class UicRuleBuilderComponent {
9006
9006
  emitRuleDefinitionOnInit = false;
9007
9007
  conditionsEmitScheduled = false;
9008
9008
  ruleDefinitionEmitScheduled = false;
9009
- _conditions = [
9010
- {
9011
- id: 1,
9012
- description: 'Mayores de edad',
9013
- fieldName: 'Edad',
9014
- fieldCode: 'age',
9015
- operatorCode: 'greater_than',
9016
- operatorName: 'Mayor que',
9017
- value: '18',
9018
- },
9019
- {
9020
- id: 2,
9021
- description: 'Menores de edad',
9022
- fieldName: 'Edad',
9023
- fieldCode: 'age',
9024
- operatorCode: 'less_than',
9025
- operatorName: 'Menor que',
9026
- value: '18',
9027
- },
9028
- {
9029
- id: 3,
9030
- description: 'Demo 3',
9031
- fieldName: 'Edad',
9032
- fieldCode: 'age',
9033
- operatorCode: 'less_than',
9034
- operatorName: 'Menor que',
9035
- value: '18',
9036
- },
9037
- {
9038
- id: 4,
9039
- description: 'Demo 4',
9040
- fieldName: 'Edad',
9041
- fieldCode: 'age',
9042
- operatorCode: 'less_than',
9043
- operatorName: 'Menor que',
9044
- value: '18',
9045
- },
9046
- {
9047
- id: 5,
9048
- description: 'Demo 5',
9049
- fieldName: 'Edad',
9050
- fieldCode: 'age',
9051
- operatorCode: 'less_than',
9052
- operatorName: 'Menor que',
9053
- value: '18',
9054
- },
9055
- {
9056
- id: 6,
9057
- description: 'Demo 6',
9058
- fieldName: 'Edad',
9059
- fieldCode: 'age',
9060
- operatorCode: 'less_than',
9061
- operatorName: 'Menor que',
9062
- value: '18',
9063
- },
9064
- {
9065
- id: 7,
9066
- description: 'Demo 7',
9067
- fieldName: 'Edad',
9068
- fieldCode: 'age',
9069
- operatorCode: 'less_than',
9070
- operatorName: 'Menor que',
9071
- value: '18',
9072
- }
9073
- ];
9009
+ _conditions = [];
9074
9010
  set conditions(value) {
9075
9011
  this._conditions = Array.isArray(value) ? value.map(condition => ({ ...condition })) : [];
9076
9012
  const conditionsNormalized = this.refreshAvailableConditions();
@@ -9130,7 +9066,6 @@ class UicRuleBuilderComponent {
9130
9066
  editorRules = [];
9131
9067
  translate = inject(UicTranslateService);
9132
9068
  modal = inject(UicModalService);
9133
- tinyAlert = inject(UicTinyAlertService);
9134
9069
  get resolvedTitle() {
9135
9070
  return this.ruleTitle || this.translate.translate('rule_builder.title');
9136
9071
  }
@@ -9207,10 +9142,6 @@ class UicRuleBuilderComponent {
9207
9142
  }
9208
9143
  print() {
9209
9144
  const normalizedRules = this.normalizeRules(this.cloneRules(this.editorRules));
9210
- if (!this.hasOperators(normalizedRules)) {
9211
- this.tinyAlert.warning('rule_builder.validation.single_condition_not_allowed');
9212
- return;
9213
- }
9214
9145
  this.editorRules = normalizedRules;
9215
9146
  this.markRulesAsSaved(this.editorRules);
9216
9147
  this.emitRuleDefinitionState();
@@ -9288,17 +9219,6 @@ class UicRuleBuilderComponent {
9288
9219
  return [];
9289
9220
  });
9290
9221
  }
9291
- hasOperators(rules) {
9292
- return rules.some(rule => {
9293
- if (rule.type === 'operator') {
9294
- return true;
9295
- }
9296
- if (rule.type === 'group' && rule.rules) {
9297
- return this.hasOperators(rule.rules);
9298
- }
9299
- return false;
9300
- });
9301
- }
9302
9222
  normalizeRules(rules, preserveIncompleteUnsaved = false) {
9303
9223
  const normalized = [];
9304
9224
  let expectsExpression = true;