@dhis2/expression-parser 1.1.9 → 1.1.11

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.
@@ -417,7 +417,7 @@ function d2_concatenate(values) {
417
417
  return joinToString(filterNotNull(values), '');
418
418
  }
419
419
  function d2_count(value) {
420
- var tmp1_safe_receiver = value == null ? null : value.c1c_1;
420
+ var tmp1_safe_receiver = value == null ? null : value.d1c_1;
421
421
  var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.o();
422
422
  return tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs;
423
423
  }
@@ -429,7 +429,7 @@ function d2_countIfValue(value, sample) {
429
429
  var tmp$ret$0;
430
430
  $l$block: {
431
431
  // Inline function 'kotlin.collections.count' call
432
- var this_0 = value.c1c_1;
432
+ var this_0 = value.d1c_1;
433
433
  var tmp_0;
434
434
  if (isInterface(this_0, Collection)) {
435
435
  tmp_0 = this_0.m();
@@ -457,7 +457,7 @@ function d2_countIfValue(value, sample) {
457
457
  return tmp;
458
458
  }
459
459
  function d2_countIfZeroPos(value) {
460
- var tmp1_safe_receiver = value == null ? null : value.c1c_1;
460
+ var tmp1_safe_receiver = value == null ? null : value.d1c_1;
461
461
  var tmp;
462
462
  if (tmp1_safe_receiver == null) {
463
463
  tmp = null;
@@ -529,7 +529,7 @@ function d2_hasUserRole(role, roles) {
529
529
  return roles.r(role);
530
530
  }
531
531
  function d2_hasValue(value) {
532
- return !((value == null ? null : value.b1c_1) == null);
532
+ return !((value == null ? null : value.c1c_1) == null);
533
533
  }
534
534
  function d2_inOrgUnitGroup(group, orgUnit, supplementaryValues) {
535
535
  // Inline function 'kotlin.collections.get' call
@@ -538,7 +538,7 @@ function d2_inOrgUnitGroup(group, orgUnit, supplementaryValues) {
538
538
  if (orgUnit == null) {
539
539
  tmp = '';
540
540
  } else {
541
- var tmp0_safe_receiver = orgUnit.b1c_1;
541
+ var tmp0_safe_receiver = orgUnit.c1c_1;
542
542
  tmp = tmp0_safe_receiver == null ? null : replace(tmp0_safe_receiver, "'", '');
543
543
  }
544
544
  var uid = tmp;
@@ -546,10 +546,10 @@ function d2_inOrgUnitGroup(group, orgUnit, supplementaryValues) {
546
546
  }
547
547
  function d2_lastEventDate(value) {
548
548
  var tmp;
549
- if ((value == null ? null : value.d1c_1) == null) {
549
+ if ((value == null ? null : value.e1c_1) == null) {
550
550
  tmp = null;
551
551
  } else {
552
- tmp = Companion_getInstance_1().ul(value.d1c_1);
552
+ tmp = Companion_getInstance_1().ul(value.e1c_1);
553
553
  }
554
554
  return tmp;
555
555
  }
@@ -577,7 +577,7 @@ function d2_maxValue(value) {
577
577
  var tmp$ret$0;
578
578
  $l$block: {
579
579
  // Inline function 'kotlin.collections.maxOfOrNull' call
580
- var iterator = value.c1c_1.j();
580
+ var iterator = value.d1c_1.j();
581
581
  if (!iterator.k()) {
582
582
  tmp$ret$0 = null;
583
583
  break $l$block;
@@ -623,7 +623,7 @@ function d2_minValue(value) {
623
623
  var tmp$ret$0;
624
624
  $l$block: {
625
625
  // Inline function 'kotlin.collections.minOfOrNull' call
626
- var iterator = value.c1c_1.j();
626
+ var iterator = value.d1c_1.j();
627
627
  if (!iterator.k()) {
628
628
  tmp$ret$0 = null;
629
629
  break $l$block;
@@ -3886,7 +3886,7 @@ protoOf(Companion_7).z1b = function (value) {
3886
3886
  if (value == null)
3887
3887
  return null;
3888
3888
  if (value instanceof VariableValue)
3889
- return value.b1c_1 == null ? null : this.z1b(this.y1b(value));
3889
+ return this.z1b(this.y1b(value));
3890
3890
  if (value instanceof LocalDate)
3891
3891
  return value;
3892
3892
  if (!(value == null) ? typeof value === 'string' : false)
@@ -3895,11 +3895,11 @@ protoOf(Companion_7).z1b = function (value) {
3895
3895
  return toLocalDateTime(value, Companion_getInstance_2().dm()).am();
3896
3896
  throw IllegalArgumentException_init_$Create$("Count not coerce to date: '" + toString_0(value) + "'");
3897
3897
  };
3898
- protoOf(Companion_7).e1c = function (value) {
3898
+ protoOf(Companion_7).a1c = function (value) {
3899
3899
  if (value == null)
3900
3900
  return null;
3901
3901
  if (value instanceof VariableValue)
3902
- return this.e1c(this.y1b(value));
3902
+ return this.a1c(this.y1b(value));
3903
3903
  if (isNumber(value))
3904
3904
  return isNonFractionValue(this, value) ? numberToInt(value).toString() : toString(value);
3905
3905
  return toString(value);
@@ -3909,7 +3909,7 @@ protoOf(Companion_7).y1b = function (value) {
3909
3909
  return null;
3910
3910
  var tmp;
3911
3911
  if (value instanceof VariableValue) {
3912
- switch (value.a1c_1.h2_1) {
3912
+ switch (value.b1c_1.h2_1) {
3913
3913
  case 1:
3914
3914
  tmp = this.s13(value.f1c());
3915
3915
  break;
@@ -3920,7 +3920,7 @@ protoOf(Companion_7).y1b = function (value) {
3920
3920
  tmp = this.z1b(value.f1c());
3921
3921
  break;
3922
3922
  default:
3923
- tmp = this.e1c(value.f1c());
3923
+ tmp = this.a1c(value.f1c());
3924
3924
  break;
3925
3925
  }
3926
3926
  } else {
@@ -4056,7 +4056,7 @@ function Api$validate$lambda($data) {
4056
4056
  var value = $data.s10_1.d2(variable.c15(0).v14());
4057
4057
  var tmp;
4058
4058
  if (!(value == null)) {
4059
- (variable instanceof VariableNode ? variable : THROW_CCE()).s19(value.a1c_1);
4059
+ (variable instanceof VariableNode ? variable : THROW_CCE()).s19(value.b1c_1);
4060
4060
  tmp = Unit_instance;
4061
4061
  }
4062
4062
  return Unit_instance;
@@ -4611,7 +4611,7 @@ function Calculator$evalNode$ref_0($boundThis) {
4611
4611
  }
4612
4612
  function Typed$Companion$toStringTypeCoercion$ref($boundThis) {
4613
4613
  var l = function (p0) {
4614
- return $boundThis.e1c(p0);
4614
+ return $boundThis.a1c(p0);
4615
4615
  };
4616
4616
  l.callableName = 'toStringTypeCoercion';
4617
4617
  return l;
@@ -11774,7 +11774,7 @@ function ValueType_initEntries() {
11774
11774
  ValueType_MIXED_instance = new ValueType('MIXED', 0, '');
11775
11775
  ValueType_NUMBER_instance = new ValueType('NUMBER', 1, 0.0);
11776
11776
  ValueType_BOOLEAN_instance = new ValueType('BOOLEAN', 2, false);
11777
- ValueType_DATE_instance = new ValueType('DATE', 3, '2020-01-01');
11777
+ ValueType_DATE_instance = new ValueType('DATE', 3, null);
11778
11778
  ValueType_STRING_instance = new ValueType('STRING', 4, '');
11779
11779
  ValueType_SAME_instance = new ValueType('SAME', 5, '');
11780
11780
  }
@@ -11905,32 +11905,32 @@ function VariableValue_init_$Create$(valueType) {
11905
11905
  return VariableValue_init_$Init$(valueType, objectCreate(protoOf(VariableValue)));
11906
11906
  }
11907
11907
  function VariableValue(valueType, value, candidates, eventDate) {
11908
- this.a1c_1 = valueType;
11909
- this.b1c_1 = value;
11910
- this.c1c_1 = candidates;
11911
- this.d1c_1 = eventDate;
11908
+ this.b1c_1 = valueType;
11909
+ this.c1c_1 = value;
11910
+ this.d1c_1 = candidates;
11911
+ this.e1c_1 = eventDate;
11912
11912
  // Inline function 'kotlin.require' call
11913
11913
  // Inline function 'kotlin.contracts.contract' call
11914
11914
  // Inline function 'kotlin.require' call
11915
11915
  // Inline function 'kotlin.contracts.contract' call
11916
- if (!(!this.a1c_1.equals(ValueType_SAME_getInstance()) && !this.a1c_1.equals(ValueType_MIXED_getInstance()))) {
11916
+ if (!(!this.b1c_1.equals(ValueType_SAME_getInstance()) && !this.b1c_1.equals(ValueType_MIXED_getInstance()))) {
11917
11917
  // Inline function 'kotlin.require.<anonymous>' call
11918
11918
  var message = 'Failed requirement.';
11919
11919
  throw IllegalArgumentException_init_$Create$(toString(message));
11920
11920
  }
11921
11921
  }
11922
11922
  protoOf(VariableValue).f1c = function () {
11923
- var tmp0_elvis_lhs = this.b1c_1;
11924
- return tmp0_elvis_lhs == null ? this.a1c_1.t1g_1 : tmp0_elvis_lhs;
11923
+ var tmp0_elvis_lhs = this.c1c_1;
11924
+ return tmp0_elvis_lhs == null ? this.b1c_1.t1g_1 : tmp0_elvis_lhs;
11925
11925
  };
11926
11926
  protoOf(VariableValue).toString = function () {
11927
- return 'VariableValue(valueType=' + this.a1c_1.toString() + ', value=' + this.b1c_1 + ', candidates=' + toString(this.c1c_1) + ', eventDate=' + this.d1c_1 + ')';
11927
+ return 'VariableValue(valueType=' + this.b1c_1.toString() + ', value=' + this.c1c_1 + ', candidates=' + toString(this.d1c_1) + ', eventDate=' + this.e1c_1 + ')';
11928
11928
  };
11929
11929
  protoOf(VariableValue).hashCode = function () {
11930
- var result = this.a1c_1.hashCode();
11931
- result = imul(result, 31) + (this.b1c_1 == null ? 0 : getStringHashCode(this.b1c_1)) | 0;
11932
- result = imul(result, 31) + hashCode(this.c1c_1) | 0;
11933
- result = imul(result, 31) + (this.d1c_1 == null ? 0 : getStringHashCode(this.d1c_1)) | 0;
11930
+ var result = this.b1c_1.hashCode();
11931
+ result = imul(result, 31) + (this.c1c_1 == null ? 0 : getStringHashCode(this.c1c_1)) | 0;
11932
+ result = imul(result, 31) + hashCode(this.d1c_1) | 0;
11933
+ result = imul(result, 31) + (this.e1c_1 == null ? 0 : getStringHashCode(this.e1c_1)) | 0;
11934
11934
  return result;
11935
11935
  };
11936
11936
  protoOf(VariableValue).equals = function (other) {
@@ -11939,13 +11939,13 @@ protoOf(VariableValue).equals = function (other) {
11939
11939
  if (!(other instanceof VariableValue))
11940
11940
  return false;
11941
11941
  var tmp0_other_with_cast = other instanceof VariableValue ? other : THROW_CCE();
11942
- if (!this.a1c_1.equals(tmp0_other_with_cast.a1c_1))
11942
+ if (!this.b1c_1.equals(tmp0_other_with_cast.b1c_1))
11943
11943
  return false;
11944
- if (!(this.b1c_1 == tmp0_other_with_cast.b1c_1))
11944
+ if (!(this.c1c_1 == tmp0_other_with_cast.c1c_1))
11945
11945
  return false;
11946
- if (!equals(this.c1c_1, tmp0_other_with_cast.c1c_1))
11946
+ if (!equals(this.d1c_1, tmp0_other_with_cast.d1c_1))
11947
11947
  return false;
11948
- if (!(this.d1c_1 == tmp0_other_with_cast.d1c_1))
11948
+ if (!(this.e1c_1 == tmp0_other_with_cast.e1c_1))
11949
11949
  return false;
11950
11950
  return true;
11951
11951
  };