@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.
package/expression-parser.js
CHANGED
|
@@ -413,7 +413,7 @@
|
|
|
413
413
|
return joinToString(filterNotNull(values), '');
|
|
414
414
|
}
|
|
415
415
|
function d2_count(value) {
|
|
416
|
-
var tmp1_safe_receiver = value == null ? null : value.
|
|
416
|
+
var tmp1_safe_receiver = value == null ? null : value.d1c_1;
|
|
417
417
|
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.o();
|
|
418
418
|
return tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs;
|
|
419
419
|
}
|
|
@@ -425,7 +425,7 @@
|
|
|
425
425
|
var tmp$ret$0;
|
|
426
426
|
$l$block: {
|
|
427
427
|
// Inline function 'kotlin.collections.count' call
|
|
428
|
-
var this_0 = value.
|
|
428
|
+
var this_0 = value.d1c_1;
|
|
429
429
|
var tmp_0;
|
|
430
430
|
if (isInterface(this_0, Collection)) {
|
|
431
431
|
tmp_0 = this_0.m();
|
|
@@ -453,7 +453,7 @@
|
|
|
453
453
|
return tmp;
|
|
454
454
|
}
|
|
455
455
|
function d2_countIfZeroPos(value) {
|
|
456
|
-
var tmp1_safe_receiver = value == null ? null : value.
|
|
456
|
+
var tmp1_safe_receiver = value == null ? null : value.d1c_1;
|
|
457
457
|
var tmp;
|
|
458
458
|
if (tmp1_safe_receiver == null) {
|
|
459
459
|
tmp = null;
|
|
@@ -525,7 +525,7 @@
|
|
|
525
525
|
return roles.r(role);
|
|
526
526
|
}
|
|
527
527
|
function d2_hasValue(value) {
|
|
528
|
-
return !((value == null ? null : value.
|
|
528
|
+
return !((value == null ? null : value.c1c_1) == null);
|
|
529
529
|
}
|
|
530
530
|
function d2_inOrgUnitGroup(group, orgUnit, supplementaryValues) {
|
|
531
531
|
// Inline function 'kotlin.collections.get' call
|
|
@@ -534,7 +534,7 @@
|
|
|
534
534
|
if (orgUnit == null) {
|
|
535
535
|
tmp = '';
|
|
536
536
|
} else {
|
|
537
|
-
var tmp0_safe_receiver = orgUnit.
|
|
537
|
+
var tmp0_safe_receiver = orgUnit.c1c_1;
|
|
538
538
|
tmp = tmp0_safe_receiver == null ? null : replace(tmp0_safe_receiver, "'", '');
|
|
539
539
|
}
|
|
540
540
|
var uid = tmp;
|
|
@@ -542,10 +542,10 @@
|
|
|
542
542
|
}
|
|
543
543
|
function d2_lastEventDate(value) {
|
|
544
544
|
var tmp;
|
|
545
|
-
if ((value == null ? null : value.
|
|
545
|
+
if ((value == null ? null : value.e1c_1) == null) {
|
|
546
546
|
tmp = null;
|
|
547
547
|
} else {
|
|
548
|
-
tmp = Companion_getInstance_0().ul(value.
|
|
548
|
+
tmp = Companion_getInstance_0().ul(value.e1c_1);
|
|
549
549
|
}
|
|
550
550
|
return tmp;
|
|
551
551
|
}
|
|
@@ -573,7 +573,7 @@
|
|
|
573
573
|
var tmp$ret$0;
|
|
574
574
|
$l$block: {
|
|
575
575
|
// Inline function 'kotlin.collections.maxOfOrNull' call
|
|
576
|
-
var iterator = value.
|
|
576
|
+
var iterator = value.d1c_1.j();
|
|
577
577
|
if (!iterator.k()) {
|
|
578
578
|
tmp$ret$0 = null;
|
|
579
579
|
break $l$block;
|
|
@@ -619,7 +619,7 @@
|
|
|
619
619
|
var tmp$ret$0;
|
|
620
620
|
$l$block: {
|
|
621
621
|
// Inline function 'kotlin.collections.minOfOrNull' call
|
|
622
|
-
var iterator = value.
|
|
622
|
+
var iterator = value.d1c_1.j();
|
|
623
623
|
if (!iterator.k()) {
|
|
624
624
|
tmp$ret$0 = null;
|
|
625
625
|
break $l$block;
|
|
@@ -3882,7 +3882,7 @@
|
|
|
3882
3882
|
if (value == null)
|
|
3883
3883
|
return null;
|
|
3884
3884
|
if (value instanceof VariableValue)
|
|
3885
|
-
return
|
|
3885
|
+
return this.z1b(this.y1b(value));
|
|
3886
3886
|
if (value instanceof LocalDate)
|
|
3887
3887
|
return value;
|
|
3888
3888
|
if (!(value == null) ? typeof value === 'string' : false)
|
|
@@ -3891,11 +3891,11 @@
|
|
|
3891
3891
|
return toLocalDateTime(value, Companion_getInstance_1().dm()).am();
|
|
3892
3892
|
throw IllegalArgumentException_init_$Create$("Count not coerce to date: '" + toString_0(value) + "'");
|
|
3893
3893
|
};
|
|
3894
|
-
protoOf(Companion_7).
|
|
3894
|
+
protoOf(Companion_7).a1c = function (value) {
|
|
3895
3895
|
if (value == null)
|
|
3896
3896
|
return null;
|
|
3897
3897
|
if (value instanceof VariableValue)
|
|
3898
|
-
return this.
|
|
3898
|
+
return this.a1c(this.y1b(value));
|
|
3899
3899
|
if (isNumber(value))
|
|
3900
3900
|
return isNonFractionValue(this, value) ? numberToInt(value).toString() : toString(value);
|
|
3901
3901
|
return toString(value);
|
|
@@ -3905,7 +3905,7 @@
|
|
|
3905
3905
|
return null;
|
|
3906
3906
|
var tmp;
|
|
3907
3907
|
if (value instanceof VariableValue) {
|
|
3908
|
-
switch (value.
|
|
3908
|
+
switch (value.b1c_1.h2_1) {
|
|
3909
3909
|
case 1:
|
|
3910
3910
|
tmp = this.s13(value.f1c());
|
|
3911
3911
|
break;
|
|
@@ -3916,7 +3916,7 @@
|
|
|
3916
3916
|
tmp = this.z1b(value.f1c());
|
|
3917
3917
|
break;
|
|
3918
3918
|
default:
|
|
3919
|
-
tmp = this.
|
|
3919
|
+
tmp = this.a1c(value.f1c());
|
|
3920
3920
|
break;
|
|
3921
3921
|
}
|
|
3922
3922
|
} else {
|
|
@@ -4052,7 +4052,7 @@
|
|
|
4052
4052
|
var value = $data.s10_1.d2(variable.c15(0).v14());
|
|
4053
4053
|
var tmp;
|
|
4054
4054
|
if (!(value == null)) {
|
|
4055
|
-
(variable instanceof VariableNode ? variable : THROW_CCE()).s19(value.
|
|
4055
|
+
(variable instanceof VariableNode ? variable : THROW_CCE()).s19(value.b1c_1);
|
|
4056
4056
|
tmp = Unit_instance;
|
|
4057
4057
|
}
|
|
4058
4058
|
return Unit_instance;
|
|
@@ -4607,7 +4607,7 @@
|
|
|
4607
4607
|
}
|
|
4608
4608
|
function Typed$Companion$toStringTypeCoercion$ref($boundThis) {
|
|
4609
4609
|
var l = function (p0) {
|
|
4610
|
-
return $boundThis.
|
|
4610
|
+
return $boundThis.a1c(p0);
|
|
4611
4611
|
};
|
|
4612
4612
|
l.callableName = 'toStringTypeCoercion';
|
|
4613
4613
|
return l;
|
|
@@ -11770,7 +11770,7 @@
|
|
|
11770
11770
|
ValueType_MIXED_instance = new ValueType('MIXED', 0, '');
|
|
11771
11771
|
ValueType_NUMBER_instance = new ValueType('NUMBER', 1, 0.0);
|
|
11772
11772
|
ValueType_BOOLEAN_instance = new ValueType('BOOLEAN', 2, false);
|
|
11773
|
-
ValueType_DATE_instance = new ValueType('DATE', 3,
|
|
11773
|
+
ValueType_DATE_instance = new ValueType('DATE', 3, null);
|
|
11774
11774
|
ValueType_STRING_instance = new ValueType('STRING', 4, '');
|
|
11775
11775
|
ValueType_SAME_instance = new ValueType('SAME', 5, '');
|
|
11776
11776
|
}
|
|
@@ -11901,32 +11901,32 @@
|
|
|
11901
11901
|
return VariableValue_init_$Init$(valueType, objectCreate(protoOf(VariableValue)));
|
|
11902
11902
|
}
|
|
11903
11903
|
function VariableValue(valueType, value, candidates, eventDate) {
|
|
11904
|
-
this.
|
|
11905
|
-
this.
|
|
11906
|
-
this.
|
|
11907
|
-
this.
|
|
11904
|
+
this.b1c_1 = valueType;
|
|
11905
|
+
this.c1c_1 = value;
|
|
11906
|
+
this.d1c_1 = candidates;
|
|
11907
|
+
this.e1c_1 = eventDate;
|
|
11908
11908
|
// Inline function 'kotlin.require' call
|
|
11909
11909
|
// Inline function 'kotlin.contracts.contract' call
|
|
11910
11910
|
// Inline function 'kotlin.require' call
|
|
11911
11911
|
// Inline function 'kotlin.contracts.contract' call
|
|
11912
|
-
if (!(!this.
|
|
11912
|
+
if (!(!this.b1c_1.equals(ValueType_SAME_getInstance()) && !this.b1c_1.equals(ValueType_MIXED_getInstance()))) {
|
|
11913
11913
|
// Inline function 'kotlin.require.<anonymous>' call
|
|
11914
11914
|
var message = 'Failed requirement.';
|
|
11915
11915
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
11916
11916
|
}
|
|
11917
11917
|
}
|
|
11918
11918
|
protoOf(VariableValue).f1c = function () {
|
|
11919
|
-
var tmp0_elvis_lhs = this.
|
|
11920
|
-
return tmp0_elvis_lhs == null ? this.
|
|
11919
|
+
var tmp0_elvis_lhs = this.c1c_1;
|
|
11920
|
+
return tmp0_elvis_lhs == null ? this.b1c_1.t1g_1 : tmp0_elvis_lhs;
|
|
11921
11921
|
};
|
|
11922
11922
|
protoOf(VariableValue).toString = function () {
|
|
11923
|
-
return 'VariableValue(valueType=' + this.
|
|
11923
|
+
return 'VariableValue(valueType=' + this.b1c_1.toString() + ', value=' + this.c1c_1 + ', candidates=' + toString(this.d1c_1) + ', eventDate=' + this.e1c_1 + ')';
|
|
11924
11924
|
};
|
|
11925
11925
|
protoOf(VariableValue).hashCode = function () {
|
|
11926
|
-
var result = this.
|
|
11927
|
-
result = imul(result, 31) + (this.
|
|
11928
|
-
result = imul(result, 31) + hashCode(this.
|
|
11929
|
-
result = imul(result, 31) + (this.
|
|
11926
|
+
var result = this.b1c_1.hashCode();
|
|
11927
|
+
result = imul(result, 31) + (this.c1c_1 == null ? 0 : getStringHashCode(this.c1c_1)) | 0;
|
|
11928
|
+
result = imul(result, 31) + hashCode(this.d1c_1) | 0;
|
|
11929
|
+
result = imul(result, 31) + (this.e1c_1 == null ? 0 : getStringHashCode(this.e1c_1)) | 0;
|
|
11930
11930
|
return result;
|
|
11931
11931
|
};
|
|
11932
11932
|
protoOf(VariableValue).equals = function (other) {
|
|
@@ -11935,13 +11935,13 @@
|
|
|
11935
11935
|
if (!(other instanceof VariableValue))
|
|
11936
11936
|
return false;
|
|
11937
11937
|
var tmp0_other_with_cast = other instanceof VariableValue ? other : THROW_CCE();
|
|
11938
|
-
if (!this.
|
|
11938
|
+
if (!this.b1c_1.equals(tmp0_other_with_cast.b1c_1))
|
|
11939
11939
|
return false;
|
|
11940
|
-
if (!(this.
|
|
11940
|
+
if (!(this.c1c_1 == tmp0_other_with_cast.c1c_1))
|
|
11941
11941
|
return false;
|
|
11942
|
-
if (!equals(this.
|
|
11942
|
+
if (!equals(this.d1c_1, tmp0_other_with_cast.d1c_1))
|
|
11943
11943
|
return false;
|
|
11944
|
-
if (!(this.
|
|
11944
|
+
if (!(this.e1c_1 == tmp0_other_with_cast.e1c_1))
|
|
11945
11945
|
return false;
|
|
11946
11946
|
return true;
|
|
11947
11947
|
};
|