@guihz/trading-vue-editor-tes 0.1.34 → 0.1.36

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.
@@ -20498,7 +20498,7 @@ ${u}`), u;
20498
20498
  if (ne(e))
20499
20499
  return NaN;
20500
20500
  let [r, i] = t.split(".");
20501
- t.split("%").length === 2 && (e = Number((e * 100).toFixed(2)));
20501
+ t.split("%").length === 2 && (e = Number((e * 100).toFixed(2))), t.includes("#") && !t.includes(".") && (e = Math.round(e));
20502
20502
  let [s, o = ""] = String(e).split(".");
20503
20503
  if (r.includes("0")) {
20504
20504
  r = r.replace(/#/g, "");
@@ -21273,7 +21273,7 @@ ${u}`), u;
21273
21273
  }
21274
21274
  }
21275
21275
  function xs(n) {
21276
- self?.workerStorage?.deleteStartwidthKey(n), self?.workerStorage?.delete(`inputs_${n}`), self?.workerStorage?.delete(`strategy_${n}`), self?.workerStorage?.delete(`request_${n}`), self?.workerStorage?.delete(`request_${n}_data`), self?.workerStorage?.delete(`request_${n}_list`);
21276
+ self?.workerStorage?.deleteStartwidthKey(n), self?.workerStorage?.delete(`request_${n}_tmp`), self?.workerStorage?.delete(`inputs_${n}`), self?.workerStorage?.delete(`strategy_${n}`), self?.workerStorage?.delete(`request_${n}`), self?.workerStorage?.delete(`request_${n}_data`), self?.workerStorage?.delete(`request_${n}_list`);
21277
21277
  }
