@abaplint/runtime 1.8.21 → 1.8.24
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/build/src/compare/eq.js
CHANGED
|
@@ -55,14 +55,20 @@ function eq(left, right) {
|
|
|
55
55
|
return true;
|
|
56
56
|
}
|
|
57
57
|
let l = undefined;
|
|
58
|
-
if (
|
|
58
|
+
if (left instanceof types_1.Character) {
|
|
59
|
+
l = left.get().trimEnd();
|
|
60
|
+
}
|
|
61
|
+
else if (typeof left === "object") {
|
|
59
62
|
l = left.get();
|
|
60
63
|
}
|
|
61
64
|
else {
|
|
62
65
|
l = left;
|
|
63
66
|
}
|
|
64
67
|
let r = undefined;
|
|
65
|
-
if (
|
|
68
|
+
if (right instanceof types_1.Character) {
|
|
69
|
+
r = right.get().trimEnd();
|
|
70
|
+
}
|
|
71
|
+
else if (typeof right === "object") {
|
|
66
72
|
r = right.get();
|
|
67
73
|
}
|
|
68
74
|
else {
|
|
@@ -13,7 +13,7 @@ function templateFormatting(source, options) {
|
|
|
13
13
|
text = text.substr(0, 2) + ":" + text.substr(2, 2) + ":" + text.substr(4, 2);
|
|
14
14
|
}
|
|
15
15
|
if (options.width) {
|
|
16
|
-
text = text.padEnd(options.width, " ");
|
|
16
|
+
text = text.trimEnd().padEnd(options.width, " ");
|
|
17
17
|
}
|
|
18
18
|
return text;
|
|
19
19
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ICharacter } from "./_character";
|
|
2
|
-
import { String } from "./string";
|
|
3
2
|
export declare class Character implements ICharacter {
|
|
4
3
|
private value;
|
|
5
4
|
private readonly length;
|
|
@@ -16,5 +15,5 @@ export declare class Character implements ICharacter {
|
|
|
16
15
|
getOffset(input: {
|
|
17
16
|
offset?: number;
|
|
18
17
|
length?: number;
|
|
19
|
-
}):
|
|
18
|
+
}): Character;
|
|
20
19
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Character = void 0;
|
|
4
|
-
const string_1 = require("./string");
|
|
5
4
|
class Character {
|
|
6
5
|
constructor(input) {
|
|
7
6
|
this.value = "";
|
|
@@ -40,7 +39,7 @@ class Character {
|
|
|
40
39
|
if ((input === null || input === void 0 ? void 0 : input.length) !== undefined) {
|
|
41
40
|
ret = ret.substr(0, input.length);
|
|
42
41
|
}
|
|
43
|
-
const r = new
|
|
42
|
+
const r = new Character({ length: ret.length });
|
|
44
43
|
r.set(ret);
|
|
45
44
|
return r;
|
|
46
45
|
}
|
package/build/src/types/table.js
CHANGED
|
@@ -120,14 +120,24 @@ class Table {
|
|
|
120
120
|
}
|
|
121
121
|
///////////////////////////
|
|
122
122
|
getValue(item, cloneRow = true) {
|
|
123
|
+
// make sure to do conversion if needed
|
|
123
124
|
if (typeof item === "number") {
|
|
124
|
-
|
|
125
|
+
const tmp = (0, clone_1.clone)(this.getRowType());
|
|
126
|
+
tmp.set(new integer_1.Integer().set(item));
|
|
127
|
+
return tmp;
|
|
125
128
|
}
|
|
126
129
|
else if (typeof item === "string") {
|
|
127
|
-
|
|
130
|
+
const tmp = (0, clone_1.clone)(this.getRowType());
|
|
131
|
+
tmp.set(new string_1.String().set(item));
|
|
132
|
+
return tmp;
|
|
133
|
+
}
|
|
134
|
+
else if (cloneRow === true) {
|
|
135
|
+
const tmp = (0, clone_1.clone)(this.getRowType());
|
|
136
|
+
tmp.set(item);
|
|
137
|
+
return tmp;
|
|
128
138
|
}
|
|
129
139
|
else {
|
|
130
|
-
return
|
|
140
|
+
return item;
|
|
131
141
|
}
|
|
132
142
|
}
|
|
133
143
|
}
|