@guihz/trading-vue-editor-tes 0.0.302 → 0.1.2

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 (167) hide show
  1. package/lib/assets/editor.worker-BxEYBjj-.js +7352 -0
  2. package/lib/assets/parserTccWorker-DzTqNT47.js +80539 -0
  3. package/lib/assets/scriptsRunWorker-RM2NRIoU.js +37755 -0
  4. package/lib/components/diffEditor/index.d.ts +1 -0
  5. package/lib/components/editor/config/monarchTokens.d.ts +2 -4
  6. package/lib/components/editor/constants/common.d.ts +38 -0
  7. package/lib/components/editor/constants/locals.d.ts +1 -0
  8. package/lib/components/editor/index.d.ts +1 -0
  9. package/lib/components/editor/tokenizer/utils.d.ts +0 -16
  10. package/lib/components/editor/type/index.d.ts +32 -1
  11. package/lib/components/editor/utils/completions.d.ts +3 -1
  12. package/lib/components/editor/utils/importLibrary.d.ts +2 -160
  13. package/lib/components/editor/utils/initEditor.d.ts +3 -0
  14. package/lib/components/editor/utils/parse.d.ts +2 -0
  15. package/lib/components/editor/utils/parserTccWorker.d.ts +1 -7
  16. package/lib/components/editor/utils/scriptsRunWorker.d.ts +1 -1
  17. package/lib/components/editor/utils/signatureHelp.d.ts +2 -0
  18. package/lib/components/editor/utils/tools.d.ts +6 -0
  19. package/lib/components/editor/v3/config/monarchTokens.d.ts +3 -0
  20. package/lib/components/editor/v3/constants/contents_zh.d.ts +6 -0
  21. package/lib/components/editor/{constants/contents.d.ts → v3/constants/index.d.ts} +1 -5
  22. package/lib/components/editor/v3/parseScript/buildInConstants.d.ts +179 -0
  23. package/lib/components/editor/v3/parseScript/buildInFuncNamespace/index.d.ts +9 -0
  24. package/lib/components/editor/v3/parseScript/buildInFuncNamespace/input.d.ts +43 -0
  25. package/lib/components/editor/v3/parseScript/buildInFuncNamespace/math.d.ts +50 -0
  26. package/lib/components/editor/v3/parseScript/buildInFuncNamespace/strategy.d.ts +243 -0
  27. package/lib/components/editor/v3/parseScript/buildInFuncNamespace/ta.d.ts +102 -0
  28. package/lib/components/editor/{parseScript → v3/parseScript}/buildInFuncNamespace/timeframe.d.ts +1 -1
  29. package/lib/components/editor/v3/parseScript/buildInVarNamespace/barstate.d.ts +19 -0
  30. package/lib/components/editor/v3/parseScript/buildInVarNamespace/index.d.ts +4 -0
  31. package/lib/components/editor/v3/parseScript/buildInVarNamespace/strategy.d.ts +126 -0
  32. package/lib/components/editor/v3/parseScript/buildInVarNamespace/syminfo.d.ts +22 -0
  33. package/lib/components/editor/v3/parseScript/buildInVarNamespace/ta.d.ts +17 -0
  34. package/lib/components/editor/v3/parseScript/buildInVariables.d.ts +96 -0
  35. package/lib/components/editor/v3/parseScript/constants.d.ts +119 -0
  36. package/lib/components/editor/v3/parseScript/enum.d.ts +283 -0
  37. package/lib/components/editor/v3/parseScript/parseToJs.d.ts +65 -0
  38. package/lib/components/editor/v3/parseScript/runType.d.ts +119 -0
  39. package/lib/components/editor/v3/parseScript/strategyNamespace/index.d.ts +2 -0
  40. package/lib/components/editor/{parseScript → v3/parseScript}/type.d.ts +1 -1
  41. package/lib/components/editor/v3/parseScript/utils.d.ts +21 -0
  42. package/lib/components/editor/v3/parseScript/visitorParser.d.ts +321 -0
  43. package/lib/components/editor/v3/parseScript/visitorUtils.d.ts +25 -0
  44. package/lib/components/editor/v3/parserTccWorker.d.ts +32 -0
  45. package/lib/components/editor/v3/scriptsRunWorker.d.ts +11 -0
  46. package/lib/{tccParser → components/editor/v3/tccParser}/LexerBase.d.ts +1 -1
  47. package/lib/components/editor/v3/tccParser/tccScriptParserVisitor.d.ts +359 -0
  48. package/lib/components/editor/v4/config/monarchTokens.d.ts +205 -0
  49. package/lib/components/editor/v4/constants/contents_zh.d.ts +6 -0
  50. package/lib/components/editor/v4/constants/index.d.ts +44 -0
  51. package/lib/components/editor/v4/parseScript/buildInConstants.d.ts +308 -0
  52. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/array.d.ts +84 -0
  53. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/box.d.ts +60 -0
  54. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/errorListener.d.ts +9 -0
  55. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/index.d.ts +17 -0
  56. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/input.d.ts +44 -0
  57. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/label.d.ts +61 -0
  58. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/line.d.ts +62 -0
  59. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/math.d.ts +50 -0
  60. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/strategy.d.ts +244 -0
  61. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/string.d.ts +38 -0
  62. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/ta.d.ts +118 -0
  63. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/table.d.ts +87 -0
  64. package/lib/components/editor/v4/parseScript/buildInFuncNamespace/timeframe.d.ts +22 -0
  65. package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/barstate.d.ts +1 -1
  66. package/lib/components/editor/v4/parseScript/buildInVarNamespace/index.d.ts +8 -0
  67. package/lib/components/editor/v4/parseScript/buildInVarNamespace/strategy.d.ts +126 -0
  68. package/lib/components/editor/v4/parseScript/buildInVarNamespace/syminfo.d.ts +18 -0
  69. package/lib/components/editor/v4/parseScript/buildInVarNamespace/ta.d.ts +34 -0
  70. package/lib/components/editor/{parseScript → v4/parseScript}/constants.d.ts +1 -160
  71. package/lib/components/editor/v4/parseScript/constantsRun.d.ts +3 -0
  72. package/lib/components/editor/v4/parseScript/enum.d.ts +282 -0
  73. package/lib/components/editor/v4/parseScript/parseToJs.d.ts +65 -0
  74. package/lib/components/editor/v4/parseScript/strategyNamespace/index.d.ts +2 -0
  75. package/lib/components/editor/v4/parseScript/strategyNamespace/risk.d.ts +22 -0
  76. package/lib/components/editor/v4/parseScript/type.d.ts +39 -0
  77. package/lib/components/editor/v4/parseScript/utils.d.ts +21 -0
  78. package/lib/components/editor/v4/parseScript/visitorParser.d.ts +323 -0
  79. package/lib/components/editor/v4/parseScript/visitorUtils.d.ts +29 -0
  80. package/lib/components/editor/v4/parserTccWorker.d.ts +32 -0
  81. package/lib/components/editor/v4/scriptsRunWorker.d.ts +11 -0
  82. package/lib/components/editor/v4/tccParser/LexerBase.d.ts +19 -0
  83. package/lib/components/editor/v4/tccParser/tccScriptParserVisitor.d.ts +401 -0
  84. package/lib/components/editor/v5/config/monarchTokens.d.ts +205 -0
  85. package/lib/components/editor/v5/constants/contents_en.d.ts +6 -0
  86. package/lib/components/editor/{constants → v5/constants}/contents_zh.d.ts +1 -1
  87. package/lib/components/editor/v5/constants/index.d.ts +41 -0
  88. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/box.d.ts +2 -1
  89. package/lib/components/editor/v5/parseScript/buildInFuncNamespace/color.d.ts +25 -0
  90. package/lib/components/editor/v5/parseScript/buildInFuncNamespace/errorListener.d.ts +9 -0
  91. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/label.d.ts +1 -1
  92. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/line.d.ts +1 -1
  93. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/linefill.d.ts +1 -1
  94. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/log.d.ts +1 -1
  95. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/map.d.ts +1 -1
  96. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/math.d.ts +1 -1
  97. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/polyline.d.ts +1 -1
  98. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/strategy.d.ts +1 -1
  99. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/ta.d.ts +1 -1
  100. package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/table.d.ts +1 -1
  101. package/lib/components/editor/v5/parseScript/buildInFuncNamespace/timeframe.d.ts +22 -0
  102. package/lib/components/editor/v5/parseScript/buildInVarNamespace/barstate.d.ts +22 -0
  103. package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/chart.d.ts +1 -1
  104. package/lib/components/editor/v5/parseScript/buildInVarNamespace/dividends.d.ts +8 -0
  105. package/lib/components/editor/v5/parseScript/buildInVarNamespace/earnings.d.ts +9 -0
  106. package/lib/components/editor/v5/parseScript/buildInVarNamespace/session.d.ts +12 -0
  107. package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/strategy.d.ts +1 -1
  108. package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/syminfo.d.ts +1 -1
  109. package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/ta.d.ts +4 -3
  110. package/lib/components/editor/v5/parseScript/buildInVarNamespace/timeframe.d.ts +16 -0
  111. package/lib/components/editor/v5/parseScript/constants.d.ts +124 -0
  112. package/lib/components/editor/v5/parseScript/constantsRun.d.ts +3 -0
  113. package/lib/components/editor/{parseScript → v5/parseScript}/parseToJs.d.ts +1 -1
  114. package/lib/components/editor/{parseScript → v5/parseScript}/parseToLibJs.d.ts +1 -1
  115. package/lib/components/editor/v5/parseScript/strategyNamespace/risk.d.ts +22 -0
  116. package/lib/components/editor/v5/parseScript/type.d.ts +39 -0
  117. package/lib/components/editor/{parseScript → v5/parseScript}/userTypeClass.d.ts +1 -1
  118. package/lib/components/editor/{parseScript → v5/parseScript}/utils.d.ts +1 -1
  119. package/lib/components/editor/{parseScript → v5/parseScript}/visitorParser.d.ts +1 -1
  120. package/lib/components/editor/{parseScript → v5/parseScript}/visitorUtils.d.ts +2 -2
  121. package/lib/components/editor/v5/parserTccWorker.d.ts +40 -0
  122. package/lib/components/editor/v5/scriptsRunWorker.d.ts +11 -0
  123. package/lib/components/editor/v5/tccParser/LexerBase.d.ts +19 -0
  124. package/lib/{tccParser → components/editor/v5/tccParser}/tccScriptParserVisitor.d.ts +1 -1
  125. package/lib/components/referenceManual/components/ContentItem.d.ts +2 -0
  126. package/lib/components/referenceManual/index.d.ts +2 -0
  127. package/lib/components/referenceManualPage/components/ContentItem.d.ts +1 -0
  128. package/lib/components/referenceManualPage/components/ManualLeft.d.ts +5 -0
  129. package/lib/components/referenceManualPage/index.d.ts +2 -0
  130. package/lib/index-Ce2gRdFk.js +12813 -0
  131. package/lib/index-CjECfhIW.js +28088 -0
  132. package/lib/index-S1gW0Mpf.js +59972 -0
  133. package/lib/monarchTokens-CMDv_iys.js +563 -0
  134. package/lib/monarchTokens-Cj3v8l0Q.js +526 -0
  135. package/lib/monarchTokens-CnFYyHnR.js +191 -0
  136. package/lib/packages/index.d.ts +3 -3
  137. package/lib/trading-vue-editor.es.packages.js +6344 -66617
  138. package/lib/trading-vue-editor.umd.packages.mjs +117 -75
  139. package/lib/utils/tools.d.ts +8 -3
  140. package/package.json +1 -1
  141. package/lib/assets/editor.worker-CT5Cb1wO.js +0 -11
  142. package/lib/assets/parserTccWorker-cjv11J0f.js +0 -279
  143. package/lib/assets/scriptsRunWorker-ISxcgzMz.js +0 -91
  144. /package/lib/components/editor/{parseScript → v3/parseScript}/buildInFuncNamespace/errorListener.d.ts +0 -0
  145. /package/lib/components/editor/{parseScript → v3/parseScript}/constantsRun.d.ts +0 -0
  146. /package/lib/components/editor/{parseScript → v3/parseScript}/strategyNamespace/risk.d.ts +0 -0
  147. /package/lib/components/editor/{parseScript → v4/parseScript}/buildInFuncNamespace/color.d.ts +0 -0
  148. /package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/dividends.d.ts +0 -0
  149. /package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/earnings.d.ts +0 -0
  150. /package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/session.d.ts +0 -0
  151. /package/lib/components/editor/{parseScript → v4/parseScript}/buildInVarNamespace/timeframe.d.ts +0 -0
  152. /package/lib/components/editor/{constants → v5/constants}/newContents_en.d.ts +0 -0
  153. /package/lib/components/editor/{constants → v5/constants}/newContents_zh.d.ts +0 -0
  154. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInConstants.d.ts +0 -0
  155. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/array.d.ts +0 -0
  156. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/chartPoint.d.ts +0 -0
  157. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/index.d.ts +0 -0
  158. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/input.d.ts +0 -0
  159. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/matrix.d.ts +0 -0
  160. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/runtime.d.ts +0 -0
  161. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/string.d.ts +0 -0
  162. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInFuncNamespace/syminfo.d.ts +0 -0
  163. /package/lib/components/editor/{parseScript → v5/parseScript}/buildInVarNamespace/index.d.ts +0 -0
  164. /package/lib/components/editor/{parseScript → v5/parseScript}/enum.d.ts +0 -0
  165. /package/lib/components/editor/{parseScript → v5/parseScript}/strategyNamespace/closedtrades.d.ts +0 -0
  166. /package/lib/components/editor/{parseScript → v5/parseScript}/strategyNamespace/index.d.ts +0 -0
  167. /package/lib/components/editor/{parseScript → v5/parseScript}/strategyNamespace/opentrades.d.ts +0 -0
