@dhis2/expression-parser 1.1.5-beta.0 → 1.1.6

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.
@@ -85,10 +85,12 @@ import {
85
85
  coerceAtMost322komnqp70ag as coerceAtMost,
86
86
  IntRange1cx8zvxgibbj2 as IntRange,
87
87
  replace3le3ie7l9k8aq as replace,
88
- endsWith3cq61xxngobwh as endsWith,
89
88
  startsWith26w8qjqapeeq6 as startsWith,
89
+ take9j4462mea726 as take,
90
+ endsWith3cq61xxngobwh as endsWith,
91
+ dropLastlqc2oyv04br0 as dropLast,
90
92
  Regex_init_$Create$y1ec0tsv67vh as Regex_init_$Create$,
91
- take3onnpy6q7ctcz as take,
93
+ take3onnpy6q7ctcz as take_0,
92
94
  copyToArray2j022khrow2yi as copyToArray,
93
95
  getProgressionLastElement2w30kdy2w5nkt as getProgressionLastElement,
94
96
  arrayCopytctsywo3h7gj as arrayCopy,
@@ -720,7 +722,7 @@ function d2_split(input, delimiter, index) {
720
722
  // Inline function 'kotlin.text.isEmpty' call
721
723
  var this_2 = iterator.l4();
722
724
  if (!(charSequenceLength(this_2) === 0)) {
723
- tmp$ret$4 = take(this_1, iterator.k4() + 1 | 0);
725
+ tmp$ret$4 = take_0(this_1, iterator.k4() + 1 | 0);
724
726
  break $l$block;
725
727
  }
726
728
  }
@@ -5973,21 +5975,11 @@ protoOf(Companion_14).v1e = function (gs1Group) {
5973
5975
  var _iterator__ex2g4s = get_entries_6().j();
5974
5976
  while (_iterator__ex2g4s.k()) {
5975
5977
  var gs1Elements = _iterator__ex2g4s.l();
5976
- var ai = gs1Elements.u1e_1;
5977
- if (endsWith(ai, '*')) {
5978
- // Inline function 'kotlin.text.substring' call
5979
- var this_0 = ai;
5980
- var endIndex = ai.length - 1 | 0;
5981
- // Inline function 'kotlin.js.asDynamic' call
5982
- ai = this_0.substring(0, endIndex);
5983
- }
5984
- if (startsWith(gs1Group, ai) && endsWith(ai, '*')) {
5985
- // Inline function 'kotlin.text.substring' call
5986
- var endIndex_0 = ai.length + 1 | 0;
5987
- // Inline function 'kotlin.js.asDynamic' call
5988
- return gs1Group.substring(0, endIndex_0);
5989
- } else if (startsWith(gs1Group, ai)) {
5990
- return ai;
5978
+ var name = gs1Elements.u1e_1;
5979
+ if (endsWith(name, '*') && gs1Group.length >= name.length && startsWith(gs1Group, dropLast(name, 1))) {
5980
+ return take(gs1Group, name.length);
5981
+ } else if (startsWith(gs1Group, name)) {
5982
+ return name;
5991
5983
  }
5992
5984
  }
5993
5985
  throw IllegalArgumentException_init_$Create$('Could not retrieve ai from value');
@@ -7041,7 +7033,7 @@ function formatValue($this, value, valueToReturn) {
7041
7033
  // Inline function 'kotlin.text.isEmpty' call
7042
7034
  var this_3 = iterator.l4();
7043
7035
  if (!(charSequenceLength(this_3) === 0)) {
7044
- tmp$ret$4 = take(this_2, iterator.k4() + 1 | 0);
7036
+ tmp$ret$4 = take_0(this_2, iterator.k4() + 1 | 0);
7045
7037
  break $l$block;
7046
7038
  }
7047
7039
  }
@@ -10230,7 +10222,7 @@ function dataItem($this, expr, ctx, name) {
10230
10222
  // Inline function 'kotlin.text.isEmpty' call
10231
10223
  var this_1 = iterator.l4();
10232
10224
  if (!(charSequenceLength(this_1) === 0)) {
10233
- tmp$ret$4 = take(this_0, iterator.k4() + 1 | 0);
10225
+ tmp$ret$4 = take_0(this_0, iterator.k4() + 1 | 0);
10234
10226
  break $l$block;
10235
10227
  }
10236
10228
  }
@@ -10295,7 +10287,7 @@ function dataItem($this, expr, ctx, name) {
10295
10287
  // Inline function 'kotlin.text.isEmpty' call
10296
10288
  var this_5 = iterator_0.l4();
10297
10289
  if (!(charSequenceLength(this_5) === 0)) {
10298
- tmp$ret$16 = take(this_4, iterator_0.k4() + 1 | 0);
10290
+ tmp$ret$16 = take_0(this_4, iterator_0.k4() + 1 | 0);
10299
10291
  break $l$block_1;
10300
10292
  }
10301
10293
  }
@@ -10350,7 +10342,7 @@ function isTaggedUidGroup($this, expr) {
10350
10342
  // Inline function 'kotlin.text.isEmpty' call
10351
10343
  var this_1 = iterator.l4();
10352
10344
  if (!(charSequenceLength(this_1) === 0)) {
10353
- tmp$ret$6 = take(this_0, iterator.k4() + 1 | 0);
10345
+ tmp$ret$6 = take_0(this_0, iterator.k4() + 1 | 0);
10354
10346
  break $l$block;
10355
10347
  }
10356
10348
  }