@ludo.ninja/components 2.2.12 → 2.2.14
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/build/components/Page404/Page404SPA.js +10 -5
- package/build/components/Page500/index.js +13 -9
- package/build/components/assetPage/viewer3D/index.js +21 -20
- package/build/components/search/searchSuggestions/index.d.ts +3 -3
- package/build/components/search/searchSuggestions/index.js +22 -19
- package/build/components/shareDialog/index.js +11 -19
- package/build/components/sidebar/data.js +13 -23
- package/build/components/sidebar/icons.d.ts +8 -0
- package/build/components/sidebar/icons.js +20 -0
- package/build/components/sidebar/index.js +10 -9
- package/build/components/sidebar/sidebarSpa.d.ts +1 -1
- package/build/components/sidebar/sidebarSpa.js +8 -7
- package/build/dto/AssetEntity/views/AssetImage/index.d.ts +1 -1
- package/build/dto/AssetEntity/views/AssetImage/index.js +5 -4
- package/build/dto/AssetEntity/views/AssetOther/index.d.ts +1 -1
- package/build/dto/AssetEntity/views/AssetOther/index.js +4 -5
- package/build/dto/AssetEntity/views/AssetScreenshot/index.d.ts +1 -1
- package/build/dto/AssetEntity/views/AssetScreenshot/index.js +5 -4
- package/build/dto/common/ItemViews/CreationAudio/index.d.ts +1 -1
- package/build/dto/common/ItemViews/CreationAudio/index.js +4 -3
- package/build/dto/common/ItemViews/CreationImage/index.d.ts +1 -1
- package/build/dto/common/ItemViews/CreationImage/index.js +4 -3
- package/build/dto/common/ItemViews/CreationOther/index.d.ts +1 -1
- package/build/dto/common/ItemViews/CreationOther/index.js +4 -3
- package/build/dto/common/ItemViews/CreationVideo/index.d.ts +1 -1
- package/build/dto/common/ItemViews/CreationVideo/index.js +4 -3
- package/build/dto/common/Media/Urls/index.js +15 -14
- package/build/modules/gallery/ui/GalleryDeleteIcon.d.ts +1 -1
- package/build/modules/gallery/ui/GalleryDeleteIcon.js +17 -15
- package/build/modules/gallery/ui/chooseGalleryItems/chooseGalleryItem/index.js +16 -11
- package/build/modules/gallery/ui/itemsPreview/index.d.ts +1 -1
- package/build/modules/gallery/ui/itemsPreview/index.js +16 -21
- package/build/system/Cards/CardCheckbox/index.d.ts +1 -1
- package/build/system/Cards/CardCheckbox/index.js +8 -7
- package/build/system/Cards/MultiMediaCard/index.js +16 -24
- package/build/system/Forms/Selects/DesktopSelect/index.d.ts +2 -2
- package/build/system/Forms/Selects/DesktopSelect/index.js +9 -13
- package/build/system/Img/ImageInterceptor/ImageInterceptor.test.js +18 -17
- package/build/system/Img/ImageInterceptor/index.d.ts +1 -1
- package/build/system/Img/ImageInterceptor/index.js +3 -2
- package/build/system/Img/Userpic/UserPicSpa.d.ts +2 -2
- package/build/system/Img/Userpic/UserPicSpa.js +15 -17
- package/build/system/Img/Userpic/index.js +9 -12
- package/build/system/Labels/ExperienceLabel/index.d.ts +1 -1
- package/build/system/Labels/ExperienceLabel/index.js +9 -9
- package/build/system/Modals/Modal/index.js +4 -4
- package/build/system/Modals/ModalSidebar/ModalSidebarPortal.d.ts +2 -2
- package/build/system/Modals/ModalSidebar/ModalSidebarPortal.js +3 -3
- package/build/system/Modals/ModalSidebar/index.js +4 -4
- package/build/system/ShareIconResize.js +9 -9
- package/build/system/Tabs/TabsData/AdminTabs/index.d.ts +7 -0
- package/build/system/Tabs/TabsData/AdminTabs/index.js +42 -0
- package/build/system/Tabs/TabsData/BasicTabs/index.d.ts +6 -0
- package/build/system/Tabs/TabsData/BasicTabs/index.js +132 -0
- package/package.json +1 -1
- package/build/public/404/404.js +0 -39
- package/build/public/500/500.js +0 -39
- package/build/public/alerts/close.js +0 -27
- package/build/public/alerts/errorIcon.js +0 -31
- package/build/public/alerts/successIcon.js +0 -31
- package/build/public/alerts/warningIcon.js +0 -43
- package/build/public/assetPage/arrow.js +0 -25
- package/build/public/banner/banner_img.js +0 -1
- package/build/public/banner/banner_stroke.js +0 -24
- package/build/public/button_skin/accept.js +0 -38
- package/build/public/button_skin/decline.js +0 -38
- package/build/public/defaultUserpics/0.js +0 -75
- package/build/public/defaultUserpics/1.js +0 -78
- package/build/public/defaultUserpics/10.js +0 -75
- package/build/public/defaultUserpics/11.js +0 -75
- package/build/public/defaultUserpics/12.js +0 -75
- package/build/public/defaultUserpics/13.js +0 -75
- package/build/public/defaultUserpics/14.js +0 -75
- package/build/public/defaultUserpics/15.js +0 -75
- package/build/public/defaultUserpics/16.js +0 -75
- package/build/public/defaultUserpics/17.js +0 -75
- package/build/public/defaultUserpics/18.js +0 -75
- package/build/public/defaultUserpics/19.js +0 -75
- package/build/public/defaultUserpics/2.js +0 -75
- package/build/public/defaultUserpics/20.js +0 -75
- package/build/public/defaultUserpics/3.js +0 -75
- package/build/public/defaultUserpics/4.js +0 -75
- package/build/public/defaultUserpics/5.js +0 -75
- package/build/public/defaultUserpics/6.js +0 -75
- package/build/public/defaultUserpics/7.js +0 -75
- package/build/public/defaultUserpics/8.js +0 -75
- package/build/public/defaultUserpics/9.js +0 -75
- package/build/public/defaultUserpics/defaultUserpic.js +0 -91
- package/build/public/forms/checkbox/checked.js +0 -30
- package/build/public/formsBg/get_early_access_bg.jpg +0 -0
- package/build/public/gallery/defaultImage.js +0 -24
- package/build/public/gallery/delete.js +0 -30
- package/build/public/iconButton/share.js +0 -40
- package/build/public/iconButton/trash.js +0 -36
- package/build/public/iconButton/trash_open.js +0 -42
- package/build/public/modal/close.js +0 -25
- package/build/public/noContent/noContent.js +0 -37
- package/build/public/noContent/noContentAudio.js +0 -114
- package/build/public/noContent/noContentObject.js +0 -117
- package/build/public/rewardsPage/XP_logo.js +0 -74
- package/build/public/rewardsPage/arrow_up_light.js +0 -25
- package/build/public/rewardsPage/banner_rewards.js +0 -1
- package/build/public/rewardsPage/banner_rewards_mobile.js +0 -1
- package/build/public/rewardsPage/banner_rewards_tablet.js +0 -1
- package/build/public/rewardsPage/banner_seasons.js +0 -1
- package/build/public/rewardsPage/defaultUserPic.js +0 -1
- package/build/public/rewardsPage/ludo_logo_white.js +0 -159
- package/build/public/selects/arrow_down.js +0 -25
- package/build/public/share/copy-link-btn.js +0 -39
- package/build/public/share/email-btn.js +0 -33
- package/build/public/share/facebook-btn.js +0 -30
- package/build/public/share/insta-btn.js +0 -70
- package/build/public/share/reddit-btn.js +0 -36
- package/build/public/share/telegram-btn.js +0 -25
- package/build/public/share/twitter-btn.js +0 -34
- package/build/public/share/whatsapp-btn.js +0 -35
- package/build/public/sidebar/aboutLudo.js +0 -139
- package/build/public/sidebar/aboutLudoDark.js +0 -139
- package/build/public/sidebar/api.js +0 -24
- package/build/public/sidebar/close.js +0 -25
- package/build/public/sidebar/disconnect.js +0 -24
- package/build/public/sidebar/explore.js +0 -24
- package/build/public/sidebar/ludoX.js +0 -204
- package/build/public/sidebar/my-invites.js +0 -22
- package/build/public/sidebar/referralDashboard.js +0 -47
- package/build/public/sidebar/rewards.js +0 -22
- package/build/public/sidebar/submitNft.js +0 -24
- package/build/public/socials/facebook.js +0 -27
- package/build/public/socials/instagram.js +0 -30
- package/build/public/socials/twitter.js +0 -22
- package/build/public/socials/website.js +0 -44
|
@@ -4,10 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
-
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
9
7
|
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
10
8
|
const colors_1 = require("../../../styles/colors");
|
|
9
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
10
|
+
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
11
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
11
12
|
// Styles
|
|
12
13
|
const StyledCardCheckBox = styled_components_1.default.button `
|
|
13
14
|
display: flex;
|
|
@@ -34,9 +35,9 @@ const StyledCardCheckBox = styled_components_1.default.button `
|
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
&::after {
|
|
37
|
-
content:
|
|
38
|
+
content: "";
|
|
38
39
|
display: block;
|
|
39
|
-
background-image: url(
|
|
40
|
+
background-image: url("${constants_1.staticLink}/forms/checkbox/checked.svg");
|
|
40
41
|
background-size: cover;
|
|
41
42
|
background-repeat: no-repeat;
|
|
42
43
|
width: 32px;
|
|
@@ -76,13 +77,13 @@ const StyledCardCheckBox = styled_components_1.default.button `
|
|
|
76
77
|
}
|
|
77
78
|
`;
|
|
78
79
|
// Component
|
|
79
|
-
const CardCheckBox = ({ isActiveCheckbox, onChange
|
|
80
|
+
const CardCheckBox = ({ isActiveCheckbox, onChange }) => {
|
|
80
81
|
return ((0, jsx_runtime_1.jsx)(StyledCardCheckBox, { onClick: (e) => {
|
|
81
|
-
console.log(
|
|
82
|
+
console.log("StyledCardCheckBox click");
|
|
82
83
|
e.preventDefault();
|
|
83
84
|
e.stopPropagation();
|
|
84
85
|
onChange();
|
|
85
|
-
}, children: (0, jsx_runtime_1.jsx)("span", { className: `cardCustomCheckbox ${isActiveCheckbox ?
|
|
86
|
+
}, children: (0, jsx_runtime_1.jsx)("span", { className: `cardCustomCheckbox ${isActiveCheckbox ? "active" : ""}` }) }));
|
|
86
87
|
};
|
|
87
88
|
// Export
|
|
88
89
|
exports.default = CardCheckBox;
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
7
|
+
const CardCategory_1 = __importDefault(require("../CardContent/CardCategory"));
|
|
8
|
+
const CardImage_1 = __importDefault(require("../CardMedia/CardImage"));
|
|
9
|
+
const env_1 = require("../../../store/env");
|
|
10
10
|
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
11
11
|
const colors_1 = require("../../../styles/colors");
|
|
12
12
|
const boxShadow_1 = __importDefault(require("../../../styles/mixins/boxShadow"));
|
|
@@ -15,11 +15,11 @@ const CardContent_1 = __importDefault(require("../CardContent"));
|
|
|
15
15
|
const CardLikes_1 = __importDefault(require("../CardContent/CardLikes"));
|
|
16
16
|
const MultiHead_1 = __importDefault(require("../Styles/MultiHead"));
|
|
17
17
|
const index_1 = require("../../index");
|
|
18
|
-
const
|
|
19
|
-
const CardCategory_1 = __importDefault(require("../CardContent/CardCategory"));
|
|
20
|
-
const CardImage_1 = __importDefault(require("../CardMedia/CardImage"));
|
|
18
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
21
19
|
const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
|
|
22
|
-
const
|
|
20
|
+
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
21
|
+
const link_1 = __importDefault(require("next/link"));
|
|
22
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
23
23
|
// Styles
|
|
24
24
|
const StyledMultiCard = styled_components_1.default.div `
|
|
25
25
|
position: relative;
|
|
@@ -36,7 +36,7 @@ const StyledMultiCard = styled_components_1.default.div `
|
|
|
36
36
|
height: 100%;
|
|
37
37
|
aspect-ratio: 1 / 1;
|
|
38
38
|
|
|
39
|
-
& svg {
|
|
39
|
+
& .svg {
|
|
40
40
|
width: 100%;
|
|
41
41
|
height: 100%;
|
|
42
42
|
}
|
|
@@ -57,17 +57,12 @@ const StyledMultiCard = styled_components_1.default.div `
|
|
|
57
57
|
.media.digital {
|
|
58
58
|
position: relative;
|
|
59
59
|
|
|
60
|
-
& svg {
|
|
60
|
+
& .svg {
|
|
61
61
|
position: absolute;
|
|
62
62
|
width: 20px;
|
|
63
63
|
height: 20px;
|
|
64
64
|
bottom: 0;
|
|
65
65
|
right: 0;
|
|
66
|
-
|
|
67
|
-
& circle,
|
|
68
|
-
& path {
|
|
69
|
-
transform: scale(0.5);
|
|
70
|
-
}
|
|
71
66
|
}
|
|
72
67
|
}
|
|
73
68
|
|
|
@@ -83,7 +78,7 @@ const StyledMultiCard = styled_components_1.default.div `
|
|
|
83
78
|
}
|
|
84
79
|
|
|
85
80
|
.media.digital {
|
|
86
|
-
& svg {
|
|
81
|
+
& .svg {
|
|
87
82
|
width: ${(0, _4k_1.adaptiveValueCalc)(20)};
|
|
88
83
|
height: ${(0, _4k_1.adaptiveValueCalc)(20)};
|
|
89
84
|
}
|
|
@@ -93,9 +88,7 @@ const StyledMultiCard = styled_components_1.default.div `
|
|
|
93
88
|
// Component
|
|
94
89
|
const MultiMediaCard = ({ gallery, assets, collections, }) => {
|
|
95
90
|
const mediaTemplate = (mediaKey, media) => {
|
|
96
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: media.type?.name ===
|
|
97
|
-
? 'media digital'
|
|
98
|
-
: 'media', children: media }, mediaKey));
|
|
91
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: media.type?.name === "CardVideo" || media.type?.name === "CardAudio" ? "media digital" : "media", children: media }, mediaKey));
|
|
99
92
|
};
|
|
100
93
|
const renderMedia = () => {
|
|
101
94
|
// if (
|
|
@@ -110,24 +103,23 @@ const MultiMediaCard = ({ gallery, assets, collections, }) => {
|
|
|
110
103
|
const asset = assets?.find((asset) => {
|
|
111
104
|
return creationId === asset.getCreationId();
|
|
112
105
|
});
|
|
113
|
-
const collection = collections?.find((collection) => collection.getCreationId() ===
|
|
114
|
-
creationId?.split('.').splice(1).join('.'));
|
|
106
|
+
const collection = collections?.find((collection) => collection.getCreationId() === creationId?.split(".").splice(1).join("."));
|
|
115
107
|
if (asset) {
|
|
116
108
|
cardsMedia.push(mediaTemplate(i, asset.detectMediaType().displaySingleMedia()));
|
|
117
109
|
}
|
|
118
110
|
else if (collection) {
|
|
119
|
-
cardsMedia.push(mediaTemplate(i, (0, jsx_runtime_1.jsx)(CardImage_1.default, { alt: `${collection.getName()} ${collection.getAddress() ||
|
|
111
|
+
cardsMedia.push(mediaTemplate(i, (0, jsx_runtime_1.jsx)(CardImage_1.default, { alt: `${collection.getName()} ${collection.getAddress() || ""}`, imgSrc: collection.getOriginalUrls()?.[0] ?? "", errorImg: `${constants_1.staticLink}/public/noContent/noContent.svg` })));
|
|
120
112
|
}
|
|
121
113
|
else {
|
|
122
|
-
cardsMedia.push(mediaTemplate(i, (0, jsx_runtime_1.jsx)(
|
|
114
|
+
cardsMedia.push(mediaTemplate(i, (0, jsx_runtime_1.jsx)("img", { src: `${constants_1.staticLink}/public/gallery/defaultImage.svg`, alt: "gallery_default", className: "svg" })));
|
|
123
115
|
}
|
|
124
116
|
}
|
|
125
117
|
return cardsMedia;
|
|
126
118
|
};
|
|
127
|
-
const secondName = gallery.getGalleryUsername() !==
|
|
119
|
+
const secondName = gallery.getGalleryUsername() !== "" ? gallery.getGalleryUsername() : "";
|
|
128
120
|
// const userCreationAddresses = gallery?.getGalleryCreations()[0]?.getOwnersAddresses();
|
|
129
121
|
const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
|
|
130
|
-
return ((0, jsx_runtime_1.jsx)(StyledMultiCard, { children: (0, jsx_runtime_1.jsxs)(link_1.default, { href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"]}${gallery.getCreationLink()}`, children: [(0, jsx_runtime_1.jsx)(MultiHead_1.default, { children: renderMedia() }), (0, jsx_runtime_1.jsx)(CardContent_1.default, { firstName: gallery.getGalleryName(), secondName: secondName, wallets: gallery.getGalleryUserWallets(), isNeedShowMoreButton: false, itemId: gallery.getGalleryId(), children: (0, jsx_runtime_1.jsxs)(index_1.Flex, { alignItems: "flex-end", justifyContent:
|
|
122
|
+
return ((0, jsx_runtime_1.jsx)(StyledMultiCard, { children: (0, jsx_runtime_1.jsxs)(link_1.default, { href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"]}${gallery.getCreationLink()}`, children: [(0, jsx_runtime_1.jsx)(MultiHead_1.default, { children: renderMedia() }), (0, jsx_runtime_1.jsx)(CardContent_1.default, { firstName: gallery.getGalleryName(), secondName: secondName, wallets: gallery.getGalleryUserWallets(), isNeedShowMoreButton: false, itemId: gallery.getGalleryId(), children: (0, jsx_runtime_1.jsxs)(index_1.Flex, { alignItems: "flex-end", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsx)(CardCategory_1.default, { label: gallery.getLabel() }), (0, jsx_runtime_1.jsx)(CardLikes_1.default, { isLiked: false, likes: 0 })] }) })] }) }));
|
|
131
123
|
};
|
|
132
124
|
// Export
|
|
133
125
|
exports.default = MultiMediaCard;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ICollectionFilterInput, ICreationFilterInput } from '@ludo.ninja/api/build/graphql_tools/__generated__/searchHost/schema';
|
|
3
1
|
import { ISelectInput } from '../MobileSelect';
|
|
2
|
+
import { ICollectionFilterInput, ICreationFilterInput } from "@ludo.ninja/api/build/graphql_tools/__generated__/searchHost/schema";
|
|
3
|
+
import React from "react";
|
|
4
4
|
interface Props {
|
|
5
5
|
options: ISelectInput[];
|
|
6
6
|
defaultOptionValue: string;
|
|
@@ -27,18 +27,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
30
|
-
const
|
|
30
|
+
const vars_1 = require("../../../../fonts/vars");
|
|
31
31
|
const ScreenWidth_1 = require("../../../../styles/ScreenWidth");
|
|
32
32
|
const colors_1 = require("../../../../styles/colors");
|
|
33
33
|
const typography_1 = require("../../../../styles/typography");
|
|
34
34
|
const scale_1 = require("../../../../utils/adaptive/scale");
|
|
35
35
|
const screen_1 = require("../../../../utils/screen");
|
|
36
|
+
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
37
|
+
const react_1 = require("react");
|
|
36
38
|
const react_loading_skeleton_1 = __importDefault(require("react-loading-skeleton"));
|
|
37
39
|
const react_select_1 = __importStar(require("react-select"));
|
|
38
40
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
39
|
-
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
40
|
-
const vars_1 = require("../../../../fonts/vars");
|
|
41
|
-
const arrow_down_svg_1 = __importDefault(require("../../../../public/selects/arrow_down"));
|
|
42
41
|
const SelectElement = (0, styled_components_1.default)(react_select_1.default) `
|
|
43
42
|
font-family: ${vars_1.dmsansFontVarCss.css};
|
|
44
43
|
|
|
@@ -120,7 +119,7 @@ const SelectElement = (0, styled_components_1.default)(react_select_1.default) `
|
|
|
120
119
|
}
|
|
121
120
|
|
|
122
121
|
.react-select__indicator {
|
|
123
|
-
transform: ${(props) =>
|
|
122
|
+
transform: ${(props) => "transform" in props.scale && props.scale.transform};
|
|
124
123
|
}
|
|
125
124
|
|
|
126
125
|
.react-select__indicators {
|
|
@@ -129,8 +128,7 @@ const SelectElement = (0, styled_components_1.default)(react_select_1.default) `
|
|
|
129
128
|
|
|
130
129
|
.react-select__menu {
|
|
131
130
|
margin: ${(0, _4k_1.adaptiveValueCalc)(4)} 0;
|
|
132
|
-
box-shadow: 0 ${(0, _4k_1.adaptiveValueCalc)(8)} ${(0, _4k_1.adaptiveValueCalc)(16)}
|
|
133
|
-
${(0, _4k_1.adaptiveValueCalc)(-16)} rgba(33, 21, 95, 0.1);
|
|
131
|
+
box-shadow: 0 ${(0, _4k_1.adaptiveValueCalc)(8)} ${(0, _4k_1.adaptiveValueCalc)(16)} ${(0, _4k_1.adaptiveValueCalc)(-16)} rgba(33, 21, 95, 0.1);
|
|
134
132
|
border-radius: ${(0, _4k_1.adaptiveValueCalc)(6)};
|
|
135
133
|
}
|
|
136
134
|
|
|
@@ -146,12 +144,10 @@ const SelectElement = (0, styled_components_1.default)(react_select_1.default) `
|
|
|
146
144
|
`;
|
|
147
145
|
const minHeight = 40;
|
|
148
146
|
const DropdownIndicator = (props) => {
|
|
149
|
-
return ((0, jsx_runtime_1.jsx)(react_select_1.components.DropdownIndicator, { ...props, children: (0, jsx_runtime_1.jsx)(
|
|
150
|
-
transition:
|
|
151
|
-
transform: props.selectProps.menuIsOpen
|
|
152
|
-
|
|
153
|
-
: 'rotate(0)',
|
|
154
|
-
} }) }));
|
|
147
|
+
return ((0, jsx_runtime_1.jsx)(react_select_1.components.DropdownIndicator, { ...props, children: (0, jsx_runtime_1.jsx)("svg", { style: {
|
|
148
|
+
transition: "transform 200ms",
|
|
149
|
+
transform: props.selectProps.menuIsOpen ? "rotate(180deg)" : "rotate(0)",
|
|
150
|
+
}, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M16 11L12 15L8 11", stroke: "#696F91", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }));
|
|
155
151
|
};
|
|
156
152
|
const DesktopSelect = ({ options, isLoading, onChangeHandler, defaultOptionValue, name, ...props }) => {
|
|
157
153
|
const [selectedOption, setSelectedOption] = (0, react_1.useState)(options.find((option) => {
|
|
@@ -4,10 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const index_1 = require("./index");
|
|
8
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
7
9
|
const react_1 = require("@testing-library/react");
|
|
8
10
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
-
|
|
10
|
-
jest.mock('react-loading-skeleton', () => function TestSkeleton(props) {
|
|
11
|
+
jest.mock("react-loading-skeleton", () => function TestSkeleton(props) {
|
|
11
12
|
return ((0, jsx_runtime_1.jsx)("div", { "data-testid": "skeleton", style: {
|
|
12
13
|
borderRadius: props.borderRadius,
|
|
13
14
|
} }));
|
|
@@ -16,30 +17,30 @@ const TestImage = styled_components_1.default.img `
|
|
|
16
17
|
width: 100px;
|
|
17
18
|
height: 100px;
|
|
18
19
|
`;
|
|
19
|
-
const validSrc =
|
|
20
|
-
describe(
|
|
21
|
-
test(
|
|
20
|
+
const validSrc = "/tests/test_1.svg";
|
|
21
|
+
describe("ImageInterceptor Component", () => {
|
|
22
|
+
test("renders the skeleton while the image is loading", () => {
|
|
22
23
|
(0, react_1.render)((0, jsx_runtime_1.jsx)(index_1.ImageInterceptor, { children: (0, jsx_runtime_1.jsx)(TestImage, { src: validSrc }) }));
|
|
23
|
-
expect(react_1.screen.getByTestId(
|
|
24
|
+
expect(react_1.screen.getByTestId("skeleton")).toBeInTheDocument();
|
|
24
25
|
});
|
|
25
|
-
test(
|
|
26
|
+
test("renders the image after it has loaded", () => {
|
|
26
27
|
(0, react_1.render)((0, jsx_runtime_1.jsx)(index_1.ImageInterceptor, { children: (0, jsx_runtime_1.jsx)(TestImage, { src: validSrc }) }));
|
|
27
|
-
const image = react_1.screen.getByRole(
|
|
28
|
+
const image = react_1.screen.getByRole("img");
|
|
28
29
|
react_1.fireEvent.load(image);
|
|
29
|
-
expect(react_1.screen.queryByTestId(
|
|
30
|
-
expect(image).toHaveAttribute(
|
|
30
|
+
expect(react_1.screen.queryByTestId("skeleton")).not.toBeInTheDocument();
|
|
31
|
+
expect(image).toHaveAttribute("src", validSrc);
|
|
31
32
|
});
|
|
32
|
-
test(
|
|
33
|
+
test("renders the fallback image if an error occurs", () => {
|
|
33
34
|
(0, react_1.render)((0, jsx_runtime_1.jsx)(index_1.ImageInterceptor, { children: (0, jsx_runtime_1.jsx)(TestImage, { src: "invalid-image.jpg" }) }));
|
|
34
|
-
const image = react_1.screen.getByRole(
|
|
35
|
+
const image = react_1.screen.getByRole("img");
|
|
35
36
|
react_1.fireEvent.error(image);
|
|
36
|
-
expect(react_1.screen.queryByTestId(
|
|
37
|
-
expect(image).toHaveAttribute(
|
|
37
|
+
expect(react_1.screen.queryByTestId("skeleton")).not.toBeInTheDocument();
|
|
38
|
+
expect(image).toHaveAttribute("src", `${constants_1.staticLink}/public/noContent/noContent.svg`);
|
|
38
39
|
});
|
|
39
|
-
test(
|
|
40
|
+
test("applies the correct styles to the skeleton", () => {
|
|
40
41
|
(0, react_1.render)((0, jsx_runtime_1.jsx)(index_1.ImageInterceptor, { borderRadiusSkeleton: 10, children: (0, jsx_runtime_1.jsx)(TestImage, { src: validSrc }) }));
|
|
41
|
-
expect(react_1.screen.getByTestId(
|
|
42
|
-
borderRadius:
|
|
42
|
+
expect(react_1.screen.getByTestId("skeleton")).toHaveStyle({
|
|
43
|
+
borderRadius: "10px",
|
|
43
44
|
});
|
|
44
45
|
});
|
|
45
46
|
});
|
|
@@ -28,6 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.ImageInterceptor = void 0;
|
|
30
30
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
31
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
31
32
|
const react_1 = __importStar(require("react"));
|
|
32
33
|
const react_loading_skeleton_1 = __importDefault(require("react-loading-skeleton"));
|
|
33
34
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
@@ -43,7 +44,7 @@ const SImage = styled_components_1.default.div `
|
|
|
43
44
|
height: 100%;
|
|
44
45
|
}
|
|
45
46
|
`;
|
|
46
|
-
const ImageInterceptor = ({ children, fallback =
|
|
47
|
+
const ImageInterceptor = ({ children, fallback = `${constants_1.staticLink}/public/noContent/noContent.svg`, isShowSkeleton = true, borderRadiusSkeleton, className, }) => {
|
|
47
48
|
const [isLoading, setIsLoading] = (0, react_1.useState)(children.props.src !== fallback);
|
|
48
49
|
const [isError, setIsError] = (0, react_1.useState)(false);
|
|
49
50
|
return ((0, jsx_runtime_1.jsxs)(SImage, { className: className, children: [react_1.default.cloneElement(children, {
|
|
@@ -55,6 +56,6 @@ const ImageInterceptor = ({ children, fallback = '/noContent/noContent.svg', isS
|
|
|
55
56
|
setIsError(true);
|
|
56
57
|
setIsLoading(false);
|
|
57
58
|
},
|
|
58
|
-
}), isShowSkeleton && isLoading && ((0, jsx_runtime_1.jsx)(react_loading_skeleton_1.default, { className:
|
|
59
|
+
}), isShowSkeleton && isLoading && ((0, jsx_runtime_1.jsx)(react_loading_skeleton_1.default, { className: "skeleton", width: children.props.width || "100%", height: children.props.height || "100%", borderRadius: borderRadiusSkeleton || children.props.borderRadius || 2 }))] }));
|
|
59
60
|
};
|
|
60
61
|
exports.ImageInterceptor = ImageInterceptor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
declare const UserPicSpa: ({ userId, width, height, isNeedBoxTransform, children, Image, Link }: {
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const UserPicSpa: ({ userId, width, height, isNeedBoxTransform, children, Image, Link, }: {
|
|
3
3
|
userId: string;
|
|
4
4
|
width: number;
|
|
5
5
|
height: number;
|
|
@@ -4,18 +4,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const
|
|
8
|
-
const react_loading_skeleton_1 = __importDefault(require("react-loading-skeleton"));
|
|
9
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
10
|
-
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
7
|
+
const useFetchUserPic_1 = __importDefault(require("../../../api/server-medias/queries/useFetchUserPic"));
|
|
11
8
|
const store_1 = require("../../../modules/user/store");
|
|
12
9
|
const env_1 = require("../../../store/env");
|
|
13
10
|
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
14
11
|
const boxTransform_1 = __importDefault(require("../../../styles/mixins/boxTransform"));
|
|
15
12
|
const ImageInterceptor_1 = require("../ImageInterceptor");
|
|
16
|
-
const
|
|
17
|
-
const defaultUserpic_svg_1 = __importDefault(require("../../../public/defaultUserpics/defaultUserpic"));
|
|
13
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
18
14
|
const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
|
|
15
|
+
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
16
|
+
const react_1 = require("react");
|
|
17
|
+
const react_loading_skeleton_1 = __importDefault(require("react-loading-skeleton"));
|
|
18
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
19
19
|
// Styles
|
|
20
20
|
const StyledHeaderUserPic = styled_components_1.default.div `
|
|
21
21
|
${(props) => (props.isNeedBoxTransform ? boxTransform_1.default : null)}
|
|
@@ -29,13 +29,13 @@ const StyledHeaderUserPic = styled_components_1.default.div `
|
|
|
29
29
|
height: ${(props) => props.imageHeight};
|
|
30
30
|
|
|
31
31
|
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
32
|
-
width: ${(props) => (0, _4k_1.adaptiveValueCalc)(Number(props.imageWidth.replace(
|
|
33
|
-
height: ${(props) => (0, _4k_1.adaptiveValueCalc)(Number(props.imageHeight.replace(
|
|
32
|
+
width: ${(props) => (0, _4k_1.adaptiveValueCalc)(Number(props.imageWidth.replace("px", "")))};
|
|
33
|
+
height: ${(props) => (0, _4k_1.adaptiveValueCalc)(Number(props.imageHeight.replace("px", "")))};
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
`;
|
|
37
37
|
// Component
|
|
38
|
-
const UserPicSpa = ({ userId, width, height, isNeedBoxTransform, children, Image, Link }) => {
|
|
38
|
+
const UserPicSpa = ({ userId, width, height, isNeedBoxTransform, children, Image, Link, }) => {
|
|
39
39
|
const getMediaENVDomain = (0, env_1.useEnvStore)((state) => state.getMediaDomain);
|
|
40
40
|
const { isSignedIn, isLoadingProfileData, profileData } = (0, store_1.useUserStore)((state) => ({
|
|
41
41
|
isSignedIn: state.isSignedIn,
|
|
@@ -47,7 +47,7 @@ const UserPicSpa = ({ userId, width, height, isNeedBoxTransform, children, Image
|
|
|
47
47
|
?.getUserPic({
|
|
48
48
|
mediaDomain: getMediaENVDomain(),
|
|
49
49
|
})
|
|
50
|
-
.includes(
|
|
50
|
+
.includes("1.svg")
|
|
51
51
|
? null
|
|
52
52
|
: profileData?.getUserPic({
|
|
53
53
|
mediaDomain: getMediaENVDomain(),
|
|
@@ -59,25 +59,23 @@ const UserPicSpa = ({ userId, width, height, isNeedBoxTransform, children, Image
|
|
|
59
59
|
?.getUserPic({
|
|
60
60
|
mediaDomain: getMediaENVDomain(),
|
|
61
61
|
})
|
|
62
|
-
.includes(
|
|
62
|
+
.includes("1.svg")) {
|
|
63
63
|
load(userId);
|
|
64
64
|
}
|
|
65
65
|
}, [userId, isSignedIn, isLoadingProfileData, profileData]);
|
|
66
66
|
const renderDefaultUserPic = () => {
|
|
67
|
-
return (0, jsx_runtime_1.jsx)(
|
|
67
|
+
return ((0, jsx_runtime_1.jsx)("img", { src: `${constants_1.staticLink}/public/defaultUserpics/defaultUserpic.svg`, alt: "user_logo", className: "userPicImage" }));
|
|
68
68
|
};
|
|
69
69
|
const renderImage = () => {
|
|
70
|
-
return ((0, jsx_runtime_1.jsx)(ImageInterceptor_1.ImageInterceptor, { borderRadiusSkeleton:
|
|
70
|
+
return ((0, jsx_runtime_1.jsx)(ImageInterceptor_1.ImageInterceptor, { borderRadiusSkeleton: "50%", children: (0, jsx_runtime_1.jsx)(Image, { src: (profileUserPic || userPic), className: "userPicImage", width: width, height: height, priority: true, alt: "ludo ninja userPick" }) }));
|
|
71
71
|
};
|
|
72
72
|
const renderImageOrDefaultUserPic = () => {
|
|
73
73
|
return profileUserPic || userPic ? renderImage() : renderDefaultUserPic();
|
|
74
74
|
};
|
|
75
75
|
const renderSkeleton = () => {
|
|
76
|
-
return (0, jsx_runtime_1.jsx)(react_loading_skeleton_1.default, { className:
|
|
76
|
+
return (0, jsx_runtime_1.jsx)(react_loading_skeleton_1.default, { className: "userPicImage" });
|
|
77
77
|
};
|
|
78
78
|
const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
|
|
79
|
-
return ((0, jsx_runtime_1.jsx)(StyledHeaderUserPic, { isNeedBoxTransform: isNeedBoxTransform, imageWidth: `${width}px`, imageHeight: `${height}px`, children: (0, jsx_runtime_1.jsxs)(Link, { href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["profile"]}/${userId}/nfts`, className:
|
|
80
|
-
? renderSkeleton()
|
|
81
|
-
: renderImageOrDefaultUserPic(), children] }) }));
|
|
79
|
+
return ((0, jsx_runtime_1.jsx)(StyledHeaderUserPic, { isNeedBoxTransform: isNeedBoxTransform, imageWidth: `${width}px`, imageHeight: `${height}px`, children: (0, jsx_runtime_1.jsxs)(Link, { href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["profile"]}/${userId}/nfts`, className: "userPicBlock", children: [loading || isLoadingProfileData ? renderSkeleton() : renderImageOrDefaultUserPic(), children] }) }));
|
|
82
80
|
};
|
|
83
81
|
exports.default = UserPicSpa;
|
|
@@ -4,20 +4,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const
|
|
8
|
-
const image_1 = __importDefault(require("next/image"));
|
|
9
|
-
const link_1 = __importDefault(require("next/link"));
|
|
10
|
-
const react_loading_skeleton_1 = __importDefault(require("react-loading-skeleton"));
|
|
11
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
7
|
+
const useFetchUserPic_1 = __importDefault(require("../../../api/server-medias/queries/useFetchUserPic"));
|
|
13
8
|
const store_1 = require("../../../modules/user/store");
|
|
14
9
|
const env_1 = require("../../../store/env");
|
|
15
10
|
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
16
11
|
const boxTransform_1 = __importDefault(require("../../../styles/mixins/boxTransform"));
|
|
17
12
|
const ImageInterceptor_1 = require("../ImageInterceptor");
|
|
18
|
-
const useFetchUserPic_1 = __importDefault(require("../../../api/server-medias/queries/useFetchUserPic"));
|
|
19
|
-
// import DefaultUserPicIcon from "@/public/defaultUserpics/defaultUserpic.svg";
|
|
20
13
|
const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
|
|
14
|
+
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
15
|
+
const image_1 = __importDefault(require("next/image"));
|
|
16
|
+
const link_1 = __importDefault(require("next/link"));
|
|
17
|
+
const react_1 = require("react");
|
|
18
|
+
const react_loading_skeleton_1 = __importDefault(require("react-loading-skeleton"));
|
|
19
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
21
20
|
// Styles
|
|
22
21
|
const StyledHeaderUserPic = styled_components_1.default.div `
|
|
23
22
|
${(props) => (props.isNeedBoxTransform ? boxTransform_1.default : null)}
|
|
@@ -67,7 +66,7 @@ const UserPic = ({ userId, width, height, isNeedBoxTransform, children, }) => {
|
|
|
67
66
|
}, [userId, isSignedIn, isLoadingProfileData, profileData]);
|
|
68
67
|
const renderDefaultUserPic = () => {
|
|
69
68
|
// return <DefaultUserPicIcon className={"userPicImage"} />;
|
|
70
|
-
return (0, jsx_runtime_1.jsxs)("svg", { className: "userPicImage", viewBox: "0 0 120 120", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsxs)("g", { clipPath: "url(#clip0_1631_36821)", children: [(0, jsx_runtime_1.jsx)("mask", { id: "mask0_1631_36821", style: { maskType: "alpha" }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "120", height: "120", children: (0, jsx_runtime_1.jsx)("path", { d: "M0 57.5C0 18.5 18.5 0 57.5 0H62.5C101.5 0 120 18.5 120 57.5V62.5C120 101.5 101.5 120 62.5 120H57.5C18.5 120 0 101.5 0 62.5V57.5Z", fill: "#C4C4C4" }) }), (0, jsx_runtime_1.jsxs)("g", { mask: "url(#mask0_1631_36821)", children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 60C0 10.59 10.59 0 60 0C109.41 0 120 10.59 120 60C120 109.41 109.41 120 60 120C10.59 120 0 109.41 0 60Z", fill: "#6048FF" }), (0, jsx_runtime_1.jsx)("g", { filter: "url(#filter0_f_1631_36821)", children: (0, jsx_runtime_1.jsx)("path", { d: "M122.923 22.164L117.289 24.1018C117.289 24.1018 70.1542 14.04 40.7826 25.6887C11.411 37.3374 -13.0768 73.5812 -13.0768 73.5812L-18.7103 75.519L-19.1418 61.7571L-3.51315 25.4694L19.3845 -0.953981L59.6143 -19.4288L101.911 -12.3395L122.923 22.164Z", fill: "#BB6BD9" }) }), (0, jsx_runtime_1.jsx)("g", { filter: "url(#filter1_f_1631_36821)", children: (0, jsx_runtime_1.jsx)("path", { d: "M-24.8609 52.797L-18.6129 53.7922C-18.6129 53.7922 -0.143277 -5.59894 21.8596 38.1435C43.8624 81.8859 103.432 73.9375 103.432 73.9375L133.707 73.2504L129.729 87.0304L102.492 114.722L71.155 128.949L25.0516 126.409L-14.9265 97.6202L-24.8609 52.797Z", fill: "#4FD4F8", fillOpacity: "0.7" }) })] })] }), (0, jsx_runtime_1.jsxs)("defs", { children: [(0, jsx_runtime_1.jsxs)("filter", { id: "filter0_f_1631_36821", x: "-29.1416", y: "-29.4287", width: "162.064", height: "114.948", filterUnits: "userSpaceOnUse", "color-interpolation-filters": "sRGB", children: [(0, jsx_runtime_1.jsx)("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), (0, jsx_runtime_1.jsx)("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }), (0, jsx_runtime_1.jsx)("feGaussianBlur", { stdDeviation: "5", result: "effect1_foregroundBlur_1631_36821" })] }), (0, jsx_runtime_1.jsxs)("filter", { id: "filter1_f_1631_36821", x: "-34.8613", y: "12.0684", width: "178.568", height: "126.88", filterUnits: "userSpaceOnUse", "color-interpolation-filters": "sRGB", children: [(0, jsx_runtime_1.jsx)("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), (0, jsx_runtime_1.jsx)("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }), (0, jsx_runtime_1.jsx)("feGaussianBlur", { stdDeviation: "5", result: "effect1_foregroundBlur_1631_36821" })] }), (0, jsx_runtime_1.jsx)("clipPath", { id: "clip0_1631_36821", children: (0, jsx_runtime_1.jsx)("rect", { width: "120", height: "120", rx: "60", fill: "white" }) })] })] });
|
|
69
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { className: "userPicImage", viewBox: "0 0 120 120", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsxs)("g", { clipPath: "url(#clip0_1631_36821)", children: [(0, jsx_runtime_1.jsx)("mask", { id: "mask0_1631_36821", style: { maskType: "alpha" }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "120", height: "120", children: (0, jsx_runtime_1.jsx)("path", { d: "M0 57.5C0 18.5 18.5 0 57.5 0H62.5C101.5 0 120 18.5 120 57.5V62.5C120 101.5 101.5 120 62.5 120H57.5C18.5 120 0 101.5 0 62.5V57.5Z", fill: "#C4C4C4" }) }), (0, jsx_runtime_1.jsxs)("g", { mask: "url(#mask0_1631_36821)", children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 60C0 10.59 10.59 0 60 0C109.41 0 120 10.59 120 60C120 109.41 109.41 120 60 120C10.59 120 0 109.41 0 60Z", fill: "#6048FF" }), (0, jsx_runtime_1.jsx)("g", { filter: "url(#filter0_f_1631_36821)", children: (0, jsx_runtime_1.jsx)("path", { d: "M122.923 22.164L117.289 24.1018C117.289 24.1018 70.1542 14.04 40.7826 25.6887C11.411 37.3374 -13.0768 73.5812 -13.0768 73.5812L-18.7103 75.519L-19.1418 61.7571L-3.51315 25.4694L19.3845 -0.953981L59.6143 -19.4288L101.911 -12.3395L122.923 22.164Z", fill: "#BB6BD9" }) }), (0, jsx_runtime_1.jsx)("g", { filter: "url(#filter1_f_1631_36821)", children: (0, jsx_runtime_1.jsx)("path", { d: "M-24.8609 52.797L-18.6129 53.7922C-18.6129 53.7922 -0.143277 -5.59894 21.8596 38.1435C43.8624 81.8859 103.432 73.9375 103.432 73.9375L133.707 73.2504L129.729 87.0304L102.492 114.722L71.155 128.949L25.0516 126.409L-14.9265 97.6202L-24.8609 52.797Z", fill: "#4FD4F8", fillOpacity: "0.7" }) })] })] }), (0, jsx_runtime_1.jsxs)("defs", { children: [(0, jsx_runtime_1.jsxs)("filter", { id: "filter0_f_1631_36821", x: "-29.1416", y: "-29.4287", width: "162.064", height: "114.948", filterUnits: "userSpaceOnUse", "color-interpolation-filters": "sRGB", children: [(0, jsx_runtime_1.jsx)("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), (0, jsx_runtime_1.jsx)("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }), (0, jsx_runtime_1.jsx)("feGaussianBlur", { stdDeviation: "5", result: "effect1_foregroundBlur_1631_36821" })] }), (0, jsx_runtime_1.jsxs)("filter", { id: "filter1_f_1631_36821", x: "-34.8613", y: "12.0684", width: "178.568", height: "126.88", filterUnits: "userSpaceOnUse", "color-interpolation-filters": "sRGB", children: [(0, jsx_runtime_1.jsx)("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), (0, jsx_runtime_1.jsx)("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }), (0, jsx_runtime_1.jsx)("feGaussianBlur", { stdDeviation: "5", result: "effect1_foregroundBlur_1631_36821" })] }), (0, jsx_runtime_1.jsx)("clipPath", { id: "clip0_1631_36821", children: (0, jsx_runtime_1.jsx)("rect", { width: "120", height: "120", rx: "60", fill: "white" }) })] })] }));
|
|
71
70
|
};
|
|
72
71
|
const renderImage = () => {
|
|
73
72
|
return ((0, jsx_runtime_1.jsx)(ImageInterceptor_1.ImageInterceptor, { borderRadiusSkeleton: "50%", children: (0, jsx_runtime_1.jsx)(image_1.default, { src: (profileUserPic || userPic), className: "userPicImage", width: width, height: height,
|
|
@@ -81,9 +80,7 @@ const UserPic = ({ userId, width, height, isNeedBoxTransform, children, }) => {
|
|
|
81
80
|
return (0, jsx_runtime_1.jsx)(react_loading_skeleton_1.default, { className: "userPicImage" });
|
|
82
81
|
};
|
|
83
82
|
const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
|
|
84
|
-
return ((0, jsx_runtime_1.jsx)(StyledHeaderUserPic, { isNeedBoxTransform: isNeedBoxTransform, imageWidth: `${width}px`, imageHeight: `${height}px`, children: (0, jsx_runtime_1.jsxs)(link_1.default, { href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["profile"]}/${userId}/nfts`, className: "userPicBlock", children: [loading || isLoadingProfileData
|
|
85
|
-
? renderSkeleton()
|
|
86
|
-
: renderImageOrDefaultUserPic(), children] }) }));
|
|
83
|
+
return ((0, jsx_runtime_1.jsx)(StyledHeaderUserPic, { isNeedBoxTransform: isNeedBoxTransform, imageWidth: `${width}px`, imageHeight: `${height}px`, children: (0, jsx_runtime_1.jsxs)(link_1.default, { href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["profile"]}/${userId}/nfts`, className: "userPicBlock", children: [loading || isLoadingProfileData ? renderSkeleton() : renderImageOrDefaultUserPic(), children] }) }));
|
|
87
84
|
};
|
|
88
85
|
// Export
|
|
89
86
|
exports.default = UserPic;
|
|
@@ -4,15 +4,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const
|
|
8
|
-
const link_1 = __importDefault(require("next/link"));
|
|
9
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
10
|
-
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
7
|
+
const vars_1 = require("../../../fonts/vars");
|
|
11
8
|
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
12
9
|
const boxShadow_1 = __importDefault(require("../../../styles/mixins/boxShadow"));
|
|
13
10
|
const boxTransform_1 = __importDefault(require("../../../styles/mixins/boxTransform"));
|
|
14
11
|
const SkeletonLabel_1 = __importDefault(require("../SkeletonLabel"));
|
|
15
|
-
const
|
|
12
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
13
|
+
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
14
|
+
const image_1 = __importDefault(require("next/image"));
|
|
15
|
+
const link_1 = __importDefault(require("next/link"));
|
|
16
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
16
17
|
// Styles
|
|
17
18
|
const StyledExpTab = (0, styled_components_1.default)(link_1.default) `
|
|
18
19
|
${boxShadow_1.default};
|
|
@@ -38,8 +39,7 @@ const StyledExpTab = (0, styled_components_1.default)(link_1.default) `
|
|
|
38
39
|
}
|
|
39
40
|
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
40
41
|
gap: ${(0, _4k_1.adaptiveValueCalc)(8)};
|
|
41
|
-
padding: ${(0, _4k_1.adaptiveValueCalc)(5)} ${(0, _4k_1.adaptiveValueCalc)(8)}
|
|
42
|
-
${(0, _4k_1.adaptiveValueCalc)(5)} ${(0, _4k_1.adaptiveValueCalc)(6)};
|
|
42
|
+
padding: ${(0, _4k_1.adaptiveValueCalc)(5)} ${(0, _4k_1.adaptiveValueCalc)(8)} ${(0, _4k_1.adaptiveValueCalc)(5)} ${(0, _4k_1.adaptiveValueCalc)(6)};
|
|
43
43
|
min-width: ${(0, _4k_1.adaptiveValueCalc)(116)};
|
|
44
44
|
min-height: ${(0, _4k_1.adaptiveValueCalc)(32)};
|
|
45
45
|
border-radius: ${(0, _4k_1.adaptiveValueCalc)(24)};
|
|
@@ -55,11 +55,11 @@ const StyledExpTab = (0, styled_components_1.default)(link_1.default) `
|
|
|
55
55
|
}
|
|
56
56
|
`;
|
|
57
57
|
//Component
|
|
58
|
-
const ExperienceLabel = ({ value = 0, link, loading
|
|
58
|
+
const ExperienceLabel = ({ value = 0, link, loading }) => {
|
|
59
59
|
if (loading)
|
|
60
60
|
return (0, jsx_runtime_1.jsx)(SkeletonLabel_1.default, {});
|
|
61
61
|
if (!value)
|
|
62
62
|
return null;
|
|
63
|
-
return ((0, jsx_runtime_1.jsxs)(StyledExpTab, { href: link, children: [(0, jsx_runtime_1.jsx)(image_1.default, { src:
|
|
63
|
+
return ((0, jsx_runtime_1.jsxs)(StyledExpTab, { href: link, children: [(0, jsx_runtime_1.jsx)(image_1.default, { src: `${constants_1.staticLink}/public/rewardsPage/XP_logo.svg`, alt: "Experience logo", width: 20, height: 20 }), (0, jsx_runtime_1.jsxs)("p", { className: `value`, children: [value, " XP"] })] }));
|
|
64
64
|
};
|
|
65
65
|
exports.default = ExperienceLabel;
|
|
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
-
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
9
7
|
const ui_1 = require("../../../store/ui");
|
|
10
8
|
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
11
9
|
const colors_1 = require("../../../styles/colors");
|
|
12
10
|
const z_indexes_1 = require("../../../styles/mixins/z-indexes");
|
|
13
|
-
|
|
11
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
12
|
+
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
13
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
14
14
|
const StyledModal = styled_components_1.default.div `
|
|
15
15
|
min-height: 250px;
|
|
16
16
|
min-width: 300px;
|
|
@@ -77,6 +77,6 @@ const Modal = () => {
|
|
|
77
77
|
}));
|
|
78
78
|
if (!isModalOpen)
|
|
79
79
|
return null;
|
|
80
|
-
return ((0, jsx_runtime_1.jsxs)(StyledModal, { style: stylesModals ? stylesModals : undefined, children: [(0, jsx_runtime_1.jsx)("img", { src:
|
|
80
|
+
return ((0, jsx_runtime_1.jsxs)(StyledModal, { style: stylesModals ? stylesModals : undefined, children: [(0, jsx_runtime_1.jsx)("img", { src: `${constants_1.staticLink}/public/modal/close.svg`, alt: "close", width: 24, height: 24, className: "modalCloseIcon", onClick: closeModal }), (0, jsx_runtime_1.jsx)("div", { className: "modalContent", children: contentModals })] }));
|
|
81
81
|
};
|
|
82
82
|
exports.default = Modal;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
export declare const ModalSidebarPortal: ({ component, closeModal
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export declare const ModalSidebarPortal: ({ component, closeModal }: {
|
|
3
3
|
component: ReactNode;
|
|
4
4
|
closeModal: () => void;
|
|
5
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ModalSidebarPortal = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const utils_1 = require("@ludo.ninja/utils");
|
|
6
5
|
const index_1 = require("./index");
|
|
7
|
-
|
|
6
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
7
|
+
const utils_1 = require("@ludo.ninja/utils");
|
|
8
8
|
// minimize dom tree for optimize virtualization
|
|
9
|
-
const ModalSidebarPortal = ({ component, closeModal
|
|
9
|
+
const ModalSidebarPortal = ({ component, closeModal }) => ((0, jsx_runtime_1.jsx)(utils_1.PortalCreator, { children: (0, jsx_runtime_1.jsxs)(index_1.StyledModalSidebar, { children: [(0, jsx_runtime_1.jsx)("img", { src: `${constants_1.staticLink}/public/modal/close.svg`, alt: "close", width: 24, height: 24, className: "modalCloseIcon", onClick: closeModal }), (0, jsx_runtime_1.jsx)("div", { className: "modalContent", children: component })] }) }));
|
|
10
10
|
exports.ModalSidebarPortal = ModalSidebarPortal;
|
|
@@ -5,13 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.StyledModalSidebar = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
-
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
10
8
|
const ui_1 = require("../../../store/ui");
|
|
11
9
|
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
12
10
|
const colors_1 = require("../../../styles/colors");
|
|
13
11
|
const z_indexes_1 = require("../../../styles/mixins/z-indexes");
|
|
14
|
-
|
|
12
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
13
|
+
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
14
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
15
15
|
exports.StyledModalSidebar = styled_components_1.default.div `
|
|
16
16
|
min-height: 300px;
|
|
17
17
|
//max-width: 536px;
|
|
@@ -73,6 +73,6 @@ const ModalSidebar = () => {
|
|
|
73
73
|
}));
|
|
74
74
|
if (!isModalSidebarOpen)
|
|
75
75
|
return null;
|
|
76
|
-
return ((0, jsx_runtime_1.jsxs)(exports.StyledModalSidebar, { children: [(0, jsx_runtime_1.jsx)("img", { src:
|
|
76
|
+
return ((0, jsx_runtime_1.jsxs)(exports.StyledModalSidebar, { children: [(0, jsx_runtime_1.jsx)("img", { src: `${constants_1.staticLink}/public/modal/close.svg`, alt: "close", width: 24, height: 24, className: "modalCloseIcon", onClick: closeModalSidebar }), (0, jsx_runtime_1.jsx)("div", { className: "modalContent", children: contentModals })] }));
|
|
77
77
|
};
|
|
78
78
|
exports.default = ModalSidebar;
|