@orderly.network/trading 3.1.0-alpha.0 → 3.1.1-alpha.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.js +27 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +22 -22
package/dist/index.mjs
CHANGED
|
@@ -8329,6 +8329,13 @@ var LazyOrderBookAndTradesWidget = React12.lazy(
|
|
|
8329
8329
|
};
|
|
8330
8330
|
})
|
|
8331
8331
|
);
|
|
8332
|
+
function getClampedPanelWidth(size, minWidth, maxWidth) {
|
|
8333
|
+
const width = Number.parseFloat(size ?? "");
|
|
8334
|
+
if (!Number.isFinite(width)) {
|
|
8335
|
+
return minWidth;
|
|
8336
|
+
}
|
|
8337
|
+
return Math.min(Math.max(width, minWidth), maxWidth);
|
|
8338
|
+
}
|
|
8332
8339
|
var DesktopLayout4 = (props) => {
|
|
8333
8340
|
const {
|
|
8334
8341
|
resizeable,
|
|
@@ -8775,6 +8782,18 @@ var DesktopLayout4 = (props) => {
|
|
|
8775
8782
|
}
|
|
8776
8783
|
return tradingViewAndOrderbookView;
|
|
8777
8784
|
};
|
|
8785
|
+
const orderEntryPanelWidth = max4XL && horizontalDraggable ? getClampedPanelWidth(
|
|
8786
|
+
mainSplitSize,
|
|
8787
|
+
orderEntryMinWidth,
|
|
8788
|
+
orderEntryMaxWidth
|
|
8789
|
+
) : orderEntryMinWidth;
|
|
8790
|
+
const orderBookPanelWidth = max4XL && horizontalDraggable ? getClampedPanelWidth(
|
|
8791
|
+
orderBookSplitSize,
|
|
8792
|
+
orderbookMinWidth,
|
|
8793
|
+
orderbookMaxWidth
|
|
8794
|
+
) : orderbookMinWidth;
|
|
8795
|
+
const mainViewMinWidth = max4XL ? marketsWidth + tradingViewMinWidth + orderBookPanelWidth + space * 2 : tradingViewMinWidth + orderBookPanelWidth + space;
|
|
8796
|
+
const mainContentMinWidth = mainViewMinWidth + orderEntryPanelWidth + space + (!max4XL && marketLayout === "left" ? marketsWidth + space : 0);
|
|
8778
8797
|
const mainView = /* @__PURE__ */ jsxs(
|
|
8779
8798
|
Flex,
|
|
8780
8799
|
{
|
|
@@ -8782,7 +8801,7 @@ var DesktopLayout4 = (props) => {
|
|
|
8782
8801
|
className: "oui-flex-1 oui-overflow-hidden",
|
|
8783
8802
|
gap: 2,
|
|
8784
8803
|
style: {
|
|
8785
|
-
minWidth:
|
|
8804
|
+
minWidth: mainViewMinWidth
|
|
8786
8805
|
},
|
|
8787
8806
|
children: [
|
|
8788
8807
|
symbolInfoBarView,
|
|
@@ -9061,7 +9080,7 @@ var DesktopLayout4 = (props) => {
|
|
|
9061
9080
|
{
|
|
9062
9081
|
style: {
|
|
9063
9082
|
minHeight: minScreenHeight,
|
|
9064
|
-
minWidth: 1440 - scrollBarWidth
|
|
9083
|
+
minWidth: max4XL ? Math.max(1440 - scrollBarWidth, mainContentMinWidth + space * 2) : 1440 - scrollBarWidth
|
|
9065
9084
|
},
|
|
9066
9085
|
className: cn(
|
|
9067
9086
|
props.className,
|
|
@@ -9090,6 +9109,7 @@ var DesktopLayout4 = (props) => {
|
|
|
9090
9109
|
SplitLayout,
|
|
9091
9110
|
{
|
|
9092
9111
|
className: cn("oui-flex oui-flex-1 oui-overflow-hidden"),
|
|
9112
|
+
style: max4XL ? { minWidth: mainContentMinWidth } : void 0,
|
|
9093
9113
|
onSizeChange,
|
|
9094
9114
|
disable: !horizontalDraggable,
|
|
9095
9115
|
children: [
|
|
@@ -9240,12 +9260,12 @@ var MaybeEqual = () => {
|
|
|
9240
9260
|
var MobileLayout4 = (props) => {
|
|
9241
9261
|
const { t } = useTranslation();
|
|
9242
9262
|
const { isRwa, open, closeTimeInterval } = useGetRwaSymbolInfo(props.symbol);
|
|
9243
|
-
const
|
|
9244
|
-
|
|
9245
|
-
);
|
|
9263
|
+
const symbolsInfo = useSymbolsInfo();
|
|
9264
|
+
const isPreTge = Boolean(symbolsInfo[props.symbol]?.("is_pretge"));
|
|
9265
|
+
const { brokerId, brokerName, brokerNameRaw, displaySymbolName } = useBadgeBySymbol(props.symbol);
|
|
9246
9266
|
const isCommunityListed = Boolean(brokerId ?? brokerName);
|
|
9247
9267
|
const baseFromSymbol = props.symbol?.split("_")[1] ?? props.symbol ?? "";
|
|
9248
|
-
const symbolWithBroker = brokerName != null ? `${baseFromSymbol}-${brokerNameRaw}` :
|
|
9268
|
+
const symbolWithBroker = brokerName != null ? `${baseFromSymbol}-${brokerNameRaw}` : displaySymbolName ?? props.symbol ?? "";
|
|
9249
9269
|
useEffect(() => {
|
|
9250
9270
|
if (isRwa && !open) {
|
|
9251
9271
|
showRwaOutsideMarketHoursNotify();
|
|
@@ -9346,6 +9366,7 @@ var MobileLayout4 = (props) => {
|
|
|
9346
9366
|
visible: isCommunityListed,
|
|
9347
9367
|
symbolWithBroker,
|
|
9348
9368
|
brokerName: brokerNameRaw ?? brokerName ?? "",
|
|
9369
|
+
isPreTge,
|
|
9349
9370
|
autoHeight: true,
|
|
9350
9371
|
className: "oui-my-1"
|
|
9351
9372
|
}
|