21278
21278
  var W1 = /* @__PURE__ */ ((n) => (n.BOOL = "bool", n.INT = "int", n.FLOAT = "float", n.ARRAY = "array", n.BOX = "box", n.COLOR = "color", n.CONST = "const", n.LABEL = "label", n.LINE = "line", n.SERIES = "series", n.SIMPLE = "", n.STRING = "string", n.TABLE = "table", n.UNDETERMINED = "undetermined type", n.INPUT = "input", n.NA = "na", n.VOID = "void", n.symbol = "symbol", n))(W1 || {}), jn = /* @__PURE__ */ ((n) => (n.TYPE = "type", n.ARRAY = "array", n.BOX = "box", n.CHART_POINT = "chart.point", n.LABEL = "label", n.LINE = "line", n.LINEFILL = "linefill", n.MAP = "map", n.MATRIX = "matrix", n.POLYLINE = "polyline", n.TABLE = "table", n))(jn || {}), rc = /* @__PURE__ */ ((n) => (n.dividends = "dividends", n.none = "none", n.splits = "splits", n))(rc || {}), Bb = /* @__PURE__ */ ((n) => (n.gross = "gross", n.net = "net", n))(Bb || {}), Nr = /* @__PURE__ */ ((n) => (n.freqAll = "freq_all", n.freqOncePerBar = "freq_once_per_bar", n.freqOncePerBarClose = "freq_once_per_bar_close", n))(Nr || {}), fo = /* @__PURE__ */ ((n) => (n.all = "all", n.dataWindow = "data_window", n.none = "none", n.pane = "pane", n.priceScale = "price_scale", n.statusLine = "status_line", n))(fo || {}), Er = /* @__PURE__ */ ((n) => (n.both = "both", n.left = "left", n.none = "none", n.right = "right", n))(Er || {}), w1 = /* @__PURE__ */ ((n) => (n.inherit = "inherit", n.mintick = "mintick", n.percent = "percent", n.price = "price", n.volume = "volume", n))(w1 || {}), ic = /* @__PURE__ */ ((n) => (n.styleDashed = "style_dashed", n.styleDotted = "style_dotted", n.styleSolid = "style_solid", n))(ic || {}), oe = /* @__PURE__ */ ((n) => (n.styleArrowdown = "style_arrowdown", n.styleArrowup = "style_arrowup", n.styleCircle = "style_circle", n.styleCross = "style_cross", n.styleDiamond = "style_diamond", n.styleFlag = "style_flag", n.styleLabelCenter = "style_label_center", n.styleLabelDown = "style_label_down", n.styleLabelLeft = "style_label_left", n.styleLabelLowerLeft = "style_label_lower_left", n.styleLabelLowerRight = "style_label_lower_right", n.styleLabelRight = "style_label_right", n.styleLabelUp = "style_label_up", n.styleLabelUpperLeft = "style_label_upper_left", n.styleLabelUpperRight = "style_label_upper_right", n.styleNone = "style_none", n.styleSquare = "style_square", n.styleTextOutline = "style_text_outline", n.styleTriangledown = "style_triangledown", n.styleTriangleup = "style_triangleup", n.styleXcross = "style_xcross", n))(oe || {}), Ge = /* @__PURE__ */ ((n) => (n.styleArrowBoth = "style_arrow_both", n.styleArrowLeft = "style_arrow_left", n.styleArrowRight = "style_arrow_right", n.styleDashed = "style_dashed", n.styleDotted = "style_dotted", n.styleSolid = "style_solid", n))(Ge || {}), Wi = /* @__PURE__ */ ((n) => (n.abovebar = "abovebar", n.absolute = "absolute", n.belowbar = "belowbar", n.bottom = "bottom", n.top = "top", n))(Wi || {}), cr = /* @__PURE__ */ ((n) => (n.styleArea = "Area", n.styleAreabr = "Area With Breaks", n.styleCircles = "Circles", n.styleColumns = "Columns", n.styleCross = "Cross", n.styleHistogram = "Histogram", n.styleLine = "Line", n.styleLinebr = "Line With Breaks", n.styleStepline = "Step Line", n.styleSteplineDiamond = "Step Line With Diamonds", n.styleSteplinebr = "Step line with Breaks", n))(cr || {}), kt = /* @__PURE__ */ ((n) => (n.bottomCenter = "bottom_center", n.bottomLeft = "bottom_left", n.bottomRight = "bottom_right", n.middleCenter = "middle_center", n.middleLeft = "middle_left", n.middleRight = "middle_right", n.topCenter = "top_center", n.topLeft = "top_left", n.topRight = "top_right", n))(kt || {}), sc = /* @__PURE__ */ ((n) => (n.left = "left", n.none = "none", n.right = "right", n))(sc || {}), ns = /* @__PURE__ */ ((n) => (n.extended = "extended", n.regular = "regular", n))(ns || {}), yt = /* @__PURE__ */ ((n) => (n.arrowdown = "arrowdown", n.arrowup = "arrowup", n.circle = "circle", n.cross = "cross", n.diamond = "diamond", n.flag = "flag", n.labeldown = "labeldown", n.labelup = "labelup", n.square = "square", n.triangledown = "triangledown", n.triangleup = "triangleup", n.xcross = "xcross", n))(yt || {}), dr = /* @__PURE__ */ ((n) => (n.auto = "auto", n.huge = "huge", n.large = "large", n.normal = "normal", n.small = "small", n.tiny = "tiny", n))(dr || {}), Ie = /* @__PURE__ */ ((n) => (n.cash = "cash", n.fixed = "fixed", n.percentOfEquity = "percent_of_equity", n))(Ie || {}), ut = /* @__PURE__ */ ((n) => (n.cashPerContract = "cash_per_contract", n.cashPerOrder = "cash_per_order", n.percent = "percent", n))(ut || {}), f1 = /* @__PURE__ */ ((n) => (n.all = "all", n.long = "long", n.short = "short", n))(f1 || {}), vi = /* @__PURE__ */ ((n) => (n.cancel = "cancel", n.none = "none", n.reduce = "reduce", n))(vi || {}), ft = /* @__PURE__ */ ((n) => (n.alignBottom = "align_bottom", n.alignCenter = "align_center", n.alignLeft = "align_left", n.alignRight = "align_right", n.alignTop = "align_top", n))(ft || {}), fr = /* @__PURE__ */ ((n) => (n.bar_index = "bar_index", n.bar_time = "bar_time", n))(fr || {}), Lr = /* @__PURE__ */ ((n) => (n.abovebar = "abovebar", n.belowbar = "belowbar", n.price = "price", n))(Lr || {}), xb = /* @__PURE__ */ ((n) => (n.actual = "actual", n.estimate = "estimate", n.standardized = "standardized", n))(xb || {}), De = /* @__PURE__ */ ((n) => (n.INT = "int", n.BOOL = "bool", n.TIME = "time", n.COLOR = "color", n.FLOAT = "float", n.PRICE = "price", n.SOURCE = "source", n.STRING = "string", n.SYMBOL = "symbol", n.SESSION = "session", n.TIMEFRAME = "timeframe", n))(De || {}), Ef = /* @__PURE__ */ ((n) => (n.indicator = "indicator", n.strategy = "strategy", n.study = "study", n))(Ef || {});
