@ludo.ninja/components 2.1.66 → 2.1.71
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 -1
- package/build/components/assetPage/index.js +1 -3
- package/build/modules/user/auth/useVerification.js +8 -1
- package/package.json +1 -1
- package/build/components/assetPage/slider/index.d.ts +0 -4
- package/build/components/assetPage/slider/index.js +0 -177
- package/build/components/assetPage/slider/slideItem.d.ts +0 -5
- package/build/components/assetPage/slider/slideItem.js +0 -53
|
@@ -6,6 +6,5 @@ export { Properties } from './properties';
|
|
|
6
6
|
export { Information } from './information';
|
|
7
7
|
export { Description } from './description';
|
|
8
8
|
export { MarketPlaces } from './marketPlaces';
|
|
9
|
-
export { CollectionSlider } from './slider';
|
|
10
9
|
export { AudioVideoPlayer } from './audioVideoPlayer';
|
|
11
10
|
export { Viewer3D } from './viewer3D';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Viewer3D = exports.AudioVideoPlayer = exports.
|
|
3
|
+
exports.Viewer3D = exports.AudioVideoPlayer = exports.MarketPlaces = exports.Description = exports.Information = exports.Properties = exports.PriceRank = exports.AssetMedia = exports.Title = exports.Participants = void 0;
|
|
4
4
|
var participants_1 = require("./participants");
|
|
5
5
|
Object.defineProperty(exports, "Participants", { enumerable: true, get: function () { return participants_1.Participants; } });
|
|
6
6
|
var tittle_1 = require("./tittle");
|
|
@@ -17,8 +17,6 @@ var description_1 = require("./description");
|
|
|
17
17
|
Object.defineProperty(exports, "Description", { enumerable: true, get: function () { return description_1.Description; } });
|
|
18
18
|
var marketPlaces_1 = require("./marketPlaces");
|
|
19
19
|
Object.defineProperty(exports, "MarketPlaces", { enumerable: true, get: function () { return marketPlaces_1.MarketPlaces; } });
|
|
20
|
-
var slider_1 = require("./slider");
|
|
21
|
-
Object.defineProperty(exports, "CollectionSlider", { enumerable: true, get: function () { return slider_1.CollectionSlider; } });
|
|
22
20
|
var audioVideoPlayer_1 = require("./audioVideoPlayer");
|
|
23
21
|
Object.defineProperty(exports, "AudioVideoPlayer", { enumerable: true, get: function () { return audioVideoPlayer_1.AudioVideoPlayer; } });
|
|
24
22
|
var viewer3D_1 = require("./viewer3D");
|
|
@@ -38,7 +38,8 @@ const useVerification = () => {
|
|
|
38
38
|
authCookiesParsed.refreshToken &&
|
|
39
39
|
authCookiesParsed.newUser &&
|
|
40
40
|
authCookiesParsed.userId &&
|
|
41
|
-
//
|
|
41
|
+
//todo: remove required invite code
|
|
42
|
+
authCookiesParsed.inviteCode &&
|
|
42
43
|
authCookiesParsed.role) {
|
|
43
44
|
signIn({
|
|
44
45
|
userId: authCookiesParsed.userId,
|
|
@@ -50,6 +51,12 @@ const useVerification = () => {
|
|
|
50
51
|
role: authCookiesParsed.role,
|
|
51
52
|
});
|
|
52
53
|
}
|
|
54
|
+
else {
|
|
55
|
+
//todo: remove required invite code
|
|
56
|
+
if (currentLocation !== "/forms/[formId]" && currentLocation !== "/minting") {
|
|
57
|
+
await signOut();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
53
60
|
}
|
|
54
61
|
catch (e) {
|
|
55
62
|
// console.error('verification', e);
|
package/package.json
CHANGED
|
@@ -1,177 +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.CollectionSlider = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
// link to carousel source https://dev.to/holdmypotion/react-3d-image-slider-5g6
|
|
9
|
-
const react_1 = require("react");
|
|
10
|
-
const react_slick_1 = __importDefault(require("react-slick"));
|
|
11
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
13
|
-
const store_1 = require("./store");
|
|
14
|
-
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
15
|
-
const colors_1 = require("../../../styles/colors");
|
|
16
|
-
const index_1 = require("../../../system/index");
|
|
17
|
-
const slideItem_1 = require("./slideItem");
|
|
18
|
-
const Wrapper = styled_components_1.default.div `
|
|
19
|
-
margin: 0 0 60px -160px;
|
|
20
|
-
width: 1400px;
|
|
21
|
-
|
|
22
|
-
${ScreenWidth_1.mediaQuery.desktop} {
|
|
23
|
-
margin: 0 auto;
|
|
24
|
-
width: 100%;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
${ScreenWidth_1.mediaQuery.mobile} {
|
|
28
|
-
width: 95vw;
|
|
29
|
-
position: relative;
|
|
30
|
-
left: calc(((100vw - 320px) / -2) - -2.5vw);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.prevArrow {
|
|
34
|
-
display: flex;
|
|
35
|
-
align-items: center;
|
|
36
|
-
justify-content: center;
|
|
37
|
-
width: 50px;
|
|
38
|
-
height: 50px;
|
|
39
|
-
border-radius: 50%;
|
|
40
|
-
background: ${colors_1.WhiteColor};
|
|
41
|
-
position: absolute;
|
|
42
|
-
top: calc(50% - 25px);
|
|
43
|
-
left: 165px;
|
|
44
|
-
z-index: 100;
|
|
45
|
-
cursor: pointer;
|
|
46
|
-
font-size: 2rem;
|
|
47
|
-
|
|
48
|
-
${ScreenWidth_1.mediaQuery.desktop} {
|
|
49
|
-
left: 10px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
${ScreenWidth_1.mediaQuery.tablet} {
|
|
53
|
-
left: 0;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.nextArrow {
|
|
58
|
-
left: calc(100% - 195px);
|
|
59
|
-
transform: rotate(180deg);
|
|
60
|
-
|
|
61
|
-
${ScreenWidth_1.mediaQuery.desktop} {
|
|
62
|
-
left: calc(100% - 65px);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
${ScreenWidth_1.mediaQuery.tablet} {
|
|
66
|
-
left: calc(100% - 48px);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.disable {
|
|
71
|
-
display: none;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.slick-track {
|
|
75
|
-
display: flex;
|
|
76
|
-
align-items: center;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.slick-slide {
|
|
80
|
-
padding: 0 10px;
|
|
81
|
-
transform: scale(0.63);
|
|
82
|
-
transition: all 400ms;
|
|
83
|
-
opacity: 0.2;
|
|
84
|
-
|
|
85
|
-
${ScreenWidth_1.mediaQuery.tablet} {
|
|
86
|
-
transform: scale(0.5);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
&:not(.slick-active) {
|
|
90
|
-
pointer-events: none;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.slick-slide.slick-active.slick-center.slick-current {
|
|
95
|
-
transform: scale(1);
|
|
96
|
-
transition: all 400ms;
|
|
97
|
-
opacity: 1;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.medias-count {
|
|
101
|
-
margin-top: 15px;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
105
|
-
margin: 0 0 ${(0, _4k_1.adaptiveValueCalc)(60)} ${(0, _4k_1.adaptiveValueCalc)(-160)};
|
|
106
|
-
width: ${(0, _4k_1.adaptiveValueCalc)(1400)};
|
|
107
|
-
|
|
108
|
-
.medias-count {
|
|
109
|
-
margin-top: ${(0, _4k_1.adaptiveValueCalc)(15)};
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.prevArrow {
|
|
113
|
-
width: ${(0, _4k_1.adaptiveValueCalc)(50)};
|
|
114
|
-
height: ${(0, _4k_1.adaptiveValueCalc)(50)};
|
|
115
|
-
top: calc(50% - ${(0, _4k_1.adaptiveValueCalc)(25)});
|
|
116
|
-
left: ${(0, _4k_1.adaptiveValueCalc)(165)};
|
|
117
|
-
font-size: ${(0, _4k_1.adaptiveValueCalc)(20)};
|
|
118
|
-
|
|
119
|
-
img {
|
|
120
|
-
width: ${(0, _4k_1.adaptiveValueCalc)(12)};
|
|
121
|
-
height: ${(0, _4k_1.adaptiveValueCalc)(15)};
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.nextArrow {
|
|
126
|
-
left: calc(100% - ${(0, _4k_1.adaptiveValueCalc)(195)});
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.slick-slide {
|
|
130
|
-
padding: 0 ${(0, _4k_1.adaptiveValueCalc)(10)};
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
`;
|
|
134
|
-
const PrevArrow = ({ disable, onClick, }) => {
|
|
135
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: `${disable ? 'disable prevArrow' : 'prevArrow'}`, onClick: onClick, children: (0, jsx_runtime_1.jsx)("img", { src: '/assetPage/arrow.svg', width: 12, height: 15, alt: "arrow" }) }));
|
|
136
|
-
};
|
|
137
|
-
const NextArrow = ({ disable, onClick, }) => {
|
|
138
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: `${disable ? 'disable prevArrow nextArrow' : 'prevArrow nextArrow'}`, onClick: onClick, children: (0, jsx_runtime_1.jsx)("img", { src: '/assetPage/arrow.svg', width: 12, height: 15, alt: "arrow" }) }));
|
|
139
|
-
};
|
|
140
|
-
const CollectionSlider = ({ medias }) => {
|
|
141
|
-
if (!medias)
|
|
142
|
-
return null;
|
|
143
|
-
return (0, jsx_runtime_1.jsx)(SliderMedias, { medias: medias });
|
|
144
|
-
};
|
|
145
|
-
exports.CollectionSlider = CollectionSlider;
|
|
146
|
-
const SliderMedias = ({ medias }) => {
|
|
147
|
-
const setIsActiveSlider = (0, store_1.useSliderStore)((state) => state.setIsActiveSlider);
|
|
148
|
-
const isDisabled = (0, store_1.useSliderStore)((state) => state.isDisabled);
|
|
149
|
-
(0, react_1.useEffect)(() => {
|
|
150
|
-
setIsActiveSlider(true);
|
|
151
|
-
return () => {
|
|
152
|
-
setIsActiveSlider(false);
|
|
153
|
-
};
|
|
154
|
-
}, []);
|
|
155
|
-
const [imageIndex, setImageIndex] = (0, react_1.useState)(0);
|
|
156
|
-
const settings = {
|
|
157
|
-
draggable: !isDisabled,
|
|
158
|
-
swipe: !isDisabled,
|
|
159
|
-
arrows: !isDisabled,
|
|
160
|
-
centerMode: true,
|
|
161
|
-
infinite: false,
|
|
162
|
-
dots: false,
|
|
163
|
-
speed: 400,
|
|
164
|
-
swipeToSlide: true,
|
|
165
|
-
focusOnSelect: true,
|
|
166
|
-
variableWidth: true,
|
|
167
|
-
nextArrow: ((0, jsx_runtime_1.jsx)(NextArrow, { disable: imageIndex === medias.length - 1, onClick: () => setImageIndex((val) => val + 1) })),
|
|
168
|
-
prevArrow: ((0, jsx_runtime_1.jsx)(PrevArrow, { disable: imageIndex === 0, onClick: () => setImageIndex((val) => val - 1) })),
|
|
169
|
-
beforeChange: (current, next) => setImageIndex(next),
|
|
170
|
-
};
|
|
171
|
-
const collectionTemplate = medias.map((image, idx) => {
|
|
172
|
-
if (!image)
|
|
173
|
-
return null;
|
|
174
|
-
return (0, jsx_runtime_1.jsx)(slideItem_1.SlideItem, { item: image }, idx);
|
|
175
|
-
});
|
|
176
|
-
return ((0, jsx_runtime_1.jsxs)(Wrapper, { children: [(0, jsx_runtime_1.jsx)(react_slick_1.default, { ...settings, children: collectionTemplate }), (0, jsx_runtime_1.jsx)(index_1.H6, { style: { textAlign: 'center' }, color: colors_1.TextGrayColor, className: 'medias-count', children: imageIndex + 1 + '/' + medias.length + ' medias' })] }));
|
|
177
|
-
};
|
|
@@ -1,53 +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.SlideItem = 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 audioVideoPlayer_1 = require("../audioVideoPlayer");
|
|
11
|
-
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
12
|
-
const SlideWrapper = styled_components_1.default.div `
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
//width: 450px;
|
|
18
|
-
//height: 450px;
|
|
19
|
-
position: relative;
|
|
20
|
-
border-radius: 16px;
|
|
21
|
-
background-size: contain;
|
|
22
|
-
background-repeat: no-repeat;
|
|
23
|
-
margin: 0 auto;
|
|
24
|
-
|
|
25
|
-
${audioVideoPlayer_1.ReactPlayerWrapper} {
|
|
26
|
-
margin-right: 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
${ScreenWidth_1.mediaQuery.desktop} {
|
|
30
|
-
width: 280px;
|
|
31
|
-
height: 280px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
${ScreenWidth_1.mediaQuery.tablet} {
|
|
35
|
-
width: 240px;
|
|
36
|
-
height: 240px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
& > div {
|
|
40
|
-
width: 100%;
|
|
41
|
-
|
|
42
|
-
/* ${ScreenWidth_1.mediaQuery.desktop} {
|
|
43
|
-
width:100%;
|
|
44
|
-
} */
|
|
45
|
-
}
|
|
46
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
47
|
-
border-radius: ${(0, _4k_1.adaptiveValueCalc)(16)};
|
|
48
|
-
}
|
|
49
|
-
`;
|
|
50
|
-
const SlideItem = ({ item, key }) => {
|
|
51
|
-
return (0, jsx_runtime_1.jsx)(SlideWrapper, { children: item.displayLinkedMedia() }, key);
|
|
52
|
-
};
|
|
53
|
-
exports.SlideItem = SlideItem;
|