@guihz/trading-vue-editor-tes 0.0.7 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (22) hide show
  1. package/lib/assets/editor.worker-CT5Cb1wO.js +11 -0
  2. package/lib/assets/{parserTccWorker-cJ5nOv5I.js → parserTccWorker-BhMZL9OL.js} +39 -38
  3. package/lib/assets/scriptsRunWorker-DHT6psBx.js +66 -0
  4. package/lib/components/editor/parseScript/buildInConstants.d.ts +51 -0
  5. package/lib/components/editor/parseScript/buildInFuncNamespace/box.d.ts +99 -0
  6. package/lib/components/editor/parseScript/buildInFuncNamespace/chartPoint.d.ts +27 -0
  7. package/lib/components/editor/parseScript/buildInFuncNamespace/index.d.ts +9 -1
  8. package/lib/components/editor/parseScript/buildInFuncNamespace/label.d.ts +77 -0
  9. package/lib/components/editor/parseScript/buildInFuncNamespace/line.d.ts +81 -0
  10. package/lib/components/editor/parseScript/buildInFuncNamespace/linefill.d.ts +37 -0
  11. package/lib/components/editor/parseScript/buildInFuncNamespace/polyline.d.ts +31 -0
  12. package/lib/components/editor/parseScript/buildInFuncNamespace/ta.d.ts +4 -3
  13. package/lib/components/editor/parseScript/buildInFuncNamespace/table.d.ts +94 -0
  14. package/lib/components/editor/parseScript/constants.d.ts +3 -0
  15. package/lib/components/editor/parseScript/type.d.ts +1 -0
  16. package/lib/components/editor/parseScript/visitorParser.d.ts +2 -0
  17. package/lib/components/editor/type/index.d.ts +2 -0
  18. package/lib/trading-vue-editor.js +1876 -1852
  19. package/lib/trading-vue-editor.umd.cjs +32 -32
  20. package/package.json +1 -1
  21. package/lib/assets/scriptsRunWorker-B4O7gGzE.js +0 -66
  22. package/lib/components/editor/parseScript/buildInVariables.d.ts +0 -124
@@ -1,4 +1,55 @@
1
1
  import { VPlotDisplay, VExtend, VFormatType, VHlineStyle, VLabelStyle, VLineStyle, VLocation, VSortOrder, VPlotStyle, VPosition, VAdjustment, VAlert, VBarmergeGaps, VScale, VSession, VShape, VSize, VStrategy, VCommission, VDirection, VOca, VText, VXloc, VYloc, VEarnings } from './enum';
