@abaplint/runtime 1.8.27 → 1.8.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.
@@ -1,8 +1,12 @@
1
1
  import { FieldSymbol, Table, TableRowType } from "../types";
2
+ import { ICharacter } from "../types/_character";
3
+ import { INumeric } from "../types/_numeric";
2
4
  export interface IAppendOptions {
3
5
  source: TableRowType;
4
6
  target: Table;
5
7
  lines?: boolean;
6
8
  assigning?: FieldSymbol;
9
+ from?: ICharacter | INumeric;
10
+ to?: ICharacter | INumeric;
7
11
  }
8
12
  export declare function append(input: IAppendOptions): void;
@@ -4,8 +4,21 @@ exports.append = void 0;
4
4
  const types_1 = require("../types");
5
5
  function append(input) {
6
6
  if (input.lines === true && input.source instanceof types_1.Table) {
7
+ let from = 1;
8
+ if (input.from) {
9
+ from = parseInt(input.from.get() + "", 10);
10
+ }
11
+ let to = input.source.array().length;
12
+ if (input.to) {
13
+ to = parseInt(input.to.get() + "", 10);
14
+ }
15
+ let index = 1;
7
16
  for (const a of input.source.array()) {
17
+ if (index < from || index > to) {
18
+ continue;
19
+ }
8
20
  input.target.append(a);
21
+ index++;
9
22
  }
10
23
  }
11
24
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "1.8.27",
3
+ "version": "1.8.30",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",