@orderly.network/ui-order-entry 2.8.10 → 2.8.11-alpha.1
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 +33 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -10
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +14 -14
package/dist/index.js
CHANGED
|
@@ -879,9 +879,35 @@ var SlippageUI = (props) => {
|
|
|
879
879
|
function AssetInfo(props) {
|
|
880
880
|
const { canTrade, disableFeatures, orderType, symbol } = props;
|
|
881
881
|
const { t } = i18n.useTranslation();
|
|
882
|
+
const { isMobile } = ui.useScreen();
|
|
882
883
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-space-y-[2px] xl:oui-space-y-1", children: [
|
|
883
884
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.Flex, { justify: "between", children: [
|
|
884
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: "2xs", children: t("orderEntry.estLiqPrice") })
|
|
885
|
+
isMobile ? /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: "2xs", children: t("orderEntry.estLiqPrice") }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
886
|
+
ui.Tooltip,
|
|
887
|
+
{
|
|
888
|
+
content: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-min-w-[204px] oui-max-w-[280px] oui-text-2xs oui-leading-normal oui-text-base-contrast-80", children: [
|
|
889
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-text-pretty", children: t("common.liquidationPrice.tooltip") }),
|
|
890
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
891
|
+
"a",
|
|
892
|
+
{
|
|
893
|
+
href: "https://orderly.network/docs/introduction/trade-on-orderly/perpetual-futures/liquidations",
|
|
894
|
+
target: "_blank",
|
|
895
|
+
rel: "noopener noreferrer",
|
|
896
|
+
className: "oui-text-primary oui-underline",
|
|
897
|
+
children: t("common.liquidationPrice.tooltip.learnMore")
|
|
898
|
+
}
|
|
899
|
+
) })
|
|
900
|
+
] }),
|
|
901
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
902
|
+
ui.Text,
|
|
903
|
+
{
|
|
904
|
+
size: "2xs",
|
|
905
|
+
className: "oui-cursor-pointer oui-border-b oui-border-dashed oui-border-line-12",
|
|
906
|
+
children: t("orderEntry.estLiqPrice")
|
|
907
|
+
}
|
|
908
|
+
)
|
|
909
|
+
}
|
|
910
|
+
),
|
|
885
911
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
886
912
|
ui.Text.numeral,
|
|
887
913
|
{
|
|
@@ -3567,8 +3593,7 @@ var usePNLInputBuilder = (props) => {
|
|
|
3567
3593
|
value = value.startsWith("-") ? value : "-" + value;
|
|
3568
3594
|
}
|
|
3569
3595
|
}
|
|
3570
|
-
if (value === "" || value === "-")
|
|
3571
|
-
return "";
|
|
3596
|
+
if (value === "" || value === "-") return "";
|
|
3572
3597
|
if (mode === "Offset%" /* PERCENTAGE */) {
|
|
3573
3598
|
return `${new utils.Decimal(
|
|
3574
3599
|
value.replace(
|
|
@@ -3602,8 +3627,7 @@ var usePNLInputBuilder = (props) => {
|
|
|
3602
3627
|
} else {
|
|
3603
3628
|
value = utils.todpIfNeed(value, dp);
|
|
3604
3629
|
}
|
|
3605
|
-
if (value === "" || value === "-")
|
|
3606
|
-
return "";
|
|
3630
|
+
if (value === "" || value === "-") return "";
|
|
3607
3631
|
return value;
|
|
3608
3632
|
}
|
|
3609
3633
|
};
|
|
@@ -3978,8 +4002,7 @@ var TPSLTriggerPriceInput = (props) => {
|
|
|
3978
4002
|
const triggerPriceToolTipEle = React3.useMemo(() => {
|
|
3979
4003
|
if (props.error && (errorMsgVisible || props.displayErrorMessage))
|
|
3980
4004
|
return props.error;
|
|
3981
|
-
if (tipVisible)
|
|
3982
|
-
return tipsEle;
|
|
4005
|
+
if (tipVisible) return tipsEle;
|
|
3983
4006
|
return null;
|
|
3984
4007
|
}, [
|
|
3985
4008
|
props.error,
|
|
@@ -4136,9 +4159,9 @@ var OrderEntry = (props) => {
|
|
|
4136
4159
|
const [showTPSLAdvanced, setShowTPSLAdvanced] = React3.useState(false);
|
|
4137
4160
|
const [hidden, setHidden] = hooks.useLocalStorage("orderly-order-hidden", false);
|
|
4138
4161
|
const [slippage, setSlippage] = hooks.useLocalStorage("orderly-slippage", "1", {
|
|
4139
|
-
parseJSON: (value) => {
|
|
4162
|
+
parseJSON: ((value) => {
|
|
4140
4163
|
return !value || value === '""' ? "1" : JSON.parse(value);
|
|
4141
|
-
}
|
|
4164
|
+
})
|
|
4142
4165
|
});
|
|
4143
4166
|
const { notification } = hooks.useOrderlyContext();
|
|
4144
4167
|
const soundAlertId = React3.useId();
|
|
@@ -5004,5 +5027,5 @@ exports.OrderConfirmDialog = OrderConfirmDialog;
|
|
|
5004
5027
|
exports.OrderEntry = OrderEntry;
|
|
5005
5028
|
exports.OrderEntryWidget = OrderEntryWidget;
|
|
5006
5029
|
exports.useOrderEntryScript = useOrderEntryScript;
|
|
5007
|
-
//# sourceMappingURL=
|
|
5030
|
+
//# sourceMappingURL=index.js.map
|
|
5008
5031
|
//# sourceMappingURL=index.js.map
|