@guihz/trading-vue-editor-tes 0.0.283 → 0.0.285

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.
Files changed (34) hide show
  1. package/lib/assets/{parserTccWorker-cw8rxksS.js → parserTccWorker-COjudqMh.js} +90 -91
  2. package/lib/assets/{scriptsRunWorker-BlzKPqZx.js → scriptsRunWorker-B3YGZcpj.js} +42 -42
  3. package/lib/components/editor/parseScript/buildInConstants.d.ts +2 -0
  4. package/lib/components/editor/parseScript/buildInFuncNamespace/array.d.ts +32 -79
  5. package/lib/components/editor/parseScript/buildInFuncNamespace/box.d.ts +33 -27
  6. package/lib/components/editor/parseScript/buildInFuncNamespace/chartPoint.d.ts +11 -2
  7. package/lib/components/editor/parseScript/buildInFuncNamespace/index.d.ts +6 -6
  8. package/lib/components/editor/parseScript/buildInFuncNamespace/input.d.ts +5 -0
  9. package/lib/components/editor/parseScript/buildInFuncNamespace/label.d.ts +21 -17
  10. package/lib/components/editor/parseScript/buildInFuncNamespace/line.d.ts +27 -18
  11. package/lib/components/editor/parseScript/buildInFuncNamespace/linefill.d.ts +16 -7
  12. package/lib/components/editor/parseScript/buildInFuncNamespace/log.d.ts +4 -4
  13. package/lib/components/editor/parseScript/buildInFuncNamespace/map.d.ts +38 -29
  14. package/lib/components/editor/parseScript/buildInFuncNamespace/math.d.ts +19 -19
  15. package/lib/components/editor/parseScript/buildInFuncNamespace/matrix.d.ts +32 -82
  16. package/lib/components/editor/parseScript/buildInFuncNamespace/polyline.d.ts +6 -3
  17. package/lib/components/editor/parseScript/buildInFuncNamespace/request.d.ts +2 -1
  18. package/lib/components/editor/parseScript/buildInFuncNamespace/strategy.d.ts +3 -0
  19. package/lib/components/editor/parseScript/buildInFuncNamespace/string.d.ts +2 -2
  20. package/lib/components/editor/parseScript/buildInFuncNamespace/ta.d.ts +4 -2
  21. package/lib/components/editor/parseScript/buildInFuncNamespace/table.d.ts +29 -21
  22. package/lib/components/editor/parseScript/buildInFuncNamespace/timeframe.d.ts +3 -0
  23. package/lib/components/editor/parseScript/buildInVarNamespace/ta.d.ts +2 -0
  24. package/lib/components/editor/parseScript/enum.d.ts +13 -0
  25. package/lib/components/editor/parseScript/parseToJs.d.ts +0 -2
  26. package/lib/components/editor/parseScript/type.d.ts +10 -0
  27. package/lib/components/editor/parseScript/userTypeClass.d.ts +4 -3
  28. package/lib/components/editor/parseScript/utils.d.ts +2 -1
  29. package/lib/components/editor/parseScript/visitorParser.d.ts +2 -0
  30. package/lib/components/editor/type/index.d.ts +2 -0
  31. package/lib/trading-vue-editor.es.packages.js +963 -959
  32. package/lib/trading-vue-editor.umd.packages.mjs +21 -21
  33. package/package.json +1 -1
  34. package/lib/components/editor/parseScript/buildInFunction.d.ts +0 -235
@@ -1,42 +1,51 @@
1
- import { TccErrorListener } from ".";
2
- import { PseudoArray } from "./array";
1
+ import { IKeyObjectValue } from "../../type";
2
+ import { VInsType } from "../enum";
3
3
  interface IMapArgs {
4
- id?: PseudoMap;
4
+ id?: IPseudoMap;
5
5
  key?: any;
6
6
  value?: any;
7
- id2?: PseudoMap;
7
+ id2?: IPseudoMap;
8
8
  }
