@guihz/trading-vue-editor-tes 0.1.19 → 0.1.20
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.
- package/lib/assets/{parserTccWorker-BCWxJvBi.js → parserTccWorker-DzdECu81.js} +25556 -44258
- package/lib/assets/{scriptsRunWorker-AjKVFLY2.js → scriptsRunWorker-DO_0NAgb.js} +15254 -23718
- package/lib/components/editor/type/index.d.ts +0 -1
- package/lib/components/editor/utils/parserTccWorker.d.ts +25 -1
- package/lib/components/editor/v3/parseScript/constants.d.ts +0 -2
- package/lib/components/editor/v4/parseScript/constants.d.ts +0 -2
- package/lib/components/editor/v5/parseScript/buildInConstants.d.ts +0 -2
- package/lib/components/editor/v5/parseScript/buildInVarNamespace/strategy.d.ts +3 -0
- package/lib/components/editor/v5/parseScript/constants.d.ts +0 -2
- package/lib/components/editor/v5/parseScript/parseToJs.d.ts +0 -2
- package/lib/{monarchTokens-BNkQaBBZ.js → monarchTokens-D-73EVQs.js} +22 -22
- package/lib/packages/index.d.ts +1 -1
- package/lib/trading-vue-editor.es.packages.js +843 -856
- package/lib/trading-vue-editor.umd.packages.mjs +45 -110
- package/package.json +2 -2
- package/lib/components/editor/v5/parseScript/constants_en.d.ts +0 -134
- package/lib/components/editor/v6/config/monarchTokens.d.ts +0 -205
- package/lib/components/editor/v6/constants/contents_zh.d.ts +0 -6
- package/lib/components/editor/v6/constants/index.d.ts +0 -41
- package/lib/components/editor/v6/parseScript/buildInConstants.d.ts +0 -310
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/array.d.ts +0 -109
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/box.d.ts +0 -83
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/chartPoint.d.ts +0 -26
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/color.d.ts +0 -25
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/errorListener.d.ts +0 -9
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/index.d.ts +0 -25
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/input.d.ts +0 -57
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/label.d.ts +0 -66
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/line.d.ts +0 -74
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/linefill.d.ts +0 -36
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/log.d.ts +0 -39
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/map.d.ts +0 -51
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/math.d.ts +0 -49
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/matrix.d.ts +0 -98
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/polyline.d.ts +0 -32
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/runtime.d.ts +0 -10
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/strategy.d.ts +0 -278
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/string.d.ts +0 -55
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/syminfo.d.ts +0 -9
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/ta.d.ts +0 -125
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/table.d.ts +0 -89
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/timeframe.d.ts +0 -22
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/barstate.d.ts +0 -22
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/chart.d.ts +0 -21
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/dividends.d.ts +0 -8
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/earnings.d.ts +0 -9
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/index.d.ts +0 -9
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/session.d.ts +0 -12
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/strategy.d.ts +0 -144
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/syminfo.d.ts +0 -49
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/ta.d.ts +0 -32
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/timeframe.d.ts +0 -16
- package/lib/components/editor/v6/parseScript/constants.d.ts +0 -139
- package/lib/components/editor/v6/parseScript/constantsRun.d.ts +0 -5
- package/lib/components/editor/v6/parseScript/enum.d.ts +0 -302
- package/lib/components/editor/v6/parseScript/parseToJs.d.ts +0 -78
- package/lib/components/editor/v6/parseScript/parseToLibJs.d.ts +0 -71
- package/lib/components/editor/v6/parseScript/strategyNamespace/closedtrades.d.ts +0 -28
- package/lib/components/editor/v6/parseScript/strategyNamespace/index.d.ts +0 -4
- package/lib/components/editor/v6/parseScript/strategyNamespace/opentrades.d.ts +0 -25
- package/lib/components/editor/v6/parseScript/strategyNamespace/risk.d.ts +0 -22
- package/lib/components/editor/v6/parseScript/type.d.ts +0 -40
- package/lib/components/editor/v6/parseScript/userTypeClass.d.ts +0 -12
- package/lib/components/editor/v6/parseScript/utils.d.ts +0 -25
- package/lib/components/editor/v6/parseScript/visitorParser.d.ts +0 -382
- package/lib/components/editor/v6/parseScript/visitorUtils.d.ts +0 -31
- package/lib/components/editor/v6/parserTccWorker.d.ts +0 -40
- package/lib/components/editor/v6/scriptsRunWorker.d.ts +0 -11
- package/lib/components/editor/v6/tccParser/LexerBase.d.ts +0 -19
- package/lib/components/editor/v6/tccParser/tccScriptParserVisitor.d.ts +0 -507
- package/lib/index-C8vqcsNB.js +0 -61958
- package/lib/monarchTokens-_UFEzBJ_.js +0 -563
- package/lib/{index-Clupi1hX.js → index-DLIhM_y0.js} +24 -24
@@ -1,109 +0,0 @@
|
|
1
|
-
import { VInsType, VSortOrder } from "../enum";
|
2
|
-
import { TccErrorListener } from ".";
|
3
|
-
interface IArrayArgs {
|
4
|
-
id?: IPseudoArray;
|
5
|
-
id1?: IPseudoArray;
|
6
|
-
id2?: IPseudoArray;
|
7
|
-
size?: number;
|
8
|
-
initial_value?: any;
|
9
|
-
index_from?: number;
|
10
|
-
index_to?: number;
|
11
|
-
val?: number;
|
12
|
-
biased?: boolean;
|
13
|
-
value?: any;
|
14
|
-
index?: number;
|
15
|
-
separator?: string;
|
16
|
-
nth?: number;
|
17
|
-
percentage?: number;
|
18
|
-
order?: VSortOrder;
|
19
|
-
type?: string;
|
20
|
-
}
|
21
|
-
export default class BuildInArray {
|
22
|
-
private _errorListener;
|
23
|
-
constructor(errorListener: TccErrorListener);
|
24
|
-
new({ size, initial_value, type }: IArrayArgs | undefined, posStr: string): IPseudoArray;
|
25
|
-
new_float({ size, initial_value }: IArrayArgs | undefined, posStr: string): IPseudoArray;
|
26
|
-
new_int({ size, initial_value }: IArrayArgs | undefined, posStr: string): IPseudoArray;
|
27
|
-
new_color({ size, initial_value }: IArrayArgs | undefined, posStr: string): IPseudoArray;
|
28
|
-
new_bool({ size, initial_value }: IArrayArgs | undefined, posStr: string): IPseudoArray;
|
29
|
-
new_string({ size, initial_value }: IArrayArgs | undefined, posStr: string): IPseudoArray;
|
30
|
-
new_line({ size, initial_value }: IArrayArgs | undefined, posStr: string): IPseudoArray;
|
31
|
-
new_box({ size, initial_value }: IArrayArgs | undefined, posStr: string): IPseudoArray;
|
32
|
-
new_table({ size, initial_value }: IArrayArgs | undefined, posStr: string): IPseudoArray;
|
33
|
-
new_linefill({ size, initial_value }: IArrayArgs | undefined, posStr: string): IPseudoArray;
|
34
|
-
new_label({ size, initial_value }: IArrayArgs | undefined, posStr: string): IPseudoArray;
|
35
|
-
copy({ id }: IArrayArgs): IPseudoArray | undefined;
|
36
|
-
slice({ id, index_from, index_to }: IArrayArgs): IPseudoArray | undefined;
|
37
|
-
size({ id }: IArrayArgs): number | undefined;
|
38
|
-
first({ id }: IArrayArgs): any;
|
39
|
-
abs({ id }: IArrayArgs, posStr: string): IPseudoArray | undefined;
|
40
|
-
avg({ id }: IArrayArgs, posStr: string): number | undefined;
|
41
|
-
binary_search({ id, val }: IArrayArgs, posStr: string): number | undefined;
|
42
|
-
binary_search_leftmost({ id, val }: IArrayArgs, posStr: string): number | undefined;
|
43
|
-
binary_search_rightmost({ id, val }: IArrayArgs, posStr: string): number | undefined;
|
44
|
-
clear({ id }: IArrayArgs): void;
|
45
|
-
concat({ id1, id2 }: IArrayArgs, posStr: string): IPseudoArray | undefined;
|
46
|
-
covariance({ id1, id2, biased }: IArrayArgs, posStr: string): number | undefined;
|
47
|
-
every({ id }: IArrayArgs, posStr: string): boolean | undefined;
|
48
|
-
from(_: any, arrVals: any[]): IPseudoArray;
|
49
|
-
fill({ id, value, index_from, index_to }: IArrayArgs): void;
|
50
|
-
fillArr(arr: any[], value: any, index_from: number, index_to: number): any[];
|
51
|
-
get({ id, index }: IArrayArgs): any;
|
52
|
-
includes({ id, value }: IArrayArgs): boolean | undefined;
|
53
|
-
indexof({ id, value }: IArrayArgs): number | undefined;
|
54
|
-
insert({ id, index, value }: IArrayArgs, posStr?: string): void;
|
55
|
-
insertArr(arr: any[], index: number, value: any): void;
|
56
|
-
join({ id, separator }: IArrayArgs, posStr: string): string | undefined;
|
57
|
-
last({ id }: IArrayArgs): any;
|
58
|
-
lastindexof({ id, value }: IArrayArgs): number | undefined;
|
59
|
-
max(arg: IArrayArgs, posStr: string): number | undefined;
|
60
|
-
median({ id }: IArrayArgs, posStr: string): number | undefined;
|
61
|
-
min({ id, nth }: IArrayArgs, posStr: string): number | undefined;
|
62
|
-
mode({ id }: IArrayArgs, posStr: string): number | undefined;
|
63
|
-
percentile_linear_interpolation({ id, percentage }: IArrayArgs, posStr: string): number | undefined;
|
64
|
-
percentile_nearest_rank({ id, percentage }: IArrayArgs, posStr: string): number | undefined;
|
65
|
-
percentrank({ id, index }: IArrayArgs, posStr: string): number | undefined;
|
66
|
-
pop({ id }: IArrayArgs): any;
|
67
|
-
push({ id, value }: IArrayArgs, posStr: string): void;
|
68
|
-
range({ id }: IArrayArgs, posStr: string): number | undefined;
|
69
|
-
remove({ id, index }: IArrayArgs): any;
|
70
|
-
reverse({ id }: IArrayArgs): void;
|
71
|
-
set({ id, index, value }: IArrayArgs, posStr?: string): void;
|
72
|
-
private _verify;
|
73
|
-
shift({ id }: IArrayArgs): any;
|
74
|
-
some({ id }: IArrayArgs, posStr: string): boolean | undefined;
|
75
|
-
sort({ id, order }: IArrayArgs, posStr: string): void;
|
76
|
-
sort_indices({ id, order }: IArrayArgs, posStr: string): IPseudoArray | undefined;
|
77
|
-
standardize({ id }: IArrayArgs, posStr: string): IPseudoArray | undefined;
|
78
|
-
private _verifyArrayLen;
|
79
|
-
stdev({ id, biased }: IArrayArgs, posStr: string): number | undefined;
|
80
|
-
sum({ id }: IArrayArgs, posStr: string): any;
|
81
|
-
unshift({ id, value }: IArrayArgs, posStr: string): void;
|
82
|
-
variance({ id, biased }: IArrayArgs, posStr: string): number | undefined;
|
83
|
-
private _calculateVariances;
|
84
|
-
private _calculateStandardDeviations;
|
85
|
-
private _standardizeArray;
|
86
|
-
private _getPercentileRank;
|
87
|
-
private _getNearestRankPercentile;
|
88
|
-
private _percentileLinearInterpolation;
|
89
|
-
private _mode;
|
90
|
-
private _median;
|
91
|
-
private _minNth;
|
92
|
-
private _maxNth;
|
93
|
-
private _setElements;
|
94
|
-
private _covariance;
|
95
|
-
private _verifySimpleType;
|
96
|
-
private _binarySearch;
|
97
|
-
private _binarySearchLeftMost;
|
98
|
-
private _binarySearchRightMost;
|
99
|
-
createPseudoArrayWithArray(array: any[], type?: string): IPseudoArray;
|
100
|
-
}
|
101
|
-
export interface IPseudoArray {
|
102
|
-
isArray: boolean;
|
103
|
-
typeName?: string;
|
104
|
-
type: VInsType;
|
105
|
-
_isNumber: boolean;
|
106
|
-
_value: any[];
|
107
|
-
}
|
108
|
-
export declare function createPseudoArray(size?: number, initialValue?: any, type?: string): IPseudoArray;
|
109
|
-
export {};
|
@@ -1,83 +0,0 @@
|
|
1
|
-
import { IKeyObjectValue } from "../../../type";
|
2
|
-
import { BuiltInVariables } from "../buildInVariables";
|
3
|
-
import { VExtend, VLineStyle, VSize, VText, VXloc } from "../enum";
|
4
|
-
import { IDrawComponent } from "../type";
|
5
|
-
import { IPoint as Point, TccErrorListener } from "./index";
|
6
|
-
export interface IBoxArgs {
|
7
|
-
id?: string;
|
8
|
-
top_left?: Point;
|
9
|
-
left?: number;
|
10
|
-
top?: number;
|
11
|
-
right?: number;
|
12
|
-
bottom?: number;
|
13
|
-
bottom_right?: Point;
|
14
|
-
border_color?: string;
|
15
|
-
border_width?: number;
|
16
|
-
border_style?: VLineStyle;
|
17
|
-
style?: VLineStyle;
|
18
|
-
xloc?: VXloc;
|
19
|
-
bgcolor?: string;
|
20
|
-
text?: string;
|
21
|
-
text_size?: VSize;
|
22
|
-
text_color?: string;
|
23
|
-
extend?: VExtend;
|
24
|
-
text_halign?: VText;
|
25
|
-
text_valign?: VText;
|
26
|
-
text_wrap?: VText;
|
27
|
-
text_font_family?: string;
|
28
|
-
color?: string;
|
29
|
-
point?: Point;
|
30
|
-
width?: number;
|
31
|
-
bar_index?: number;
|
32
|
-
}
|
33
|
-
type VBoxArgs = Omit<IBoxArgs, 'id'> & {
|
34
|
-
id: IDrawComponent;
|
35
|
-
};
|
36
|
-
export default class BuildInBox {
|
37
|
-
private _variables;
|
38
|
-
private _errorListener;
|
39
|
-
private _updateIds;
|
40
|
-
private _defaultBox;
|
41
|
-
constructor(variables: BuiltInVariables, errorListener: TccErrorListener);
|
42
|
-
get updateIds(): string[];
|
43
|
-
box({ x }: {
|
44
|
-
x?: IDrawComponent;
|
45
|
-
}): IDrawComponent | undefined;
|
46
|
-
new(args: IBoxArgs, posStr: string, paramNames: string[]): IDrawComponent;
|
47
|
-
private _parameterHandle;
|
48
|
-
private _preVerfiyArgs;
|
49
|
-
private _paramVerfiyHandle;
|
50
|
-
private _verfiyArgs;
|
51
|
-
private _paramVerfiy;
|
52
|
-
updateId(box: IDrawComponent): string;
|
53
|
-
copy({ id }: VBoxArgs, posStr: string): IDrawComponent | undefined;
|
54
|
-
delete({ id }: VBoxArgs, posStr: string): void;
|
55
|
-
get_top({ id }: VBoxArgs, posStr: string): any;
|
56
|
-
get_bottom({ id }: VBoxArgs, posStr: string): any;
|
57
|
-
get_left({ id }: VBoxArgs, posStr: string): any;
|
58
|
-
get_right({ id }: VBoxArgs, posStr: string): any;
|
59
|
-
set_top({ id, top }: VBoxArgs, posStr: string): void;
|
60
|
-
set_bottom({ id, bottom }: VBoxArgs, posStr: string): void;
|
61
|
-
set_text({ id, text }: VBoxArgs, posStr: string): void;
|
62
|
-
set_left({ id, left }: VBoxArgs, posStr: string): void;
|
63
|
-
set_right({ id, right }: VBoxArgs, posStr: string): void;
|
64
|
-
set_extend({ id, extend }: VBoxArgs, posStr: string): void;
|
65
|
-
set_bgcolor({ id, color }: VBoxArgs, posStr: string): void;
|
66
|
-
set_border_color({ id, color }: VBoxArgs, posStr: string): void;
|
67
|
-
set_border_width({ id, width }: VBoxArgs, posStr: string): void;
|
68
|
-
set_border_style({ id, style }: VBoxArgs, posStr: string): void;
|
69
|
-
set_lefttop({ id, left, top }: VBoxArgs, posStr: string): void;
|
70
|
-
set_rightbottom({ id, right, bottom }: VBoxArgs, posStr: string): void;
|
71
|
-
set_text_size({ id, text_size }: VBoxArgs, posStr: string): void;
|
72
|
-
set_text_wrap({ id, text_wrap }: VBoxArgs, posStr: string): void;
|
73
|
-
set_text_color({ id, text_color }: VBoxArgs, posStr: string): void;
|
74
|
-
set_text_halign({ id, text_halign }: VBoxArgs, posStr: string): void;
|
75
|
-
set_text_valign({ id, text_valign }: VBoxArgs, posStr: string): void;
|
76
|
-
set_top_left_point({ id, point }: VBoxArgs, posStr: string): void;
|
77
|
-
set_bottom_right_point({ id, point }: VBoxArgs, posStr: string): void;
|
78
|
-
set_text_font_family({ id, text_font_family }: VBoxArgs, posStr: string): void;
|
79
|
-
set_xloc({ id, left, right, xloc }: VBoxArgs, posStr: string): void;
|
80
|
-
private _getBox;
|
81
|
-
}
|
82
|
-
export declare function createBox(key: string, data: IKeyObjectValue): IDrawComponent;
|
83
|
-
export {};
|
@@ -1,26 +0,0 @@
|
|
1
|
-
import { BuiltInVariables } from "../buildInVariables";
|
2
|
-
import { VInsType } from "../enum";
|
3
|
-
interface IChartPointArgs {
|
4
|
-
id?: IPoint;
|
5
|
-
price?: number;
|
6
|
-
time?: number;
|
7
|
-
index?: number;
|
8
|
-
}
|
9
|
-
export default class ChartPoint {
|
10
|
-
private _variables;
|
11
|
-
constructor(variables: BuiltInVariables);
|
12
|
-
new({ price, time, index }: IChartPointArgs): IPoint;
|
13
|
-
now({ price }: IChartPointArgs): IPoint;
|
14
|
-
copy({ id }: IChartPointArgs): IPoint | undefined;
|
15
|
-
from_index({ price, index }: IChartPointArgs): IPoint;
|
16
|
-
from_time({ price, time }: IChartPointArgs): IPoint;
|
17
|
-
}
|
18
|
-
export interface IPoint {
|
19
|
-
price?: number;
|
20
|
-
index?: number;
|
21
|
-
time?: number;
|
22
|
-
type: VInsType;
|
23
|
-
typeName: string;
|
24
|
-
}
|
25
|
-
export declare function createPoint(price?: number, index?: number, time?: number): IPoint;
|
26
|
-
export {};
|
@@ -1,25 +0,0 @@
|
|
1
|
-
export interface IColorArgs {
|
2
|
-
x?: any;
|
3
|
-
color?: string;
|
4
|
-
value?: number;
|
5
|
-
bottom_value?: number;
|
6
|
-
top_value?: number;
|
7
|
-
bottom_color?: string;
|
8
|
-
top_color?: string;
|
9
|
-
transp?: number;
|
10
|
-
red?: number;
|
11
|
-
green?: number;
|
12
|
-
blue?: number;
|
13
|
-
}
|
14
|
-
export default class BuildInColor {
|
15
|
-
color({ x }: IColorArgs): any;
|
16
|
-
new({ color, transp }: IColorArgs): string;
|
17
|
-
rgb({ red, green, blue, transp }: IColorArgs): string;
|
18
|
-
g({ color }: IColorArgs): number;
|
19
|
-
r({ color }: IColorArgs): number;
|
20
|
-
b({ color }: IColorArgs): number;
|
21
|
-
t({ color }: IColorArgs): number;
|
22
|
-
from_gradient({ value, bottom_value, top_value, bottom_color, top_color }: IColorArgs): string;
|
23
|
-
private _parseColor;
|
24
|
-
private _parserRgbColor;
|
25
|
-
}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { IError, VMarkerSeverity } from '../type';
|
2
|
-
export declare class TccErrorListener {
|
3
|
-
private _errors;
|
4
|
-
constructor();
|
5
|
-
clear(): void;
|
6
|
-
get errors(): IError[];
|
7
|
-
setErrors(errors: IError[], key: string): void;
|
8
|
-
addError(message: string, posStr: string, type: VMarkerSeverity, length?: number): void;
|
9
|
-
}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import BuildInArray, { createPseudoArray } from "./array";
|
2
|
-
import BuildInMath from "./math";
|
3
|
-
import BuildInTa from "./ta";
|
4
|
-
import BuildInInput from "./input";
|
5
|
-
import BuildInColor from "./color";
|
6
|
-
import BuildInMatrix from "./matrix";
|
7
|
-
import BuildInTimeframe from "./timeframe";
|
8
|
-
import BuildInStr from "./string";
|
9
|
-
import BuildInMap from "./map";
|
10
|
-
import ChartPoint, { createPoint, IPoint } from "./chartPoint";
|
11
|
-
import BuildInLabel, { PartialLabelArgs } from "./label";
|
12
|
-
import BuildInPolyline, { IPolyline } from "./polyline";
|
13
|
-
import BuildInLine, { ILineArgs, ILine } from "./line";
|
14
|
-
import BuildInLinefill, { TLinefill, ILinefill } from "./linefill";
|
15
|
-
import BuildInBox, { IBoxArgs } from "./box";
|
16
|
-
import BuildInTable, { ITableArgs } from "./table";
|
17
|
-
import Strategy, { IOrder, IStrategy } from './strategy';
|
18
|
-
import Request from './request';
|
19
|
-
import Syminfo from './syminfo';
|
20
|
-
import { Log } from './log';
|
21
|
-
import { Runtime } from './runtime';
|
22
|
-
export { TccErrorListener } from './errorListener';
|
23
|
-
export type { IColorArgs } from './color';
|
24
|
-
export { BuildInArray, BuildInMath, BuildInTa, BuildInInput, BuildInColor, BuildInMatrix, ChartPoint, createPoint, BuildInTimeframe, BuildInStr, BuildInMap, createPseudoArray, BuildInLabel, BuildInPolyline, BuildInLine, BuildInLinefill, BuildInBox, BuildInTable, Log, Runtime, Strategy, Request, Syminfo };
|
25
|
-
export type { PartialLabelArgs, IPolyline, ILineArgs, TLinefill, ILinefill, IBoxArgs, ITableArgs, IOrder, IStrategy, IPoint, ILine };
|
@@ -1,57 +0,0 @@
|
|
1
|
-
import { BuiltInVariables } from "../buildInVariables";
|
2
|
-
import { VInputType, VPlotDisplay } from "../enum";
|
3
|
-
import { TccErrorListener } from "./errorListener";
|
4
|
-
type TSimpleType = string | number | boolean;
|
5
|
-
interface IInputArgs {
|
6
|
-
id: string;
|
7
|
-
defval: TSimpleType;
|
8
|
-
title?: string;
|
9
|
-
tooltip?: string;
|
10
|
-
inline?: string;
|
11
|
-
group?: string;
|
12
|
-
display?: VPlotDisplay[];
|
13
|
-
sourceTypeName?: string;
|
14
|
-
isModify?: boolean;
|
15
|
-
options?: TSimpleType[];
|
16
|
-
confirm?: boolean;
|
17
|
-
minval?: number;
|
18
|
-
maxval?: number;
|
19
|
-
step?: number;
|
20
|
-
inputType?: VInputType;
|
21
|
-
index?: number;
|
22
|
-
modifyDefval?: TSimpleType;
|
23
|
-
}
|
24
|
-
interface ICacheData {
|
25
|
-
[key: string]: IInputArgs;
|
26
|
-
}
|
27
|
-
declare class Input {
|
28
|
-
private _cacheData;
|
29
|
-
private _variables;
|
30
|
-
private _errorListener;
|
31
|
-
private _historyInputs;
|
32
|
-
private _name;
|
33
|
-
private _newCacheData;
|
34
|
-
constructor(variables: BuiltInVariables, errorListener: TccErrorListener, id: string);
|
35
|
-
get _inputCacheData(): ICacheData;
|
36
|
-
set _inputCacheData(data: ICacheData);
|
37
|
-
update(vals?: IInputArgs[]): void;
|
38
|
-
input(args: IInputArgs, posStr: string): TSimpleType;
|
39
|
-
int(args: IInputArgs, posStr: string): TSimpleType;
|
40
|
-
bool(args: IInputArgs, posStr: string): TSimpleType;
|
41
|
-
color(args: IInputArgs, posStr: string): TSimpleType;
|
42
|
-
time(args: IInputArgs, posStr: string): TSimpleType;
|
43
|
-
float(args: IInputArgs, posStr: string): TSimpleType;
|
44
|
-
price(args: IInputArgs, posStr: string): TSimpleType;
|
45
|
-
source(args: IInputArgs, posStr: string): TSimpleType;
|
46
|
-
string(args: IInputArgs, posStr: string): TSimpleType;
|
47
|
-
symbol(args: IInputArgs, posStr: string): TSimpleType;
|
48
|
-
session(args: IInputArgs, posStr: string): TSimpleType;
|
49
|
-
text_area(args: IInputArgs, posStr: string): TSimpleType;
|
50
|
-
timeframe(args: IInputArgs, posStr: string): TSimpleType;
|
51
|
-
enum(args: IInputArgs, posStr: string): TSimpleType;
|
52
|
-
private _cacheHandle;
|
53
|
-
private _displayVerify;
|
54
|
-
private _verifyMaxOrMin;
|
55
|
-
getInputs(): IInputArgs[];
|
56
|
-
}
|
57
|
-
export default Input;
|
@@ -1,66 +0,0 @@
|
|
1
|
-
import { IKeyObjectValue } from "../../../type";
|
2
|
-
import { BuiltInVariables } from "../buildInVariables";
|
3
|
-
import { VLabelStyle, VSize, VText, VXloc, VYloc } from "../enum";
|
4
|
-
import { IDrawComponent } from "../type";
|
5
|
-
import { IPoint as Point, TccErrorListener } from "./index";
|
6
|
-
interface ILabelArgs {
|
7
|
-
id: string;
|
8
|
-
point: Point;
|
9
|
-
text: string;
|
10
|
-
x: number;
|
11
|
-
y: number;
|
12
|
-
xloc: VXloc;
|
13
|
-
yloc: VYloc;
|
14
|
-
color: string;
|
15
|
-
size: VSize;
|
16
|
-
style: VLabelStyle;
|
17
|
-
textalign: VText;
|
18
|
-
textcolor: string;
|
19
|
-
tooltip: string;
|
20
|
-
text_font_family: string;
|
21
|
-
force_overlay: boolean;
|
22
|
-
}
|
23
|
-
export type PartialLabelArgs = Partial<ILabelArgs>;
|
24
|
-
type TLabelArgs = Omit<PartialLabelArgs, 'id'> & {
|
25
|
-
id: IDrawComponent;
|
26
|
-
};
|
27
|
-
export default class BuildInLabel {
|
28
|
-
private _variables;
|
29
|
-
private _errorListener;
|
30
|
-
private _updateIds;
|
31
|
-
private _defaultLabel;
|
32
|
-
constructor(variables: BuiltInVariables, errorListener: TccErrorListener);
|
33
|
-
get updateIds(): string[];
|
34
|
-
new(args: PartialLabelArgs, posStr: string, paramNames: string[]): IDrawComponent;
|
35
|
-
private _parameterHandle;
|
36
|
-
private _preVerfiyArgs;
|
37
|
-
private _paramVerfiyHandle;
|
38
|
-
private _verfiyArgs;
|
39
|
-
private _paramVerfiy;
|
40
|
-
updateId(id: IDrawComponent): string;
|
41
|
-
label(args: {
|
42
|
-
x?: IDrawComponent;
|
43
|
-
}): IDrawComponent | undefined;
|
44
|
-
copy({ id }: TLabelArgs, posStr: string): IDrawComponent | undefined;
|
45
|
-
get_x({ id }: TLabelArgs, posStr: string): any;
|
46
|
-
get_y({ id }: TLabelArgs, posStr: string): any;
|
47
|
-
set_x({ id, x }: TLabelArgs, posStr: string): void;
|
48
|
-
set_y({ id, y }: TLabelArgs, posStr: string): void;
|
49
|
-
delete({ id }: TLabelArgs, posStr: string): void;
|
50
|
-
get_text({ id }: TLabelArgs, posStr: string): any;
|
51
|
-
set_xy({ id, x, y }: TLabelArgs, posStr: string): void;
|
52
|
-
set_size({ id, size }: TLabelArgs, posStr: string): void;
|
53
|
-
set_xloc({ id, x, xloc }: TLabelArgs, posStr: string): void;
|
54
|
-
set_yloc({ id, yloc }: TLabelArgs, posStr: string): void;
|
55
|
-
set_style({ id, style }: TLabelArgs, posStr: string): void;
|
56
|
-
set_color({ id, ...args }: TLabelArgs, posStr: string): void;
|
57
|
-
set_tooltip({ id, tooltip }: TLabelArgs, posStr: string): void;
|
58
|
-
set_point({ id, point }: TLabelArgs, posStr: string): void;
|
59
|
-
set_text({ id, text }: TLabelArgs, posStr: string): void;
|
60
|
-
set_textcolor({ id, ...args }: TLabelArgs, posStr: string): void;
|
61
|
-
set_textalign({ id, textalign }: TLabelArgs, posStr: string): void;
|
62
|
-
set_text_font_family({ id, text_font_family }: TLabelArgs, posStr: string): void;
|
63
|
-
private _getLabel;
|
64
|
-
}
|
65
|
-
export declare function createLabel(key: string, data: IKeyObjectValue): IDrawComponent;
|
66
|
-
export {};
|
@@ -1,74 +0,0 @@
|
|
1
|
-
import { IKeyObjectValue } from "../../../type";
|
2
|
-
import { BuiltInVariables } from "../buildInVariables";
|
3
|
-
import { VExtend, VLineStyle, VXloc } from "../enum";
|
4
|
-
import { IDrawComponent } from "../type";
|
5
|
-
import { IPoint as Point, TccErrorListener } from "./index";
|
6
|
-
export interface ILineArgs {
|
7
|
-
id?: string;
|
8
|
-
x?: number;
|
9
|
-
y?: number;
|
10
|
-
x1?: number;
|
11
|
-
y1?: number;
|
12
|
-
x2?: number;
|
13
|
-
y2?: number;
|
14
|
-
point?: Point;
|
15
|
-
first_point?: Point;
|
16
|
-
second_point?: Point;
|
17
|
-
xloc?: VXloc;
|
18
|
-
extend?: VExtend;
|
19
|
-
color?: string;
|
20
|
-
style?: VLineStyle;
|
21
|
-
width?: number;
|
22
|
-
linefills?: string[];
|
23
|
-
bar_index?: number;
|
24
|
-
isVar?: boolean;
|
25
|
-
}
|
26
|
-
type LineArgs = Omit<ILineArgs, 'id'> & {
|
27
|
-
id: ILine;
|
28
|
-
};
|
29
|
-
export default class BuildInLine {
|
30
|
-
private _variables;
|
31
|
-
private _errorListener;
|
32
|
-
private _updateIds;
|
33
|
-
private _defaultLine;
|
34
|
-
constructor(variables: BuiltInVariables, errorListener: TccErrorListener);
|
35
|
-
get updateIds(): string[];
|
36
|
-
new(args: ILineArgs, posStr: string, paramNames: string[]): ILine;
|
37
|
-
private _parameterHandle;
|
38
|
-
private _preVerfiyArgs;
|
39
|
-
private _paramVerfiyHandle;
|
40
|
-
private _verfiyArgs;
|
41
|
-
private _paramVerfiy;
|
42
|
-
updateId(id: ILine): string;
|
43
|
-
static __setFillKeys(id: ILine, key: string): void;
|
44
|
-
static __updateFillKeys(id: ILine, oldKey: string, key: string): void;
|
45
|
-
line(args: {
|
46
|
-
x?: ILine;
|
47
|
-
}): ILine | undefined;
|
48
|
-
copy({ id }: LineArgs, posStr: string): ILine | undefined;
|
49
|
-
delete({ id }: LineArgs, posStr: string): void;
|
50
|
-
get_x1({ id }: LineArgs, posStr: string): any;
|
51
|
-
get_x2({ id }: LineArgs, posStr: string): any;
|
52
|
-
get_y1({ id }: LineArgs, posStr: string): any;
|
53
|
-
get_y2({ id }: LineArgs, posStr: string): any;
|
54
|
-
set_x1({ id, x }: LineArgs, posStr: string): void;
|
55
|
-
set_x2({ id, x }: LineArgs, posStr: string): void;
|
56
|
-
set_y1({ id, y }: LineArgs, posStr: string): void;
|
57
|
-
set_y2({ id, y }: LineArgs, posStr: string): void;
|
58
|
-
set_xy1({ id, x, y }: LineArgs, posStr: string): void;
|
59
|
-
set_xy2({ id, x, y }: LineArgs, posStr: string): void;
|
60
|
-
set_xloc({ id, xloc, x1, x2 }: LineArgs, posStr: string): void;
|
61
|
-
get_price({ id, x }: LineArgs, posStr: string): any;
|
62
|
-
set_color({ id, ...args }: LineArgs, posStr: string): void;
|
63
|
-
set_style({ id, style }: LineArgs, posStr: string): void;
|
64
|
-
set_width({ id, width }: LineArgs, posStr: string): void;
|
65
|
-
set_extend({ id, extend }: LineArgs, posStr: string): void;
|
66
|
-
set_first_point({ id, point }: LineArgs, posStr: string): void;
|
67
|
-
set_second_point({ id, point }: LineArgs, posStr: string): void;
|
68
|
-
private _getLine;
|
69
|
-
}
|
70
|
-
export interface ILine extends IDrawComponent {
|
71
|
-
fillKeys: string[];
|
72
|
-
}
|
73
|
-
export declare function createLine(key: string, data: IKeyObjectValue): ILine;
|
74
|
-
export {};
|
@@ -1,36 +0,0 @@
|
|
1
|
-
import { IKeyObjectValue } from "../../../type";
|
2
|
-
import { BuiltInVariables } from "../buildInVariables";
|
3
|
-
import { IDrawComponent } from "../type";
|
4
|
-
import { ILineArgs, ILine } from "./line";
|
5
|
-
interface ILinefillArgs {
|
6
|
-
id?: ILinefill;
|
7
|
-
line1?: ILine;
|
8
|
-
line2?: ILine;
|
9
|
-
color?: string;
|
10
|
-
bar_index?: number;
|
11
|
-
}
|
12
|
-
export type TLinefill = Omit<ILinefillArgs, 'line1' | 'line2' | 'id'> & {
|
13
|
-
id: string;
|
14
|
-
line1?: ILineArgs;
|
15
|
-
line2?: ILineArgs;
|
16
|
-
};
|
17
|
-
export default class BuildInLinefill {
|
18
|
-
private _variables;
|
19
|
-
private _updateIds;
|
20
|
-
constructor(variables: BuiltInVariables);
|
21
|
-
get updateIds(): string[];
|
22
|
-
new(args: ILinefillArgs, posStr: string): ILinefill;
|
23
|
-
private _verifyLineKey;
|
24
|
-
updateId(id: ILinefill): string;
|
25
|
-
delete({ id }: ILinefillArgs): void;
|
26
|
-
get_line1({ id }: ILinefillArgs): ILine | undefined;
|
27
|
-
get_line2({ id }: ILinefillArgs): ILine | undefined;
|
28
|
-
set_color({ id, ...args }: ILinefillArgs): void;
|
29
|
-
}
|
30
|
-
export interface ILinefill extends IDrawComponent {
|
31
|
-
line1?: ILine;
|
32
|
-
line2?: ILine;
|
33
|
-
lineKey: string;
|
34
|
-
}
|
35
|
-
export declare function createLinefill(key: string, data: IKeyObjectValue, lineKey: string, line1?: ILine, line2?: ILine): ILinefill;
|
36
|
-
export {};
|
@@ -1,39 +0,0 @@
|
|
1
|
-
import { BuiltInVariables } from "../buildInVariables";
|
2
|
-
import { BuildInStr } from ".";
|
3
|
-
import { IKeyObjectValue } from "../../../type";
|
4
|
-
interface ILogArgs {
|
5
|
-
message?: string;
|
6
|
-
formatString?: string;
|
7
|
-
}
|
8
|
-
interface ILog {
|
9
|
-
message: string;
|
10
|
-
time: number;
|
11
|
-
barIndex: number;
|
12
|
-
type: LogType;
|
13
|
-
id: string;
|
14
|
-
}
|
15
|
-
type LogType = 'error' | 'info' | 'warning';
|
16
|
-
export declare class Log {
|
17
|
-
private _logs;
|
18
|
-
private _variables;
|
19
|
-
private _str;
|
20
|
-
private _preBar;
|
21
|
-
constructor(variables: BuiltInVariables, str: BuildInStr);
|
22
|
-
get _logCacheData(): {
|
23
|
-
barIndex: number;
|
24
|
-
isrealtime: boolean;
|
25
|
-
};
|
26
|
-
set _logCacheData(data: {
|
27
|
-
barIndex: number;
|
28
|
-
isrealtime: boolean;
|
29
|
-
});
|
30
|
-
get logs(): ILog[];
|
31
|
-
clearLogForIndex(index: number): void;
|
32
|
-
clearLogs(): void;
|
33
|
-
info(args: ILogArgs, replaces: (string | number | IKeyObjectValue)[], posStr: string): void;
|
34
|
-
error(args: ILogArgs, replaces: (string | number | IKeyObjectValue)[], posStr: string): void;
|
35
|
-
warning(args: ILogArgs, replaces: (string | number | IKeyObjectValue)[], posStr: string): void;
|
36
|
-
mergeLogs(logs: ILog[]): void;
|
37
|
-
private _addLog;
|
38
|
-
}
|
39
|
-
export {};
|
@@ -1,51 +0,0 @@
|
|
1
|
-
import { IKeyObjectValue } from "../../../type";
|
2
|
-
import { VInsType } from "../enum";
|
3
|
-
interface IMapArgs {
|
4
|
-
id?: IPseudoMap;
|
5
|
-
key?: any;
|
6
|
-
value?: any;
|
7
|
-
id2?: IPseudoMap;
|
8
|
-
}
|
9
|
-
export default class BuildInMap {
|
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;
|
27
|
-
get({ id, key }: IMapArgs): any;
|
28
|
-
put({ id, key, value }: IMapArgs): any;
|
29
|
-
keys({ id }: IMapArgs): import("./array").IPseudoArray | undefined;
|
30
|
-
size({ id }: IMapArgs): number | undefined;
|
31
|
-
clear({ id }: IMapArgs): void;
|
32
|
-
remove({ id, key }: IMapArgs): any;
|
33
|
-
values({ id }: IMapArgs): import("./array").IPseudoArray | undefined;
|
34
|
-
put_all({ id, id2 }: IMapArgs): IPseudoMap | undefined;
|
35
|
-
contains({ id, key }: IMapArgs): boolean | undefined;
|
36
|
-
}
|
37
|
-
interface IPseudoMap {
|
38
|
-
isMap: boolean;
|
39
|
-
keyTypeName: string;
|
40
|
-
typeName: string;
|
41
|
-
_value: IKeyObjectValue;
|
42
|
-
type: VInsType.MAP;
|
43
|
-
}
|
44
|
-
export declare function createMap(types: string[]): {
|
45
|
-
isMap: boolean;
|
46
|
-
keyTypeName: string;
|
47
|
-
typeName: string;
|
48
|
-
_value: any;
|
49
|
-
type: VInsType;
|
50
|
-
};
|
51
|
-
export {};
|
@@ -1,49 +0,0 @@
|
|
1
|
-
import { IKeyObjectValue } from "../../../type";
|
2
|
-
interface IMathArgs {
|
3
|
-
number?: number;
|
4
|
-
angle?: number;
|
5
|
-
base?: number;
|
6
|
-
exponent?: number;
|
7
|
-
min?: number;
|
8
|
-
max?: number;
|
9
|
-
seed?: number;
|
10
|
-
precision?: number;
|
11
|
-
source?: number;
|
12
|
-
length?: number;
|
13
|
-
radians?: number;
|
14
|
-
degrees?: number;
|
15
|
-
}
|
16
|
-
export default class BuildInMath {
|
17
|
-
private _mintick;
|
18
|
-
private _cacheData;
|
19
|
-
private _barIndex;
|
20
|
-
constructor(mintick: number);
|
21
|
-
get _mathCacheData(): IKeyObjectValue;
|
22
|
-
set _mathCacheData(val: IKeyObjectValue);
|
23
|
-
update(barIndex: number): void;
|
24
|
-
abs({ number }: IMathArgs): number;
|
25
|
-
acos({ angle }: IMathArgs): number;
|
26
|
-
asin({ angle }: IMathArgs): number;
|
27
|
-
atan({ angle }: IMathArgs): number;
|
28
|
-
avg(_: IMathArgs, numbers: number[]): number;
|
29
|
-
ceil({ number }: IMathArgs): number;
|
30
|
-
floor({ number }: IMathArgs): number;
|
31
|
-
cos({ angle }: IMathArgs): number;
|
32
|
-
sin({ angle }: IMathArgs): number;
|
33
|
-
tan({ angle }: IMathArgs): number;
|
34
|
-
exp({ number }: IMathArgs): number;
|
35
|
-
log({ number }: IMathArgs): number;
|
36
|
-
log10({ number }: IMathArgs): number;
|
37
|
-
max(_: IMathArgs, numbers: number[]): number | undefined;
|
38
|
-
min(_: IMathArgs, numbers: number[]): number | undefined;
|
39
|
-
pow({ base, exponent }: IMathArgs): number;
|
40
|
-
random({ min, max, seed }: IMathArgs): number;
|
41
|
-
round({ number, precision }: IMathArgs): number;
|
42
|
-
round_to_mintick({ number }: IMathArgs): number;
|
43
|
-
sign({ number }: IMathArgs): number | undefined;
|
44
|
-
sqrt({ number }: IMathArgs): number;
|
45
|
-
sum({ source, length }: IMathArgs, posStr: string): number | undefined;
|
46
|
-
todegrees({ radians }: IMathArgs): number;
|
47
|
-
toradians({ degrees }: IMathArgs): number;
|
48
|
-
}
|
49
|
-
export {};
|