@orderly.network/trading 2.8.13 → 2.8.14-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 CHANGED
@@ -4273,8 +4273,8 @@ var init_switchLayout = __esm({
4273
4273
  /* @__PURE__ */ jsxRuntime.jsxs(ui.Flex, { direction: "column", gapY: 2, mt: 5, itemAlign: "start", children: [
4274
4274
  /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: "xs", intensity: 98, children: String(t("trading.layout.advanced")) }),
4275
4275
  /* @__PURE__ */ jsxRuntime.jsxs(ui.Flex, { gapX: 6, children: [
4276
- renderItem("right"),
4277
- renderItem("left")
4276
+ renderItem("left"),
4277
+ renderItem("right")
4278
4278
  ] })
4279
4279
  ] }),
4280
4280
  /* @__PURE__ */ jsxRuntime.jsxs(ui.Flex, { direction: "column", gapY: 2, mt: 5, itemAlign: "start", children: [
@@ -5277,45 +5277,55 @@ var init_orderBookAndEntry_ui = __esm({
5277
5277
  resizeObserver.unobserve(div);
5278
5278
  };
5279
5279
  }, []);
5280
- return /* @__PURE__ */ jsxRuntime.jsxs(
5280
+ const orderBookColumn = /* @__PURE__ */ jsxRuntime.jsx(
5281
+ "div",
5282
+ {
5283
+ className: "oui-rounded-xl oui-bg-base-9",
5284
+ style: { height: `${height + 16}px` },
5285
+ children: /* @__PURE__ */ jsxRuntime.jsx(React12__default.default.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(
5286
+ LazyOrderBookWidget2,
5287
+ {
5288
+ symbol: props.symbol,
5289
+ height: height ? height - 44 : void 0
5290
+ }
5291
+ ) })
5292
+ }
5293
+ );
5294
+ const orderEntryColumn = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-rounded-xl oui-bg-base-9 oui-p-2", children: /* @__PURE__ */ jsxRuntime.jsx(uiOrderEntry.OrderEntryWidget, { symbol: props.symbol, containerRef: divRef }) });
5295
+ return /* @__PURE__ */ jsxRuntime.jsx(
5281
5296
  "div",
5282
5297
  {
5283
5298
  className: ui.cn(
5284
- "oui-mx-1 oui-grid oui-grid-cols-[4fr,6fr] oui-gap-1 ",
5299
+ "oui-mx-1 oui-grid oui-gap-1",
5300
+ props.layout === "right" ? "oui-grid-cols-[4fr,6fr]" : "oui-grid-cols-[6fr,4fr]",
5285
5301
  props.className
5286
5302
  ),
5287
- children: [
5288
- /* @__PURE__ */ jsxRuntime.jsx(
5289
- "div",
5290
- {
5291
- className: "oui-rounded-xl oui-bg-base-9",
5292
- style: { height: `${height + 16}px` },
5293
- children: /* @__PURE__ */ jsxRuntime.jsx(React12__default.default.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(
5294
- LazyOrderBookWidget2,
5295
- {
5296
- symbol: props.symbol,
5297
- height: height ? height - 44 : void 0
5298
- }
5299
- ) })
5300
- }
5301
- ),
5302
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-rounded-xl oui-bg-base-9 oui-p-2", children: /* @__PURE__ */ jsxRuntime.jsx(uiOrderEntry.OrderEntryWidget, { symbol: props.symbol, containerRef: divRef }) })
5303
- ]
5303
+ children: props.layout === "right" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5304
+ orderBookColumn,
5305
+ orderEntryColumn
5306
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5307
+ orderEntryColumn,
5308
+ orderBookColumn
5309
+ ] })
5304
5310
  }
5305
5311
  );
5306
5312
  };
5307
5313
  }
5308
5314
  });
5309
-
5310
- // src/components/mobile/orderBookAndEntry/orderBookAndEntry.script.tsx
5311
- var useOrderBookAndEntryScript;
5315
+ var ORDERLY_MWEB_ORDER_ENTRY_SIDE_MARKETS_LAYOUT, useOrderBookAndEntryScript;
5312
5316
  var init_orderBookAndEntry_script = __esm({
5313
5317
  "src/components/mobile/orderBookAndEntry/orderBookAndEntry.script.tsx"() {
5314
5318
  init_tradingPageContext();
5319
+ ORDERLY_MWEB_ORDER_ENTRY_SIDE_MARKETS_LAYOUT = "orderly_mweb_order_entry_side_markets_layout";
5315
5320
  useOrderBookAndEntryScript = () => {
5316
5321
  const { symbol } = exports.useTradingPageContext();
5322
+ const [layout] = hooks.useLocalStorage(
5323
+ ORDERLY_MWEB_ORDER_ENTRY_SIDE_MARKETS_LAYOUT,
5324
+ "right"
5325
+ );
5317
5326
  return {
5318
- symbol
5327
+ symbol,
5328
+ layout
5319
5329
  };
5320
5330
  };
5321
5331
  }