@@ -0,0 +1,25 @@
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
+ }
@@ -0,0 +1,9 @@
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,4 +1,4 @@
1
- import { IKeyObjectValue } from "../../type";
1
+ import { IKeyObjectValue } from "../../../type";
2
2
  import { BuiltInVariables } from "../buildInVariables";
3
3
  import { VLabelStyle, VSize, VText, VXloc, VYloc } from "../enum";
4
4
  import { IDrawComponent } from "../type";
@@ -1,4 +1,4 @@
1
- import { IKeyObjectValue } from "../../type";
1
+ import { IKeyObjectValue } from "../../../type";
2
2
  import { BuiltInVariables } from "../buildInVariables";
3
3
  import { VExtend, VLineStyle, VXloc } from "../enum";
4
4
  import { IDrawComponent } from "../type";
@@ -1,4 +1,4 @@
1
- import { IKeyObjectValue } from "../../type";
1
+ import { IKeyObjectValue } from "../../../type";
2
2
  import { BuiltInVariables } from "../buildInVariables";
3
3
  import { IDrawComponent } from "../type";
4
4
  import { ILineArgs, ILine } from "./line";
@@ -1,6 +1,6 @@
1
1
  import { BuiltInVariables } from "../buildInVariables";
2
2
  import { BuildInStr } from ".";