2
+ export declare const COLOR_BUILD_IN: {
3
+ aqua: string;
4
+ black: string;
5
+ blue: string;
6
+ fuchsia: string;
7
+ gray: string;
8
+ green: string;
9
+ lime: string;
10
+ maroon: string;
11
+ navy: string;
12
+ olive: string;
13
+ orange: string;
14
+ purple: string;
15
+ red: string;
16
+ silver: string;
17
+ teal: string;
18
+ white: string;
19
+ yellow: string;
20
+ };
21
+ export declare const CURRENCY_BUILD_IN: {
22
+ AUD: string;
23
+ BTC: string;
24
+ CAD: string;
25
+ CHF: string;
26
+ ETH: string;
27
+ EUR: string;
28
+ GBP: string;
29
+ HKD: string;
30
+ INR: string;
31
+ JPY: string;
32
+ KRW: string;
33
+ MYR: string;
34
+ NOK: string;
35
+ NONE: string;
36
+ NZD: string;
37
+ RUB: string;
38
+ SEK: string;
39
+ SGD: string;
40
+ TRY: string;
41
+ USD: string;
42
+ USDT: string;
43
+ ZAR: string;
44
+ };
45
+ export declare const DISPLAY_BUILD_IN: {
46
+ all: VPlotDisplay[];
47
+ data_window: VPlotDisplay[];
48
+ none: never[];
49
+ pane: VPlotDisplay[];
50
+ price_scale: VPlotDisplay[];
51
+ status_line: VPlotDisplay[];
52
+ };
2
53
  export declare class BuildInConstants {
3
54
  adjustment: {
4
55
  dividends: VAdjustment;
@@ -0,0 +1,99 @@
1
+ import { BuiltInVariables } from "../buildInVariables";
2
+ import { VExtend, VLineStyle, VSize, VText, VXloc } from "../enum";
3
+ import { Point } from "./index";
4
+ export interface IBoxArgs {
5
+ id?: string;
6
+ top_left?: Point;
7
+ left?: number;
8
+ top?: number;
9
+ right?: number;
10
+ bottom?: number;
11
+ bottom_right?: Point;
12
+ border_color?: string;
13
+ border_width?: number;
14
+ border_style?: VLineStyle;
15
+ style?: VLineStyle;
16
+ xloc?: VXloc;
17
+ bgcolor?: string;
18
+ text?: string;
19
+ text_size?: VSize;
20
+ text_color?: string;
21
+ extend?: VExtend;
22
+ text_halign?: VText;
23
+ text_valign?: VText;
24
+ text_wrap?: VText;
25
+ text_font_family?: string;
26
+ color?: string;
27
+ point?: Point;
28
+ width?: number;
29
+ }
30
+ type VBoxArgs = Omit<IBoxArgs, 'id'> & {
31
+ id: Box;
32
+ };
33
+ export default class BuildInBox {
34
+ private _variables;
35
+ private _defaultBox;
36
+ constructor(variables: BuiltInVariables);
37
+ box({ x }: {
38
+ x?: Box;
39
+ }, posStr: string): Box;
40
+ new({ top_left, bottom_right, ...args }: IBoxArgs, posStr: string): Box;
41
+ copy({ id }: VBoxArgs, posStr: string): Box;
42
+ delete({ id }: VBoxArgs): void;
43
+ get_top({ id }: VBoxArgs): number | undefined;
44
+ get_bottom({ id }: VBoxArgs): number | undefined;
45
+ get_left({ id }: VBoxArgs): number | undefined;
46
+ get_right({ id }: VBoxArgs): number | undefined;
47
+ set_top({ id, ...args }: VBoxArgs): void;
48
+ set_bottom({ id, ...args }: VBoxArgs): void;
49
+ set_left({ id, ...args }: VBoxArgs): void;
50
+ set_right({ id, ...args }: VBoxArgs): void;
51
+ set_extend({ id, ...args }: VBoxArgs): void;
52
+ set_bgcolor({ id, ...args }: VBoxArgs): void;
53
+ set_border_color({ id, ...args }: VBoxArgs): void;
54
+ set_border_width({ id, ...args }: VBoxArgs): void;
55
+ set_border_style({ id, ...args }: VBoxArgs): void;
56
+ set_lefttop({ id, ...args }: VBoxArgs): void;
57
+ set_rightbottom({ id, ...args }: VBoxArgs): void;
58
+ set_text_size({ id, ...args }: VBoxArgs): void;
59
+ set_text_wrap({ id, ...args }: VBoxArgs): void;
60
+ set_text_color({ id, ...args }: VBoxArgs): void;
61
+ set_text_halign({ id, ...args }: VBoxArgs): void;
62
+ set_text_valign({ id, ...args }: VBoxArgs): void;
63
+ set_top_left_point({ id, ...args }: VBoxArgs): void;
64
+ set_bottom_right_point({ id, ...args }: VBoxArgs): void;
65
+ set_text_font_family({ id, ...args }: VBoxArgs): void;
66
+ }
67
+ export declare class Box {
68
+ private _id;
69
+ private _variables;
70
+ constructor(variables: BuiltInVariables, key: string);
71
+ copy(posStr: string): Box;
72
+ delete(): void;
73
+ get_top(): number | undefined;
74
+ set_top({ top }: IBoxArgs): void;
75
+ get_left(): number | undefined;
76
+ set_left({ left }: IBoxArgs): void;
77
+ set_text({ text }: IBoxArgs): void;
78
+ get_right(): number | undefined;
79
+ set_right({ right }: IBoxArgs): void;
80
+ get_bottom(): number | undefined;
81
+ set_bottom({ bottom }: IBoxArgs): void;
82
+ set_extend({ extend }: IBoxArgs): void;
83
+ set_bgcolor({ color }: IBoxArgs): void;
84
+ set_lefttop({ left, top }: IBoxArgs): void;
85
+ set_text_size({ text_size }: IBoxArgs): void;
86
+ set_text_wrap({ text_wrap }: IBoxArgs): void;
87
+ set_text_color({ text_color }: IBoxArgs): void;
88
+ set_rightbottom({ right, bottom }: IBoxArgs): void;
89
+ set_text_halign({ text_halign }: IBoxArgs): void;
90
+ set_text_valign({ text_valign }: IBoxArgs): void;
91
+ set_top_left_point({ point }: IBoxArgs): void;
92
+ set_border_color({ color }: IBoxArgs): void;
93
+ set_border_style({ style }: IBoxArgs): void;
94
+ set_border_width({ width }: IBoxArgs): void;
95
+ set_bottom_right_point({ point }: IBoxArgs): void;
96
+ set_text_font_family({ text_font_family }: IBoxArgs): void;
97
+ private _getBox;
98
+ }
99
+ export {};
@@ -0,0 +1,27 @@
1
+ import { BuiltInVariables } from "../buildInVariables";
2
+ interface IChartPointArgs {
3
+ id?: Point;
4
+ price?: number;
5
+ time?: number;
6
+ index?: number;
7
+ }
8
+ export default class ChartPoint {
9
+ private _variables;
10
+ constructor(variables: BuiltInVariables);
11
+ new({ price, time, index }: IChartPointArgs): Point;
12
+ now({ price }: IChartPointArgs): Point;
13
+ copy({ id }: IChartPointArgs): Point;
14
+ from_index({ price, index }: IChartPointArgs): Point;
15
+ from_time({ price, time }: IChartPointArgs): Point;
16
+ }
17
+ export declare class Point {
18
+ private _index?;
19
+ private _price?;
20
+ private _time?;
21
+ constructor(price?: number, index?: number, time?: number);
22
+ get index(): number | undefined;
23
+ get price(): number | undefined;
24
+ get time(): number | undefined;
25
+ copy(): Point;
26
+ }
27
+ export {};
@@ -7,6 +7,14 @@ import BuildInMatrix from "./matrix";
7
7
  import BuildInTimeframe from "./timeframe";
8
8
  import BuildInStr from "./string";
9
9
  import BuildInMap from "./map";
10
+ import ChartPoint, { Point } from "./chartPoint";
11
+ import BuildInLabel, { PartialLabelArgs, Label } from "./label";
12
+ import BuildInPolyline, { IPolyline, Polyline } from "./polyline";
13
+ import BuildInLine, { ILineArgs, Line } from "./line";
14
+ import BuildInLinefill, { TLinefill, Linefill } from "./linefill";
15
+ import BuildInBox, { IBoxArgs, Box } from "./box";
16
+ import BuildInTable, { ITableArgs, Table } from "./table";
10
17
  export { TccErrorListener } from './errorListener';
11
18
  export type { IColorArgs } from './color';
12
- export { BuildInArray, BuildInMath, BuildInTa, BuildInInput, BuildInColor, BuildInMatrix, BuildInTimeframe, BuildInStr, BuildInMap, PseudoArray, VInputType };
19
+ export { BuildInArray, BuildInMath, BuildInTa, BuildInInput, BuildInColor, BuildInMatrix, ChartPoint, Point, BuildInTimeframe, BuildInStr, BuildInMap, PseudoArray, VInputType, BuildInLabel, BuildInPolyline, BuildInLine, Label, Polyline, Line, BuildInLinefill, Linefill, BuildInBox, Box, BuildInTable, Table };
20
+ export type { PartialLabelArgs, IPolyline, ILineArgs, TLinefill, IBoxArgs, ITableArgs };
@@ -0,0 +1,77 @@
1
+ import { BuiltInVariables } from "../buildInVariables";
2
+ import { VLabelStyle, VSize, VText, VXloc, VYloc } from "../enum";
3
+ import { Point } from "./index";
4
+ interface ILabelArgs {
5
+ id: string;
6
+ point: Point;
7
+ text: string;
8
+ x: number;
9
+ y: number;
10
+ xloc: VXloc;
11
+ yloc: VYloc;
12
+ color: string;
13
+ size: VSize;
14
+ style: VLabelStyle;
15
+ textalign: VText;
16
+ textcolor: string;
17
+ tooltip: string;
18
+ text_font_family: string;
19
+ }
20
+ export type PartialLabelArgs = Partial<ILabelArgs>;
21
+ type TLabelArgs = Omit<PartialLabelArgs, 'id'> & {
22
+ id: Label;
23
+ };
24
+ export default class BuildInLabel {
25
+ private _variables;
26
+ private _defaultLabel;
27
+ constructor(variables: BuiltInVariables);
28
+ new(args: PartialLabelArgs, posStr: string): Label;
29
+ label(args: {
30
+ x?: Label;
31
+ }, posStr: string): Label;
32
+ copy({ id }: TLabelArgs, posStr: string): Label;
33
+ get_x({ id }: TLabelArgs, posStr: string): number | undefined;
34
+ get_y({ id }: TLabelArgs, posStr: string): number | undefined;
35
+ set_x({ id, ...args }: TLabelArgs, posStr: string): void;
36
+ set_y({ id, ...args }: TLabelArgs, posStr: string): void;
37
+ delete({ id }: TLabelArgs): void;
38
+ get_text({ id }: TLabelArgs, posStr: string): string | undefined;
39
+ set_xy({ id, ...args }: TLabelArgs, posStr: string): void;
40
+ set_size({ id, ...args }: TLabelArgs, posStr: string): void;
41
+ set_xloc({ id, ...args }: TLabelArgs, posStr: string): void;
42
+ set_yloc({ id, ...args }: TLabelArgs, posStr: string): void;
43
+ set_style({ id, ...args }: TLabelArgs, posStr: string): void;
44
+ set_color({ id, ...args }: TLabelArgs, posStr: string): void;
45
+ set_tooltip({ id, ...args }: TLabelArgs, posStr: string): void;
46
+ set_point({ id, ...args }: TLabelArgs, posStr: string): void;
47
+ set_text({ id, ...args }: TLabelArgs, posStr: string): void;
48
+ set_textcolor({ id, ...args }: TLabelArgs, posStr: string): void;
49
+ set_textalign({ id, ...args }: TLabelArgs, posStr: string): void;
50
+ set_text_font_family({ id, ...args }: TLabelArgs, posStr: string): void;
51
+ }
52
+ export declare class Label {
53
+ private _id;
54
+ private _variables;
55
+ constructor(key: string, variables: BuiltInVariables);
56
+ copy(posStr: string): Label;
57
+ get_x(posStr: string): number | undefined;
58
+ get_y(posStr: string): number | undefined;
59
+ set_x({ x }: PartialLabelArgs, posStr: string): void;
60
+ set_y({ y }: PartialLabelArgs, posStr: string): void;
61
+ delete(): void;
62
+ set_xy({ x, y }: PartialLabelArgs, posStr: string): void;
63
+ get_text(posStr: string): string | undefined;
64
+ set_size({ size }: PartialLabelArgs, posStr: string): void;
65
+ set_text({ text }: PartialLabelArgs, posStr: string): void;
66
+ set_xloc({ x, xloc }: PartialLabelArgs, posStr: string): void;
67
+ set_yloc({ yloc }: PartialLabelArgs, posStr: string): void;
68
+ set_color({ color }: PartialLabelArgs, posStr: string): void;
69
+ set_point({ point }: PartialLabelArgs, posStr: string): void;
70
+ set_style({ style }: PartialLabelArgs, posStr: string): void;
71
+ set_tooltip({ tooltip }: PartialLabelArgs, posStr: string): void;
72
+ set_textalign({ textalign }: PartialLabelArgs, posStr: string): void;
73
+ set_textcolor({ textcolor }: PartialLabelArgs, posStr: string): void;
74
+ set_text_font_family({ text_font_family }: PartialLabelArgs, posStr: string): void;
75
+ private _getLabel;
76
+ }
77
+ export {};
@@ -0,0 +1,81 @@
1
+ import { BuiltInVariables } from "../buildInVariables";
2
+ import { VExtend, VLineStyle, VXloc } from "../enum";
3
+ import { Point } from "./index";
4
+ export interface ILineArgs {
5
+ id?: string;
6
+ x?: number;
7
+ y?: number;
8
+ x1?: number;
9
+ y1?: number;
10
+ x2?: number;
11
+ y2?: number;
12
+ point?: Point;
13
+ first_point?: Point;
14
+ second_point?: Point;
15
+ xloc?: VXloc;
16
+ extend?: VExtend;
17
+ color?: string;
18
+ style?: VLineStyle;
19
+ width?: number;
20
+ linefills?: string[];
21
+ }
22
+ type LineArgs = Omit<ILineArgs, 'id'> & {
23
+ id: Line;
24
+ };
25
+ export default class BuildInLine {
26
+ private _variables;
27
+ private _defaultLine;
28
+ constructor(variables: BuiltInVariables);
29
+ new({ first_point, second_point, ...args }: ILineArgs, posStr: string): Line;
30
+ line(args: {
31
+ x?: Line;
32
+ }, posStr: string): Line;
33
+ copy({ id }: LineArgs, posStr: string): Line;
34
+ delete({ id }: LineArgs): void;
35
+ get_x1({ id }: LineArgs, posStr: string): number | undefined;
36
+ get_x2({ id }: LineArgs, posStr: string): number | undefined;
37
+ get_y1({ id }: LineArgs, posStr: string): number | undefined;
38
+ get_y2({ id }: LineArgs, posStr: string): number | undefined;
39
+ set_x1({ id, ...args }: LineArgs, posStr: string): void;
40
+ set_x2({ id, ...args }: LineArgs, posStr: string): void;
41
+ set_y1({ id, ...args }: LineArgs, posStr: string): void;
42
+ set_y2({ id, ...args }: LineArgs, posStr: string): void;
43
+ set_xy1({ id, ...args }: LineArgs, posStr: string): void;
44
+ set_xy2({ id, ...args }: LineArgs, posStr: string): void;
45
+ set_xloc({ id, ...args }: LineArgs, posStr: string): void;
46
+ get_price({ id, ...args }: LineArgs, posStr: string): number | undefined;
47
+ set_color({ id, ...args }: LineArgs, posStr: string): void;
48
+ set_style({ id, ...args }: LineArgs, posStr: string): void;
49
+ set_width({ id, ...args }: LineArgs, posStr: string): void;
50
+ set_extend({ id, ...args }: LineArgs, posStr: string): void;
51
+ set_first_point({ id, ...args }: LineArgs, posStr: string): void;
52
+ set_second_point({ id, ...args }: LineArgs, posStr: string): void;
53
+ }
54
+ export declare class Line {
55
+ private _variables;
56
+ private _id;
57
+ constructor(key: string, variables: BuiltInVariables);
58
+ get data(): ILineArgs | undefined;
59
+ copy(posStr: string): Line;
60
+ delete(): void;
61
+ get_price({ x }: ILineArgs, posStr: string): number | undefined;
62
+ get_x1(posStr: string): number | undefined;
63
+ get_x2(posStr: string): number | undefined;
64
+ get_y1(posStr: string): number | undefined;
65
+ get_y2(posStr: string): number | undefined;
66
+ set_x1({ x }: ILineArgs, posStr: string): void;
67
+ set_x2({ x }: ILineArgs, posStr: string): void;
68
+ set_y1({ y }: ILineArgs, posStr: string): void;
69
+ set_y2({ y }: ILineArgs, posStr: string): void;
70
+ set_xy1({ x, y }: ILineArgs, posStr: string): void;
71
+ set_xy2({ x, y }: ILineArgs, posStr: string): void;
72
+ set_xloc({ xloc, x1, x2 }: ILineArgs, posStr: string): void;
73
+ set_color({ color }: ILineArgs, posStr: string): void;
74
+ set_style({ style }: ILineArgs, posStr: string): void;
75
+ set_width({ width }: ILineArgs, posStr: string): void;
76
+ set_extend({ extend }: ILineArgs, posStr: string): void;
77
+ set_first_point({ point }: ILineArgs, posStr: string): void;
78
+ set_second_point({ point }: ILineArgs, posStr: string): void;
79
+ private _getLine;
80
+ }
81
+ export {};
@@ -0,0 +1,37 @@
1
+ import { BuiltInVariables } from "../buildInVariables";
2
+ import { Line, ILineArgs } from "./line";
3
+ interface ILinefillArgs {
4
+ id?: Linefill;
5
+ line1?: Line;
6
+ line2?: Line;
7
+ color?: string;
8
+ }
9
+ export type TLinefill = Omit<ILinefillArgs, 'line1' | 'line2' | 'id'> & {
10
+ id: string;
11
+ line1?: ILineArgs;
12
+ line2?: ILineArgs;
13
+ };
14
+ export default class BuildInLinefill {
15
+ private _variables;
16
+ constructor(variables: BuiltInVariables);
17
+ new({ line1, line2, color }: ILinefillArgs, posStr: string): Linefill;
18
+ delete({ id }: ILinefillArgs): void;
19
+ get_line1({ id }: ILinefillArgs): Line | undefined;
20
+ get_line2({ id }: ILinefillArgs): Line | undefined;
21
+ set_color({ id, ...args }: ILinefillArgs): void;
22
+ }
23
+ export declare class Linefill {
24
+ private _id;
25
+ private _line1?;
26
+ private _line2?;
27
+ private _variables;
28
+ constructor(variables: BuiltInVariables, key: string, line1?: Line, line2?: Line);
29
+ linefill(args: {
30
+ x?: Linefill;
31
+ }, posStr: string): Linefill;
32
+ delete(): void;
33
+ get_line1(): Line | undefined;
34
+ get_line2(): Line | undefined;
35
+ set_color({ color }: ILinefillArgs): void;
36
+ }
37
+ export {};
@@ -0,0 +1,31 @@
1
+ import { PseudoArray } from "./index";
2
+ import { BuiltInVariables } from "../buildInVariables";
3
+ import { VLineStyle, VXloc } from "../enum";
4
+ export interface IPolyline {
5
+ id?: string;
6
+ points?: PseudoArray;
7
+ curved?: boolean;
8
+ closed?: boolean;
9
+ xloc?: VXloc;
10
+ line_color?: string;
11
+ fill_color?: string;
12
+ line_style?: VLineStyle;
13
+ line_width?: number;
14
+ }
15
+ type TPolylineArgs = Omit<IPolyline, 'id'> & {
16
+ id: Polyline;
17
+ };
18
+ export default class BuildInPolyline {
19
+ private _variables;
20
+ private _defaultPolyline;
21
+ constructor(variables: BuiltInVariables);
22
+ new(args: IPolyline, posStr: string): Polyline;
23
+ delete({ id }: TPolylineArgs): void;
24
+ }
25
+ export declare class Polyline {
26
+ private _id;
27
+ private _variables;
28
+ constructor(key: string, variables: BuiltInVariables);
29
+ delete(): void;
30
+ }
31
+ export {};
@@ -59,9 +59,9 @@ export default class BuildInTa {
59
59
  cmo({ series, length }: ITaArgs, posStr: string): number | undefined;
60
60
  cog({ source, length }: ITaArgs, posStr: string): number | undefined;
61
61
  correlation({ source1, source2, length }: ITaArgs, posStr: string): number | undefined;
62
- cross({ source1, source2 }: ITaArgs, posStr: string): boolean | undefined;
63
- crossover({ source1, source2 }: ITaArgs, posStr: string): boolean | undefined;
64
- crossunder({ source1, source2 }: ITaArgs, posStr: string): boolean | undefined;
62
+ cross({ source1, source2 }: ITaArgs, posStr: string): boolean;
63
+ crossover({ source1, source2 }: ITaArgs, posStr: string): boolean;
64
+ crossunder({ source1, source2 }: ITaArgs, posStr: string): boolean;
65
65
  cum({ source }: ITaArgs, posStr: string): any;
66
66
  dev({ source, length }: ITaArgs, posStr: string): number | undefined;
67
67
  dmi({ diLength, adxSmoothing }: ITaArgs, posStr: string): (number | undefined)[];
@@ -109,6 +109,7 @@ export default class BuildInTa {
109
109
  valuewhen({ condition, source, occurrence }: ITaArgs, posStr: string): any;
110
110
  variance({ source, length, biased }: ITaArgs, posStr: string): number | undefined;
111
111
  vwap({ source, anchor, stdev_mult }: ITaArgs, posStr: string): number | (number | undefined)[] | undefined;
112
+ private _computeBands;
112
113
  vwma({ source, length }: ITaArgs, posStr: string): number | undefined;
113
114
  wpr({ length }: ITaArgs, posStr: string): number | undefined;
114
115
  private _sort;
@@ -0,0 +1,94 @@
1
+ import { BuiltInVariables } from "../buildInVariables";
2
+ import { VPosition, VSize, VText } from "../enum";
3
+ export interface ITableArgs {
4
+ id?: string;
5
+ table_id?: Table;
6
+ position?: VPosition;
7
+ columns?: number;
8
+ rows?: number;
9
+ bgcolor?: string;
10
+ frame_color?: string;
11
+ frame_width?: number;
12
+ border_color?: string;
13
+ border_width?: number;
14
+ cell?: (ITableCellArgs | undefined)[][];
15
+ start_column?: number;
16
+ start_row?: number;
17
+ end_column?: number;
18
+ end_row?: number;
19
+ }
20
+ interface ITableCellArgs {
21
+ table_id?: Table;
22
+ column?: number;
23
+ row?: number;
24
+ text?: string;
25
+ width?: number;
26
+ height?: number;
27
+ text_color?: string;
28
+ text_halign?: VText;
29
+ text_valign?: VText;
30
+ text_size?: VSize;
31
+ bgcolor?: string;
32
+ tooltip?: string;
33
+ text_font_family?: string;
34
+ isMerge?: boolean;
35
+ merge_columns?: number;
36
+ merge_rows?: number;
37
+ }
38
+ export default class BuildInTable {
39
+ private _variables;
40
+ private _defaultTable;
41
+ constructor(variables: BuiltInVariables);
42
+ table({ x }: {
43
+ x?: Table;
44
+ }, posStr: string): Table;
45
+ new(args: ITableArgs, posStr: string): Table;
46
+ cell({ table_id, ...args }: ITableCellArgs): void;
47
+ cell_set_bgcolor({ table_id, ...args }: ITableCellArgs): void;
48
+ cell_set_height({ table_id, ...args }: ITableCellArgs): void;
49
+ cell_set_text({ table_id, ...args }: ITableCellArgs): void;
50
+ cell_set_text_color({ table_id, ...args }: ITableCellArgs): void;
51
+ cell_set_text_font_family({ table_id, ...args }: ITableCellArgs): void;
52
+ cell_set_text_halign({ table_id, ...args }: ITableCellArgs): void;
53
+ cell_set_text_valign({ table_id, ...args }: ITableCellArgs): void;
54
+ cell_set_text_size({ table_id, ...args }: ITableCellArgs): void;
55
+ cell_set_tooltip({ table_id, ...args }: ITableCellArgs): void;
56
+ cell_set_width({ table_id, ...args }: ITableCellArgs): void;
57
+ clear({ table_id, ...args }: ITableArgs): void;
58
+ delete({ table_id }: ITableArgs): void;
59
+ merge_cells({ table_id, ...args }: ITableArgs, posStr: string): void;
60
+ set_bgcolor({ table_id, ...args }: ITableArgs): void;
61
+ set_border_color({ table_id, ...args }: ITableArgs): void;
62
+ set_border_width({ table_id, ...args }: ITableArgs): void;
63
+ set_frame_color({ table_id, ...args }: ITableArgs): void;
64
+ set_frame_width({ table_id, ...args }: ITableArgs): void;
65
+ set_position({ table_id, ...args }: ITableArgs): void;
66
+ }
67
+ export declare class Table {
68
+ private _id;
69
+ private _variables;
70
+ private _defaultCell;
71
+ constructor(variables: BuiltInVariables, key: string);
72
+ cell(args: ITableCellArgs): void;
73
+ cell_set_bgcolor({ column, row, bgcolor }: ITableCellArgs): void;
74
+ cell_set_height({ column, row, height }: ITableCellArgs): void;
75
+ cell_set_text({ column, row, text }: ITableCellArgs): void;
76
+ cell_set_text_color({ column, row, text_color }: ITableCellArgs): void;
77
+ cell_set_text_font_family({ column, row, text_font_family }: ITableCellArgs): void;
78
+ cell_set_text_halign({ column, row, text_halign }: ITableCellArgs): void;
79
+ cell_set_text_valign({ column, row, text_valign }: ITableCellArgs): void;
80
+ cell_set_text_size({ column, row, text_size }: ITableCellArgs): void;
81
+ cell_set_tooltip({ column, row, tooltip }: ITableCellArgs): void;
82
+ cell_set_width({ column, row, width }: ITableCellArgs): void;
83
+ clear({ start_column, start_row, end_column, end_row }: ITableArgs): void;
84
+ delete(): void;
85
+ merge_cells({ start_column, start_row, end_column, end_row }: ITableArgs, posStr: string): void;
86
+ set_bgcolor({ bgcolor }: ITableArgs): void;
87
+ set_border_color({ border_color }: ITableArgs): void;
88
+ set_border_width({ border_width }: ITableArgs): void;
89
+ set_frame_color({ frame_color }: ITableArgs): void;
90
+ set_frame_width({ frame_width }: ITableArgs): void;
91
+ set_position({ position }: ITableArgs): void;
92
+ private _getTableItem;
93
+ }
94
+ export {};
@@ -39,6 +39,9 @@ export declare const ERRORS_TIPS: {
39
39
  declaredErr: string;
40
40
  globalFuncErr: string;
41
41
  onlyStatementErr: string;
42
+ modifyGlobalVarErr: string;
43
+ inputDefvalErr: string;
44
+ objectIsNaErr: string;
42
45
  };
43
46
  export declare const WARNING_TIPS: {
44
47
  repeatVar: string;
@@ -24,4 +24,5 @@ export interface IError extends IBase {
24
24
  message: string;
25
25
  type?: VMarkerSeverity;
26
26
  }
27
+ export type WithRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
27
28
  export {};
@@ -45,6 +45,7 @@ export default class ParserVisitor extends ParserUtils {
45
45
  type: string;
46
46
  value: IKeyObjectValue;
47
47
  } | null;
48
+ private _verifyGloablVar;
48
49
  visitVarModifier: (ctx: IKeyObjectValue) => any;
49
50
  visitExpressionSequence: (ctx: IKeyObjectValue) => IKeyObjectValue[];
50
51
  visitExpressionBlockSequence: (ctx: IKeyObjectValue) => IKeyObjectValue[];
@@ -195,6 +196,7 @@ export default class ParserVisitor extends ParserUtils {
195
196
  private _againAssignHandle;
196
197
  private _typeCheck;
197
198
  private _verifyName;
199
+ private _judgeGatherValue;
198
200
  private _nameCheck;
199
201
  private _inBlock;
200
202
  private _errorHandle;
@@ -48,6 +48,7 @@ export interface IDocValue {
48
48
  isForVar?: boolean;
49
49
  hasMemberIndex?: boolean;
50
50
  declare?: string;
51
+ valueType?: string;
51
52
  }
52
53
  export interface IDetailedDesc {
53
54
  desc: string[];
@@ -60,6 +61,7 @@ export interface IField {
60
61
  originName?: string;
61
62
  isArg?: boolean;
62
63
  isVarip?: boolean;
64
+ valueType?: string;
63
65
  }
64
66
  export interface IArg {
65
67
  name: string;