9
9
  export default class BuildInMap {
10
- private _errorListener;
11
- constructor(errorListener: TccErrorListener);
12
- new(): PseudoMap;
13
- copy({ id }: IMapArgs): PseudoMap | undefined;
10
+ constructor();
11
+ new({ type }: {
12
+ type: string;
13
+ }): {
14
+ isMap: boolean;
15
+ keyTypeName: string;
16
+ typeName: string;
17
+ _value: any;
18
+ type: VInsType;
19
+ };
20
+ copy({ id }: IMapArgs): {
21
+ isMap: boolean;
22
+ keyTypeName: string;
23
+ typeName: string;
24
+ _value: any;
25
+ type: VInsType;
26
+ } | undefined;
14
27
  get({ id, key }: IMapArgs): any;
15
- put({ id, key, value }: IMapArgs): Map<any, any> | undefined;
16
- keys({ id }: IMapArgs): PseudoArray | undefined;
28
+ put({ id, key, value }: IMapArgs): any;
29
+ keys({ id }: IMapArgs): import("./array").IPseudoArray | undefined;
17
30
  size({ id }: IMapArgs): number | undefined;
18
31
  clear({ id }: IMapArgs): void;
19
32
  remove({ id, key }: IMapArgs): any;
20
- values({ id }: IMapArgs): PseudoArray | undefined;
21
- put_all({ id, id2 }: IMapArgs): void;
33
+ values({ id }: IMapArgs): import("./array").IPseudoArray | undefined;
34
+ put_all({ id, id2 }: IMapArgs): IPseudoMap | undefined;
22
35
  contains({ id, key }: IMapArgs): boolean | undefined;
23
36
  }
