@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
|
@@ -5,11 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SidebarSpa = exports.SLinkStyles = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
-
const sidebar_1 = require("@ludo.ninja/ui/build/components/sidebar");
|
|
10
|
-
const MainButton_1 = __importDefault(require("@ludo.ninja/ui/build/system/Buttons/MainButton"));
|
|
11
|
-
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
12
8
|
const data_1 = require("./data");
|
|
9
|
+
const useExtension_1 = __importDefault(require("../../hooks/extension/useExtension"));
|
|
13
10
|
const useSignOut_1 = require("../../modules/user/auth/useSignOut");
|
|
14
11
|
const store_1 = require("../../modules/user/store");
|
|
15
12
|
const ui_1 = require("../../store/ui");
|
|
@@ -17,7 +14,11 @@ const ScreenWidth_1 = require("../../styles/ScreenWidth");
|
|
|
17
14
|
const scale_1 = require("../../utils/adaptive/scale");
|
|
18
15
|
const auth_1 = require("../../utils/auth");
|
|
19
16
|
const screen_1 = require("../../utils/screen");
|
|
20
|
-
const
|
|
17
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
18
|
+
const sidebar_1 = require("@ludo.ninja/ui/build/components/sidebar");
|
|
19
|
+
const MainButton_1 = __importDefault(require("@ludo.ninja/ui/build/system/Buttons/MainButton"));
|
|
20
|
+
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
21
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
21
22
|
const MenuItem = styled_components_1.default.div `
|
|
22
23
|
font-size: 15px;
|
|
23
24
|
font-weight: 500;
|
|
@@ -92,7 +93,7 @@ const SLinkStyles = (Link) => (0, styled_components_1.default)(Link) `
|
|
|
92
93
|
`;
|
|
93
94
|
exports.SLinkStyles = SLinkStyles;
|
|
94
95
|
// Component
|
|
95
|
-
const SidebarSpa = ({ SLink, UserPic, SidebarInviteCodeLabel }) => {
|
|
96
|
+
const SidebarSpa = ({ SLink, UserPic, SidebarInviteCodeLabel, }) => {
|
|
96
97
|
const redirectToLoginWindow = (0, auth_1.useRedirectToLoginWindow)();
|
|
97
98
|
const closeSidebar = (0, ui_1.useUiStore)((state) => state.closeSidebar);
|
|
98
99
|
const isSidebarOpen = (0, ui_1.useUiStore)((state) => state.isSidebarOpen);
|
|
@@ -120,7 +121,7 @@ const SidebarSpa = ({ SLink, UserPic, SidebarInviteCodeLabel }) => {
|
|
|
120
121
|
beforeMenu: ((0, jsx_runtime_1.jsx)(BeforeMenuContainer, { children: isExtensionInstalled ? ((0, jsx_runtime_1.jsxs)(MenuItem, { onClick: () => {
|
|
121
122
|
closeSidebar();
|
|
122
123
|
openExtension();
|
|
123
|
-
}, children: [(0, jsx_runtime_1.jsx)("img", { src:
|
|
124
|
+
}, children: [(0, jsx_runtime_1.jsx)("img", { src: `${constants_1.staticLink}/public/sidebar/ludoX.svg`, alt: "Ludo X", width: 20, height: 20 }), "Open Ludo X"] })) : ((0, jsx_runtime_1.jsx)("div", { style: { padding: "12px 0" }, children: (0, jsx_runtime_1.jsx)(MainButton_1.default, { onClick: () => {
|
|
124
125
|
closeSidebar();
|
|
125
126
|
openExtensionChromeStorePage();
|
|
126
127
|
}, text: "Install Ludo X now", variant: "primaryM" }) })) })),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Image from '../../../common/Media/Image';
|
|
2
2
|
import { BasicMediaType } from '../../../common/Media/interface';
|
|
3
3
|
declare class AssetImage extends Image {
|
|
4
|
-
constructor({ media, mimeType, previewUrl, nsfw, originalUrl, alt, originalMime
|
|
4
|
+
constructor({ media, mimeType, previewUrl, nsfw, originalUrl, alt, originalMime }: BasicMediaType);
|
|
5
5
|
getMediaUrl(): (NEXT_PUBLIC_STATIC_DOMAIN: string) => string;
|
|
6
6
|
displaySingleMedia(): JSX.Element;
|
|
7
7
|
displayLinkedMedia(): JSX.Element;
|
|
@@ -8,8 +8,9 @@ const AssetImage_1 = __importDefault(require("../../../../components/assetPage/m
|
|
|
8
8
|
const Image_1 = __importDefault(require("../../../common/Media/Image"));
|
|
9
9
|
const Urls_1 = require("../../../common/Media/Urls");
|
|
10
10
|
const env_1 = require("../../../../store/env");
|
|
11
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
11
12
|
class AssetImage extends Image_1.default {
|
|
12
|
-
constructor({ media, mimeType, previewUrl, nsfw, originalUrl, alt, originalMime
|
|
13
|
+
constructor({ media, mimeType, previewUrl, nsfw, originalUrl, alt, originalMime }) {
|
|
13
14
|
super({
|
|
14
15
|
nsfw,
|
|
15
16
|
previewUrl,
|
|
@@ -25,10 +26,10 @@ class AssetImage extends Image_1.default {
|
|
|
25
26
|
return (NEXT_PUBLIC_STATIC_DOMAIN) => (0, Urls_1.isExternalMediaImage)(media, Urls_1.mediaSizes.regular, NEXT_PUBLIC_STATIC_DOMAIN);
|
|
26
27
|
}
|
|
27
28
|
displaySingleMedia() {
|
|
28
|
-
return (
|
|
29
|
+
return (0, jsx_runtime_1.jsx)(DisplayMedia, { alt: this.getAlt(), getMediaUrl: this.getMediaUrl() });
|
|
29
30
|
}
|
|
30
31
|
displayLinkedMedia() {
|
|
31
|
-
return (
|
|
32
|
+
return (0, jsx_runtime_1.jsx)(DisplayMedia, { alt: this.getAlt(), getMediaUrl: this.getMediaUrl(), originalUrl: this.getOriginalUrl() });
|
|
32
33
|
}
|
|
33
34
|
displayOpenGraphMeta({ alt }) {
|
|
34
35
|
const NEXT_PUBLIC_STATIC_DOMAIN = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_STATIC_DOMAIN);
|
|
@@ -38,6 +39,6 @@ class AssetImage extends Image_1.default {
|
|
|
38
39
|
}
|
|
39
40
|
const DisplayMedia = ({ getMediaUrl, alt, originalUrl, }) => {
|
|
40
41
|
const NEXT_PUBLIC_STATIC_DOMAIN = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_STATIC_DOMAIN);
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(AssetImage_1.default, { alt: alt, imageUrl: getMediaUrl(NEXT_PUBLIC_STATIC_DOMAIN), errorImg:
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)(AssetImage_1.default, { alt: alt, imageUrl: getMediaUrl(NEXT_PUBLIC_STATIC_DOMAIN), errorImg: `${constants_1.staticLink}/public/noContent/noContent.svg`, originalUrl: originalUrl }));
|
|
42
43
|
};
|
|
43
44
|
exports.default = AssetImage;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import OtherClass from '../../../common/Media/Other';
|
|
2
2
|
import { BasicMediaType } from '../../../common/Media/interface';
|
|
3
3
|
declare class AssetOther extends OtherClass {
|
|
4
|
-
constructor({ media, mimeType, previewUrl, nsfw, originalUrl, alt, originalMime
|
|
4
|
+
constructor({ media, mimeType, previewUrl, nsfw, originalUrl, alt, originalMime }: BasicMediaType);
|
|
5
5
|
getMediaUrl(): (NEXT_PUBLIC_STATIC_DOMAIN: string) => string;
|
|
6
6
|
displaySingleMedia(): JSX.Element;
|
|
7
7
|
displayLinkedMedia(): JSX.Element;
|
|
@@ -8,8 +8,9 @@ const AssetImage_1 = __importDefault(require("../../../../components/assetPage/m
|
|
|
8
8
|
const Other_1 = __importDefault(require("../../../common/Media/Other"));
|
|
9
9
|
const Urls_1 = require("../../../common/Media/Urls");
|
|
10
10
|
const env_1 = require("../../../../store/env");
|
|
11
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
11
12
|
class AssetOther extends Other_1.default {
|
|
12
|
-
constructor({ media, mimeType, previewUrl, nsfw, originalUrl, alt, originalMime
|
|
13
|
+
constructor({ media, mimeType, previewUrl, nsfw, originalUrl, alt, originalMime }) {
|
|
13
14
|
super({
|
|
14
15
|
nsfw,
|
|
15
16
|
previewUrl,
|
|
@@ -25,7 +26,7 @@ class AssetOther extends Other_1.default {
|
|
|
25
26
|
return (NEXT_PUBLIC_STATIC_DOMAIN) => (0, Urls_1.isExternalMediaImage)(media, Urls_1.mediaSizes.regular, NEXT_PUBLIC_STATIC_DOMAIN);
|
|
26
27
|
}
|
|
27
28
|
displaySingleMedia() {
|
|
28
|
-
return (
|
|
29
|
+
return (0, jsx_runtime_1.jsx)(DisplayMedia, { getMediaUrl: this.getMediaUrl(), alt: this.getAlt() });
|
|
29
30
|
}
|
|
30
31
|
displayLinkedMedia() {
|
|
31
32
|
return ((0, jsx_runtime_1.jsx)(DisplayMedia, { getMediaUrl: this.getMediaUrl(), alt: this.getAlt(), originalUrl: this.getOriginalUrl(), isOriginalUrl: true }));
|
|
@@ -41,8 +42,6 @@ class AssetOther extends Other_1.default {
|
|
|
41
42
|
}
|
|
42
43
|
const DisplayMedia = ({ getMediaUrl, alt, originalUrl, isOriginalUrl, }) => {
|
|
43
44
|
const NEXT_PUBLIC_STATIC_DOMAIN = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_STATIC_DOMAIN);
|
|
44
|
-
return ((0, jsx_runtime_1.jsx)(AssetImage_1.default, { alt: alt, imageUrl: getMediaUrl(NEXT_PUBLIC_STATIC_DOMAIN), errorImg:
|
|
45
|
-
? originalUrl ?? getMediaUrl(NEXT_PUBLIC_STATIC_DOMAIN)
|
|
46
|
-
: undefined }));
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(AssetImage_1.default, { alt: alt, imageUrl: getMediaUrl(NEXT_PUBLIC_STATIC_DOMAIN), errorImg: `${constants_1.staticLink}/public/noContent/noContent.svg`, originalUrl: isOriginalUrl ? originalUrl ?? getMediaUrl(NEXT_PUBLIC_STATIC_DOMAIN) : undefined }));
|
|
47
46
|
};
|
|
48
47
|
exports.default = AssetOther;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Screenshot from '../../../common/Media/Screenshot';
|
|
2
2
|
import { BasicMediaType } from '../../../common/Media/interface';
|
|
3
3
|
declare class AssetScreenshot extends Screenshot {
|
|
4
|
-
constructor({ media, mimeType, previewUrl, nsfw, originalUrl, alt, originalMime
|
|
4
|
+
constructor({ media, mimeType, previewUrl, nsfw, originalUrl, alt, originalMime }: BasicMediaType);
|
|
5
5
|
getMediaUrl(): (NEXT_PUBLIC_STATIC_DOMAIN: string) => string;
|
|
6
6
|
displaySingleMedia(): JSX.Element;
|
|
7
7
|
displayLinkedMedia(): JSX.Element;
|
|
@@ -8,8 +8,9 @@ const AssetImage_1 = __importDefault(require("../../../../components/assetPage/m
|
|
|
8
8
|
const Screenshot_1 = __importDefault(require("../../../common/Media/Screenshot"));
|
|
9
9
|
const Urls_1 = require("../../../common/Media/Urls");
|
|
10
10
|
const env_1 = require("../../../../store/env");
|
|
11
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
11
12
|
class AssetScreenshot extends Screenshot_1.default {
|
|
12
|
-
constructor({ media, mimeType, previewUrl, nsfw, originalUrl, alt, originalMime
|
|
13
|
+
constructor({ media, mimeType, previewUrl, nsfw, originalUrl, alt, originalMime }) {
|
|
13
14
|
super({
|
|
14
15
|
nsfw,
|
|
15
16
|
previewUrl,
|
|
@@ -25,10 +26,10 @@ class AssetScreenshot extends Screenshot_1.default {
|
|
|
25
26
|
return (NEXT_PUBLIC_STATIC_DOMAIN) => (0, Urls_1.isExternalMediaImage)(media, Urls_1.mediaSizes.regular, NEXT_PUBLIC_STATIC_DOMAIN);
|
|
26
27
|
}
|
|
27
28
|
displaySingleMedia() {
|
|
28
|
-
return (
|
|
29
|
+
return (0, jsx_runtime_1.jsx)(DisplayMedia, { getMediaUrl: this.getMediaUrl(), alt: this.getAlt() });
|
|
29
30
|
}
|
|
30
31
|
displayLinkedMedia() {
|
|
31
|
-
return (
|
|
32
|
+
return (0, jsx_runtime_1.jsx)(DisplayMedia, { getMediaUrl: this.getMediaUrl(), alt: this.getAlt(), originalUrl: this.getOriginalUrl() });
|
|
32
33
|
}
|
|
33
34
|
displayOpenGraphMeta({ alt }) {
|
|
34
35
|
const NEXT_PUBLIC_STATIC_DOMAIN = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_STATIC_DOMAIN);
|
|
@@ -38,6 +39,6 @@ class AssetScreenshot extends Screenshot_1.default {
|
|
|
38
39
|
}
|
|
39
40
|
const DisplayMedia = ({ getMediaUrl, alt, originalUrl, }) => {
|
|
40
41
|
const NEXT_PUBLIC_STATIC_DOMAIN = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_STATIC_DOMAIN);
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(AssetImage_1.default, { alt: alt, imageUrl: getMediaUrl(NEXT_PUBLIC_STATIC_DOMAIN), errorImg:
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)(AssetImage_1.default, { alt: alt, imageUrl: getMediaUrl(NEXT_PUBLIC_STATIC_DOMAIN), errorImg: `${constants_1.staticLink}/public/noContent/noContent.svg`, originalUrl: originalUrl, isScreenshot: true }));
|
|
42
43
|
};
|
|
43
44
|
exports.default = AssetScreenshot;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Audio from '../../Media/Audio';
|
|
2
2
|
import { BasicMediaType, TGetMediaUrlFunc } from '../../Media/interface';
|
|
3
3
|
declare class CreationAudio extends Audio {
|
|
4
|
-
constructor({ media, mimeType, previewUrl, nsfw, alt, originalMime
|
|
4
|
+
constructor({ media, mimeType, previewUrl, nsfw, alt, originalMime }: BasicMediaType);
|
|
5
5
|
getMediaUrl(): TGetMediaUrlFunc;
|
|
6
6
|
displaySingleMedia(): JSX.Element;
|
|
7
7
|
}
|
|
@@ -8,8 +8,9 @@ const Audio_1 = __importDefault(require("../../Media/Audio"));
|
|
|
8
8
|
const Urls_1 = require("../../Media/Urls");
|
|
9
9
|
const env_1 = require("../../../../store/env");
|
|
10
10
|
const CardAudio_1 = __importDefault(require("../../../../system/Cards/CardMedia/CardAudio"));
|
|
11
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
11
12
|
class CreationAudio extends Audio_1.default {
|
|
12
|
-
constructor({ media, mimeType, previewUrl, nsfw, alt, originalMime
|
|
13
|
+
constructor({ media, mimeType, previewUrl, nsfw, alt, originalMime }) {
|
|
13
14
|
super({ nsfw, previewUrl, media, mimeType, alt, originalMime });
|
|
14
15
|
}
|
|
15
16
|
getMediaUrl() {
|
|
@@ -17,11 +18,11 @@ class CreationAudio extends Audio_1.default {
|
|
|
17
18
|
return (getAudioENVDomain) => (0, Urls_1.isExternalMediaAudio)(media, getAudioENVDomain);
|
|
18
19
|
}
|
|
19
20
|
displaySingleMedia() {
|
|
20
|
-
return (
|
|
21
|
+
return (0, jsx_runtime_1.jsx)(DisplaySingleMedia, { getMediaUrl: this.getMediaUrl(), alt: this.getAlt() });
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
const DisplaySingleMedia = ({ getMediaUrl, alt, }) => {
|
|
24
25
|
const getAudioENVDomain = (0, env_1.useEnvStore)((state) => state.getAudioDomain);
|
|
25
|
-
return ((0, jsx_runtime_1.jsx)(CardAudio_1.default, { alt: alt, audioSrc: getMediaUrl(getAudioENVDomain), imgSrc:
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)(CardAudio_1.default, { alt: alt, audioSrc: getMediaUrl(getAudioENVDomain), imgSrc: `${constants_1.staticLink}/public/noContent/noContentAudio.svg`, errorImg: `${constants_1.staticLink}/public/noContent/noContentAudio.svg` }));
|
|
26
27
|
};
|
|
27
28
|
exports.default = CreationAudio;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Image from '../../Media/Image';
|
|
2
2
|
import { BasicMediaType } from '../../Media/interface';
|
|
3
3
|
declare class CreationImage extends Image {
|
|
4
|
-
constructor({ media, mimeType, previewUrl, nsfw, originalUrl, alt, originalMime
|
|
4
|
+
constructor({ media, mimeType, previewUrl, nsfw, originalUrl, alt, originalMime }: BasicMediaType);
|
|
5
5
|
getMediaUrl(): (NEXT_PUBLIC_STATIC_DOMAIN: string) => string;
|
|
6
6
|
displaySingleMedia(): JSX.Element;
|
|
7
7
|
displayLinkedMedia(): JSX.Element;
|
|
@@ -8,12 +8,13 @@ const Image_1 = __importDefault(require("../../Media/Image"));
|
|
|
8
8
|
const Urls_1 = require("../../Media/Urls");
|
|
9
9
|
const env_1 = require("../../../../store/env");
|
|
10
10
|
const CardImage_1 = __importDefault(require("../../../../system/Cards/CardMedia/CardImage"));
|
|
11
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
11
12
|
const DisplaySingleMedia = ({ getMediaUrl, errorImg, alt, }) => {
|
|
12
13
|
const NEXT_PUBLIC_STATIC_DOMAIN = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_STATIC_DOMAIN);
|
|
13
|
-
return (
|
|
14
|
+
return (0, jsx_runtime_1.jsx)(CardImage_1.default, { alt: alt, imgSrc: getMediaUrl(NEXT_PUBLIC_STATIC_DOMAIN), errorImg: errorImg });
|
|
14
15
|
};
|
|
15
16
|
class CreationImage extends Image_1.default {
|
|
16
|
-
constructor({ media, mimeType, previewUrl, nsfw, originalUrl, alt, originalMime
|
|
17
|
+
constructor({ media, mimeType, previewUrl, nsfw, originalUrl, alt, originalMime }) {
|
|
17
18
|
super({
|
|
18
19
|
nsfw,
|
|
19
20
|
previewUrl,
|
|
@@ -29,7 +30,7 @@ class CreationImage extends Image_1.default {
|
|
|
29
30
|
return (NEXT_PUBLIC_STATIC_DOMAIN) => (0, Urls_1.isExternalMediaImage)(media, Urls_1.mediaSizes.small, NEXT_PUBLIC_STATIC_DOMAIN);
|
|
30
31
|
}
|
|
31
32
|
displaySingleMedia() {
|
|
32
|
-
return ((0, jsx_runtime_1.jsx)(DisplaySingleMedia, { alt: this.getAlt(), getMediaUrl: this.getMediaUrl(), errorImg:
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)(DisplaySingleMedia, { alt: this.getAlt(), getMediaUrl: this.getMediaUrl(), errorImg: `${constants_1.staticLink}/public/noContent/noContent.svg` }));
|
|
33
34
|
}
|
|
34
35
|
displayLinkedMedia() {
|
|
35
36
|
return (0, jsx_runtime_1.jsx)("div", { children: "Its linked image" });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Other from '../../Media/Other';
|
|
2
2
|
import { BasicMediaType } from '../../Media/interface';
|
|
3
3
|
declare class CreationOther extends Other {
|
|
4
|
-
constructor({ media, mimeType, previewUrl, nsfw, alt, originalMime
|
|
4
|
+
constructor({ media, mimeType, previewUrl, nsfw, alt, originalMime }: BasicMediaType);
|
|
5
5
|
getMediaUrl(): (NEXT_PUBLIC_STATIC_DOMAIN: string) => string;
|
|
6
6
|
displaySingleMedia(): JSX.Element;
|
|
7
7
|
}
|
|
@@ -8,8 +8,9 @@ const Other_1 = __importDefault(require("../../Media/Other"));
|
|
|
8
8
|
const Urls_1 = require("../../Media/Urls");
|
|
9
9
|
const env_1 = require("../../../../store/env");
|
|
10
10
|
const CardImage_1 = __importDefault(require("../../../../system/Cards/CardMedia/CardImage"));
|
|
11
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
11
12
|
class CreationOther extends Other_1.default {
|
|
12
|
-
constructor({ media, mimeType, previewUrl, nsfw, alt, originalMime
|
|
13
|
+
constructor({ media, mimeType, previewUrl, nsfw, alt, originalMime }) {
|
|
13
14
|
super({ nsfw, previewUrl, media, mimeType, alt, originalMime });
|
|
14
15
|
}
|
|
15
16
|
getMediaUrl() {
|
|
@@ -17,11 +18,11 @@ class CreationOther extends Other_1.default {
|
|
|
17
18
|
return (NEXT_PUBLIC_STATIC_DOMAIN) => (0, Urls_1.isExternalMediaImage)(media, Urls_1.mediaSizes.small, NEXT_PUBLIC_STATIC_DOMAIN);
|
|
18
19
|
}
|
|
19
20
|
displaySingleMedia() {
|
|
20
|
-
return ((0, jsx_runtime_1.jsx)(DisplaySingleMedia, { alt: this.getAlt(), getMediaUrl: this.getMediaUrl(), errorImg:
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)(DisplaySingleMedia, { alt: this.getAlt(), getMediaUrl: this.getMediaUrl(), errorImg: `${constants_1.staticLink}/public/noContent/noContent.svg` }));
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
const DisplaySingleMedia = ({ getMediaUrl, errorImg, alt, }) => {
|
|
24
25
|
const NEXT_PUBLIC_STATIC_DOMAIN = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_STATIC_DOMAIN);
|
|
25
|
-
return (
|
|
26
|
+
return (0, jsx_runtime_1.jsx)(CardImage_1.default, { alt: alt, imgSrc: getMediaUrl(NEXT_PUBLIC_STATIC_DOMAIN), errorImg: errorImg });
|
|
26
27
|
};
|
|
27
28
|
exports.default = CreationOther;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Video from '../../Media/Video';
|
|
2
2
|
import { BasicMediaType, TGetMediaUrlFunc } from '../../Media/interface';
|
|
3
3
|
declare class CreationVideo extends Video {
|
|
4
|
-
constructor({ media, mimeType, previewUrl, nsfw, alt, originalMime
|
|
4
|
+
constructor({ media, mimeType, previewUrl, nsfw, alt, originalMime }: BasicMediaType);
|
|
5
5
|
getMediaUrl(): TGetMediaUrlFunc;
|
|
6
6
|
displaySingleMedia(): JSX.Element;
|
|
7
7
|
}
|
|
@@ -8,12 +8,13 @@ const Urls_1 = require("../../Media/Urls");
|
|
|
8
8
|
const Video_1 = __importDefault(require("../../Media/Video"));
|
|
9
9
|
const env_1 = require("../../../../store/env");
|
|
10
10
|
const CardVideo_1 = __importDefault(require("../../../../system/Cards/CardMedia/CardVideo"));
|
|
11
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
11
12
|
const DisplaySingleMedia = ({ getMediaUrl, errorImg, alt, }) => {
|
|
12
13
|
const getVideoDomain = (0, env_1.useEnvStore)((state) => state.getVideoDomain);
|
|
13
|
-
return (
|
|
14
|
+
return (0, jsx_runtime_1.jsx)(CardVideo_1.default, { alt: alt, videoSrc: getMediaUrl(getVideoDomain), errorImg: errorImg });
|
|
14
15
|
};
|
|
15
16
|
class CreationVideo extends Video_1.default {
|
|
16
|
-
constructor({ media, mimeType, previewUrl, nsfw, alt, originalMime
|
|
17
|
+
constructor({ media, mimeType, previewUrl, nsfw, alt, originalMime }) {
|
|
17
18
|
super({ nsfw, previewUrl, media, mimeType, alt, originalMime });
|
|
18
19
|
}
|
|
19
20
|
getMediaUrl() {
|
|
@@ -21,7 +22,7 @@ class CreationVideo extends Video_1.default {
|
|
|
21
22
|
return (getVideoENVDomain) => (0, Urls_1.isExternalMediaVideo)(media, getVideoENVDomain);
|
|
22
23
|
}
|
|
23
24
|
displaySingleMedia() {
|
|
24
|
-
return ((0, jsx_runtime_1.jsx)(DisplaySingleMedia, { alt: this.getAlt(), getMediaUrl: this.getMediaUrl(), errorImg:
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(DisplaySingleMedia, { alt: this.getAlt(), getMediaUrl: this.getMediaUrl(), errorImg: `${constants_1.staticLink}/public/noContent/noContent.svg` }));
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
exports.default = CreationVideo;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isExternalMediaObject = exports.isExternalMediaAudio = exports.isExternalMediaVideo = exports.isExternalMediaImage = exports.getAssetObjectPreviews = exports.getAssetObjectOrigins = exports.getAssetVideoPreviews = exports.getAssetAudioOrigins = exports.getAssetVideoOrigins = exports.getGalleryBannerImage = exports.getAssetImage = exports.getUserPicImage = exports.mediaSizes = void 0;
|
|
4
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
4
5
|
const utils_1 = require("@ludo.ninja/utils");
|
|
5
6
|
var mediaType;
|
|
6
7
|
(function (mediaType) {
|
|
@@ -37,7 +38,7 @@ const getUserPicImage = (getMediaDomain, userPic, fallbackImage, dimensions) =>
|
|
|
37
38
|
};
|
|
38
39
|
exports.getUserPicImage = getUserPicImage;
|
|
39
40
|
const getDimensions = (dimensions) => {
|
|
40
|
-
return dimensions ? `?d=${dimensions.w}x${dimensions.h}` :
|
|
41
|
+
return dimensions ? `?d=${dimensions.w}x${dimensions.h}` : "";
|
|
41
42
|
};
|
|
42
43
|
const getAssetImage = (media, fallbackImage, dimension, NEXT_PUBLIC_STATIC_DOMAIN) => {
|
|
43
44
|
if (!media) {
|
|
@@ -90,35 +91,35 @@ const getAssetObjectPreviews = (getMediaDomain, assetId, fallbackImage, dimensio
|
|
|
90
91
|
exports.getAssetObjectPreviews = getAssetObjectPreviews;
|
|
91
92
|
const isExternalMediaImage = (media, mediaSize, NEXT_PUBLIC_STATIC_DOMAIN) => {
|
|
92
93
|
if (media == null || !media.length)
|
|
93
|
-
return
|
|
94
|
-
if (media.includes(
|
|
94
|
+
return `${constants_1.staticLink}/public/noContent/noContent.svg`;
|
|
95
|
+
if (media.includes("base64"))
|
|
95
96
|
return media;
|
|
96
|
-
if (media.includes(
|
|
97
|
+
if (media.includes("https" || "http"))
|
|
97
98
|
return (0, utils_1.checkGltfUrl)(media);
|
|
98
|
-
return (0, exports.getAssetImage)(media,
|
|
99
|
+
return (0, exports.getAssetImage)(media, `${constants_1.staticLink}/public/noContent/noContent.svg`, mediaSize, NEXT_PUBLIC_STATIC_DOMAIN);
|
|
99
100
|
};
|
|
100
101
|
exports.isExternalMediaImage = isExternalMediaImage;
|
|
101
102
|
const isExternalMediaVideo = (media, getVideoENVDomain) => {
|
|
102
103
|
if (media == null)
|
|
103
|
-
return
|
|
104
|
-
if (media.includes(
|
|
104
|
+
return `${constants_1.staticLink}/public/noContent/noContent.svg`;
|
|
105
|
+
if (media.includes("https" || "http"))
|
|
105
106
|
return (0, utils_1.checkGltfUrl)(media);
|
|
106
|
-
return (0, exports.getAssetVideoOrigins)(getVideoENVDomain, media,
|
|
107
|
+
return (0, exports.getAssetVideoOrigins)(getVideoENVDomain, media, `${constants_1.staticLink}/public/noContent/noContent.svg`);
|
|
107
108
|
};
|
|
108
109
|
exports.isExternalMediaVideo = isExternalMediaVideo;
|
|
109
110
|
const isExternalMediaAudio = (media, getAudioENVDomain) => {
|
|
110
111
|
if (media == null)
|
|
111
|
-
return
|
|
112
|
-
if (media.includes(
|
|
112
|
+
return `${constants_1.staticLink}/public/noContent/noContentAudio.svg`;
|
|
113
|
+
if (media.includes("https" || "http"))
|
|
113
114
|
return (0, utils_1.checkGltfUrl)(media);
|
|
114
|
-
return (0, exports.getAssetAudioOrigins)(getAudioENVDomain, media,
|
|
115
|
+
return (0, exports.getAssetAudioOrigins)(getAudioENVDomain, media, `${constants_1.staticLink}/public/noContent/noContentAudio.svg`);
|
|
115
116
|
};
|
|
116
117
|
exports.isExternalMediaAudio = isExternalMediaAudio;
|
|
117
118
|
const isExternalMediaObject = (media, getMediaDomain) => {
|
|
118
119
|
if (media == null)
|
|
119
|
-
return
|
|
120
|
-
if (media.includes(
|
|
120
|
+
return `${constants_1.staticLink}/public/noContent/noContentObject.svg`;
|
|
121
|
+
if (media.includes("https" || "http"))
|
|
121
122
|
return (0, utils_1.checkGltfUrl)(media);
|
|
122
|
-
return (0, exports.getAssetObjectOrigins)(getMediaDomain, media,
|
|
123
|
+
return (0, exports.getAssetObjectOrigins)(getMediaDomain, media, `${constants_1.staticLink}/public/noContent/noContentObject.svg`);
|
|
123
124
|
};
|
|
124
125
|
exports.isExternalMediaObject = isExternalMediaObject;
|
|
@@ -5,24 +5,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.GalleryDeleteIcon = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const
|
|
9
|
-
const scale_1 = require("../../../utils/adaptive/scale");
|
|
10
|
-
const screen_1 = require("../../../utils/screen");
|
|
8
|
+
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
11
9
|
const IconButton_1 = __importDefault(require("../../../system/Buttons/IconButton"));
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
10
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
11
|
+
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
12
|
+
const react_1 = require("react");
|
|
13
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
14
|
+
const SImg = styled_components_1.default.img `
|
|
15
|
+
width: 18px;
|
|
16
|
+
height: 18px;
|
|
17
|
+
|
|
18
|
+
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
19
|
+
width: ${(0, _4k_1.adaptiveValueCalc)(18)};
|
|
20
|
+
height: ${(0, _4k_1.adaptiveValueCalc)(18)};
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
const GalleryDeleteIcon = ({ onClick, className }) => {
|
|
16
24
|
const [isHovered, setIsHovered] = (0, react_1.useState)(false);
|
|
17
25
|
const handleHover = (e) => {
|
|
18
|
-
setIsHovered(e.type ===
|
|
26
|
+
setIsHovered(e.type === "mouseenter");
|
|
19
27
|
};
|
|
20
|
-
return ((0, jsx_runtime_1.jsx)(IconButton_1.default, { handleHoverFn: handleHover, onClick: onClick, className: `trash${className ? ` ${className}` :
|
|
21
|
-
windowDimensions,
|
|
22
|
-
currentSize: 1,
|
|
23
|
-
}) })) : ((0, jsx_runtime_1.jsx)(trash_svg_1.default, { style: (0, scale_1.getAdaptiveScale)({
|
|
24
|
-
windowDimensions,
|
|
25
|
-
currentSize: 1,
|
|
26
|
-
}) })) }));
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(IconButton_1.default, { handleHoverFn: handleHover, onClick: onClick, className: `trash${className ? ` ${className}` : ""}`, icon: isHovered ? ((0, jsx_runtime_1.jsx)(SImg, { src: `${constants_1.staticLink}/public/iconButton/trash_open.svg`, alt: "trash_open" })) : ((0, jsx_runtime_1.jsx)(SImg, { src: `${constants_1.staticLink}/public/iconButton/trash.svg`, alt: "trash" })) }));
|
|
27
29
|
};
|
|
28
30
|
exports.GalleryDeleteIcon = GalleryDeleteIcon;
|
|
@@ -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
|
|
8
|
-
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
7
|
+
const vars_1 = require("../../../../../fonts/vars");
|
|
9
8
|
const ScreenWidth_1 = require("../../../../../styles/ScreenWidth");
|
|
10
9
|
const colors_1 = require("../../../../../styles/colors");
|
|
11
10
|
const typography_1 = require("../../../../../styles/typography");
|
|
12
|
-
const
|
|
13
|
-
const
|
|
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
|
// Styles
|
|
15
15
|
const StyledChooseItem = styled_components_1.default.div `
|
|
16
16
|
cursor: pointer;
|
|
@@ -19,20 +19,25 @@ const StyledChooseItem = styled_components_1.default.div `
|
|
|
19
19
|
justify-content: space-between;
|
|
20
20
|
padding: 6px 8px;
|
|
21
21
|
border-radius: 8px;
|
|
22
|
-
background-color: ${(props) => props.isSelected ? colors_1.InactiveButtonColor :
|
|
22
|
+
background-color: ${(props) => (props.isSelected ? colors_1.InactiveButtonColor : "none")};
|
|
23
23
|
|
|
24
24
|
.content-item-gallery-pic-default {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
.image {
|
|
26
|
+
background-image: url("${(props) => props.isSelected
|
|
27
|
+
? `${constants_1.staticLink}/public/gallery/defaultImageSelected.svg`
|
|
28
|
+
: `${constants_1.staticLink}/public/gallery/defaultImage.svg`}");
|
|
29
|
+
background-repeat: no-repeat;
|
|
30
|
+
background-position: center;
|
|
31
|
+
background-size: cover;
|
|
27
32
|
}
|
|
28
33
|
}
|
|
29
34
|
|
|
30
35
|
&:hover {
|
|
31
|
-
background-color: ${(props) => props.isSelected ?
|
|
36
|
+
background-color: ${(props) => (props.isSelected ? "none" : colors_1.InactiveButtonColor)};
|
|
32
37
|
|
|
33
38
|
.content-item-gallery-pic-default {
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
.image {
|
|
40
|
+
background-image: url("${constants_1.staticLink}/gallery/defaultImageSelected.svg");
|
|
36
41
|
}
|
|
37
42
|
}
|
|
38
43
|
}
|
|
@@ -87,6 +92,6 @@ const StyledChooseItem = styled_components_1.default.div `
|
|
|
87
92
|
}
|
|
88
93
|
`;
|
|
89
94
|
// Component
|
|
90
|
-
const ChooseItem = ({ galleryItem, handleIsSelected, isSelected, }) => ((0, jsx_runtime_1.jsx)(StyledChooseItem, { isSelected: isSelected, onClick: () => handleIsSelected(galleryItem), children: (0, jsx_runtime_1.jsxs)("div", { className:
|
|
95
|
+
const ChooseItem = ({ galleryItem, handleIsSelected, isSelected, }) => ((0, jsx_runtime_1.jsx)(StyledChooseItem, { isSelected: isSelected, onClick: () => handleIsSelected(galleryItem), children: (0, jsx_runtime_1.jsxs)("div", { className: "content-item-wrapper", children: [(0, jsx_runtime_1.jsx)("div", { className: "content-item-gallery-pic-default", children: (0, jsx_runtime_1.jsx)("div", { className: "image" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "content-item-gallery-name", children: [(0, jsx_runtime_1.jsx)("p", { className: "name", children: galleryItem.getGalleryName() }), (0, jsx_runtime_1.jsx)("span", { className: `items-count`, children: galleryItem.getGalleryItemsCount() })] })] }) }));
|
|
91
96
|
// Export
|
|
92
97
|
exports.default = ChooseItem;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import CollectionCreationEntity from '../../../../dto/Collection/CollectionCreationEntity';
|
|
2
2
|
import CreationEntity from '../../../../dto/CreationEntity';
|
|
3
3
|
import { TVirtuosoData } from '../../../virtuoso/types';
|
|
4
|
-
export declare const useVirtuosoData: <TData>({ creations, isMobile
|
|
4
|
+
export declare const useVirtuosoData: <TData>({ creations, isMobile }: {
|
|
5
5
|
isMobile: boolean;
|
|
6
6
|
creations: TData[];
|
|
7
7
|
}) => {
|
|
@@ -5,21 +5,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.useVirtuosoData = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const react_1 = require("react");
|
|
9
|
-
const react_loading_skeleton_1 = __importDefault(require("react-loading-skeleton"));
|
|
10
|
-
const react_virtuoso_1 = require("react-virtuoso");
|
|
11
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
const ScreenWidth_1 = require("@ludo.ninja/ui/build/styles/ScreenWidth");
|
|
13
|
-
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
14
8
|
const CollectionCreationEntity_1 = __importDefault(require("../../../../dto/Collection/CollectionCreationEntity"));
|
|
15
|
-
const
|
|
9
|
+
const ScreenWidth_1 = require("../../../../styles/ScreenWidth");
|
|
16
10
|
const colors_1 = require("../../../../styles/colors");
|
|
17
11
|
const typography_1 = require("../../../../styles/typography");
|
|
18
12
|
const CardImage_1 = __importDefault(require("../../../../system/Cards/CardMedia/CardImage"));
|
|
19
13
|
const CardsHolderLoader_1 = __importDefault(require("../../../../system/CardsHolderWithSkeleton/CardsHolderLoader"));
|
|
20
14
|
const check4k_1 = require("../../../../utils/adaptive/check4k");
|
|
21
15
|
const screen_1 = require("../../../../utils/screen");
|
|
22
|
-
|
|
16
|
+
const constants_1 = require("@ludo.ninja/core/build/constants");
|
|
17
|
+
const ScreenWidth_2 = require("@ludo.ninja/ui/build/styles/ScreenWidth");
|
|
18
|
+
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
19
|
+
const react_1 = require("react");
|
|
20
|
+
const react_loading_skeleton_1 = __importDefault(require("react-loading-skeleton"));
|
|
21
|
+
const react_virtuoso_1 = require("react-virtuoso");
|
|
22
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
23
23
|
// Styles
|
|
24
24
|
const StyledItemsPreview = styled_components_1.default.div `
|
|
25
25
|
margin-right: 40px;
|
|
@@ -99,7 +99,7 @@ const StyledItemsPreview = styled_components_1.default.div `
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
${
|
|
102
|
+
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
103
103
|
margin-right: ${(0, _4k_1.adaptiveValueCalc)(40)};
|
|
104
104
|
|
|
105
105
|
.head {
|
|
@@ -139,7 +139,7 @@ const SCardsRow = styled_components_1.default.div `
|
|
|
139
139
|
justify-content: space-between;
|
|
140
140
|
`;
|
|
141
141
|
// Component
|
|
142
|
-
const useVirtuosoData = ({ creations, isMobile
|
|
142
|
+
const useVirtuosoData = ({ creations, isMobile }) => {
|
|
143
143
|
const virtuosoData = (0, react_1.useMemo)(() => {
|
|
144
144
|
const columnCount = isMobile ? 4 : 2;
|
|
145
145
|
const creationPacks = [];
|
|
@@ -186,8 +186,7 @@ const ItemsPreview = ({ creations, deleteMethod, title, loadMore, isLoading, isN
|
|
|
186
186
|
});
|
|
187
187
|
const virtuosoBody = (() => {
|
|
188
188
|
const getGapCards = () => {
|
|
189
|
-
if (windowDimensions &&
|
|
190
|
-
windowDimensions.windowWidth >= ScreenWidth_1.ScreenWidth.FOUR_K_MIN) {
|
|
189
|
+
if (windowDimensions && windowDimensions.windowWidth >= ScreenWidth_2.ScreenWidth.FOUR_K_MIN) {
|
|
191
190
|
return (0, _4k_1.getAdaptiveValue)({
|
|
192
191
|
currentSize: 8,
|
|
193
192
|
windowWidth: windowDimensions.windowWidth,
|
|
@@ -240,20 +239,17 @@ const ItemsPreview = ({ creations, deleteMethod, title, loadMore, isLoading, isN
|
|
|
240
239
|
}
|
|
241
240
|
return getGapCards();
|
|
242
241
|
})(),
|
|
243
|
-
}, children: data.map((creation) => ((0, jsx_runtime_1.jsxs)("div", { className: "content-item", children: [creation instanceof CollectionCreationEntity_1.default ? ((0, jsx_runtime_1.jsx)(CardImage_1.default, { alt: `${creation.getName()} ${creation.getAddress() ||
|
|
244
|
-
? `${creation.getItemType() +
|
|
245
|
-
'.' +
|
|
246
|
-
creation.getCreationId()}`
|
|
242
|
+
}, children: data.map((creation) => ((0, jsx_runtime_1.jsxs)("div", { className: "content-item", children: [creation instanceof CollectionCreationEntity_1.default ? ((0, jsx_runtime_1.jsx)(CardImage_1.default, { alt: `${creation.getName()} ${creation.getAddress() || ""}`, imgSrc: creation.getOriginalUrls()?.[0] ?? "", errorImg: `${constants_1.staticLink}/public/noContent/noContent.svg` })) : (creation.detectMediaType().displaySingleMedia()), (0, jsx_runtime_1.jsx)("img", { src: `${constants_1.staticLink}/public/gallery/delete.svg`, alt: "delete", width: 24, height: 24, className: "content-item-gallery-deleteIcon", onClick: () => deleteMethod(creation instanceof CollectionCreationEntity_1.default
|
|
243
|
+
? `${creation.getItemType() + "." + creation.getCreationId()}`
|
|
247
244
|
: creation.getCreationId()) })] }, creation.getCreationId()))) }));
|
|
248
245
|
},
|
|
249
246
|
};
|
|
250
247
|
})();
|
|
251
|
-
return ((0, jsx_runtime_1.jsxs)(StyledItemsPreview, { children: [(0, jsx_runtime_1.jsx)("div", { className:
|
|
248
|
+
return ((0, jsx_runtime_1.jsxs)(StyledItemsPreview, { children: [(0, jsx_runtime_1.jsx)("div", { className: "head", children: (0, jsx_runtime_1.jsx)("h3", { className: "tittle", children: `${title} (${allCount || creations?.length})` }) }), (0, jsx_runtime_1.jsx)(react_virtuoso_1.Virtuoso, { style: {
|
|
252
249
|
height: isMobile
|
|
253
250
|
? 144
|
|
254
251
|
: (() => {
|
|
255
|
-
if (windowDimensions &&
|
|
256
|
-
windowDimensions.windowWidth >= ScreenWidth_1.ScreenWidth.FOUR_K_MIN) {
|
|
252
|
+
if (windowDimensions && windowDimensions.windowWidth >= ScreenWidth_2.ScreenWidth.FOUR_K_MIN) {
|
|
257
253
|
return (0, _4k_1.getAdaptiveValue)({
|
|
258
254
|
currentSize: 302,
|
|
259
255
|
windowWidth: windowDimensions.windowWidth,
|
|
@@ -262,8 +258,7 @@ const ItemsPreview = ({ creations, deleteMethod, title, loadMore, isLoading, isN
|
|
|
262
258
|
return 302;
|
|
263
259
|
})(),
|
|
264
260
|
minWidth: (() => {
|
|
265
|
-
if (windowDimensions &&
|
|
266
|
-
windowDimensions.windowWidth >= ScreenWidth_1.ScreenWidth.FOUR_K_MIN) {
|
|
261
|
+
if (windowDimensions && windowDimensions.windowWidth >= ScreenWidth_2.ScreenWidth.FOUR_K_MIN) {
|
|
267
262
|
return (0, _4k_1.getAdaptiveValue)({
|
|
268
263
|
currentSize: 168,
|
|
269
264
|
windowWidth: windowDimensions.windowWidth,
|