@forgecharts/sdk 1.1.30 → 1.1.32
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/react/canvas/ChartCanvas.d.ts +8 -0
- package/dist/react/canvas/ChartCanvas.d.ts.map +1 -1
- package/dist/react/canvas/toolbars/LeftToolbar.d.ts +8 -1
- package/dist/react/canvas/toolbars/LeftToolbar.d.ts.map +1 -1
- package/dist/react/index.js +134 -18
- package/dist/react/index.js.map +1 -1
- package/dist/react/internal.js +7473 -4431
- package/dist/react/internal.js.map +1 -1
- package/dist/react/shell/ManagedAppShell.d.ts +8 -0
- package/dist/react/shell/ManagedAppShell.d.ts.map +1 -1
- package/dist/react/shell/OrderEntryPanel.d.ts +24 -0
- package/dist/react/shell/OrderEntryPanel.d.ts.map +1 -0
- package/dist/react/shell/ScriptDrawer.d.ts +7 -0
- package/dist/react/shell/ScriptDrawer.d.ts.map +1 -0
- package/dist/react/shell/TradeDrawer.d.ts +22 -0
- package/dist/react/shell/TradeDrawer.d.ts.map +1 -0
- package/dist/react/shell/WatchlistDrawer.d.ts +8 -0
- package/dist/react/shell/WatchlistDrawer.d.ts.map +1 -0
- package/dist/react/shell/useWatchlistQuotes.d.ts +6 -0
- package/dist/react/shell/useWatchlistQuotes.d.ts.map +1 -0
- package/dist/react/shell/watchlistApi.d.ts +38 -0
- package/dist/react/shell/watchlistApi.d.ts.map +1 -0
- package/dist/react/workspace/ChartWorkspace.d.ts +4 -1
- package/dist/react/workspace/ChartWorkspace.d.ts.map +1 -1
- package/dist/react/workspace/toolbars/RightToolbar.d.ts +4 -1
- package/dist/react/workspace/toolbars/RightToolbar.d.ts.map +1 -1
- package/dist/react/workspace/toolbars/TopToolbar.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -62,6 +62,14 @@ export type ChartCanvasProps = {
|
|
|
62
62
|
* If omitted, no exchange logo is rendered.
|
|
63
63
|
*/
|
|
64
64
|
getExchangeLogoUrl?: (exchange: string) => string | null | undefined;
|
|
65
|
+
/** Called when the user clicks the logout button in the left toolbar. */
|
|
66
|
+
onLogout?: () => void;
|
|
67
|
+
/** Optional user info displayed in the profile drawer. */
|
|
68
|
+
user?: {
|
|
69
|
+
email?: string;
|
|
70
|
+
username?: string;
|
|
71
|
+
role?: string;
|
|
72
|
+
};
|
|
65
73
|
/**
|
|
66
74
|
* Optional trading bridge callbacks for Unmanaged mode.
|
|
67
75
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartCanvas.d.ts","sourceRoot":"","sources":["../../../src/react/canvas/ChartCanvas.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAElD,OAAO,KAAK,EAAyB,eAAe,EAAkC,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9H,OAAO,KAAK,EAAE,SAAS,EAAa,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AA0OvE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,6EAA6E;IAC7E,iBAAiB,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;IAC5C,kEAAkE;IAClE,kBAAkB,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAClD,8DAA8D;IAC9D,YAAY,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,MAAM,GAAG,IAAI,CAAC;IACzD,yDAAyD;IACzD,iBAAiB,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAChD;;;;OAIG;IACH,eAAe,EAAE,MAAM,mBAAmB,GAAG,IAAI,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,SAA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OAUG;IACH,aAAa,CAAC,EAAE,sBAAsB,CAAC;CACxC,CAAC;AAEF,uCAAuC;AACvC,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AACnD,wCAAwC;AACxC,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AAErD,eAAO,MAAM,WAAW,gHA8qBtB,CAAC;AAEH,kCAAkC;AAClC,eAAO,MAAM,cAAc,gHAAc,CAAC"}
|
|
@@ -13,7 +13,14 @@ type Props = {
|
|
|
13
13
|
onVisibilityDeactivate?: () => void;
|
|
14
14
|
onLinkClick?: () => void;
|
|
15
15
|
onDeleteClick?: () => void;
|
|
16
|
+
onLogout?: () => void;
|
|
17
|
+
/** Optional user info shown in the profile drawer. */
|
|
18
|
+
user?: {
|
|
19
|
+
email?: string;
|
|
20
|
+
username?: string;
|
|
21
|
+
role?: string;
|
|
22
|
+
};
|
|
16
23
|
};
|
|
17
|
-
export declare function LeftToolbar({ activeTool, onSelectTool, drawingFavorites, onDrawingFavoritesChange, onVisibilityAction, visibilityActiveAction, onVisibilityDeactivate, onLinkClick, onDeleteClick }: Props): React.ReactElement;
|
|
24
|
+
export declare function LeftToolbar({ activeTool, onSelectTool, drawingFavorites, onDrawingFavoritesChange, onVisibilityAction, visibilityActiveAction, onVisibilityDeactivate, onLinkClick, onDeleteClick, onLogout, user }: Props): React.ReactElement;
|
|
18
25
|
export {};
|
|
19
26
|
//# sourceMappingURL=LeftToolbar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeftToolbar.d.ts","sourceRoot":"","sources":["../../../../src/react/canvas/toolbars/LeftToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,KAAK,EAAE,eAAe,EAAgC,MAAM,WAAW,CAAC;AAs3B/E,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,gBAAgB,GAAG,eAAe,GAAG,SAAS,CAAC;AAsF/F,KAAK,KAA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AW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,sDAAsD;IACtD,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7D,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CAwL/O"}
|
package/dist/react/index.js
CHANGED
|
@@ -8420,8 +8420,9 @@ function VisibilityTool({
|
|
|
8420
8420
|
)) })
|
|
8421
8421
|
] });
|
|
8422
8422
|
}
|
|
8423
|
-
function LeftToolbar({ activeTool, onSelectTool, drawingFavorites, onDrawingFavoritesChange, onVisibilityAction, visibilityActiveAction, onVisibilityDeactivate, onLinkClick, onDeleteClick }) {
|
|
8423
|
+
function LeftToolbar({ activeTool, onSelectTool, drawingFavorites, onDrawingFavoritesChange, onVisibilityAction, visibilityActiveAction, onVisibilityDeactivate, onLinkClick, onDeleteClick, onLogout, user }) {
|
|
8424
8424
|
const [favorites, setFavorites] = useState(drawingFavorites ?? []);
|
|
8425
|
+
const [profileOpen, setProfileOpen] = useState(false);
|
|
8425
8426
|
const handleFavoritesChange = (favs) => {
|
|
8426
8427
|
setFavorites(favs);
|
|
8427
8428
|
onDrawingFavoritesChange?.(favs);
|
|
@@ -8440,7 +8441,8 @@ function LeftToolbar({ activeTool, onSelectTool, drawingFavorites, onDrawingFavo
|
|
|
8440
8441
|
borderRadius: 8,
|
|
8441
8442
|
width: 40,
|
|
8442
8443
|
flexShrink: 0,
|
|
8443
|
-
userSelect: "none"
|
|
8444
|
+
userSelect: "none",
|
|
8445
|
+
height: "100%"
|
|
8444
8446
|
},
|
|
8445
8447
|
children: [
|
|
8446
8448
|
/* @__PURE__ */ jsx(PointerGroup, { activeTool, onSelectTool }),
|
|
@@ -8521,6 +8523,29 @@ function LeftToolbar({ activeTool, onSelectTool, drawingFavorites, onDrawingFavo
|
|
|
8521
8523
|
/* @__PURE__ */ jsx("line", { x1: "9", y1: "6.5", x2: "9", y2: "11.5" })
|
|
8522
8524
|
] })
|
|
8523
8525
|
}
|
|
8526
|
+
),
|
|
8527
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
8528
|
+
(user || onLogout) && /* @__PURE__ */ jsx(
|
|
8529
|
+
"button",
|
|
8530
|
+
{
|
|
8531
|
+
className: "drawing-tool-btn profile-avatar-btn",
|
|
8532
|
+
title: "Profile",
|
|
8533
|
+
onClick: () => setProfileOpen(true),
|
|
8534
|
+
children: (user?.username?.[0] ?? user?.email?.[0] ?? "?").toUpperCase()
|
|
8535
|
+
}
|
|
8536
|
+
),
|
|
8537
|
+
onLogout && /* @__PURE__ */ jsx(
|
|
8538
|
+
"button",
|
|
8539
|
+
{
|
|
8540
|
+
className: "drawing-tool-btn",
|
|
8541
|
+
title: "Log out",
|
|
8542
|
+
onClick: onLogout,
|
|
8543
|
+
children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", width: "15", height: "15", stroke: "currentColor", fill: "none", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
8544
|
+
/* @__PURE__ */ jsx("path", { d: "M6 2H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h3" }),
|
|
8545
|
+
/* @__PURE__ */ jsx("polyline", { points: "11 11 14 8 11 5" }),
|
|
8546
|
+
/* @__PURE__ */ jsx("line", { x1: "14", y1: "8", x2: "6", y2: "8" })
|
|
8547
|
+
] })
|
|
8548
|
+
}
|
|
8524
8549
|
)
|
|
8525
8550
|
]
|
|
8526
8551
|
}
|
|
@@ -8532,6 +8557,49 @@ function LeftToolbar({ activeTool, onSelectTool, drawingFavorites, onDrawingFavo
|
|
|
8532
8557
|
activeTool,
|
|
8533
8558
|
onSelectTool
|
|
8534
8559
|
}
|
|
8560
|
+
),
|
|
8561
|
+
profileOpen && ReactDOM.createPortal(
|
|
8562
|
+
/* @__PURE__ */ jsx("div", { className: "profile-drawer-overlay", onClick: () => setProfileOpen(false), children: /* @__PURE__ */ jsxs("div", { className: "profile-drawer", onClick: (e) => e.stopPropagation(), children: [
|
|
8563
|
+
/* @__PURE__ */ jsxs("div", { className: "profile-drawer-header", children: [
|
|
8564
|
+
/* @__PURE__ */ jsx("span", { children: "Profile" }),
|
|
8565
|
+
/* @__PURE__ */ jsx(
|
|
8566
|
+
"button",
|
|
8567
|
+
{
|
|
8568
|
+
className: "profile-drawer-close-btn",
|
|
8569
|
+
onClick: () => setProfileOpen(false),
|
|
8570
|
+
title: "Close",
|
|
8571
|
+
children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 14 14", width: "12", height: "12", stroke: "currentColor", fill: "none", strokeWidth: "2", strokeLinecap: "round", children: [
|
|
8572
|
+
/* @__PURE__ */ jsx("line", { x1: "2", y1: "2", x2: "12", y2: "12" }),
|
|
8573
|
+
/* @__PURE__ */ jsx("line", { x1: "12", y1: "2", x2: "2", y2: "12" })
|
|
8574
|
+
] })
|
|
8575
|
+
}
|
|
8576
|
+
)
|
|
8577
|
+
] }),
|
|
8578
|
+
/* @__PURE__ */ jsx("div", { className: "profile-drawer-avatar", children: (user?.username?.[0] ?? user?.email?.[0] ?? "?").toUpperCase() }),
|
|
8579
|
+
user?.username && /* @__PURE__ */ jsx("div", { className: "profile-drawer-name", children: user.username }),
|
|
8580
|
+
user?.email && /* @__PURE__ */ jsx("div", { className: "profile-drawer-email", children: user.email }),
|
|
8581
|
+
user?.role && /* @__PURE__ */ jsx("div", { className: "profile-drawer-role", children: /* @__PURE__ */ jsx("span", { className: "profile-drawer-role-badge", children: user.role }) }),
|
|
8582
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
8583
|
+
onLogout && /* @__PURE__ */ jsx("div", { className: "profile-drawer-footer", children: /* @__PURE__ */ jsxs(
|
|
8584
|
+
"button",
|
|
8585
|
+
{
|
|
8586
|
+
className: "profile-drawer-logout-btn",
|
|
8587
|
+
onClick: () => {
|
|
8588
|
+
setProfileOpen(false);
|
|
8589
|
+
onLogout();
|
|
8590
|
+
},
|
|
8591
|
+
children: [
|
|
8592
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", width: "14", height: "14", stroke: "currentColor", fill: "none", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
8593
|
+
/* @__PURE__ */ jsx("path", { d: "M6 2H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h3" }),
|
|
8594
|
+
/* @__PURE__ */ jsx("polyline", { points: "11 11 14 8 11 5" }),
|
|
8595
|
+
/* @__PURE__ */ jsx("line", { x1: "14", y1: "8", x2: "6", y2: "8" })
|
|
8596
|
+
] }),
|
|
8597
|
+
"Log out"
|
|
8598
|
+
]
|
|
8599
|
+
}
|
|
8600
|
+
) })
|
|
8601
|
+
] }) }),
|
|
8602
|
+
document.body
|
|
8535
8603
|
)
|
|
8536
8604
|
] });
|
|
8537
8605
|
}
|
|
@@ -8988,7 +9056,9 @@ var ChartCanvas = forwardRef(
|
|
|
8988
9056
|
priceFraction: priceFractionProp,
|
|
8989
9057
|
onPriceFractionChange,
|
|
8990
9058
|
getExchangeLogoUrl,
|
|
8991
|
-
tradingBridge
|
|
9059
|
+
tradingBridge,
|
|
9060
|
+
onLogout,
|
|
9061
|
+
user
|
|
8992
9062
|
}, ref) {
|
|
8993
9063
|
const outerRef = useRef(null);
|
|
8994
9064
|
const priceRef = useRef(null);
|
|
@@ -9371,7 +9441,9 @@ var ChartCanvas = forwardRef(
|
|
|
9371
9441
|
onVisibilityAction: handleVisibilityAction,
|
|
9372
9442
|
visibilityActiveAction,
|
|
9373
9443
|
onVisibilityDeactivate: handleVisibilityDeactivate,
|
|
9374
|
-
onDeleteClick: () => chartRef.current?.deleteSelectedDrawing()
|
|
9444
|
+
onDeleteClick: () => chartRef.current?.deleteSelectedDrawing(),
|
|
9445
|
+
...onLogout ? { onLogout } : {},
|
|
9446
|
+
...user ? { user } : {}
|
|
9375
9447
|
}
|
|
9376
9448
|
),
|
|
9377
9449
|
/* @__PURE__ */ jsxs(
|
|
@@ -9396,6 +9468,29 @@ var ChartCanvas = forwardRef(
|
|
|
9396
9468
|
crosshairXRef.current = null;
|
|
9397
9469
|
},
|
|
9398
9470
|
children: [
|
|
9471
|
+
/* @__PURE__ */ jsx(
|
|
9472
|
+
"div",
|
|
9473
|
+
{
|
|
9474
|
+
style: {
|
|
9475
|
+
position: "absolute",
|
|
9476
|
+
bottom: 36,
|
|
9477
|
+
left: 8,
|
|
9478
|
+
zIndex: 5,
|
|
9479
|
+
pointerEvents: "none",
|
|
9480
|
+
fontFamily: "system-ui, -apple-system, 'Segoe UI', sans-serif",
|
|
9481
|
+
fontSize: 16,
|
|
9482
|
+
fontWeight: 900,
|
|
9483
|
+
letterSpacing: "-0.03em",
|
|
9484
|
+
background: "linear-gradient(90deg, var(--text, #fff) 20%, rgba(128,128,128,0.7) 100%)",
|
|
9485
|
+
WebkitBackgroundClip: "text",
|
|
9486
|
+
WebkitTextFillColor: "transparent",
|
|
9487
|
+
backgroundClip: "text",
|
|
9488
|
+
opacity: 0.45,
|
|
9489
|
+
userSelect: "none"
|
|
9490
|
+
},
|
|
9491
|
+
children: "ForgeCharts"
|
|
9492
|
+
}
|
|
9493
|
+
),
|
|
9399
9494
|
/* @__PURE__ */ jsxs(
|
|
9400
9495
|
"div",
|
|
9401
9496
|
{
|
|
@@ -10702,8 +10797,6 @@ function TopToolbar({
|
|
|
10702
10797
|
flexShrink: 0
|
|
10703
10798
|
},
|
|
10704
10799
|
children: [
|
|
10705
|
-
/* @__PURE__ */ jsx("span", { style: { fontWeight: 700, letterSpacing: "-0.5px", color: "var(--accent)" }, children: "ForgeCharts" }),
|
|
10706
|
-
/* @__PURE__ */ jsx("div", { className: "toolbar-sep" }),
|
|
10707
10800
|
/* @__PURE__ */ jsxs(
|
|
10708
10801
|
"button",
|
|
10709
10802
|
{
|
|
@@ -10904,6 +10997,11 @@ function TopToolbar({
|
|
|
10904
10997
|
}
|
|
10905
10998
|
);
|
|
10906
10999
|
}
|
|
11000
|
+
var OrderEntryIcon = () => /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
11001
|
+
/* @__PURE__ */ jsx("rect", { x: "2", y: "2", width: "12", height: "12", rx: "1.5" }),
|
|
11002
|
+
/* @__PURE__ */ jsx("line", { x1: "5", y1: "8", x2: "11", y2: "8" }),
|
|
11003
|
+
/* @__PURE__ */ jsx("line", { x1: "8", y1: "5", x2: "8", y2: "11" })
|
|
11004
|
+
] });
|
|
10907
11005
|
var WatchListIcon = () => /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", width: "16", height: "16", stroke: "currentColor", fill: "none", strokeWidth: "1.5", children: [
|
|
10908
11006
|
/* @__PURE__ */ jsx("rect", { x: "2", y: "3", width: "12", height: "1.5", rx: "0.5", fill: "currentColor", stroke: "none" }),
|
|
10909
11007
|
/* @__PURE__ */ jsx("rect", { x: "2", y: "7", width: "9", height: "1.5", rx: "0.5", fill: "currentColor", stroke: "none" }),
|
|
@@ -10912,8 +11010,8 @@ var WatchListIcon = () => /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", wi
|
|
|
10912
11010
|
/* @__PURE__ */ jsx("line", { x1: "13", y1: "10.75", x2: "13", y2: "12.75", strokeWidth: "1.2" }),
|
|
10913
11011
|
/* @__PURE__ */ jsx("line", { x1: "12", y1: "11.75", x2: "14", y2: "11.75", strokeWidth: "1.2" })
|
|
10914
11012
|
] });
|
|
10915
|
-
function RightToolbar({ watchlistOpen, onToggleWatchlist }) {
|
|
10916
|
-
return /* @__PURE__ */
|
|
11013
|
+
function RightToolbar({ watchlistOpen, onToggleWatchlist, orderEntryOpen, onToggleOrderEntry, showOrderEntry }) {
|
|
11014
|
+
return /* @__PURE__ */ jsxs(
|
|
10917
11015
|
"div",
|
|
10918
11016
|
{
|
|
10919
11017
|
style: {
|
|
@@ -10928,15 +11026,26 @@ function RightToolbar({ watchlistOpen, onToggleWatchlist }) {
|
|
|
10928
11026
|
flexShrink: 0,
|
|
10929
11027
|
userSelect: "none"
|
|
10930
11028
|
},
|
|
10931
|
-
children:
|
|
10932
|
-
|
|
10933
|
-
|
|
10934
|
-
|
|
10935
|
-
|
|
10936
|
-
|
|
10937
|
-
|
|
10938
|
-
|
|
10939
|
-
|
|
11029
|
+
children: [
|
|
11030
|
+
showOrderEntry !== false && /* @__PURE__ */ jsx(
|
|
11031
|
+
"button",
|
|
11032
|
+
{
|
|
11033
|
+
title: "Order Entry",
|
|
11034
|
+
className: `drawing-tool-btn${orderEntryOpen ? " is-active" : ""}`,
|
|
11035
|
+
onClick: onToggleOrderEntry,
|
|
11036
|
+
children: /* @__PURE__ */ jsx(OrderEntryIcon, {})
|
|
11037
|
+
}
|
|
11038
|
+
),
|
|
11039
|
+
/* @__PURE__ */ jsx(
|
|
11040
|
+
"button",
|
|
11041
|
+
{
|
|
11042
|
+
title: "Watch List",
|
|
11043
|
+
className: `drawing-tool-btn${watchlistOpen ? " is-active" : ""}`,
|
|
11044
|
+
onClick: onToggleWatchlist,
|
|
11045
|
+
children: /* @__PURE__ */ jsx(WatchListIcon, {})
|
|
11046
|
+
}
|
|
11047
|
+
)
|
|
11048
|
+
]
|
|
10940
11049
|
}
|
|
10941
11050
|
);
|
|
10942
11051
|
}
|
|
@@ -11328,6 +11437,9 @@ function ChartWorkspace({
|
|
|
11328
11437
|
// RightToolbar
|
|
11329
11438
|
watchlistOpen,
|
|
11330
11439
|
onToggleWatchlist,
|
|
11440
|
+
orderEntryOpen,
|
|
11441
|
+
onToggleOrderEntry,
|
|
11442
|
+
showOrderEntry,
|
|
11331
11443
|
// BottomToolbar
|
|
11332
11444
|
activeSymbol,
|
|
11333
11445
|
timezone,
|
|
@@ -11446,7 +11558,11 @@ function ChartWorkspace({
|
|
|
11446
11558
|
RightToolbar,
|
|
11447
11559
|
{
|
|
11448
11560
|
watchlistOpen,
|
|
11449
|
-
onToggleWatchlist
|
|
11561
|
+
onToggleWatchlist,
|
|
11562
|
+
orderEntryOpen: orderEntryOpen ?? false,
|
|
11563
|
+
onToggleOrderEntry: onToggleOrderEntry ?? (() => {
|
|
11564
|
+
}),
|
|
11565
|
+
showOrderEntry
|
|
11450
11566
|
}
|
|
11451
11567
|
)
|
|
11452
11568
|
] }),
|