@guihz/trading-vue-editor-tes 0.1.18 → 0.1.19
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-CXp94-Z9.js → parserTccWorker-BCWxJvBi.js} +3328 -3278
- package/lib/assets/{scriptsRunWorker-BQFRfD9L.js → scriptsRunWorker-AjKVFLY2.js} +7401 -7395
- package/lib/components/editor/type/index.d.ts +1 -0
- package/lib/components/editor/utils/parserTccWorker.d.ts +1 -25
- package/lib/components/editor/v3/parseScript/constants.d.ts +2 -0
- package/lib/components/editor/v4/parseScript/constants.d.ts +2 -0
- package/lib/components/editor/v5/parseScript/constants.d.ts +2 -0
- package/lib/components/editor/v5/parseScript/constants_en.d.ts +134 -0
- package/lib/components/editor/v5/parserTccWorker.d.ts +1 -1
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/strategy.d.ts +1 -1
- package/lib/components/editor/v6/parseScript/constants.d.ts +4 -0
- package/lib/components/editor/v6/parserTccWorker.d.ts +1 -1
- package/lib/trading-vue-editor.es.packages.js +2 -2
- package/lib/trading-vue-editor.umd.packages.mjs +20 -20
- package/package.json +1 -1
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/strategyNew.d.ts +0 -261
@@ -1,29 +1,5 @@
|
|
1
1
|
import { IKeyObjectValue } from "../type";
|
2
|
-
export declare function parseTcc(program: string, hasTranscoding: boolean, getImportLibraryFunc: (obj: IKeyObjectValue) => IKeyObjectValue, keyObjs: IKeyObjectValue, version: number): Promise<
|
3
|
-
errors: any[];
|
4
|
-
functions: {
|
5
|
-
[k: string]: import("../type").IDocValue[];
|
6
|
-
};
|
7
|
-
variables: {
|
8
|
-
[k: string]: import("../type").IDocValue[];
|
9
|
-
};
|
10
|
-
types: {
|
11
|
-
[k: string]: import("../type").IDocValue[];
|
12
|
-
};
|
13
|
-
methods: {
|
14
|
-
[k: string]: import("../type").IDocValue[];
|
15
|
-
};
|
16
|
-
overloadsFuncs: import("../type").IKeyValue[];
|
17
|
-
imports: {
|
18
|
-
[k: string]: IKeyObjectValue;
|
19
|
-
};
|
20
|
-
enums: {
|
21
|
-
[k: string]: import("../type").IDocValue[];
|
22
|
-
};
|
23
|
-
codeStr: string;
|
24
|
-
preParserCode: string | undefined;
|
25
|
-
config: IKeyObjectValue;
|
26
|
-
} | undefined>;
|
2
|
+
export declare function parseTcc(program: string, hasTranscoding: boolean, getImportLibraryFunc: (obj: IKeyObjectValue) => IKeyObjectValue, keyObjs: IKeyObjectValue, version: number): Promise<IKeyObjectValue>;
|
27
3
|
export declare function parseLibraryCode(program: string, libTitle: string, getImportLibraryFunc: (obj: IKeyObjectValue) => IKeyObjectValue, keyObjs: IKeyObjectValue): Promise<{
|
28
4
|
description: string;
|
29
5
|
codeStr: string;
|
@@ -102,6 +102,8 @@ export declare const ERRORS_TIPS: {
|
|
102
102
|
matrixSetValueErr: string;
|
103
103
|
matrixRowsColsEqErr: string;
|
104
104
|
matrixMultErr: string;
|
105
|
+
maxOpenOrdersErr: string;
|
106
|
+
historyReferencingOperatorErr: string;
|
105
107
|
};
|
106
108
|
export declare const WARNING_TIPS: {
|
107
109
|
repeatVar: string;
|
@@ -0,0 +1,134 @@
|
|
1
|
+
import { VType } from "./enum";
|
2
|
+
export declare const ERRORS_TIPS: {
|
3
|
+
onlyInLoop: string;
|
4
|
+
invalidType: string;
|
5
|
+
typeUseError: string;
|
6
|
+
notTypeKeyword: string;
|
7
|
+
undeclared: string;
|
8
|
+
repeatVar: string;
|
9
|
+
typeRepeatErr: string;
|
10
|
+
typeMismatch: string;
|
11
|
+
assignTypeMismatch: string;
|
12
|
+
voidNotVar: string;
|
13
|
+
declareTypeErr: string;
|
14
|
+
mapKeyValErr: string;
|
15
|
+
inputSourceErr: string;
|
16
|
+
buildInUseErr: string;
|
17
|
+
argsLenErr: string;
|
18
|
+
requiredParamErr: string;
|
19
|
+
argsSyntaxErr: string;
|
20
|
+
requestArgsErr: string;
|
21
|
+
mapKeyErr: string;
|
22
|
+
templateErr: string;
|
23
|
+
templateNoSupportErr: string;
|
24
|
+
ifOrSwitchTypeErr: string;
|
25
|
+
argsNameErr: string;
|
26
|
+
noFiledErr: string;
|
27
|
+
methodNotExistErr: string;
|
28
|
+
tupleVarErr: string;
|
29
|
+
tupleLeftVarErr: string;
|
30
|
+
tupleRightVarErr: string;
|
31
|
+
tempateTypeErr: string;
|
32
|
+
qualifierErr: string;
|
33
|
+
notFindFuncErr: string;
|
34
|
+
naVarErr: string;
|
35
|
+
notHistoryErr: string;
|
36
|
+
defaultValueErr: string;
|
37
|
+
defaultValueTypeErr: string;
|
38
|
+
typeFieldErr: string;
|
39
|
+
unaryErr: string;
|
40
|
+
funcArgAssignErr: string;
|
41
|
+
declaredErr: string;
|
42
|
+
globalFuncErr: string;
|
43
|
+
onlyStatementErr: string;
|
44
|
+
modifyGlobalVarErr: string;
|
45
|
+
inputDefvalErr: string;
|
46
|
+
objectIsNaErr: string;
|
47
|
+
buidinAssignErr: string;
|
48
|
+
buidinVarErr: string;
|
49
|
+
useNaErr: string;
|
50
|
+
libraryTitleErr: string;
|
51
|
+
exportFuncArgErr: string;
|
52
|
+
indiRunErr: string;
|
53
|
+
libraryExportErr: string;
|
54
|
+
strategyRunErr: string;
|
55
|
+
exportUseErr: string;
|
56
|
+
funcRepeatErr: string;
|
57
|
+
importMultipleErr: string;
|
58
|
+
importNotExitErr: string;
|
59
|
+
importNameRepeatErr: string;
|
60
|
+
exportFuncHasInputErr: string;
|
61
|
+
libraryTitleIsKeywordErr: string;
|
62
|
+
exportFuncUseGlobalVarErr: string;
|
63
|
+
loopRuntimeErr: string;
|
64
|
+
paramsErr: string;
|
65
|
+
displayErr: string;
|
66
|
+
exportFuncUseReqErr: string;
|
67
|
+
requestExprErr: string;
|
68
|
+
argDefaultErr: string;
|
69
|
+
overloadFuncErr: string;
|
70
|
+
againAssignErr: string;
|
71
|
+
requestUserInLoopErr: string;
|
72
|
+
enumVarNameErr: string;
|
73
|
+
enumVarNameBuiltinErr: string;
|
74
|
+
typeNameErr: string;
|
75
|
+
enumUseErr: string;
|
76
|
+
conditionalErr: string;
|
77
|
+
fortoErr: string;
|
78
|
+
indicatorUseStrategyFuncErr: string;
|
79
|
+
arrEmptyErr: string;
|
80
|
+
arrLengthDiffErr: string;
|
81
|
+
arrTypeErr: string;
|
82
|
+
inputOptErr: string;
|
83
|
+
mathRandomErr: string;
|
84
|
+
matrixRehapeErr: string;
|
85
|
+
strategyExitErr: string;
|
86
|
+
arrLenErr: string;
|
87
|
+
mergeCellErr: string;
|
88
|
+
minOrMaxErr: string;
|
89
|
+
requestsNumErr: string;
|
90
|
+
undeterminedTypeMethodErr: string;
|
91
|
+
requestUseFuncErr: string;
|
92
|
+
requestLowerTfPeriodErr: string;
|
93
|
+
optionsRepeatErr: string;
|
94
|
+
scriptLongTimeErr: string;
|
95
|
+
plotFillForceOverlayErr: string;
|
96
|
+
constModifyErr: string;
|
97
|
+
arrMaxLenErr: string;
|
98
|
+
arrSetValueErr: string;
|
99
|
+
matrixMaxLenErr: string;
|
100
|
+
matrixToFromErr: string;
|
101
|
+
matrixAddRowColErr: string;
|
102
|
+
matrixSetValueErr: string;
|
103
|
+
matrixRowsColsEqErr: string;
|
104
|
+
matrixMultErr: string;
|
105
|
+
};
|
106
|
+
export declare const WARNING_TIPS: {
|
107
|
+
repeatVar: string;
|
108
|
+
typeMismatch: string;
|
109
|
+
moreSameArg: string;
|
110
|
+
localScopeGetHistory: string;
|
111
|
+
localScopeWarning: string;
|
112
|
+
strategyCalcTickWarn: string;
|
113
|
+
conditionWarning: string;
|
114
|
+
lineWidthWarning: string;
|
115
|
+
boolVarNumWarning: string;
|
116
|
+
transpDeprecatedTips: string;
|
117
|
+
};
|
118
|
+
export declare const DRAW_TYPES: VType[];
|
119
|
+
export declare const QUALIFIERS: VType[];
|
120
|
+
export declare const BASE_TYPE: VType[];
|
121
|
+
export declare const PLOT_DISPLAY_TYPES: string[];
|
122
|
+
export declare const ONLY_STATEMENTS: string[];
|
123
|
+
export declare const GLOBAL_DRAW_FUNCS: string[];
|
124
|
+
export declare const GLOBAL_FUNCS: string[];
|
125
|
+
export declare const INDICATOR_NEED_DRAW_FUNCS: string[];
|
126
|
+
export declare const STRATEGY_NEED_FUNCS: string[];
|
127
|
+
export declare const NAMESPACE_CALL_SELF_FUNCS: string[];
|
128
|
+
export declare const SOURCE_TYPE_BUILTIN: string[];
|
129
|
+
export declare const COMMENTS_DESC_REG: RegExp;
|
130
|
+
export declare const JS_KEYWORDS: string[];
|
131
|
+
export declare const TCC_KEYWORDS: string[];
|
132
|
+
export declare const TCC_NAMESAPCES: string[];
|
133
|
+
export declare const CHANGE_VALUE_FUNCS: string[];
|
134
|
+
export declare const TRANSP_FUNCS: string[];
|
@@ -25,7 +25,7 @@ export declare function parseTcc(program: string, hasTranscoding: boolean, getIm
|
|
25
25
|
codeStr: string;
|
26
26
|
preParserCode: string | undefined;
|
27
27
|
config: IKeyObjectValue;
|
28
|
-
}
|
28
|
+
}>;
|
29
29
|
export declare function parseLibraryCode(program: string, libTitle: string, getImportLibraryFunc: (obj: IKeyObjectValue) => IKeyObjectValue, keyObjs: IKeyObjectValue): Promise<{
|
30
30
|
description: string;
|
31
31
|
codeStr: string;
|
@@ -46,7 +46,7 @@ export declare class Strategy {
|
|
46
46
|
private _calcMaxDrawdownAndMaxRunup;
|
47
47
|
updateOrders(orders: IOrder[], isRemove?: boolean): void;
|
48
48
|
private _calcMaxContracts;
|
49
|
-
|
49
|
+
updateHistoryOrderCalcData(): void;
|
50
50
|
private _createBalanceByInterval;
|
51
51
|
updateHistoryOrder(order?: IOrder): void;
|
52
52
|
updateStrategyOptions(options: IStrategy): void;
|
@@ -103,6 +103,10 @@ export declare const ERRORS_TIPS: {
|
|
103
103
|
matrixRowsColsEqErr: string;
|
104
104
|
matrixMultErr: string;
|
105
105
|
maxOpenOrdersErr: string;
|
106
|
+
historyReferencingOperatorErr: string;
|
107
|
+
historyReferencingOperatorUseFieldErr: string;
|
108
|
+
moreSameArgErr: string;
|
109
|
+
lineWidthErr: string;
|
106
110
|
};
|
107
111
|
export declare const WARNING_TIPS: {
|
108
112
|
repeatVar: string;
|
@@ -25,7 +25,7 @@ export declare function parseTcc(program: string, hasTranscoding: boolean, getIm
|
|
25
25
|
codeStr: string;
|
26
26
|
preParserCode: string | undefined;
|
27
27
|
config: IKeyObjectValue;
|
28
|
-
}
|
28
|
+
}>;
|
29
29
|
export declare function parseLibraryCode(program: string, libTitle: string, getImportLibraryFunc: (obj: IKeyObjectValue) => IKeyObjectValue, keyObjs: IKeyObjectValue): Promise<{
|
30
30
|
description: string;
|
31
31
|
codeStr: string;
|
@@ -9160,14 +9160,14 @@ function mr(i, n, r) {
|
|
9160
9160
|
function E1() {
|
9161
9161
|
return new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
|
9162
9162
|
}
|
9163
|
-
const kf = new Worker(new URL("" + new URL("assets/scriptsRunWorker-
|
9163
|
+
const kf = new Worker(new URL("" + new URL("assets/scriptsRunWorker-AjKVFLY2.js", import.meta.url).href, import.meta.url), { type: "module", name: "Run MineScript Server" });
|
9164
9164
|
kf.onerror = (i) => {
|
9165
9165
|
console.error(i);
|
9166
9166
|
};
|
9167
9167
|
async function Lf(i) {
|
9168
9168
|
return await _o.setInlayHints(i);
|
9169
9169
|
}
|
9170
|
-
const Tf = pa(kf), Nf = pa(new Worker(new URL("" + new URL("assets/parserTccWorker-
|
9170
|
+
const Tf = pa(kf), Nf = pa(new Worker(new URL("" + new URL("assets/parserTccWorker-BCWxJvBi.js", import.meta.url).href, import.meta.url), { type: "module", name: "Parser MineScript Server" }));
|
9171
9171
|
async function I1(i, n = !1, r = Xt) {
|
9172
9172
|
const s = await An(r);
|
9173
9173
|
if (!s)
|