24
- declare class PseudoMap {
25
- private _errorListener;
26
- private _mapInstance;
27
- constructor(errorListener: TccErrorListener);
28
- get isMap(): boolean;
29
- get _value(): Map<any, any>;
30
- private _copyMap;
31
- copy(): PseudoMap;
32
- get({ key }: IMapArgs): any;
33
- put({ key, value }: IMapArgs): Map<any, any>;
34
- keys(): PseudoArray;
35
- size(): number;
36
- clear(): void;
37
- remove({ key }: IMapArgs): any;
38
- values(): PseudoArray;
39
- put_all({ id2 }: IMapArgs): void;
40
- contains({ key }: IMapArgs): boolean;
37
+ interface IPseudoMap {
38
+ isMap: boolean;
39
+ keyTypeName: string;
40
+ typeName: string;
41
+ _value: IKeyObjectValue;
42
+ type: VInsType.MAP;
41
43
  }
44
+ export declare function createMap(types: string[]): {
45
+ isMap: boolean;
46
+ keyTypeName: string;
47
+ typeName: string;
48
+ _value: any;
49
+ type: VInsType;
50
+ };
42
51
  export {};
@@ -19,29 +19,29 @@ export default class BuildInMath {
19
19
  private _barIndex;
20
20
  constructor(mintick: number);
21
21
  update(barIndex: number): void;
22
- abs({ number }: IMathArgs): number | undefined;
23
- acos({ angle }: IMathArgs): number | undefined;
24
- asin({ angle }: IMathArgs): number | undefined;
25
- atan({ angle }: IMathArgs): number | undefined;
26
- avg(_: IMathArgs, numbers: number[]): number | undefined;
27
- ceil({ number }: IMathArgs): number | undefined;
28
- floor({ number }: IMathArgs): number | undefined;
29
- cos({ angle }: IMathArgs): number | undefined;
30
- sin({ angle }: IMathArgs): number | undefined;
31
- tan({ angle }: IMathArgs): number | undefined;
32
- exp({ number }: IMathArgs): number | undefined;
33
- log({ number }: IMathArgs): number | undefined;
34
- log10({ number }: IMathArgs): number | undefined;
22
+ abs({ number }: IMathArgs): number;
23
+ acos({ angle }: IMathArgs): number;
24
+ asin({ angle }: IMathArgs): number;
25
+ atan({ angle }: IMathArgs): number;
26
+ avg(_: IMathArgs, numbers: number[]): number;
27
+ ceil({ number }: IMathArgs): number;
28
+ floor({ number }: IMathArgs): number;
29
+ cos({ angle }: IMathArgs): number;
30
+ sin({ angle }: IMathArgs): number;
31
+ tan({ angle }: IMathArgs): number;
32
+ exp({ number }: IMathArgs): number;
33
+ log({ number }: IMathArgs): number;
34
+ log10({ number }: IMathArgs): number;
35
35
  max(_: IMathArgs, numbers: number[]): number | undefined;
36
36
  min(_: IMathArgs, numbers: number[]): number | undefined;
37
- pow({ base, exponent }: IMathArgs): number | undefined;
37
+ pow({ base, exponent }: IMathArgs): number;
38
38
  random({ min, max, seed }: IMathArgs): string | number;
39
- round({ number, precision }: IMathArgs): number | undefined;
40
- round_to_mintick({ number }: IMathArgs): number | undefined;
39
+ round({ number, precision }: IMathArgs): number;
40
+ round_to_mintick({ number }: IMathArgs): number;
41
41
  sign({ number }: IMathArgs): number | undefined;
42
- sqrt({ number }: IMathArgs): number | undefined;
42
+ sqrt({ number }: IMathArgs): number;
43
43
  sum({ source, length }: IMathArgs, posStr: string): number | undefined;
44
- todegrees({ radians }: IMathArgs): number | undefined;
45
- toradians({ degrees }: IMathArgs): number | undefined;
44
+ todegrees({ radians }: IMathArgs): number;
45
+ toradians({ degrees }: IMathArgs): number;
46
46
  }
47
47
  export {};
@@ -1,11 +1,11 @@
1
- import { VSortOrder } from "../enum";
2
- import { PseudoArray } from "./array";
1
+ import { VInsType, VSortOrder } from "../enum";
2
+ import { IPseudoArray } from "./array";
3
3
  import { TccErrorListener } from '.';
4
4
  interface IMatrixArgs {
5
5
  rows?: number;
6
6
  columns?: number;
7
7
  initial_value?: any;
8
- id?: Matrix;
8
+ id?: IMatrix;
9
9
  column?: number;
10
10
  row?: number;
11
11
  power?: number;
@@ -17,7 +17,7 @@ interface IMatrixArgs {
17
17
  from_column?: number;
18
18
  to_column?: number;
19
19
  order?: VSortOrder;
20
- array_id?: PseudoArray;
20
+ array_id?: IPseudoArray;
21
21
  row1?: number;
22
22
  row2?: number;
23
23
  column1?: number;
@@ -26,28 +26,29 @@ interface IMatrixArgs {
26
26
  }
27
27
  export default class BuildInMatrix {
28
28
  private _errorListener;
29
+ private _array;
29
30
  constructor(errorListener: TccErrorListener);
30
- new({ rows, columns, initial_value, type }?: IMatrixArgs): Matrix;
31
+ new({ rows, columns, initial_value, type }?: IMatrixArgs): IMatrix;
31
32
  avg({ id }: IMatrixArgs): number | undefined;
32
- col({ id, column }: IMatrixArgs): PseudoArray | undefined;
33
+ col({ id, column }: IMatrixArgs): IPseudoArray | undefined;
33
34
  det({ id }: IMatrixArgs): number | undefined;
34
35
  get({ id, row, column }: IMatrixArgs): any;
35
- inv({ id }: IMatrixArgs): Matrix | undefined;
36
+ inv({ id }: IMatrixArgs): IMatrix | undefined;
36
37
  max({ id }: IMatrixArgs): any;
37
38
  min({ id }: IMatrixArgs): any;
38
- pow({ id, power }: IMatrixArgs): Matrix | undefined;
39
- row({ id, row }: IMatrixArgs): PseudoArray | undefined;
39
+ pow({ id, power }: IMatrixArgs): IMatrix | undefined;
40
+ row({ id, row }: IMatrixArgs): IPseudoArray | undefined;
40
41
  set({ id, row, column, value }: IMatrixArgs): void;
41
- sum({ id1, id2 }: IMatrixArgs): any;
42
- copy({ id }: IMatrixArgs): Matrix | undefined;
43
- diff({ id1, id2 }: IMatrixArgs): any;
42
+ sum({ id1, id2 }: IMatrixArgs): IMatrix | undefined;
43
+ copy({ id }: IMatrixArgs): IMatrix | undefined;
44
+ diff({ id1, id2 }: IMatrixArgs): IMatrix | undefined;
44
45
  rows({ id }: IMatrixArgs): number | undefined;
45
46
  columns({ id }: IMatrixArgs): number | undefined;
46
47
  fill({ id, value, from_row, to_row, from_column, to_column }: IMatrixArgs): void;
47
- kron({ id1, id2 }: IMatrixArgs): any;
48
+ kron({ id1, id2 }: IMatrixArgs): IMatrix | undefined;
48
49
  mode({ id }: IMatrixArgs): any;
49
- mult({ id1, id2 }: IMatrixArgs): any;
50
- pinv({ id }: IMatrixArgs): Matrix | undefined;
50
+ mult({ id1, id2 }: IMatrixArgs): IPseudoArray | IMatrix | undefined;
51
+ pinv({ id }: IMatrixArgs): IMatrix | undefined;
51
52
  rank({ id }: IMatrixArgs): number | undefined;
52
53
  sort({ id, column, order }: IMatrixArgs): void;
53
54
  trace({ id }: IMatrixArgs): number | undefined;
@@ -56,19 +57,19 @@ export default class BuildInMatrix {
56
57
  add_col({ id, column, array_id }: IMatrixArgs): void;
57
58
  add_row({ id, row, array_id }: IMatrixArgs): void;
58
59
  is_zero({ id }: IMatrixArgs): boolean | undefined;
59
- reshape({ id, rows, columns }: IMatrixArgs, posStr: string): void | undefined;
60
+ reshape({ id, rows, columns }: IMatrixArgs, posStr: string): void;
60
61
  reverse({ id }: IMatrixArgs): void;
61
62
  is_binary({ id }: IMatrixArgs): boolean | undefined;
62
63
  is_square({ id }: IMatrixArgs): boolean | undefined;
63
- submatrix({ id, from_row, to_row, from_column, to_column }: IMatrixArgs): Matrix | undefined;
64
+ submatrix({ id, from_row, to_row, from_column, to_column }: IMatrixArgs): IMatrix | undefined;
64
65
  swap_rows({ id, row1, row2 }: IMatrixArgs): void;
65
- transpose({ id }: IMatrixArgs): Matrix | undefined;
66
- remove_col({ id, column }: IMatrixArgs): PseudoArray | undefined;
67
- remove_row({ id, row }: IMatrixArgs): PseudoArray | undefined;
68
- eigenvalues({ id }: IMatrixArgs): PseudoArray | undefined;
66
+ transpose({ id }: IMatrixArgs): IMatrix | undefined;
67
+ remove_col({ id, column }: IMatrixArgs): IPseudoArray | undefined;
68
+ remove_row({ id, row }: IMatrixArgs): IPseudoArray | undefined;
69
+ eigenvalues({ id }: IMatrixArgs): IPseudoArray | undefined;
69
70
  is_diagonal({ id }: IMatrixArgs): boolean | undefined;
70
71
  is_identity({ id }: IMatrixArgs): boolean | undefined;
71
- eigenvectors({ id }: IMatrixArgs): Matrix | undefined;
72
+ eigenvectors({ id }: IMatrixArgs): IMatrix | undefined;
72
73
  is_symmetric({ id }: IMatrixArgs): boolean | undefined;
73
74
  swap_columns({ id, column1, column2 }: IMatrixArgs): void;
74
75
  is_stochastic({ id }: IMatrixArgs): boolean | undefined;
@@ -76,69 +77,18 @@ export default class BuildInMatrix {
76
77
  elements_count({ id }: IMatrixArgs): number | undefined;
77
78
  is_antidiagonal({ id }: IMatrixArgs): boolean | undefined;
78
79
  is_antisymmetric({ id }: IMatrixArgs): boolean | undefined;
79
- }
80
- declare class Matrix {
81
- private _matrixInstance;
82
- private _errorListener;
83
- private _isNumber?;
84
- private _thisType?;
85
- constructor(rows: number | undefined, columns: number | undefined, initial_value: any, errorListener: TccErrorListener, type?: string);
86
- get _matrixArray(): any[][];
87
- get _value(): PseudoArray[];
88
- set _value(matrix: PseudoArray[]);
89
- get isMatrix(): boolean;
90
- private _createMatrix;
91
- avg(): number;
92
- col({ column }: IMatrixArgs): PseudoArray;
93
- det(): number;
94
- get({ row, column }: IMatrixArgs): any;
95
- inv(): Matrix;
96
- max(): any;
97
- min(): any;
98
- pow({ power }: IMatrixArgs): Matrix;
99
- row({ row }: IMatrixArgs): PseudoArray;
100
- set({ row, column, value }: IMatrixArgs): void;
101
- sum({ id2 }: IMatrixArgs): Matrix;
102
- copy(): Matrix;
103
- diff({ id2 }: IMatrixArgs): Matrix;
104
- rows(): number;
105
- columns(): number;
106
- fill({ value, from_row, to_row, from_column, to_column }?: IMatrixArgs): void;
107
- kron({ id2 }: IMatrixArgs): Matrix;
108
- mode(): any;
109
- mult({ id2 }: IMatrixArgs): PseudoArray | Matrix;
110
- pinv(): Matrix;
111
- rank(): number;
112
- sort({ column, order }?: IMatrixArgs): void;
113
- trace(): number;
114
- concat({ id2 }: IMatrixArgs): this;
115
- median(): any;
116
- add_col({ column, array_id }?: IMatrixArgs): void;
117
- add_row({ row, array_id }: IMatrixArgs): void;
118
- is_zero(): boolean;
119
- reshape({ rows, columns }: IMatrixArgs, posStr: string): void;
120
- reverse(): void;
121
- is_binary(): boolean;
122
- is_square(): boolean;
123
- submatrix({ from_row, to_row, from_column, to_column }?: IMatrixArgs): Matrix;
124
- swap_rows({ row1, row2 }: IMatrixArgs): void;
125
- transpose(): Matrix;
126
- remove_col({ column }?: IMatrixArgs): PseudoArray;
127
- remove_row({ row }?: IMatrixArgs): PseudoArray;
128
- eigenvalues(): PseudoArray;
129
- is_diagonal(): boolean;
130
- is_identity(): boolean;
131
- eigenvectors(): Matrix;
132
- is_symmetric(): boolean;
133
- swap_columns({ column1, column2 }: IMatrixArgs): void;
134
- is_stochastic(): boolean;
135
- is_triangular(): boolean;
136
- elements_count(): number;
137
- is_antidiagonal(): boolean;
138
- is_antisymmetric(): boolean;
139
80
  private _isUpperTriangular;
140
81
  private _isLowerTriangular;
141
82
  private _newMatrix;
142
83
  private _matrixRank;
84
+ private _getMatrixArray;
85
+ }
86
+ interface IMatrix {
87
+ isMatrix: boolean;
88
+ typeName?: string;
89
+ type: VInsType;
90
+ _isNumber: boolean;
91
+ _value: IPseudoArray[];
92
+ _matrixArray: any[][];
143
93
  }
144
94
  export {};
@@ -1,10 +1,11 @@
1
- import { PseudoArray, TccErrorListener } from "./index";
1
+ import { TccErrorListener } from "./index";
2
2
  import { BuiltInVariables } from "../buildInVariables";
3
3
  import { VLineStyle, VType, VXloc } from "../enum";
4
+ import { IDrawComponent } from "../type";
4
5
  import { IKeyObjectValue } from "../../type";
5
6
  export interface IPolyline {
6
7
  id?: string;
7
- points?: PseudoArray;
8
+ points?: IKeyObjectValue;
8
9
  curved?: boolean;
9
10
  closed?: boolean;
10
11
  xloc?: VXloc;
@@ -21,11 +22,13 @@ export default class BuildInPolyline {
21
22
  private _errorListener;
22
23
  private _defaultPolyline;
23
24
  constructor(variables: BuiltInVariables, errorListener: TccErrorListener);
24
- new(args: IPolyline, posStr: string): Polyline;
25
+ new(args: IPolyline, posStr: string): IDrawComponent;
25
26
  private _verfiyArgs;
26
27
  private _paramVerfiy;
28
+ updateId(id: IDrawComponent): string;
27
29
  delete({ id }: TPolylineArgs): void;
28
30
  }
31
+ export declare function createPolyline(key: string, data: IKeyObjectValue): IDrawComponent;
29
32
  export declare class Polyline {
30
33
  private _id;
31
34
  private _variables;
@@ -22,11 +22,12 @@ export default class Request {
22
22
  private _funcs;
23
23
  private _errorListener;
24
24
  constructor(variables: BuiltInVariables, id: string, funcs: BuildInFunctions, errorListener: TccErrorListener);
25
+ get _requestCacheData(): IKeyObjectValue;
26
+ set _requestCacheData(val: IKeyObjectValue);
25
27
  security(args: IRequestArgs, posStr: string): any;
26
28
  security_lower_tf(args: IRequestArgs, posStr: string): any;
27
29
  private _symbolTransform;
28
30
  private _runScriptHandle;
29
- private _getCurrentData;
30
31
  private _parseExprCode;
31
32
  private _getRequestLowerTfData;
32
33
  private _getRequestData;
@@ -152,6 +152,8 @@ export default class Strategy {
152
152
  private _maxDrawdownVerifyIndex;
153
153
  calcOnOrderFillsData: IFillsData;
154
154
  constructor(variables: BuiltInVariables, options: IKeyObjectValue, mintick: number, errorListener: TccErrorListener, id: string);
155
+ get _strategyCacheData(): IKeyObjectValue;
156
+ set _strategyCacheData(val: IKeyObjectValue);
155
157
  get orders(): IOrder[];
156
158
  get historyOrders(): IOrder[];
157
159
  get _freezeCapital(): number;
@@ -219,6 +221,7 @@ export default class Strategy {
219
221
  private _pendingOrderHandle;
220
222
  private _pendingOrderSort;
221
223
  private _pendingCloseOrderHandle;
224
+ private _onCloseOrderHandle;
222
225
  private _entryOrderHandle;
223
226
  private _orderOrderHandle;
224
227
  private _getCloseOrders;
@@ -1,5 +1,4 @@
1
1
  import { TccErrorListener } from ".";
2
- import { PseudoArray } from "./array";
3
2
  interface IStrArgs {
4
3
  source?: string;
5
4
  str?: string;
@@ -28,7 +27,7 @@ export default class BuildInStr {
28
27
  trim({ source }: IStrArgs): string;
29
28
  lower({ source }: IStrArgs): string;
30
29
  match({ source, regex }: IStrArgs): string;
31
- split({ string, separator }: IStrArgs): PseudoArray;
30
+ split({ string, separator }: IStrArgs): import("./array").IPseudoArray;
32
31
  upper({ source }: IStrArgs): string;
33
32
  format({ formatString }: IStrArgs, args: any[]): string;
34
33
  length({ string }: IStrArgs): number;
@@ -44,6 +43,7 @@ export default class BuildInStr {
44
43
  format_time({ time, format, timezone }: IStrArgs): string;
45
44
  replace_all({ source, target, replacement }: IStrArgs): string;
46
45
  private _toStringFormat;
46
+ private _numberDef;
47
47
  private _formatOthers;
48
48
  private _formatNumber;
49
49
  strformat({ formatString }: IStrArgs, args: any[], isFormat?: boolean): string;
@@ -1,5 +1,5 @@
1
+ import { IKeyObjectValue } from "../../type";
1
2
  import { BuiltInVariables } from "../buildInVariables";
2
- import { PseudoArray } from './array';
3
3
  import BuildInTimeframe from "./timeframe";
4
4
  import BuildInMath from "./math";
5
5
  interface ITaArgs {
@@ -46,6 +46,8 @@ export default class BuildInTa {
46
46
  private _math;
47
47
  private _timeframe;
48
48
  constructor(variables: BuiltInVariables, math: BuildInMath, timeframe: BuildInTimeframe);
49
+ get _taCacheData(): IKeyObjectValue;
50
+ set _taCacheData(data: IKeyObjectValue);
49
51
  alma({ series, length, offset, sigma, floor, isSeriesLen }: ITaArgs, posStr: string): number | undefined;
50
52
  sma({ source, length, isSeriesLen }: ITaArgs, posStr: string): number | undefined;
51
53
  rma({ source, length, isSeriesLen }: ITaArgs, posStr: string): any;
@@ -88,7 +90,7 @@ export default class BuildInTa {
88
90
  percentile_linear_interpolation({ source, length, percentage, isSeriesLen }: ITaArgs, posStr: string): number | undefined;
89
91
  percentile_nearest_rank({ source, length, percentage, isSeriesLen }: ITaArgs, posStr: string): number | undefined;
90
92
  percentrank({ source, length, isSeriesLen }: ITaArgs, posStr: string): number | undefined;
91
- pivot_point_levels({ type, anchor, developing }: ITaArgs, posStr: string): PseudoArray;
93
+ pivot_point_levels({ type, anchor, developing }: ITaArgs, posStr: string): import("./array").IPseudoArray;
92
94
  private _getPivotPointLevels;
93
95
  private _traditional;
94
96
  private _fibonacci;
@@ -1,10 +1,11 @@
1
1
  import { IKeyObjectValue } from "../../type";
2
2
  import { BuiltInVariables } from "../buildInVariables";
3
3
  import { VPosition, VSize, VText, VType } from "../enum";
4
+ import { IDrawComponent } from "../type";
4
5
  import { TccErrorListener } from "./errorListener";
5
6
  export interface ITableArgs {
6
7
  id?: string;
7
- table_id?: Table;
8
+ table_id?: IDrawComponent;
8
9
  position?: VPosition;
9
10
  columns?: number;
10
11
  rows?: number;
@@ -27,7 +28,7 @@ interface IMergeCell {
27
28
  end_row?: number;
28
29
  }
29
30
  interface ITableCellArgs {
30
- table_id?: Table;
31
+ table_id?: IDrawComponent;
31
32
  column?: number;
32
33
  row?: number;
33
34
  text?: string;
@@ -47,34 +48,41 @@ interface ITableCellArgs {
47
48
  export default class BuildInTable {
48
49
  private _variables;
49
50
  private _errorListener;
51
+ private _defaultCell;
50
52
  private _defaultTable;
51
53
  constructor(variables: BuiltInVariables, errorListener: TccErrorListener);
52
54
  table({ x }: {
53
55
  x?: Table;
54
56
  }): Table | undefined;
55
- new(args: ITableArgs, posStr: string): Table;
57
+ new(args: ITableArgs, posStr: string): IDrawComponent;
56
58
  private _paramVerfiy;
59
+ updateId(id: IDrawComponent): string;
57
60
  cell({ table_id, ...args }: ITableCellArgs, posStr: string): void;
58
- cell_set_bgcolor({ table_id, ...args }: ITableCellArgs, posStr: string): void;
59
- cell_set_height({ table_id, ...args }: ITableCellArgs, posStr: string): void;
60
- cell_set_text({ table_id, ...args }: ITableCellArgs, posStr: string): void;
61
- cell_set_text_color({ table_id, ...args }: ITableCellArgs, posStr: string): void;
62
- cell_set_text_font_family({ table_id, ...args }: ITableCellArgs, posStr: string): void;
63
- cell_set_text_halign({ table_id, ...args }: ITableCellArgs, posStr: string): void;
64
- cell_set_text_valign({ table_id, ...args }: ITableCellArgs, posStr: string): void;
65
- cell_set_text_size({ table_id, ...args }: ITableCellArgs, posStr: string): void;
66
- cell_set_tooltip({ table_id, ...args }: ITableCellArgs, posStr: string): void;
67
- cell_set_width({ table_id, ...args }: ITableCellArgs, posStr: string): void;
68
- clear({ table_id, ...args }: ITableArgs, posStr: string): void;
61
+ cell_set_bgcolor({ table_id, column, row, bgcolor }: ITableCellArgs, posStr: string): void;
62
+ cell_set_height({ table_id, column, row, height }: ITableCellArgs, posStr: string): void;
63
+ cell_set_text({ table_id, column, row, text }: ITableCellArgs, posStr: string): void;
64
+ cell_set_text_color({ table_id, column, row, text_color }: ITableCellArgs, posStr: string): void;
65
+ cell_set_text_font_family({ table_id, column, row, text_font_family }: ITableCellArgs, posStr: string): void;
66
+ cell_set_text_halign({ table_id, column, row, text_halign }: ITableCellArgs, posStr: string): void;
67
+ cell_set_text_valign({ table_id, column, row, text_valign }: ITableCellArgs, posStr: string): void;
68
+ cell_set_text_size({ table_id, column, row, text_size }: ITableCellArgs, posStr: string): void;
69
+ cell_set_tooltip({ table_id, column, row, tooltip }: ITableCellArgs, posStr: string): void;
70
+ cell_set_width({ table_id, column, row, width }: ITableCellArgs, posStr: string): void;
71
+ clear({ table_id, start_column, start_row, end_column, end_row }: ITableArgs, posStr: string): void;
69
72
  delete({ table_id }: ITableArgs, posStr: string): void;
70
- merge_cells({ table_id, ...args }: ITableArgs, posStr: string): void;
71
- set_bgcolor({ table_id, ...args }: ITableArgs, posStr: string): void;
72
- set_border_color({ table_id, ...args }: ITableArgs, posStr: string): void;
73
- set_border_width({ table_id, ...args }: ITableArgs, posStr: string): void;
74
- set_frame_color({ table_id, ...args }: ITableArgs, posStr: string): void;
75
- set_frame_width({ table_id, ...args }: ITableArgs, posStr: string): void;
76
- set_position({ table_id, ...args }: ITableArgs, posStr: string): void;
73
+ merge_cells({ table_id, start_column, start_row, end_column, end_row }: ITableArgs, posStr: string): void;
74
+ set_bgcolor({ table_id, bgcolor }: ITableArgs, posStr: string): void;
75
+ set_border_color({ table_id, border_color }: ITableArgs, posStr: string): void;
76
+ set_border_width({ table_id, border_width }: ITableArgs, posStr: string): void;
77
+ set_frame_color({ table_id, frame_color }: ITableArgs, posStr: string): void;
78
+ set_frame_width({ table_id, frame_width }: ITableArgs, posStr: string): void;
79
+ set_position({ table_id, position }: ITableArgs, posStr: string): void;
80
+ private _getTableItem;
81
+ private _getTable;
82
+ private _verfiyRequestFunc;
83
+ private _rowColToInt;
77
84
  }
85
+ export declare function createTable(key: string, data: IKeyObjectValue): IDrawComponent;
78
86
  export declare class Table {
79
87
  private _id;
80
88
  private _variables;
@@ -1,3 +1,4 @@
1
+ import { IKeyObjectValue } from "../../type";
1
2
  import { BuiltInVariables } from "../buildInVariables";
2
3
  interface ITimeArgs {
3
4
  timeframe?: string;
@@ -11,6 +12,8 @@ export default class BuildInTimeframe {
11
12
  private _variables;
12
13
  private _cacheData;
13
14
  constructor(variables: BuiltInVariables);
15
+ get _timeframeCacheData(): IKeyObjectValue;
16
+ set _timeframeCacheData(data: IKeyObjectValue);
14
17
  change({ timeframe }: ITimeArgs, posStr: string): any;
15
18
  in_seconds({ timeframe }?: ITimeArgs): number;
16
19
  from_seconds({ seconds }: ITimeArgs): string;
@@ -12,6 +12,8 @@ export declare class Ta {
12
12
  private _preData;
13
13
  private _id;
14
14
  constructor(id: string);
15
+ get _varTaCacheData(): IKeyObjectValue;
16
+ set _varTaCacheData(data: IKeyObjectValue);
15
17
  update(currentData: IKeyObjectValue): void;
16
18
  get isRealTime(): boolean;
17
19
  get accdist(): any;
@@ -23,6 +23,19 @@ export declare enum VType {
23
23
  VOID = "void",
24
24
  ENUM = "enum"
25
25
  }
26
+ export declare enum VInsType {
27
+ TYPE = "type",
28
+ ARRAY = "array",
29
+ BOX = "box",
30
+ CHART_POINT = "chart.point",
31
+ LABEL = "label",
32
+ LINE = "line",
33
+ LINEFILL = "linefill",
34
+ MAP = "map",
35
+ MATRIX = "matrix",
36
+ POLYLINE = "polyline",
37
+ TABLE = "table"
38
+ }
26
39
  export declare enum VRuleType {
27
40
  FlowStmt = "FlowStmt",
28
41
  DeclareAssign = "DeclareAssign",
@@ -19,9 +19,7 @@ export default class ParseToJs {
19
19
  private _dependsObj;
20
20
  private _enums;
21
21
  private _preRunMembers;
22
- private _isInConditionalStmt;
23
22
  private _preRunMembersFuncs;
24
- private _preRunMemberFuncsCount;
25
23
  private __count;
26
24
  preParseCode: string;
27
25
  private _hasLeftVisibleBarTime;
@@ -1,3 +1,5 @@
1
+ import { IKeyObjectValue } from "../type";
2
+ import { VInsType } from "./enum";
1
3
  interface IBase {
2
4
  startColumn: number;
3
5
  startLineNumber: number;
@@ -26,4 +28,12 @@ export interface IError extends IBase {
26
28
  type?: VMarkerSeverity;
27
29
  }
28
30
  export type WithRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
31
+ export interface IDrawComponent {
32
+ type: VInsType;
33
+ id: string;
34
+ data: IKeyObjectValue;
35
+ _suffix: string;
36
+ preId: string;
37
+ isDraw: boolean;
38
+ }
29
39
  export {};
@@ -2,10 +2,11 @@ import { IKeyObjectValue } from "../type";
2
2
  declare class UserTypeClass {
3
3
  private _defaultParams;
4
4
  private _varipKeys;
5
- constructor(params: IKeyObjectValue, keys: string[]);
6
- copy(typeObject: IKeyObjectValue): IKeyObjectValue;
5
+ private _typeName;
6
+ constructor(params: IKeyObjectValue, keys: string[], typeName: string);
7
+ copy(typeObject: IKeyObjectValue): any;
7
8
  new(params?: IKeyObjectValue): IKeyObjectValue;
8
9
  private _createDynamicClass;
9
- private _deepCopy;
10
+ static copy(typeObject: IKeyObjectValue): any;
10
11
  }
11
12
  export default UserTypeClass;
@@ -1,4 +1,4 @@
1
- import { IKeyValue } from "../type";
1
+ import { IKeyObjectValue, IKeyValue } from "../type";
2
2
  import { TccErrorListener } from "./buildInFuncNamespace";
3
3
  import moment from 'moment-timezone';
4
4
  export declare function replaceTemplate(template: string, replacements: IKeyValue): string;
@@ -19,3 +19,4 @@ export declare function decimalFloor(num?: number, precision?: number): number |
19
19
  export declare function parsePeriodHandle(period?: string): string;
20
20
  export declare function transformPeriod(period: string): string;
21
21
  export declare function addRequestUseFuncError(errorListener: TccErrorListener, funcName: string, reqName: string, posStr: string): void;
22
+ export declare function deepCopy(varData: IKeyObjectValue, newData: IKeyObjectValue): void;
@@ -258,6 +258,7 @@ export default class ParserVisitor extends ParserUtils {
258
258
  visitEnumElement: (ctx: IKeyObjectValue) => IKeyObjectValue;
259
259
  visitName: (ctx: IKeyObjectValue) => IKeyObjectValue;
260
260
  private _nameHandle;
261
+ private _getMethodFiledType;
261
262
  private _typeElementVerify;
262
263
  private _memberIndexVerify;
263
264
  private _setFuncParams;
@@ -306,6 +307,7 @@ export default class ParserVisitor extends ParserUtils {
306
307
  private _globalFuncVerify;
307
308
  private _hasMemberIndexVerify;
308
309
  private _tempFuncNameHandle;
310
+ private _getSelfType;
309
311
  private _getOtherNamesMethodType;
310
312
  private _expandMethodHandle;
311
313
  /**
@@ -23,6 +23,7 @@ export interface IKeyObjectValue {
23
23
  [key: string]: any;
24
24
  }
25
25
  export interface IDocValue {
26
+ methodName?: string;
26
27
  hasAssigned?: boolean;
27
28
  name: string;
28
29
  title?: string;
@@ -58,6 +59,7 @@ export interface IDocValue {
58
59
  hasRequest?: boolean;
59
60
  isEnumMember?: boolean;
60
61
  value?: string;
62
+ selfArg?: IArg;
61
63
  }
62
64
  export interface IDetailedDesc {
63
65
  desc: string[];