21279
21279
  const ve = {
@@ -24473,7 +24473,7 @@ ${u}`), u;
24473
24473
  if (i1(e))
24474
24474
  return NaN;
24475
24475
  let [r, i] = t.split(".");
24476
- t.split("%").length === 2 && (e = Number((e * 100).toFixed(2)));
24476
+ t.split("%").length === 2 && (e = Number((e * 100).toFixed(2))), t.includes("#") && !t.includes(".") && (e = Math.round(e));
24477
24477
  let [s, o = ""] = String(e).split(".");
24478
24478
  if (r.includes("0")) {
24479
24479
  r = r.replace(/#/g, "");
@@ -33142,7 +33142,7 @@ ${Gf}`);
33142
33142
  if (h0(e))
33143
33143
  return NaN;
33144
33144
  let [r, i] = t.split(".");
33145
- t.split("%").length === 2 && (e = Number((e * 100).toFixed(2)));
33145
+ t.split("%").length === 2 && (e = Number((e * 100).toFixed(2))), t.includes("#") && !t.includes(".") && (e = Math.round(e));
33146
33146
  let [s, o = ""] = String(e).split(".");
33147
33147
  if (r.includes("0")) {
33148
33148
  r = r.replace(/#/g, "");
@@ -37165,7 +37165,7 @@ ${u}`), u;
37165
37165
  const l = i.length - 1, { interval: u, symbol: O = "", mintick: d } = s;
37166
37166
  let { syminfo: _ } = this._variables;
37167
37167
  const f = self.workerStorage.get(`request_${this._scriptId}_tmp`), A = self.workerStorage.get(`request_${this._scriptId}_data`), q = self.workerStorage.get(`request_${this._scriptId}`), g = self.workerStorage.get(`request_${this._scriptId}_list`), [W, v] = O.split(":");
37168
- c.updateOptions({ interval: u, mintick: d, syminfo: { ..._.__syminfo, mintick: d, tickerid: O || _.tickerid, ticker: v || W || _.ticker } });
37168
+ c.__isFirstRun = r, c.updateOptions({ interval: u, mintick: d, syminfo: { ..._.__syminfo, mintick: d, tickerid: O || _.tickerid, ticker: v || W || _.ticker } });
37169
37169
  let y;
37170
37170
  const L = {};
37171
37171
  for (const [w, x] of i.entries()) {
@@ -41569,7 +41569,7 @@ ${u}`), u;
41569
41569
  if (_0(e))
41570
41570
  return NaN;
41571
41571
  let [r, i] = t.split(".");
41572
- t.split("%").length === 2 && (e = Number((e * 100).toFixed(2)));
41572
+ t.split("%").length === 2 && (e = Number((e * 100).toFixed(2))), t.includes("#") && !t.includes(".") && (e = Math.round(e));
41573
41573
  let [s, o = ""] = String(e).split(".");
41574
41574
  if (r.includes("0")) {
41575
41575
  r = r.replace(/#/g, "");
@@ -47682,7 +47682,7 @@ ${u}`), u;
47682
47682
  fh.add("@alwatr/polyfill-has-own", "5.5.3");
47683
47683
  Object.prototype.hasOwnProperty.call(Object, "hasOwn") === !1 && (Object.hasOwn = Object.call.bind(Object.prototype.hasOwnProperty));
47684
47684
  async function aT(n, e, t, r) {
47685
- return r === 3 ? (console.log("runScript v3"), await vB(n, e, t)) : r === 4 ? (console.log("runScript v4"), await Rx(n, e, t)) : r === 5 ? (console.log("runScript v5"), await kC(n, e, t)) : (console.log("runScript v6"), await nT(n, e, t));
47685
+ return r === 3 ? await vB(n, e, t) : r === 4 ? await Rx(n, e, t) : r === 5 ? await kC(n, e, t) : await nT(n, e, t);
47686
47686
  }
47687
47687
  function cT(n) {
47688
47688
  self?.workerStorage?.deleteStartwidthKey(n), self?.workerStorage?.delete(`inputs_${n}`), self?.workerStorage?.delete(`strategy_${n}`), self?.workerStorage?.delete(`request_${n}`), self?.workerStorage?.delete(`request_${n}_data`), self?.workerStorage?.delete(`request_${n}_list`);
@@ -46,5 +46,7 @@ export declare enum Actions {
46
46
  RunScript = "runScript",
47
47
  Open = "open",
48
48
  NewWindow = "newWindow",
49
- NewTab = "newTab"
49
+ NewTab = "newTab",
50
+ NewIndicator = "newIndicator",
51
+ NewStrategy = "newStrategy"
50
52
  }
@@ -8,7 +8,7 @@ declare class ImportLibrary {
8
8
  constructor();
9
9
  get inlayHints(): languages.InlayHint[];
10
10
  setEditor(editor: editor.IStandaloneCodeEditor): void;
11
- setInlayHints(params: IKeyObjectValue): Promise<{} | undefined>;
11
+ setInlayHints(params: IKeyObjectValue): Promise<any>;
12
12
  deleteInlayHints(name: string): void;
13
13
  clearInlayHints(): void;
14
14
  triggerInlayHints(): void;
@@ -1,6 +1,6 @@
1
1
  import { IKeyObjectValue } from "../type";
2
- export declare function parseTcc(program: string, hasTranscoding: boolean, getImportLibraryFunc: (obj: IKeyObjectValue) => IKeyObjectValue, keyObjs: IKeyObjectValue, version: number): Promise<IKeyObjectValue>;
3
- export declare function parseLibraryCode(program: string, libTitle: string, getImportLibraryFunc: (obj: IKeyObjectValue) => IKeyObjectValue, keyObjs: IKeyObjectValue): Promise<{
2
+ export declare function parseTcc(program: string, hasTranscoding: boolean, getImportLibraryFunc: (obj: IKeyObjectValue) => Promise<IKeyObjectValue>, keyObjs: IKeyObjectValue, version: number): Promise<IKeyObjectValue>;
3
+ export declare function parseLibraryCode(program: string, libTitle: string, getImportLibraryFunc: (obj: IKeyObjectValue) => Promise<IKeyObjectValue>, keyObjs: IKeyObjectValue): Promise<{
4
4
  description: string;
5
5
  codeStr: string;
6
6
  functions: import("../type").IDocValue[];
@@ -41,7 +41,7 @@ export default class ParserVisitor extends ParserUtils {
41
41
  private _strategyFuncName?;
42
42
  private _strategyVarName?;
43
43
  private _isSeriesCondition?;
44
- constructor(props: IKeyObjectValue, comments: IKeyObjectValue[], getImportLibraryFunc: (obj: IKeyObjectValue) => IKeyObjectValue);
44
+ constructor(props: IKeyObjectValue, comments: IKeyObjectValue[], getImportLibraryFunc: (obj: IKeyObjectValue) => Promise<IKeyObjectValue>);
45
45
  get overloadsFuncs(): IKeyValue[];
46
46
  get errors(): IError[];
47
47
  get userEnums(): Map<string, IDocValue[]>;
@@ -1,7 +1,7 @@
1
1
  /// <reference path="../../../../src/vite-env.d.ts" />
2
2
  import { ErrorListener } from "antlr4";
3
3
  import { IKeyObjectValue } from "../type";
4
- export declare function parseTcc(program: string, hasTranscoding: boolean, getImportLibraryFunc: (obj: IKeyObjectValue) => IKeyObjectValue, keyObjs: IKeyObjectValue): Promise<{
4
+ export declare function parseTcc(program: string, hasTranscoding: boolean, getImportLibraryFunc: (obj: IKeyObjectValue) => Promise<IKeyObjectValue>, keyObjs: IKeyObjectValue): Promise<{
5
5
  errors: any[];
6
6
  functions: {
7
7
  [k: string]: import("../type").IDocValue[];
@@ -26,7 +26,7 @@ export declare function parseTcc(program: string, hasTranscoding: boolean, getIm
26
26
  preParserCode: string | undefined;
27
27
  config: IKeyObjectValue;
28
28
  }>;
29
- export declare function parseLibraryCode(program: string, libTitle: string, getImportLibraryFunc: (obj: IKeyObjectValue) => IKeyObjectValue, keyObjs: IKeyObjectValue): Promise<{
29
+ export declare function parseLibraryCode(program: string, libTitle: string, getImportLibraryFunc: (obj: IKeyObjectValue) => Promise<IKeyObjectValue>, keyObjs: IKeyObjectValue): Promise<{
30
30
  description: string;
31
31
  codeStr: string;
32
32
  functions: import("../type").IDocValue[];
@@ -57,5 +57,7 @@ declare const _default: {
57
57
  statement: string;
58
58
  loop: string;
59
59
  '`click` on keyword for more help': string;
60
+ "new indicator": string;
61
+ "new strategy": string;
60
62
  };
61
63
  export default _default;
@@ -57,5 +57,7 @@ declare const _default: {
57
57
  statement: string;
58
58
  loop: string;
59
59
  '`click` on keyword for more help': string;
60
+ "new indicator": string;
61
+ "new strategy": string;
60
62
  };
61
63
  export default _default;