@orderly.network/ui-order-entry 2.8.10 → 2.8.11-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 +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.mjs
CHANGED
|
@@ -873,9 +873,35 @@ var SlippageUI = (props) => {
|
|
|
873
873
|
function AssetInfo(props) {
|
|
874
874
|
const { canTrade, disableFeatures, orderType, symbol } = props;
|
|
875
875
|
const { t } = useTranslation();
|
|
876
|
+
const { isMobile } = useScreen();
|
|
876
877
|
return /* @__PURE__ */ jsxs("div", { className: "oui-space-y-[2px] xl:oui-space-y-1", children: [
|
|
877
878
|
/* @__PURE__ */ jsxs(Flex, { justify: "between", children: [
|
|
878
|
-
/* @__PURE__ */ jsx(Text, { size: "2xs", children: t("orderEntry.estLiqPrice") })
|
|
879
|
+
isMobile ? /* @__PURE__ */ jsx(Text, { size: "2xs", children: t("orderEntry.estLiqPrice") }) : /* @__PURE__ */ jsx(
|
|
880
|
+
Tooltip,
|
|
881
|
+
{
|
|
882
|
+
content: /* @__PURE__ */ jsxs("div", { className: "oui-min-w-[204px] oui-max-w-[280px] oui-text-2xs oui-leading-normal oui-text-base-contrast-80", children: [
|
|
883
|
+
/* @__PURE__ */ jsx("div", { className: "oui-text-pretty", children: t("common.liquidationPrice.tooltip") }),
|
|
884
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
885
|
+
"a",
|
|
886
|
+
{
|
|
887
|
+
href: "https://orderly.network/docs/introduction/trade-on-orderly/perpetual-futures/liquidations",
|
|
888
|
+
target: "_blank",
|
|
889
|
+
rel: "noopener noreferrer",
|
|
890
|
+
className: "oui-text-primary oui-underline",
|
|
891
|
+
children: t("common.liquidationPrice.tooltip.learnMore")
|
|
892
|
+
}
|
|
893
|
+
) })
|
|
894
|
+
] }),
|
|
895
|
+
children: /* @__PURE__ */ jsx(
|
|
896
|
+
Text,
|
|
897
|
+
{
|
|
898
|
+
size: "2xs",
|
|
899
|
+
className: "oui-cursor-pointer oui-border-b oui-border-dashed oui-border-line-12",
|
|
900
|
+
children: t("orderEntry.estLiqPrice")
|
|
901
|
+
}
|
|
902
|
+
)
|
|
903
|
+
}
|
|
904
|
+
),
|
|
879
905
|
/* @__PURE__ */ jsx(
|
|
880
906
|
Text.numeral,
|
|
881
907
|
{
|
|
@@ -3561,8 +3587,7 @@ var usePNLInputBuilder = (props) => {
|
|
|
3561
3587
|
value = value.startsWith("-") ? value : "-" + value;
|
|
3562
3588
|
}
|
|
3563
3589
|
}
|
|
3564
|
-
if (value === "" || value === "-")
|
|
3565
|
-
return "";
|
|
3590
|
+
if (value === "" || value === "-") return "";
|
|
3566
3591
|
if (mode === "Offset%" /* PERCENTAGE */) {
|
|
3567
3592
|
return `${new Decimal(
|
|
3568
3593
|
value.replace(
|
|
@@ -3596,8 +3621,7 @@ var usePNLInputBuilder = (props) => {
|
|
|
3596
3621
|
} else {
|
|
3597
3622
|
value = todpIfNeed(value, dp);
|
|
3598
3623
|
}
|
|
3599
|
-
if (value === "" || value === "-")
|
|
3600
|
-
return "";
|
|
3624
|
+
if (value === "" || value === "-") return "";
|
|
3601
3625
|
return value;
|
|
3602
3626
|
}
|
|
3603
3627
|
};
|
|
@@ -3972,8 +3996,7 @@ var TPSLTriggerPriceInput = (props) => {
|
|
|
3972
3996
|
const triggerPriceToolTipEle = useMemo(() => {
|
|
3973
3997
|
if (props.error && (errorMsgVisible || props.displayErrorMessage))
|
|
3974
3998
|
return props.error;
|
|
3975
|
-
if (tipVisible)
|
|
3976
|
-
return tipsEle;
|
|
3999
|
+
if (tipVisible) return tipsEle;
|
|
3977
4000
|
return null;
|
|
3978
4001
|
}, [
|
|
3979
4002
|
props.error,
|
|
@@ -4130,9 +4153,9 @@ var OrderEntry = (props) => {
|
|
|
4130
4153
|
const [showTPSLAdvanced, setShowTPSLAdvanced] = useState(false);
|
|
4131
4154
|
const [hidden, setHidden] = useLocalStorage("orderly-order-hidden", false);
|
|
4132
4155
|
const [slippage, setSlippage] = useLocalStorage("orderly-slippage", "1", {
|
|
4133
|
-
parseJSON: (value) => {
|
|
4156
|
+
parseJSON: ((value) => {
|
|
4134
4157
|
return !value || value === '""' ? "1" : JSON.parse(value);
|
|
4135
|
-
}
|
|
4158
|
+
})
|
|
4136
4159
|
});
|
|
4137
4160
|
const { notification } = useOrderlyContext();
|
|
4138
4161
|
const soundAlertId = useId();
|
|
@@ -4992,5 +5015,5 @@ var OrderEntryWidget = (props) => {
|
|
|
4992
5015
|
};
|
|
4993
5016
|
|
|
4994
5017
|
export { AdditionalInfo, FeesWidget, LTVRiskTooltipWidget, OrderConfirmDialog, OrderEntry, OrderEntryWidget, useOrderEntryScript };
|
|
4995
|
-
//# sourceMappingURL=
|
|
5018
|
+
//# sourceMappingURL=index.mjs.map
|
|
4996
5019
|
//# sourceMappingURL=index.mjs.map
|