@tradecanvas/chart 1.45.0 → 1.46.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/Chart.d.ts +23 -0
- package/dist/Chart.d.ts.map +1 -1
- package/dist/{LayoutSession-BI2ADwWW.js → LayoutSession-B-avgafz.js} +2 -2
- package/dist/LayoutSession-B-avgafz.js.map +1 -0
- package/dist/{LayoutSession-CJlxg9Ep.cjs → LayoutSession-Dlf4mt43.cjs} +2 -2
- package/dist/LayoutSession-Dlf4mt43.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/widget/ChartWidget.d.ts +12 -4
- package/dist/widget/ChartWidget.d.ts.map +1 -1
- package/dist/widget/index.cjs +2 -2
- package/dist/widget/index.cjs.map +1 -1
- package/dist/widget/index.js +19 -7
- package/dist/widget/index.js.map +1 -1
- package/dist/widget/types.d.ts +34 -4
- package/dist/widget/types.d.ts.map +1 -1
- package/dist/widget/widgetShareState.d.ts +1 -1
- package/dist/widget/widgetShareState.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/LayoutSession-BI2ADwWW.js.map +0 -1
- package/dist/LayoutSession-CJlxg9Ep.cjs.map +0 -1
package/dist/widget/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as e, a as t, c as n, i as r, n as i, o as a, r as o, t as s } from "../LayoutSession-
|
|
1
|
+
import { C as e, a as t, c as n, i as r, n as i, o as a, r as o, t as s } from "../LayoutSession-B-avgafz.js";
|
|
2
2
|
import { a as c, c as l, i as u, n as d, o as f, r as p, s as m, t as h } from "../i18n-DjzoHpMJ.js";
|
|
3
3
|
import { CHART_STYLE_KEYS as g, CHART_TYPE_ICONS as _, DARK_THEME as v, DEFAULT_SIGNAL_STYLE as y, DEFAULT_TRADE_ZONE_STYLE as b, DEFAULT_TRADING_CONFIG as x, DRAWING_TOOL_ICONS as ee, LIGHT_THEME as te, PHI as ne, PRICE_SOURCES as re, UI_ICONS as ie, barTimeUnit as ae, formatPrice as oe, iconSvg as se, indicatorSource as ce, isTimeFrame as le, isValidTimeZone as ue, marketStatus as de, offsetAt as fe, parseIndicatorSource as pe, phiStep as me, readChartStyleOverrides as he, readChartTypeOptions as ge, readIndicatorPlotStyles as _e, readNews as ve, readQuote as ye, sanitizeDrawingOptions as be, sanitizeDrawingStyle as xe, stepDecimals as Se, tickBarCount as Ce, timeParts as we, timeframeBucketStart as Te, timeframeToMs as S, tzLabel as Ee, wallToUtc as De, zoneOffsetMinutes as Oe } from "@tradecanvas/commons";
|
|
4
4
|
import { ChartStateManager as ke, INDICATOR_CATEGORIES as Ae, INTERVAL_LIMITS as je, INTERVAL_UNITS as Me, MAX_ALERT_BARS as Ne, MIN_ALERT_BARS as Pe, RANGE_PRESETS as Fe, SYMBOL_INDICATOR_IDS as Ie, indicatorCategory as Le, indicatorValuePrecision as Re, isSeriesPalette as ze, plotColor as Be, plotShown as Ve, rangePresetStart as He, servesTimeframe as Ue, sourceParam as We, withResampling as Ge } from "@tradecanvas/core";
|
|
@@ -10032,7 +10032,11 @@ function Xc(e) {
|
|
|
10032
10032
|
let t = e.startsWith("#") ? e.slice(1) : e;
|
|
10033
10033
|
for (let e of t.split("&")) {
|
|
10034
10034
|
let t = e.indexOf("=");
|
|
10035
|
-
if (t
|
|
10035
|
+
if (!(t <= 0 || e.slice(0, t) !== Yc)) try {
|
|
10036
|
+
return decodeURIComponent(e.slice(t + 1));
|
|
10037
|
+
} catch {
|
|
10038
|
+
return null;
|
|
10039
|
+
}
|
|
10036
10040
|
}
|
|
10037
10041
|
return null;
|
|
10038
10042
|
}
|
|
@@ -11055,7 +11059,7 @@ var Cl = 4, wl = 7, Tl = 17, El = 3, Dl = [
|
|
|
11055
11059
|
"indicatorRemove",
|
|
11056
11060
|
"indicatorChange"
|
|
11057
11061
|
]) this.chart.on(e, () => this.refreshCompareDialog());
|
|
11058
|
-
|
|
11062
|
+
this.setupDock(), this.commandPalette = new Rr({
|
|
11059
11063
|
onIndicator: (e) => this.handleAddIndicator(e),
|
|
11060
11064
|
onChartType: (e) => this.handleChartType(e),
|
|
11061
11065
|
onDrawingTool: (e) => this.handleDrawingTool(e),
|
|
@@ -11105,10 +11109,18 @@ var Cl = 4, wl = 7, Tl = 17, El = 3, Dl = [
|
|
|
11105
11109
|
}
|
|
11106
11110
|
}, document.addEventListener("keydown", this.boundGlobalKeydown), document.addEventListener("fullscreenchange", this.onFullscreenChange), this.unregisterKeys = Us(this.root, [this.portal]), t.adapter ? (this.adapter = t.adapter, this.connectStream()) : this.chart.setDataTimeframe(this.state.timeframe), this.watchlist && (this.watchlistInterval = setInterval(() => this.tickWatchlist(), 1e3)), this.markSwitchedOff(), requestAnimationFrame(() => {
|
|
11107
11111
|
this.destroyed || (this.toolbar?.tidy(), this.sidebar?.tidy());
|
|
11108
|
-
}), this.refreshMarket(), this.updateUI(),
|
|
11109
|
-
|
|
11110
|
-
|
|
11111
|
-
|
|
11112
|
+
}), this.refreshMarket(), this.updateUI(), queueMicrotask(() => {
|
|
11113
|
+
if (!this.destroyed) try {
|
|
11114
|
+
t.onReady?.(this.chart, this);
|
|
11115
|
+
} finally {
|
|
11116
|
+
this.destroyed || this.restoreSharedView();
|
|
11117
|
+
}
|
|
11118
|
+
});
|
|
11119
|
+
}
|
|
11120
|
+
restoreSharedView() {
|
|
11121
|
+
if (!this.options.shareUrl || typeof location > "u") return;
|
|
11122
|
+
let e = Xc(location.hash);
|
|
11123
|
+
e && this.importState(e);
|
|
11112
11124
|
}
|
|
11113
11125
|
setSymbols(e) {
|
|
11114
11126
|
this.symbols = e;
|