@363045841yyt/klinechart 0.8.0 → 0.8.1-alpha.1
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/dist/components/KLineChart.vue.d.ts.map +1 -1
- package/dist/components/SymbolSelector.vue.d.ts +20 -0
- package/dist/components/SymbolSelector.vue.d.ts.map +1 -0
- package/dist/components/TopToolbar.vue.d.ts +7 -0
- package/dist/components/TopToolbar.vue.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.css +1 -1
- package/dist/index.js +717 -431
- package/package.json +1 -1
- package/src/components/KLineChart.vue +72 -88
- package/src/components/SymbolSelector.vue +478 -0
- package/src/components/TopToolbar.vue +62 -84
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, effectScope as d, h as f, inject as p, markRaw as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, onScopeDispose as b, onUnmounted as x, openBlock as S, provide as C, ref as w, renderList as T, resolveDynamicComponent as E, shallowRef as D, toDisplayString as O, unref as k, vModelCheckbox as A,
|
|
2
|
-
import { COLOR_PRESET_ITEMS as
|
|
3
|
-
import { DrawingInteractionController as ae, allIndicators as oe, createChartController as se, createIndicatorSelectorController as
|
|
4
|
-
import { SemanticChartController as
|
|
1
|
+
import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, effectScope as d, h as f, inject as p, markRaw as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, onScopeDispose as b, onUnmounted as x, openBlock as S, provide as C, ref as w, renderList as T, resolveDynamicComponent as E, shallowRef as D, toDisplayString as O, unref as k, vModelCheckbox as A, vModelText as j, watch as M, withCtx as N, withDirectives as P, withKeys as F, withModifiers as I } from "vue";
|
|
2
|
+
import { COLOR_PRESET_ITEMS as ee, VERSION as L, createChartController as R, createIndicatorSelectorController as z, darkTheme as te, lightTheme as ne, normalizeColorPresetSettings as B, resolveThemeColors as re, themeToCssVars as ie } from "@363045841yyt/klinechart-core";
|
|
3
|
+
import { DrawingInteractionController as ae, allIndicators as oe, createChartController as se, createIndicatorSelectorController as ce, findIndicator as le, getPhysicalKLineConfig as ue, kGapFromKWidth as de, zoomLevelToKWidth as fe } from "@363045841yyt/klinechart-core/controllers";
|
|
4
|
+
import { SemanticChartController as pe } from "@363045841yyt/klinechart-core/semantic";
|
|
5
5
|
import { getRegisteredIndicatorDefinition as me } from "@363045841yyt/klinechart-core/indicators";
|
|
6
6
|
import { DEFAULT_SETTINGS as V, SETTINGS_STORAGE_KEY as H } from "@363045841yyt/klinechart-core/config";
|
|
7
7
|
//#region src/components/ColorPresetPanel.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -9,7 +9,7 @@ var he = { class: "color-preset-tools" }, ge = {
|
|
|
9
9
|
class: "theme-tabs",
|
|
10
10
|
role: "tablist",
|
|
11
11
|
"aria-label": "颜色主题"
|
|
12
|
-
},
|
|
12
|
+
}, _e = ["onClick"], ve = { class: "color-group-label" }, ye = { class: "color-grid" }, U = ["value", "onInput"], be = /*@__PURE__*/ u({
|
|
13
13
|
__name: "ColorPresetPanel",
|
|
14
14
|
props: { colorPresetSettings: {} },
|
|
15
15
|
emits: ["update:colorPresetSettings"],
|
|
@@ -28,16 +28,16 @@ var he = { class: "color-preset-tools" }, ge = {
|
|
|
28
28
|
}, u = r(() => Object.keys(l).map((e) => ({
|
|
29
29
|
group: e,
|
|
30
30
|
label: l[e],
|
|
31
|
-
items:
|
|
31
|
+
items: ee.filter((t) => t.group === e)
|
|
32
32
|
})).filter((e) => e.items.length > 0)), d = w("light");
|
|
33
33
|
function f(e, t) {
|
|
34
34
|
return (e === "dark" ? te : ne).colors[t];
|
|
35
35
|
}
|
|
36
36
|
function p(e) {
|
|
37
|
-
return
|
|
37
|
+
return B(i.colorPresetSettings)[d.value]?.[e] ?? f(d.value, e);
|
|
38
38
|
}
|
|
39
39
|
function m(e, t) {
|
|
40
|
-
let n =
|
|
40
|
+
let n = B(i.colorPresetSettings);
|
|
41
41
|
a("update:colorPresetSettings", {
|
|
42
42
|
...n,
|
|
43
43
|
[d.value]: {
|
|
@@ -47,7 +47,7 @@ var he = { class: "color-preset-tools" }, ge = {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
function h() {
|
|
50
|
-
let e = { ...
|
|
50
|
+
let e = { ...B(i.colorPresetSettings) };
|
|
51
51
|
delete e[d.value], a("update:colorPresetSettings", e);
|
|
52
52
|
}
|
|
53
53
|
return (t, n) => (S(), o("div", null, [s("div", he, [s("div", ge, [(S(), o(e, null, T(c, (e) => s("button", {
|
|
@@ -55,11 +55,11 @@ var he = { class: "color-preset-tools" }, ge = {
|
|
|
55
55
|
type: "button",
|
|
56
56
|
class: g(["theme-tab", { active: d.value === e.value }]),
|
|
57
57
|
onClick: (t) => d.value = e.value
|
|
58
|
-
}, O(e.label), 11,
|
|
58
|
+
}, O(e.label), 11, _e)), 64))]), s("button", {
|
|
59
59
|
type: "button",
|
|
60
60
|
class: "color-reset-btn",
|
|
61
61
|
onClick: h
|
|
62
|
-
}, " 重置颜色 ")]), (S(!0), o(e, null, T(u.value, (t) => (S(), o(e, { key: t.group }, [s("div",
|
|
62
|
+
}, " 重置颜色 ")]), (S(!0), o(e, null, T(u.value, (t) => (S(), o(e, { key: t.group }, [s("div", ve, O(t.label), 1), s("div", ye, [(S(!0), o(e, null, T(t.items, (e) => (S(), o("label", {
|
|
63
63
|
key: e.key,
|
|
64
64
|
class: "color-item"
|
|
65
65
|
}, [s("span", null, O(e.label), 1), s("input", {
|
|
@@ -67,7 +67,7 @@ var he = { class: "color-preset-tools" }, ge = {
|
|
|
67
67
|
class: "color-input",
|
|
68
68
|
value: p(e.key),
|
|
69
69
|
onInput: (t) => m(e.key, t.target.value)
|
|
70
|
-
}, null, 40,
|
|
70
|
+
}, null, 40, U)]))), 128))])], 64))), 128))]));
|
|
71
71
|
}
|
|
72
72
|
}), W = (e, t) => {
|
|
73
73
|
let n = e.__vccOpts || e;
|
|
@@ -80,7 +80,7 @@ var he = { class: "color-preset-tools" }, ge = {
|
|
|
80
80
|
], Ce = {
|
|
81
81
|
key: 0,
|
|
82
82
|
class: "dropdown__label"
|
|
83
|
-
}, we = { class: "dropdown__value" },
|
|
83
|
+
}, we = { class: "dropdown__value" }, Te = ["aria-selected", "onClick"], G = 0, K = null, Ee = 0, q = /*#__PURE__*/ W(/* @__PURE__ */ u({
|
|
84
84
|
__name: "Dropdown",
|
|
85
85
|
props: {
|
|
86
86
|
modelValue: {},
|
|
@@ -92,7 +92,7 @@ var he = { class: "color-preset-tools" }, ge = {
|
|
|
92
92
|
},
|
|
93
93
|
emits: ["update:modelValue"],
|
|
94
94
|
setup(t, { emit: n }) {
|
|
95
|
-
let i = t, c = n, l = w(null), u = w(null), d = w(!1), f = w(0), p = ++
|
|
95
|
+
let i = t, c = n, l = w(null), u = w(null), d = w(!1), f = w(0), p = ++Ee, m = r(() => i.minWidth ? { minWidth: i.minWidth } : {}), h = r(() => {
|
|
96
96
|
if (!d.value) return;
|
|
97
97
|
let e = f.value || (i.minWidth ? parseInt(i.minWidth) : 0);
|
|
98
98
|
return { width: e ? `${e}px` : void 0 };
|
|
@@ -101,10 +101,10 @@ var he = { class: "color-preset-tools" }, ge = {
|
|
|
101
101
|
return e && i.options.some((t) => t.value === e) ? e : i.options[0]?.value ?? "";
|
|
102
102
|
}), b = r(() => i.options.find((e) => e.value === y.value) ?? i.options[0]);
|
|
103
103
|
function x() {
|
|
104
|
-
|
|
104
|
+
G !== p && K && K(), !d.value && (G = p, K = C, f.value = u.value?.offsetWidth ?? 0, d.value = !0, document.addEventListener("pointerdown", k));
|
|
105
105
|
}
|
|
106
106
|
function C() {
|
|
107
|
-
d.value && (d.value = !1,
|
|
107
|
+
d.value && (d.value = !1, G === p && (G = 0, K = null), document.removeEventListener("pointerdown", k));
|
|
108
108
|
}
|
|
109
109
|
function E() {
|
|
110
110
|
d.value ? C() : x();
|
|
@@ -131,10 +131,10 @@ var he = { class: "color-preset-tools" }, ge = {
|
|
|
131
131
|
"aria-expanded": d.value,
|
|
132
132
|
onClick: E,
|
|
133
133
|
onKeydown: [
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
F(I(C, ["stop"]), ["escape"]),
|
|
135
|
+
F(I(x, ["prevent"]), ["down"]),
|
|
136
|
+
F(I(E, ["prevent"]), ["enter"]),
|
|
137
|
+
F(I(E, ["prevent"]), ["space"])
|
|
138
138
|
]
|
|
139
139
|
}, [
|
|
140
140
|
t.label ? (S(), o("span", Ce, O(t.label), 1)) : a("", !0),
|
|
@@ -156,12 +156,12 @@ var he = { class: "color-preset-tools" }, ge = {
|
|
|
156
156
|
role: "option",
|
|
157
157
|
"aria-selected": e.value === y.value,
|
|
158
158
|
onClick: (t) => D(e.value)
|
|
159
|
-
}, O(e.label), 11,
|
|
159
|
+
}, O(e.label), 11, Te))), 128))], 4)) : a("", !0)], 2));
|
|
160
160
|
}
|
|
161
|
-
}), [["__scopeId", "data-v-126e11f2"]]),
|
|
161
|
+
}), [["__scopeId", "data-v-126e11f2"]]), De = {
|
|
162
162
|
class: "toolbar-item color-item",
|
|
163
163
|
title: "颜色"
|
|
164
|
-
},
|
|
164
|
+
}, J = ["value"], Oe = /*#__PURE__*/ W(/* @__PURE__ */ u({
|
|
165
165
|
__name: "DrawingStyleToolbar",
|
|
166
166
|
props: { drawing: {} },
|
|
167
167
|
emits: ["updateStyle", "delete"],
|
|
@@ -212,11 +212,11 @@ var he = { class: "color-preset-tools" }, ge = {
|
|
|
212
212
|
}
|
|
213
213
|
return (t, i) => (S(), o("div", {
|
|
214
214
|
class: "drawing-style-toolbar",
|
|
215
|
-
onPointerdown: i[4] ||=
|
|
216
|
-
onPointermove: i[5] ||=
|
|
217
|
-
onPointerup: i[6] ||=
|
|
215
|
+
onPointerdown: i[4] ||= I(() => {}, ["stop"]),
|
|
216
|
+
onPointermove: i[5] ||= I(() => {}, ["stop"]),
|
|
217
|
+
onPointerup: i[6] ||= I(() => {}, ["stop"])
|
|
218
218
|
}, [
|
|
219
|
-
s("div",
|
|
219
|
+
s("div", De, [s("span", {
|
|
220
220
|
class: "color-swatch",
|
|
221
221
|
style: _({ background: e.drawing.style.stroke ?? "#2962ff" })
|
|
222
222
|
}, null, 4), s("input", {
|
|
@@ -224,15 +224,15 @@ var he = { class: "color-preset-tools" }, ge = {
|
|
|
224
224
|
class: "color-input",
|
|
225
225
|
value: e.drawing.style.stroke ?? "#2962ff",
|
|
226
226
|
onInput: i[0] ||= (e) => c(e.target.value)
|
|
227
|
-
}, null, 40,
|
|
228
|
-
l(
|
|
227
|
+
}, null, 40, J)]),
|
|
228
|
+
l(q, {
|
|
229
229
|
"model-value": String(e.drawing.style.strokeWidth ?? 1),
|
|
230
230
|
options: n,
|
|
231
231
|
size: "sm",
|
|
232
232
|
title: "线宽",
|
|
233
233
|
"onUpdate:modelValue": i[1] ||= (e) => u(Number(e))
|
|
234
234
|
}, null, 8, ["model-value"]),
|
|
235
|
-
l(
|
|
235
|
+
l(q, {
|
|
236
236
|
"model-value": e.drawing.style.strokeStyle ?? "solid",
|
|
237
237
|
options: r,
|
|
238
238
|
size: "sm",
|
|
@@ -260,12 +260,12 @@ var he = { class: "color-preset-tools" }, ge = {
|
|
|
260
260
|
], -1)]])
|
|
261
261
|
], 32));
|
|
262
262
|
}
|
|
263
|
-
}), [["__scopeId", "data-v-e9b6a8a9"]]),
|
|
263
|
+
}), [["__scopeId", "data-v-e9b6a8a9"]]), Y = Symbol("fullscreen-teleport-target");
|
|
264
264
|
function ke(e) {
|
|
265
|
-
C(
|
|
265
|
+
C(Y, e);
|
|
266
266
|
}
|
|
267
267
|
function Ae() {
|
|
268
|
-
let e = p(
|
|
268
|
+
let e = p(Y, null);
|
|
269
269
|
return r(() => e?.value ?? "body");
|
|
270
270
|
}
|
|
271
271
|
//#endregion
|
|
@@ -298,12 +298,12 @@ var je = { class: "params-header" }, Me = { class: "header-left" }, Ne = { class
|
|
|
298
298
|
emits: ["close", "confirm"],
|
|
299
299
|
setup(r, { emit: u }) {
|
|
300
300
|
let d = r, f = u, p = w({ ...d.values }), m = w(!0), h = Ae();
|
|
301
|
-
|
|
301
|
+
M(() => d.values, (e) => {
|
|
302
302
|
p.value = { ...e };
|
|
303
303
|
}, {
|
|
304
304
|
deep: !0,
|
|
305
305
|
immediate: !0
|
|
306
|
-
}),
|
|
306
|
+
}), M(() => d.visible, (e) => {
|
|
307
307
|
e && (p.value = { ...d.values });
|
|
308
308
|
});
|
|
309
309
|
function _(e, t) {
|
|
@@ -324,14 +324,14 @@ var je = { class: "params-header" }, Me = { class: "header-left" }, Ne = { class
|
|
|
324
324
|
f("confirm", { ...p.value });
|
|
325
325
|
}
|
|
326
326
|
return (u, d) => (S(), i(t, { to: k(h) }, [l(n, { name: "overlay" }, {
|
|
327
|
-
default:
|
|
327
|
+
default: N(() => [r.visible ? (S(), o("div", {
|
|
328
328
|
key: 0,
|
|
329
329
|
class: "params-overlay",
|
|
330
330
|
onClick: d[4] ||= (e) => u.$emit("close")
|
|
331
331
|
}, [l(n, { name: "modal" }, {
|
|
332
|
-
default:
|
|
332
|
+
default: N(() => [s("div", {
|
|
333
333
|
class: "indicator-params",
|
|
334
|
-
onClick: d[3] ||=
|
|
334
|
+
onClick: d[3] ||= I(() => {}, ["stop"])
|
|
335
335
|
}, [
|
|
336
336
|
s("div", je, [s("div", Me, [s("span", Ne, O(r.indicatorName), 1), d[5] ||= s("span", { class: "params-subtitle" }, "参数设置", -1)]), s("div", Pe, [s("button", {
|
|
337
337
|
class: g(["toggle-desc-btn", { active: m.value }]),
|
|
@@ -350,7 +350,7 @@ var je = { class: "params-header" }, Me = { class: "header-left" }, Ne = { class
|
|
|
350
350
|
"stroke-width": "2"
|
|
351
351
|
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
|
|
352
352
|
l(n, { name: "slide" }, {
|
|
353
|
-
default:
|
|
353
|
+
default: N(() => [m.value && r.indicatorDescription ? (S(), o("div", Fe, [s("p", null, O(r.indicatorDescription), 1)])) : a("", !0)]),
|
|
354
354
|
_: 1
|
|
355
355
|
}),
|
|
356
356
|
s("div", Ie, [(S(!0), o(e, null, T(r.params, (e) => (S(), o("div", {
|
|
@@ -378,7 +378,7 @@ var je = { class: "params-header" }, Me = { class: "header-left" }, Ne = { class
|
|
|
378
378
|
onClick: (t) => v(e, 1)
|
|
379
379
|
}, " + ", 8, We)
|
|
380
380
|
])]), l(n, { name: "slide" }, {
|
|
381
|
-
default:
|
|
381
|
+
default: N(() => [m.value && e.description ? (S(), o("div", Ge, O(e.description), 1)) : a("", !0)]),
|
|
382
382
|
_: 2
|
|
383
383
|
}, 1024)], 2))), 128))]),
|
|
384
384
|
s("div", Ke, [s("button", {
|
|
@@ -422,7 +422,7 @@ var je = { class: "params-header" }, Me = { class: "header-left" }, Ne = { class
|
|
|
422
422
|
}, nt = { class: "modal-search-area" }, rt = { class: "search-box" }, it = ["value"], at = { class: "modal-body" }, ot = {
|
|
423
423
|
key: 0,
|
|
424
424
|
class: "indicator-section"
|
|
425
|
-
}, st = { class: "section-header" }, ct = { class: "section-count" }, lt = ["onClick"], ut = { class: "card-label" }, dt = { class: "card-tooltip" }, ft = { class: "card-header" },
|
|
425
|
+
}, st = { class: "section-header" }, ct = { class: "section-count" }, lt = ["onClick"], ut = { class: "card-label" }, dt = { class: "card-tooltip" }, ft = { class: "card-header" }, pt = { class: "card-label" }, mt = { class: "card-header-actions" }, X = ["onClick"], Z = { class: "card-name" }, ht = {
|
|
426
426
|
key: 1,
|
|
427
427
|
class: "section-divider"
|
|
428
428
|
}, gt = {
|
|
@@ -462,21 +462,21 @@ var je = { class: "params-header" }, Me = { class: "header-left" }, Ne = { class
|
|
|
462
462
|
}))
|
|
463
463
|
}));
|
|
464
464
|
}
|
|
465
|
-
let h =
|
|
466
|
-
function
|
|
465
|
+
let h = ce({ catalog: m(oe) }), _ = $(h.menuOpen), v = $(h.searchQuery), b = $(h.filteredMain), C = $(h.filteredSub), E = r(() => b.value.length > 0 || C.value.length > 0), D = h.catalog.peek().length, A = w(!1), j = w(null), M = w(!1), P = Ae(), F = r(() => j.value ? le(j.value) : null), ee = r(() => f.activeIndicators?.length ?? 0);
|
|
466
|
+
function L(e) {
|
|
467
467
|
return f.activeIndicators?.includes(e) ?? !1;
|
|
468
468
|
}
|
|
469
|
-
function
|
|
470
|
-
|
|
469
|
+
function R(e) {
|
|
470
|
+
L(e) || le(e) && p("toggle", e, !0);
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function z(e) {
|
|
473
473
|
p("toggle", e, !1);
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function te(e) {
|
|
476
476
|
j.value = e, A.value = !0;
|
|
477
477
|
}
|
|
478
|
-
function
|
|
479
|
-
let t =
|
|
478
|
+
function ne(e) {
|
|
479
|
+
let t = le(e);
|
|
480
480
|
if (!t?.params) return {};
|
|
481
481
|
let n = {};
|
|
482
482
|
for (let e of t.params) n[e.key] = e.default ?? e.min ?? 1;
|
|
@@ -484,36 +484,36 @@ var je = { class: "params-header" }, Me = { class: "header-left" }, Ne = { class
|
|
|
484
484
|
for (let [e, t] of Object.entries(r)) typeof t == "number" && (i[e] = t);
|
|
485
485
|
return i;
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function B(e) {
|
|
488
488
|
j.value && p("updateParams", j.value, e), A.value = !1;
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function re(e) {
|
|
491
491
|
e.key === "Escape" && h.menuOpen.peek() && h.closeMenu();
|
|
492
492
|
}
|
|
493
493
|
return y(() => {
|
|
494
|
-
document.addEventListener("keydown",
|
|
494
|
+
document.addEventListener("keydown", re);
|
|
495
495
|
}), x(() => {
|
|
496
|
-
document.removeEventListener("keydown",
|
|
496
|
+
document.removeEventListener("keydown", re);
|
|
497
497
|
}), u({
|
|
498
498
|
openMenu: () => h.openMenu(),
|
|
499
499
|
closeMenu: () => h.closeMenu(),
|
|
500
500
|
toggleMenu: () => h.toggleMenu()
|
|
501
501
|
}), (r, c) => (S(), o("div", Ye, [(S(), i(t, { to: k(P) }, [l(n, { name: "overlay" }, {
|
|
502
|
-
default:
|
|
502
|
+
default: N(() => [k(_) ? (S(), o("div", {
|
|
503
503
|
key: 0,
|
|
504
504
|
class: "selector-overlay",
|
|
505
505
|
onClick: c[5] ||= (e) => k(h).closeMenu()
|
|
506
506
|
}, [l(n, { name: "modal" }, {
|
|
507
|
-
default:
|
|
507
|
+
default: N(() => [k(_) ? (S(), o("div", {
|
|
508
508
|
key: 0,
|
|
509
509
|
class: "selector-modal",
|
|
510
|
-
onClick: c[4] ||=
|
|
510
|
+
onClick: c[4] ||= I(() => {}, ["stop"])
|
|
511
511
|
}, [
|
|
512
512
|
s("div", Xe, [s("div", Ze, [c[7] ||= s("span", { class: "title-text" }, "添加指标", -1), s("span", Qe, O(k(D)) + " 个可用指标", 1)]), s("div", $e, [s("button", {
|
|
513
|
-
class: g(["view-toggle-btn", { active:
|
|
514
|
-
onClick: c[0] ||= (e) =>
|
|
513
|
+
class: g(["view-toggle-btn", { active: M.value }]),
|
|
514
|
+
onClick: c[0] ||= (e) => M.value = !M.value,
|
|
515
515
|
title: "简洁模式"
|
|
516
|
-
}, [
|
|
516
|
+
}, [M.value ? (S(), o("svg", tt, [...c[9] ||= [s("path", { d: "M3 3h18v18H3V3zm16 16V5H5v14h14zM7 7h4v4H7V7zm0 6h4v4H7v-4zm6-6h4v4h-4V7zm0 6h4v4h-4v-4z" }, null, -1)]])) : (S(), o("svg", et, [...c[8] ||= [s("path", { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, null, -1)]]))], 2), s("button", {
|
|
517
517
|
class: "modal-close",
|
|
518
518
|
onClick: c[1] ||= (e) => k(h).closeMenu(),
|
|
519
519
|
title: "关闭"
|
|
@@ -537,24 +537,24 @@ var je = { class: "params-header" }, Me = { class: "header-left" }, Ne = { class
|
|
|
537
537
|
placeholder: "搜索指标名称..."
|
|
538
538
|
}, null, 40, it)])]),
|
|
539
539
|
s("div", at, [
|
|
540
|
-
k(b).length > 0 ? (S(), o("div", ot, [s("div", st, [c[12] ||= s("span", { class: "section-title" }, "主图指标", -1), s("span", ct, O(k(b).length), 1)]), s("div", { class: g(["indicator-grid", { compact:
|
|
540
|
+
k(b).length > 0 ? (S(), o("div", ot, [s("div", st, [c[12] ||= s("span", { class: "section-title" }, "主图指标", -1), s("span", ct, O(k(b).length), 1)]), s("div", { class: g(["indicator-grid", { compact: M.value }]) }, [(S(!0), o(e, null, T(k(b), (t) => (S(), o("button", {
|
|
541
541
|
key: t.id,
|
|
542
542
|
class: g(["indicator-card", {
|
|
543
|
-
active:
|
|
544
|
-
compact:
|
|
543
|
+
active: L(t.id),
|
|
544
|
+
compact: M.value
|
|
545
545
|
}]),
|
|
546
|
-
onClick: (e) =>
|
|
547
|
-
}, [
|
|
546
|
+
onClick: (e) => L(t.id) ? z(t.id) : R(t.id)
|
|
547
|
+
}, [M.value ? (S(), o(e, { key: 0 }, [s("span", ut, O(t.label), 1), s("span", dt, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", ft, [s("span", pt, O(t.label), 1), s("div", mt, [t.params?.length ? (S(), o("button", {
|
|
548
548
|
key: 0,
|
|
549
549
|
class: "card-settings-btn",
|
|
550
|
-
onClick:
|
|
550
|
+
onClick: I((e) => te(t.id), ["stop"]),
|
|
551
551
|
title: "编辑参数"
|
|
552
552
|
}, [...c[13] ||= [s("svg", {
|
|
553
553
|
viewBox: "0 0 24 24",
|
|
554
554
|
width: "14",
|
|
555
555
|
height: "14",
|
|
556
556
|
fill: "currentColor"
|
|
557
|
-
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8,
|
|
557
|
+
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, X)) : a("", !0)])]), s("div", Z, O(t.name), 1)], 64))], 10, lt))), 128))], 2)])) : a("", !0),
|
|
558
558
|
k(b).length > 0 && k(C).length > 0 ? (S(), o("div", ht)) : a("", !0),
|
|
559
559
|
!E.value && k(v).trim() ? (S(), o("div", gt, [...c[14] ||= [
|
|
560
560
|
s("svg", {
|
|
@@ -566,17 +566,17 @@ var je = { class: "params-header" }, Me = { class: "header-left" }, Ne = { class
|
|
|
566
566
|
s("p", null, "未找到匹配的指标", -1),
|
|
567
567
|
s("span", { class: "no-results-hint" }, "请尝试其他关键词", -1)
|
|
568
568
|
]])) : a("", !0),
|
|
569
|
-
k(C).length > 0 ? (S(), o("div", _t, [s("div", vt, [c[15] ||= s("span", { class: "section-title" }, "副图指标", -1), s("span", yt, O(k(C).length), 1)]), s("div", { class: g(["indicator-grid", { compact:
|
|
569
|
+
k(C).length > 0 ? (S(), o("div", _t, [s("div", vt, [c[15] ||= s("span", { class: "section-title" }, "副图指标", -1), s("span", yt, O(k(C).length), 1)]), s("div", { class: g(["indicator-grid", { compact: M.value }]) }, [(S(!0), o(e, null, T(k(C), (t) => (S(), o("button", {
|
|
570
570
|
key: t.id,
|
|
571
571
|
class: g(["indicator-card", {
|
|
572
|
-
active:
|
|
573
|
-
compact:
|
|
572
|
+
active: L(t.id),
|
|
573
|
+
compact: M.value
|
|
574
574
|
}]),
|
|
575
|
-
onClick: (e) =>
|
|
576
|
-
}, [
|
|
575
|
+
onClick: (e) => L(t.id) ? z(t.id) : R(t.id)
|
|
576
|
+
}, [M.value ? (S(), o(e, { key: 0 }, [s("span", xt, O(t.label), 1), s("span", St, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", Ct, [s("span", wt, O(t.label), 1), s("div", Tt, [t.params?.length ? (S(), o("button", {
|
|
577
577
|
key: 0,
|
|
578
578
|
class: "card-settings-btn",
|
|
579
|
-
onClick:
|
|
579
|
+
onClick: I((e) => te(t.id), ["stop"]),
|
|
580
580
|
title: "编辑参数"
|
|
581
581
|
}, [...c[16] ||= [s("svg", {
|
|
582
582
|
viewBox: "0 0 24 24",
|
|
@@ -585,7 +585,7 @@ var je = { class: "params-header" }, Me = { class: "header-left" }, Ne = { class
|
|
|
585
585
|
fill: "currentColor"
|
|
586
586
|
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, Et)) : a("", !0)])]), s("div", Dt, O(t.name), 1)], 64))], 10, bt))), 128))], 2)])) : a("", !0)
|
|
587
587
|
]),
|
|
588
|
-
s("div", Ot, [s("div", kt, [s("span", At, "已激活 " + O(
|
|
588
|
+
s("div", Ot, [s("div", kt, [s("span", At, "已激活 " + O(ee.value) + " 个指标", 1)]), s("button", {
|
|
589
589
|
class: "btn btn-confirm",
|
|
590
590
|
onClick: c[3] ||= (e) => k(h).closeMenu()
|
|
591
591
|
}, "确认")])
|
|
@@ -593,16 +593,16 @@ var je = { class: "params-header" }, Me = { class: "header-left" }, Ne = { class
|
|
|
593
593
|
_: 1
|
|
594
594
|
})])) : a("", !0)]),
|
|
595
595
|
_: 1
|
|
596
|
-
})], 8, ["to"])),
|
|
596
|
+
})], 8, ["to"])), F.value ? (S(), i(Je, {
|
|
597
597
|
key: 0,
|
|
598
598
|
visible: A.value,
|
|
599
|
-
"indicator-id":
|
|
600
|
-
"indicator-name":
|
|
601
|
-
"indicator-description":
|
|
602
|
-
params:
|
|
603
|
-
values:
|
|
599
|
+
"indicator-id": F.value.id,
|
|
600
|
+
"indicator-name": F.value.name,
|
|
601
|
+
"indicator-description": F.value.description,
|
|
602
|
+
params: F.value.params || [],
|
|
603
|
+
values: ne(F.value.id),
|
|
604
604
|
onClose: c[6] ||= (e) => A.value = !1,
|
|
605
|
-
onConfirm:
|
|
605
|
+
onConfirm: B
|
|
606
606
|
}, null, 8, [
|
|
607
607
|
"visible",
|
|
608
608
|
"indicator-id",
|
|
@@ -1188,7 +1188,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1188
1188
|
let t = JSON.parse(e), n = {};
|
|
1189
1189
|
return V.forEach((e) => {
|
|
1190
1190
|
n[e.key] = t[e.key] ?? e.default;
|
|
1191
|
-
}), n.colorPresetSettings =
|
|
1191
|
+
}), n.colorPresetSettings = B(t.colorPresetSettings), n;
|
|
1192
1192
|
}
|
|
1193
1193
|
} catch {}
|
|
1194
1194
|
let e = {};
|
|
@@ -1197,7 +1197,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1197
1197
|
}), e.colorPresetSettings = {}, e;
|
|
1198
1198
|
}
|
|
1199
1199
|
let y = w(v());
|
|
1200
|
-
|
|
1200
|
+
M(() => f.show, (e) => {
|
|
1201
1201
|
e && (y.value = v());
|
|
1202
1202
|
});
|
|
1203
1203
|
function b() {
|
|
@@ -1213,14 +1213,14 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1213
1213
|
p("confirm", { ...y.value });
|
|
1214
1214
|
}
|
|
1215
1215
|
return (r, d) => (S(), i(t, { to: k(m) }, [l(n, { name: "overlay" }, {
|
|
1216
|
-
default:
|
|
1216
|
+
default: N(() => [u.show ? (S(), o("div", {
|
|
1217
1217
|
key: 0,
|
|
1218
1218
|
class: "settings-overlay",
|
|
1219
1219
|
onClick: b
|
|
1220
1220
|
}, [l(n, { name: "modal" }, {
|
|
1221
|
-
default:
|
|
1221
|
+
default: N(() => [s("div", {
|
|
1222
1222
|
class: "settings-modal",
|
|
1223
|
-
onClick: d[1] ||=
|
|
1223
|
+
onClick: d[1] ||= I(() => {}, ["stop"])
|
|
1224
1224
|
}, [
|
|
1225
1225
|
s("div", { class: "settings-header" }, [d[7] ||= s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "图表设置"), s("span", { class: "settings-subtitle" }, "个性化配置")], -1), s("div", { class: "header-right" }, [s("button", {
|
|
1226
1226
|
class: "settings-close",
|
|
@@ -1235,12 +1235,12 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1235
1235
|
h.value.length > 0 ? (S(), o(e, { key: 0 }, [d[8] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "主图设置")], -1), (S(!0), o(e, null, T(h.value, (e) => (S(), o("div", {
|
|
1236
1236
|
key: e.key,
|
|
1237
1237
|
class: "settings-item"
|
|
1238
|
-
}, [s("label", cr, [s("span", null, O(e.label), 1), e.type === "boolean" ?
|
|
1238
|
+
}, [s("label", cr, [s("span", null, O(e.label), 1), e.type === "boolean" ? P((S(), o("input", {
|
|
1239
1239
|
key: 0,
|
|
1240
1240
|
type: "checkbox",
|
|
1241
1241
|
class: "settings-checkbox",
|
|
1242
1242
|
"onUpdate:modelValue": (t) => y.value[e.key] = t
|
|
1243
|
-
}, null, 8, lr)), [[A, y.value[e.key]]]) : e.type === "select" && e.options ? (S(), i(
|
|
1243
|
+
}, null, 8, lr)), [[A, y.value[e.key]]]) : e.type === "select" && e.options ? (S(), i(q, {
|
|
1244
1244
|
key: 1,
|
|
1245
1245
|
"model-value": String(y.value[e.key]),
|
|
1246
1246
|
options: e.options,
|
|
@@ -1268,12 +1268,12 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1268
1268
|
g.value.length > 0 ? (S(), o(e, { key: 1 }, [d[10] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "实验性 / 调试设置")], -1), (S(!0), o(e, null, T(g.value, (e) => (S(), o("div", {
|
|
1269
1269
|
key: e.key,
|
|
1270
1270
|
class: "settings-item experimental"
|
|
1271
|
-
}, [s("label", ur, [s("span", null, O(e.label), 1), e.type === "boolean" ?
|
|
1271
|
+
}, [s("label", ur, [s("span", null, O(e.label), 1), e.type === "boolean" ? P((S(), o("input", {
|
|
1272
1272
|
key: 0,
|
|
1273
1273
|
type: "checkbox",
|
|
1274
1274
|
class: "settings-checkbox",
|
|
1275
1275
|
"onUpdate:modelValue": (t) => y.value[e.key] = t
|
|
1276
|
-
}, null, 8, dr)), [[A, y.value[e.key]]]) : e.type === "select" && e.options ? (S(), i(
|
|
1276
|
+
}, null, 8, dr)), [[A, y.value[e.key]]]) : e.type === "select" && e.options ? (S(), i(q, {
|
|
1277
1277
|
key: 1,
|
|
1278
1278
|
"model-value": String(y.value[e.key]),
|
|
1279
1279
|
options: e.options,
|
|
@@ -1311,14 +1311,14 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1311
1311
|
})])) : a("", !0)]),
|
|
1312
1312
|
_: 1
|
|
1313
1313
|
}), l(n, { name: "overlay" }, {
|
|
1314
|
-
default:
|
|
1314
|
+
default: N(() => [_.value ? (S(), o("div", {
|
|
1315
1315
|
key: 0,
|
|
1316
1316
|
class: "settings-overlay nested-overlay",
|
|
1317
1317
|
onClick: d[5] ||= (e) => _.value = !1
|
|
1318
1318
|
}, [l(n, { name: "modal" }, {
|
|
1319
|
-
default:
|
|
1319
|
+
default: N(() => [s("div", {
|
|
1320
1320
|
class: "settings-modal",
|
|
1321
|
-
onClick: d[4] ||=
|
|
1321
|
+
onClick: d[4] ||= I(() => {}, ["stop"])
|
|
1322
1322
|
}, [s("div", fr, [d[15] ||= s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "颜色预设"), s("span", { class: "settings-subtitle" }, "自定义图表颜色")], -1), s("div", pr, [s("button", {
|
|
1323
1323
|
class: "settings-close",
|
|
1324
1324
|
onClick: d[2] ||= (e) => _.value = !1
|
|
@@ -1485,7 +1485,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1485
1485
|
return { ...v.value };
|
|
1486
1486
|
}
|
|
1487
1487
|
r({ getSettings: j });
|
|
1488
|
-
function
|
|
1488
|
+
function M(e) {
|
|
1489
1489
|
v.value = { ...e }, _(v.value), nr(!!v.value.enableCanvasProfiler), d("settingsChange", { ...v.value }), m.value = !1;
|
|
1490
1490
|
}
|
|
1491
1491
|
function P(e) {
|
|
@@ -1505,24 +1505,24 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1505
1505
|
title: t.title,
|
|
1506
1506
|
"aria-label": t.title,
|
|
1507
1507
|
onClick: (e) => C(t),
|
|
1508
|
-
onPointerdown: c[0] ||=
|
|
1509
|
-
onPointermove: c[1] ||=
|
|
1510
|
-
onPointerup: c[2] ||=
|
|
1508
|
+
onPointerdown: c[0] ||= I(() => {}, ["stop"]),
|
|
1509
|
+
onPointermove: c[1] ||= I(() => {}, ["stop"]),
|
|
1510
|
+
onPointerup: c[2] ||= I(() => {}, ["stop"])
|
|
1511
1511
|
}, [(S(), i(E(t.icon), {
|
|
1512
1512
|
class: "tool-icon",
|
|
1513
1513
|
"aria-hidden": "true"
|
|
1514
1514
|
})), t.children && t.children.length ? (S(), o("span", {
|
|
1515
1515
|
key: 0,
|
|
1516
1516
|
class: g(["corner-indicator", { open: p.value === t.id }]),
|
|
1517
|
-
onClick:
|
|
1517
|
+
onClick: I((e) => O(t.id), ["stop"]),
|
|
1518
1518
|
"aria-label": "展开子菜单"
|
|
1519
1519
|
}, null, 10, yr)) : a("", !0)], 42, vr), l(n, { name: "dropdown" }, {
|
|
1520
|
-
default:
|
|
1520
|
+
default: N(() => [p.value === t.id && t.children && t.children.length ? (S(), o("div", {
|
|
1521
1521
|
key: 0,
|
|
1522
1522
|
class: "tool-dropdown",
|
|
1523
|
-
onPointerdown: c[3] ||=
|
|
1524
|
-
onPointermove: c[4] ||=
|
|
1525
|
-
onPointerup: c[5] ||=
|
|
1523
|
+
onPointerdown: c[3] ||= I(() => {}, ["stop"]),
|
|
1524
|
+
onPointermove: c[4] ||= I(() => {}, ["stop"]),
|
|
1525
|
+
onPointerup: c[5] ||= I(() => {}, ["stop"])
|
|
1526
1526
|
}, [(S(!0), o(e, null, T(t.children, (e) => (S(), o("button", {
|
|
1527
1527
|
key: e.id,
|
|
1528
1528
|
type: "button",
|
|
@@ -1543,9 +1543,9 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1543
1543
|
title: "放大",
|
|
1544
1544
|
"aria-label": "放大",
|
|
1545
1545
|
onClick: c[6] ||= (e) => r.$emit("zoomIn"),
|
|
1546
|
-
onPointerdown: c[7] ||=
|
|
1547
|
-
onPointermove: c[8] ||=
|
|
1548
|
-
onPointerup: c[9] ||=
|
|
1546
|
+
onPointerdown: c[7] ||= I(() => {}, ["stop"]),
|
|
1547
|
+
onPointermove: c[8] ||= I(() => {}, ["stop"]),
|
|
1548
|
+
onPointerup: c[9] ||= I(() => {}, ["stop"])
|
|
1549
1549
|
}, [l(k(Cn), {
|
|
1550
1550
|
class: "tool-icon",
|
|
1551
1551
|
"aria-hidden": "true"
|
|
@@ -1555,9 +1555,9 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1555
1555
|
title: "缩小",
|
|
1556
1556
|
"aria-label": "缩小",
|
|
1557
1557
|
onClick: c[10] ||= (e) => r.$emit("zoomOut"),
|
|
1558
|
-
onPointerdown: c[11] ||=
|
|
1559
|
-
onPointermove: c[12] ||=
|
|
1560
|
-
onPointerup: c[13] ||=
|
|
1558
|
+
onPointerdown: c[11] ||= I(() => {}, ["stop"]),
|
|
1559
|
+
onPointermove: c[12] ||= I(() => {}, ["stop"]),
|
|
1560
|
+
onPointerup: c[13] ||= I(() => {}, ["stop"])
|
|
1561
1561
|
}, [l(k(En), {
|
|
1562
1562
|
class: "tool-icon",
|
|
1563
1563
|
"aria-hidden": "true"
|
|
@@ -1569,9 +1569,9 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1569
1569
|
title: t.isFullscreen ? "退出全屏" : "全屏显示",
|
|
1570
1570
|
"aria-label": t.isFullscreen ? "退出全屏" : "全屏显示",
|
|
1571
1571
|
onClick: c[14] ||= (e) => r.$emit("toggleFullscreen"),
|
|
1572
|
-
onPointerdown: c[15] ||=
|
|
1573
|
-
onPointermove: c[16] ||=
|
|
1574
|
-
onPointerup: c[17] ||=
|
|
1572
|
+
onPointerdown: c[15] ||= I(() => {}, ["stop"]),
|
|
1573
|
+
onPointermove: c[16] ||= I(() => {}, ["stop"]),
|
|
1574
|
+
onPointerup: c[17] ||= I(() => {}, ["stop"])
|
|
1575
1575
|
}, [t.isFullscreen ? (S(), i(k(Mn), {
|
|
1576
1576
|
key: 0,
|
|
1577
1577
|
class: "tool-icon",
|
|
@@ -1588,9 +1588,9 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1588
1588
|
title: "设置",
|
|
1589
1589
|
"aria-label": "设置",
|
|
1590
1590
|
onClick: A,
|
|
1591
|
-
onPointerdown: c[18] ||=
|
|
1592
|
-
onPointermove: c[19] ||=
|
|
1593
|
-
onPointerup: c[20] ||=
|
|
1591
|
+
onPointerdown: c[18] ||= I(() => {}, ["stop"]),
|
|
1592
|
+
onPointermove: c[19] ||= I(() => {}, ["stop"]),
|
|
1593
|
+
onPointerup: c[20] ||= I(() => {}, ["stop"])
|
|
1594
1594
|
}, [l(k(Fn), {
|
|
1595
1595
|
class: "tool-icon",
|
|
1596
1596
|
"aria-hidden": "true"
|
|
@@ -1598,7 +1598,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1598
1598
|
]), l(hr, {
|
|
1599
1599
|
show: m.value,
|
|
1600
1600
|
onClose: c[21] ||= (e) => m.value = !1,
|
|
1601
|
-
onConfirm:
|
|
1601
|
+
onConfirm: M
|
|
1602
1602
|
}, null, 8, ["show"])], 64));
|
|
1603
1603
|
}
|
|
1604
1604
|
}), [["__scopeId", "data-v-66411b58"]]), Er = /* @__PURE__ */ u({
|
|
@@ -1644,7 +1644,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1644
1644
|
value: "yearly"
|
|
1645
1645
|
}
|
|
1646
1646
|
], r = t;
|
|
1647
|
-
return (t, a) => (S(), i(
|
|
1647
|
+
return (t, a) => (S(), i(q, {
|
|
1648
1648
|
"model-value": e.modelValue,
|
|
1649
1649
|
options: n,
|
|
1650
1650
|
label: "级别",
|
|
@@ -1653,62 +1653,354 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1653
1653
|
"onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
|
|
1654
1654
|
}, null, 8, ["model-value"]));
|
|
1655
1655
|
}
|
|
1656
|
-
}), Dr = {
|
|
1656
|
+
}), Dr = {
|
|
1657
|
+
viewBox: "0 0 24 24",
|
|
1658
|
+
width: "1.2em",
|
|
1659
|
+
height: "1.2em"
|
|
1660
|
+
};
|
|
1661
|
+
function Or(e, t) {
|
|
1662
|
+
return S(), o("svg", Dr, [...t[0] ||= [s("path", {
|
|
1663
|
+
fill: "none",
|
|
1664
|
+
stroke: "currentColor",
|
|
1665
|
+
"stroke-linecap": "round",
|
|
1666
|
+
"stroke-linejoin": "round",
|
|
1667
|
+
"stroke-width": "2",
|
|
1668
|
+
d: "M12 9v4m-1.637-9.409L2.257 17.125a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636-2.87L13.637 3.59a1.914 1.914 0 0 0-3.274 0M12 16h.01"
|
|
1669
|
+
}, null, -1)]]);
|
|
1670
|
+
}
|
|
1671
|
+
var kr = m({
|
|
1672
|
+
name: "tabler-alert-triangle",
|
|
1673
|
+
render: Or
|
|
1674
|
+
}), Ar = ["title", "aria-expanded"], jr = { class: "symbol-chip__code" }, Mr = {
|
|
1675
|
+
key: 0,
|
|
1676
|
+
class: "symbol-chip__spinner",
|
|
1677
|
+
"aria-hidden": "true"
|
|
1678
|
+
}, Nr = {
|
|
1679
|
+
key: 0,
|
|
1680
|
+
class: "symbol-popover",
|
|
1681
|
+
role: "dialog",
|
|
1682
|
+
"aria-label": "切换合约"
|
|
1683
|
+
}, Pr = { class: "symbol-search" }, Fr = {
|
|
1684
|
+
class: "symbol-list",
|
|
1685
|
+
role: "listbox",
|
|
1686
|
+
"aria-label": "商品列表"
|
|
1687
|
+
}, Ir = {
|
|
1688
|
+
key: 0,
|
|
1689
|
+
class: "symbol-list__empty"
|
|
1690
|
+
}, Lr = {
|
|
1691
|
+
width: "32",
|
|
1692
|
+
height: "32",
|
|
1693
|
+
viewBox: "0 0 32 32",
|
|
1694
|
+
fill: "none",
|
|
1695
|
+
style: {
|
|
1696
|
+
"margin-bottom": "8px",
|
|
1697
|
+
opacity: "0.35"
|
|
1698
|
+
}
|
|
1699
|
+
}, Rr = ["aria-selected", "onClick"], zr = { class: "symbol-list__left" }, Br = { class: "symbol-list__code" }, Vr = { class: "symbol-list__desc" }, Hr = { class: "symbol-list__exchange" }, Ur = /*#__PURE__*/ W(/* @__PURE__ */ u({
|
|
1700
|
+
__name: "SymbolSelector",
|
|
1701
|
+
props: {
|
|
1702
|
+
symbol: {},
|
|
1703
|
+
symbols: {},
|
|
1704
|
+
loading: { type: Boolean },
|
|
1705
|
+
error: { type: Boolean }
|
|
1706
|
+
},
|
|
1707
|
+
emits: ["change"],
|
|
1708
|
+
setup(t, { emit: c }) {
|
|
1709
|
+
let u = t, d = c, f = w(!1), p = w(""), m = w(null), _ = w(null), b = r(() => {
|
|
1710
|
+
let e = p.value.trim().toLowerCase();
|
|
1711
|
+
return e ? u.symbols.filter((t) => t.code.toLowerCase().includes(e) || t.description.toLowerCase().includes(e) || t.exchange.toLowerCase().includes(e)) : u.symbols;
|
|
1712
|
+
});
|
|
1713
|
+
function x() {
|
|
1714
|
+
f.value = !f.value, f.value && h(() => m.value?.focus());
|
|
1715
|
+
}
|
|
1716
|
+
function C() {
|
|
1717
|
+
p.value = "", m.value?.focus();
|
|
1718
|
+
}
|
|
1719
|
+
function E() {}
|
|
1720
|
+
function D(e) {
|
|
1721
|
+
d("change", e), f.value = !1, p.value = "";
|
|
1722
|
+
}
|
|
1723
|
+
function A(e) {
|
|
1724
|
+
_.value && !_.value.contains(e.target) && (f.value = !1);
|
|
1725
|
+
}
|
|
1726
|
+
return y(() => document.addEventListener("mousedown", A)), v(() => document.removeEventListener("mousedown", A)), M(() => u.symbol, () => {
|
|
1727
|
+
f.value = !1, p.value = "";
|
|
1728
|
+
}), (r, c) => (S(), o("div", {
|
|
1729
|
+
ref_key: "chipWrapRef",
|
|
1730
|
+
ref: _,
|
|
1731
|
+
class: "symbol-chip-wrap"
|
|
1732
|
+
}, [s("button", {
|
|
1733
|
+
type: "button",
|
|
1734
|
+
class: g(["symbol-chip", { "is-open": f.value }]),
|
|
1735
|
+
title: t.symbol,
|
|
1736
|
+
"aria-expanded": f.value,
|
|
1737
|
+
"aria-haspopup": "dialog",
|
|
1738
|
+
onClick: x
|
|
1739
|
+
}, [s("span", jr, O(t.symbol), 1), t.loading ? (S(), o("span", Mr)) : t.error ? (S(), i(k(kr), {
|
|
1740
|
+
key: 1,
|
|
1741
|
+
class: "symbol-chip__warn",
|
|
1742
|
+
"aria-hidden": "true"
|
|
1743
|
+
})) : a("", !0)], 10, Ar), l(n, { name: "symbol-popover" }, {
|
|
1744
|
+
default: N(() => [f.value ? (S(), o("div", Nr, [s("div", Pr, [
|
|
1745
|
+
c[2] ||= s("span", {
|
|
1746
|
+
class: "symbol-search__icon",
|
|
1747
|
+
"aria-hidden": "true"
|
|
1748
|
+
}, [s("svg", {
|
|
1749
|
+
width: "14",
|
|
1750
|
+
height: "14",
|
|
1751
|
+
viewBox: "0 0 16 16",
|
|
1752
|
+
fill: "none"
|
|
1753
|
+
}, [s("circle", {
|
|
1754
|
+
cx: "6.5",
|
|
1755
|
+
cy: "6.5",
|
|
1756
|
+
r: "5",
|
|
1757
|
+
stroke: "currentColor",
|
|
1758
|
+
"stroke-width": "1.6"
|
|
1759
|
+
}), s("line", {
|
|
1760
|
+
x1: "10.5",
|
|
1761
|
+
y1: "10.5",
|
|
1762
|
+
x2: "14.5",
|
|
1763
|
+
y2: "14.5",
|
|
1764
|
+
stroke: "currentColor",
|
|
1765
|
+
"stroke-width": "1.6",
|
|
1766
|
+
"stroke-linecap": "round"
|
|
1767
|
+
})])], -1),
|
|
1768
|
+
P(s("input", {
|
|
1769
|
+
ref_key: "searchInputRef",
|
|
1770
|
+
ref: m,
|
|
1771
|
+
"onUpdate:modelValue": c[0] ||= (e) => p.value = e,
|
|
1772
|
+
class: "symbol-search__input",
|
|
1773
|
+
type: "text",
|
|
1774
|
+
placeholder: "搜索代码或名称…",
|
|
1775
|
+
autocomplete: "off",
|
|
1776
|
+
spellcheck: "false",
|
|
1777
|
+
"aria-label": "搜索商品",
|
|
1778
|
+
onInput: E
|
|
1779
|
+
}, null, 544), [[j, p.value]]),
|
|
1780
|
+
p.value ? (S(), o("button", {
|
|
1781
|
+
key: 0,
|
|
1782
|
+
type: "button",
|
|
1783
|
+
class: "symbol-search__clear",
|
|
1784
|
+
"aria-label": "清空搜索",
|
|
1785
|
+
onClick: C
|
|
1786
|
+
}, [...c[1] ||= [s("svg", {
|
|
1787
|
+
class: "delete-icon",
|
|
1788
|
+
viewBox: "0 0 24 24",
|
|
1789
|
+
fill: "none",
|
|
1790
|
+
stroke: "currentColor",
|
|
1791
|
+
"stroke-width": "2",
|
|
1792
|
+
"stroke-linecap": "round",
|
|
1793
|
+
"stroke-linejoin": "round",
|
|
1794
|
+
"aria-hidden": "true"
|
|
1795
|
+
}, [
|
|
1796
|
+
s("path", { d: "M3 6h18" }),
|
|
1797
|
+
s("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
|
|
1798
|
+
s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
|
|
1799
|
+
], -1)]])) : a("", !0)
|
|
1800
|
+
]), s("div", Fr, [b.value.length === 0 ? (S(), o("div", Ir, [(S(), o("svg", Lr, [...c[3] ||= [s("circle", {
|
|
1801
|
+
cx: "13",
|
|
1802
|
+
cy: "13",
|
|
1803
|
+
r: "10",
|
|
1804
|
+
stroke: "currentColor",
|
|
1805
|
+
"stroke-width": "2"
|
|
1806
|
+
}, null, -1), s("line", {
|
|
1807
|
+
x1: "21",
|
|
1808
|
+
y1: "21",
|
|
1809
|
+
x2: "29",
|
|
1810
|
+
y2: "29",
|
|
1811
|
+
stroke: "currentColor",
|
|
1812
|
+
"stroke-width": "2",
|
|
1813
|
+
"stroke-linecap": "round"
|
|
1814
|
+
}, null, -1)]])), c[4] ||= s("span", null, "未找到相关商品", -1)])) : a("", !0), (S(!0), o(e, null, T(b.value, (e) => (S(), o("button", {
|
|
1815
|
+
key: e.code,
|
|
1816
|
+
type: "button",
|
|
1817
|
+
class: g(["symbol-list__item", { "is-active": e.code === t.symbol }]),
|
|
1818
|
+
role: "option",
|
|
1819
|
+
"aria-selected": e.code === t.symbol,
|
|
1820
|
+
onClick: (t) => D(e)
|
|
1821
|
+
}, [s("span", zr, [s("span", Br, O(e.code), 1), s("span", Vr, O(e.description), 1)]), s("span", Hr, O(e.exchange), 1)], 10, Rr))), 128))])])) : a("", !0)]),
|
|
1822
|
+
_: 1
|
|
1823
|
+
})], 512));
|
|
1824
|
+
}
|
|
1825
|
+
}), [["__scopeId", "data-v-e22f59e1"]]), Wr = { class: "top-toolbar" }, Gr = /*#__PURE__*/ W(/* @__PURE__ */ u({
|
|
1657
1826
|
__name: "TopToolbar",
|
|
1658
1827
|
props: {
|
|
1659
1828
|
symbol: {},
|
|
1660
|
-
kLineLevel: {}
|
|
1829
|
+
kLineLevel: {},
|
|
1830
|
+
symbols: {},
|
|
1831
|
+
symbolLoading: { type: Boolean },
|
|
1832
|
+
symbolError: { type: Boolean }
|
|
1661
1833
|
},
|
|
1662
1834
|
emits: [
|
|
1663
1835
|
"addOverlaySymbol",
|
|
1664
1836
|
"kLineLevelChange",
|
|
1665
|
-
"toggleIndicator"
|
|
1837
|
+
"toggleIndicator",
|
|
1838
|
+
"symbolChange"
|
|
1666
1839
|
],
|
|
1667
1840
|
setup(e, { emit: t }) {
|
|
1668
|
-
let n = e,
|
|
1669
|
-
|
|
1670
|
-
|
|
1841
|
+
let n = e, c = t, u = [
|
|
1842
|
+
{
|
|
1843
|
+
code: "AAPL",
|
|
1844
|
+
description: "Apple Inc.",
|
|
1845
|
+
exchange: "NASDAQ",
|
|
1846
|
+
source: "baostock"
|
|
1847
|
+
},
|
|
1848
|
+
{
|
|
1849
|
+
code: "TSLA",
|
|
1850
|
+
description: "Tesla, Inc.",
|
|
1851
|
+
exchange: "NASDAQ",
|
|
1852
|
+
source: "baostock"
|
|
1853
|
+
},
|
|
1854
|
+
{
|
|
1855
|
+
code: "GOOGL",
|
|
1856
|
+
description: "Alphabet Inc.",
|
|
1857
|
+
exchange: "NASDAQ",
|
|
1858
|
+
source: "baostock"
|
|
1859
|
+
},
|
|
1860
|
+
{
|
|
1861
|
+
code: "MSFT",
|
|
1862
|
+
description: "Microsoft Corporation",
|
|
1863
|
+
exchange: "NASDAQ",
|
|
1864
|
+
source: "baostock"
|
|
1865
|
+
},
|
|
1866
|
+
{
|
|
1867
|
+
code: "AMZN",
|
|
1868
|
+
description: "Amazon.com, Inc.",
|
|
1869
|
+
exchange: "NASDAQ",
|
|
1870
|
+
source: "baostock"
|
|
1871
|
+
},
|
|
1872
|
+
{
|
|
1873
|
+
code: "NVDA",
|
|
1874
|
+
description: "NVIDIA Corporation",
|
|
1875
|
+
exchange: "NASDAQ",
|
|
1876
|
+
source: "baostock"
|
|
1877
|
+
},
|
|
1878
|
+
{
|
|
1879
|
+
code: "META",
|
|
1880
|
+
description: "Meta Platforms, Inc.",
|
|
1881
|
+
exchange: "NASDAQ",
|
|
1882
|
+
source: "baostock"
|
|
1883
|
+
},
|
|
1884
|
+
{
|
|
1885
|
+
code: "BRK.B",
|
|
1886
|
+
description: "Berkshire Hathaway Inc.",
|
|
1887
|
+
exchange: "NYSE",
|
|
1888
|
+
source: "baostock"
|
|
1889
|
+
},
|
|
1890
|
+
{
|
|
1891
|
+
code: "JPM",
|
|
1892
|
+
description: "JPMorgan Chase & Co.",
|
|
1893
|
+
exchange: "NYSE",
|
|
1894
|
+
source: "baostock"
|
|
1895
|
+
},
|
|
1896
|
+
{
|
|
1897
|
+
code: "V",
|
|
1898
|
+
description: "Visa Inc.",
|
|
1899
|
+
exchange: "NYSE",
|
|
1900
|
+
source: "baostock"
|
|
1901
|
+
},
|
|
1902
|
+
{
|
|
1903
|
+
code: "BTCUSDT",
|
|
1904
|
+
description: "Bitcoin / Tether",
|
|
1905
|
+
exchange: "BINANCE",
|
|
1906
|
+
source: "baostock"
|
|
1907
|
+
},
|
|
1908
|
+
{
|
|
1909
|
+
code: "ETHUSDT",
|
|
1910
|
+
description: "Ethereum / Tether",
|
|
1911
|
+
exchange: "BINANCE",
|
|
1912
|
+
source: "baostock"
|
|
1913
|
+
},
|
|
1914
|
+
{
|
|
1915
|
+
code: "sh.601360",
|
|
1916
|
+
description: "三六零",
|
|
1917
|
+
exchange: "SSE",
|
|
1918
|
+
source: "baostock"
|
|
1919
|
+
},
|
|
1920
|
+
{
|
|
1921
|
+
code: "sh.600519",
|
|
1922
|
+
description: "贵州茅台",
|
|
1923
|
+
exchange: "SSE",
|
|
1924
|
+
source: "baostock"
|
|
1925
|
+
},
|
|
1926
|
+
{
|
|
1927
|
+
code: "000858",
|
|
1928
|
+
description: "五 粮 液",
|
|
1929
|
+
exchange: "SZSE",
|
|
1930
|
+
source: "baostock"
|
|
1931
|
+
},
|
|
1932
|
+
{
|
|
1933
|
+
code: "000001",
|
|
1934
|
+
description: "平安银行",
|
|
1935
|
+
exchange: "SZSE",
|
|
1936
|
+
source: "baostock"
|
|
1937
|
+
},
|
|
1938
|
+
{
|
|
1939
|
+
code: "MOCK-100",
|
|
1940
|
+
description: "Mock 100 条",
|
|
1941
|
+
exchange: "MOCK",
|
|
1942
|
+
source: "mock-100"
|
|
1943
|
+
},
|
|
1944
|
+
{
|
|
1945
|
+
code: "MOCK-10000",
|
|
1946
|
+
description: "Mock 10000 条",
|
|
1947
|
+
exchange: "MOCK",
|
|
1948
|
+
source: "mock-10000"
|
|
1949
|
+
}
|
|
1950
|
+
], d = r(() => n.symbol?.trim() ?? ""), f = r(() => n.symbols && n.symbols.length ? n.symbols : u);
|
|
1951
|
+
function p(e) {
|
|
1952
|
+
c("symbolChange", e);
|
|
1953
|
+
}
|
|
1954
|
+
return (t, n) => (S(), o("div", Wr, [
|
|
1955
|
+
d.value ? (S(), i(Ur, {
|
|
1671
1956
|
key: 0,
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1957
|
+
symbol: d.value,
|
|
1958
|
+
symbols: f.value,
|
|
1959
|
+
loading: e.symbolLoading,
|
|
1960
|
+
error: e.symbolError,
|
|
1961
|
+
onChange: p
|
|
1962
|
+
}, null, 8, [
|
|
1963
|
+
"symbol",
|
|
1964
|
+
"symbols",
|
|
1965
|
+
"loading",
|
|
1966
|
+
"error"
|
|
1967
|
+
])) : a("", !0),
|
|
1676
1968
|
s("button", {
|
|
1677
1969
|
type: "button",
|
|
1678
1970
|
class: "overlay-symbol-button",
|
|
1679
|
-
title: "
|
|
1680
|
-
"aria-label": "
|
|
1681
|
-
onClick: n[0] ||= (e) =>
|
|
1971
|
+
title: "添加比较商品",
|
|
1972
|
+
"aria-label": "添加比较商品",
|
|
1973
|
+
onClick: n[0] ||= (e) => c("addOverlaySymbol")
|
|
1682
1974
|
}, [...n[3] ||= [s("span", {
|
|
1683
1975
|
class: "overlay-symbol-button__icon",
|
|
1684
1976
|
"aria-hidden": "true"
|
|
1685
|
-
}, "+", -1), s("span", { class: "overlay-symbol-button__text" }, "
|
|
1977
|
+
}, "+", -1), s("span", { class: "overlay-symbol-button__text" }, "添加比较商品", -1)]]),
|
|
1686
1978
|
l(Er, {
|
|
1687
1979
|
"model-value": e.kLineLevel,
|
|
1688
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
1980
|
+
"onUpdate:modelValue": n[1] ||= (e) => c("kLineLevelChange", e)
|
|
1689
1981
|
}, null, 8, ["model-value"]),
|
|
1690
1982
|
s("button", {
|
|
1691
1983
|
type: "button",
|
|
1692
1984
|
class: "indicator-button",
|
|
1693
1985
|
title: "指标",
|
|
1694
1986
|
"aria-label": "指标",
|
|
1695
|
-
onClick: n[2] ||= (e) =>
|
|
1987
|
+
onClick: n[2] ||= (e) => c("toggleIndicator")
|
|
1696
1988
|
}, [...n[4] ||= [s("span", {
|
|
1697
1989
|
class: "indicator-button__icon",
|
|
1698
1990
|
"aria-hidden": "true"
|
|
1699
1991
|
}, "fx", -1), s("span", { class: "indicator-button__text" }, "指标", -1)]])
|
|
1700
1992
|
]));
|
|
1701
1993
|
}
|
|
1702
|
-
}), [["__scopeId", "data-v-
|
|
1994
|
+
}), [["__scopeId", "data-v-52799f85"]]), Kr = ["data-theme"], qr = {
|
|
1703
1995
|
class: "pane-separator-layer",
|
|
1704
1996
|
"aria-hidden": "true"
|
|
1705
|
-
},
|
|
1997
|
+
}, Jr = {
|
|
1706
1998
|
class: "canvas-layer",
|
|
1707
1999
|
ref: "canvasLayerRef"
|
|
1708
|
-
},
|
|
2000
|
+
}, Yr = {
|
|
1709
2001
|
class: "x-axis-canvas",
|
|
1710
2002
|
ref: "xAxisCanvasRef"
|
|
1711
|
-
},
|
|
2003
|
+
}, Xr = 4, Zr = /*#__PURE__*/ W(/* @__PURE__ */ u({
|
|
1712
2004
|
__name: "KLineChart",
|
|
1713
2005
|
props: {
|
|
1714
2006
|
semanticConfig: {},
|
|
@@ -1734,27 +2026,38 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1734
2026
|
"kLineLevelChange"
|
|
1735
2027
|
],
|
|
1736
2028
|
setup(n, { expose: c, emit: u }) {
|
|
1737
|
-
let d = n, f = u, p = w(d.semanticConfig.data.period);
|
|
1738
|
-
function
|
|
2029
|
+
let d = n, f = u, p = w(d.semanticConfig.data.period), m = w("选择商品"), v = w(!1), b = w(!1);
|
|
2030
|
+
function C(e) {
|
|
1739
2031
|
p.value = e, f("kLineLevelChange", e);
|
|
1740
2032
|
}
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
2033
|
+
function E(e) {
|
|
2034
|
+
v.value = !0, b.value = !1, m.value = e.code, F.value?.setSymbols([{
|
|
2035
|
+
symbol: e.code,
|
|
2036
|
+
exchange: e.exchange,
|
|
2037
|
+
period: p.value,
|
|
2038
|
+
source: e.source,
|
|
2039
|
+
startDate: d.semanticConfig.data.startDate,
|
|
2040
|
+
endDate: d.semanticConfig.data.endDate,
|
|
2041
|
+
adjust: d.semanticConfig.data.adjust
|
|
2042
|
+
}]);
|
|
2043
|
+
}
|
|
2044
|
+
let O = w(null), k = w(null), A = w(null), j = w(null), N = w(null), P = w(null);
|
|
2045
|
+
ke(A);
|
|
2046
|
+
let F = D(null), I = D(null), ee = w(0), L = w(0), R = w(1), z = w(d.initialZoomLevel ?? 1), B = w(0), oe = w(1), ce = w(0), le = w({}), V = w(null), H = w([]), he = z.value;
|
|
2047
|
+
B.value = fe(he, {
|
|
1745
2048
|
minKWidth: d.minKWidth,
|
|
1746
2049
|
maxKWidth: d.maxKWidth,
|
|
1747
2050
|
zoomLevelCount: d.zoomLevels,
|
|
1748
|
-
dpr:
|
|
1749
|
-
}),
|
|
1750
|
-
let
|
|
1751
|
-
let e =
|
|
2051
|
+
dpr: R.value
|
|
2052
|
+
}), oe.value = de(B.value, R.value);
|
|
2053
|
+
let ge = w("light"), _e = w({}), ve = r(() => {
|
|
2054
|
+
let e = _e.value.isAsiaMarket ?? !1, t = re(ge.value, e);
|
|
1752
2055
|
return {
|
|
1753
2056
|
upColor: t.candleUpBody,
|
|
1754
2057
|
downColor: t.candleDownBody
|
|
1755
2058
|
};
|
|
1756
|
-
}),
|
|
1757
|
-
let e =
|
|
2059
|
+
}), ye = r(() => {
|
|
2060
|
+
let e = ge.value === "dark" ? te : ne, t = _e.value.colorPresetSettings?.[ge.value];
|
|
1758
2061
|
return t && Object.keys(t).length > 0 ? ie({
|
|
1759
2062
|
...e,
|
|
1760
2063
|
colors: {
|
|
@@ -1763,65 +2066,47 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1763
2066
|
}
|
|
1764
2067
|
}) : ie(e);
|
|
1765
2068
|
}), U = null;
|
|
1766
|
-
function
|
|
1767
|
-
|
|
2069
|
+
function be(e) {
|
|
2070
|
+
F.value?.setTheme(e.matches ? "dark" : "light");
|
|
1768
2071
|
}
|
|
1769
|
-
function
|
|
2072
|
+
function W(e, t) {
|
|
1770
2073
|
if (!(!e || !t)) if (t === "auto") {
|
|
1771
2074
|
let t = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1772
|
-
e.setTheme(t.matches ? "dark" : "light"), U !== t && (U?.removeEventListener("change",
|
|
1773
|
-
} else U?.removeEventListener("change",
|
|
2075
|
+
e.setTheme(t.matches ? "dark" : "light"), U !== t && (U?.removeEventListener("change", be), U = t, t.addEventListener("change", be));
|
|
2076
|
+
} else U?.removeEventListener("change", be), U = null, e.setTheme(t);
|
|
1774
2077
|
}
|
|
1775
|
-
function
|
|
1776
|
-
function
|
|
1777
|
-
|
|
1778
|
-
let e = W();
|
|
1779
|
-
console.time("updateData-10k"), A.value?.updateData(e), console.timeEnd("updateData-10k"), N.value = e.length, P.value++;
|
|
1780
|
-
} else M.value && A.value?.getData()?.length === 1e4 && M.value.applyConfig(d.semanticConfig);
|
|
1781
|
-
}
|
|
1782
|
-
function W() {
|
|
1783
|
-
let e = [], t = (/* @__PURE__ */ new Date("2020-01-01")).getTime(), n = 3e3;
|
|
1784
|
-
for (let r = 0; r < 1e4; r++) {
|
|
1785
|
-
let i = t + r * 864e5, a = (Math.random() - .5) * 2 * .02 + 1e-4, o = n, s = o * (1 + a), c = Math.max(o, s) * (1 + Math.random() * .01), l = Math.min(o, s) * (1 - Math.random() * .01), u = Math.floor(1e6 + Math.random() * 5e6);
|
|
1786
|
-
e.push({
|
|
1787
|
-
timestamp: i,
|
|
1788
|
-
open: parseFloat(o.toFixed(2)),
|
|
1789
|
-
high: parseFloat(c.toFixed(2)),
|
|
1790
|
-
low: parseFloat(l.toFixed(2)),
|
|
1791
|
-
close: parseFloat(s.toFixed(2)),
|
|
1792
|
-
volume: u
|
|
1793
|
-
}), n = s;
|
|
1794
|
-
}
|
|
1795
|
-
return e;
|
|
2078
|
+
function xe() {}
|
|
2079
|
+
function Se(e) {
|
|
2080
|
+
_e.value = e, W(F.value, e.theme), F.value?.updateSettingsFacade(e), F.value?.setDataFetcher(d.dataFetcher), I.value && d.semanticConfig && I.value.applyConfig(d.semanticConfig);
|
|
1796
2081
|
}
|
|
1797
|
-
function
|
|
2082
|
+
function Ce(e, t, n) {
|
|
1798
2083
|
let r = e.getBoundingClientRect();
|
|
1799
2084
|
return {
|
|
1800
2085
|
width: Math.max(t, Math.round(r.width)),
|
|
1801
2086
|
height: Math.max(n, Math.round(r.height))
|
|
1802
2087
|
};
|
|
1803
2088
|
}
|
|
1804
|
-
function
|
|
2089
|
+
function we(e) {
|
|
1805
2090
|
e && h(() => {
|
|
1806
2091
|
if (!e.isConnected) return;
|
|
1807
|
-
let t =
|
|
1808
|
-
|
|
2092
|
+
let t = Ce(e, 180, 80);
|
|
2093
|
+
F.value?.setTooltipSize(t);
|
|
1809
2094
|
});
|
|
1810
2095
|
}
|
|
1811
|
-
function
|
|
2096
|
+
function Te(e) {
|
|
1812
2097
|
e && h(() => {
|
|
1813
|
-
e.isConnected && (
|
|
2098
|
+
e.isConnected && (Me.value = Ce(e, 120, 60));
|
|
1814
2099
|
});
|
|
1815
2100
|
}
|
|
1816
|
-
let
|
|
2101
|
+
let G = w({
|
|
1817
2102
|
x: 0,
|
|
1818
2103
|
y: 0
|
|
1819
|
-
}),
|
|
2104
|
+
}), K = w(!1), Ee = null;
|
|
1820
2105
|
function q() {
|
|
1821
|
-
|
|
2106
|
+
Ee = null;
|
|
1822
2107
|
}
|
|
1823
|
-
function
|
|
1824
|
-
return
|
|
2108
|
+
function De(e) {
|
|
2109
|
+
return Ee ||= e.getBoundingClientRect(), Ee;
|
|
1825
2110
|
}
|
|
1826
2111
|
let J = D({
|
|
1827
2112
|
crosshairPos: null,
|
|
@@ -1841,14 +2126,14 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1841
2126
|
isHoveringPaneBoundary: !1,
|
|
1842
2127
|
hoveredPaneBoundaryId: null,
|
|
1843
2128
|
isHoveringRightAxis: !1
|
|
1844
|
-
}), Y = D(null),
|
|
1845
|
-
let e =
|
|
1846
|
-
return e ?
|
|
1847
|
-
}),
|
|
2129
|
+
}), Y = D(null), Ae = r(() => {
|
|
2130
|
+
let e = V.value;
|
|
2131
|
+
return e ? H.value.find((t) => t.id === e) ?? null : null;
|
|
2132
|
+
}), je = w([]), Me = w({
|
|
1848
2133
|
width: 220,
|
|
1849
2134
|
height: 120
|
|
1850
|
-
}),
|
|
1851
|
-
let e =
|
|
2135
|
+
}), Ne = r(() => {
|
|
2136
|
+
let e = O.value, t = k.value;
|
|
1852
2137
|
return !e || !t ? {
|
|
1853
2138
|
x: 0,
|
|
1854
2139
|
y: 0
|
|
@@ -1856,86 +2141,86 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1856
2141
|
x: e.offsetLeft,
|
|
1857
2142
|
y: e.offsetTop
|
|
1858
2143
|
};
|
|
1859
|
-
}),
|
|
2144
|
+
}), Pe = r(() => J.value.hoveredMarkerData), Fe = r(() => J.value.hoveredCustomMarker), Ie = r(() => J.value.isDragging), Le = r(() => J.value.isResizingPaneBoundary), Re = r(() => J.value.isHoveringPaneBoundary), ze = r(() => J.value.hoveredPaneBoundaryId), Be = r(() => J.value.isHoveringRightAxis), Ve = r(() => J.value.hoveredIndex);
|
|
1860
2145
|
r(() => J.value.crosshairIndex);
|
|
1861
|
-
let
|
|
2146
|
+
let He = r(() => Ie.value ? "grabbing" : Le.value || Re.value ? "ns-resize" : Ve.value === null ? "crosshair" : "pointer"), Ue = r(() => {
|
|
1862
2147
|
let e = J.value.hoveredIndex;
|
|
1863
2148
|
if (typeof e != "number") return null;
|
|
1864
|
-
|
|
1865
|
-
let t =
|
|
2149
|
+
L.value;
|
|
2150
|
+
let t = F.value?.getData();
|
|
1866
2151
|
return t && e >= 0 && e < t.length ? t[e] : null;
|
|
1867
|
-
}),
|
|
1868
|
-
x:
|
|
1869
|
-
y:
|
|
1870
|
-
})), Ge = r(() => ({
|
|
1871
|
-
left: `${We.value.x}px`,
|
|
1872
|
-
top: `${We.value.y}px`
|
|
1873
|
-
})), Ke = r(() => ({
|
|
1874
|
-
x: we.value.x + je.value.x,
|
|
1875
|
-
y: we.value.y + je.value.y
|
|
2152
|
+
}), We = r(() => J.value.hoveredIndex), Ge = r(() => J.value.tooltipPos), Ke = r(() => ({
|
|
2153
|
+
x: Ge.value.x + Ne.value.x,
|
|
2154
|
+
y: Ge.value.y + Ne.value.y
|
|
1876
2155
|
})), qe = r(() => ({
|
|
1877
2156
|
left: `${Ke.value.x}px`,
|
|
1878
2157
|
top: `${Ke.value.y}px`
|
|
1879
|
-
})), Je = r(() =>
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
}),
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
}
|
|
2158
|
+
})), Je = r(() => ({
|
|
2159
|
+
x: G.value.x + Ne.value.x,
|
|
2160
|
+
y: G.value.y + Ne.value.y
|
|
2161
|
+
})), Ye = r(() => ({
|
|
2162
|
+
left: `${Je.value.x}px`,
|
|
2163
|
+
top: `${Je.value.y}px`
|
|
2164
|
+
})), Xe = r(() => J.value.tooltipAnchorPlacement), Ze = r(() => {
|
|
2165
|
+
let e = F.value?.viewport.peek(), t = O.value, n = e?.plotWidth ?? (t ? t.clientWidth : 0);
|
|
2166
|
+
return G.value.x + 12 + Me.value.width + 12 > n ? "left-bottom" : "right-bottom";
|
|
2167
|
+
}), Qe = r(() => (L.value, F.value?.getData() ?? []));
|
|
1889
2168
|
function $e(e) {
|
|
1890
|
-
|
|
1891
|
-
!t || !Y.value || (Y.value.updateDrawingStyle(t.id, e), B.value = Y.value.getDrawings());
|
|
2169
|
+
Y.value?.setTool(e);
|
|
1892
2170
|
}
|
|
1893
2171
|
function et() {
|
|
1894
|
-
|
|
1895
|
-
!e || !Y.value || (Y.value.removeDrawing(e.id), oe.value = null, B.value = Y.value.getDrawings());
|
|
2172
|
+
P.value?.toggleMenu();
|
|
1896
2173
|
}
|
|
1897
2174
|
function tt(e) {
|
|
1898
|
-
|
|
2175
|
+
let t = Ae.value;
|
|
2176
|
+
!t || !Y.value || (Y.value.updateDrawingStyle(t.id, e), H.value = Y.value.getDrawings());
|
|
1899
2177
|
}
|
|
1900
|
-
function nt(
|
|
1901
|
-
let
|
|
2178
|
+
function nt() {
|
|
2179
|
+
let e = Ae.value;
|
|
2180
|
+
!e || !Y.value || (Y.value.removeDrawing(e.id), V.value = null, H.value = Y.value.getDrawings());
|
|
2181
|
+
}
|
|
2182
|
+
function rt(e) {
|
|
2183
|
+
F.value?.handlePointerEvent(e, { onPointerDown: (e, t) => Y.value?.onPointerDown(e, t) ? (H.value = Y.value.getDrawings(), !0) : !1 });
|
|
2184
|
+
}
|
|
2185
|
+
function it(e) {
|
|
2186
|
+
let t = O.value;
|
|
1902
2187
|
if (t) {
|
|
1903
|
-
let n =
|
|
1904
|
-
|
|
2188
|
+
let n = De(t);
|
|
2189
|
+
G.value = {
|
|
1905
2190
|
x: e.clientX - n.left,
|
|
1906
2191
|
y: e.clientY - n.top
|
|
1907
2192
|
};
|
|
1908
2193
|
}
|
|
1909
|
-
|
|
1910
|
-
}
|
|
1911
|
-
function rt(e) {
|
|
1912
|
-
A.value?.handlePointerEvent(e, { onPointerUp: (e, t) => Y.value?.onPointerUp(e, t) ? (B.value = Y.value.getDrawings(), !0) : !1 });
|
|
1913
|
-
}
|
|
1914
|
-
function it(e) {
|
|
1915
|
-
A.value?.handlePointerEvent(e);
|
|
2194
|
+
F.value?.handlePointerEvent(e, { onPointerMove: (e, t) => Y.value?.onPointerMove(e, t) ? (H.value = Y.value.getDrawings(), !0) : !1 });
|
|
1916
2195
|
}
|
|
1917
2196
|
function at(e) {
|
|
1918
|
-
|
|
2197
|
+
F.value?.handlePointerEvent(e, { onPointerUp: (e, t) => Y.value?.onPointerUp(e, t) ? (H.value = Y.value.getDrawings(), !0) : !1 });
|
|
1919
2198
|
}
|
|
1920
2199
|
function ot(e) {
|
|
1921
|
-
|
|
2200
|
+
F.value?.handlePointerEvent(e);
|
|
1922
2201
|
}
|
|
1923
2202
|
function st(e) {
|
|
1924
|
-
|
|
2203
|
+
F.value?.handlePointerEvent(e);
|
|
1925
2204
|
}
|
|
1926
2205
|
function ct(e) {
|
|
1927
|
-
|
|
2206
|
+
F.value?.handlePointerEvent(e);
|
|
2207
|
+
}
|
|
2208
|
+
function lt(e) {
|
|
2209
|
+
F.value?.handlePointerEvent(e);
|
|
2210
|
+
}
|
|
2211
|
+
function ut(e) {
|
|
2212
|
+
F.value?.handlePointerEvent(e);
|
|
1928
2213
|
}
|
|
1929
|
-
function
|
|
1930
|
-
|
|
2214
|
+
function dt() {
|
|
2215
|
+
F.value?.handleScrollEvent();
|
|
1931
2216
|
}
|
|
1932
|
-
let
|
|
2217
|
+
let ft = w([]), pt = r(() => {
|
|
1933
2218
|
let e = [], t = /* @__PURE__ */ new Set();
|
|
1934
2219
|
for (let n of Z.value) t.has(n.indicatorId) || (t.add(n.indicatorId), e.push(n.indicatorId));
|
|
1935
2220
|
return e;
|
|
1936
|
-
}),
|
|
1937
|
-
function
|
|
1938
|
-
let e =
|
|
2221
|
+
}), mt = r(() => [...ft.value, ...pt.value]), X = w({}), Z = w([]);
|
|
2222
|
+
function ht() {
|
|
2223
|
+
let e = le.value.main ?? 3;
|
|
1939
2224
|
return Z.value.length === 0 ? [{
|
|
1940
2225
|
id: "main",
|
|
1941
2226
|
ratio: e,
|
|
@@ -1948,56 +2233,56 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1948
2233
|
role: "price"
|
|
1949
2234
|
}, ...Z.value.map((e) => ({
|
|
1950
2235
|
id: e.id,
|
|
1951
|
-
ratio:
|
|
2236
|
+
ratio: le.value[e.id] ?? 1,
|
|
1952
2237
|
visible: !0,
|
|
1953
2238
|
role: "indicator"
|
|
1954
2239
|
}))];
|
|
1955
2240
|
}
|
|
1956
|
-
function
|
|
2241
|
+
function gt(e) {
|
|
1957
2242
|
if (e === "VOLUME") return {};
|
|
1958
2243
|
let t = me(e);
|
|
1959
2244
|
return t?.runtime?.defaultConfig ? { ...t.runtime.defaultConfig } : {};
|
|
1960
2245
|
}
|
|
1961
|
-
function
|
|
2246
|
+
function _t(e) {
|
|
1962
2247
|
if (e === "VOLUME") return !0;
|
|
1963
2248
|
let t = me(e);
|
|
1964
2249
|
return !!t && t.category !== "main";
|
|
1965
2250
|
}
|
|
1966
|
-
let
|
|
1967
|
-
function
|
|
1968
|
-
if (Z.value.length >=
|
|
1969
|
-
let n = t ??
|
|
1970
|
-
return !!
|
|
2251
|
+
let vt = /* @__PURE__ */ new Map();
|
|
2252
|
+
function yt(e = "VOLUME", t) {
|
|
2253
|
+
if (Z.value.length >= Xr) return !1;
|
|
2254
|
+
let n = t ?? gt(e);
|
|
2255
|
+
return !!F.value?.addIndicator(e, "sub", n);
|
|
1971
2256
|
}
|
|
1972
|
-
function
|
|
1973
|
-
|
|
2257
|
+
function bt(e) {
|
|
2258
|
+
F.value?.removeIndicator(e);
|
|
1974
2259
|
}
|
|
1975
|
-
function
|
|
1976
|
-
for (let e of Z.value)
|
|
1977
|
-
|
|
2260
|
+
function xt() {
|
|
2261
|
+
for (let e of Z.value) F.value?.removeIndicator(e.id);
|
|
2262
|
+
vt.clear();
|
|
1978
2263
|
}
|
|
1979
|
-
function
|
|
1980
|
-
let e = d.semanticConfig, t =
|
|
2264
|
+
function St() {
|
|
2265
|
+
let e = d.semanticConfig, t = F.value;
|
|
1981
2266
|
if (!t) return;
|
|
1982
2267
|
let n = e.indicators?.main;
|
|
1983
2268
|
if (n) for (let e of n) e.enabled && t.addIndicator(e.type, "main", e.params);
|
|
1984
2269
|
}
|
|
1985
|
-
function
|
|
1986
|
-
let e =
|
|
2270
|
+
function Ct() {
|
|
2271
|
+
let e = F.value?.subPanes.peek() ?? [];
|
|
1987
2272
|
for (let t of e) {
|
|
1988
2273
|
let { paneId: e, indicatorId: n, params: r } = t, i = e.match(/^(.+)_(\d+)$/);
|
|
1989
2274
|
if (i) {
|
|
1990
2275
|
let [, e, t] = i, n = parseInt(t, 10);
|
|
1991
|
-
n >= (
|
|
2276
|
+
n >= (vt.get(e) ?? 0) && vt.set(e, n + 1);
|
|
1992
2277
|
}
|
|
1993
2278
|
}
|
|
1994
2279
|
}
|
|
1995
|
-
function
|
|
1996
|
-
let n =
|
|
1997
|
-
|
|
2280
|
+
function wt(e, t) {
|
|
2281
|
+
let n = gt(t);
|
|
2282
|
+
F.value?.replaceSubPaneIndicator(e, t, n);
|
|
1998
2283
|
}
|
|
1999
|
-
function
|
|
2000
|
-
let n =
|
|
2284
|
+
function Tt(e, t) {
|
|
2285
|
+
let n = F.value;
|
|
2001
2286
|
if (n) {
|
|
2002
2287
|
if ([
|
|
2003
2288
|
"MA",
|
|
@@ -2019,33 +2304,33 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
2019
2304
|
"STRUCTURE",
|
|
2020
2305
|
"ZONES"
|
|
2021
2306
|
].includes(e)) {
|
|
2022
|
-
let r =
|
|
2307
|
+
let r = ft.value.find((t) => t === e);
|
|
2023
2308
|
t && !r ? n.addIndicator(e, "main", X.value[e]) : !t && r && n.removeIndicator(e.toUpperCase());
|
|
2024
2309
|
return;
|
|
2025
2310
|
}
|
|
2026
|
-
if (
|
|
2027
|
-
if (Z.value.find((t) => t.indicatorId === e) || Z.value.length >=
|
|
2311
|
+
if (_t(e)) if (t) {
|
|
2312
|
+
if (Z.value.find((t) => t.indicatorId === e) || Z.value.length >= Xr) return;
|
|
2028
2313
|
if (!n.addIndicator(e, "sub", X.value[e]) && Z.value.length > 0) {
|
|
2029
2314
|
let t = Z.value[Z.value.length - 1];
|
|
2030
|
-
|
|
2315
|
+
wt(t.id, e);
|
|
2031
2316
|
}
|
|
2032
2317
|
} else Z.value.filter((t) => t.indicatorId === e).forEach((e) => {
|
|
2033
2318
|
n.removeIndicator(e.id);
|
|
2034
2319
|
});
|
|
2035
2320
|
}
|
|
2036
2321
|
}
|
|
2037
|
-
function
|
|
2322
|
+
function Et(e, t) {
|
|
2038
2323
|
if (e === "MA" || e === "BOLL" || e === "EXPMA" || e === "ENE") {
|
|
2039
|
-
|
|
2324
|
+
F.value?.updateIndicatorParams(e, t);
|
|
2040
2325
|
return;
|
|
2041
2326
|
}
|
|
2042
|
-
|
|
2043
|
-
|
|
2327
|
+
_t(e) && Z.value.filter((t) => t.indicatorId === e).forEach((e) => {
|
|
2328
|
+
F.value?.updateIndicatorParams(e.id, t);
|
|
2044
2329
|
});
|
|
2045
2330
|
}
|
|
2046
|
-
function
|
|
2331
|
+
function Dt(e) {
|
|
2047
2332
|
if (!e.length || Z.value.length <= 1) return;
|
|
2048
|
-
let t = e.filter((e) =>
|
|
2333
|
+
let t = e.filter((e) => _t(e));
|
|
2049
2334
|
if (!t.length) return;
|
|
2050
2335
|
let n = new Map(Z.value.map((e) => [e.indicatorId, e])), r = [];
|
|
2051
2336
|
for (let e of t) {
|
|
@@ -2057,40 +2342,40 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
2057
2342
|
let i = Z.value.map((e) => e.id), a = r.map((e) => e.id);
|
|
2058
2343
|
if (i.join("|") === a.join("|")) return;
|
|
2059
2344
|
Z.value = r;
|
|
2060
|
-
let o =
|
|
2061
|
-
o && o.updatePaneLayout(
|
|
2345
|
+
let o = F.value;
|
|
2346
|
+
o && o.updatePaneLayout(ht());
|
|
2062
2347
|
}
|
|
2063
|
-
let
|
|
2064
|
-
function
|
|
2065
|
-
let e =
|
|
2348
|
+
let Ot = r(() => d.rightAxisWidth + d.priceLabelWidth), kt = r(() => (L.value, ce.value, B.value, oe.value, R.value, F.value?.getContentWidth() ?? 0));
|
|
2349
|
+
function At() {
|
|
2350
|
+
let e = O.value, t = F.value;
|
|
2066
2351
|
if (!e || !t) return;
|
|
2067
2352
|
let n = t.getData()?.length ?? 0;
|
|
2068
2353
|
if (n === 0) return;
|
|
2069
|
-
let r = t.viewport.peek().dpr, { unitPx: i, startXPx: a } =
|
|
2354
|
+
let r = t.viewport.peek().dpr, { unitPx: i, startXPx: a } = ue(B.value, oe.value, r), o = (a + n * i) / r, s = Math.max(0, e.scrollWidth - e.clientWidth), c = Math.min(s, Math.max(0, o - e.clientWidth));
|
|
2070
2355
|
e.scrollLeft = Math.round(c * r) / r;
|
|
2071
2356
|
}
|
|
2072
|
-
function
|
|
2073
|
-
|
|
2357
|
+
function Mt(e, t) {
|
|
2358
|
+
F.value?.zoomToLevel(e, t);
|
|
2074
2359
|
}
|
|
2075
2360
|
c({
|
|
2076
|
-
scheduleRender:
|
|
2077
|
-
scrollToRight:
|
|
2078
|
-
addSubPane:
|
|
2079
|
-
removeSubPane:
|
|
2080
|
-
switchSubIndicator:
|
|
2081
|
-
clearAllSubPanes:
|
|
2082
|
-
zoomToLevel:
|
|
2083
|
-
zoomIn: (e) =>
|
|
2084
|
-
zoomOut: (e) =>
|
|
2085
|
-
getZoomLevel: () =>
|
|
2086
|
-
getZoomLevelCount: () =>
|
|
2361
|
+
scheduleRender: xe,
|
|
2362
|
+
scrollToRight: At,
|
|
2363
|
+
addSubPane: yt,
|
|
2364
|
+
removeSubPane: bt,
|
|
2365
|
+
switchSubIndicator: wt,
|
|
2366
|
+
clearAllSubPanes: xt,
|
|
2367
|
+
zoomToLevel: Mt,
|
|
2368
|
+
zoomIn: (e) => Mt(z.value + 1, e),
|
|
2369
|
+
zoomOut: (e) => Mt(z.value - 1, e),
|
|
2370
|
+
getZoomLevel: () => z.value,
|
|
2371
|
+
getZoomLevelCount: () => F.value?.getZoomLevelCount() ?? 10
|
|
2087
2372
|
});
|
|
2088
|
-
function
|
|
2373
|
+
function Nt() {
|
|
2089
2374
|
return (e) => {
|
|
2090
|
-
e.preventDefault(),
|
|
2375
|
+
e.preventDefault(), F.value?.handleWheelEvent(e);
|
|
2091
2376
|
};
|
|
2092
2377
|
}
|
|
2093
|
-
function
|
|
2378
|
+
function Pt(e, t, n, r) {
|
|
2094
2379
|
return se({
|
|
2095
2380
|
container: e,
|
|
2096
2381
|
data: [],
|
|
@@ -2107,11 +2392,11 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
2107
2392
|
maxKWidth: d.maxKWidth
|
|
2108
2393
|
});
|
|
2109
2394
|
}
|
|
2110
|
-
function
|
|
2395
|
+
function Ft(e) {
|
|
2111
2396
|
let t = e.paneLayout.subscribe(() => {
|
|
2112
2397
|
q();
|
|
2113
|
-
let t =
|
|
2114
|
-
|
|
2398
|
+
let t = O.value && parseInt(getComputedStyle(O.value).borderTopWidth) || 0;
|
|
2399
|
+
je.value = e.paneLayout.peek().slice(0, -1).map((n) => {
|
|
2115
2400
|
let r = e.getPaneInfo(n.id), i = (r?.top ?? 0) + (r?.height ?? 0);
|
|
2116
2401
|
return {
|
|
2117
2402
|
id: n.id,
|
|
@@ -2119,25 +2404,26 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
2119
2404
|
};
|
|
2120
2405
|
});
|
|
2121
2406
|
}), n = e.paneRatios.subscribe(() => {
|
|
2122
|
-
|
|
2407
|
+
le.value = { ...e.paneRatios.peek() };
|
|
2123
2408
|
}), r = e.viewport.subscribe(() => {
|
|
2124
2409
|
let t = e.viewport.peek();
|
|
2125
|
-
|
|
2410
|
+
R.value !== t.dpr && (R.value = t.dpr), ce.value !== t.plotWidth && (ce.value = t.plotWidth), (z.value !== t.zoomLevel || B.value !== t.kWidth || oe.value !== t.kGap) && (z.value = t.zoomLevel, B.value = t.kWidth, oe.value = t.kGap);
|
|
2126
2411
|
let n = t.desiredScrollLeft;
|
|
2127
|
-
n !== void 0 && n !==
|
|
2128
|
-
let e =
|
|
2412
|
+
n !== void 0 && n !== O.value?.scrollLeft && (q(), h(() => {
|
|
2413
|
+
let e = O.value;
|
|
2129
2414
|
if (!e) return;
|
|
2130
2415
|
let r = Math.max(0, e.scrollWidth - e.clientWidth), i = Math.min(Math.max(0, n), r), a = t.dpr;
|
|
2131
2416
|
e.scrollLeft = Math.round(i * a) / a;
|
|
2132
2417
|
}));
|
|
2133
2418
|
}), i = e.data.subscribe(() => {
|
|
2134
|
-
|
|
2419
|
+
let t = e.data.peek();
|
|
2420
|
+
ee.value = t.length, L.value++, v.value = !1, b.value = t.length === 0;
|
|
2135
2421
|
}), a = e.theme.subscribe(() => {
|
|
2136
2422
|
let t = e.theme.peek();
|
|
2137
|
-
|
|
2423
|
+
ge.value = t, f("themeChange", t);
|
|
2138
2424
|
}), o = e.indicators.subscribe(() => {
|
|
2139
2425
|
let t = e.indicators.peek(), n = t.filter((e) => e.role === "main").map((e) => e.definitionId);
|
|
2140
|
-
|
|
2426
|
+
ft.value = n;
|
|
2141
2427
|
let r = { ...X.value };
|
|
2142
2428
|
for (let e of t) e.role === "main" && e.params && Object.keys(e.params).length > 0 && (r[e.definitionId] = { ...e.params });
|
|
2143
2429
|
e.updateRendererConfig("mainIndicatorLegend", { indicators: {
|
|
@@ -2171,150 +2457,150 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
2171
2457
|
X.value = a;
|
|
2172
2458
|
});
|
|
2173
2459
|
x(() => {
|
|
2174
|
-
r(), i(), n(), t(), a(), o(), s(), U?.removeEventListener("change",
|
|
2460
|
+
r(), i(), n(), t(), a(), o(), s(), U?.removeEventListener("change", be);
|
|
2175
2461
|
});
|
|
2176
2462
|
}
|
|
2177
|
-
function
|
|
2178
|
-
let t =
|
|
2179
|
-
|
|
2180
|
-
let t = W();
|
|
2181
|
-
console.time("updateData-10k"), e.updateData(t), console.timeEnd("updateData-10k");
|
|
2182
|
-
}
|
|
2463
|
+
function It(e) {
|
|
2464
|
+
let t = N.value?.getSettings() ?? { showVolumePriceMarkers: !0 };
|
|
2465
|
+
_e.value = t, W(e, t.theme), e.updateSettingsFacade(t);
|
|
2183
2466
|
}
|
|
2184
|
-
function
|
|
2467
|
+
function Lt(e) {
|
|
2185
2468
|
Y.value = new ae(e), Y.value.setCallbacks({
|
|
2186
2469
|
onDrawingCreated: (e) => {
|
|
2187
|
-
|
|
2470
|
+
H.value = [...H.value, e], V.value = e.id;
|
|
2188
2471
|
},
|
|
2189
2472
|
onToolChange: () => {},
|
|
2190
2473
|
onDrawingSelected: (e) => {
|
|
2191
|
-
|
|
2474
|
+
V.value = e?.id ?? null;
|
|
2192
2475
|
}
|
|
2193
2476
|
});
|
|
2194
2477
|
}
|
|
2195
|
-
function
|
|
2196
|
-
e.setTooltipAnchorPositioning(
|
|
2478
|
+
function Rt(e) {
|
|
2479
|
+
e.setTooltipAnchorPositioning(K.value), e.interactionState.subscribe(() => {
|
|
2197
2480
|
J.value = e.interactionState.peek();
|
|
2198
|
-
}), J.value = e.interactionState.peek(),
|
|
2481
|
+
}), J.value = e.interactionState.peek(), R.value = e.viewport.peek().dpr;
|
|
2199
2482
|
}
|
|
2200
|
-
function
|
|
2201
|
-
|
|
2483
|
+
function zt(e) {
|
|
2484
|
+
e.setDataFetcher(d.dataFetcher), I.value = new pe(e), I.value.on("config:error", (e) => {
|
|
2202
2485
|
console.error("Semantic config error:", e);
|
|
2203
|
-
}),
|
|
2204
|
-
|
|
2205
|
-
}), H.value.performanceTest10kKlines) {
|
|
2206
|
-
let e = M.value.applyIndicatorsOnly(d.semanticConfig);
|
|
2207
|
-
e && !e.success && console.error("Semantic config apply failed:", e.errors);
|
|
2208
|
-
} else M.value.applyConfig(d.semanticConfig).then((e) => {
|
|
2209
|
-
e && !e.success && console.error("Semantic config apply failed:", e.errors);
|
|
2486
|
+
}), I.value.on("config:ready", () => {
|
|
2487
|
+
St(), Ct(), h(() => At());
|
|
2210
2488
|
});
|
|
2211
2489
|
}
|
|
2212
2490
|
return y(() => {
|
|
2213
|
-
|
|
2214
|
-
let e =
|
|
2491
|
+
K.value = !1;
|
|
2492
|
+
let e = O.value, t = k.value;
|
|
2215
2493
|
if (!e || !t) return;
|
|
2216
|
-
let n =
|
|
2494
|
+
let n = Nt();
|
|
2217
2495
|
e.addEventListener("wheel", n, { passive: !1 });
|
|
2218
|
-
let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a =
|
|
2219
|
-
|
|
2496
|
+
let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a = Pt(e, r, t.querySelector(".right-axis-host"), i);
|
|
2497
|
+
F.value = a, Ft(a), St(), It(a), Lt(a), Rt(a), zt(a);
|
|
2220
2498
|
}), x(() => {
|
|
2221
|
-
let e =
|
|
2222
|
-
e && (
|
|
2223
|
-
}),
|
|
2224
|
-
|
|
2225
|
-
}),
|
|
2499
|
+
let e = F.value;
|
|
2500
|
+
e && (F.value = null, e.dispose()), Y.value = null;
|
|
2501
|
+
}), M(() => d.yPaddingPx, (e) => {
|
|
2502
|
+
F.value?.updateOptionsFacade({ yPaddingPx: e });
|
|
2503
|
+
}), M(() => d.semanticConfig, async (e, t) => {
|
|
2226
2504
|
if (e && e !== t) {
|
|
2227
|
-
let t = await
|
|
2505
|
+
let t = await I.value?.applyConfig(e);
|
|
2228
2506
|
t && !t.success && console.error("Semantic config apply failed:", t.errors);
|
|
2229
2507
|
}
|
|
2230
2508
|
}, { deep: !0 }), (r, c) => (S(), o("div", {
|
|
2231
2509
|
ref_key: "chartWrapperRef",
|
|
2232
|
-
ref:
|
|
2510
|
+
ref: A,
|
|
2233
2511
|
class: "chart-wrapper",
|
|
2234
|
-
"data-theme":
|
|
2235
|
-
style: _(
|
|
2512
|
+
"data-theme": ge.value,
|
|
2513
|
+
style: _(ye.value)
|
|
2236
2514
|
}, [
|
|
2237
|
-
l(
|
|
2238
|
-
symbol:
|
|
2515
|
+
l(Gr, {
|
|
2516
|
+
symbol: m.value,
|
|
2239
2517
|
"k-line-level": p.value,
|
|
2518
|
+
"symbol-loading": v.value,
|
|
2519
|
+
"symbol-error": b.value,
|
|
2240
2520
|
onAddOverlaySymbol: c[0] ||= (e) => r.$emit("addOverlaySymbol"),
|
|
2241
|
-
onKLineLevelChange:
|
|
2242
|
-
onToggleIndicator:
|
|
2243
|
-
|
|
2521
|
+
onKLineLevelChange: C,
|
|
2522
|
+
onToggleIndicator: et,
|
|
2523
|
+
onSymbolChange: E
|
|
2524
|
+
}, null, 8, [
|
|
2525
|
+
"symbol",
|
|
2526
|
+
"k-line-level",
|
|
2527
|
+
"symbol-loading",
|
|
2528
|
+
"symbol-error"
|
|
2529
|
+
]),
|
|
2244
2530
|
s("div", { class: g(["chart-stage", {
|
|
2245
|
-
"is-dragging":
|
|
2246
|
-
"is-resizing-pane":
|
|
2247
|
-
"is-hovering-pane-separator":
|
|
2248
|
-
"is-hovering-right-axis":
|
|
2249
|
-
"is-hovering-kline":
|
|
2531
|
+
"is-dragging": Ie.value,
|
|
2532
|
+
"is-resizing-pane": Le.value,
|
|
2533
|
+
"is-hovering-pane-separator": Re.value,
|
|
2534
|
+
"is-hovering-right-axis": Be.value,
|
|
2535
|
+
"is-hovering-kline": Ve.value !== null
|
|
2250
2536
|
}]) }, [l(Tr, {
|
|
2251
2537
|
ref_key: "toolbarRef",
|
|
2252
|
-
ref:
|
|
2538
|
+
ref: N,
|
|
2253
2539
|
"is-fullscreen": n.isFullscreen,
|
|
2254
|
-
onSelectTool:
|
|
2540
|
+
onSelectTool: $e,
|
|
2255
2541
|
onToggleFullscreen: c[1] ||= (e) => r.$emit("toggleFullscreen"),
|
|
2256
|
-
onZoomIn: c[2] ||= (e) =>
|
|
2257
|
-
onZoomOut: c[3] ||= (e) =>
|
|
2258
|
-
onSettingsChange:
|
|
2542
|
+
onZoomIn: c[2] ||= (e) => Mt(z.value + 1),
|
|
2543
|
+
onZoomOut: c[3] ||= (e) => Mt(z.value - 1),
|
|
2544
|
+
onSettingsChange: Se
|
|
2259
2545
|
}, null, 8, ["is-fullscreen"]), s("div", {
|
|
2260
2546
|
class: "chart-main",
|
|
2261
2547
|
ref_key: "chartMainRef",
|
|
2262
|
-
ref:
|
|
2548
|
+
ref: k
|
|
2263
2549
|
}, [
|
|
2264
|
-
s("div",
|
|
2550
|
+
s("div", qr, [(S(!0), o(e, null, T(je.value, (e) => (S(), o("div", {
|
|
2265
2551
|
key: e.id,
|
|
2266
|
-
class: g(["pane-separator-line", { "is-active":
|
|
2552
|
+
class: g(["pane-separator-line", { "is-active": ze.value === e.id }]),
|
|
2267
2553
|
style: _({ top: `${e.top}px` })
|
|
2268
2554
|
}, null, 6))), 128))]),
|
|
2269
2555
|
s("div", {
|
|
2270
2556
|
ref_key: "tooltipLayerRef",
|
|
2271
|
-
ref:
|
|
2557
|
+
ref: j,
|
|
2272
2558
|
class: "tooltip-layer"
|
|
2273
2559
|
}, null, 512),
|
|
2274
2560
|
s("div", {
|
|
2275
2561
|
class: "chart-container",
|
|
2276
|
-
style: _({ cursor:
|
|
2562
|
+
style: _({ cursor: He.value }),
|
|
2277
2563
|
ref_key: "containerRef",
|
|
2278
|
-
ref:
|
|
2279
|
-
onScrollPassive:
|
|
2280
|
-
onPointerdown:
|
|
2281
|
-
onPointermove:
|
|
2282
|
-
onPointerup:
|
|
2283
|
-
onPointerleave:
|
|
2564
|
+
ref: O,
|
|
2565
|
+
onScrollPassive: dt,
|
|
2566
|
+
onPointerdown: rt,
|
|
2567
|
+
onPointermove: it,
|
|
2568
|
+
onPointerup: at,
|
|
2569
|
+
onPointerleave: ot
|
|
2284
2570
|
}, [s("div", {
|
|
2285
2571
|
class: "scroll-content",
|
|
2286
|
-
style: _({ width:
|
|
2287
|
-
}, [s("div",
|
|
2572
|
+
style: _({ width: kt.value + "px" })
|
|
2573
|
+
}, [s("div", Jr, [s("canvas", Yr, null, 512), Ae.value ? (S(), i(Oe, {
|
|
2288
2574
|
key: 0,
|
|
2289
|
-
drawing:
|
|
2290
|
-
onUpdateStyle:
|
|
2291
|
-
onDelete:
|
|
2575
|
+
drawing: Ae.value,
|
|
2576
|
+
onUpdateStyle: tt,
|
|
2577
|
+
onDelete: nt
|
|
2292
2578
|
}, null, 8, ["drawing"])) : a("", !0)], 512)], 4)], 36),
|
|
2293
|
-
|
|
2579
|
+
j.value ? (S(), i(t, {
|
|
2294
2580
|
key: 0,
|
|
2295
|
-
to:
|
|
2581
|
+
to: j.value
|
|
2296
2582
|
}, [
|
|
2297
|
-
|
|
2583
|
+
Ue.value ? (S(), o("div", {
|
|
2298
2584
|
key: 0,
|
|
2299
|
-
class: g(["tooltip-anchor kline-tooltip-anchor", { "use-anchor":
|
|
2300
|
-
style: _(
|
|
2585
|
+
class: g(["tooltip-anchor kline-tooltip-anchor", { "use-anchor": K.value }]),
|
|
2586
|
+
style: _(qe.value)
|
|
2301
2587
|
}, null, 6)) : a("", !0),
|
|
2302
|
-
|
|
2588
|
+
Pe.value || Fe.value ? (S(), o("div", {
|
|
2303
2589
|
key: 1,
|
|
2304
|
-
class: g(["tooltip-anchor marker-tooltip-anchor", { "use-anchor":
|
|
2305
|
-
style: _(
|
|
2590
|
+
class: g(["tooltip-anchor marker-tooltip-anchor", { "use-anchor": K.value }]),
|
|
2591
|
+
style: _(Ye.value)
|
|
2306
2592
|
}, null, 6)) : a("", !0),
|
|
2307
|
-
|
|
2593
|
+
Ue.value ? (S(), i(Kt, {
|
|
2308
2594
|
key: 2,
|
|
2309
|
-
k:
|
|
2310
|
-
index:
|
|
2311
|
-
data:
|
|
2312
|
-
pos:
|
|
2313
|
-
"set-el":
|
|
2314
|
-
"use-anchor":
|
|
2315
|
-
"anchor-placement":
|
|
2316
|
-
"up-color":
|
|
2317
|
-
"down-color":
|
|
2595
|
+
k: Ue.value,
|
|
2596
|
+
index: We.value,
|
|
2597
|
+
data: Qe.value,
|
|
2598
|
+
pos: Ke.value,
|
|
2599
|
+
"set-el": we,
|
|
2600
|
+
"use-anchor": K.value,
|
|
2601
|
+
"anchor-placement": Xe.value,
|
|
2602
|
+
"up-color": ve.value.upColor,
|
|
2603
|
+
"down-color": ve.value.downColor
|
|
2318
2604
|
}, null, 8, [
|
|
2319
2605
|
"k",
|
|
2320
2606
|
"index",
|
|
@@ -2325,13 +2611,13 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
2325
2611
|
"up-color",
|
|
2326
2612
|
"down-color"
|
|
2327
2613
|
])) : a("", !0),
|
|
2328
|
-
|
|
2614
|
+
Pe.value || Fe.value ? (S(), i(Yt, {
|
|
2329
2615
|
key: 3,
|
|
2330
|
-
marker:
|
|
2331
|
-
pos:
|
|
2332
|
-
"use-anchor":
|
|
2333
|
-
"anchor-placement":
|
|
2334
|
-
"set-el":
|
|
2616
|
+
marker: Pe.value || Fe.value,
|
|
2617
|
+
pos: Je.value,
|
|
2618
|
+
"use-anchor": K.value,
|
|
2619
|
+
"anchor-placement": Ze.value,
|
|
2620
|
+
"set-el": Te
|
|
2335
2621
|
}, null, 8, [
|
|
2336
2622
|
"marker",
|
|
2337
2623
|
"pos",
|
|
@@ -2342,27 +2628,27 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
2342
2628
|
s("div", {
|
|
2343
2629
|
class: "right-axis-host",
|
|
2344
2630
|
ref: "rightAxisLayerRef",
|
|
2345
|
-
style: _({ width:
|
|
2346
|
-
onPointerdown:
|
|
2347
|
-
onPointermove:
|
|
2348
|
-
onPointerup:
|
|
2349
|
-
onPointerleave:
|
|
2631
|
+
style: _({ width: Ot.value + "px" }),
|
|
2632
|
+
onPointerdown: st,
|
|
2633
|
+
onPointermove: ct,
|
|
2634
|
+
onPointerup: lt,
|
|
2635
|
+
onPointerleave: ut
|
|
2350
2636
|
}, null, 36)
|
|
2351
2637
|
], 512)], 2),
|
|
2352
2638
|
l(jt, {
|
|
2353
2639
|
ref_key: "indicatorSelectorRef",
|
|
2354
|
-
ref:
|
|
2355
|
-
"active-indicators":
|
|
2640
|
+
ref: P,
|
|
2641
|
+
"active-indicators": mt.value,
|
|
2356
2642
|
"indicator-params": X.value,
|
|
2357
|
-
onToggle:
|
|
2358
|
-
onUpdateParams:
|
|
2359
|
-
onReorderSubIndicators:
|
|
2643
|
+
onToggle: Tt,
|
|
2644
|
+
onUpdateParams: Et,
|
|
2645
|
+
onReorderSubIndicators: Dt
|
|
2360
2646
|
}, null, 8, ["active-indicators", "indicator-params"])
|
|
2361
|
-
], 12,
|
|
2647
|
+
], 12, Kr));
|
|
2362
2648
|
}
|
|
2363
|
-
}), [["__scopeId", "data-v-
|
|
2649
|
+
}), [["__scopeId", "data-v-a5739fae"]]), Qr = {
|
|
2364
2650
|
name: "@363045841yyt/klinechart",
|
|
2365
|
-
version: "0.8.
|
|
2651
|
+
version: "0.8.1-alpha.1",
|
|
2366
2652
|
description: "Vue 3 bindings for @363045841yyt/klinechart-core. Idiomatic composables, SFC components.",
|
|
2367
2653
|
license: "MIT",
|
|
2368
2654
|
repository: {
|
|
@@ -2434,14 +2720,14 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
2434
2720
|
vitest: "^4.1.8",
|
|
2435
2721
|
vue: "^3.5.35"
|
|
2436
2722
|
}
|
|
2437
|
-
}.version,
|
|
2438
|
-
function
|
|
2439
|
-
|
|
2723
|
+
}.version, $r = null;
|
|
2724
|
+
function ei(e) {
|
|
2725
|
+
$r = e;
|
|
2440
2726
|
}
|
|
2441
|
-
function
|
|
2727
|
+
function ti(e) {
|
|
2442
2728
|
if (e.container == null) throw Error("[@363045841yyt/klinechart] createChart: `container` is required and must be a non-null HTMLElement");
|
|
2443
|
-
if (
|
|
2444
|
-
return
|
|
2729
|
+
if ($r === null) throw Error("[@363045841yyt/klinechart] createChart: no ChartController factory registered. Call __setControllerFactory(...) before mounting (the core package wires this in production).");
|
|
2730
|
+
return $r(e);
|
|
2445
2731
|
}
|
|
2446
2732
|
function $(e) {
|
|
2447
2733
|
let t = D(e.peek());
|
|
@@ -2449,15 +2735,15 @@ function $(e) {
|
|
|
2449
2735
|
t.value = e.peek();
|
|
2450
2736
|
})), t;
|
|
2451
2737
|
}
|
|
2452
|
-
function
|
|
2738
|
+
function ni(e, t) {
|
|
2453
2739
|
let n = D(null), r = (e) => {
|
|
2454
|
-
e == null || n.value != null || (n.value =
|
|
2740
|
+
e == null || n.value != null || (n.value = ti({
|
|
2455
2741
|
...t,
|
|
2456
2742
|
container: e
|
|
2457
2743
|
}));
|
|
2458
2744
|
};
|
|
2459
2745
|
r(e.value);
|
|
2460
|
-
let i =
|
|
2746
|
+
let i = M(e, (e) => {
|
|
2461
2747
|
r(e);
|
|
2462
2748
|
}, {
|
|
2463
2749
|
immediate: !0,
|
|
@@ -2469,7 +2755,7 @@ function Vr(e, t) {
|
|
|
2469
2755
|
};
|
|
2470
2756
|
return b(a), v(a), { chart: n };
|
|
2471
2757
|
}
|
|
2472
|
-
function
|
|
2758
|
+
function ri(e) {
|
|
2473
2759
|
let t = D(e.indicators.peek());
|
|
2474
2760
|
return b(e.indicators.subscribe(() => {
|
|
2475
2761
|
t.value = e.indicators.peek();
|
|
@@ -2480,26 +2766,26 @@ function Hr(e) {
|
|
|
2480
2766
|
updateParams: e.updateIndicatorParams.bind(e)
|
|
2481
2767
|
};
|
|
2482
2768
|
}
|
|
2483
|
-
function
|
|
2769
|
+
function ii(e) {
|
|
2484
2770
|
let t = D(e.interactionState.peek());
|
|
2485
2771
|
return b(e.interactionState.subscribe(() => {
|
|
2486
2772
|
t.value = e.interactionState.peek();
|
|
2487
2773
|
})), t;
|
|
2488
2774
|
}
|
|
2489
|
-
function
|
|
2775
|
+
function ai(e) {
|
|
2490
2776
|
let t = D(e.paneRatios.peek());
|
|
2491
2777
|
return b(e.paneRatios.subscribe(() => {
|
|
2492
2778
|
t.value = e.paneRatios.peek();
|
|
2493
2779
|
})), t;
|
|
2494
2780
|
}
|
|
2495
|
-
function
|
|
2781
|
+
function oi(e) {
|
|
2496
2782
|
let t = D(e.viewport.peek());
|
|
2497
2783
|
return b(e.viewport.subscribe(() => {
|
|
2498
2784
|
t.value = e.viewport.peek();
|
|
2499
2785
|
})), t;
|
|
2500
2786
|
}
|
|
2501
|
-
function
|
|
2502
|
-
let t =
|
|
2787
|
+
function si(e) {
|
|
2788
|
+
let t = z({ catalog: e.catalog });
|
|
2503
2789
|
b(() => t.dispose());
|
|
2504
2790
|
let n = $(t.filteredMain), r = $(t.filteredSub), i = $(t.menuOpen), a = $(t.searchQuery);
|
|
2505
2791
|
function o(t) {
|
|
@@ -2527,7 +2813,7 @@ function Kr(e) {
|
|
|
2527
2813
|
isActive: c
|
|
2528
2814
|
};
|
|
2529
2815
|
}
|
|
2530
|
-
var
|
|
2816
|
+
var ci = u({
|
|
2531
2817
|
name: "KLineChart",
|
|
2532
2818
|
props: {
|
|
2533
2819
|
data: {
|
|
@@ -2560,7 +2846,7 @@ var qr = u({
|
|
|
2560
2846
|
y(() => {
|
|
2561
2847
|
let n = r.value;
|
|
2562
2848
|
n != null && (i.run(() => {
|
|
2563
|
-
if (a.value =
|
|
2849
|
+
if (a.value = ti({
|
|
2564
2850
|
container: n,
|
|
2565
2851
|
data: e.data,
|
|
2566
2852
|
initialZoomLevel: e.initialZoomLevel,
|
|
@@ -2574,9 +2860,9 @@ var qr = u({
|
|
|
2574
2860
|
};
|
|
2575
2861
|
n(), b(e.viewport.subscribe(n));
|
|
2576
2862
|
}
|
|
2577
|
-
}),
|
|
2863
|
+
}), M(() => e.data, (e) => {
|
|
2578
2864
|
a.value?.setData(e);
|
|
2579
|
-
}),
|
|
2865
|
+
}), M(() => e.theme, (e) => {
|
|
2580
2866
|
a.value?.setTheme(e);
|
|
2581
2867
|
}));
|
|
2582
2868
|
}), x(() => {
|
|
@@ -2606,9 +2892,9 @@ var qr = u({
|
|
|
2606
2892
|
}
|
|
2607
2893
|
});
|
|
2608
2894
|
}
|
|
2609
|
-
}),
|
|
2610
|
-
e.component("KLineChart",
|
|
2895
|
+
}), li = { install(e) {
|
|
2896
|
+
e.component("KLineChart", ci);
|
|
2611
2897
|
} };
|
|
2612
|
-
|
|
2898
|
+
ei(R);
|
|
2613
2899
|
//#endregion
|
|
2614
|
-
export { L as CORE_VERSION,
|
|
2900
|
+
export { L as CORE_VERSION, Oe as DrawingStyleToolbar, Je as IndicatorParams, jt as IndicatorSelector, ci as KLineChart, Zr as KLineChartVue, Kt as KLineTooltip, li as KMapPlugin, Tr as LeftToolbar, Yt as MarkerTooltip, Qr as VERSION, ei as __setControllerFactory, $ as coreSignalToVueRef, ti as createChart, ni as useChart, si as useIndicatorSelector, ri as useIndicators, ii as useInteractionState, ai as usePaneRatios, oi as useViewport };
|