@guihz/trading-vue-editor-tes 0.0.76 → 0.0.78
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-C7fkhc8h.js → parserTccWorker-BdbN40Nb.js} +32 -32
- package/lib/assets/scriptsRunWorker-IIj5IJix.js +66 -0
- package/lib/components/editor/parseScript/buildInConstants.d.ts +3 -3
- package/lib/components/editor/parseScript/buildInFuncNamespace/box.d.ts +22 -17
- package/lib/components/editor/parseScript/buildInFuncNamespace/label.d.ts +8 -3
- package/lib/components/editor/parseScript/buildInFuncNamespace/line.d.ts +8 -3
- package/lib/components/editor/parseScript/buildInFuncNamespace/polyline.d.ts +5 -2
- package/lib/components/editor/parseScript/buildInFuncNamespace/strategy.d.ts +4 -3
- package/lib/components/editor/parseScript/buildInFuncNamespace/string.d.ts +4 -1
- package/lib/components/editor/parseScript/buildInFuncNamespace/table.d.ts +9 -4
- package/lib/components/editor/parseScript/constants.d.ts +3 -3
- package/lib/components/editor/parseScript/enum.d.ts +4 -0
- package/lib/components/editor/parseScript/strategyNamespace/risk.d.ts +7 -5
- package/lib/packages/index.d.ts +1 -1
- package/lib/trading-vue-editor.js +1602 -1598
- package/lib/trading-vue-editor.umd.cjs +2 -2
- package/package.json +1 -1
- package/lib/assets/scriptsRunWorker-Bq1EpqOm.js +0 -66
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            import { VPlotDisplay, VExtend, VFormatType, VHlineStyle, VLabelStyle, VLineStyle, VLocation, VSortOrder, VPlotStyle, VPosition, VAdjustment, VAlert, VBarmergeGaps, VScale, VSession, VShape, VSize, VStrategy, VCommission, VDirection, VOca, VText, VXloc, VYloc, VEarnings } from './enum';
         | 
| 1 | 
            +
            import { VPlotDisplay, VExtend, VFormatType, VHlineStyle, VLabelStyle, VLineStyle, VLocation, VSortOrder, VPlotStyle, VPosition, VAdjustment, VAlert, VBarmergeGaps, VScale, VSession, VShape, VSize, VStrategy, VCommission, VDirection, VOca, VText, VXloc, VYloc, VEarnings, VFont } from './enum';
         | 
