@candleview/core 2.9.9 → 3.0.0
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/index.d.ts +2 -2
- package/dist/index.js +10 -10
- package/dist/index.mjs +15 -15
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -723,7 +723,7 @@ class ua {
|
|
|
723
723
|
}
|
|
724
724
|
class ga {
|
|
725
725
|
constructor() {
|
|
726
|
-
this.rootEl = null, this.chartContainerEl = null, this.
|
|
726
|
+
this.rootEl = null, this.chartContainerEl = null, this.technologyPanelContainer = null, this.drawingPanelContainer = null;
|
|
727
727
|
}
|
|
728
728
|
create(t, e) {
|
|
729
729
|
t.innerHTML = "", t.style.cssText = "position:relative;width:100%;height:100%;overflow:hidden;";
|
|
@@ -752,9 +752,9 @@ class ga {
|
|
|
752
752
|
overflow:hidden;
|
|
753
753
|
`, this.rootEl.addEventListener("contextmenu", (a) => {
|
|
754
754
|
a.preventDefault();
|
|
755
|
-
}), this.
|
|
755
|
+
}), this.technologyPanelContainer = document.createElement("div"), this.technologyPanelContainer.className = "candleview-top-panel-container", this.technologyPanelContainer.style.cssText = "flex-shrink:0;position:relative;";
|
|
756
756
|
const s = document.createElement("div");
|
|
757
|
-
s.style.cssText = "display:flex;flex:1;min-height:0;overflow:hidden;", this.
|
|
757
|
+
s.style.cssText = "display:flex;flex:1;min-height:0;overflow:hidden;", this.drawingPanelContainer = document.createElement("div"), this.drawingPanelContainer.className = "candleview-left-panel-container", this.drawingPanelContainer.style.cssText = "flex-shrink:0;", this.chartContainerEl = document.createElement("div"), this.chartContainerEl.className = "candleview-chart-container", this.chartContainerEl.style.cssText = "flex:1;min-width:0;min-height:0;position:relative;", s.appendChild(this.drawingPanelContainer), s.appendChild(this.chartContainerEl), this.rootEl.appendChild(this.technologyPanelContainer), this.rootEl.appendChild(s), t.appendChild(this.rootEl);
|
|
758
758
|
}
|
|
759
759
|
getRootEl() {
|
|
760
760
|
return this.rootEl;
|
|
@@ -762,15 +762,15 @@ class ga {
|
|
|
762
762
|
getChartContainerEl() {
|
|
763
763
|
return this.chartContainerEl;
|
|
764
764
|
}
|
|
765
|
-
|
|
766
|
-
return this.
|
|
765
|
+
getTechnologyPanelContainer() {
|
|
766
|
+
return this.technologyPanelContainer;
|
|
767
767
|
}
|
|
768
|
-
|
|
769
|
-
return this.
|
|
768
|
+
getDrawingPanelContainer() {
|
|
769
|
+
return this.drawingPanelContainer;
|
|
770
770
|
}
|
|
771
771
|
destroy() {
|
|
772
772
|
const t = document.getElementById("candleview-no-select");
|
|
773
|
-
t && t.remove(), this.rootEl?.remove(), this.rootEl = null, this.chartContainerEl = null, this.
|
|
773
|
+
t && t.remove(), this.rootEl?.remove(), this.rootEl = null, this.chartContainerEl = null, this.technologyPanelContainer = null, this.drawingPanelContainer = null;
|
|
774
774
|
}
|
|
775
775
|
}
|
|
776
776
|
function pa(M, t) {
|
|
@@ -57386,8 +57386,8 @@ class zc {
|
|
|
57386
57386
|
this.initTopPanel(), this.initLeftPanel();
|
|
57387
57387
|
}
|
|
57388
57388
|
initTopPanel() {
|
|
57389
|
-
this.config.
|
|
57390
|
-
container: this.config.
|
|
57389
|
+
this.config.technologyPanelContainer && (this.topPanel = new Wc({
|
|
57390
|
+
container: this.config.technologyPanelContainer,
|
|
57391
57391
|
rootContainer: this.config.rootContainer,
|
|
57392
57392
|
theme: this.config.theme,
|
|
57393
57393
|
i18n: this.config.i18n,
|
|
@@ -57416,14 +57416,14 @@ class zc {
|
|
|
57416
57416
|
}));
|
|
57417
57417
|
}
|
|
57418
57418
|
initLeftPanel() {
|
|
57419
|
-
if (!this.config.
|
|
57419
|
+
if (!this.config.drawingPanelContainer) return;
|
|
57420
57420
|
this.leftPanel = new jc({
|
|
57421
|
-
container: this.config.
|
|
57421
|
+
container: this.config.drawingPanelContainer,
|
|
57422
57422
|
theme: this.config.theme,
|
|
57423
57423
|
i18n: this.config.i18n,
|
|
57424
57424
|
state: this.leftPanelState,
|
|
57425
57425
|
onStateChange: (e) => {
|
|
57426
|
-
this.updateLeftPanelState(e), e.isBrushActive !== void 0 && (e.isBrushActive && this.config.
|
|
57426
|
+
this.updateLeftPanelState(e), e.isBrushActive !== void 0 && (e.isBrushActive && this.config.drawingPanelContainer ? this.config.brushHint?.show(this.config.drawingPanelContainer) : this.config.brushHint?.hide());
|
|
57427
57427
|
},
|
|
57428
57428
|
onToolSelect: (e) => this.config.onToolSelect(e),
|
|
57429
57429
|
chart: this.config.chartManager?.getChart()
|
|
@@ -57616,8 +57616,8 @@ class Jc {
|
|
|
57616
57616
|
}
|
|
57617
57617
|
initPanels() {
|
|
57618
57618
|
this.panels = new zc({
|
|
57619
|
-
|
|
57620
|
-
|
|
57619
|
+
technologyPanelContainer: this.config.technologyPanel !== !1 ? this.dom.getTechnologyPanelContainer() : null,
|
|
57620
|
+
drawingPanelContainer: this.config.drawingPanel !== !1 ? this.dom.getDrawingPanelContainer() : null,
|
|
57621
57621
|
rootContainer: this.dom.getRootEl(),
|
|
57622
57622
|
theme: this.theme,
|
|
57623
57623
|
i18n: this.i18n,
|