@orderly.network/markets 2.12.4-alpha.0 → 3.0.0-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.d.mts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +24 -107
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -110
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +8 -8
package/dist/index.d.mts
CHANGED
|
@@ -467,26 +467,28 @@ type CollapseMarketsProps = {
|
|
|
467
467
|
declare const CollapseMarkets: React.FC<CollapseMarketsProps>;
|
|
468
468
|
|
|
469
469
|
type SideMarketsScriptOptions = {
|
|
470
|
-
resizeable?: boolean;
|
|
471
470
|
panelSize?: "small" | "middle" | "large";
|
|
471
|
+
collapsed?: boolean;
|
|
472
472
|
onPanelSizeChange?: React.Dispatch<React.SetStateAction<"small" | "middle" | "large">>;
|
|
473
473
|
};
|
|
474
474
|
type SideMarketsScriptReturn = ReturnType<typeof useSideMarketsScript>;
|
|
475
475
|
declare const useSideMarketsScript: (options?: SideMarketsScriptOptions) => {
|
|
476
|
-
readonly resizeable: boolean;
|
|
477
|
-
readonly panelSize: "small" | "middle" | "large" | undefined;
|
|
478
|
-
readonly onPanelSizeChange: React.Dispatch<React.SetStateAction<"small" | "middle" | "large">>;
|
|
479
476
|
readonly activeTab: MarketsTabName;
|
|
480
477
|
readonly onTabChange: (value: MarketsTabName) => void;
|
|
481
478
|
readonly tabSort: Record<string, SortType>;
|
|
479
|
+
readonly panelSize: "small" | "middle" | "large";
|
|
482
480
|
};
|
|
483
481
|
|
|
484
482
|
type SideMarketsProps = SideMarketsScriptReturn & {
|
|
485
483
|
className?: string;
|
|
484
|
+
} & {
|
|
485
|
+
panelSize?: "small" | "middle" | "large";
|
|
486
486
|
};
|
|
487
487
|
declare const SideMarkets: react__default.FC<SideMarketsProps>;
|
|
488
488
|
|
|
489
|
-
type SideMarketsWidgetProps = MarketsProviderProps & Partial<Pick<SideMarketsProps, "
|
|
489
|
+
type SideMarketsWidgetProps = MarketsProviderProps & Partial<Pick<SideMarketsProps, "className">> & {
|
|
490
|
+
collapsed?: boolean;
|
|
491
|
+
};
|
|
490
492
|
declare const SideMarketsWidget: react__default.FC<SideMarketsWidgetProps>;
|
|
491
493
|
|
|
492
494
|
type DropDownMarketsScriptReturn = ReturnType<typeof useDropDownMarketsScript>;
|
|
@@ -861,4 +863,4 @@ declare const SymbolDisplay: react.MemoExoticComponent<(props: SymbolDisplayProp
|
|
|
861
863
|
*/
|
|
862
864
|
declare const builtInTabs: Record<MarketBuiltInTabType, BuiltInMarketTab>;
|
|
863
865
|
|
|
864
|
-
export { CollapseMarkets, type CollapseMarketsProps, CommunitySubTabName, DropDownMarkets, DropDownMarketsConetnt, DropDownMarketsWidget, ExpandMarkets, ExpandMarketsWidget, type FavoriteInstance, FavoritesDropdownMenu, FavoritesDropdownMenuWidget, FavoritesList, FavoritesListFull, FavoritesListFullWidget, FavoritesListWidget, FavoritesTab, FavoritesTabWidget, FundingComparison, FundingComparisonWidget, FundingOverview, FundingOverviewWidget, FundingTabName, type GetColumns, HorizontalMarkets, type HorizontalMarketsProps, type HorizontalMarketsScriptOptions, type HorizontalMarketsScriptReturn, HorizontalMarketsWidget, type HorizontalMarketsWidgetProps, MarketItem, type MarketItemProps, type MarketType, MarketTypeFilter, type MarketTypeFilterProps, MarketsDataList, MarketsDataListWidget, MarketsHeader, MarketsHeaderWidget, MarketsHomePage, MarketsList, MarketsListFull, MarketsListFullWidget, MarketsListWidget, MarketsPageTab, MarketsProvider, MarketsSheet, MarketsSheetWidget, MarketsTabName, NewListingList, NewListingListWidget, RecentList, RecentListWidget, SideMarkets, SideMarketsWidget, type SortType, SubMenuMarkets, type SubMenuMarketsProps, SubMenuMarketsWidget, SymbolDisplay, SymbolInfoBar, SymbolInfoBarFull, SymbolInfoBarFullWidget, SymbolInfoBarRiskNotice, SymbolInfoBarWidget, builtInTabs, useDropDownMarketsColumns, useDropDownMarketsScript, useExpandMarketsScript, useFavoritesDropdownMenuScript, useFavoritesListFullScript, useFavoritesListScript, useFavoritesTabScript, useFundingComparisonScript, useFundingOverviewScript, useHorizontalMarketsScript, useMarketsDataListScript, useMarketsHeaderScript, useMarketsListFullScript, useMarketsListScript, useMarketsSheetScript, useNewListingListScript, useRecentListScript, useSideMarketsScript, useSubMenuMarketsScript, useSymbolInfoBarFullScript, useSymbolInfoBarScript };
|
|
866
|
+
export { CollapseMarkets, type CollapseMarketsProps, CommunitySubTabName, DropDownMarkets, DropDownMarketsConetnt, DropDownMarketsWidget, ExpandMarkets, ExpandMarketsWidget, type FavoriteInstance, FavoritesDropdownMenu, FavoritesDropdownMenuWidget, FavoritesList, FavoritesListFull, FavoritesListFullWidget, FavoritesListWidget, FavoritesTab, FavoritesTabWidget, FundingComparison, FundingComparisonWidget, FundingOverview, FundingOverviewWidget, FundingTabName, type GetColumns, HorizontalMarkets, type HorizontalMarketsProps, type HorizontalMarketsScriptOptions, type HorizontalMarketsScriptReturn, HorizontalMarketsWidget, type HorizontalMarketsWidgetProps, MarketItem, type MarketItemProps, type MarketType, MarketTypeFilter, type MarketTypeFilterProps, MarketsDataList, MarketsDataListWidget, MarketsHeader, MarketsHeaderWidget, MarketsHomePage, MarketsList, MarketsListFull, MarketsListFullWidget, MarketsListWidget, MarketsPageTab, MarketsProvider, MarketsSheet, MarketsSheetWidget, MarketsTabName, NewListingList, NewListingListWidget, RecentList, RecentListWidget, SideMarkets, SideMarketsWidget, type SortType, SubMenuMarkets, type SubMenuMarketsProps, SubMenuMarketsWidget, SymbolDisplay, SymbolInfoBar, SymbolInfoBarFull, type SymbolInfoBarFullProps, SymbolInfoBarFullWidget, SymbolInfoBarRiskNotice, SymbolInfoBarWidget, builtInTabs, useDropDownMarketsColumns, useDropDownMarketsScript, useExpandMarketsScript, useFavoritesDropdownMenuScript, useFavoritesListFullScript, useFavoritesListScript, useFavoritesTabScript, useFundingComparisonScript, useFundingOverviewScript, useHorizontalMarketsScript, useMarketsDataListScript, useMarketsHeaderScript, useMarketsListFullScript, useMarketsListScript, useMarketsSheetScript, useNewListingListScript, useRecentListScript, useSideMarketsScript, useSubMenuMarketsScript, useSymbolInfoBarFullScript, useSymbolInfoBarScript };
|
package/dist/index.d.ts
CHANGED
|
@@ -467,26 +467,28 @@ type CollapseMarketsProps = {
|
|
|
467
467
|
declare const CollapseMarkets: React.FC<CollapseMarketsProps>;
|
|
468
468
|
|
|
469
469
|
type SideMarketsScriptOptions = {
|
|
470
|
-
resizeable?: boolean;
|
|
471
470
|
panelSize?: "small" | "middle" | "large";
|
|
471
|
+
collapsed?: boolean;
|
|
472
472
|
onPanelSizeChange?: React.Dispatch<React.SetStateAction<"small" | "middle" | "large">>;
|
|
473
473
|
};
|
|
474
474
|
type SideMarketsScriptReturn = ReturnType<typeof useSideMarketsScript>;
|
|
475
475
|
declare const useSideMarketsScript: (options?: SideMarketsScriptOptions) => {
|
|
476
|
-
readonly resizeable: boolean;
|
|
477
|
-
readonly panelSize: "small" | "middle" | "large" | undefined;
|
|
478
|
-
readonly onPanelSizeChange: React.Dispatch<React.SetStateAction<"small" | "middle" | "large">>;
|
|
479
476
|
readonly activeTab: MarketsTabName;
|
|
480
477
|
readonly onTabChange: (value: MarketsTabName) => void;
|
|
481
478
|
readonly tabSort: Record<string, SortType>;
|
|
479
|
+
readonly panelSize: "small" | "middle" | "large";
|
|
482
480
|
};
|
|
483
481
|
|
|
484
482
|
type SideMarketsProps = SideMarketsScriptReturn & {
|
|
485
483
|
className?: string;
|
|
484
|
+
} & {
|
|
485
|
+
panelSize?: "small" | "middle" | "large";
|
|
486
486
|
};
|
|
487
487
|
declare const SideMarkets: react__default.FC<SideMarketsProps>;
|
|
488
488
|
|
|
489
|
-
type SideMarketsWidgetProps = MarketsProviderProps & Partial<Pick<SideMarketsProps, "
|
|
489
|
+
type SideMarketsWidgetProps = MarketsProviderProps & Partial<Pick<SideMarketsProps, "className">> & {
|
|
490
|
+
collapsed?: boolean;
|
|
491
|
+
};
|
|
490
492
|
declare const SideMarketsWidget: react__default.FC<SideMarketsWidgetProps>;
|
|
491
493
|
|
|
492
494
|
type DropDownMarketsScriptReturn = ReturnType<typeof useDropDownMarketsScript>;
|
|
@@ -861,4 +863,4 @@ declare const SymbolDisplay: react.MemoExoticComponent<(props: SymbolDisplayProp
|
|
|
861
863
|
*/
|
|
862
864
|
declare const builtInTabs: Record<MarketBuiltInTabType, BuiltInMarketTab>;
|
|
863
865
|
|
|
864
|
-
export { CollapseMarkets, type CollapseMarketsProps, CommunitySubTabName, DropDownMarkets, DropDownMarketsConetnt, DropDownMarketsWidget, ExpandMarkets, ExpandMarketsWidget, type FavoriteInstance, FavoritesDropdownMenu, FavoritesDropdownMenuWidget, FavoritesList, FavoritesListFull, FavoritesListFullWidget, FavoritesListWidget, FavoritesTab, FavoritesTabWidget, FundingComparison, FundingComparisonWidget, FundingOverview, FundingOverviewWidget, FundingTabName, type GetColumns, HorizontalMarkets, type HorizontalMarketsProps, type HorizontalMarketsScriptOptions, type HorizontalMarketsScriptReturn, HorizontalMarketsWidget, type HorizontalMarketsWidgetProps, MarketItem, type MarketItemProps, type MarketType, MarketTypeFilter, type MarketTypeFilterProps, MarketsDataList, MarketsDataListWidget, MarketsHeader, MarketsHeaderWidget, MarketsHomePage, MarketsList, MarketsListFull, MarketsListFullWidget, MarketsListWidget, MarketsPageTab, MarketsProvider, MarketsSheet, MarketsSheetWidget, MarketsTabName, NewListingList, NewListingListWidget, RecentList, RecentListWidget, SideMarkets, SideMarketsWidget, type SortType, SubMenuMarkets, type SubMenuMarketsProps, SubMenuMarketsWidget, SymbolDisplay, SymbolInfoBar, SymbolInfoBarFull, SymbolInfoBarFullWidget, SymbolInfoBarRiskNotice, SymbolInfoBarWidget, builtInTabs, useDropDownMarketsColumns, useDropDownMarketsScript, useExpandMarketsScript, useFavoritesDropdownMenuScript, useFavoritesListFullScript, useFavoritesListScript, useFavoritesTabScript, useFundingComparisonScript, useFundingOverviewScript, useHorizontalMarketsScript, useMarketsDataListScript, useMarketsHeaderScript, useMarketsListFullScript, useMarketsListScript, useMarketsSheetScript, useNewListingListScript, useRecentListScript, useSideMarketsScript, useSubMenuMarketsScript, useSymbolInfoBarFullScript, useSymbolInfoBarScript };
|
|
866
|
+
export { CollapseMarkets, type CollapseMarketsProps, CommunitySubTabName, DropDownMarkets, DropDownMarketsConetnt, DropDownMarketsWidget, ExpandMarkets, ExpandMarketsWidget, type FavoriteInstance, FavoritesDropdownMenu, FavoritesDropdownMenuWidget, FavoritesList, FavoritesListFull, FavoritesListFullWidget, FavoritesListWidget, FavoritesTab, FavoritesTabWidget, FundingComparison, FundingComparisonWidget, FundingOverview, FundingOverviewWidget, FundingTabName, type GetColumns, HorizontalMarkets, type HorizontalMarketsProps, type HorizontalMarketsScriptOptions, type HorizontalMarketsScriptReturn, HorizontalMarketsWidget, type HorizontalMarketsWidgetProps, MarketItem, type MarketItemProps, type MarketType, MarketTypeFilter, type MarketTypeFilterProps, MarketsDataList, MarketsDataListWidget, MarketsHeader, MarketsHeaderWidget, MarketsHomePage, MarketsList, MarketsListFull, MarketsListFullWidget, MarketsListWidget, MarketsPageTab, MarketsProvider, MarketsSheet, MarketsSheetWidget, MarketsTabName, NewListingList, NewListingListWidget, RecentList, RecentListWidget, SideMarkets, SideMarketsWidget, type SortType, SubMenuMarkets, type SubMenuMarketsProps, SubMenuMarketsWidget, SymbolDisplay, SymbolInfoBar, SymbolInfoBarFull, type SymbolInfoBarFullProps, SymbolInfoBarFullWidget, SymbolInfoBarRiskNotice, SymbolInfoBarWidget, builtInTabs, useDropDownMarketsColumns, useDropDownMarketsScript, useExpandMarketsScript, useFavoritesDropdownMenuScript, useFavoritesListFullScript, useFavoritesListScript, useFavoritesTabScript, useFundingComparisonScript, useFundingOverviewScript, useHorizontalMarketsScript, useMarketsDataListScript, useMarketsHeaderScript, useMarketsListFullScript, useMarketsListScript, useMarketsSheetScript, useNewListingListScript, useRecentListScript, useSideMarketsScript, useSubMenuMarketsScript, useSymbolInfoBarFullScript, useSymbolInfoBarScript };
|
package/dist/index.js
CHANGED
|
@@ -143,7 +143,7 @@ var init_symbolDisplay = __esm({
|
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
|
-
var EditIcon, TrashIcon, AllMarketsIcon, NewListingsIcon, FavoritesIcon, UnFavoritesIcon, SearchIcon, MoveToTopIcon, OrderlyIcon, FavoritesIcon2, UnFavoritesIcon2, TopIcon, DeleteIcon, AddIcon, ActiveAddIcon,
|
|
146
|
+
var EditIcon, TrashIcon, AllMarketsIcon, NewListingsIcon, FavoritesIcon, UnFavoritesIcon, SearchIcon, MoveToTopIcon, OrderlyIcon, FavoritesIcon2, UnFavoritesIcon2, TopIcon, DeleteIcon, AddIcon, ActiveAddIcon, FilterIcon, TriangleDownIcon, ArrowLeftIcon;
|
|
147
147
|
var init_icons = __esm({
|
|
148
148
|
"src/icons.tsx"() {
|
|
149
149
|
EditIcon = (props) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -440,30 +440,6 @@ var init_icons = __esm({
|
|
|
440
440
|
]
|
|
441
441
|
}
|
|
442
442
|
);
|
|
443
|
-
ExpandIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
444
|
-
"svg",
|
|
445
|
-
{
|
|
446
|
-
width: "16",
|
|
447
|
-
height: "16",
|
|
448
|
-
viewBox: "0 0 16 16",
|
|
449
|
-
fill: "currentColor",
|
|
450
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
451
|
-
...props,
|
|
452
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.326 8.826a.84.84 0 0 0-.6.234L2.16 12.627v-2.135H.492v4.167c0 .46.373.833.834.833h4.166v-1.667H3.357l3.567-3.567a.857.857 0 0 0 0-1.198.84.84 0 0 0-.598-.234M10.502.492V2.16h2.135L9.07 5.726a.857.857 0 0 0 0 1.199.86.86 0 0 0 1.197 0l3.568-3.568v2.135h1.667V1.326a.834.834 0 0 0-.834-.834z" })
|
|
453
|
-
}
|
|
454
|
-
);
|
|
455
|
-
CollapseIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
456
|
-
"svg",
|
|
457
|
-
{
|
|
458
|
-
width: "16",
|
|
459
|
-
height: "16",
|
|
460
|
-
viewBox: "0 0 16 16",
|
|
461
|
-
fill: "currentColor",
|
|
462
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
463
|
-
...props,
|
|
464
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14.668.492a.85.85 0 0 0-.599.234l-3.567 3.568V2.159H8.835v4.167c0 .46.373.833.833.833h4.167V5.492H11.7l3.569-3.567a.86.86 0 0 0 0-1.199.85.85 0 0 0-.6-.234m-12.5 8.334v1.666h2.135L.736 14.06a.86.86 0 0 0 0 1.198.86.86 0 0 0 1.198 0l3.568-3.567v2.134h1.666V9.66a.834.834 0 0 0-.833-.833z" })
|
|
465
|
-
}
|
|
466
|
-
);
|
|
467
443
|
FilterIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
468
444
|
"svg",
|
|
469
445
|
{
|
|
@@ -3633,7 +3609,7 @@ var init_expandMarkets_ui = __esm({
|
|
|
3633
3609
|
return { default: mod.MarketsListWidget };
|
|
3634
3610
|
})
|
|
3635
3611
|
);
|
|
3636
|
-
cls = "oui-h-
|
|
3612
|
+
cls = "oui-h-full";
|
|
3637
3613
|
exports.ExpandMarkets = (props) => {
|
|
3638
3614
|
const { activeTab, onTabChange, tabSort, onTabSort } = props;
|
|
3639
3615
|
const { getFavoritesProps, renderEmptyView } = useFavoritesProps();
|
|
@@ -4597,53 +4573,17 @@ var init_fundingComparison = __esm({
|
|
|
4597
4573
|
// src/components/sideMarkets/sideMarkets.ui.tsx
|
|
4598
4574
|
var sideMarkets_ui_exports = {};
|
|
4599
4575
|
__export(sideMarkets_ui_exports, {
|
|
4600
|
-
SideMarkets: () => exports.SideMarkets
|
|
4601
|
-
SideMarketsHeader: () => SideMarketsHeader
|
|
4576
|
+
SideMarkets: () => exports.SideMarkets
|
|
4602
4577
|
});
|
|
4603
|
-
|
|
4578
|
+
exports.SideMarkets = void 0;
|
|
4604
4579
|
var init_sideMarkets_ui = __esm({
|
|
4605
4580
|
"src/components/sideMarkets/sideMarkets.ui.tsx"() {
|
|
4606
|
-
init_icons();
|
|
4607
4581
|
init_expandMarkets();
|
|
4608
4582
|
init_marketsList();
|
|
4609
4583
|
init_marketsProvider();
|
|
4610
4584
|
init_useFavoritesExtraProps();
|
|
4611
|
-
SideMarketsHeader = (props) => {
|
|
4612
|
-
const { resizeable, panelSize, onPanelSizeChange } = props;
|
|
4613
|
-
const { t } = i18n.useTranslation();
|
|
4614
|
-
const cls3 = ui.cn(
|
|
4615
|
-
"oui-text-base-contrast-36",
|
|
4616
|
-
resizeable ? "oui-cursor-pointer hover:oui-text-base-contrast-80" : "oui-cursor-not-allowed"
|
|
4617
|
-
);
|
|
4618
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4619
|
-
ui.Flex,
|
|
4620
|
-
{
|
|
4621
|
-
className: panelSize === "small" ? "oui-absolute oui-end-[-20px] oui-z-50" : "oui-relative",
|
|
4622
|
-
justify: panelSize === "large" ? "between" : "center",
|
|
4623
|
-
width: "100%",
|
|
4624
|
-
px: 3,
|
|
4625
|
-
children: [
|
|
4626
|
-
panelSize === "large" && /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: "base", intensity: 80, children: t("common.markets") }),
|
|
4627
|
-
panelSize === "large" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4628
|
-
"div",
|
|
4629
|
-
{
|
|
4630
|
-
onClick: resizeable ? () => onPanelSizeChange?.("middle") : void 0,
|
|
4631
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(CollapseIcon, { className: cls3 })
|
|
4632
|
-
}
|
|
4633
|
-
),
|
|
4634
|
-
(panelSize === "middle" || panelSize === "small") && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4635
|
-
"div",
|
|
4636
|
-
{
|
|
4637
|
-
onClick: resizeable ? () => onPanelSizeChange?.("large") : void 0,
|
|
4638
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ExpandIcon, { className: cls3 })
|
|
4639
|
-
}
|
|
4640
|
-
)
|
|
4641
|
-
]
|
|
4642
|
-
}
|
|
4643
|
-
);
|
|
4644
|
-
};
|
|
4645
4585
|
exports.SideMarkets = (props) => {
|
|
4646
|
-
const {
|
|
4586
|
+
const { activeTab, onTabChange, className, tabSort, panelSize } = props;
|
|
4647
4587
|
const { symbol, onSymbolChange } = useMarketsContext();
|
|
4648
4588
|
const { getFavoritesProps } = useFavoritesProps();
|
|
4649
4589
|
const renderContent = () => {
|
|
@@ -4668,34 +4608,12 @@ var init_sideMarkets_ui = __esm({
|
|
|
4668
4608
|
}
|
|
4669
4609
|
);
|
|
4670
4610
|
};
|
|
4671
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
4672
|
-
ui.
|
|
4611
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4612
|
+
ui.Box,
|
|
4673
4613
|
{
|
|
4674
|
-
id: "oui-side-markets",
|
|
4675
|
-
className: ui.cn("oui-relative oui-font-semibold", className),
|
|
4676
|
-
direction: "column",
|
|
4677
|
-
gapY: 5,
|
|
4678
|
-
height: "100%",
|
|
4679
4614
|
width: "100%",
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
SideMarketsHeader,
|
|
4683
|
-
{
|
|
4684
|
-
...ramda.pick(["resizeable", "panelSize", "onPanelSizeChange"], props)
|
|
4685
|
-
}
|
|
4686
|
-
),
|
|
4687
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4688
|
-
ui.Box,
|
|
4689
|
-
{
|
|
4690
|
-
width: "100%",
|
|
4691
|
-
className: ui.cn(
|
|
4692
|
-
panelSize === "large" && "oui-h-[calc(100%_-_56px)]",
|
|
4693
|
-
panelSize === "middle" && "oui-h-[calc(100%_-_52px)]"
|
|
4694
|
-
),
|
|
4695
|
-
children: renderContent()
|
|
4696
|
-
}
|
|
4697
|
-
)
|
|
4698
|
-
]
|
|
4615
|
+
height: "100%",
|
|
4616
|
+
children: renderContent()
|
|
4699
4617
|
}
|
|
4700
4618
|
);
|
|
4701
4619
|
};
|
|
@@ -5950,7 +5868,6 @@ init_type();
|
|
|
5950
5868
|
init_useTabSort();
|
|
5951
5869
|
var SIDE_MARKETS_SEL_TAB_KEY2 = "orderly_side_markets_sel_tab_key";
|
|
5952
5870
|
var useSideMarketsScript = (options) => {
|
|
5953
|
-
const [panelSize, setPanelSize] = React6.useState(options?.panelSize);
|
|
5954
5871
|
const [activeTab, setActiveTab] = hooks.useLocalStorage(
|
|
5955
5872
|
SIDE_MARKETS_SEL_TAB_KEY2,
|
|
5956
5873
|
"all" /* All */
|
|
@@ -5958,26 +5875,25 @@ var useSideMarketsScript = (options) => {
|
|
|
5958
5875
|
const { tabSort } = useTabSort({
|
|
5959
5876
|
storageKey: SIDE_MARKETS_TAB_SORT_STORAGE_KEY
|
|
5960
5877
|
});
|
|
5961
|
-
const
|
|
5878
|
+
const panelSize = React6.useMemo(() => {
|
|
5879
|
+
if (options?.collapsed) {
|
|
5880
|
+
return "small";
|
|
5881
|
+
}
|
|
5882
|
+
return options?.panelSize || "large";
|
|
5883
|
+
}, [options?.collapsed, options?.panelSize]);
|
|
5884
|
+
React6.useCallback(
|
|
5962
5885
|
(size) => {
|
|
5963
5886
|
if (typeof options?.onPanelSizeChange === "function") {
|
|
5964
5887
|
options.onPanelSizeChange(size);
|
|
5965
|
-
} else {
|
|
5966
|
-
setPanelSize(size);
|
|
5967
5888
|
}
|
|
5968
5889
|
},
|
|
5969
5890
|
[options?.onPanelSizeChange]
|
|
5970
5891
|
);
|
|
5971
|
-
React6.useEffect(() => {
|
|
5972
|
-
setPanelSize(options?.panelSize);
|
|
5973
|
-
}, [options?.panelSize]);
|
|
5974
5892
|
return {
|
|
5975
|
-
resizeable: options?.resizeable ?? true,
|
|
5976
|
-
panelSize,
|
|
5977
|
-
onPanelSizeChange,
|
|
5978
5893
|
activeTab,
|
|
5979
5894
|
onTabChange: setActiveTab,
|
|
5980
|
-
tabSort
|
|
5895
|
+
tabSort,
|
|
5896
|
+
panelSize
|
|
5981
5897
|
};
|
|
5982
5898
|
};
|
|
5983
5899
|
|
|
@@ -5989,9 +5905,7 @@ var LazySideMarkets = React6__default.default.lazy(
|
|
|
5989
5905
|
})
|
|
5990
5906
|
);
|
|
5991
5907
|
var SideMarketsWidget = (props) => {
|
|
5992
|
-
const state = useSideMarketsScript(
|
|
5993
|
-
ramda.pick(["resizeable", "panelSize", "onPanelSizeChange"], props)
|
|
5994
|
-
);
|
|
5908
|
+
const state = useSideMarketsScript(props);
|
|
5995
5909
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.MarketsProvider, { ...ramda.pick(["symbol", "onSymbolChange"], props), children: /* @__PURE__ */ jsxRuntime.jsx(React6__default.default.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(LazySideMarkets, { ...state, className: props.className }) }) });
|
|
5996
5910
|
};
|
|
5997
5911
|
|
|
@@ -6673,7 +6587,6 @@ var SymbolInfoBarDesktop = ({
|
|
|
6673
6587
|
{
|
|
6674
6588
|
intensity: 900,
|
|
6675
6589
|
r: "2xl",
|
|
6676
|
-
mt: 1,
|
|
6677
6590
|
px: 3,
|
|
6678
6591
|
className: ui.cn(
|
|
6679
6592
|
"oui-symbol-info-bar-desktop",
|
|
@@ -7095,10 +7008,14 @@ function useSymbolInfoBarFullScript(options) {
|
|
|
7095
7008
|
openTimeInterval
|
|
7096
7009
|
};
|
|
7097
7010
|
}
|
|
7011
|
+
var SymbolInfoBarFullInjectable = ui.injectable(
|
|
7012
|
+
SymbolInfoBarFull,
|
|
7013
|
+
"Trading.SymbolInfoBar.Desktop"
|
|
7014
|
+
);
|
|
7098
7015
|
var SymbolInfoBarFullWidget = (props) => {
|
|
7099
7016
|
const { symbol, ...rest } = props;
|
|
7100
7017
|
const state = useSymbolInfoBarFullScript({ symbol });
|
|
7101
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7018
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SymbolInfoBarFullInjectable, { ...state, ...rest });
|
|
7102
7019
|
};
|
|
7103
7020
|
|
|
7104
7021
|
// src/components/horizontalMarkets/horizontalMarkets.widget.tsx
|