3
- import { IKeyObjectValue } from "../../type";
3
+ import { IKeyObjectValue } from "../../../type";
4
4
  interface ILogArgs {
5
5
  message?: string;
6
6
  formatString?: string;
@@ -1,4 +1,4 @@
1
- import { IKeyObjectValue } from "../../type";
1
+ import { IKeyObjectValue } from "../../../type";
2
2
  import { VInsType } from "../enum";
3
3
  interface IMapArgs {
4
4
  id?: IPseudoMap;
@@ -1,4 +1,4 @@
1
- import { IKeyObjectValue } from "../../type";
1
+ import { IKeyObjectValue } from "../../../type";
2
2
  interface IMathArgs {
3
3
  number?: number;
4
4
  angle?: number;
@@ -2,7 +2,7 @@ import { TccErrorListener } from "./index";
2
2
  import { BuiltInVariables } from "../buildInVariables";
3
3
  import { VLineStyle, VXloc } from "../enum";
4
4
  import { IDrawComponent } from "../type";
5
- import { IKeyObjectValue } from "../../type";
5
+ import { IKeyObjectValue } from "../../../type";
6
6
  export interface IPolyline {
7
7
  id?: string;
8
8
  points?: IKeyObjectValue;
@@ -1,5 +1,5 @@
1
1
  import { TccErrorListener } from ".";
2
- import { IKeyObjectValue } from "../../type";
2
+ import { IKeyObjectValue } from "../../../type";
3
3
  import { BuiltInVariables } from "../buildInVariables";
4
4
  import { VCommission, VDirection, VFormatType, VOca, VScale, VStrategy } from "../enum";
5
5
  import { Closedtrdes, Opentrades, Risk } from '../strategyNamespace';
@@ -1,4 +1,4 @@
1
- import { IKeyObjectValue } from "../../type";
1
+ import { IKeyObjectValue } from "../../../type";
2
2
  import { BuiltInVariables } from "../buildInVariables";
3
3
  import BuildInTimeframe from "./timeframe";
4
4
  import BuildInMath from "./math";
@@ -1,4 +1,4 @@
1
- import { IKeyObjectValue } from "../../type";
1
+ import { IKeyObjectValue } from "../../../type";
2
2
  import { BuiltInVariables } from "../buildInVariables";
3
3
  import { VPosition, VSize, VText } from "../enum";
4
4
  import { IDrawComponent } from "../type";
@@ -0,0 +1,22 @@
1
+ import { IKeyObjectValue } from "../../../type";
2
+ import { BuiltInVariables } from "../buildInVariables";
3
+ interface ITimeArgs {
4
+ timeframe?: string;
5
+ session?: string;
6
+ timezone?: string;
7
+ bars_back?: number;
8
+ time?: number;
9
+ seconds?: number;
10
+ }
11
+ export default class BuildInTimeframe {
12
+ private _variables;
13
+ private _cacheData;
14
+ constructor(variables: BuiltInVariables);
15
+ get _timeframeCacheData(): IKeyObjectValue;
16
+ set _timeframeCacheData(data: IKeyObjectValue);
17
+ change({ timeframe }: ITimeArgs, posStr: string): any;
18
+ in_seconds({ timeframe }?: ITimeArgs): number;
19
+ from_seconds({ seconds }: ITimeArgs): string;
20
+ private _calcTimeOffset;
21
+ }
22
+ export {};
@@ -0,0 +1,22 @@
1
+ import { IKeyObjectValue } from "../../../type";
2
+ export declare class Barstate {
3
+ private _isMarketOpen;
4
+ private _currentBarIndex;
5
+ private _totalBarIndex;
6
+ private _isRealTimeBar;
7
+ private _preBarIndex;
8
+ private _preIsRealTimeBar;
9
+ private _isFirstRun;
10
+ constructor();
11
+ update(currentBarIndex: number, totalBarIndex: number, isRealTimeBar: boolean, isMarketOpen: boolean): void;
12
+ get _barstateCacheData(): IKeyObjectValue;
13
+ set _barstateCacheData(val: IKeyObjectValue);
14
+ set isFirstRun(status: boolean);
15
+ get isnew(): boolean;
16
+ get islast(): boolean;
17
+ get isfirst(): boolean;
18
+ get ishistory(): boolean;
19
+ get isrealtime(): boolean;
20
+ get isconfirmed(): boolean;
21
+ get islastconfirmedhistory(): boolean;
22
+ }
@@ -1,4 +1,4 @@
1
- import { IKeyObjectValue } from "../../type";
1
+ import { IKeyObjectValue } from "../../../type";
2
2
  export declare class Chart {
3
3
  private _bgColor?;
4
4
  private _fgColor?;
@@ -0,0 +1,8 @@
1
+ import { BuiltInVariables } from "../buildInVariables";
2
+ export declare class Dividends {
3
+ private _variables;
4
+ constructor(variables: BuiltInVariables);
5
+ get future_amount(): undefined;
6
+ get future_ex_date(): undefined;
7
+ get future_pay_date(): undefined;
8
+ }
@@ -0,0 +1,9 @@
1
+ import { BuiltInVariables } from "../buildInVariables";
2
+ export declare class Earnings {
3
+ private _variables;
4
+ constructor(variables: BuiltInVariables);
5
+ get future_eps(): undefined;
6
+ get future_period_end_time(): undefined;
7
+ get future_revenue(): undefined;
8
+ get future_time(): undefined;
9
+ }
@@ -0,0 +1,12 @@
1
+ import { BuiltInVariables } from "../buildInVariables";
2
+ export declare class Session {
3
+ private _variables;
4
+ constructor(variables: BuiltInVariables);
5
+ get isfirstbar(): boolean;
6
+ get isfirstbar_regular(): boolean;
7
+ get islastbar(): boolean;
8
+ get islastbar_regular(): boolean;
9
+ get ismarket(): boolean;
10
+ get ispostmarket(): boolean;
11
+ get ispremarket(): boolean;
12
+ }
@@ -1,4 +1,4 @@
1
- import { IKeyObjectValue } from "../../type";
1
+ import { IKeyObjectValue } from "../../../type";
2
2
  import { IOrder, IStrategy } from "../buildInFuncNamespace";
3
3
  import { BuiltInVariables } from "../buildInVariables";
4
4
  import { VDirection } from "../enum";
@@ -1,4 +1,4 @@
1
- import { IKeyObjectValue } from "../../type";
1
+ import { IKeyObjectValue } from "../../../type";
2
2
  export declare class Syminfo {
3
3
  private _syminfo;
4
4
  update(syminfo: IKeyObjectValue): void;
@@ -1,4 +1,5 @@
1
- import { IKeyObjectValue } from "../../type";
1
+ import { IKeyObjectValue } from "../../../type";
2
+ import { BuiltInVariables } from "../buildInVariables";
2
3
  export declare class Ta {
3
4
  private _preAccdist;
4
5
  private _preNvi;
@@ -10,8 +11,8 @@ export declare class Ta {
10
11
  private _preValue;
11
12
  private _currentData;
12
13
  private _preData;
13
- private _id;
14
- constructor(id: string);
14
+ private _variables;
15
+ constructor(variables: BuiltInVariables);
15
16
  get _varTaCacheData(): IKeyObjectValue;
16
17
  set _varTaCacheData(data: IKeyObjectValue);
17
18
  update(currentData: IKeyObjectValue): void;
@@ -0,0 +1,16 @@
1
+ export declare class Timeframe {
2
+ private _period;
3
+ private _multiplier;
4
+ private _unit;
5
+ constructor();
6
+ update(period: string): void;
7
+ get isdaily(): boolean;
8
+ get isdwm(): boolean;
9
+ get isintraday(): boolean;
10
+ get isminutes(): boolean;
11
+ get ismonthly(): boolean;
12
+ get isseconds(): boolean;
13
+ get isweekly(): boolean;
14
+ get multiplier(): number;
15
+ get period(): string;
16
+ }
@@ -0,0 +1,124 @@
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
+ };
97
+ export declare const WARNING_TIPS: {
98
+ repeatVar: string;
99
+ typeMismatch: string;
100
+ moreSameArg: string;
101
+ localScopeGetHistory: string;
102
+ localScopeWarning: string;
103
+ strategyCalcTickWarn: string;
104
+ conditionWarning: string;
105
+ lineWidthWarning: string;
106
+ boolVarNumWarning: string;
107
+ transpDeprecatedTips: string;
108
+ };
109
+ export declare const QUALIFIERS: VType[];
110
+ export declare const BASE_TYPE: VType[];
111
+ export declare const PLOT_DISPLAY_TYPES: string[];
112
+ export declare const ONLY_STATEMENTS: string[];
113
+ export declare const GLOBAL_DRAW_FUNCS: string[];
114
+ export declare const GLOBAL_FUNCS: string[];
115
+ export declare const INDICATOR_NEED_DRAW_FUNCS: string[];
116
+ export declare const STRATEGY_NEED_FUNCS: string[];
117
+ export declare const NAMESPACE_CALL_SELF_FUNCS: string[];
118
+ export declare const SOURCE_TYPE_BUILTIN: string[];
119
+ export declare const COMMENTS_DESC_REG: RegExp;
120
+ export declare const JS_KEYWORDS: string[];
121
+ export declare const TCC_KEYWORDS: string[];
122
+ export declare const TCC_NAMESAPCES: string[];
123
+ export declare const CHANGE_VALUE_FUNCS: string[];
124
+ export declare const TRANSP_FUNCS: string[];
@@ -0,0 +1,3 @@
1
+ export declare const PERIOD_MAP: Record<string, string>;
2
+ export declare const PERIOD_UNIT_MAP: Record<string, string>;
3
+ export declare const SYMBOL_MAP: Record<string, string>;
@@ -1,4 +1,4 @@
1
- import { IKeyObjectValue } from "../type";
1
+ import { IKeyObjectValue } from "../../type";
2
2
  export default class ParseToJs {
3
3
  private _nameMap;
4
4
  private _argChangeMap;
@@ -1,4 +1,4 @@
1
- import { IKeyObjectValue } from "../type";
1
+ import { IKeyObjectValue } from "../../type";
2
2
  export default class ParseToLibJs {
3
3
  private _nameMap;
4
4
  private _prefixNameVar;
@@ -0,0 +1,22 @@
1
+ import { Strategy, TccErrorListener } from "../buildInFuncNamespace";
2
+ import { VStrategy } from "../enum";
3
+ interface IRiskArgs {
4
+ value?: any;
5
+ count?: number;
6
+ alert_message?: string;
7
+ type?: VStrategy;
8
+ contracts?: number;
9
+ }
10
+ declare class Risk {
11
+ private _strategy;
12
+ private _errorListener;
13
+ constructor(strategy: Strategy, errorListener: TccErrorListener);
14
+ allow_entry_in({ value }: IRiskArgs, posStr: string): void;
15
+ max_cons_loss_days({ count }: IRiskArgs, posStr: string): void;
16
+ max_drawdown({ value, type }: IRiskArgs, posStr: string): void;
17
+ max_intraday_filled_orders({ count }: IRiskArgs, posStr: string): void;
18
+ max_intraday_loss({ value, type }: IRiskArgs, posStr: string): void;
19
+ max_position_size({ contracts }: IRiskArgs, posStr: string): void;
20
+ private _paramVerfiy;
21
+ }
22
+ export default Risk;
@@ -0,0 +1,39 @@
1
+ import { IKeyObjectValue } from "../../type";
2
+ import { VInsType } from "./enum";
3
+ interface IBase {
4
+ startColumn: number;
5
+ startLineNumber: number;
6
+ endColumn: number;
7
+ endLineNumber: number;
8
+ }
9
+ export declare enum VMarkerSeverity {
10
+ Hint = 1,
11
+ Info = 2,
12
+ Warning = 4,
13
+ Error = 8
14
+ }
15
+ export interface IPosition {
16
+ readonly lineNumber: number;
17
+ readonly column: number;
18
+ reName?: string;
19
+ }
20
+ export interface IRange {
21
+ readonly startLineNumber: number;
22
+ readonly startColumn: number;
23
+ readonly endLineNumber: number;
24
+ readonly endColumn: number;
25
+ }
26
+ export interface IError extends IBase {
27
+ message: string;
28
+ type?: VMarkerSeverity;
29
+ }
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
+ }
39
+ export {};
@@ -1,4 +1,4 @@
1
- import { IKeyObjectValue } from "../type";
1
+ import { IKeyObjectValue } from "../../type";
2
2
  declare class UserTypeClass {
3
3
  private _defaultParams;
4
4
  private _varipKeys;
@@ -1,4 +1,4 @@
1
- import { IKeyObjectValue, 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;
@@ -1,4 +1,4 @@
1
- import { IKeyObjectValue, IDocValue, IKeyValue } from '../type';
1
+ import { IKeyObjectValue, IDocValue, IKeyValue } from '../../type';
2
2
  import { VRuleType } from './enum';
3
3
  import { ParserUtils } from './visitorUtils';
4
4
  import { IError, IRange, IPosition } from "./type";
@@ -1,5 +1,5 @@
1
- import { IDocValue, IKeyObjectValue } from "../type";
2
- import TccScriptParserVisitor from '../../../tccParser/tccScriptParserVisitor';
1
+ import { IDocValue, IKeyObjectValue } from "../../type";
2
+ import TccScriptParserVisitor from '../tccParser/tccScriptParserVisitor';
3
3
  export declare class ParserUtils extends TccScriptParserVisitor<any> {
4
4
  protected _buildinVariables: Map<string, IDocValue[]>;
5
5
  protected _buildinTypes: Map<string, IDocValue[]>;
@@ -0,0 +1,40 @@
1
+ /// <reference path="../../../../src/vite-env.d.ts" />
2
+ import { ErrorListener } from "antlr4";
3
+ import { IKeyObjectValue } from "../type";
4
+ export declare function parseTcc(program: string, hasTranscoding: boolean, getImportLibraryFunc: (obj: IKeyObjectValue) => IKeyObjectValue, keyObjs: IKeyObjectValue): Promise<{
5
+ errors: any[];
6
+ functions: {
7
+ [k: string]: import("../type").IDocValue[];
8
+ };
9
+ variables: {
10
+ [k: string]: import("../type").IDocValue[];
11
+ };
12
+ types: {
13
+ [k: string]: import("../type").IDocValue[];
14
+ };
15
+ methods: {
16
+ [k: string]: import("../type").IDocValue[];
17
+ };
18
+ overloadsFuncs: import("../type").IKeyValue[];
19
+ imports: {
20
+ [k: string]: IKeyObjectValue;
21
+ };
22
+ enums: {
23
+ [k: string]: import("../type").IDocValue[];
24
+ };
25
+ codeStr: string;
26
+ preParserCode: string | undefined;
27
+ config: IKeyObjectValue;
28
+ }>;
29
+ export declare function parseLibraryCode(program: string, libTitle: string, getImportLibraryFunc: (obj: IKeyObjectValue) => IKeyObjectValue, keyObjs: IKeyObjectValue): Promise<{
30
+ description: string;
31
+ codeStr: string;
32
+ functions: import("../type").IDocValue[];
33
+ methods: import("../type").IDocValue[];
34
+ types: import("../type").IDocValue[];
35
+ enums: import("../type").IDocValue[];
36
+ }>;
37
+ export declare class ExprErrorListener extends ErrorListener {
38
+ errors: any[];
39
+ syntaxError(_: any, __: any, line: number, column: number, msg: string): void;
40
+ }
@@ -0,0 +1,11 @@
1
+ import { IKeyObjectValue } from '../type';
2
+ interface IRunResult {
3
+ status: number;
4
+ errors: any[];
5
+ requestList?: any[];
6
+ cacheData?: any;
7
+ options?: any;
8
+ }
9
+ export declare function runScript(strJs: string, options: IKeyObjectValue, isNew: boolean): Promise<IRunResult>;
10
+ export declare function removeScript(id: string): void;
11
+ export {};
@@ -0,0 +1,19 @@
1
+ /// <reference path="../../../../../src/vite-env.d.ts" />
2
+ import { Lexer } from "antlr4";
3
+ export default abstract class LexerBase extends Lexer {
4
+ tokens: any[];
5
+ indents: any[];
6
+ opened: number;
7
+ constructor(input: any);
8
+ reset(): void;
9
+ emitToken(token: any): void;
10
+ nextToken(): any;
11
+ createDedent(): any;
12
+ getCharIndex(): any;
13
+ commonToken(type: number, text: string): any;
14
+ getIndentationCount(whitespace: string): number;
15
+ atStartOfInput(): boolean;
16
+ openBrace(): void;
17
+ closeBrace(): void;
18
+ onNewLine(): void;
19
+ }
@@ -1,4 +1,4 @@
1
- /// <reference path="../../src/vite-env.d.ts" />
1
+ /// <reference path="../../../../../src/vite-env.d.ts" />
2
2
  import { ParseTreeVisitor } from 'antlr4';
3
3
  import { ProgramContext } from "./tccScriptParser";
4
4
  import { GlobalStmtContext } from "./tccScriptParser";
@@ -4,7 +4,9 @@ interface IProps {
4
4
  group: IKeyObjectValue | null;
5
5
  itemKey: string;
6
6
  currentIndex: number;
7
+ version: number;
7
8
  onItemClick: (key: string) => void;
9
+ keyMaps: IKeyObjectValue;
8
10
  }
9
11
  declare const ContentItem: FC<IProps>;
10
12
  export default ContentItem;
@@ -5,10 +5,12 @@ import "../../i18n";
5
5
  interface IProps {
6
6
  theme?: Theme;
7
7
  language?: string;
8
+ version?: number;
8
9
  currentValue: {
9
10
  index?: number;
10
11
  value?: string;
11
12
  };
13
+ onVersionChange?: (version: number) => void;
12
14
  onChange?: (key: string) => void;
13
15
  }
14
16
  declare const ReferenceManual: FC<IProps>;
@@ -5,6 +5,7 @@ interface IProps {
5
5
  item: IDocValue[];
6
6
  prefix: string;
7
7
  value?: IContent;
8
+ version: number;
8
9
  onItemClick: (key: string) => void;
9
10
  }
10
11
  declare const ContentItem: FC<IProps>;
@@ -7,6 +7,11 @@ interface IProps {
7
7
  selectItem: React.RefObject<string>;
8
8
  manualTabRef: React.RefObject<HTMLDivElement>;
9
9
  searchRef: React.RefObject<HTMLInputElement>;
10
+ contentGroups: IKeyObjectValue[];
11
+ manualKeys: IKeyObjectValue;
12
+ keyMaps: IKeyObjectValue;
13
+ version: number;
14
+ onVersionChange?: (version: number) => void;
10
15
  }
11
16
  declare const ReferenceManualLeft: FC<IProps>;
12
17
  export default ReferenceManualLeft;
@@ -5,6 +5,8 @@ import "../../i18n";
5
5
  interface IProps {
6
6
  theme?: Theme;
7
7
  language?: string;
8
+ version?: number;
9
+ onVersionChange?: (version: number) => void;
8
10
  }
9
11
  declare const ReferenceManual: FC<IProps>;
10
12
  export default ReferenceManual;