@abaplint/runtime 2.13.27 → 2.13.28
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.
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import { FieldSymbol } from "./types";
|
|
2
|
-
|
|
1
|
+
import { FieldSymbol, HashedTable, Table } from "./types";
|
|
2
|
+
type DynamicCondition = string | Table | HashedTable | {
|
|
3
|
+
get(): string;
|
|
4
|
+
};
|
|
5
|
+
export declare function expandDynamic(input: DynamicCondition, evaluate: (name: string) => FieldSymbol | undefined): string;
|
|
6
|
+
export {};
|
|
@@ -3,8 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.expandDynamic = expandDynamic;
|
|
4
4
|
const expand_in_1 = require("./expand_in");
|
|
5
5
|
const types_1 = require("./types");
|
|
6
|
-
function expandDynamic(
|
|
6
|
+
function expandDynamic(input, evaluate) {
|
|
7
7
|
// console.dir(code);
|
|
8
|
+
let code;
|
|
9
|
+
if (input instanceof types_1.Table || input instanceof types_1.HashedTable) {
|
|
10
|
+
code = input.array().map(row => row.get()).join(" ");
|
|
11
|
+
}
|
|
12
|
+
else if (typeof input === "string") {
|
|
13
|
+
code = input;
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
code = input.get();
|
|
17
|
+
}
|
|
8
18
|
if (code === "") {
|
|
9
19
|
return "1 = 1";
|
|
10
20
|
}
|