@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 +25 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -11
package/dist/index.mjs
CHANGED
|
@@ -590,7 +590,7 @@ var init_confirmContent = __esm({
|
|
|
590
590
|
/* @__PURE__ */ jsx(
|
|
591
591
|
"button",
|
|
592
592
|
{
|
|
593
|
-
className: "oui-absolute oui-
|
|
593
|
+
className: "oui-absolute oui-end-0 oui-top-0 oui-text-base-contrast-54",
|
|
594
594
|
onClick: cancelPopover,
|
|
595
595
|
children: /* @__PURE__ */ jsx(CloseIcon, { size: 16, color: "white", opacity: 1 })
|
|
596
596
|
}
|
|
@@ -737,7 +737,7 @@ var init_editableCellInput = __esm({
|
|
|
737
737
|
],
|
|
738
738
|
classNames: {
|
|
739
739
|
root: "oui-bg-base-700 oui-px-2 oui-py-1 oui-rounded",
|
|
740
|
-
input: "oui-
|
|
740
|
+
input: "oui-pe-2"
|
|
741
741
|
},
|
|
742
742
|
readOnly: props.readonly,
|
|
743
743
|
suffix: /* @__PURE__ */ jsxs(Flex, { gapX: 1, children: [
|
|
@@ -1281,7 +1281,7 @@ var init_innerInput = __esm({
|
|
|
1281
1281
|
color: open ? "danger" : void 0,
|
|
1282
1282
|
classNames: {
|
|
1283
1283
|
root: "oui-bg-base-700 oui-px-2 oui-py-1 oui-rounded",
|
|
1284
|
-
input: "oui-
|
|
1284
|
+
input: "oui-pe-2"
|
|
1285
1285
|
},
|
|
1286
1286
|
suffix: /* @__PURE__ */ jsx("button", { onClick, children: /* @__PURE__ */ jsx(
|
|
1287
1287
|
CheckIcon,
|
|
@@ -2306,7 +2306,7 @@ var init_tpslTriggerPrice = __esm({
|
|
|
2306
2306
|
CloseToLiqPriceIcon,
|
|
2307
2307
|
{
|
|
2308
2308
|
slPriceError: props.slPriceError,
|
|
2309
|
-
className: "oui-
|
|
2309
|
+
className: "oui-ms-1"
|
|
2310
2310
|
}
|
|
2311
2311
|
)
|
|
2312
2312
|
},
|
|
@@ -2368,7 +2368,7 @@ var init_tpslTriggerPrice = __esm({
|
|
|
2368
2368
|
const type = orderType === AlgoOrderType.TAKE_PROFIT ? "TP" : "SL";
|
|
2369
2369
|
const label = type === "TP" ? `${t("tpsl.tpPnl")}:` : `${t("tpsl.slPnl")}:`;
|
|
2370
2370
|
return /* @__PURE__ */ jsxs("div", { className: "oui-flex oui-items-center", children: [
|
|
2371
|
-
/* @__PURE__ */ jsx("span", { className: "oui-text-base-contrast-54 oui-
|
|
2371
|
+
/* @__PURE__ */ jsx("span", { className: "oui-text-base-contrast-54 oui-me-1", children: label }),
|
|
2372
2372
|
/* @__PURE__ */ jsx(
|
|
2373
2373
|
Text.numeral,
|
|
2374
2374
|
{
|
|
@@ -2380,7 +2380,7 @@ var init_tpslTriggerPrice = __esm({
|
|
|
2380
2380
|
// @ts-ignore
|
|
2381
2381
|
/* @__PURE__ */ jsx("span", { children: pnl === 0 ? "" : pnl > 0 ? "+" : "-" })
|
|
2382
2382
|
),
|
|
2383
|
-
suffix: /* @__PURE__ */ jsx("span", { className: "oui-text-base-contrast-36 oui-
|
|
2383
|
+
suffix: /* @__PURE__ */ jsx("span", { className: "oui-text-base-contrast-36 oui-ms-1", children: "USDC" }),
|
|
2384
2384
|
children: `${Math.abs(pnl)}`
|
|
2385
2385
|
}
|
|
2386
2386
|
)
|
|
@@ -2392,7 +2392,7 @@ function instrument(option) {
|
|
|
2392
2392
|
return {
|
|
2393
2393
|
title: i18n.t("common.symbol"),
|
|
2394
2394
|
dataIndex: "symbol",
|
|
2395
|
-
fixed: "
|
|
2395
|
+
fixed: "start",
|
|
2396
2396
|
// className: "oui-h-[48px]",
|
|
2397
2397
|
width: option?.width,
|
|
2398
2398
|
onSort: option?.enableSort ? (r1, r2) => {
|
|
@@ -2860,7 +2860,7 @@ function cancelBtn(option) {
|
|
|
2860
2860
|
width: option?.width,
|
|
2861
2861
|
className: option?.className,
|
|
2862
2862
|
align: "right",
|
|
2863
|
-
fixed: "
|
|
2863
|
+
fixed: "end",
|
|
2864
2864
|
render: (_, record) => {
|
|
2865
2865
|
if (record.status === OrderStatus.CANCELLED) {
|
|
2866
2866
|
return /* @__PURE__ */ jsx(Renew, { record });
|
|
@@ -2880,7 +2880,7 @@ function pendingTabCancelBtn(option) {
|
|
|
2880
2880
|
width: option?.width,
|
|
2881
2881
|
className: option?.className,
|
|
2882
2882
|
align: "right",
|
|
2883
|
-
fixed: "
|
|
2883
|
+
fixed: "end",
|
|
2884
2884
|
render: (_, record) => {
|
|
2885
2885
|
return /* @__PURE__ */ jsx(CancelButton, { order: record });
|
|
2886
2886
|
}
|
|
@@ -2894,7 +2894,7 @@ function tpslAction(option) {
|
|
|
2894
2894
|
width: option?.width,
|
|
2895
2895
|
className: option?.className,
|
|
2896
2896
|
align: "right",
|
|
2897
|
-
fixed: "
|
|
2897
|
+
fixed: "end",
|
|
2898
2898
|
render: (_, record) => {
|
|
2899
2899
|
return /* @__PURE__ */ jsxs(Flex, { gap: 3, children: [
|
|
2900
2900
|
/* @__PURE__ */ jsx(TP_SLEditButton, { order: record }),
|
|
@@ -2979,7 +2979,7 @@ var init_useColumn = __esm({
|
|
|
2979
2979
|
fillAndQuantity({
|
|
2980
2980
|
width: 130,
|
|
2981
2981
|
disableEdit: true,
|
|
2982
|
-
className: "oui-
|
|
2982
|
+
className: "oui-ps-0 oui-pe-0",
|
|
2983
2983
|
enableSort: false
|
|
2984
2984
|
}),
|
|
2985
2985
|
price({
|
|
@@ -3016,12 +3016,12 @@ var init_useColumn = __esm({
|
|
|
3016
3016
|
// side({ width: 162 }),
|
|
3017
3017
|
fillAndQuantity({
|
|
3018
3018
|
width: 162,
|
|
3019
|
-
className: "oui-
|
|
3019
|
+
className: "oui-pe-0",
|
|
3020
3020
|
enableSort: false
|
|
3021
3021
|
}),
|
|
3022
|
-
price({ width: 162, className: "oui-
|
|
3022
|
+
price({ width: 162, className: "oui-pe-0", enableSort: false }),
|
|
3023
3023
|
trailingCallback({ width: 162 }),
|
|
3024
|
-
triggerPrice({ width: 162, className: "oui-
|
|
3024
|
+
triggerPrice({ width: 162, className: "oui-pe-0", isPending: true }),
|
|
3025
3025
|
bracketOrderPrice({ width: 130 }),
|
|
3026
3026
|
estTotal({ width: 162, isPending: true }),
|
|
3027
3027
|
reduceOnly({ width: 162 }),
|
|
@@ -3058,7 +3058,7 @@ var init_useColumn = __esm({
|
|
|
3058
3058
|
fillAndQuantity({
|
|
3059
3059
|
width: 124,
|
|
3060
3060
|
disableEdit: true,
|
|
3061
|
-
className: "oui-
|
|
3061
|
+
className: "oui-ps-0 oui-pe-0"
|
|
3062
3062
|
}),
|
|
3063
3063
|
price({
|
|
3064
3064
|
width: 124,
|
|
@@ -3093,7 +3093,7 @@ var init_useColumn = __esm({
|
|
|
3093
3093
|
fillAndQuantity({
|
|
3094
3094
|
width: 124,
|
|
3095
3095
|
disableEdit: true,
|
|
3096
|
-
className: "oui-
|
|
3096
|
+
className: "oui-ps-0 oui-pe-0",
|
|
3097
3097
|
enableSort: false
|
|
3098
3098
|
}),
|
|
3099
3099
|
price({ width: 124, disableEdit: true, enableSort: false }),
|
|
@@ -3116,7 +3116,7 @@ var init_useColumn = __esm({
|
|
|
3116
3116
|
fillAndQuantity({
|
|
3117
3117
|
width: 124,
|
|
3118
3118
|
disableEdit: true,
|
|
3119
|
-
className: "oui-
|
|
3119
|
+
className: "oui-ps-0 oui-pe-0"
|
|
3120
3120
|
}),
|
|
3121
3121
|
price({ width: 124, disableEdit: true }),
|
|
3122
3122
|
avgOpen({ width: 124 }),
|
|
@@ -3139,7 +3139,7 @@ var init_useColumn = __esm({
|
|
|
3139
3139
|
fillAndQuantity({
|
|
3140
3140
|
width: 150,
|
|
3141
3141
|
disableEdit: true,
|
|
3142
|
-
className: "oui-
|
|
3142
|
+
className: "oui-ps-6 oui-pe-0"
|
|
3143
3143
|
}),
|
|
3144
3144
|
price({
|
|
3145
3145
|
width: 124,
|
|
@@ -3210,6 +3210,7 @@ var init_items = __esm({
|
|
|
3210
3210
|
};
|
|
3211
3211
|
OrderTypeView = (props) => {
|
|
3212
3212
|
const { item } = props;
|
|
3213
|
+
useTranslation();
|
|
3213
3214
|
useCallback(() => {
|
|
3214
3215
|
const type = typeof item.type === "string" ? item.type.replace("_ORDER", "").toLowerCase() : item.type;
|
|
3215
3216
|
const isAlgoOrder = item.algo_order_id && item.algo_type !== AlgoOrderRootType.BRACKET;
|
|
@@ -3479,7 +3480,7 @@ var init_items = __esm({
|
|
|
3479
3480
|
}
|
|
3480
3481
|
),
|
|
3481
3482
|
classNames: {
|
|
3482
|
-
content: "oui-bg-base-6 oui-
|
|
3483
|
+
content: "oui-bg-base-6 oui-ms-2",
|
|
3483
3484
|
arrow: "oui-fill-base-6"
|
|
3484
3485
|
},
|
|
3485
3486
|
children: /* @__PURE__ */ jsx(
|
|
@@ -3532,7 +3533,7 @@ var init_items = __esm({
|
|
|
3532
3533
|
}
|
|
3533
3534
|
),
|
|
3534
3535
|
classNames: {
|
|
3535
|
-
content: "oui-bg-base-6 oui-
|
|
3536
|
+
content: "oui-bg-base-6 oui-ms-2",
|
|
3536
3537
|
arrow: "oui-fill-base-6"
|
|
3537
3538
|
},
|
|
3538
3539
|
children: /* @__PURE__ */ jsx(
|
|
@@ -3576,7 +3577,7 @@ var init_items = __esm({
|
|
|
3576
3577
|
children: tp_order_price
|
|
3577
3578
|
}
|
|
3578
3579
|
);
|
|
3579
|
-
}, [tp_order_price]);
|
|
3580
|
+
}, [props.quote_dp, t, tp_order_price]);
|
|
3580
3581
|
return /* @__PURE__ */ jsx(
|
|
3581
3582
|
Statistic,
|
|
3582
3583
|
{
|
|
@@ -3609,7 +3610,7 @@ var init_items = __esm({
|
|
|
3609
3610
|
children: sl_order_price
|
|
3610
3611
|
}
|
|
3611
3612
|
);
|
|
3612
|
-
}, [sl_order_price]);
|
|
3613
|
+
}, [props.quote_dp, sl_order_price, t]);
|
|
3613
3614
|
return /* @__PURE__ */ jsx(
|
|
3614
3615
|
Statistic,
|
|
3615
3616
|
{
|
|
@@ -3834,7 +3835,7 @@ var init_bracketOrderPrice_ui = __esm({
|
|
|
3834
3835
|
MobileTooltip,
|
|
3835
3836
|
{
|
|
3836
3837
|
classNames: {
|
|
3837
|
-
content: "oui-bg-base-6 oui-
|
|
3838
|
+
content: "oui-bg-base-6 oui-ms-2",
|
|
3838
3839
|
arrow: "oui-fill-base-6"
|
|
3839
3840
|
},
|
|
3840
3841
|
content: /* @__PURE__ */ jsxs(Flex, { direction: "column", itemAlign: "start", gap: 1, children: [
|
|
@@ -5069,7 +5070,7 @@ var init_editBtn_script = __esm({
|
|
|
5069
5070
|
}).catch((error) => {
|
|
5070
5071
|
});
|
|
5071
5072
|
}
|
|
5072
|
-
}, [state]);
|
|
5073
|
+
}, [editAlgoOrder, editOrder, position, state, symbolInfo, t]);
|
|
5073
5074
|
return {
|
|
5074
5075
|
...state,
|
|
5075
5076
|
onShowEditSheet
|