@abaplint/runtime 2.10.2 → 2.10.4
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.
|
@@ -69,8 +69,11 @@ async function deleteInternal(target, options) {
|
|
|
69
69
|
target.deleteFrom(options.fromValue);
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
|
-
//
|
|
73
|
-
|
|
72
|
+
// short form, "DELETE tab"
|
|
73
|
+
if (options === undefined) {
|
|
74
|
+
target.deleteIndex(target.getCurrentLoopIndex());
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
74
77
|
for await (const i of (0, loop_1.loop)(target)) {
|
|
75
78
|
// @ts-ignore
|
|
76
79
|
index = abap.builtin.sy.get().tabix.get() - 1;
|
|
@@ -95,11 +98,6 @@ async function deleteInternal(target, options) {
|
|
|
95
98
|
else if (options?.from && options.from.get() <= index + 1) {
|
|
96
99
|
target.deleteIndex(index);
|
|
97
100
|
}
|
|
98
|
-
else if (options === undefined && originalTabix === index + 1) {
|
|
99
|
-
// short form, "DELETE tab"
|
|
100
|
-
target.deleteIndex(index);
|
|
101
|
-
break;
|
|
102
|
-
}
|
|
103
101
|
}
|
|
104
102
|
}
|
|
105
103
|
//# sourceMappingURL=delete_internal.js.map
|
|
@@ -97,6 +97,7 @@ export declare class Table implements ITable {
|
|
|
97
97
|
getQualifiedName(): string | undefined;
|
|
98
98
|
getOptions(): ITableOptions;
|
|
99
99
|
startLoop(from: number, to: number, array: any[]): LoopController;
|
|
100
|
+
getCurrentLoopIndex(): number;
|
|
100
101
|
unregisterLoop(loop: LoopController): void;
|
|
101
102
|
getRowType(): TableRowType;
|
|
102
103
|
array(): any[];
|
package/build/src/types/table.js
CHANGED
|
@@ -322,6 +322,12 @@ class Table {
|
|
|
322
322
|
this.loops.add(l);
|
|
323
323
|
return l;
|
|
324
324
|
}
|
|
325
|
+
getCurrentLoopIndex() {
|
|
326
|
+
if (this.loops.size !== 1) {
|
|
327
|
+
throw new Error("More than one LOOP");
|
|
328
|
+
}
|
|
329
|
+
return Array.from(this.loops)[0].index;
|
|
330
|
+
}
|
|
325
331
|
unregisterLoop(loop) {
|
|
326
332
|
this.loops.delete(loop);
|
|
327
333
|
}
|