@tradecanvas/chart 1.72.0 → 1.72.2
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/{LayoutSession-r7Rgc5Sw.cjs → LayoutSession-BrXo314m.cjs} +2 -2
- package/dist/{LayoutSession-r7Rgc5Sw.cjs.map → LayoutSession-BrXo314m.cjs.map} +1 -1
- package/dist/{LayoutSession-DjHF7tmL.js → LayoutSession-BrazGVET.js} +2 -2
- package/dist/{LayoutSession-DjHF7tmL.js.map → LayoutSession-BrazGVET.js.map} +1 -1
- package/dist/WidgetCommandPalette-CeCLHPy1.js +177 -0
- package/dist/WidgetCommandPalette-CeCLHPy1.js.map +1 -0
- package/dist/WidgetCommandPalette-ZZNbWwCZ.cjs +2 -0
- package/dist/WidgetCommandPalette-ZZNbWwCZ.cjs.map +1 -0
- package/dist/{WidgetDrawingSettings-MSpeHFhV.js → WidgetDrawingSettings-BeW8fX7r.js} +5 -5
- package/dist/{WidgetDrawingSettings-MSpeHFhV.js.map → WidgetDrawingSettings-BeW8fX7r.js.map} +1 -1
- package/dist/{WidgetDrawingSettings-B3KAH9Ag.cjs → WidgetDrawingSettings-Cyl2u_u8.cjs} +2 -2
- package/dist/{WidgetDrawingSettings-B3KAH9Ag.cjs.map → WidgetDrawingSettings-Cyl2u_u8.cjs.map} +1 -1
- package/dist/WidgetGoToDate-BNdngHlg.cjs +2 -0
- package/dist/{WidgetGoToDate-CPzfStIm.cjs.map → WidgetGoToDate-BNdngHlg.cjs.map} +1 -1
- package/dist/{WidgetGoToDate-R2teTLpJ.js → WidgetGoToDate-hcDtezRm.js} +6 -5
- package/dist/{WidgetGoToDate-R2teTLpJ.js.map → WidgetGoToDate-hcDtezRm.js.map} +1 -1
- package/dist/{WidgetHotkeySheet-BE0glkVA.js → WidgetHotkeySheet-1lRFSdvt.js} +3 -3
- package/dist/{WidgetHotkeySheet-BE0glkVA.js.map → WidgetHotkeySheet-1lRFSdvt.js.map} +1 -1
- package/dist/{WidgetHotkeySheet-pnsXreK6.cjs → WidgetHotkeySheet-y5LWKSG6.cjs} +2 -2
- package/dist/{WidgetHotkeySheet-pnsXreK6.cjs.map → WidgetHotkeySheet-y5LWKSG6.cjs.map} +1 -1
- package/dist/WidgetIndicatorPicker-CGvZ5kYd.js +245 -0
- package/dist/WidgetIndicatorPicker-CGvZ5kYd.js.map +1 -0
- package/dist/WidgetIndicatorPicker-DuKJFPRC.cjs +2 -0
- package/dist/WidgetIndicatorPicker-DuKJFPRC.cjs.map +1 -0
- package/dist/{WidgetIndicatorSettings-BJUjACzj.cjs → WidgetIndicatorSettings-C7vpco6e.cjs} +2 -2
- package/dist/{WidgetIndicatorSettings-BJUjACzj.cjs.map → WidgetIndicatorSettings-C7vpco6e.cjs.map} +1 -1
- package/dist/{WidgetIndicatorSettings-DgbsZk0h.js → WidgetIndicatorSettings-dDkqzzYo.js} +6 -6
- package/dist/{WidgetIndicatorSettings-DgbsZk0h.js.map → WidgetIndicatorSettings-dDkqzzYo.js.map} +1 -1
- package/dist/{WidgetSettings-D35fHGXL.js → WidgetSettings--XzDx515.js} +24 -11
- package/dist/WidgetSettings--XzDx515.js.map +1 -0
- package/dist/WidgetSettings-C0fnWGdY.cjs +2 -0
- package/dist/WidgetSettings-C0fnWGdY.cjs.map +1 -0
- package/dist/WidgetSymbolSearch-C4OR42nZ.cjs +2 -0
- package/dist/WidgetSymbolSearch-C4OR42nZ.cjs.map +1 -0
- package/dist/WidgetSymbolSearch-CvPpjIwa.js +580 -0
- package/dist/WidgetSymbolSearch-CvPpjIwa.js.map +1 -0
- package/dist/{focusTrap-Hm7AUTBw.js → focusTrap-Br9Zfje0.js} +1 -1
- package/dist/{focusTrap-Hm7AUTBw.js.map → focusTrap-Br9Zfje0.js.map} +1 -1
- package/dist/{focusTrap-B8OoGwHb.cjs → focusTrap-DrhhmG0V.cjs} +1 -1
- package/dist/{focusTrap-B8OoGwHb.cjs.map → focusTrap-DrhhmG0V.cjs.map} +1 -1
- package/dist/{i18n-DFR1Oukq.cjs → i18n-C2nQBZTY.cjs} +1 -1
- package/dist/{i18n-DFR1Oukq.cjs.map → i18n-C2nQBZTY.cjs.map} +1 -1
- package/dist/{i18n-CvnQcfor.js → i18n-C5v6Tzp1.js} +1 -1
- package/dist/{i18n-CvnQcfor.js.map → i18n-C5v6Tzp1.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{indicatorInputWords-D19kY9NO.js → indicatorInputWords-Bd9Pt6qp.js} +2 -2
- package/dist/{indicatorInputWords-D19kY9NO.js.map → indicatorInputWords-Bd9Pt6qp.js.map} +1 -1
- package/dist/{indicatorInputWords-DzrKBU2I.cjs → indicatorInputWords-CTA4IcJR.cjs} +2 -2
- package/dist/{indicatorInputWords-DzrKBU2I.cjs.map → indicatorInputWords-CTA4IcJR.cjs.map} +1 -1
- package/dist/{indicatorSettingsTabs-BLEULMJJ.cjs → indicatorSettingsTabs-B0liE3ST.cjs} +2 -2
- package/dist/{indicatorSettingsTabs-BLEULMJJ.cjs.map → indicatorSettingsTabs-B0liE3ST.cjs.map} +1 -1
- package/dist/{indicatorSettingsTabs-Wxx2v_y4.js → indicatorSettingsTabs-XcgMdbLp.js} +3 -3
- package/dist/{indicatorSettingsTabs-Wxx2v_y4.js.map → indicatorSettingsTabs-XcgMdbLp.js.map} +1 -1
- package/dist/monthView-B-CieFDJ.cjs +2 -0
- package/dist/monthView-B-CieFDJ.cjs.map +1 -0
- package/dist/monthView-N8yDaTqZ.js +198 -0
- package/dist/monthView-N8yDaTqZ.js.map +1 -0
- package/dist/{platformKeys-BAPueZ1I.cjs → platformKeys-B82-j1Fs.cjs} +1 -1
- package/dist/{platformKeys-BAPueZ1I.cjs.map → platformKeys-B82-j1Fs.cjs.map} +1 -1
- package/dist/{platformKeys-D_x_6ZrV.js → platformKeys-Dd1qOCjF.js} +1 -1
- package/dist/{platformKeys-D_x_6ZrV.js.map → platformKeys-Dd1qOCjF.js.map} +1 -1
- package/dist/{settingsControls-ef4j_clQ.js → settingsControls-DIjzCFHI.js} +2 -2
- package/dist/{settingsControls-ef4j_clQ.js.map → settingsControls-DIjzCFHI.js.map} +1 -1
- package/dist/{settingsControls-jNn0If4b.cjs → settingsControls-Tn8_vJJv.cjs} +2 -2
- package/dist/{settingsControls-jNn0If4b.cjs.map → settingsControls-Tn8_vJJv.cjs.map} +1 -1
- package/dist/symbolCatalog-CA1fpz3s.js +90 -0
- package/dist/symbolCatalog-CA1fpz3s.js.map +1 -0
- package/dist/symbolCatalog-Dx1YnZgm.cjs +2 -0
- package/dist/symbolCatalog-Dx1YnZgm.cjs.map +1 -0
- package/dist/widget/ChartWidget.d.ts +102 -580
- package/dist/widget/ChartWidget.d.ts.map +1 -1
- package/dist/widget/WidgetAlerts.d.ts +35 -0
- package/dist/widget/WidgetAlerts.d.ts.map +1 -0
- package/dist/widget/WidgetChartSettings.d.ts +211 -0
- package/dist/widget/WidgetChartSettings.d.ts.map +1 -0
- package/dist/widget/WidgetCommands.d.ts +54 -0
- package/dist/widget/WidgetCommands.d.ts.map +1 -0
- package/dist/widget/WidgetCompares.d.ts +140 -0
- package/dist/widget/WidgetCompares.d.ts.map +1 -0
- package/dist/widget/WidgetDockArea.d.ts +90 -0
- package/dist/widget/WidgetDockArea.d.ts.map +1 -0
- package/dist/widget/WidgetDrawingEdit.d.ts +73 -0
- package/dist/widget/WidgetDrawingEdit.d.ts.map +1 -0
- package/dist/widget/WidgetIntervals.d.ts +66 -0
- package/dist/widget/WidgetIntervals.d.ts.map +1 -0
- package/dist/widget/WidgetLayouts.d.ts +85 -0
- package/dist/widget/WidgetLayouts.d.ts.map +1 -0
- package/dist/widget/WidgetLegendView.d.ts +54 -0
- package/dist/widget/WidgetLegendView.d.ts.map +1 -0
- package/dist/widget/WidgetMenus.d.ts +79 -0
- package/dist/widget/WidgetMenus.d.ts.map +1 -0
- package/dist/widget/WidgetReplay.d.ts +199 -0
- package/dist/widget/WidgetReplay.d.ts.map +1 -0
- package/dist/widget/WidgetSettings.d.ts +2 -0
- package/dist/widget/WidgetSettings.d.ts.map +1 -1
- package/dist/widget/WidgetTrading.d.ts +48 -0
- package/dist/widget/WidgetTrading.d.ts.map +1 -0
- package/dist/widget/WidgetWatchlists.d.ts +77 -0
- package/dist/widget/WidgetWatchlists.d.ts.map +1 -0
- package/dist/widget/index.cjs +43 -29
- package/dist/widget/index.cjs.map +1 -1
- package/dist/widget/index.js +9628 -9812
- package/dist/widget/index.js.map +1 -1
- package/dist/widget/keyTarget.d.ts +4 -0
- package/dist/widget/keyTarget.d.ts.map +1 -1
- package/dist/widget/locales/index.cjs +1 -1
- package/dist/widget/locales/index.js +1 -1
- package/dist/widget/pageEnv.d.ts +5 -0
- package/dist/widget/pageEnv.d.ts.map +1 -0
- package/dist/widget/widgetDialogs.d.ts +3 -0
- package/dist/widget/widgetDialogs.d.ts.map +1 -1
- package/dist/widgetFeatures-BM6u0u74.js +186 -0
- package/dist/widgetFeatures-BM6u0u74.js.map +1 -0
- package/dist/widgetFeatures-BZ8OVPN2.cjs +3 -0
- package/dist/widgetFeatures-BZ8OVPN2.cjs.map +1 -0
- package/package.json +3 -3
- package/dist/WidgetGoToDate-CPzfStIm.cjs +0 -2
- package/dist/WidgetSettings-D35fHGXL.js.map +0 -1
- package/dist/WidgetSettings-Pgt3p6vv.cjs +0 -2
- package/dist/WidgetSettings-Pgt3p6vv.cjs.map +0 -1
- package/dist/widgetFeatures-BvkTbsQn.js +0 -378
- package/dist/widgetFeatures-BvkTbsQn.js.map +0 -1
- package/dist/widgetFeatures-Cy0fs3Nl.cjs +0 -3
- package/dist/widgetFeatures-Cy0fs3Nl.cjs.map +0 -1
|
@@ -11,20 +11,45 @@ import { CompareWay } from './widgetCompare.js';
|
|
|
11
11
|
import { Translator } from './i18n.js';
|
|
12
12
|
import { WidgetFeature, WidgetFeatures } from './widgetFeatures.js';
|
|
13
13
|
export declare class ChartWidget {
|
|
14
|
+
/** The intervals the widget offers: the menu, the ones pinned, typed ones and the range bar's. */
|
|
15
|
+
private readonly intervals;
|
|
16
|
+
/** Editing a drawing: its toolbar, its words typed in place, its settings and its templates. */
|
|
17
|
+
private readonly drawingEdit;
|
|
18
|
+
/** The chart settings: their state, where they are kept, the dialog's edit, and the scale they show. */
|
|
19
|
+
private readonly chartSettings;
|
|
20
|
+
/** The dock by the chart: its panels, its rail and how wide it is. */
|
|
21
|
+
private readonly docking;
|
|
22
|
+
/** Saved layouts and shared views: what a layout holds, where it is kept, and the link to a view. */
|
|
23
|
+
private readonly layouts;
|
|
24
|
+
/** The command palette's entries and the actions they run. */
|
|
25
|
+
private readonly commands;
|
|
26
|
+
/** The legend over the chart: the symbol's row and the indicators' rows, and their menu. */
|
|
27
|
+
private readonly legend;
|
|
28
|
+
/** The chart's context menus: on the chart, on a drawing, and the clear menu. */
|
|
29
|
+
private readonly menus;
|
|
30
|
+
/** Trading by the chart: the account panel, the order ticket, the depth ladder and the bracket bar. */
|
|
31
|
+
private readonly trading;
|
|
32
|
+
/** Price alerts: their panel, what they are checked against, and the notices when one fires. */
|
|
33
|
+
private readonly alerting;
|
|
34
|
+
/** The watchlists by the chart: their symbols, lists and quotes. */
|
|
35
|
+
private readonly watching;
|
|
36
|
+
/** Other symbols compared with the chart's: their bars, the compare dialog, the scale they hold. */
|
|
37
|
+
private readonly comparing;
|
|
14
38
|
private chart;
|
|
15
39
|
private state;
|
|
16
40
|
/** The theme for each mode: the host's own where it gave one, so the toggle brings it back. */
|
|
17
41
|
private themeOf;
|
|
18
42
|
private toolbar;
|
|
43
|
+
/** What is open, by its toolbar button's role (`'alerts'`, `'account'`, `'indicators'`…): one effect shows it on the toolbar. */
|
|
44
|
+
private readonly openRoles;
|
|
19
45
|
private sidebar;
|
|
20
46
|
private settingsPart;
|
|
21
47
|
private get settings();
|
|
22
48
|
private statusBar;
|
|
23
49
|
private goToDatePart;
|
|
24
50
|
private get goToDate();
|
|
25
|
-
private
|
|
51
|
+
private tooltip;
|
|
26
52
|
private indicatorLegend;
|
|
27
|
-
private legendFrame;
|
|
28
53
|
/**
|
|
29
54
|
* Modals (settings, search, command palette, hotkeys) mount here: it carries
|
|
30
55
|
* the theme tokens to `document.body`, and moves inside the widget while
|
|
@@ -40,45 +65,25 @@ export declare class ChartWidget {
|
|
|
40
65
|
/** Stops following presses for the page's shortcuts (see keyTarget). */
|
|
41
66
|
private unregisterKeys;
|
|
42
67
|
private readonly onFullscreenChange;
|
|
43
|
-
private
|
|
44
|
-
private
|
|
45
|
-
|
|
46
|
-
private
|
|
47
|
-
/**
|
|
48
|
-
private
|
|
49
|
-
/** Follows the widget's width for the dock. */
|
|
50
|
-
private dockObserver;
|
|
68
|
+
private commandPalettePart;
|
|
69
|
+
private get commandPalette();
|
|
70
|
+
private symbolSearchPart;
|
|
71
|
+
private get symbolSearch();
|
|
72
|
+
/** Letters typed on the chart while the symbol search's code loads: it opens with all of them. */
|
|
73
|
+
private typedWhileLoading;
|
|
51
74
|
private hotkeySheetPart;
|
|
52
75
|
private get hotkeySheet();
|
|
53
|
-
|
|
76
|
+
/** Bar replay: its panel over the chart and the session it drives. Made in the constructor, once the chart is up. */
|
|
77
|
+
private replay;
|
|
54
78
|
private dragDrop;
|
|
55
|
-
private alertsPanel;
|
|
56
79
|
private objectTree;
|
|
57
80
|
private indicatorSettingsPart;
|
|
58
81
|
private get indicatorSettings();
|
|
59
|
-
private
|
|
82
|
+
private indicatorPickerPart;
|
|
83
|
+
private get indicatorPicker();
|
|
60
84
|
private drawingStyle;
|
|
61
85
|
private drawingSettingsPart;
|
|
62
86
|
private get drawingSettings();
|
|
63
|
-
private drawingMenu;
|
|
64
|
-
/** A text drawn just now whose words the settings ask for: Cancel there takes it back. */
|
|
65
|
-
private justDrawnText;
|
|
66
|
-
/** A text drawing's words typed in place over it. */
|
|
67
|
-
private inlineText;
|
|
68
|
-
/** The drawing whose words are being typed in place, and whether it was just drawn. */
|
|
69
|
-
private inlineTextId;
|
|
70
|
-
private inlineTextNew;
|
|
71
|
-
/** The chart's type sizes the look last wrote: a host's own change since makes them the new base. */
|
|
72
|
-
private chartFontWritten;
|
|
73
|
-
/** Stops waiting to ask for a just-drawn text's words (the widget goes, or another text is drawn first). */
|
|
74
|
-
private cancelTextPrompt;
|
|
75
|
-
/** The trash button's menu, made the first time it opens. */
|
|
76
|
-
private clearMenu;
|
|
77
|
-
private selectionToolbar;
|
|
78
|
-
private selectionToolbarFrame;
|
|
79
|
-
private chartMenu;
|
|
80
|
-
/** The pane a chart menu was opened on (its scale switches act on it). */
|
|
81
|
-
private menuPane;
|
|
82
87
|
/** Whether the chart menu offers a download of the data. */
|
|
83
88
|
private canExport;
|
|
84
89
|
/** The latest fetch of each symbol the chart's indicators read. */
|
|
@@ -92,32 +97,10 @@ export declare class ChartWidget {
|
|
|
92
97
|
/** The chart's type sizes before the look scaled them. */
|
|
93
98
|
private chartFontBase;
|
|
94
99
|
private scaleObserver;
|
|
95
|
-
/** The legend row's "more" menu: move the indicator to another pane. */
|
|
96
|
-
private legendMenu;
|
|
97
100
|
private templates;
|
|
98
101
|
private templatePrompt;
|
|
99
|
-
/** The chart templates of the settings' Template menu, and the prompt that names a new one. */
|
|
100
|
-
private chartTemplates;
|
|
101
|
-
private chartTemplatePrompt;
|
|
102
|
-
/** Asks a drawing template's name, over the drawing's settings. */
|
|
103
|
-
private drawingTemplatePrompt;
|
|
104
|
-
/**
|
|
105
|
-
* The settings open now: as they were on opening, and the keys changed since
|
|
106
|
-
* (a change, a reset, a template). Cancel puts those back, OK records them
|
|
107
|
-
* as one step; the rest (an axis dragged meanwhile) is left as it is.
|
|
108
|
-
*/
|
|
109
|
-
private settingsEdit;
|
|
110
|
-
private intervalInput;
|
|
111
102
|
/** The note shown over a signal marker under the pointer. */
|
|
112
103
|
private markerTip;
|
|
113
|
-
private accountPanel;
|
|
114
|
-
private orderTicket;
|
|
115
|
-
private accountFrame;
|
|
116
|
-
private layoutSession;
|
|
117
|
-
private layoutsUI;
|
|
118
|
-
private bracketBar;
|
|
119
|
-
private alertNotifier;
|
|
120
|
-
private depthLadder;
|
|
121
104
|
private dataWindow;
|
|
122
105
|
private lastHoverIndex;
|
|
123
106
|
/** The bar the crosshair reported at it: on Renko and the like a brick, not a data bar. */
|
|
@@ -138,21 +121,7 @@ export declare class ChartWidget {
|
|
|
138
121
|
private customTimeframes;
|
|
139
122
|
/** Timeframes on offer, shortest first. */
|
|
140
123
|
private timeframes;
|
|
141
|
-
private watchlist;
|
|
142
|
-
private watchlistSparkBuffer;
|
|
143
124
|
private sessionRefPrice;
|
|
144
|
-
/** Per-symbol refPrice explicitly pushed by the host via `setWatchlistEntry` — takes precedence over `sessionRefPrice`. */
|
|
145
|
-
private hostWatchlistRefPrice;
|
|
146
|
-
private watchlistInterval;
|
|
147
|
-
private watchlistStore;
|
|
148
|
-
/** The list follows `setSymbols` (no lists given, none kept). */
|
|
149
|
-
private watchlistFromSymbols;
|
|
150
|
-
private quoteSource;
|
|
151
|
-
private stopQuotes;
|
|
152
|
-
/** The symbols quotes are coming for, joined. */
|
|
153
|
-
private quotedKey;
|
|
154
|
-
/** The latest quote of each symbol. */
|
|
155
|
-
private quotes;
|
|
156
125
|
private symbolInfoPanel;
|
|
157
126
|
/** Headlines per symbol, kept a few minutes; a late answer for an earlier symbol is dropped. */
|
|
158
127
|
private news;
|
|
@@ -162,29 +131,6 @@ export declare class ChartWidget {
|
|
|
162
131
|
private chartNav;
|
|
163
132
|
/** Bars on screen, for the navigation's scroll step. */
|
|
164
133
|
private visibleBarCount;
|
|
165
|
-
private replayPollInterval;
|
|
166
|
-
/** The replay's speed, a multiplier: 1 plays one bar of the chart a second. */
|
|
167
|
-
private replaySpeed;
|
|
168
|
-
/** The chart's bars the replay goes through, and when the step shown opened (from `replayStep`). */
|
|
169
|
-
private replayBarsTotal;
|
|
170
|
-
private replayStepTime;
|
|
171
|
-
/** The symbol and interval of the finer steps given to the replay running (null: none given). */
|
|
172
|
-
private replayStepsKey;
|
|
173
|
-
/** `'auto'`, `'bar'`, or the finer interval a replay steps through. */
|
|
174
|
-
private replayStep;
|
|
175
|
-
private replayStartSeq;
|
|
176
|
-
/** The time of a bar picked while the next bars loaded: the replay starts there once they come. */
|
|
177
|
-
private replayPickTime;
|
|
178
|
-
/** A replay start waiting for its finer steps: a Play pressed meanwhile plays it once it starts. */
|
|
179
|
-
private replayStartPending;
|
|
180
|
-
private replayPlayWanted;
|
|
181
|
-
/** Finer bars fetched or built for the last replay in steps. */
|
|
182
|
-
private replayStepsCache;
|
|
183
|
-
/** While picking the start bar: shades the bars right of the pointer. */
|
|
184
|
-
private replayShade;
|
|
185
|
-
private layoutKeyPrefix;
|
|
186
|
-
private layoutDebounceMs;
|
|
187
|
-
private activeLayoutKey;
|
|
188
134
|
private root;
|
|
189
135
|
private chartContainer;
|
|
190
136
|
private loading;
|
|
@@ -219,26 +165,6 @@ export declare class ChartWidget {
|
|
|
219
165
|
* told of the new one; anything told since is the new one's.
|
|
220
166
|
*/
|
|
221
167
|
private chartInfoAtSwitch;
|
|
222
|
-
private settingsState;
|
|
223
|
-
/** What Reset in the settings panel goes back to: the defaults, as the host's features set them. */
|
|
224
|
-
private settingsDefaults;
|
|
225
|
-
/** Where `persistSettings` keeps the settings; null while it is off. */
|
|
226
|
-
private settingsStore;
|
|
227
|
-
/**
|
|
228
|
-
* The settings as last kept and told to the listeners, as JSON: a change
|
|
229
|
-
* that leaves them so (a Cancel, a call setting what is already set) is
|
|
230
|
-
* neither. Null while the widget is being made, which tells nobody.
|
|
231
|
-
*/
|
|
232
|
-
private settingsPublished;
|
|
233
|
-
/**
|
|
234
|
-
* The settings shared links set this visit (`shown`) and the viewer's own
|
|
235
|
-
* they took the place of (`own`): what `persistSettings` keeps for a
|
|
236
|
-
* setting still as a link set it. Null when no link set any.
|
|
237
|
-
*/
|
|
238
|
-
private linkSettings;
|
|
239
|
-
private readonly settingsListeners;
|
|
240
|
-
/** Switches the host's features turned off: a setting kept, shared or in a layout can't turn them on. */
|
|
241
|
-
private settingsLocked;
|
|
242
168
|
private t;
|
|
243
169
|
private adapter;
|
|
244
170
|
private boundGlobalKeydown;
|
|
@@ -248,28 +174,6 @@ export declare class ChartWidget {
|
|
|
248
174
|
private builtInZone;
|
|
249
175
|
/** The timeframe the user (or the host) picked: ranges never show finer than it, layouts keep it. */
|
|
250
176
|
private chosenTimeframe;
|
|
251
|
-
/** Counts range clicks and the user's own picks: a range waiting behind a newer one gives way. */
|
|
252
|
-
private rangeSeq;
|
|
253
|
-
/** Ranges apply one at a time, each reading the bars the last one brought. */
|
|
254
|
-
private rangeQueue;
|
|
255
|
-
private compares;
|
|
256
|
-
/** How the compare dialog adds a symbol: the way picked last. */
|
|
257
|
-
private compareWay;
|
|
258
|
-
/** Symbols whose bars are on the way to be compared in percent. */
|
|
259
|
-
private readonly comparesLoading;
|
|
260
|
-
/**
|
|
261
|
-
* Set by the first percent compare, cleared when the last one goes or the
|
|
262
|
-
* user picks a scale meanwhile: while set, a regular price scale reads in
|
|
263
|
-
* percent, as the compare lines do (`effectiveScaleMode`). Never saved.
|
|
264
|
-
*/
|
|
265
|
-
private compareScaleHeld;
|
|
266
|
-
/** The latest round of percent compare fetches: an older round's answers are dropped. */
|
|
267
|
-
private compareFetchSeq;
|
|
268
|
-
/** The percent compares' older stretches are on their way; `compareOlderAgain`: more pages came meanwhile. */
|
|
269
|
-
private compareOlderBusy;
|
|
270
|
-
private compareOlderAgain;
|
|
271
|
-
/** Older bars asked no stretch of a compare whose bars were still at another interval: a round once they come. */
|
|
272
|
-
private compareOlderPassed;
|
|
273
177
|
/** Every switch, on or off (see `setFeatures`). */
|
|
274
178
|
private featureState;
|
|
275
179
|
/** The host's own shortcuts, first added first. */
|
|
@@ -281,13 +185,41 @@ export declare class ChartWidget {
|
|
|
281
185
|
/** Whether the chart shows the "+" by the price axis while its switch is on. */
|
|
282
186
|
private priceAxisAddDefault;
|
|
283
187
|
constructor(container: HTMLElement, givenOptions?: ChartWidgetOptions);
|
|
188
|
+
/** The options read once: the symbols, the settings they seed, the theme, the chart's features, the intervals and the starting state. */
|
|
189
|
+
private readOptions;
|
|
190
|
+
/** The widget's root and portal, its direction and theme, and the look's tokens on both. */
|
|
191
|
+
private buildRoot;
|
|
192
|
+
/** The toolbar along the top. */
|
|
193
|
+
private buildToolbar;
|
|
194
|
+
/** The row under the toolbar: the drawing tools, the chart's box, the dock and the watchlist; and the account panel's place under it. */
|
|
195
|
+
private buildBody;
|
|
196
|
+
/** The chart, and what follows its bars, its market and the page. */
|
|
197
|
+
private buildChart;
|
|
198
|
+
/** The status bar along the bottom. */
|
|
199
|
+
private buildStatusBar;
|
|
200
|
+
/** The settings, the symbol search and the shortcut sheet, each made when first opened. */
|
|
201
|
+
private buildDialogs;
|
|
202
|
+
/** The bars, the legend, compares, replay and the data window follow the chart's events. */
|
|
203
|
+
private followChart;
|
|
204
|
+
/** Drawing styles, templates, defaults and the text typed in place. */
|
|
205
|
+
private wireDrawingEditing;
|
|
206
|
+
/** The drawing's and the chart's menus, its toolbar when selected, undo and redo, and typing an interval. */
|
|
207
|
+
private wireChartMenus;
|
|
208
|
+
/** Named layouts, the account panel, the order ticket and bracket orders. */
|
|
209
|
+
private buildTrading;
|
|
210
|
+
/** Price alerts, and the indicators dialog. */
|
|
211
|
+
private buildAlerts;
|
|
212
|
+
/** The object tree, and every panel into the dock. */
|
|
213
|
+
private buildPanels;
|
|
214
|
+
/** The command palette, fullscreen and the keys. */
|
|
215
|
+
private buildCommandPalette;
|
|
216
|
+
/** The kept settings, the stream, the watchlist's ticks, the first update and onReady. */
|
|
217
|
+
private finishSetup;
|
|
284
218
|
/**
|
|
285
219
|
* The dialogs' code, loaded once the page has a moment to spare: not in the way of the chart
|
|
286
220
|
* coming up, and in before the user opens one, so the first opens at once too.
|
|
287
221
|
*/
|
|
288
222
|
private preloadDialogsWhenIdle;
|
|
289
|
-
/** A view shared in the URL (`#tcw=`), when `shareUrl` is on. */
|
|
290
|
-
private restoreSharedView;
|
|
291
223
|
/**
|
|
292
224
|
* Replace the symbols on offer, tickers or SymbolInfo as in the `symbols`
|
|
293
225
|
* option. Does not change the active symbol. A watchlist made from
|
|
@@ -333,8 +265,6 @@ export declare class ChartWidget {
|
|
|
333
265
|
* depth ladder (the `depthLadder` option), or its switch off.
|
|
334
266
|
*/
|
|
335
267
|
openPanel(panel: WidgetPanel): boolean;
|
|
336
|
-
/** Whether the widget has `panel`: the watchlist and the ladder only when made with them, every one with its switch on. */
|
|
337
|
-
private hasPanel;
|
|
338
268
|
/** Shut the dock. */
|
|
339
269
|
closePanel(): void;
|
|
340
270
|
/** The panel open in the dock, or null. */
|
|
@@ -351,10 +281,6 @@ export declare class ChartWidget {
|
|
|
351
281
|
private intlLocale;
|
|
352
282
|
/** The language words in the panels are written in ("in 3 hours", weekday names): the widget's. */
|
|
353
283
|
private textLocale;
|
|
354
|
-
private createWatchlist;
|
|
355
|
-
/** Quotes for the shown list's symbols: a new subscription when they change. */
|
|
356
|
-
private followQuotes;
|
|
357
|
-
private takeQuotes;
|
|
358
284
|
setSymbol(symbol: string): Promise<void>;
|
|
359
285
|
/**
|
|
360
286
|
* Push an entry into the watchlist (e.g., from your own WebSocket).
|
|
@@ -366,7 +292,6 @@ export declare class ChartWidget {
|
|
|
366
292
|
* auto-tick loop stops clobbering it (see `tickWatchlist`).
|
|
367
293
|
*/
|
|
368
294
|
setWatchlistEntry(symbol: string, entry: Partial<WatchlistEntry>): void;
|
|
369
|
-
private tickWatchlist;
|
|
370
295
|
/** Ignored when the chart's `features.timeframes` whitelist leaves `tf` out. */
|
|
371
296
|
setTimeframe(tf: TimeFrame): Promise<void>;
|
|
372
297
|
/**
|
|
@@ -423,68 +348,17 @@ export declare class ChartWidget {
|
|
|
423
348
|
private handleSymbolClick;
|
|
424
349
|
/** The symbol search, started from `query` (a letter typed on the chart). */
|
|
425
350
|
private openSymbolSearch;
|
|
351
|
+
/** The symbol search for another job (a symbol to add to a list, one to compare with), once its code is in. */
|
|
352
|
+
private withSymbolSearch;
|
|
426
353
|
/** The host's symbol search, else the adapter's; none filters `symbols`. */
|
|
427
354
|
private symbolSearchFn;
|
|
428
355
|
private handleTimeframe;
|
|
429
|
-
/**
|
|
430
|
-
* A range from the range bar. A long one switches to the timeframe whose
|
|
431
|
-
* bars it fits (five years of days in weeks, decades in months), a short
|
|
432
|
-
* one back toward the user's own (`timeframeForRange`); then the range is
|
|
433
|
-
* shown. Off with `features: { 'statusBar.rangeTimeframe': false }`.
|
|
434
|
-
*/
|
|
435
|
-
private applyRangePreset;
|
|
436
|
-
private runRangePreset;
|
|
437
|
-
/** The timeframe `preset` shows in, from the bars on the chart now. */
|
|
438
|
-
private timeframeForPreset;
|
|
439
|
-
/** Whether a switch to `tf` brings bars: the feed serves it, or the bars here resample to it. */
|
|
440
|
-
private canShowTimeframe;
|
|
441
356
|
/** Fill the screen with the widget, or leave fullscreen. */
|
|
442
357
|
toggleFullscreen(): void;
|
|
443
358
|
/** A drawing tool's name in the widget's language. */
|
|
444
359
|
private drawingToolName;
|
|
445
360
|
/** The chart container's top-left in the widget root's coordinates. */
|
|
446
361
|
private chartOffset;
|
|
447
|
-
/** `updateSelectionToolbar` on the next frame, once, while the toolbar shows. */
|
|
448
|
-
private scheduleSelectionToolbar;
|
|
449
|
-
/**
|
|
450
|
-
* Show the selection toolbar over the selected drawings, or hide it: when
|
|
451
|
-
* nothing is selected, or while a tool, the eraser or the zoom area is on.
|
|
452
|
-
*/
|
|
453
|
-
private updateSelectionToolbar;
|
|
454
|
-
/**
|
|
455
|
-
* Type a text drawing's words in place, over its box: Enter or a click away
|
|
456
|
-
* keeps them, Escape puts them back. One just drawn (`justDrawn`) is taken
|
|
457
|
-
* back on Escape or with no words. False when its box is not on the chart
|
|
458
|
-
* (hidden, its text turned off): the settings ask for the words instead.
|
|
459
|
-
*/
|
|
460
|
-
private editTextInPlace;
|
|
461
|
-
/** Open a drawing's settings (double-click on it, or the object tree's settings button). */
|
|
462
|
-
private openDrawingSettings;
|
|
463
|
-
private showDrawingSettings;
|
|
464
|
-
/** Save a drawing's look as a template of its tool, asking for its name over the drawing's settings. */
|
|
465
|
-
private promptSaveDrawingTemplate;
|
|
466
|
-
/** Add a "price crosses this drawing" alert and say so. */
|
|
467
|
-
private addDrawingAlert;
|
|
468
|
-
/** The menu of a right-clicked drawing; the chart has selected it (and its group) by now. */
|
|
469
|
-
private openDrawingMenu;
|
|
470
|
-
private runDrawingMenuAction;
|
|
471
|
-
/** What the chart's menus can offer here, and how the chart is set now. */
|
|
472
|
-
private chartMenuContext;
|
|
473
|
-
/** The indicators "Remove indicators" takes away: a comparison with another symbol stays, as it has a dialog of its own. */
|
|
474
|
-
private removableIndicators;
|
|
475
|
-
/**
|
|
476
|
-
* The exchange's zone, offered when the chart knows one (the symbol's, or
|
|
477
|
-
* its market's) or the adapter can name the symbol's; its zone is null
|
|
478
|
-
* while unknown.
|
|
479
|
-
*/
|
|
480
|
-
private exchangeChoice;
|
|
481
|
-
/** The time zones on offer, the exchange's among them when there is one. */
|
|
482
|
-
private timezoneChoices;
|
|
483
|
-
/**
|
|
484
|
-
* Open a chart menu at (x, y) in the chart's pixels, the host's own entries
|
|
485
|
-
* last; nothing when it has no entries.
|
|
486
|
-
*/
|
|
487
|
-
private openChartMenu;
|
|
488
362
|
/**
|
|
489
363
|
* Turn switches on or off while running, by name (`WIDGET_FEATURES`): a
|
|
490
364
|
* name without a dot is a whole capability (`alerts`, `settings`), a dotted
|
|
@@ -549,48 +423,24 @@ export declare class ChartWidget {
|
|
|
549
423
|
* name it doesn't know.
|
|
550
424
|
*/
|
|
551
425
|
getSlot(name: import('./types.js').WidgetSlot): HTMLElement | null;
|
|
552
|
-
private runChartMenuAction;
|
|
553
426
|
/** Open or close the account panel (no argument: the other way from now). */
|
|
554
427
|
toggleAccountPanel(open?: boolean): void;
|
|
555
|
-
/** The order ticket, at a price from the chart (or the market). */
|
|
556
|
-
private openOrderTicket;
|
|
557
|
-
/** A market's rules for the order ticket (`setMarket`): its step, the day's limits, its lot. */
|
|
558
|
-
private orderRules;
|
|
559
|
-
/** Redraw the account panel once a frame at most (ticks, fills and order changes come in bursts). */
|
|
560
|
-
private refreshAccountSoon;
|
|
561
|
-
private refreshAccount;
|
|
562
|
-
/** Ask for a limit or stop order at `price` (one unit), and say so. */
|
|
563
|
-
private placeOrderAt;
|
|
564
428
|
/** The time now in the display zone ("14:05:09") and the zone's offset ("UTC+7"), for the status bar's clock. */
|
|
565
429
|
private clockNow;
|
|
566
430
|
/** Whether every drawing is locked, and every one hidden: the sidebar's lock all and hide all say so. */
|
|
567
431
|
private refreshDrawingsState;
|
|
568
|
-
/** The status bar's scale switches as the chart is now (a shared link or your code may have set it). */
|
|
569
|
-
private refreshScaleSwitches;
|
|
570
|
-
/** `mode` on, or back to a regular scale when it is on already, through the settings. */
|
|
571
|
-
private toggleScaleMode;
|
|
572
432
|
/** The display timezone from the settings; 'exchange' is the zone the chart resolved it to. */
|
|
573
433
|
private displayTimezone;
|
|
574
434
|
private toggleGoToDate;
|
|
575
435
|
private toggleLoadedGoToDate;
|
|
576
436
|
/** A moment to centre, or a span to show edge to edge, from the Go to dialog. */
|
|
577
437
|
private goTo;
|
|
578
|
-
/** Pinned timeframes that are still on offer, shortest first. */
|
|
579
|
-
private pinnedTimeframes;
|
|
580
|
-
/** The timeframe menu's rows, typed intervals marked so they can be removed. */
|
|
581
|
-
private timeframeMenu;
|
|
582
|
-
/** A typed interval: switch to it, adding and pinning it when it is new. False when it isn't one. */
|
|
583
|
-
private handleAddTimeframe;
|
|
584
438
|
/** A note by a signal marker: its source or label, side, confidence, price and time; null hides it. */
|
|
585
439
|
private showMarkerTip;
|
|
586
|
-
/** A typed interval: one on offer is picked; another joins the menu (not the toolbar's pins). */
|
|
587
|
-
private selectTypedTimeframe;
|
|
588
440
|
/** Put a template's indicators in place of the chart's (one undo step). */
|
|
589
441
|
private applyIndicatorTemplate;
|
|
590
442
|
/** Save the chart's indicators as a template, asking for its name. */
|
|
591
443
|
private promptSaveIndicatorTemplate;
|
|
592
|
-
private handleRemoveTimeframe;
|
|
593
|
-
private handleToggleTimeframeFavorite;
|
|
594
444
|
/**
|
|
595
445
|
* Load the widget's base series. Prefer this over `getChart().setData()` so
|
|
596
446
|
* client-side timeframe resampling has a finest-resolution source to
|
|
@@ -628,9 +478,6 @@ export declare class ChartWidget {
|
|
|
628
478
|
private timeToKeepInView;
|
|
629
479
|
private handleDataUpdate;
|
|
630
480
|
private setConnectionState;
|
|
631
|
-
/** The depth ladder, a page of the dock: open or shut it (the Trade menu's entry). */
|
|
632
|
-
private toggleLadder;
|
|
633
|
-
private toggleAlerts;
|
|
634
481
|
private handleToggleFavorite;
|
|
635
482
|
/**
|
|
636
483
|
* Encode the current view (symbol, timeframe, chart type, scale,
|
|
@@ -639,22 +486,6 @@ export declare class ChartWidget {
|
|
|
639
486
|
* host's features set, from where they set them).
|
|
640
487
|
*/
|
|
641
488
|
exportState(): string;
|
|
642
|
-
/**
|
|
643
|
-
* A link's settings, for this visit: shown, but neither kept nor told.
|
|
644
|
-
* They are someone else's choices (an upside-down scale, a hidden price),
|
|
645
|
-
* so `persistSettings` keeps the viewer's own in their place until the
|
|
646
|
-
* viewer changes them, and listeners hear of them with the next change.
|
|
647
|
-
*/
|
|
648
|
-
private showLinkSettings;
|
|
649
|
-
/** `settings` with each one still as a link set it back to the viewer's own: what `persistSettings` keeps. */
|
|
650
|
-
private ownSettings;
|
|
651
|
-
/**
|
|
652
|
-
* Settings the viewer or the host just set: a link's no more, so from here
|
|
653
|
-
* on they are kept as they are, the link's value too when it is picked
|
|
654
|
-
* again on purpose. Kept at once, since a pick of the value on screen (a
|
|
655
|
-
* Reset where the link set the defaults) changes nothing to tell.
|
|
656
|
-
*/
|
|
657
|
-
private claimSettings;
|
|
658
489
|
/** Restore a view from an `exportState()` string. Returns false if malformed. */
|
|
659
490
|
importState(encoded: string): Promise<boolean>;
|
|
660
491
|
/**
|
|
@@ -672,47 +503,8 @@ export declare class ChartWidget {
|
|
|
672
503
|
setDepth(depth: DepthData | null): void;
|
|
673
504
|
/** Begin a draggable bracket order at the latest price and show the action bar. */
|
|
674
505
|
startBracket(side: 'buy' | 'sell'): void;
|
|
675
|
-
/**
|
|
676
|
-
* The bar under the pointer and the close before it. On candles the data
|
|
677
|
-
* bar at the index, as it is now (a live tick moves it); on Renko and the
|
|
678
|
-
* like the brick the crosshair reported, whose index is not the data's.
|
|
679
|
-
*/
|
|
680
|
-
private hoveredBar;
|
|
681
|
-
private buildDataWindowModel;
|
|
682
|
-
private toggleDataWindow;
|
|
683
|
-
private toggleObjects;
|
|
684
|
-
/**
|
|
685
|
-
* The dock's pages, in the rail's order: the watchlist, alerts, objects,
|
|
686
|
-
* the data window, the symbol info and the depth ladder, all shut to start
|
|
687
|
-
* with. Each draws itself as it shows, and says so on the toolbar's button.
|
|
688
|
-
*/
|
|
689
|
-
private setupDock;
|
|
690
|
-
/**
|
|
691
|
-
* The dock and the widget's width. Going narrow (a phone, a rotated
|
|
692
|
-
* tablet) shuts any panel: it would be a sheet over the chart. No panel
|
|
693
|
-
* opens by itself: the chart has the room until one is asked for.
|
|
694
|
-
*/
|
|
695
|
-
private fitDockToWidth;
|
|
696
|
-
/** Whether the rail shows now: on, and the widget not narrow. */
|
|
697
|
-
private railShown;
|
|
698
|
-
/**
|
|
699
|
-
* The rail's Tab stop on a button that shows, and the toolbar's alerts and
|
|
700
|
-
* objects buttons hidden while the rail has its own for them (so the
|
|
701
|
-
* "more" menu leaves them out too).
|
|
702
|
-
*/
|
|
703
|
-
private syncRail;
|
|
704
|
-
/** Where the keyboard goes when a panel shuts and the rail can't take it: its toolbar button, or "more" on a phone. */
|
|
705
|
-
private panelFocusTarget;
|
|
706
|
-
/** A panel shut by its own close button: by hand. */
|
|
707
|
-
private closePanelByHand;
|
|
708
506
|
private openIndicatorSettings;
|
|
709
507
|
private showIndicatorSettings;
|
|
710
|
-
private refreshObjects;
|
|
711
|
-
private handleAddCompare;
|
|
712
|
-
/** What is compared with the chart's symbol now, as the compare dialog lists it. */
|
|
713
|
-
private comparedNow;
|
|
714
|
-
/** The compare dialog's list, after something was compared or taken off. */
|
|
715
|
-
private refreshCompareDialog;
|
|
716
508
|
/**
|
|
717
509
|
* Compare with another symbol: its percent change on the price scale
|
|
718
510
|
* (`'percent'`, the default), its price on a scale of its own (`'scale'`)
|
|
@@ -723,100 +515,8 @@ export declare class ChartWidget {
|
|
|
723
515
|
* no bars at the chart's interval, nothing is added and a toast says why.
|
|
724
516
|
*/
|
|
725
517
|
addCompareSymbol(symbol: string, way?: CompareWay): Promise<void>;
|
|
726
|
-
/**
|
|
727
|
-
* A compare that is an indicator (on its own scale or pane, a spread, a
|
|
728
|
-
* correlation), its bars first, as the percent way does. A symbol the feed
|
|
729
|
-
* can't serve at this interval then adds nothing, rather than an empty
|
|
730
|
-
* line that stays in the chart's saves. The bars go to the chart before
|
|
731
|
-
* the indicator, so it finds them there and asks for none.
|
|
732
|
-
*/
|
|
733
|
-
private addCompareIndicator;
|
|
734
|
-
/**
|
|
735
|
-
* The other symbol's bars at the chart's interval, for a compare about to
|
|
736
|
-
* be added: fetched again when the interval changed while they loaded, so
|
|
737
|
-
* they are checked, and added, at the one on screen. Null, with a toast,
|
|
738
|
-
* when they fail or there are none.
|
|
739
|
-
*/
|
|
740
|
-
private fetchCompareBars;
|
|
741
|
-
/** The other symbol's bars didn't come: the adapter's reason, or that they failed. */
|
|
742
|
-
private sayCompareFailed;
|
|
743
|
-
/** Take a compare off, an overlay or an indicator, as the compare dialog and Objects do. */
|
|
744
|
-
private removeCompared;
|
|
745
|
-
private handleRemoveCompare;
|
|
746
|
-
/** A compare line the host added on the chart itself: the widget holds no scale nor list for it. */
|
|
747
|
-
private removeHostCompare;
|
|
748
|
-
/** `id` is a symbol compared in percent (a line, not an indicator). */
|
|
749
|
-
private isPercentCompare;
|
|
750
|
-
/**
|
|
751
|
-
* How many bars of another symbol to fetch: as many as the chart has (it
|
|
752
|
-
* may have paged older ones in), so a compare starts where the chart does.
|
|
753
|
-
*/
|
|
754
|
-
private compareDepth;
|
|
755
|
-
/**
|
|
756
|
-
* Percent compares hold a regular price scale in percent: the user's has
|
|
757
|
-
* not been picked meanwhile, and the chart draws their lines (Renko, Kagi
|
|
758
|
-
* and the like draw none).
|
|
759
|
-
*/
|
|
760
|
-
private holdsPercentScale;
|
|
761
|
-
/**
|
|
762
|
-
* The scale on screen: the user's, or percent while percent compares hold a
|
|
763
|
-
* regular one. Logarithmic, percentage and indexed to 100 are left alone: a
|
|
764
|
-
* log scale draws the compare lines true, and the other two read them right.
|
|
765
|
-
*/
|
|
766
|
-
private effectiveScaleMode;
|
|
767
|
-
/** The scale the user picked, for a shared link, a layout and the settings: never the percent a compare holds. */
|
|
768
|
-
private userScaleMode;
|
|
769
|
-
/** The settings as the dialog shows them: the scale on screen. */
|
|
770
|
-
private shownSettings;
|
|
771
|
-
/** Put the chart's price scale on the one it should show now. */
|
|
772
|
-
private showScaleMode;
|
|
773
|
-
/** The first percent compare holds the scale in percent; the last one gone lets it go. */
|
|
774
|
-
private holdCompareScale;
|
|
775
|
-
/** The scale a hold of percent compares puts on screen, in the status bar and in the settings. */
|
|
776
|
-
private showHeldScale;
|
|
777
|
-
/**
|
|
778
|
-
* Bars of a symbol the chart's indicators read (a compare on its own
|
|
779
|
-
* scale, a spread), at the chart's interval. A later interval wins.
|
|
780
|
-
*/
|
|
781
|
-
private loadSymbolSeries;
|
|
782
|
-
/** Refetch every comparison overlay at the current symbol/timeframe. */
|
|
783
|
-
private refetchCompares;
|
|
784
|
-
/** Each percent compare's bars again, as deep as the chart's, at its interval. The latest round wins. */
|
|
785
|
-
private refetchPercentCompares;
|
|
786
|
-
/**
|
|
787
|
-
* Older bars in: each percent compare's older stretch, so its line starts
|
|
788
|
-
* where the chart does. One round at a time: pages that load meanwhile
|
|
789
|
-
* get one more round, for what is missing by then.
|
|
790
|
-
*/
|
|
791
|
-
private extendPercentCompares;
|
|
792
|
-
/**
|
|
793
|
-
* Each percent compare's bars before its first, as many as the chart has
|
|
794
|
-
* before it; from a feed that can't page back, its bars again, as deep as
|
|
795
|
-
* the chart's. A round of full fetches meanwhile (a new interval) drops them.
|
|
796
|
-
*/
|
|
797
|
-
private fetchOlderCompares;
|
|
798
|
-
/**
|
|
799
|
-
* A percent compare's bars fetched again `depth` deep, from a feed that
|
|
800
|
-
* can't page back. Fewer than asked, or none older than `first`: the
|
|
801
|
-
* feed's history starts there, and no page asks again.
|
|
802
|
-
*/
|
|
803
|
-
private deepenCompareBars;
|
|
804
|
-
/** A percent compare's older bars in front of its own; none older: the feed's history starts there. */
|
|
805
|
-
private prependCompareBars;
|
|
806
|
-
/** A percent compare's line on new bars at `timeframe`, which may reach further back again. */
|
|
807
|
-
private setCompareBars;
|
|
808
|
-
/** A percent compare's bars at `timeframe` didn't come: it keeps the ones it has. */
|
|
809
|
-
private compareFailedAt;
|
|
810
|
-
private refreshAlerts;
|
|
811
518
|
/** The prices the panels show, written again in the decimals the chart has now. */
|
|
812
519
|
private refreshPriceTexts;
|
|
813
|
-
private alertListItem;
|
|
814
|
-
/** An alert in words, for a toast or a notification: "Price crossing EMA 20", "RSI greater than 70". */
|
|
815
|
-
private alertText;
|
|
816
|
-
/** Price + every active indicator line, as selectable alert sources. */
|
|
817
|
-
private buildAlertSources;
|
|
818
|
-
/** Latest value for an alert source channel (price or indicator line). */
|
|
819
|
-
private getAlertChannelValue;
|
|
820
520
|
/**
|
|
821
521
|
* Money in the quote's units (a stop's risk, an order's value), in the
|
|
822
522
|
* number locale: to the decimals of the price step, two at most (a forex
|
|
@@ -853,10 +553,6 @@ export declare class ChartWidget {
|
|
|
853
553
|
/** "Save as default": new indicators of the kind start like this one, here and next time. */
|
|
854
554
|
private saveIndicatorDefault;
|
|
855
555
|
private handleRemoveIndicator;
|
|
856
|
-
private toggleCommandPalette;
|
|
857
|
-
private buildCommandItems;
|
|
858
|
-
/** Whether the widget has what a command works on: a watchlist, a feed to compare from, layouts to save to. */
|
|
859
|
-
private commandThere;
|
|
860
556
|
/**
|
|
861
557
|
* `keys` as a command's shortcut, where they work: their switch on (and
|
|
862
558
|
* what they need there), and no shortcut of the host's on them instead.
|
|
@@ -864,17 +560,6 @@ export declare class ChartWidget {
|
|
|
864
560
|
private keysShown;
|
|
865
561
|
/** The shortcut sheet: the keys switched on, and the host's. */
|
|
866
562
|
private openHotkeySheet;
|
|
867
|
-
/** Whether a command's switch (when it has one) is on. */
|
|
868
|
-
private commandOn;
|
|
869
|
-
/**
|
|
870
|
-
* The trash button's menu: the drawings, the indicators, or both, each with
|
|
871
|
-
* how many would go (locked drawings stay). Nothing to remove, no menu; a
|
|
872
|
-
* second press closes it.
|
|
873
|
-
*/
|
|
874
|
-
private openClearMenu;
|
|
875
|
-
/** Remove the drawings, the indicators or both, as one undo step, and leave any drawing tool. */
|
|
876
|
-
private removeAll;
|
|
877
|
-
private handleAction;
|
|
878
563
|
private handleDrawingTool;
|
|
879
564
|
/** The cursor button: no tool, no eraser, no zoom box. */
|
|
880
565
|
private handleCancelDrawing;
|
|
@@ -882,8 +567,6 @@ export declare class ChartWidget {
|
|
|
882
567
|
/** The magnet button goes off → weak → strong → off. */
|
|
883
568
|
private handleToggleMagnet;
|
|
884
569
|
private handleToggleTheme;
|
|
885
|
-
private openSettings;
|
|
886
|
-
private showSettings;
|
|
887
570
|
/** A dialog's code, loaded the first time it opens; a failed load says so. */
|
|
888
571
|
private lazyPart;
|
|
889
572
|
/**
|
|
@@ -892,20 +575,10 @@ export declare class ChartWidget {
|
|
|
892
575
|
* one opens it (another indicator's settings, another tab), once.
|
|
893
576
|
*/
|
|
894
577
|
private whenLoaded;
|
|
578
|
+
/** A toggle pressed again while its dialog's code loads: the dialog no longer opens. Whether one was waiting. */
|
|
579
|
+
private cancelWaiting;
|
|
895
580
|
/** The whole series in view, the price scale fitted to it (the menus' Reset, Alt+R). */
|
|
896
581
|
private resetView;
|
|
897
|
-
/** The settings closed: OK keeps what they changed as one undo step, Cancel puts it back as it was on opening. */
|
|
898
|
-
private endSettingsEdit;
|
|
899
|
-
/**
|
|
900
|
-
* The keys a change touched: in the open settings, what Cancel and the
|
|
901
|
-
* undo step go by (and what OK takes from a link); outside them, a link's
|
|
902
|
-
* no more.
|
|
903
|
-
*/
|
|
904
|
-
private touchSettings;
|
|
905
|
-
/** A chart template in place of the chart's look: its switches, and its colours over the theme's. */
|
|
906
|
-
private applyChartTemplate;
|
|
907
|
-
/** Save the chart's look as a template, asking for its name over the open settings. */
|
|
908
|
-
private promptSaveChartTemplate;
|
|
909
582
|
/**
|
|
910
583
|
* Show a transient toast inside the widget. Auto-dismisses after 3.5s.
|
|
911
584
|
* Used by the drag-drop importer for success / failure feedback, but
|
|
@@ -952,38 +625,12 @@ export declare class ChartWidget {
|
|
|
952
625
|
* safe to give back right after the constructor.
|
|
953
626
|
*/
|
|
954
627
|
setSettings(patch: Partial<ChartSettingsState>): void;
|
|
955
|
-
/**
|
|
956
|
-
* A patch without auto-scale off while the chart has no bars. Off holds the
|
|
957
|
-
* price range on screen; before the first bars there is none, and the chart
|
|
958
|
-
* would keep its empty 0 to 1 for every series after them.
|
|
959
|
-
*/
|
|
960
|
-
private withoutEarlyFreeze;
|
|
961
628
|
/**
|
|
962
629
|
* Hear of each change to the Chart Settings, with `getSettings()`: once
|
|
963
630
|
* when the settings dialog closes with OK, never for Cancel or for a
|
|
964
631
|
* change that leaves them as they were. Returns the function that stops it.
|
|
965
632
|
*/
|
|
966
633
|
onSettingsChange(listener: (settings: ChartSettingsState) => void): () => void;
|
|
967
|
-
/**
|
|
968
|
-
* The settings the chart says itself, over the widget's: what a host set
|
|
969
|
-
* on `getChart()` directly, a scale a drag or a switched-off feature
|
|
970
|
-
* changed, a type's own settings a layout brought. The scale is the
|
|
971
|
-
* user's, never the percent a compare holds.
|
|
972
|
-
*/
|
|
973
|
-
private syncSettingsFromChart;
|
|
974
|
-
/**
|
|
975
|
-
* A patch without what the host's features switched off: a bar countdown,
|
|
976
|
-
* a legend, a volume or a log scale that isn't there stays off. Keys given
|
|
977
|
-
* no value are left out too.
|
|
978
|
-
*/
|
|
979
|
-
private allowedSettings;
|
|
980
|
-
/** The settings the user kept in this browser (`persistSettings`) back on the chart; from here on each change is kept and told. */
|
|
981
|
-
private restoreKeptSettings;
|
|
982
|
-
/** Once telling has begun, the settings as they are now count as told: the next change is measured from them. */
|
|
983
|
-
private markSettingsTold;
|
|
984
|
-
/** The settings changed: kept (`persistSettings`) and told to the listeners, unless they are as last time. */
|
|
985
|
-
private publishSettings;
|
|
986
|
-
private setupLayouts;
|
|
987
634
|
/** Save into the open layout, or ask for a name when there is none. */
|
|
988
635
|
saveLayout(): Promise<void>;
|
|
989
636
|
/** Open a saved layout by id; `false` when it could not be. */
|
|
@@ -993,8 +640,6 @@ export declare class ChartWidget {
|
|
|
993
640
|
* Useful as an "Reset layout" command in user-facing menus.
|
|
994
641
|
*/
|
|
995
642
|
clearSavedLayout(symbol?: string): void;
|
|
996
|
-
private applySymbolLayout;
|
|
997
|
-
private flushActiveLayout;
|
|
998
643
|
/** Rebuild the chip strip from the chart's indicator instances. */
|
|
999
644
|
private syncIndicatorsFromChart;
|
|
1000
645
|
/** Open the indicators dialog, or close it when it is open. */
|
|
@@ -1009,170 +654,47 @@ export declare class ChartWidget {
|
|
|
1009
654
|
private templateNames;
|
|
1010
655
|
/** Open (or close) bar replay with its scrubber — what the toolbar's Replay button does. */
|
|
1011
656
|
toggleReplay(): void;
|
|
1012
|
-
/**
|
|
1013
|
-
* Open replay in "pick a start bar" mode: the bars right of the pointer
|
|
1014
|
-
* are shaded, and a click cuts the chart there and waits paused. Play
|
|
1015
|
-
* starts from a default point; "random bar" picks one.
|
|
1016
|
-
*/
|
|
1017
|
-
private enterReplay;
|
|
1018
|
-
/** While picking the start bar: the shade over the bars a pick would hide. */
|
|
1019
|
-
private showReplayShade;
|
|
1020
|
-
private removeReplayShade;
|
|
1021
|
-
/**
|
|
1022
|
-
* Select bar, inside the replay: it pauses and picks again among the bars
|
|
1023
|
-
* shown, so the bars still to come stay hidden, the view stays and grid
|
|
1024
|
-
* followers go on. Cancel (or Esc) comes back to the same place.
|
|
1025
|
-
*/
|
|
1026
|
-
private pickReplayBarAgain;
|
|
1027
|
-
/** Cancel picking: back to the replay when there is one, else out of it. */
|
|
1028
|
-
private cancelReplayPick;
|
|
1029
|
-
/**
|
|
1030
|
-
* Where the bar sits: on the main pane's foot (bottom panes stay
|
|
1031
|
-
* readable), centred on its plot, in the tier its width allows; and how
|
|
1032
|
-
* high it reaches, for the toasts and the drawing button to clear it.
|
|
1033
|
-
*/
|
|
1034
|
-
private layoutReplayBar;
|
|
1035
|
-
/**
|
|
1036
|
-
* How high the bar reaches over the widget's foot and its body's, for the
|
|
1037
|
-
* toasts and the drawing button to clear it. Also run as the panel follows
|
|
1038
|
-
* the chart: the bar's height changes with its rows and its words.
|
|
1039
|
-
*/
|
|
1040
|
-
private liftOverReplayBar;
|
|
1041
|
-
/** Where the plot starts in the body, for the phone's drawing button to sit over it. */
|
|
1042
|
-
private placeDrawingButton;
|
|
1043
|
-
private bodyEl;
|
|
1044
|
-
/**
|
|
1045
|
-
* Where the replay is, as the readout says it: the step's open time in
|
|
1046
|
-
* the display timezone and the widget's language; the date alone on a
|
|
1047
|
-
* daily chart and above, seconds under a minute (or with no interval),
|
|
1048
|
-
* the year only when it isn't this one.
|
|
1049
|
-
*/
|
|
1050
|
-
private replayTimeText;
|
|
1051
|
-
/** The chart's bars the replay goes through (not its steps), or those loaded before it starts. */
|
|
1052
|
-
private replayBarCount;
|
|
1053
|
-
private readonly hideReplayShade;
|
|
1054
657
|
/**
|
|
1055
658
|
* Open replay (if it isn't open) and start it at bar `index` — paused, or
|
|
1056
659
|
* playing when `play` is set — skipping the pick-a-bar step.
|
|
1057
660
|
*/
|
|
1058
661
|
replayFrom(index: number, play?: boolean): void;
|
|
1059
|
-
/**
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
private
|
|
1064
|
-
/** The interval changed: the step menu offers its steps. */
|
|
1065
|
-
private refreshReplaySteps;
|
|
1066
|
-
/**
|
|
1067
|
-
* The replay went on over new bars at the same time: the panel shows their
|
|
1068
|
-
* total, and a replay in finer steps fetches them for the new bars and
|
|
1069
|
-
* goes on from the bar it is on.
|
|
1070
|
-
*/
|
|
1071
|
-
private afterReplayCarryOver;
|
|
1072
|
-
/**
|
|
1073
|
-
* A bar picked while the next bars loaded: once they are in, start the replay at the bar
|
|
1074
|
-
* holding its time; let it go if they failed or the pick was left.
|
|
1075
|
-
*/
|
|
1076
|
-
private startPickedReplay;
|
|
1077
|
-
/** Whether the bars on screen are about to be replaced: a new symbol's or interval's on their way. */
|
|
1078
|
-
private seriesPending;
|
|
1079
|
-
/** The panel follows the chart, and whether the bars are on their way, a few times a second. */
|
|
1080
|
-
private watchReplayBar;
|
|
1081
|
-
/**
|
|
1082
|
-
* Cut the chart at `index` and wait paused (or play at once). `ofBars`:
|
|
1083
|
-
* `index` is one of the chart's bars (a pick), not a step of the replay.
|
|
1084
|
-
*/
|
|
1085
|
-
private startReplayAt;
|
|
1086
|
-
private replayStepsKeyNow;
|
|
1087
|
-
/** How many steps of `tf` make a bar of the chart (1 for whole bars, or a chart without an interval). */
|
|
1088
|
-
private replayStepsPerBar;
|
|
1089
|
-
/** Finer intervals a replay can step through: they divide the chart's, and the feed (or the bars loaded) has them. */
|
|
1090
|
-
private replayStepOptions;
|
|
1091
|
-
/** Whether the feed serves `tf`, or the bars loaded build it. */
|
|
1092
|
-
private hasReplayStep;
|
|
1093
|
-
/** The finer interval the step picked stands for (`'auto'` worked out here); null for whole bars. */
|
|
1094
|
-
private replayStepInterval;
|
|
1095
|
-
/**
|
|
1096
|
-
* Whether the chart fetches a replay's finer bars itself: its bars form, a
|
|
1097
|
-
* step is picked and the feed pages back. A feed that can't page back gets
|
|
1098
|
-
* its finer bars fetched here, in one request, as before.
|
|
1099
|
-
*/
|
|
1100
|
-
private chartFetchesReplaySteps;
|
|
1101
|
-
/** The finer bars for a replay in `tf` steps: from the feed, or built from the bars loaded. Null when there are none. */
|
|
1102
|
-
private replayStepsFor;
|
|
1103
|
-
/**
|
|
1104
|
-
* The zone the feed's wrapper builds `tf` in for `symbol` ('' when the feed
|
|
1105
|
-
* serves it): after no answer about the symbol it builds on UTC's days
|
|
1106
|
-
* until the chart loads the symbol afresh, so steps fetched before then
|
|
1107
|
-
* are stale after it.
|
|
1108
|
-
*/
|
|
1109
|
-
private builtStepsZone;
|
|
1110
|
-
/** Bars available to replay: the whole series, not the slice on screen. */
|
|
1111
|
-
private replayTotal;
|
|
1112
|
-
/** Mirror the replay engine in the bar; close it if the session ended elsewhere. */
|
|
1113
|
-
private syncReplayBar;
|
|
1114
|
-
private stepReplay;
|
|
1115
|
-
/**
|
|
1116
|
-
* Replay shortcuts: Shift+←/→ step one bar, Space on the chart plays or
|
|
1117
|
-
* pauses, Escape cancels picking a start bar. Only for the widget used
|
|
1118
|
-
* last, with focus in it (or nowhere), not while typing or in a dialog.
|
|
1119
|
-
*/
|
|
1120
|
-
private handleReplayKey;
|
|
1121
|
-
/** Focus on the chart itself (its container or the canvas in it), not on a control over it. */
|
|
1122
|
-
private onChartSurface;
|
|
1123
|
-
private toggleReplayPlay;
|
|
1124
|
-
private replayBarAtEnd;
|
|
1125
|
-
private positionReplayShade;
|
|
1126
|
-
/** Leave replay and return to the live series (with updates that arrived meanwhile). */
|
|
1127
|
-
private exitReplay;
|
|
1128
|
-
private teardownReplayUi;
|
|
1129
|
-
/**
|
|
1130
|
-
* Focus was in the bar: back to the toolbar's Bar replay button, or the
|
|
1131
|
-
* "more" menu that folds it on a narrow toolbar, or the chart.
|
|
1132
|
-
*/
|
|
1133
|
-
private focusAfterReplay;
|
|
1134
|
-
/** `told` false leaves the change unkept and untold (a link's). */
|
|
1135
|
-
private applySettings;
|
|
1136
|
-
private resetSettings;
|
|
1137
|
-
/**
|
|
1138
|
-
* A change to the look in the settings: style keys on the user's layer (null
|
|
1139
|
-
* takes one away), kept with the theme they were picked on, and in the
|
|
1140
|
-
* chart's undo history. A burst on the same keys (a colour dragged across
|
|
1141
|
-
* the picker) is one step.
|
|
1142
|
-
*/
|
|
1143
|
-
private changeStyle;
|
|
1144
|
-
/**
|
|
1145
|
-
* A settings change the user made: applied, and put in the chart's undo
|
|
1146
|
-
* history with its drawings and indicators. A burst on the same settings
|
|
1147
|
-
* (a colour dragged across the picker) is one step.
|
|
1148
|
-
*/
|
|
1149
|
-
private changeSettings;
|
|
1150
|
-
/**
|
|
1151
|
-
* The user's overrides on `keys` (null: none set), with the theme they go
|
|
1152
|
-
* with: what an undo of the look puts back.
|
|
1153
|
-
*/
|
|
1154
|
-
private settingsStyle;
|
|
1155
|
-
/**
|
|
1156
|
-
* Settings back as they were (an undo or redo), shown in the settings if
|
|
1157
|
-
* they're open; `held` puts back whether percent compares held the scale.
|
|
1158
|
-
*/
|
|
1159
|
-
private restoreSettings;
|
|
662
|
+
/** What the replay reads of the widget and asks of it. */
|
|
663
|
+
private replayHost;
|
|
664
|
+
/** Where the plot starts in the body, for the phone's drawing button to sit over it. */
|
|
665
|
+
private placeDrawingButton;
|
|
666
|
+
private bodyEl;
|
|
1160
667
|
private connectStream;
|
|
1161
|
-
/** Redraw the on-chart indicator list on the next frame (coalesced). */
|
|
1162
|
-
private scheduleLegend;
|
|
1163
|
-
private renderLegend;
|
|
1164
|
-
/** A pane's button on the chart. */
|
|
1165
|
-
private runPaneAction;
|
|
1166
|
-
/**
|
|
1167
|
-
* An indicator's "more" menu: into the pane above or below it (the price
|
|
1168
|
-
* pane at the top), a pane of its own, back to the price pane; then its
|
|
1169
|
-
* settings and remove.
|
|
1170
|
-
*/
|
|
1171
|
-
private openLegendMenu;
|
|
1172
668
|
private updateUI;
|
|
669
|
+
/** Mark `role` open or closed; the toolbar's effect shows it. */
|
|
670
|
+
private markOpen;
|
|
1173
671
|
private resolveIsDark;
|
|
1174
672
|
private resolveTheme;
|
|
1175
673
|
private isColorDark;
|
|
674
|
+
/** What WidgetCompares reads of the widget and asks of it. */
|
|
675
|
+
private comparingHost;
|
|
676
|
+
/** What WidgetWatchlists reads of the widget and asks of it. */
|
|
677
|
+
private watchingHost;
|
|
678
|
+
/** What WidgetAlerts reads of the widget and asks of it. */
|
|
679
|
+
private alertingHost;
|
|
680
|
+
/** What WidgetTrading reads of the widget and asks of it. */
|
|
681
|
+
private tradingHost;
|
|
682
|
+
/** What WidgetMenus reads of the widget and asks of it. */
|
|
683
|
+
private menusHost;
|
|
684
|
+
/** What WidgetLegendView reads of the widget and asks of it. */
|
|
685
|
+
private legendHost;
|
|
686
|
+
/** What WidgetCommands reads of the widget and asks of it. */
|
|
687
|
+
private commandsHost;
|
|
688
|
+
/** What WidgetLayouts reads of the widget and asks of it. */
|
|
689
|
+
private layoutsHost;
|
|
690
|
+
/** What WidgetDockArea reads of the widget and asks of it. */
|
|
691
|
+
private dockingHost;
|
|
692
|
+
/** What WidgetChartSettings reads of the widget and asks of it. */
|
|
693
|
+
private chartSettingsHost;
|
|
694
|
+
/** What WidgetDrawingEdit reads of the widget and asks of it. */
|
|
695
|
+
private drawingEditHost;
|
|
696
|
+
/** What WidgetIntervals reads of the widget and asks of it. */
|
|
697
|
+
private intervalsHost;
|
|
1176
698
|
}
|
|
1177
699
|
export { indicatorChipLabel };
|
|
1178
700
|
type ActiveIndicator = ReturnType<Chart['getActiveIndicators']>[number];
|