oraculo-ui 0.1.5 → 0.1.6
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 -17
- package/dist/index.mjs +19 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -318,7 +318,7 @@ function OraculoGameRankCard({
|
|
|
318
318
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
319
319
|
"img",
|
|
320
320
|
{
|
|
321
|
-
src: imageUrl
|
|
321
|
+
src: `https://olimpo.bet${imageUrl}`,
|
|
322
322
|
alt: "Juego de casino",
|
|
323
323
|
loading: "lazy",
|
|
324
324
|
style: {
|
|
@@ -978,6 +978,7 @@ function OraculoSeccionDestacados({
|
|
|
978
978
|
}
|
|
979
979
|
|
|
980
980
|
// src/organisms/OraculoSeccionTopJuegos/OraculoSeccionTopJuegos.tsx
|
|
981
|
+
var import_react3 = require("react");
|
|
981
982
|
var import_Stack = __toESM(require("@mui/material/Stack"));
|
|
982
983
|
var import_Box6 = __toESM(require("@mui/material/Box"));
|
|
983
984
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
@@ -987,6 +988,21 @@ function OraculoSeccionTopJuegos({
|
|
|
987
988
|
iconUrl,
|
|
988
989
|
onCardClick
|
|
989
990
|
}) {
|
|
991
|
+
const normalizedItems = (0, import_react3.useMemo)(
|
|
992
|
+
() => items.map((item, index) => {
|
|
993
|
+
var _a;
|
|
994
|
+
return {
|
|
995
|
+
...item,
|
|
996
|
+
// si no viene orden, usamos el índice (1-based)
|
|
997
|
+
orden: (_a = item.orden) != null ? _a : index + 1,
|
|
998
|
+
_originalIndex: index
|
|
999
|
+
};
|
|
1000
|
+
}).sort((a, b) => {
|
|
1001
|
+
if (a.orden != null && b.orden != null) return a.orden - b.orden;
|
|
1002
|
+
return a._originalIndex - b._originalIndex;
|
|
1003
|
+
}),
|
|
1004
|
+
[items]
|
|
1005
|
+
);
|
|
990
1006
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("section", { style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_Stack.default, { direction: "column", spacing: 2, useFlexGap: true, children: [
|
|
991
1007
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(OraculoSectionTitle, { title, iconUrl, size: "md" }),
|
|
992
1008
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
@@ -1002,11 +1018,11 @@ function OraculoSeccionTopJuegos({
|
|
|
1002
1018
|
justifyItems: "center",
|
|
1003
1019
|
width: "100%"
|
|
1004
1020
|
},
|
|
1005
|
-
children:
|
|
1021
|
+
children: normalizedItems.slice(0, 6).map((juego) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1006
1022
|
OraculoGameRankCard,
|
|
1007
1023
|
{
|
|
1008
1024
|
imageUrl: juego.logo || "",
|
|
1009
|
-
orden: juego.orden
|
|
1025
|
+
orden: juego.orden,
|
|
1010
1026
|
onClick: () => onCardClick == null ? void 0 : onCardClick(juego)
|
|
1011
1027
|
},
|
|
1012
1028
|
juego.machine
|
|
@@ -1170,7 +1186,7 @@ var OraculoSeccionCasinoEnVivo = ({
|
|
|
1170
1186
|
var OraculoSeccionCasinoEnVivo_default = OraculoSeccionCasinoEnVivo;
|
|
1171
1187
|
|
|
1172
1188
|
// src/organisms/OraculoSeccionCasino/OraculoSeccionCasino.tsx
|
|
1173
|
-
var
|
|
1189
|
+
var import_react4 = require("react");
|
|
1174
1190
|
var import_Stack3 = __toESM(require("@mui/material/Stack"));
|
|
1175
1191
|
var import_Box8 = __toESM(require("@mui/material/Box"));
|
|
1176
1192
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
@@ -1214,8 +1230,8 @@ var OraculoSeccionCasino = ({
|
|
|
1214
1230
|
mosaicFirst = true,
|
|
1215
1231
|
gridSize = 4
|
|
1216
1232
|
}) => {
|
|
1217
|
-
const carouselRef = (0,
|
|
1218
|
-
const [navState, setNavState] = (0,
|
|
1233
|
+
const carouselRef = (0, import_react4.useRef)(null);
|
|
1234
|
+
const [navState, setNavState] = (0, import_react4.useState)({ isStart: true, isEnd: false });
|
|
1219
1235
|
const slides = buildCasinoSlides(items, mosaicFirst, gridSize);
|
|
1220
1236
|
const handlePrev = () => {
|
|
1221
1237
|
var _a;
|
|
@@ -1326,7 +1342,7 @@ var OraculoSeccionCasino = ({
|
|
|
1326
1342
|
var OraculoSeccionCasino_default = OraculoSeccionCasino;
|
|
1327
1343
|
|
|
1328
1344
|
// src/organisms/OraculoSeccionVirtuales/OraculoSeccionVirtuales.tsx
|
|
1329
|
-
var
|
|
1345
|
+
var import_react5 = require("react");
|
|
1330
1346
|
var import_Stack4 = __toESM(require("@mui/material/Stack"));
|
|
1331
1347
|
var import_Box9 = __toESM(require("@mui/material/Box"));
|
|
1332
1348
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
@@ -1370,8 +1386,8 @@ var OraculoSeccionVirtuales = ({
|
|
|
1370
1386
|
mosaicFirst = true,
|
|
1371
1387
|
gridSize = 4
|
|
1372
1388
|
}) => {
|
|
1373
|
-
const carouselRef = (0,
|
|
1374
|
-
const [navState, setNavState] = (0,
|
|
1389
|
+
const carouselRef = (0, import_react5.useRef)(null);
|
|
1390
|
+
const [navState, setNavState] = (0, import_react5.useState)({ isStart: true, isEnd: false });
|
|
1375
1391
|
const slides = buildVirtualSlides(items, mosaicFirst, gridSize);
|
|
1376
1392
|
const handlePrev = () => {
|
|
1377
1393
|
var _a;
|
|
@@ -1483,7 +1499,7 @@ var OraculoSeccionVirtuales = ({
|
|
|
1483
1499
|
var OraculoSeccionVirtuales_default = OraculoSeccionVirtuales;
|
|
1484
1500
|
|
|
1485
1501
|
// src/organisms/OraculoSeccionBonoBienvenida/OraculoSeccionBonoBienvenida.tsx
|
|
1486
|
-
var
|
|
1502
|
+
var import_react6 = require("react");
|
|
1487
1503
|
var import_Box10 = __toESM(require("@mui/material/Box"));
|
|
1488
1504
|
var import_Typography4 = __toESM(require("@mui/material/Typography"));
|
|
1489
1505
|
var import_useMediaQuery = __toESM(require("@mui/material/useMediaQuery"));
|
|
@@ -1539,9 +1555,9 @@ var OraculoSeccionBonoBienvenida = ({
|
|
|
1539
1555
|
const showDots = items.length > 1;
|
|
1540
1556
|
const bgUrl = backgroundImageUrl != null ? backgroundImageUrl : "/assets/img/home/BonoBienvenida/Fondobg.png";
|
|
1541
1557
|
const sectionSx = buildSectionSx(bgUrl);
|
|
1542
|
-
const carouselRef = (0,
|
|
1543
|
-
const [navState, setNavState] = (0,
|
|
1544
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
1558
|
+
const carouselRef = (0, import_react6.useRef)(null);
|
|
1559
|
+
const [navState, setNavState] = (0, import_react6.useState)({ isStart: true, isEnd: false });
|
|
1560
|
+
const [activeIndex, setActiveIndex] = (0, import_react6.useState)(0);
|
|
1545
1561
|
if (isMobile) {
|
|
1546
1562
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1547
1563
|
import_Box10.default,
|
|
@@ -1673,7 +1689,7 @@ var OraculoSeccionBonoBienvenida = ({
|
|
|
1673
1689
|
var OraculoSeccionBonoBienvenida_default = OraculoSeccionBonoBienvenida;
|
|
1674
1690
|
|
|
1675
1691
|
// src/organisms/OraculoSeccionClubOlimpo/OraculoSeccionClubOlimpo.tsx
|
|
1676
|
-
var
|
|
1692
|
+
var import_react7 = require("react");
|
|
1677
1693
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1678
1694
|
var OraculoSeccionClubOlimpo = ({
|
|
1679
1695
|
className = "",
|
|
@@ -1682,12 +1698,12 @@ var OraculoSeccionClubOlimpo = ({
|
|
|
1682
1698
|
selectedIndex = 0,
|
|
1683
1699
|
ariaLabel
|
|
1684
1700
|
}) => {
|
|
1685
|
-
const rootRef = (0,
|
|
1686
|
-
const bottomRef = (0,
|
|
1701
|
+
const rootRef = (0, import_react7.useRef)(null);
|
|
1702
|
+
const bottomRef = (0, import_react7.useRef)(null);
|
|
1687
1703
|
if (!items) return null;
|
|
1688
1704
|
const safeIndex = Math.min(Math.max(selectedIndex, 0), 1);
|
|
1689
1705
|
const item = items;
|
|
1690
|
-
(0,
|
|
1706
|
+
(0, import_react7.useLayoutEffect)(() => {
|
|
1691
1707
|
if (!rootRef.current || !bottomRef.current) return;
|
|
1692
1708
|
if (typeof ResizeObserver === "undefined") return;
|
|
1693
1709
|
const root = rootRef.current;
|
package/dist/index.mjs
CHANGED
|
@@ -272,7 +272,7 @@ function OraculoGameRankCard({
|
|
|
272
272
|
/* @__PURE__ */ jsx5(
|
|
273
273
|
"img",
|
|
274
274
|
{
|
|
275
|
-
src: imageUrl
|
|
275
|
+
src: `https://olimpo.bet${imageUrl}`,
|
|
276
276
|
alt: "Juego de casino",
|
|
277
277
|
loading: "lazy",
|
|
278
278
|
style: {
|
|
@@ -932,6 +932,7 @@ function OraculoSeccionDestacados({
|
|
|
932
932
|
}
|
|
933
933
|
|
|
934
934
|
// src/organisms/OraculoSeccionTopJuegos/OraculoSeccionTopJuegos.tsx
|
|
935
|
+
import { useMemo } from "react";
|
|
935
936
|
import Stack from "@mui/material/Stack";
|
|
936
937
|
import Box6 from "@mui/material/Box";
|
|
937
938
|
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
@@ -941,6 +942,21 @@ function OraculoSeccionTopJuegos({
|
|
|
941
942
|
iconUrl,
|
|
942
943
|
onCardClick
|
|
943
944
|
}) {
|
|
945
|
+
const normalizedItems = useMemo(
|
|
946
|
+
() => items.map((item, index) => {
|
|
947
|
+
var _a;
|
|
948
|
+
return {
|
|
949
|
+
...item,
|
|
950
|
+
// si no viene orden, usamos el índice (1-based)
|
|
951
|
+
orden: (_a = item.orden) != null ? _a : index + 1,
|
|
952
|
+
_originalIndex: index
|
|
953
|
+
};
|
|
954
|
+
}).sort((a, b) => {
|
|
955
|
+
if (a.orden != null && b.orden != null) return a.orden - b.orden;
|
|
956
|
+
return a._originalIndex - b._originalIndex;
|
|
957
|
+
}),
|
|
958
|
+
[items]
|
|
959
|
+
);
|
|
944
960
|
return /* @__PURE__ */ jsx12("section", { style: { width: "100%" }, children: /* @__PURE__ */ jsxs9(Stack, { direction: "column", spacing: 2, useFlexGap: true, children: [
|
|
945
961
|
/* @__PURE__ */ jsx12(OraculoSectionTitle, { title, iconUrl, size: "md" }),
|
|
946
962
|
/* @__PURE__ */ jsx12(
|
|
@@ -956,11 +972,11 @@ function OraculoSeccionTopJuegos({
|
|
|
956
972
|
justifyItems: "center",
|
|
957
973
|
width: "100%"
|
|
958
974
|
},
|
|
959
|
-
children:
|
|
975
|
+
children: normalizedItems.slice(0, 6).map((juego) => /* @__PURE__ */ jsx12(
|
|
960
976
|
OraculoGameRankCard,
|
|
961
977
|
{
|
|
962
978
|
imageUrl: juego.logo || "",
|
|
963
|
-
orden: juego.orden
|
|
979
|
+
orden: juego.orden,
|
|
964
980
|
onClick: () => onCardClick == null ? void 0 : onCardClick(juego)
|
|
965
981
|
},
|
|
966
982
|
juego.machine
|