@kodiak-finance/orderly-trading-leaderboard 2.8.21-alpha.0 → 2.8.21-beta.3
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 +14 -56
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -57
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -514,61 +514,19 @@ var init_column = __esm({
|
|
|
514
514
|
);
|
|
515
515
|
};
|
|
516
516
|
PnLColumnTitle = ({ type }) => {
|
|
517
|
-
const { isMobile } = orderlyUi.useScreen();
|
|
518
517
|
const { t } = orderlyI18n.useTranslation();
|
|
519
|
-
const
|
|
520
|
-
|
|
521
|
-
orderlyUi.modal.alert({
|
|
522
|
-
title: t("common.tips"),
|
|
523
|
-
message: tooltipContent
|
|
524
|
-
});
|
|
525
|
-
});
|
|
526
|
-
const view = /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Flex, { gap: 1, children: [
|
|
527
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: type === "general" ? t("common.realizedPnl") : t("common.pnl") }),
|
|
528
|
-
/* @__PURE__ */ jsxRuntime.jsx(orderlyUi.InfoCircleIcon, { opacity: 1, className: "w-4 h-4 cursor-pointer" })
|
|
529
|
-
] });
|
|
530
|
-
if (isMobile) {
|
|
531
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...longPress, children: view });
|
|
532
|
-
}
|
|
533
|
-
return /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Tooltip, { content: tooltipContent, children: view });
|
|
518
|
+
const view = /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Flex, { gap: 1, children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: type === "general" ? t("common.realizedPnl") : t("common.pnl") }) });
|
|
519
|
+
return view;
|
|
534
520
|
};
|
|
535
521
|
VolumeColumnTitle = () => {
|
|
536
|
-
const { isMobile } = orderlyUi.useScreen();
|
|
537
522
|
const { t } = orderlyI18n.useTranslation();
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
orderlyUi.modal.alert({
|
|
541
|
-
title: t("common.tips"),
|
|
542
|
-
message: tooltipContent
|
|
543
|
-
});
|
|
544
|
-
});
|
|
545
|
-
const view = /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Flex, { gap: 1, children: [
|
|
546
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: t("tradingLeaderboard.tradingVolume") }),
|
|
547
|
-
/* @__PURE__ */ jsxRuntime.jsx(orderlyUi.InfoCircleIcon, { opacity: 1, className: "w-4 h-4 cursor-pointer" })
|
|
548
|
-
] });
|
|
549
|
-
if (isMobile) {
|
|
550
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...longPress, children: view });
|
|
551
|
-
}
|
|
552
|
-
return /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Tooltip, { content: tooltipContent, children: view });
|
|
523
|
+
const view = /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Flex, { gap: 1, children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: t("tradingLeaderboard.tradingVolume") }) });
|
|
524
|
+
return view;
|
|
553
525
|
};
|
|
554
526
|
PointsColumnTitle = () => {
|
|
555
|
-
const { isMobile } = orderlyUi.useScreen();
|
|
556
527
|
const { t } = orderlyI18n.useTranslation();
|
|
557
|
-
const
|
|
558
|
-
|
|
559
|
-
orderlyUi.modal.alert({
|
|
560
|
-
title: t("common.tips"),
|
|
561
|
-
message: tooltipContent
|
|
562
|
-
});
|
|
563
|
-
});
|
|
564
|
-
const view = /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Flex, { gap: 1, children: [
|
|
565
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: t("tradingLeaderboard.points") }),
|
|
566
|
-
/* @__PURE__ */ jsxRuntime.jsx(orderlyUi.InfoCircleIcon, { opacity: 1, className: "w-4 h-4 cursor-pointer" })
|
|
567
|
-
] });
|
|
568
|
-
if (isMobile) {
|
|
569
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...longPress, children: view });
|
|
570
|
-
}
|
|
571
|
-
return /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Tooltip, { content: tooltipContent, children: view });
|
|
528
|
+
const view = /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Flex, { gap: 1, children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: t("tradingLeaderboard.points") }) });
|
|
529
|
+
return view;
|
|
572
530
|
};
|
|
573
531
|
}
|
|
574
532
|
});
|
|
@@ -1198,7 +1156,7 @@ var BrokerStatsWidget = ({ dateRange }) => {
|
|
|
1198
1156
|
{ key: "pnl", label: "PnL", value: stats?.pnl || 0, icon: "pnl" }
|
|
1199
1157
|
];
|
|
1200
1158
|
}, [stats]);
|
|
1201
|
-
const statsToDisplay =
|
|
1159
|
+
const statsToDisplay = allStats;
|
|
1202
1160
|
if (error) {
|
|
1203
1161
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full oui-mx-auto oui-mb-6 oui-max-w-[992px]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-text-center oui-text-sm oui-text-red-500", children: "Failed to load statistics" }) });
|
|
1204
1162
|
}
|
|
@@ -1296,19 +1254,19 @@ var StatCardComponent = ({
|
|
|
1296
1254
|
};
|
|
1297
1255
|
const iconStyles = getIconStyles();
|
|
1298
1256
|
const valueColor = isPnL ? isPositive ? "#22c55e" : "#ef4444" : "inherit";
|
|
1299
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-rounded-lg oui-border oui-border-base-4 oui-bg-base-8 oui-p-4 oui-transition-all", children: [
|
|
1300
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-mb-3 oui-flex oui-items-start oui-gap-3", children: [
|
|
1257
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-rounded-lg oui-border oui-border-base-4 oui-bg-base-8 oui-p-3 md:oui-p-4 oui-transition-all", children: [
|
|
1258
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-mb-2 md:oui-mb-3 oui-flex oui-items-start oui-gap-2 md:oui-gap-3", children: [
|
|
1301
1259
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1302
1260
|
"div",
|
|
1303
1261
|
{
|
|
1304
|
-
className: "oui-flex oui-shrink-0 oui-items-center oui-justify-center oui-rounded-md oui-p-2",
|
|
1262
|
+
className: "oui-flex oui-shrink-0 oui-items-center oui-justify-center oui-rounded-md oui-p-1.5 md:oui-p-2",
|
|
1305
1263
|
style: iconStyles,
|
|
1306
1264
|
children: isPnL ? getPnLIcon(isPositive) : STAT_ICON_MAP[stat.icon]
|
|
1307
1265
|
}
|
|
1308
1266
|
),
|
|
1309
1267
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-flex oui-flex-col", children: [
|
|
1310
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "oui-text-sm oui-font-medium oui-text-base-contrast", children: stat.label }),
|
|
1311
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "oui-text-base-contrast-60 oui-text-xs", children: [
|
|
1268
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "oui-text-xs md:oui-text-sm oui-font-medium oui-text-base-contrast", children: stat.label }),
|
|
1269
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "oui-text-base-contrast-60 oui-text-2xs md:oui-text-xs", children: [
|
|
1312
1270
|
"(",
|
|
1313
1271
|
getDateRangeLabel(dateRange),
|
|
1314
1272
|
")"
|
|
@@ -1318,8 +1276,8 @@ var StatCardComponent = ({
|
|
|
1318
1276
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1319
1277
|
"div",
|
|
1320
1278
|
{
|
|
1321
|
-
className: "oui-text-xl oui-font-bold",
|
|
1322
|
-
style: { color: valueColor, minHeight: "
|
|
1279
|
+
className: "oui-text-lg md:oui-text-xl oui-font-bold",
|
|
1280
|
+
style: { color: valueColor, minHeight: "28px" },
|
|
1323
1281
|
children: loading ? /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Spinner, { size: "sm", color: "primary" }) : formatCurrency(stat.value, isPnL)
|
|
1324
1282
|
}
|
|
1325
1283
|
)
|