@ludo.ninja/components 2.1.73 → 2.1.74
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/assetPage/index.d.ts +0 -5
- package/build/components/assetPage/index.js +1 -11
- package/package.json +1 -1
- package/build/components/assetPage/description/index.d.ts +0 -4
- package/build/components/assetPage/description/index.js +0 -43
- package/build/components/assetPage/participants/index.d.ts +0 -9
- package/build/components/assetPage/participants/index.js +0 -180
- package/build/components/assetPage/priceRank/index.d.ts +0 -9
- package/build/components/assetPage/priceRank/index.js +0 -112
- package/build/components/assetPage/tittle/index.d.ts +0 -9
- package/build/components/assetPage/tittle/index.js +0 -91
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
export { Participants } from './participants';
|
|
2
|
-
export { Title } from './tittle';
|
|
3
1
|
export { AssetMedia } from './assetNft';
|
|
4
|
-
export { PriceRank } from './priceRank';
|
|
5
2
|
export { Properties } from './properties';
|
|
6
3
|
export { Information } from './information';
|
|
7
|
-
export { Description } from './description';
|
|
8
|
-
export { MarketPlaces } from './marketPlaces';
|
|
9
4
|
export { AudioVideoPlayer } from './audioVideoPlayer';
|
|
10
5
|
export { Viewer3D } from './viewer3D';
|
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Viewer3D = exports.AudioVideoPlayer = exports.
|
|
4
|
-
var participants_1 = require("./participants");
|
|
5
|
-
Object.defineProperty(exports, "Participants", { enumerable: true, get: function () { return participants_1.Participants; } });
|
|
6
|
-
var tittle_1 = require("./tittle");
|
|
7
|
-
Object.defineProperty(exports, "Title", { enumerable: true, get: function () { return tittle_1.Title; } });
|
|
3
|
+
exports.Viewer3D = exports.AudioVideoPlayer = exports.Information = exports.Properties = exports.AssetMedia = void 0;
|
|
8
4
|
var assetNft_1 = require("./assetNft");
|
|
9
5
|
Object.defineProperty(exports, "AssetMedia", { enumerable: true, get: function () { return assetNft_1.AssetMedia; } });
|
|
10
|
-
var priceRank_1 = require("./priceRank");
|
|
11
|
-
Object.defineProperty(exports, "PriceRank", { enumerable: true, get: function () { return priceRank_1.PriceRank; } });
|
|
12
6
|
var properties_1 = require("./properties");
|
|
13
7
|
Object.defineProperty(exports, "Properties", { enumerable: true, get: function () { return properties_1.Properties; } });
|
|
14
8
|
var information_1 = require("./information");
|
|
15
9
|
Object.defineProperty(exports, "Information", { enumerable: true, get: function () { return information_1.Information; } });
|
|
16
|
-
var description_1 = require("./description");
|
|
17
|
-
Object.defineProperty(exports, "Description", { enumerable: true, get: function () { return description_1.Description; } });
|
|
18
|
-
var marketPlaces_1 = require("./marketPlaces");
|
|
19
|
-
Object.defineProperty(exports, "MarketPlaces", { enumerable: true, get: function () { return marketPlaces_1.MarketPlaces; } });
|
|
20
10
|
var audioVideoPlayer_1 = require("./audioVideoPlayer");
|
|
21
11
|
Object.defineProperty(exports, "AudioVideoPlayer", { enumerable: true, get: function () { return audioVideoPlayer_1.AudioVideoPlayer; } });
|
|
22
12
|
var viewer3D_1 = require("./viewer3D");
|
package/package.json
CHANGED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Description = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const react_hyphen_1 = __importDefault(require("react-hyphen"));
|
|
9
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
10
|
-
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
11
|
-
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
12
|
-
const colors_1 = require("../../../styles/colors");
|
|
13
|
-
const index_1 = require("../../../system/index");
|
|
14
|
-
const SH3 = (0, styled_components_1.default)(index_1.H3) `
|
|
15
|
-
margin-top: 20px;
|
|
16
|
-
margin-bottom: 5px;
|
|
17
|
-
|
|
18
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
19
|
-
margin-top: ${(0, _4k_1.adaptiveValueCalc)(20)};
|
|
20
|
-
margin-bottom: ${(0, _4k_1.adaptiveValueCalc)(5)};
|
|
21
|
-
}
|
|
22
|
-
`;
|
|
23
|
-
const SFlex = (0, styled_components_1.default)(index_1.Flex) `
|
|
24
|
-
.text {
|
|
25
|
-
font-size: 14px;
|
|
26
|
-
color: ${colors_1.TextGrayColor};
|
|
27
|
-
|
|
28
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
29
|
-
font-size: ${(0, _4k_1.adaptiveValueCalc)(14)};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
`;
|
|
33
|
-
const Description = ({ description }) => {
|
|
34
|
-
if (!description)
|
|
35
|
-
return null;
|
|
36
|
-
return ((0, jsx_runtime_1.jsxs)(SFlex, { className: "description", flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(SH3, { children: "Description" }), (0, jsx_runtime_1.jsx)(react_hyphen_1.default, { children: (0, jsx_runtime_1.jsx)("div", {
|
|
37
|
-
// style={{
|
|
38
|
-
// color: TextGrayColor,
|
|
39
|
-
// fontSize: '14px',
|
|
40
|
-
// }}
|
|
41
|
-
className: "text", dangerouslySetInnerHTML: { __html: description } }) })] }));
|
|
42
|
-
};
|
|
43
|
-
exports.Description = Description;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { identitySchema as schema } from '@ludo.ninja/api';
|
|
2
|
-
type ParticipantsProps = {
|
|
3
|
-
creatorsAddresses: string[] | null;
|
|
4
|
-
creatorsProfiles: schema.IProfile[];
|
|
5
|
-
ownersProfiles: schema.IProfile[];
|
|
6
|
-
ownersAddresses: string[] | null;
|
|
7
|
-
};
|
|
8
|
-
export declare const Participants: ({ creatorsProfiles, ownersProfiles, creatorsAddresses, ownersAddresses, }: ParticipantsProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Participants = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
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");
|
|
11
|
-
const utils_1 = require("@ludo.ninja/utils");
|
|
12
|
-
const Urls_1 = require("../../../dto/common/Media/Urls");
|
|
13
|
-
const env_1 = require("../../../store/env");
|
|
14
|
-
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
15
|
-
const colors_1 = require("../../../styles/colors");
|
|
16
|
-
const index_1 = require("../../../system/index");
|
|
17
|
-
const scale_1 = require("../../../utils/adaptive/scale");
|
|
18
|
-
const copyBtn_1 = require("../../../utils/copyBtn");
|
|
19
|
-
const screen_1 = require("../../../utils/screen");
|
|
20
|
-
const details_svg_1 = __importDefault(require("../../../public/assetPage/details"));
|
|
21
|
-
const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
|
|
22
|
-
const MultiFlexRight = (0, styled_components_1.default)(index_1.Flex) `
|
|
23
|
-
margin-left: 100px;
|
|
24
|
-
align-items: center;
|
|
25
|
-
|
|
26
|
-
${ScreenWidth_1.mediaQuery.desktop} {
|
|
27
|
-
margin: 20px 0 0 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
31
|
-
margin-left: ${(0, _4k_1.adaptiveValueCalc)(100)};
|
|
32
|
-
}
|
|
33
|
-
`;
|
|
34
|
-
const MultiFlex = (0, styled_components_1.default)(index_1.Flex) `
|
|
35
|
-
margin: 20px 0 10px;
|
|
36
|
-
|
|
37
|
-
${ScreenWidth_1.mediaQuery.desktop} {
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
42
|
-
margin: ${(0, _4k_1.adaptiveValueCalc)(20)} 0 ${(0, _4k_1.adaptiveValueCalc)(10)};
|
|
43
|
-
}
|
|
44
|
-
`;
|
|
45
|
-
const SMultipleCreators = (0, styled_components_1.default)(index_1.Flex) `
|
|
46
|
-
margin-left: 20px;
|
|
47
|
-
|
|
48
|
-
img {
|
|
49
|
-
width: 40px;
|
|
50
|
-
height: 40px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
54
|
-
margin-left: ${(0, _4k_1.adaptiveValueCalc)(20)};
|
|
55
|
-
|
|
56
|
-
img {
|
|
57
|
-
width: ${(0, _4k_1.adaptiveValueCalc)(40)};
|
|
58
|
-
height: ${(0, _4k_1.adaptiveValueCalc)(40)};
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
`;
|
|
62
|
-
const SMultipleCreatorsH6 = (0, styled_components_1.default)(index_1.H6) `
|
|
63
|
-
margin-left: 15px;
|
|
64
|
-
color: ${colors_1.TextGrayColor};
|
|
65
|
-
|
|
66
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
67
|
-
margin-left: ${(0, _4k_1.adaptiveValueCalc)(15)};
|
|
68
|
-
}
|
|
69
|
-
`;
|
|
70
|
-
const MultipleCreators = ({ creatorsProfiles, creatorsAddresses, }) => {
|
|
71
|
-
const getMediaDomain = (0, env_1.useEnvStore)((state) => state.getMediaDomain);
|
|
72
|
-
if (!creatorsProfiles && !creatorsAddresses)
|
|
73
|
-
return null;
|
|
74
|
-
let accumulatedResult;
|
|
75
|
-
if (creatorsProfiles) {
|
|
76
|
-
accumulatedResult = [...creatorsProfiles];
|
|
77
|
-
}
|
|
78
|
-
if (creatorsAddresses) {
|
|
79
|
-
creatorsAddresses.map((item) => {
|
|
80
|
-
return { userId: item, userpic: '/defaultUserpics/defaultUserpic.svg' };
|
|
81
|
-
});
|
|
82
|
-
accumulatedResult = [
|
|
83
|
-
...accumulatedResult,
|
|
84
|
-
creatorsAddresses,
|
|
85
|
-
];
|
|
86
|
-
}
|
|
87
|
-
return ((0, jsx_runtime_1.jsx)(index_1.Flex, { alignItems: "center", children: (0, jsx_runtime_1.jsxs)(SMultipleCreators, { flexDirection: "row", alignItems: "center", children: [creatorsProfiles?.slice(0, 3).map((creator) => {
|
|
88
|
-
return ((0, jsx_runtime_1.jsx)(index_1.ProfilePic, { size: 40, userPicSrc: (0, Urls_1.getUserPicImage)(getMediaDomain, creator?.userpic, '/defaultUserpics/defaultUserpic.svg') }, creator?.userId));
|
|
89
|
-
}), (0, jsx_runtime_1.jsxs)(SMultipleCreatorsH6, { children: [accumulatedResult && accumulatedResult?.length, " Creators"] })] }) }));
|
|
90
|
-
};
|
|
91
|
-
const SSingleUserLink = (0, styled_components_1.default)(link_1.default) `
|
|
92
|
-
font-size: 14px;
|
|
93
|
-
|
|
94
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
95
|
-
font-size: ${(0, _4k_1.adaptiveValueCalc)(14)};
|
|
96
|
-
}
|
|
97
|
-
`;
|
|
98
|
-
const SSingleUser = (0, styled_components_1.default)(index_1.Flex) `
|
|
99
|
-
margin-bottom: 10px;
|
|
100
|
-
|
|
101
|
-
img {
|
|
102
|
-
width: 40px;
|
|
103
|
-
height: 40px;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
107
|
-
margin-bottom: ${(0, _4k_1.adaptiveValueCalc)(10)};
|
|
108
|
-
|
|
109
|
-
img {
|
|
110
|
-
width: ${(0, _4k_1.adaptiveValueCalc)(40)};
|
|
111
|
-
height: ${(0, _4k_1.adaptiveValueCalc)(40)};
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
`;
|
|
115
|
-
const SSingleUserFlex = (0, styled_components_1.default)(index_1.Flex) `
|
|
116
|
-
margin-left: 16px;
|
|
117
|
-
|
|
118
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
119
|
-
margin-left: ${(0, _4k_1.adaptiveValueCalc)(16)};
|
|
120
|
-
}
|
|
121
|
-
`;
|
|
122
|
-
const SingleUser = (props) => {
|
|
123
|
-
const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
|
|
124
|
-
const getMediaDomain = (0, env_1.useEnvStore)((state) => state.getMediaDomain);
|
|
125
|
-
if (!props.profile && !props.address)
|
|
126
|
-
return null;
|
|
127
|
-
const isLudoWallet = (userName) => {
|
|
128
|
-
return userName ? ((0, jsx_runtime_1.jsx)(index_1.H5, { color: colors_1.BlackColor, children: userName })) : ((0, jsx_runtime_1.jsx)(copyBtn_1.CopyButton, { value: props.address, children: (0, jsx_runtime_1.jsx)(index_1.H5, { color: colors_1.BlackColor, children: (0, utils_1.shortenedText)(props.address) }) }));
|
|
129
|
-
};
|
|
130
|
-
const ludoUserMurkUp = (name) => {
|
|
131
|
-
return name ? ((0, jsx_runtime_1.jsx)(SSingleUserLink, { href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["profile"]}/${props.profile?.userId}/nfts`, children: name })) : (isLudoWallet(props.profile?.username));
|
|
132
|
-
};
|
|
133
|
-
return ((0, jsx_runtime_1.jsxs)(SSingleUser, { width: '50%', alignItems: "center", children: [Boolean(props?.profile && props?.profile?.userpic) && ((0, jsx_runtime_1.jsx)(index_1.ProfilePic, { size: 40, userPicSrc: (0, Urls_1.getUserPicImage)(getMediaDomain, props?.profile?.userpic, '/defaultUserpics/defaultUserpic.svg') })), Boolean(props?.profile && props?.profile?.userpic) || ((0, jsx_runtime_1.jsx)(index_1.ProfilePic, { size: 40, userPicSrc: '/defaultUserpics/defaultUserpic.svg' })), (0, jsx_runtime_1.jsxs)(SSingleUserFlex, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(index_1.H6, { color: colors_1.TextGrayColor, children: props.title }), ludoUserMurkUp(props?.profile && props.profile.username)] })] }));
|
|
134
|
-
};
|
|
135
|
-
const SIconWrapper = styled_components_1.default.div `
|
|
136
|
-
display: flex;
|
|
137
|
-
align-items: center;
|
|
138
|
-
justify-content: center;
|
|
139
|
-
width: 12px;
|
|
140
|
-
height: 12px;
|
|
141
|
-
margin-right: 10px;
|
|
142
|
-
|
|
143
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
144
|
-
width: ${(0, _4k_1.adaptiveValueCalc)(12)};
|
|
145
|
-
height: ${(0, _4k_1.adaptiveValueCalc)(12)};
|
|
146
|
-
margin-right: ${(0, _4k_1.adaptiveValueCalc)(10)};
|
|
147
|
-
}
|
|
148
|
-
`;
|
|
149
|
-
const DetailsIconResize = () => {
|
|
150
|
-
const { windowDimensions } = (0, screen_1.useWindowDimensionsWithServerInitial)();
|
|
151
|
-
return ((0, jsx_runtime_1.jsx)(SIconWrapper, { children: (0, jsx_runtime_1.jsx)(details_svg_1.default, { style: (0, scale_1.getAdaptiveScale)({ windowDimensions, currentSize: 1 }) }) }));
|
|
152
|
-
};
|
|
153
|
-
const SMultipleOwnersFlex = (0, styled_components_1.default)(index_1.Flex) `
|
|
154
|
-
margin-bottom: 7px;
|
|
155
|
-
|
|
156
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
157
|
-
margin-bottom: ${(0, _4k_1.adaptiveValueCalc)(7)};
|
|
158
|
-
}
|
|
159
|
-
`;
|
|
160
|
-
const MultipleOwners = ({ ownersProfiles, ownersAddresses, }) => {
|
|
161
|
-
if (!ownersAddresses && !ownersProfiles)
|
|
162
|
-
return null;
|
|
163
|
-
let accumulatedResult = [...ownersProfiles];
|
|
164
|
-
if (ownersAddresses) {
|
|
165
|
-
accumulatedResult = [
|
|
166
|
-
...accumulatedResult,
|
|
167
|
-
ownersAddresses,
|
|
168
|
-
];
|
|
169
|
-
}
|
|
170
|
-
return ((0, jsx_runtime_1.jsx)(MultiFlexRight, { alignItems: "center", children: (0, jsx_runtime_1.jsx)(index_1.Flex, { flexDirection: "column", children: (0, jsx_runtime_1.jsxs)(SMultipleOwnersFlex, { alignItems: "center", children: [(0, jsx_runtime_1.jsx)(DetailsIconResize, {}), ' ', (0, jsx_runtime_1.jsxs)(index_1.H6, { children: [accumulatedResult.length, ' ', accumulatedResult.length > 1 ? 'Owners' : 'Owner'] })] }) }) }));
|
|
171
|
-
};
|
|
172
|
-
const Participants = ({ creatorsProfiles, ownersProfiles, creatorsAddresses, ownersAddresses, }) => {
|
|
173
|
-
// console.clear();
|
|
174
|
-
// console.log(creatorsProfiles, 'creatorsProfiles');
|
|
175
|
-
// console.log(creatorsAddresses, 'creatorsAddresses');
|
|
176
|
-
// console.log(ownersProfiles, 'ownersProfiles');
|
|
177
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (creatorsProfiles?.length && creatorsProfiles?.length > 1) ||
|
|
178
|
-
(ownersProfiles?.length && ownersProfiles?.length > 1) ? ((0, jsx_runtime_1.jsxs)(MultiFlex, { children: [(0, jsx_runtime_1.jsx)(MultipleCreators, { creatorsAddresses: creatorsAddresses, creatorsProfiles: creatorsProfiles }), (0, jsx_runtime_1.jsx)(MultipleOwners, { ownersProfiles: ownersProfiles, ownersAddresses: ownersAddresses })] })) : ((0, jsx_runtime_1.jsxs)(MultiFlex, { children: [(0, jsx_runtime_1.jsx)(SingleUser, { title: "Creator", address: creatorsAddresses?.[0], profile: creatorsProfiles?.[0] }), (0, jsx_runtime_1.jsx)(SingleUser, { title: "Owner", address: ownersAddresses?.[0], profile: ownersProfiles?.[0] })] })) }));
|
|
179
|
-
};
|
|
180
|
-
exports.Participants = Participants;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BlockChainEntity } from '@ludo.ninja/core';
|
|
2
|
-
type PriceRankProps = {
|
|
3
|
-
blockchain: BlockChainEntity;
|
|
4
|
-
rank: number;
|
|
5
|
-
latestPriceAmount: number | null;
|
|
6
|
-
latestPriceCurrency: string | null;
|
|
7
|
-
};
|
|
8
|
-
export declare const PriceRank: ({ rank, latestPriceAmount, latestPriceCurrency, }: PriceRankProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.PriceRank = void 0;
|
|
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
|
-
const utils_1 = require("@ludo.ninja/utils");
|
|
11
|
-
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
12
|
-
const colors_1 = require("../../../styles/colors");
|
|
13
|
-
const index_1 = require("../../../system/index");
|
|
14
|
-
const RangeContainer = styled_components_1.default.div `
|
|
15
|
-
display: block;
|
|
16
|
-
width: 100px;
|
|
17
|
-
background: ${colors_1.InactiveButtonColor};
|
|
18
|
-
height: 9px;
|
|
19
|
-
border-radius: 2px;
|
|
20
|
-
|
|
21
|
-
${ScreenWidth_1.mediaQuery.desktop} {
|
|
22
|
-
width: 40px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
26
|
-
width: ${(0, _4k_1.adaptiveValueCalc)(100)};
|
|
27
|
-
height: ${(0, _4k_1.adaptiveValueCalc)(9)};
|
|
28
|
-
border-radius: ${(0, _4k_1.adaptiveValueCalc)(2)};
|
|
29
|
-
}
|
|
30
|
-
`;
|
|
31
|
-
const RangeValue = styled_components_1.default.div `
|
|
32
|
-
display: block;
|
|
33
|
-
background: ${(props) => props.rankValue && (0, utils_1.getRankColor)(props.rankValue)};
|
|
34
|
-
height: 100%;
|
|
35
|
-
border-radius: 2px 0 0 2px;
|
|
36
|
-
|
|
37
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
38
|
-
border-radius: ${(0, _4k_1.adaptiveValueCalc)(2)} 0 0 ${(0, _4k_1.adaptiveValueCalc)(2)};
|
|
39
|
-
}
|
|
40
|
-
`;
|
|
41
|
-
const SPrice = (0, styled_components_1.default)(index_1.Box) `
|
|
42
|
-
width: 65%;
|
|
43
|
-
border-radius: 6px;
|
|
44
|
-
margin-right: 15px;
|
|
45
|
-
padding: 15px;
|
|
46
|
-
background-color: ${colors_1.WhiteColor};
|
|
47
|
-
|
|
48
|
-
.title-price {
|
|
49
|
-
margin-bottom: 6px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.price-latest {
|
|
53
|
-
margin-left: 8px;
|
|
54
|
-
margin-right: 8px;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
58
|
-
border-radius: ${(0, _4k_1.adaptiveValueCalc)(6)};
|
|
59
|
-
margin-right: ${(0, _4k_1.adaptiveValueCalc)(15)};
|
|
60
|
-
padding: ${(0, _4k_1.adaptiveValueCalc)(15)};
|
|
61
|
-
|
|
62
|
-
.title-price {
|
|
63
|
-
margin-bottom: ${(0, _4k_1.adaptiveValueCalc)(6)};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.price-latest {
|
|
67
|
-
margin-left: ${(0, _4k_1.adaptiveValueCalc)(8)};
|
|
68
|
-
margin-right: ${(0, _4k_1.adaptiveValueCalc)(8)};
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
`;
|
|
72
|
-
const SPriceFlex = (0, styled_components_1.default)(index_1.Flex) `
|
|
73
|
-
border-radius: 6px;
|
|
74
|
-
|
|
75
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
76
|
-
border-radius: ${(0, _4k_1.adaptiveValueCalc)(6)};
|
|
77
|
-
}
|
|
78
|
-
`;
|
|
79
|
-
const SRank = (0, styled_components_1.default)(index_1.Box) `
|
|
80
|
-
width: 35%;
|
|
81
|
-
border-radius: 6px;
|
|
82
|
-
padding: 15px;
|
|
83
|
-
|
|
84
|
-
.rank-title {
|
|
85
|
-
margin-bottom: 6px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.rank-text {
|
|
89
|
-
margin-right: 8px;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
93
|
-
border-radius: ${(0, _4k_1.adaptiveValueCalc)(6)};
|
|
94
|
-
padding: ${(0, _4k_1.adaptiveValueCalc)(15)};
|
|
95
|
-
|
|
96
|
-
.rank-title {
|
|
97
|
-
margin-bottom: ${(0, _4k_1.adaptiveValueCalc)(6)};
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.rank-text {
|
|
101
|
-
margin-right: ${(0, _4k_1.adaptiveValueCalc)(8)};
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
`;
|
|
105
|
-
const PriceRank = ({ rank, latestPriceAmount, latestPriceCurrency, }) => {
|
|
106
|
-
// const { isLoading, converterAmount } = useConvertedValue({
|
|
107
|
-
// latestPriceCurrency,
|
|
108
|
-
// latestPriceAmount,
|
|
109
|
-
// });
|
|
110
|
-
return ((0, jsx_runtime_1.jsxs)(index_1.Flex, { children: [latestPriceAmount && latestPriceAmount !== 0 && latestPriceCurrency && ((0, jsx_runtime_1.jsxs)(SPrice, { children: [(0, jsx_runtime_1.jsx)(index_1.H6, { color: colors_1.TextGrayColor, className: "title-price", children: "Price" }), (0, jsx_runtime_1.jsx)(index_1.Flex, { children: (0, jsx_runtime_1.jsx)(SPriceFlex, { alignItems: "center", children: (0, jsx_runtime_1.jsx)(index_1.H2, { color: colors_1.BlackColor, className: "price-latest", children: latestPriceAmount }) }) })] })), (0, jsx_runtime_1.jsxs)(SRank, { backgroundColor: colors_1.WhiteColor, children: [(0, jsx_runtime_1.jsx)(index_1.H6, { color: colors_1.TextGrayColor, className: "rank-title", children: "Ludo Rank" }), (0, jsx_runtime_1.jsx)(index_1.Flex, { children: (0, jsx_runtime_1.jsx)(SPriceFlex, { alignItems: "center", children: Boolean(rank) ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(index_1.H2, { color: colors_1.BlackColor, className: "rank-text", children: rank }), (0, jsx_runtime_1.jsx)(RangeContainer, { children: (0, jsx_runtime_1.jsx)(RangeValue, { rankValue: rank, style: { width: `${rank}%` } }) })] })) : ((0, jsx_runtime_1.jsx)(index_1.H3, { color: colors_1.BlackColor, className: "rank-text", children: "unknown" })) }) })] })] }));
|
|
111
|
-
};
|
|
112
|
-
exports.PriceRank = PriceRank;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { assetSchema as schema } from '@ludo.ninja/api';
|
|
2
|
-
type TitleProps = {
|
|
3
|
-
collectionId: string | null;
|
|
4
|
-
collectionTitle: string | null;
|
|
5
|
-
collectionMedias: schema.IMedia[];
|
|
6
|
-
name: null | string;
|
|
7
|
-
};
|
|
8
|
-
export declare const Title: ({ name, collectionTitle, collectionMedias, collectionId, }: TitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Title = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const react_1 = require("react");
|
|
9
|
-
const link_1 = __importDefault(require("next/link"));
|
|
10
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
11
|
-
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
12
|
-
const Urls_1 = require("../../../dto/common/Media/Urls");
|
|
13
|
-
const env_1 = require("../../../store/env");
|
|
14
|
-
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
15
|
-
const colors_1 = require("../../../styles/colors");
|
|
16
|
-
const index_1 = require("../../../system/index");
|
|
17
|
-
const ImageInterceptor_1 = require("../../../system/Img/ImageInterceptor");
|
|
18
|
-
const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
|
|
19
|
-
const SCollection = (0, styled_components_1.default)(index_1.Flex) `
|
|
20
|
-
margin-bottom: 8px;
|
|
21
|
-
|
|
22
|
-
img {
|
|
23
|
-
margin-right: 8px;
|
|
24
|
-
width: 28px;
|
|
25
|
-
height: 28px;
|
|
26
|
-
border-radius: 2px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
a {
|
|
30
|
-
font-size: 18px;
|
|
31
|
-
font-weight: 600;
|
|
32
|
-
color: ${colors_1.AccentColor};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
36
|
-
margin-bottom: ${(0, _4k_1.adaptiveValueCalc)(8)};
|
|
37
|
-
|
|
38
|
-
img {
|
|
39
|
-
margin-right: ${(0, _4k_1.adaptiveValueCalc)(8)};
|
|
40
|
-
width: ${(0, _4k_1.adaptiveValueCalc)(28)};
|
|
41
|
-
height: ${(0, _4k_1.adaptiveValueCalc)(28)};
|
|
42
|
-
border-radius: ${(0, _4k_1.adaptiveValueCalc)(2)};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
a {
|
|
46
|
-
font-size: ${(0, _4k_1.adaptiveValueCalc)(18)};
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
`;
|
|
50
|
-
const SH1 = (0, styled_components_1.default)(index_1.H1) `
|
|
51
|
-
color: ${colors_1.BlackColor};
|
|
52
|
-
line-height: 42px;
|
|
53
|
-
word-break: break-word;
|
|
54
|
-
|
|
55
|
-
span {
|
|
56
|
-
padding-left: 5px;
|
|
57
|
-
color: blue;
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
62
|
-
line-height: ${(0, _4k_1.adaptiveValueCalc)(42)};
|
|
63
|
-
|
|
64
|
-
span {
|
|
65
|
-
padding-left: ${(0, _4k_1.adaptiveValueCalc)(5)};
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
`;
|
|
69
|
-
const Collection = (props) => {
|
|
70
|
-
const NEXT_PUBLIC_STATIC_DOMAIN = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_STATIC_DOMAIN);
|
|
71
|
-
const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
|
|
72
|
-
if (!props.collectionTitle || !props.collectionId)
|
|
73
|
-
return null;
|
|
74
|
-
return ((0, jsx_runtime_1.jsxs)(SCollection, { alignItems: "center", children: [!!props.collectionMedias && ((0, jsx_runtime_1.jsx)(ImageInterceptor_1.ImageInterceptor, { children: (0, jsx_runtime_1.jsx)(index_1.ExternalImage, { src: (0, Urls_1.getAssetImage)(props.collectionMedias[0]?.url, '/noContent/noContent.svg', Urls_1.mediaSizes.small, NEXT_PUBLIC_STATIC_DOMAIN), alt: "collection_img", width: 28, height: 28, borderRadius: 2 }) })), (0, jsx_runtime_1.jsx)(link_1.default, { href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["collections"]}/${props?.collectionId}`, children: props.collectionTitle })] }));
|
|
75
|
-
};
|
|
76
|
-
const Title = ({ name, collectionTitle, collectionMedias, collectionId, }) => {
|
|
77
|
-
const [cuttedString, setCuttedString] = (0, react_1.useState)(name);
|
|
78
|
-
const [isNeedReadMore, setNeedReadMore] = (0, react_1.useState)(false);
|
|
79
|
-
(0, react_1.useEffect)(() => {
|
|
80
|
-
if (name && name.length > 35) {
|
|
81
|
-
setCuttedString(name.slice(0, 35));
|
|
82
|
-
setNeedReadMore(true);
|
|
83
|
-
}
|
|
84
|
-
}, []);
|
|
85
|
-
const handleReadMore = () => {
|
|
86
|
-
setCuttedString(name);
|
|
87
|
-
setNeedReadMore(false);
|
|
88
|
-
};
|
|
89
|
-
return ((0, jsx_runtime_1.jsxs)(index_1.Flex, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(Collection, { collectionId: collectionId, collectionTitle: collectionTitle, collectionMedias: collectionMedias }), (0, jsx_runtime_1.jsxs)(SH1, { children: [cuttedString, isNeedReadMore && (0, jsx_runtime_1.jsx)("span", { onClick: handleReadMore, children: "..." })] })] }));
|
|
90
|
-
};
|
|
91
|
-
exports.Title = Title;
|