| 2 2 | 
             
            export declare const COLOR_BUILD_IN: {
         | 
| 3 3 | 
             
                aqua: string;
         | 
| 4 4 | 
             
                black: string;
         | 
| @@ -139,8 +139,8 @@ export declare class BuildInConstants { | |
| 139 139 | 
             
                    right: VExtend;
         | 
| 140 140 | 
             
                };
         | 
| 141 141 | 
             
                font: {
         | 
| 142 | 
            -
                    family_default:  | 
| 143 | 
            -
                    family_monospace:  | 
| 142 | 
            +
                    family_default: VFont;
         | 
| 143 | 
            +
                    family_monospace: VFont;
         | 
| 144 144 | 
             
                };
         | 
| 145 145 | 
             
                format: {
         | 
| 146 146 | 
             
                    inherit: VFormatType;
         | 
| @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            import { BuiltInVariables } from "../buildInVariables";
         | 
| 2 2 | 
             
            import { VExtend, VLineStyle, VSize, VText, VXloc } from "../enum";
         | 
| 3 | 
            -
            import { Point } from "./index";
         | 
| 3 | 
            +
            import { Point, TccErrorListener } from "./index";
         | 
| 4 4 | 
             
            export interface IBoxArgs {
         | 
| 5 5 | 
             
                id?: string;
         | 
| 6 6 | 
             
                top_left?: Point;
         | 
| @@ -32,12 +32,15 @@ type VBoxArgs = Omit<IBoxArgs, 'id'> & { | |
| 32 32 | 
             
            };
         | 
| 33 33 | 
             
            export default class BuildInBox {
         | 
| 34 34 | 
             
                private _variables;
         | 
| 35 | 
            +
                private _errorListener;
         | 
| 35 36 | 
             
                private _defaultBox;
         | 
| 36 | 
            -
                constructor(variables: BuiltInVariables);
         | 
| 37 | 
            +
                constructor(variables: BuiltInVariables, errorListener: TccErrorListener);
         | 
| 37 38 | 
             
                box({ x }: {
         | 
| 38 39 | 
             
                    x?: Box;
         | 
| 39 40 | 
             
                }, posStr: string): Box;
         | 
| 40 41 | 
             
                new({ top_left, bottom_right, ...args }: IBoxArgs, posStr: string): Box;
         | 
| 42 | 
            +
                private _verfiyArgs;
         | 
| 43 | 
            +
                private _paramVerfiy;
         | 
| 41 44 | 
             
                copy({ id }: VBoxArgs, posStr: string): Box;
         | 
| 42 45 | 
             
                delete({ id }: VBoxArgs): void;
         | 
| 43 46 | 
             
                get_top({ id }: VBoxArgs): number | undefined;
         | 
| @@ -48,26 +51,27 @@ export default class BuildInBox { | |
| 48 51 | 
             
                set_bottom({ id, ...args }: VBoxArgs): void;
         | 
| 49 52 | 
             
                set_left({ id, ...args }: VBoxArgs): void;
         | 
| 50 53 | 
             
                set_right({ id, ...args }: VBoxArgs): void;
         | 
| 51 | 
            -
                set_extend({ id, ...args }: VBoxArgs): void;
         | 
| 54 | 
            +
                set_extend({ id, ...args }: VBoxArgs, posStr: string): void;
         | 
| 52 55 | 
             
                set_bgcolor({ id, ...args }: VBoxArgs): void;
         | 
| 53 56 | 
             
                set_border_color({ id, ...args }: VBoxArgs): void;
         | 
| 54 57 | 
             
                set_border_width({ id, ...args }: VBoxArgs): void;
         | 
| 55 | 
            -
                set_border_style({ id, ...args }: VBoxArgs): void;
         | 
| 58 | 
            +
                set_border_style({ id, ...args }: VBoxArgs, posStr: string): void;
         | 
| 56 59 | 
             
                set_lefttop({ id, ...args }: VBoxArgs): void;
         | 
| 57 60 | 
             
                set_rightbottom({ id, ...args }: VBoxArgs): void;
         | 
| 58 | 
            -
                set_text_size({ id, ...args }: VBoxArgs): void;
         | 
| 59 | 
            -
                set_text_wrap({ id, ...args }: VBoxArgs): void;
         | 
| 61 | 
            +
                set_text_size({ id, ...args }: VBoxArgs, posStr: string): void;
         | 
| 62 | 
            +
                set_text_wrap({ id, ...args }: VBoxArgs, posStr: string): void;
         | 
| 60 63 | 
             
                set_text_color({ id, ...args }: VBoxArgs): void;
         | 
| 61 | 
            -
                set_text_halign({ id, ...args }: VBoxArgs): void;
         | 
| 62 | 
            -
                set_text_valign({ id, ...args }: VBoxArgs): void;
         | 
| 64 | 
            +
                set_text_halign({ id, ...args }: VBoxArgs, posStr: string): void;
         | 
| 65 | 
            +
                set_text_valign({ id, ...args }: VBoxArgs, posStr: string): void;
         | 
| 63 66 | 
             
                set_top_left_point({ id, ...args }: VBoxArgs): void;
         | 
| 64 67 | 
             
                set_bottom_right_point({ id, ...args }: VBoxArgs): void;
         | 
| 65 | 
            -
                set_text_font_family({ id, ...args }: VBoxArgs): void;
         | 
| 68 | 
            +
                set_text_font_family({ id, ...args }: VBoxArgs, posStr: string): void;
         | 
| 66 69 | 
             
            }
         | 
| 67 70 | 
             
            export declare class Box {
         | 
| 68 71 | 
             
                private _id;
         | 
| 69 72 | 
             
                private _variables;
         | 
| 70 | 
            -
                 | 
| 73 | 
            +
                private _errorListener;
         | 
| 74 | 
            +
                constructor(variables: BuiltInVariables, key: string, errorListener: TccErrorListener);
         | 
| 71 75 | 
             
                copy(posStr: string): Box;
         | 
| 72 76 | 
             
                delete(): void;
         | 
| 73 77 | 
             
                get_top(): number | undefined;
         | 
| @@ -79,21 +83,22 @@ export declare class Box { | |
| 79 83 | 
             
                set_right({ right }: IBoxArgs): void;
         | 
| 80 84 | 
             
                get_bottom(): number | undefined;
         | 
| 81 85 | 
             
                set_bottom({ bottom }: IBoxArgs): void;
         | 
| 82 | 
            -
                set_extend({ extend }: IBoxArgs): void;
         | 
| 86 | 
            +
                set_extend({ extend }: IBoxArgs, posStr: string): void;
         | 
| 83 87 | 
             
                set_bgcolor({ color }: IBoxArgs): void;
         | 
| 84 88 | 
             
                set_lefttop({ left, top }: IBoxArgs): void;
         | 
| 85 | 
            -
                set_text_size({ text_size }: IBoxArgs): void;
         | 
| 86 | 
            -
                set_text_wrap({ text_wrap }: IBoxArgs): void;
         | 
| 89 | 
            +
                set_text_size({ text_size }: IBoxArgs, posStr: string): void;
         | 
| 90 | 
            +
                set_text_wrap({ text_wrap }: IBoxArgs, posStr: string): void;
         | 
| 87 91 | 
             
                set_text_color({ text_color }: IBoxArgs): void;
         | 
| 88 92 | 
             
                set_rightbottom({ right, bottom }: IBoxArgs): void;
         | 
| 89 | 
            -
                set_text_halign({ text_halign }: IBoxArgs): void;
         | 
| 90 | 
            -
                set_text_valign({ text_valign }: IBoxArgs): void;
         | 
| 93 | 
            +
                set_text_halign({ text_halign }: IBoxArgs, posStr: string): void;
         | 
| 94 | 
            +
                set_text_valign({ text_valign }: IBoxArgs, posStr: string): void;
         | 
| 91 95 | 
             
                set_top_left_point({ point }: IBoxArgs): void;
         | 
| 92 96 | 
             
                set_border_color({ color }: IBoxArgs): void;
         | 
| 93 | 
            -
                set_border_style({ style }: IBoxArgs): void;
         | 
| 97 | 
            +
                set_border_style({ style }: IBoxArgs, posStr: string): void;
         | 
| 94 98 | 
             
                set_border_width({ width }: IBoxArgs): void;
         | 
| 95 99 | 
             
                set_bottom_right_point({ point }: IBoxArgs): void;
         | 
| 96 | 
            -
                set_text_font_family({ text_font_family }: IBoxArgs): void;
         | 
| 100 | 
            +
                set_text_font_family({ text_font_family }: IBoxArgs, posStr: string): void;
         | 
| 101 | 
            +
                private _paramVerfiy;
         | 
| 97 102 | 
             
                private _getBox;
         | 
| 98 103 | 
             
            }
         | 
| 99 104 | 
             
            export {};
         | 
| @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            import { BuiltInVariables } from "../buildInVariables";
         | 
| 2 2 | 
             
            import { VLabelStyle, VSize, VText, VXloc, VYloc } from "../enum";
         | 
| 3 | 
            -
            import { Point } from "./index";
         | 
| 3 | 
            +
            import { Point, TccErrorListener } from "./index";
         | 
| 4 4 | 
             
            interface ILabelArgs {
         | 
| 5 5 | 
             
                id: string;
         | 
| 6 6 | 
             
                point: Point;
         | 
| @@ -23,9 +23,12 @@ type TLabelArgs = Omit<PartialLabelArgs, 'id'> & { | |
| 23 23 | 
             
            };
         | 
| 24 24 | 
             
            export default class BuildInLabel {
         | 
| 25 25 | 
             
                private _variables;
         | 
| 26 | 
            +
                private _errorListener;
         | 
| 26 27 | 
             
                private _defaultLabel;
         | 
| 27 | 
            -
                constructor(variables: BuiltInVariables);
         | 
| 28 | 
            +
                constructor(variables: BuiltInVariables, errorListener: TccErrorListener);
         | 
| 28 29 | 
             
                new(args: PartialLabelArgs, posStr: string): Label;
         | 
| 30 | 
            +
                private _verfiyArgs;
         | 
| 31 | 
            +
                private _paramVerfiy;
         | 
| 29 32 | 
             
                label(args: {
         | 
| 30 33 | 
             
                    x?: Label;
         | 
| 31 34 | 
             
                }, posStr: string): Label;
         | 
| @@ -52,7 +55,8 @@ export default class BuildInLabel { | |
| 52 55 | 
             
            export declare class Label {
         | 
| 53 56 | 
             
                private _id;
         | 
| 54 57 | 
             
                private _variables;
         | 
| 55 | 
            -
                 | 
| 58 | 
            +
                private _errorListener;
         | 
| 59 | 
            +
                constructor(key: string, variables: BuiltInVariables, errorListener: TccErrorListener);
         | 
| 56 60 | 
             
                copy(posStr: string): Label;
         | 
| 57 61 | 
             
                get_x(posStr: string): number | undefined;
         | 
| 58 62 | 
             
                get_y(posStr: string): number | undefined;
         | 
| @@ -72,6 +76,7 @@ export declare class Label { | |
| 72 76 | 
             
                set_textalign({ textalign }: PartialLabelArgs, posStr: string): void;
         | 
| 73 77 | 
             
                set_textcolor({ textcolor }: PartialLabelArgs, posStr: string): void;
         | 
| 74 78 | 
             
                set_text_font_family({ text_font_family }: PartialLabelArgs, posStr: string): void;
         | 
| 79 | 
            +
                private _paramVerfiy;
         | 
| 75 80 | 
             
                private _getLabel;
         | 
| 76 81 | 
             
            }
         | 
| 77 82 | 
             
            export {};
         | 
| @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            import { BuiltInVariables } from "../buildInVariables";
         | 
| 2 2 | 
             
            import { VExtend, VLineStyle, VXloc } from "../enum";
         | 
| 3 | 
            -
            import { Point } from "./index";
         | 
| 3 | 
            +
            import { Point, TccErrorListener } from "./index";
         | 
| 4 4 | 
             
            export interface ILineArgs {
         | 
| 5 5 | 
             
                id?: string;
         | 
| 6 6 | 
             
                x?: number;
         | 
| @@ -24,9 +24,12 @@ type LineArgs = Omit<ILineArgs, 'id'> & { | |
| 24 24 | 
             
            };
         | 
| 25 25 | 
             
            export default class BuildInLine {
         | 
| 26 26 | 
             
                private _variables;
         | 
| 27 | 
            +
                private _errorListener;
         | 
| 27 28 | 
             
                private _defaultLine;
         | 
| 28 | 
            -
                constructor(variables: BuiltInVariables);
         | 
| 29 | 
            +
                constructor(variables: BuiltInVariables, errorListener: TccErrorListener);
         | 
| 29 30 | 
             
                new({ first_point, second_point, ...args }: ILineArgs, posStr: string): Line;
         | 
| 31 | 
            +
                private _verfiyArgs;
         | 
| 32 | 
            +
                private _paramVerfiy;
         | 
| 30 33 | 
             
                line(args: {
         | 
| 31 34 | 
             
                    x?: Line;
         | 
| 32 35 | 
             
                }, posStr: string): Line;
         | 
| @@ -54,7 +57,8 @@ export default class BuildInLine { | |
| 54 57 | 
             
            export declare class Line {
         | 
| 55 58 | 
             
                private _variables;
         | 
| 56 59 | 
             
                private _id;
         | 
| 57 | 
            -
                 | 
| 60 | 
            +
                private _errorListener;
         | 
| 61 | 
            +
                constructor(key: string, variables: BuiltInVariables, errorListener: TccErrorListener);
         | 
| 58 62 | 
             
                get data(): ILineArgs | undefined;
         | 
| 59 63 | 
             
                copy(posStr: string): Line;
         | 
| 60 64 | 
             
                delete(): void;
         | 
| @@ -76,6 +80,7 @@ export declare class Line { | |
| 76 80 | 
             
                set_extend({ extend }: ILineArgs, posStr: string): void;
         | 
| 77 81 | 
             
                set_first_point({ point }: ILineArgs, posStr: string): void;
         | 
| 78 82 | 
             
                set_second_point({ point }: ILineArgs, posStr: string): void;
         | 
| 83 | 
            +
                private _paramVerfiy;
         | 
| 79 84 | 
             
                private _getLine;
         | 
| 80 85 | 
             
            }
         | 
| 81 86 | 
             
            export {};
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            import { PseudoArray } from "./index";
         | 
| 1 | 
            +
            import { PseudoArray, TccErrorListener } from "./index";
         | 
| 2 2 | 
             
            import { BuiltInVariables } from "../buildInVariables";
         | 
| 3 3 | 
             
            import { VLineStyle, VXloc } from "../enum";
         | 
| 4 4 | 
             
            export interface IPolyline {
         | 
| @@ -17,9 +17,12 @@ type TPolylineArgs = Omit<IPolyline, 'id'> & { | |
| 17 17 | 
             
            };
         | 
| 18 18 | 
             
            export default class BuildInPolyline {
         | 
| 19 19 | 
             
                private _variables;
         | 
| 20 | 
            +
                private _errorListener;
         | 
| 20 21 | 
             
                private _defaultPolyline;
         | 
| 21 | 
            -
                constructor(variables: BuiltInVariables);
         | 
| 22 | 
            +
                constructor(variables: BuiltInVariables, errorListener: TccErrorListener);
         | 
| 22 23 | 
             
                new(args: IPolyline, posStr: string): Polyline;
         | 
| 24 | 
            +
                private _verfiyArgs;
         | 
| 25 | 
            +
                private _paramVerfiy;
         | 
| 23 26 | 
             
                delete({ id }: TPolylineArgs): void;
         | 
| 24 27 | 
             
            }
         | 
| 25 28 | 
             
            export declare class Polyline {
         | 
| @@ -142,9 +142,9 @@ export default class Strategy { | |
| 142 142 | 
             
                private _maxConsLossDaysVerify;
         | 
| 143 143 | 
             
                private _maxDrawdownVerify;
         | 
| 144 144 | 
             
                private _riskTouchOff;
         | 
| 145 | 
            -
                strategy(args: IStrategy): void;
         | 
| 146 | 
            -
                order(args: IOrderArgs): void;
         | 
| 147 | 
            -
                entry(args: IOrderArgs): void;
         | 
| 145 | 
            +
                strategy(args: IStrategy, posStr: string): void;
         | 
| 146 | 
            +
                order(args: IOrderArgs, posStr: string): void;
         | 
| 147 | 
            +
                entry(args: IOrderArgs, posStr: string): void;
         | 
| 148 148 | 
             
                close(args: IOrder): void;
         | 
| 149 149 | 
             
                close_all(args: IOrder): void;
         | 
| 150 150 | 
             
                cancel({ id }: {
         | 
| @@ -195,5 +195,6 @@ export default class Strategy { | |
| 195 195 | 
             
                private _getCommission;
         | 
| 196 196 | 
             
                private _calcCurrentOrder;
         | 
| 197 197 | 
             
                private _isNaN;
         | 
| 198 | 
            +
                private _paramVerfiy;
         | 
| 198 199 | 
             
            }
         | 
| 199 200 | 
             
            export {};
         | 
| @@ -20,7 +20,9 @@ interface IStrArgs { | |
| 20 20 | 
             
            }
         | 
| 21 21 | 
             
            export default class BuildInStr {
         | 
| 22 22 | 
             
                private _errorListener;
         | 
| 23 | 
            -
                 | 
| 23 | 
            +
                private _intlNumberFormatter;
         | 
| 24 | 
            +
                private _precision;
         | 
| 25 | 
            +
                constructor(errorListener: TccErrorListener, precision: number);
         | 
| 24 26 | 
             
                pos({ source, str }: IStrArgs): number;
         | 
| 25 27 | 
             
                trim({ source }: IStrArgs): string;
         | 
| 26 28 | 
             
                lower({ source }: IStrArgs): string;
         | 
| @@ -40,6 +42,7 @@ export default class BuildInStr { | |
| 40 42 | 
             
                startswith({ source, str }: IStrArgs): boolean;
         | 
| 41 43 | 
             
                format_time({ time, format, timezone }: IStrArgs): string;
         | 
| 42 44 | 
             
                replace_all({ source, target, replacement }: IStrArgs): string;
         | 
| 45 | 
            +
                private _toStringFormat;
         | 
| 43 46 | 
             
                private _formatNumber;
         | 
| 44 47 | 
             
                private _strFormat;
         | 
| 45 48 | 
             
            }
         | 
| @@ -1,5 +1,6 @@ | |
| 1 1 | 
             
            import { BuiltInVariables } from "../buildInVariables";
         | 
| 2 2 | 
             
            import { VPosition, VSize, VText } from "../enum";
         | 
| 3 | 
            +
            import { TccErrorListener } from "./errorListener";
         | 
| 3 4 | 
             
            export interface ITableArgs {
         | 
| 4 5 | 
             
                id?: string;
         | 
| 5 6 | 
             
                table_id?: Table;
         | 
| @@ -37,12 +38,14 @@ interface ITableCellArgs { | |
| 37 38 | 
             
            }
         | 
| 38 39 | 
             
            export default class BuildInTable {
         | 
| 39 40 | 
             
                private _variables;
         | 
| 41 | 
            +
                private _errorListener;
         | 
| 40 42 | 
             
                private _defaultTable;
         | 
| 41 | 
            -
                constructor(variables: BuiltInVariables);
         | 
| 43 | 
            +
                constructor(variables: BuiltInVariables, errorListener: TccErrorListener);
         | 
| 42 44 | 
             
                table({ x }: {
         | 
| 43 45 | 
             
                    x?: Table;
         | 
| 44 46 | 
             
                }, posStr: string): Table;
         | 
| 45 47 | 
             
                new(args: ITableArgs, posStr: string): Table;
         | 
| 48 | 
            +
                private _paramVerfiy;
         | 
| 46 49 | 
             
                cell({ table_id, ...args }: ITableCellArgs): void;
         | 
| 47 50 | 
             
                cell_set_bgcolor({ table_id, ...args }: ITableCellArgs): void;
         | 
| 48 51 | 
             
                cell_set_height({ table_id, ...args }: ITableCellArgs): void;
         | 
| @@ -62,13 +65,14 @@ export default class BuildInTable { | |
| 62 65 | 
             
                set_border_width({ table_id, ...args }: ITableArgs): void;
         | 
| 63 66 | 
             
                set_frame_color({ table_id, ...args }: ITableArgs): void;
         | 
| 64 67 | 
             
                set_frame_width({ table_id, ...args }: ITableArgs): void;
         | 
| 65 | 
            -
                set_position({ table_id, ...args }: ITableArgs): void;
         | 
| 68 | 
            +
                set_position({ table_id, ...args }: ITableArgs, posStr: string): void;
         | 
| 66 69 | 
             
            }
         | 
| 67 70 | 
             
            export declare class Table {
         | 
| 68 71 | 
             
                private _id;
         | 
| 69 72 | 
             
                private _variables;
         | 
| 73 | 
            +
                private _errorListener;
         | 
| 70 74 | 
             
                private _defaultCell;
         | 
| 71 | 
            -
                constructor(variables: BuiltInVariables, key: string);
         | 
| 75 | 
            +
                constructor(variables: BuiltInVariables, key: string, errorListener: TccErrorListener);
         | 
| 72 76 | 
             
                cell(args: ITableCellArgs): void;
         | 
| 73 77 | 
             
                cell_set_bgcolor({ column, row, bgcolor }: ITableCellArgs): void;
         | 
| 74 78 | 
             
                cell_set_height({ column, row, height }: ITableCellArgs): void;
         | 
| @@ -88,7 +92,8 @@ export declare class Table { | |
| 88 92 | 
             
                set_border_width({ border_width }: ITableArgs): void;
         | 
| 89 93 | 
             
                set_frame_color({ frame_color }: ITableArgs): void;
         | 
| 90 94 | 
             
                set_frame_width({ frame_width }: ITableArgs): void;
         | 
| 91 | 
            -
                set_position({ position }: ITableArgs): void;
         | 
| 95 | 
            +
                set_position({ position }: ITableArgs, posStr: string): void;
         | 
| 96 | 
            +
                private _paramVerfiy;
         | 
| 92 97 | 
             
                private _getTableItem;
         | 
| 93 98 | 
             
            }
         | 
| 94 99 | 
             
            export {};
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            import {  | 
| 1 | 
            +
            import { VType } from "./enum";
         | 
| 2 2 | 
             
            export declare const ERRORS_TIPS: {
         | 
| 3 3 | 
             
                onlyInLoop: string;
         | 
| 4 4 | 
             
                invalidType: string;
         | 
| @@ -60,7 +60,8 @@ export declare const ERRORS_TIPS: { | |
| 60 60 | 
             
                libraryTitleIsKeywordErr: string;
         | 
| 61 61 | 
             
                exportFuncUseGlobalVarErr: string;
         | 
| 62 62 | 
             
                loopRuntimeErr: string;
         | 
| 63 | 
            -
                 | 
| 63 | 
            +
                paramsErr: string;
         | 
| 64 | 
            +
                displayErr: string;
         | 
| 64 65 | 
             
            };
         | 
| 65 66 | 
             
            export declare const WARNING_TIPS: {
         | 
| 66 67 | 
             
                repeatVar: string;
         | 
| @@ -255,4 +256,3 @@ export declare const DEFAULT_EXPORT_TEST: { | |
| 255 256 | 
             
            };
         | 
| 256 257 | 
             
            export declare const JS_KEYWORDS: string[];
         | 
| 257 258 | 
             
            export declare const TCC_KEYWORDS: string[];
         | 
| 258 | 
            -
            export declare const INDICATOR_FORMATS: VFormatType[];
         | 
| @@ -195,6 +195,10 @@ export declare enum VSize { | |
| 195 195 | 
             
                small = "small",
         | 
| 196 196 | 
             
                tiny = "tiny"
         | 
| 197 197 | 
             
            }
         | 
| 198 | 
            +
            export declare enum VFont {
         | 
| 199 | 
            +
                familyDefault = "default",
         | 
| 200 | 
            +
                familyMonospace = "monospace"
         | 
| 201 | 
            +
            }
         | 
| 198 202 | 
             
            export declare enum VStrategy {
         | 
| 199 203 | 
             
                cash = "cash",
         | 
| 200 204 | 
             
                fixed = "fixed",
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            import { Strategy } from "../buildInFuncNamespace";
         | 
| 1 | 
            +
            import { Strategy, TccErrorListener } from "../buildInFuncNamespace";
         | 
| 2 2 | 
             
            import { VStrategy } from "../enum";
         | 
| 3 3 | 
             
            interface IRiskArgs {
         | 
| 4 4 | 
             
                value?: any;
         | 
| @@ -9,12 +9,14 @@ interface IRiskArgs { | |
| 9 9 | 
             
            }
         | 
| 10 10 | 
             
            declare class Risk {
         | 
| 11 11 | 
             
                private _strategy;
         | 
| 12 | 
            -
                 | 
| 13 | 
            -
                 | 
| 12 | 
            +
                private _errorListener;
         | 
| 13 | 
            +
                constructor(strategy: Strategy, errorListener: TccErrorListener);
         | 
| 14 | 
            +
                allow_entry_in({ value }: IRiskArgs, posStr: string): void;
         | 
| 14 15 | 
             
                max_cons_loss_days({ count }: IRiskArgs): void;
         | 
| 15 | 
            -
                max_drawdown({ value, type }: IRiskArgs): void;
         | 
| 16 | 
            +
                max_drawdown({ value, type }: IRiskArgs, posStr: string): void;
         | 
| 16 17 | 
             
                max_intraday_filled_orders({ count }: IRiskArgs): void;
         | 
| 17 | 
            -
                max_intraday_loss({ value, type }: IRiskArgs): void;
         | 
| 18 | 
            +
                max_intraday_loss({ value, type }: IRiskArgs, posStr: string): void;
         | 
| 18 19 | 
             
                max_position_size({ contracts }: IRiskArgs): void;
         | 
| 20 | 
            +
                private _paramVerfiy;
         | 
| 19 21 | 
             
            }
         | 
| 20 22 | 
             
            export default Risk;
         | 
    
        package/lib/packages/index.d.ts
    CHANGED
    
    | @@ -6,4 +6,4 @@ export { parseTcc, scriptsRun, removeScript, parseLibrary } from '../components/ | |
| 6 6 | 
             
            export type { IError, IPosition } from '../components/editor/parseScript/type';
         | 
| 7 7 | 
             
            export { VMarkerSeverity } from '../components/editor/parseScript/type';
         | 
| 8 8 | 
             
            export { default as ReferenceManual } from '../components/referenceManual';
         | 
| 9 | 
            -
            export { VAdjustment, VAlert, VBarmergeGaps, VCommission, VDirection, VEarnings, VExtend, VFormatType, VHlineStyle, VInputType, VLabelStyle, VLineStyle, VLocation, VOca, VPlotDisplay, VPlotStyle, VRuleType, VScale, VSession, VShape, VSortOrder, VSize, VStrategy, VText, VType, VXloc, VYloc, VPivotType, VPosition, VScriptType } from '../components/editor/parseScript/enum';
         | 
| 9 | 
            +
            export { VAdjustment, VAlert, VBarmergeGaps, VCommission, VDirection, VEarnings, VExtend, VFormatType, VHlineStyle, VInputType, VLabelStyle, VLineStyle, VLocation, VOca, VPlotDisplay, VPlotStyle, VRuleType, VScale, VSession, VShape, VSortOrder, VSize, VStrategy, VText, VType, VXloc, VYloc, VPivotType, VPosition, VScriptType, VFont } from '../components/editor/parseScript/enum';
         |