@orderly.network/ui-orders 3.0.4 → 3.1.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.js CHANGED
@@ -596,7 +596,7 @@ var init_confirmContent = __esm({
596
596
  /* @__PURE__ */ jsxRuntime.jsx(
597
597
  "button",
598
598
  {
599
- className: "oui-absolute oui-right-0 oui-top-0 oui-text-base-contrast-54",
599
+ className: "oui-absolute oui-end-0 oui-top-0 oui-text-base-contrast-54",
600
600
  onClick: cancelPopover,
601
601
  children: /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, { size: 16, color: "white", opacity: 1 })
602
602
  }
@@ -743,7 +743,7 @@ var init_editableCellInput = __esm({
743
743
  ],
744
744
  classNames: {
745
745
  root: "oui-bg-base-700 oui-px-2 oui-py-1 oui-rounded",
746
- input: "oui-pr-2"
746
+ input: "oui-pe-2"
747
747
  },
748
748
  readOnly: props.readonly,
749
749
  suffix: /* @__PURE__ */ jsxRuntime.jsxs(ui.Flex, { gapX: 1, children: [
@@ -1287,7 +1287,7 @@ var init_innerInput = __esm({
1287
1287
  color: open ? "danger" : void 0,
1288
1288
  classNames: {
1289
1289
  root: "oui-bg-base-700 oui-px-2 oui-py-1 oui-rounded",
1290
- input: "oui-pr-2"
1290
+ input: "oui-pe-2"
1291
1291
  },
1292
1292
  suffix: /* @__PURE__ */ jsxRuntime.jsx("button", { onClick, children: /* @__PURE__ */ jsxRuntime.jsx(
1293
1293
  ui.CheckIcon,
@@ -2312,7 +2312,7 @@ var init_tpslTriggerPrice = __esm({
2312
2312
  uiTpsl.CloseToLiqPriceIcon,
2313
2313
  {
2314
2314
  slPriceError: props.slPriceError,
2315
- className: "oui-ml-1"
2315
+ className: "oui-ms-1"
2316
2316
  }
2317
2317
  )
2318
2318
  },
@@ -2374,7 +2374,7 @@ var init_tpslTriggerPrice = __esm({
2374
2374
  const type = orderType === types.AlgoOrderType.TAKE_PROFIT ? "TP" : "SL";
2375
2375
  const label = type === "TP" ? `${t("tpsl.tpPnl")}:` : `${t("tpsl.slPnl")}:`;
2376
2376
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-flex oui-items-center", children: [
2377
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oui-text-base-contrast-54 oui-mr-1", children: label }),
2377
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oui-text-base-contrast-54 oui-me-1", children: label }),
2378
2378
  /* @__PURE__ */ jsxRuntime.jsx(
2379
2379
  ui.Text.numeral,
2380
2380
  {
@@ -2386,7 +2386,7 @@ var init_tpslTriggerPrice = __esm({
2386
2386
  // @ts-ignore
2387
2387
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: pnl === 0 ? "" : pnl > 0 ? "+" : "-" })
2388
2388
  ),
2389
- suffix: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oui-text-base-contrast-36 oui-ml-1", children: "USDC" }),
2389
+ suffix: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oui-text-base-contrast-36 oui-ms-1", children: "USDC" }),
2390
2390
  children: `${Math.abs(pnl)}`
2391
2391
  }
2392
2392
  )
@@ -2398,7 +2398,7 @@ function instrument(option) {
2398
2398
  return {
2399
2399
  title: i18n.i18n.t("common.symbol"),
2400
2400
  dataIndex: "symbol",
2401
- fixed: "left",
2401
+ fixed: "start",
2402
2402
  // className: "oui-h-[48px]",
2403
2403
  width: option?.width,
2404
2404
  onSort: option?.enableSort ? (r1, r2) => {
@@ -2866,7 +2866,7 @@ function cancelBtn(option) {
2866
2866
  width: option?.width,
2867
2867
  className: option?.className,
2868
2868
  align: "right",
2869
- fixed: "right",
2869
+ fixed: "end",
2870
2870
  render: (_, record) => {
2871
2871
  if (record.status === types.OrderStatus.CANCELLED) {
2872
2872
  return /* @__PURE__ */ jsxRuntime.jsx(Renew, { record });
@@ -2886,7 +2886,7 @@ function pendingTabCancelBtn(option) {
2886
2886
  width: option?.width,
2887
2887
  className: option?.className,
2888
2888
  align: "right",
2889
- fixed: "right",
2889
+ fixed: "end",
2890
2890
  render: (_, record) => {
2891
2891
  return /* @__PURE__ */ jsxRuntime.jsx(CancelButton, { order: record });
2892
2892
  }
@@ -2900,7 +2900,7 @@ function tpslAction(option) {
2900
2900
  width: option?.width,
2901
2901
  className: option?.className,
2902
2902
  align: "right",
2903
- fixed: "right",
2903
+ fixed: "end",
2904
2904
  render: (_, record) => {
2905
2905
  return /* @__PURE__ */ jsxRuntime.jsxs(ui.Flex, { gap: 3, children: [
2906
2906
  /* @__PURE__ */ jsxRuntime.jsx(TP_SLEditButton, { order: record }),
@@ -2985,7 +2985,7 @@ var init_useColumn = __esm({
2985
2985
  fillAndQuantity({
2986
2986
  width: 130,
2987
2987
  disableEdit: true,
2988
- className: "oui-pl-0 oui-pr-0",
2988
+ className: "oui-ps-0 oui-pe-0",
2989
2989
  enableSort: false
2990
2990
  }),
2991
2991
  price({
@@ -3022,12 +3022,12 @@ var init_useColumn = __esm({
3022
3022
  // side({ width: 162 }),
3023
3023
  fillAndQuantity({
3024
3024
  width: 162,
3025
- className: "oui-pr-0",
3025
+ className: "oui-pe-0",
3026
3026
  enableSort: false
3027
3027
  }),
3028
- price({ width: 162, className: "oui-pr-0", enableSort: false }),
3028
+ price({ width: 162, className: "oui-pe-0", enableSort: false }),
3029
3029
  trailingCallback({ width: 162 }),
3030
- triggerPrice({ width: 162, className: "oui-pr-0", isPending: true }),
3030
+ triggerPrice({ width: 162, className: "oui-pe-0", isPending: true }),
3031
3031
  bracketOrderPrice({ width: 130 }),
3032
3032
  estTotal({ width: 162, isPending: true }),
3033
3033
  reduceOnly({ width: 162 }),
@@ -3064,7 +3064,7 @@ var init_useColumn = __esm({
3064
3064
  fillAndQuantity({
3065
3065
  width: 124,
3066
3066
  disableEdit: true,
3067
- className: "oui-pl-0 oui-pr-0"
3067
+ className: "oui-ps-0 oui-pe-0"
3068
3068
  }),
3069
3069
  price({
3070
3070
  width: 124,
@@ -3099,7 +3099,7 @@ var init_useColumn = __esm({
3099
3099
  fillAndQuantity({
3100
3100
  width: 124,
3101
3101
  disableEdit: true,
3102
- className: "oui-pl-0 oui-pr-0",
3102
+ className: "oui-ps-0 oui-pe-0",
3103
3103
  enableSort: false
3104
3104
  }),
3105
3105
  price({ width: 124, disableEdit: true, enableSort: false }),
@@ -3122,7 +3122,7 @@ var init_useColumn = __esm({
3122
3122
  fillAndQuantity({
3123
3123
  width: 124,
3124
3124
  disableEdit: true,
3125
- className: "oui-pl-0 oui-pr-0"
3125
+ className: "oui-ps-0 oui-pe-0"
3126
3126
  }),
3127
3127
  price({ width: 124, disableEdit: true }),
3128
3128
  avgOpen({ width: 124 }),
@@ -3145,7 +3145,7 @@ var init_useColumn = __esm({
3145
3145
  fillAndQuantity({
3146
3146
  width: 150,
3147
3147
  disableEdit: true,
3148
- className: "oui-pl-6 oui-pr-0"
3148
+ className: "oui-ps-6 oui-pe-0"
3149
3149
  }),
3150
3150
  price({
3151
3151
  width: 124,
@@ -3216,6 +3216,7 @@ var init_items = __esm({
3216
3216
  };
3217
3217
  OrderTypeView = (props) => {
3218
3218
  const { item } = props;
3219
+ i18n.useTranslation();
3219
3220
  React2.useCallback(() => {
3220
3221
  const type = typeof item.type === "string" ? item.type.replace("_ORDER", "").toLowerCase() : item.type;
3221
3222
  const isAlgoOrder = item.algo_order_id && item.algo_type !== types.AlgoOrderRootType.BRACKET;
@@ -3485,7 +3486,7 @@ var init_items = __esm({
3485
3486
  }
3486
3487
  ),
3487
3488
  classNames: {
3488
- content: "oui-bg-base-6 oui-ml-2",
3489
+ content: "oui-bg-base-6 oui-ms-2",
3489
3490
  arrow: "oui-fill-base-6"
3490
3491
  },
3491
3492
  children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -3538,7 +3539,7 @@ var init_items = __esm({
3538
3539
  }
3539
3540
  ),
3540
3541
  classNames: {
3541
- content: "oui-bg-base-6 oui-ml-2",
3542
+ content: "oui-bg-base-6 oui-ms-2",
3542
3543
  arrow: "oui-fill-base-6"
3543
3544
  },
3544
3545
  children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -3582,7 +3583,7 @@ var init_items = __esm({
3582
3583
  children: tp_order_price
3583
3584
  }
3584
3585
  );
3585
- }, [tp_order_price]);
3586
+ }, [props.quote_dp, t, tp_order_price]);
3586
3587
  return /* @__PURE__ */ jsxRuntime.jsx(
3587
3588
  ui.Statistic,
3588
3589
  {
@@ -3615,7 +3616,7 @@ var init_items = __esm({
3615
3616
  children: sl_order_price
3616
3617
  }
3617
3618
  );
3618
- }, [sl_order_price]);
3619
+ }, [props.quote_dp, sl_order_price, t]);
3619
3620
  return /* @__PURE__ */ jsxRuntime.jsx(
3620
3621
  ui.Statistic,
3621
3622
  {
@@ -3840,7 +3841,7 @@ var init_bracketOrderPrice_ui = __esm({
3840
3841
  MobileTooltip,
3841
3842
  {
3842
3843
  classNames: {
3843
- content: "oui-bg-base-6 oui-ml-2",
3844
+ content: "oui-bg-base-6 oui-ms-2",
3844
3845
  arrow: "oui-fill-base-6"
3845
3846
  },
3846
3847
  content: /* @__PURE__ */ jsxRuntime.jsxs(ui.Flex, { direction: "column", itemAlign: "start", gap: 1, children: [
@@ -5075,7 +5076,7 @@ var init_editBtn_script = __esm({
5075
5076
  }).catch((error) => {
5076
5077
  });
5077
5078
  }
5078
- }, [state]);
5079
+ }, [editAlgoOrder, editOrder, position, state, symbolInfo, t]);
5079
5080
  return {
5080
5081
  ...state,
5081
5082
  onShowEditSheet