@abaplint/runtime 2.5.28 → 2.5.30
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.
|
@@ -6,12 +6,24 @@ const compare_1 = require("../compare");
|
|
|
6
6
|
function compare(a, b, input) {
|
|
7
7
|
const componentName = input.component;
|
|
8
8
|
const descending = input.descending;
|
|
9
|
-
let vala =
|
|
10
|
-
let valb =
|
|
9
|
+
let vala = undefined;
|
|
10
|
+
let valb = undefined;
|
|
11
11
|
if (componentName.toLowerCase() === "table_line") {
|
|
12
12
|
vala = a.get();
|
|
13
13
|
valb = b.get();
|
|
14
14
|
}
|
|
15
|
+
else {
|
|
16
|
+
const sub = componentName.split("-");
|
|
17
|
+
vala = a;
|
|
18
|
+
valb = b;
|
|
19
|
+
for (const s of sub) {
|
|
20
|
+
vala = vala.get()[s];
|
|
21
|
+
valb = valb.get()[s];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
if (vala === undefined || valb === undefined) {
|
|
25
|
+
throw new Error("sort compare, wrong component name, " + componentName);
|
|
26
|
+
}
|
|
15
27
|
if ((0, compare_1.eq)(vala, valb)) {
|
|
16
28
|
return 0;
|
|
17
29
|
}
|
|
@@ -7,8 +7,10 @@ import { Character } from "./character";
|
|
|
7
7
|
export declare class Structure {
|
|
8
8
|
private readonly value;
|
|
9
9
|
private readonly qualifiedName;
|
|
10
|
-
|
|
10
|
+
private readonly ddicName;
|
|
11
|
+
constructor(fields: any, qualifiedName?: string, ddicName?: string);
|
|
11
12
|
clear(): this;
|
|
13
|
+
getDDICName(): string | undefined;
|
|
12
14
|
getQualifiedName(): string | undefined;
|
|
13
15
|
set(input: Structure | string | INumeric | Table | ICharacter | FieldSymbol | undefined): this | undefined;
|
|
14
16
|
private setCharacter;
|
|
@@ -8,9 +8,10 @@ const _parse_1 = require("../operators/_parse");
|
|
|
8
8
|
const character_1 = require("./character");
|
|
9
9
|
const throw_error_1 = require("../throw_error");
|
|
10
10
|
class Structure {
|
|
11
|
-
constructor(fields, qualifiedName) {
|
|
11
|
+
constructor(fields, qualifiedName, ddicName) {
|
|
12
12
|
this.value = fields;
|
|
13
13
|
this.qualifiedName = qualifiedName === null || qualifiedName === void 0 ? void 0 : qualifiedName.toUpperCase();
|
|
14
|
+
this.ddicName = ddicName === null || ddicName === void 0 ? void 0 : ddicName.toUpperCase();
|
|
14
15
|
}
|
|
15
16
|
clear() {
|
|
16
17
|
for (const f in this.value) {
|
|
@@ -19,6 +20,9 @@ class Structure {
|
|
|
19
20
|
}
|
|
20
21
|
return this;
|
|
21
22
|
}
|
|
23
|
+
getDDICName() {
|
|
24
|
+
return this.ddicName;
|
|
25
|
+
}
|
|
22
26
|
getQualifiedName() {
|
|
23
27
|
return this.qualifiedName;
|
|
24
28
|
}
|