@ludo.ninja/components 2.0.10 → 2.0.11
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/api/graphql/index.js +3 -7
- package/build/api/server-assets/mutations/useDislikeAsset/index.js +7 -9
- package/build/api/server-assets/mutations/useLikeAsset/index.js +7 -9
- package/build/api/server-assets/queries/useFetchAssetByBlockchain/index.js +14 -21
- package/build/api/server-assets/queries/useFetchAssets/index.js +11 -14
- package/build/api/server-assets/queries/useFetchDynamicAssetLikes/index.js +13 -15
- package/build/api/server-assets/queries/useFetchDynamicAssetsLikes/index.js +11 -13
- package/build/api/server-collection/mutations/useDislikeCollection/index.js +7 -9
- package/build/api/server-collection/mutations/useLikeCollection/index.js +7 -9
- package/build/api/server-experiences/queries/useFetchMyExperienceWithLevel/index.js +19 -21
- package/build/api/server-experiences/queries/useFetchMyTasks/index.js +15 -20
- package/build/api/server-galleries/mutations/useAddAssetsToGallery/index.js +9 -12
- package/build/api/server-galleries/mutations/useAddChangeGalleryBanner/index.js +9 -13
- package/build/api/server-galleries/mutations/useAddCollectionsToGallery/index.js +9 -12
- package/build/api/server-galleries/mutations/useAddCreationsToGallery/index.js +13 -16
- package/build/api/server-galleries/mutations/useCreateFavorites/index.js +5 -8
- package/build/api/server-galleries/mutations/useCreateGallery/index.js +5 -8
- package/build/api/server-galleries/mutations/useDeleteGallery/index.js +10 -12
- package/build/api/server-galleries/mutations/useDeleteGalleryBanner/index.js +9 -13
- package/build/api/server-galleries/mutations/useEditGallery/index.js +5 -7
- package/build/api/server-galleries/mutations/useRemoveAssetFromGallery/index.js +13 -16
- package/build/api/server-galleries/mutations/useRemoveCollectionFromGallery/index.js +12 -15
- package/build/api/server-galleries/queries/useFetchGallery/index.js +11 -18
- package/build/api/server-galleries/queries/useFetchGalleryAssets/index.js +9 -12
- package/build/api/server-galleries/queries/useFetchMyFavorites/index.js +11 -17
- package/build/api/server-galleries/queries/useFetchMyGalleries/index.js +13 -19
- package/build/api/server-galleries/queries/useFetchSubscribedGalleries/index.js +9 -11
- package/build/api/server-galleries/queries/useFetchUserFavorites/index.js +10 -16
- package/build/api/server-identities/mutations/useAddWalletElrond/index.js +10 -12
- package/build/api/server-identities/mutations/useAddWalletFlow/index.js +10 -12
- package/build/api/server-identities/mutations/useAddWalletMetamask/index.js +10 -12
- package/build/api/server-identities/mutations/useAddWalletSolana/index.js +10 -12
- package/build/api/server-identities/mutations/useAddWalletTezos/index.js +10 -12
- package/build/api/server-identities/mutations/useFollowProfile/index.js +13 -15
- package/build/api/server-identities/mutations/useGenerateNewInviteCodes/index.js +7 -9
- package/build/api/server-identities/mutations/useInviteCode/index.js +9 -11
- package/build/api/server-identities/mutations/useRemoveWallet/index.js +10 -12
- package/build/api/server-identities/mutations/useRevokeToken/index.js +5 -7
- package/build/api/server-identities/mutations/useSaveEmailOfJoiner/index.js +9 -11
- package/build/api/server-identities/mutations/useUnfollowProfile/index.js +13 -15
- package/build/api/server-identities/queries/useFetchProfile/index.js +19 -23
- package/build/api/server-identities/queries/useFetchUserWallets/index.js +4 -6
- package/build/api/server-medias/mutations/useDeleteUserpic/index.js +7 -9
- package/build/api/server-medias/mutations/useUploadUserpic/index.js +7 -9
- package/build/api/server-medias/queries/useFetchUserPic/index.js +8 -10
- package/build/api/server-opportunities/mutations/useDislikeOpportunity.js +8 -12
- package/build/api/server-opportunities/mutations/useLikeOpportunity.js +8 -12
- package/build/api/server-opportunities/mutations/useOpenOpportunity/index.js +8 -10
- package/build/api/server-opportunities/queries/useGetOpportunities.js +9 -13
- package/build/api/server-preferences/queries/fetchSearchResultSelections/index.js +6 -11
- package/build/api/server-preferences/queries/fetchSearchResultSelections/queryData.js +9 -13
- package/build/api/server-search/queries/useFetchAllCreations/index.js +15 -23
- package/build/api/server-search/queries/useFetchAssetsCount/index.js +2 -4
- package/build/api/server-search/queries/useFetchCollection/index.js +16 -23
- package/build/api/server-search/queries/useFetchCollections/index.js +16 -23
- package/build/api/server-search/queries/useFetchDynamicCollectionData/index.js +18 -24
- package/build/api/server-search/queries/useFetchFindAllTopEntitiesByName/index.js +16 -24
- package/build/api/server-search/queries/useFetchNetWorth/index.js +7 -9
- package/build/api/server-search/queries/useFindCreations/index.js +20 -28
- package/build/api/server-search/queries/useFindProfilesByName/index.js +14 -19
- package/build/api/server-search/queries/useFindShowcaseItems/index.js +1 -3
- package/build/api/server-search/queries/useFindUserCreations/index.js +16 -21
- package/build/api/server-search/queries/useFindUserShowcaseItems/index.js +1 -3
- package/build/api/subscriptions/SubscriberInviteNotification.js +18 -22
- package/build/components/assetPage/assetLikes/index.js +25 -30
- package/build/components/assetPage/assetNft/index.js +14 -21
- package/build/components/assetPage/audioVideoPlayer/Duration.js +5 -8
- package/build/components/assetPage/audioVideoPlayer/index.js +51 -81
- package/build/components/assetPage/category/index.js +18 -25
- package/build/components/assetPage/description/index.js +17 -24
- package/build/components/assetPage/index.js +11 -25
- package/build/components/assetPage/information/index.js +43 -50
- package/build/components/assetPage/marketPlaces/index.js +26 -33
- package/build/components/assetPage/media/AssetImage/index.js +52 -80
- package/build/components/assetPage/moreDropDown/index.js +47 -77
- package/build/components/assetPage/participants/index.js +64 -71
- package/build/components/assetPage/priceRank/index.js +38 -45
- package/build/components/assetPage/properties/index.js +19 -26
- package/build/components/assetPage/slider/index.js +44 -51
- package/build/components/assetPage/slider/slideItem.js +14 -21
- package/build/components/assetPage/slider/store.js +2 -5
- package/build/components/assetPage/tittle/index.js +32 -39
- package/build/components/assetPage/viewer3D/index.js +50 -58
- package/build/components/base/Meta/index.js +6 -11
- package/build/components/base/NoSSR/index.js +4 -9
- package/build/components/favoriteList/add/addCreationToFavoriteList/index.js +14 -19
- package/build/components/gallery/add/addCreationToGallery/index.js +20 -25
- package/build/components/headers/components/headerExperienceLabel/index.js +12 -17
- package/build/components/headers/components/headerUserPic/index.js +11 -16
- package/build/components/headers/header/index.js +17 -22
- package/build/components/headers/headerSearch/index.js +21 -26
- package/build/components/headers/headerSimple/index.js +14 -19
- package/build/components/linkTabs/index.js +14 -19
- package/build/components/linkTabs/linkTab/index.js +22 -27
- package/build/components/profile/profileSkeleton/index.js +10 -18
- package/build/components/search/SearchInputContainer.js +61 -91
- package/build/components/search/searchCloseMoreButtons/index.js +20 -25
- package/build/components/search/searchSimpleInput/index.js +37 -65
- package/build/components/search/searchSuggestions/index.js +32 -37
- package/build/components/search/searchSuggestions/searchSuggestionsCaption/index.js +17 -22
- package/build/components/search/searchSuggestions/searchSuggestionsFooter/index.js +20 -25
- package/build/components/search/searchSuggestions/searchSuggestionsItem/index.js +29 -34
- package/build/components/search/searchSuggestions/searchSuggestionsItem/searchSuggestionsItemSkeleton/index.js +28 -58
- package/build/components/search/searchSuggestions/searchSuggestionsNotFound/index.js +19 -24
- package/build/components/searchFiltersConnector/filters/applyResetBtns/index.js +11 -16
- package/build/components/searchFiltersConnector/filters/galleriesFiltersForm/index.js +13 -18
- package/build/components/searchFiltersConnector/filters/index.js +38 -43
- package/build/components/searchFiltersConnector/filters/mobileFilters/index.js +5 -10
- package/build/components/searchFiltersConnector/filters/setsFiltersForm/index.js +12 -17
- package/build/components/searchFiltersConnector/index.js +12 -19
- package/build/components/sidebar/data.js +18 -26
- package/build/components/sidebar/index.js +59 -87
- package/build/components/sidebar/initializer.js +4 -34
- package/build/components/sidebar/sidebarFilters/index.js +8 -13
- package/build/components/sidebar/sidebarInviteCodeLabel/index.js +14 -19
- package/build/components/toTopBtn/index.js +32 -39
- package/build/dto/AssetEntity/index.js +19 -24
- package/build/dto/AssetEntity/interface.js +1 -2
- package/build/dto/AssetEntity/views/AssetAudio/index.js +11 -16
- package/build/dto/AssetEntity/views/AssetImage/index.js +12 -17
- package/build/dto/AssetEntity/views/AssetObject/index.js +13 -18
- package/build/dto/AssetEntity/views/AssetOther/index.js +13 -18
- package/build/dto/AssetEntity/views/AssetScreenshot/index.js +12 -17
- package/build/dto/AssetEntity/views/AssetVideo/index.js +11 -16
- package/build/dto/AssetEntity/views/index.js +6 -16
- package/build/dto/Collection/CollectionCreationEntity/index.js +22 -27
- package/build/dto/Collection/CollectionCreationEntity/interface.js +1 -2
- package/build/dto/Collection/CollectionEntity/index.js +5 -7
- package/build/dto/Collection/CollectionEntity/interface.js +1 -2
- package/build/dto/CreationEntity/index.js +19 -24
- package/build/dto/CreationEntity/interface.js +1 -2
- package/build/dto/GalleryEntityV2/index.js +5 -10
- package/build/dto/GalleryEntityV2/interface.js +1 -2
- package/build/dto/Theme/interface.js +1 -5
- package/build/dto/common/ItemType/data.js +26 -28
- package/build/dto/common/ItemType/index.js +5 -7
- package/build/dto/common/ItemViews/CreationAudio/index.js +11 -16
- package/build/dto/common/ItemViews/CreationImage/index.js +12 -17
- package/build/dto/common/ItemViews/CreationObject/index.js +10 -15
- package/build/dto/common/ItemViews/CreationOther/index.js +11 -16
- package/build/dto/common/ItemViews/CreationVideo/index.js +11 -16
- package/build/dto/common/Media/Audio/index.js +9 -14
- package/build/dto/common/Media/Image/index.js +10 -15
- package/build/dto/common/Media/Object/index.js +9 -14
- package/build/dto/common/Media/Other/index.js +14 -19
- package/build/dto/common/Media/Screenshot/index.js +10 -15
- package/build/dto/common/Media/Urls/index.js +23 -38
- package/build/dto/common/Media/Video/index.js +9 -14
- package/build/dto/common/Media/index.js +3 -5
- package/build/dto/common/Media/interface.js +1 -2
- package/build/entities/user/type.js +1 -2
- package/build/fonts/FontsInitializeLayout.js +13 -16
- package/build/fonts/vars.js +1 -6
- package/build/hooks/apollo/index.js +8 -11
- package/build/hooks/audio/useMultiAudio/index.js +10 -12
- package/build/hooks/extension/useExtension/index.js +8 -10
- package/build/hooks/favorites/useGetFavoriteGallaryCreations/index.js +33 -39
- package/build/hooks/favorites/useGetUserFevoritesCreations/index.js +32 -39
- package/build/hooks/galleries/useGetUserGalleriesCreations/index.js +32 -39
- package/build/hooks/likes/dynamic/useFindCollectionsAndLikes.js +27 -34
- package/build/hooks/likes/dynamic/useFindCreationsAndLikes.js +26 -32
- package/build/hooks/likes/dynamic/useGetCollectionInfoAndLikes.js +23 -29
- package/build/hooks/likes/dynamic/useGetCreationsAndLikes.js +27 -34
- package/build/hooks/likes/dynamic/useGetCreationsAndLikesByType.js +30 -36
- package/build/hooks/likes/dynamic/useGetMixedLikesFavoriteList.js +11 -13
- package/build/hooks/likes/dynamic/useGetTableLikes.js +24 -30
- package/build/hooks/likes/index.js +27 -32
- package/build/hooks/likes/useGetLikesAsset.js +20 -24
- package/build/layouts/GlobalLayout.js +24 -31
- package/build/layouts/base/LWithRegularHeader/index.js +7 -12
- package/build/layouts/base/LWithRegularHeader/type.js +1 -2
- package/build/layouts/base/LWithSearchHeader/index.js +5 -10
- package/build/layouts/base/LWithSearchHeader/type.js +1 -2
- package/build/layouts/custom/mainLayout/index.js +8 -13
- package/build/layouts/custom/styles.js +15 -21
- package/build/layouts/pageTransitionLayout.js +6 -8
- package/build/layouts/pageWithLayout.js +1 -2
- package/build/modules/gallery/api/useGetAssetsAndCollectionForFavorite.js +35 -42
- package/build/modules/gallery/api/useGetFavoriteGallery.js +11 -15
- package/build/modules/gallery/store.js +10 -16
- package/build/modules/gallery/ui/AllResults.js +7 -11
- package/build/modules/gallery/ui/Description.js +24 -31
- package/build/modules/gallery/ui/EditGallery.js +15 -22
- package/build/modules/gallery/ui/GalleryDeleteIcon.js +12 -19
- package/build/modules/gallery/ui/PlaceholderItemsGallery.js +21 -28
- package/build/modules/gallery/ui/STopSections.js +10 -16
- package/build/modules/gallery/ui/chooseGalleryItems/chooseGalleryItem/index.js +25 -30
- package/build/modules/gallery/ui/chooseGalleryItems/index.js +47 -52
- package/build/modules/gallery/ui/createGalleryForm/index.js +31 -36
- package/build/modules/gallery/ui/editGalleryForm/index.js +40 -45
- package/build/modules/gallery/ui/itemsPreview/index.js +54 -61
- package/build/modules/gallery/useToGalleryAsset.js +15 -23
- package/build/modules/notifications/CreatorNotifications.js +10 -40
- package/build/modules/notifications/index.js +3 -6
- package/build/modules/opportunity/OpportunityCard.js +81 -88
- package/build/modules/opportunity/OpportunityDropDown.js +11 -18
- package/build/modules/opportunity/ShareIcon.js +2 -6
- package/build/modules/opportunity/encodeQuery.js +4 -10
- package/build/modules/opportunity/popup/CopyIcon.js +3 -5
- package/build/modules/opportunity/popup/FacebookIcon.js +3 -5
- package/build/modules/opportunity/popup/LinkedInIcon.js +3 -5
- package/build/modules/opportunity/popup/LogoXIcon.js +3 -5
- package/build/modules/opportunity/popup/OpportunityMenu.js +44 -51
- package/build/modules/opportunity/type.js +1 -2
- package/build/modules/sessionScroll/globalTabs.js +1 -4
- package/build/modules/sessionScroll/index.js +16 -23
- package/build/modules/sessionScroll/type.js +1 -2
- package/build/modules/sessionScroll/useVirtuosoInitialScroll.js +12 -16
- package/build/modules/user/auth/useAuthVerification.js +10 -37
- package/build/modules/user/auth/useSignIn.js +7 -11
- package/build/modules/user/auth/useSignOut.js +11 -18
- package/build/modules/user/profileData/profileDataInitialization.js +14 -18
- package/build/modules/user/store.js +9 -12
- package/build/modules/virtuoso/VirtuosoPageBuilder.js +36 -43
- package/build/modules/virtuoso/VirtuosoToTopBtn.js +8 -13
- package/build/modules/virtuoso/types.js +1 -2
- package/build/modules/virtuoso/useSubscribeVirtuosoScrollToHeader.js +4 -8
- package/build/modules/virtuoso/useVirtuosoData.js +6 -10
- package/build/store/env/index.js +4 -7
- package/build/store/index.js +4 -7
- package/build/store/media/index.js +4 -7
- package/build/store/media/types.js +1 -2
- package/build/store/ui/index.js +21 -24
- package/build/store/ui/types.js +1 -2
- package/build/store/ui/utils.js +4 -8
- package/build/styles/ScreenWidth.js +3 -6
- package/build/styles/animations/index.js +3 -6
- package/build/styles/colors/index.js +1 -38
- package/build/styles/globalStyles.js +5 -7
- package/build/styles/mixins/boxShadow.js +3 -5
- package/build/styles/mixins/boxTransform.js +3 -5
- package/build/styles/mixins/z-indexes.js +10 -13
- package/build/styles/typography/index.js +1 -13
- package/build/system/ActiveLink/ActiveLink.test.js +14 -19
- package/build/system/ActiveLink/index.js +10 -38
- package/build/system/Alert/index.js +6 -11
- package/build/system/Alert/type.js +1 -8
- package/build/system/BasicOverlay/index.js +5 -10
- package/build/system/Buttons/IconButton/index.js +2 -7
- package/build/system/Buttons/IconWithButton/index.js +2 -7
- package/build/system/Buttons/MainButton/index.js +2 -7
- package/build/system/Buttons/SecondaryButton/index.js +2 -7
- package/build/system/Cards/CardCheckbox/CardCheckbox.test.js +8 -13
- package/build/system/Cards/CardCheckbox/index.js +19 -24
- package/build/system/Cards/CardContent/CardCategory/CardCategory.test.js +11 -16
- package/build/system/Cards/CardContent/CardCategory/index.js +13 -18
- package/build/system/Cards/CardContent/CardContent.test.js +31 -36
- package/build/system/Cards/CardContent/CardLikes/CardLikes.test.js +11 -16
- package/build/system/Cards/CardContent/CardLikes/index.js +11 -16
- package/build/system/Cards/CardContent/CardShowMore/CardShowMore.test.js +20 -25
- package/build/system/Cards/CardContent/CardShowMore/index.js +34 -40
- package/build/system/Cards/CardContent/index.js +32 -37
- package/build/system/Cards/CardMedia/CardAudio/CardAudio.test.js +35 -40
- package/build/system/Cards/CardMedia/CardAudio/index.js +18 -23
- package/build/system/Cards/CardMedia/CardImage/CardImage.test.js +14 -19
- package/build/system/Cards/CardMedia/CardImage/index.js +8 -13
- package/build/system/Cards/CardMedia/CardVideo/index.js +17 -22
- package/build/system/Cards/CardRank/index.js +32 -37
- package/build/system/Cards/CreationCard/CardHead.js +35 -42
- package/build/system/Cards/CreationCard/index.js +45 -76
- package/build/system/Cards/MultiMediaCard/index.js +30 -35
- package/build/system/Cards/Styles/Content.js +9 -14
- package/build/system/Cards/Styles/Head.js +8 -13
- package/build/system/Cards/Styles/Headicons.js +23 -28
- package/build/system/Cards/Styles/Image.js +8 -13
- package/build/system/Cards/Styles/Likes.js +14 -19
- package/build/system/Cards/Styles/MultiHead.js +11 -16
- package/build/system/Cards/Styles/Video.js +3 -8
- package/build/system/CardsHolderWithSkeleton/CardsHolder/CardsError/index.js +14 -19
- package/build/system/CardsHolderWithSkeleton/CardsHolder/CardsNoResults/index.js +10 -15
- package/build/system/CardsHolderWithSkeleton/CardsHolder/CardsSkeleton/index.js +17 -24
- package/build/system/CardsHolderWithSkeleton/CardsHolderLoader/index.js +15 -20
- package/build/system/DropDown/DropDown.test.js +14 -19
- package/build/system/DropDown/index.js +12 -17
- package/build/system/Filters/helpers.js +1 -5
- package/build/system/Filters/type.js +2 -5
- package/build/system/Forms/Checkbox/Checkbox.test.js +13 -18
- package/build/system/Forms/Checkbox/index.js +16 -21
- package/build/system/Forms/DatePicker/index.js +46 -51
- package/build/system/Forms/ErrorLabel/ErrorLabel.test.js +11 -16
- package/build/system/Forms/ErrorLabel/index.js +10 -15
- package/build/system/Forms/Input/Input.test.js +13 -18
- package/build/system/Forms/Input/index.js +29 -35
- package/build/system/Forms/Input/type.js +1 -2
- package/build/system/Forms/Messages/index.js +1 -3
- package/build/system/Forms/RadioInput/index.js +12 -17
- package/build/system/Forms/Selects/DesktopSelect/index.js +41 -69
- package/build/system/Forms/Selects/DesktopSelect/type.js +1 -2
- package/build/system/Forms/Selects/MobileSelect/index.js +10 -15
- package/build/system/Forms/TextArea/TextArea.test.js +13 -18
- package/build/system/Forms/TextArea/index.js +26 -31
- package/build/system/Forms/index.js +5 -14
- package/build/system/Img/ExternalImage/index.js +11 -17
- package/build/system/Img/ImageInterceptor/ImageInterceptor.test.js +18 -23
- package/build/system/Img/ImageInterceptor/index.js +10 -40
- package/build/system/Img/Profilepic/index.js +12 -19
- package/build/system/Img/Userpic/UserPic.test.js +15 -20
- package/build/system/Img/Userpic/index.js +28 -33
- package/build/system/Img/index.js +3 -19
- package/build/system/Labels/ExperienceLabel/ExperienceLabel.test.js +12 -17
- package/build/system/Labels/ExperienceLabel/index.js +27 -32
- package/build/system/Labels/InviteLabel/InviteLabel.test.js +10 -15
- package/build/system/Labels/InviteLabel/index.js +14 -19
- package/build/system/Labels/SkeletonLabel/index.js +2 -7
- package/build/system/Modals/Modal/Modal.test.js +11 -16
- package/build/system/Modals/Modal/index.js +24 -29
- package/build/system/Modals/ModalSidebar/CreatorModalSidebarPortal.js +7 -37
- package/build/system/Modals/ModalSidebar/ModalSidebar.test.js +11 -16
- package/build/system/Modals/ModalSidebar/ModalSidebarPortal.js +5 -9
- package/build/system/Modals/ModalSidebar/index.js +23 -29
- package/build/system/Overlay/Overlay.test.js +11 -16
- package/build/system/Overlay/index.js +11 -16
- package/build/system/PageLoader/index.js +2 -7
- package/build/system/Palete/index.js +2 -7
- package/build/system/ShareIconResize.js +14 -21
- package/build/system/Tabs/TabNavLink/TabNavLink.test.js +15 -20
- package/build/system/Tabs/TabNavLink/index.js +17 -23
- package/build/system/Tabs/TabsNav/TabsNav.test.js +18 -23
- package/build/system/Tabs/TabsNav/index.js +7 -13
- package/build/system/Tabs/TabsNav/type.js +1 -2
- package/build/system/Tabs/TabsPanel/TabsPanel.test.js +13 -18
- package/build/system/Tabs/TabsPanel/index.js +5 -10
- package/build/system/index.js +6 -22
- package/build/system/theme.js +1 -7
- package/build/utils/3d.js +1 -5
- package/build/utils/adaptive/check4k.js +5 -9
- package/build/utils/adaptive/scale.js +5 -9
- package/build/utils/auth/index.js +3 -7
- package/build/utils/copyBtn/index.js +23 -30
- package/build/utils/env/index.js +1 -5
- package/build/utils/extractItemIds.js +3 -9
- package/build/utils/getDimensionsImage.js +1 -5
- package/build/utils/getPageSizeAssets.js +4 -8
- package/build/utils/imageProportionsSize/index.js +1 -5
- package/build/utils/screen/index.js +24 -30
- package/build/utils/seacrhTabs.js +1 -4
- package/build/utils/ssrFunctions/index.js +9 -15
- package/build/utils/ui/index.js +1 -5
- package/package.json +1 -1
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const ui_1 = require("../../../store/ui");
|
|
14
|
-
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
15
|
-
const colors_1 = require("../../../styles/colors");
|
|
16
|
-
const DesktopSelect_1 = __importDefault(require("../../../system/Forms/Selects/DesktopSelect"));
|
|
17
|
-
const MobileSelect_1 = __importDefault(require("../../../system/Forms/Selects/MobileSelect"));
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { adaptiveValueCalc } from '@ludo.ninja/ui/build/utils/4k';
|
|
5
|
+
import ApplyResetButtons from "./applyResetBtns";
|
|
6
|
+
import MobileFilters from "./mobileFilters";
|
|
7
|
+
import SidebarFilters from "../../sidebar/sidebarFilters";
|
|
8
|
+
import { useUiStore } from "../../../store/ui";
|
|
9
|
+
import { mediaQuery } from "../../../styles/ScreenWidth";
|
|
10
|
+
import { AccentColor, BlackColor, BorderColorLight, InactiveButtonColor, } from "../../../styles/colors";
|
|
11
|
+
import DesktopSelect from "../../../system/Forms/Selects/DesktopSelect";
|
|
12
|
+
import MobileSelect from "../../../system/Forms/Selects/MobileSelect";
|
|
18
13
|
// Styles
|
|
19
|
-
const StyledFilters =
|
|
14
|
+
const StyledFilters = styled.div `
|
|
20
15
|
display: flex;
|
|
21
16
|
flex-wrap: wrap;
|
|
22
17
|
|
|
@@ -59,20 +54,20 @@ const StyledFilters = styled_components_1.default.div `
|
|
|
59
54
|
border-radius: 6px;
|
|
60
55
|
min-height: 40px;
|
|
61
56
|
font-size: 1.4em;
|
|
62
|
-
color: ${
|
|
57
|
+
color: ${BlackColor};
|
|
63
58
|
font-weight: 500;
|
|
64
59
|
transition: all 0.3s ease-in;
|
|
65
60
|
|
|
66
61
|
&:hover {
|
|
67
62
|
transition: all 0.3s ease-in-out;
|
|
68
|
-
background: ${
|
|
69
|
-
color: ${
|
|
70
|
-
border: 1px solid ${
|
|
63
|
+
background: ${InactiveButtonColor};
|
|
64
|
+
color: ${AccentColor};
|
|
65
|
+
border: 1px solid ${BorderColorLight};
|
|
71
66
|
}
|
|
72
67
|
|
|
73
68
|
.counter {
|
|
74
69
|
position: absolute;
|
|
75
|
-
background-color: ${
|
|
70
|
+
background-color: ${AccentColor};
|
|
76
71
|
color: white;
|
|
77
72
|
right: -5px;
|
|
78
73
|
padding: 8px;
|
|
@@ -89,39 +84,39 @@ const StyledFilters = styled_components_1.default.div `
|
|
|
89
84
|
}
|
|
90
85
|
}
|
|
91
86
|
|
|
92
|
-
${
|
|
87
|
+
${mediaQuery.minWidthFourK} {
|
|
93
88
|
.select {
|
|
94
|
-
margin-right: ${
|
|
95
|
-
margin-top: ${
|
|
89
|
+
margin-right: ${adaptiveValueCalc(8)};
|
|
90
|
+
margin-top: ${adaptiveValueCalc(8)};
|
|
96
91
|
}
|
|
97
92
|
.type {
|
|
98
|
-
width: ${
|
|
93
|
+
width: ${adaptiveValueCalc(154)};
|
|
99
94
|
}
|
|
100
95
|
.blockchain {
|
|
101
|
-
width: ${
|
|
96
|
+
width: ${adaptiveValueCalc(163)};
|
|
102
97
|
}
|
|
103
98
|
.category {
|
|
104
|
-
width: ${
|
|
99
|
+
width: ${adaptiveValueCalc(156)};
|
|
105
100
|
}
|
|
106
101
|
.time {
|
|
107
|
-
width: ${
|
|
102
|
+
width: ${adaptiveValueCalc(125)};
|
|
108
103
|
}
|
|
109
104
|
.status {
|
|
110
|
-
width: ${
|
|
111
|
-
margin-right: ${
|
|
105
|
+
width: ${adaptiveValueCalc(135)};
|
|
106
|
+
margin-right: ${adaptiveValueCalc(24)};
|
|
112
107
|
}
|
|
113
108
|
}
|
|
114
109
|
`;
|
|
115
110
|
// Component
|
|
116
111
|
const Filters = ({ filterInputHandler, handleResetFilter, selectData, filterInput, handleMobileFilterInput, isMobile, }) => {
|
|
117
|
-
const [isSideBarOpen, setSidebarOpen] =
|
|
118
|
-
const [selectedFiltersCount] =
|
|
119
|
-
const { openOverLay, closeOverlay } =
|
|
112
|
+
const [isSideBarOpen, setSidebarOpen] = useState(false);
|
|
113
|
+
const [selectedFiltersCount] = useState(0);
|
|
114
|
+
const { openOverLay, closeOverlay } = useUiStore((state) => ({
|
|
120
115
|
openOverLay: state.openOverLay,
|
|
121
116
|
closeOverlay: state.closeOverlay,
|
|
122
117
|
}));
|
|
123
|
-
const [mobileFilterInput, setMobileFilterInput] =
|
|
124
|
-
|
|
118
|
+
const [mobileFilterInput, setMobileFilterInput] = useState(filterInput);
|
|
119
|
+
useEffect(() => {
|
|
125
120
|
if (JSON.stringify(mobileFilterInput) !== JSON.stringify(filterInput)) {
|
|
126
121
|
setMobileFilterInput(filterInput);
|
|
127
122
|
}
|
|
@@ -136,17 +131,17 @@ const Filters = ({ filterInputHandler, handleResetFilter, selectData, filterInpu
|
|
|
136
131
|
closeOverlay();
|
|
137
132
|
setSidebarOpen(false);
|
|
138
133
|
};
|
|
139
|
-
return ((
|
|
140
|
-
selectData.map((select) => ((
|
|
134
|
+
return (_jsxs(StyledFilters, { children: [!isMobile &&
|
|
135
|
+
selectData.map((select) => (_jsx("div", { className: `select ${select.data.selectName}`, children: _jsx(DesktopSelect, { defaultOptionValue: filterInput[select.data.selectName], options: select.data.selectOptions, isLoading: false, onChangeHandler: filterInputHandler, name: select.data.selectName }) }, select.id))), isMobile && (_jsxs(_Fragment, { children: [_jsx("div", { className: 'filterButton', children: _jsxs("button", { onClick: (e) => {
|
|
141
136
|
e.stopPropagation();
|
|
142
137
|
e.preventDefault();
|
|
143
138
|
openOverLay();
|
|
144
139
|
setSidebarOpen(true);
|
|
145
|
-
}, children: ["Filters", selectedFiltersCount ? ((
|
|
140
|
+
}, children: ["Filters", selectedFiltersCount ? (_jsx("span", { className: 'counter', children: selectedFiltersCount })) : null] }) }), _jsxs(SidebarFilters, { isOpen: isSideBarOpen, handleClose: () => {
|
|
146
141
|
setMobileFilterInput(filterInput);
|
|
147
142
|
closeFiltersMobile();
|
|
148
|
-
}, children: [(
|
|
149
|
-
.selectName], options: select.data.selectOptions, name: select.data.selectName, onChangeHandler: handleMobileFilters }, select.id))) }), (
|
|
143
|
+
}, children: [_jsx(MobileFilters, { children: selectData.map((select) => (_jsx(MobileSelect, { defaultOptionValue: mobileFilterInput[select.data
|
|
144
|
+
.selectName], options: select.data.selectOptions, name: select.data.selectName, onChangeHandler: handleMobileFilters }, select.id))) }), _jsx(ApplyResetButtons, { onReset: () => {
|
|
150
145
|
handleResetFilter();
|
|
151
146
|
closeFiltersMobile();
|
|
152
147
|
}, onApply: () => {
|
|
@@ -155,4 +150,4 @@ const Filters = ({ filterInputHandler, handleResetFilter, selectData, filterInpu
|
|
|
155
150
|
} })] })] }))] }));
|
|
156
151
|
};
|
|
157
152
|
// Export
|
|
158
|
-
|
|
153
|
+
export default Filters;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styled from 'styled-components';
|
|
8
3
|
// Styles
|
|
9
|
-
const StyledMobileFilters =
|
|
4
|
+
const StyledMobileFilters = styled.div `
|
|
10
5
|
position: relative;
|
|
11
6
|
flex: 1;
|
|
12
7
|
overflow-y: auto;
|
|
@@ -19,7 +14,7 @@ const StyledMobileFilters = styled_components_1.default.div `
|
|
|
19
14
|
`;
|
|
20
15
|
// Component
|
|
21
16
|
const MobileFilters = ({ children }) => {
|
|
22
|
-
return (
|
|
17
|
+
return _jsx(StyledMobileFilters, { children: children });
|
|
23
18
|
};
|
|
24
19
|
// Export
|
|
25
|
-
|
|
20
|
+
export default MobileFilters;
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
-
const DropDown_1 = __importDefault(require("../../../../system/DropDown"));
|
|
10
|
-
const RadioInput_1 = __importDefault(require("../../../../system/Forms/RadioInput"));
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import DropDown from "../../../../system/DropDown";
|
|
5
|
+
import BasicRadioInput from "../../../../system/Forms/RadioInput";
|
|
11
6
|
// Styles
|
|
12
|
-
const StyledSetsFiltersForm =
|
|
7
|
+
const StyledSetsFiltersForm = styled.div `
|
|
13
8
|
position: relative;
|
|
14
9
|
`;
|
|
15
10
|
// Component
|
|
16
11
|
const SetsFiltersForm = ({ selectTypeSearchResult, selectBlockchainCategoryResult, selectBlockchainTimeResult, handleNeedShowButtons, handleFiltersCount, }) => {
|
|
17
|
-
const [selectedSearchResult, setSelectedSearchResult] =
|
|
18
|
-
const [selectedBlockchainCategoryResult, setSelectedBlockchainCategoryResult,] =
|
|
19
|
-
const [selectedBlockchainTimeResult, setSelectedBlockchainTimeResult] =
|
|
20
|
-
|
|
12
|
+
const [selectedSearchResult, setSelectedSearchResult] = useState(null);
|
|
13
|
+
const [selectedBlockchainCategoryResult, setSelectedBlockchainCategoryResult,] = useState(null);
|
|
14
|
+
const [selectedBlockchainTimeResult, setSelectedBlockchainTimeResult] = useState(null);
|
|
15
|
+
useEffect(() => {
|
|
21
16
|
if (selectedSearchResult ||
|
|
22
17
|
selectedBlockchainCategoryResult ||
|
|
23
18
|
selectedBlockchainTimeResult) {
|
|
@@ -47,7 +42,7 @@ const SetsFiltersForm = ({ selectTypeSearchResult, selectBlockchainCategoryResul
|
|
|
47
42
|
const handleChangeBlockchainTimeResult = (value) => {
|
|
48
43
|
setSelectedBlockchainTimeResult(value);
|
|
49
44
|
};
|
|
50
|
-
return ((
|
|
45
|
+
return (_jsxs(StyledSetsFiltersForm, { children: [_jsx(DropDown, { caption: 'Type', fallBackOnClose: handleChangeSearchResult, children: selectTypeSearchResult.map((select) => (_jsx(BasicRadioInput, { radioLabel: select.label, radioValue: select.id, handleChange: handleChangeSearchResult, radioChecked: selectedSearchResult === select.id }, select.id))) }), _jsx(DropDown, { caption: 'Category', fallBackOnClose: handleChangeBlockchainCategoryResult, children: selectBlockchainCategoryResult.map((select) => (_jsx(BasicRadioInput, { radioLabel: select.label, radioValue: select.id, handleChange: handleChangeBlockchainCategoryResult, radioChecked: selectedSearchResult === select.id }, select.id))) }), _jsx(DropDown, { caption: 'Time', fallBackOnClose: handleChangeBlockchainTimeResult, children: selectBlockchainTimeResult.map((select) => (_jsx(BasicRadioInput, { radioLabel: select.label, radioValue: select.id, handleChange: handleChangeBlockchainTimeResult, radioChecked: selectedSearchResult === select.id }, select.id))) })] }));
|
|
51
46
|
};
|
|
52
47
|
// Export
|
|
53
|
-
|
|
48
|
+
export default SetsFiltersForm;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const react_1 = require("react");
|
|
9
|
-
const router_1 = require("next/router");
|
|
10
|
-
const fetchSearchResultSelections_1 = require("../../api/server-preferences/queries/fetchSearchResultSelections");
|
|
11
|
-
const filters_1 = __importDefault(require("./filters"));
|
|
12
|
-
const useSearchFiltersConnector = function ({ defaults, isDisabledTypeFilters, isMobile, }) {
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { useRouter } from 'next/router';
|
|
4
|
+
import { useFetchSearchResultSelections } from "../../api/server-preferences/queries/fetchSearchResultSelections";
|
|
5
|
+
import Filters from './filters';
|
|
6
|
+
export const useSearchFiltersConnector = function ({ defaults, isDisabledTypeFilters, isMobile, }) {
|
|
13
7
|
const defaultCopyWithoutTerm = {
|
|
14
8
|
time: defaults.time,
|
|
15
9
|
blockchain: defaults.blockchain,
|
|
@@ -21,10 +15,10 @@ const useSearchFiltersConnector = function ({ defaults, isDisabledTypeFilters, i
|
|
|
21
15
|
}
|
|
22
16
|
: {}),
|
|
23
17
|
};
|
|
24
|
-
const { searchResultSelections } =
|
|
25
|
-
const [filterInput, setFilterInput] =
|
|
26
|
-
const router =
|
|
27
|
-
|
|
18
|
+
const { searchResultSelections } = useFetchSearchResultSelections();
|
|
19
|
+
const [filterInput, setFilterInput] = useState(defaultCopyWithoutTerm);
|
|
20
|
+
const router = useRouter();
|
|
21
|
+
useEffect(() => {
|
|
28
22
|
router.replace({
|
|
29
23
|
query: {
|
|
30
24
|
...router.query,
|
|
@@ -75,7 +69,7 @@ const useSearchFiltersConnector = function ({ defaults, isDisabledTypeFilters, i
|
|
|
75
69
|
renderFilters: !!(filterInput.time ||
|
|
76
70
|
filterInput.status ||
|
|
77
71
|
filterInput.category ||
|
|
78
|
-
filterInput.blockchain) ? ((
|
|
72
|
+
filterInput.blockchain) ? (_jsx(_Fragment, { children: searchResultSelections && (_jsx(Filters, { filterInput: filterInput, selectData: [
|
|
79
73
|
...(!isDisabledTypeFilters
|
|
80
74
|
? [
|
|
81
75
|
{
|
|
@@ -115,7 +109,6 @@ const useSearchFiltersConnector = function ({ defaults, isDisabledTypeFilters, i
|
|
|
115
109
|
selectOptions: searchResultSelections.statusSelections,
|
|
116
110
|
},
|
|
117
111
|
},
|
|
118
|
-
], filterInputHandler: handleFilterInput, handleResetFilter: handleResetFilter, handleMobileFilterInput: handleMobileFilterInput, isMobile: isMobile })) })) : ((
|
|
112
|
+
], filterInputHandler: handleFilterInput, handleResetFilter: handleResetFilter, handleMobileFilterInput: handleMobileFilterInput, isMobile: isMobile })) })) : (_jsx(_Fragment, {})),
|
|
119
113
|
};
|
|
120
114
|
};
|
|
121
|
-
exports.useSearchFiltersConnector = useSearchFiltersConnector;
|
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const api_svg_1 = __importDefault(require("../../public/sidebar/api"));
|
|
11
|
-
const explore_svg_1 = __importDefault(require("../../public/sidebar/explore"));
|
|
12
|
-
const my_invites_svg_1 = __importDefault(require("../../public/sidebar/my-invites"));
|
|
13
|
-
const rewards_svg_1 = __importDefault(require("../../public/sidebar/rewards"));
|
|
14
|
-
const submitNft_svg_1 = __importDefault(require("../../public/sidebar/submitNft"));
|
|
15
|
-
const sideBarDataForDev = ({ isAuthorized, isDarkTheme, userId, }) => {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import AboutLudoIcon from "../../public/sidebar/aboutLudo";
|
|
3
|
+
import AboutLudoDarkIcon from "../../public/sidebar/aboutLudoDark";
|
|
4
|
+
import ApiIcon from "../../public/sidebar/api";
|
|
5
|
+
import ExploreIcon from "../../public/sidebar/explore";
|
|
6
|
+
import MyInvitesIcon from "../../public/sidebar/my-invites";
|
|
7
|
+
import RewardsIcon from "../../public/sidebar/rewards";
|
|
8
|
+
import SubmitNftIcon from "../../public/sidebar/submitNft";
|
|
9
|
+
export const sideBarDataForDev = ({ isAuthorized, isDarkTheme, userId, }) => {
|
|
16
10
|
return [
|
|
17
11
|
{
|
|
18
12
|
href: '/',
|
|
19
13
|
title: 'Explore',
|
|
20
|
-
icon: (
|
|
14
|
+
icon: _jsx(ExploreIcon, {}),
|
|
21
15
|
isExternalUrl: false,
|
|
22
16
|
},
|
|
23
17
|
...(isAuthorized
|
|
@@ -25,13 +19,13 @@ const sideBarDataForDev = ({ isAuthorized, isDarkTheme, userId, }) => {
|
|
|
25
19
|
{
|
|
26
20
|
href: `/rewards/${userId}`,
|
|
27
21
|
title: 'Rewards',
|
|
28
|
-
icon: (
|
|
22
|
+
icon: _jsx(RewardsIcon, {}),
|
|
29
23
|
isExternalUrl: false,
|
|
30
24
|
},
|
|
31
25
|
{
|
|
32
26
|
href: '/invite-codes',
|
|
33
27
|
title: 'My invites',
|
|
34
|
-
icon: (
|
|
28
|
+
icon: _jsx(MyInvitesIcon, {}),
|
|
35
29
|
isExternalUrl: false,
|
|
36
30
|
},
|
|
37
31
|
]
|
|
@@ -39,42 +33,40 @@ const sideBarDataForDev = ({ isAuthorized, isDarkTheme, userId, }) => {
|
|
|
39
33
|
{
|
|
40
34
|
href: 'https://apidocs.ludo.com/',
|
|
41
35
|
title: 'API',
|
|
42
|
-
icon: (
|
|
36
|
+
icon: _jsx(ApiIcon, {}),
|
|
43
37
|
isExternalUrl: true,
|
|
44
38
|
},
|
|
45
39
|
{
|
|
46
40
|
href: '/',
|
|
47
41
|
title: 'Submit NFT',
|
|
48
|
-
icon: (
|
|
42
|
+
icon: _jsx(SubmitNftIcon, {}),
|
|
49
43
|
isExternalUrl: false,
|
|
50
44
|
},
|
|
51
45
|
{
|
|
52
46
|
href: '/',
|
|
53
47
|
title: 'About Ludo',
|
|
54
|
-
icon: isDarkTheme ? (
|
|
48
|
+
icon: isDarkTheme ? _jsx(AboutLudoDarkIcon, {}) : _jsx(AboutLudoIcon, {}),
|
|
55
49
|
isExternalUrl: false,
|
|
56
50
|
},
|
|
57
51
|
];
|
|
58
52
|
};
|
|
59
|
-
|
|
60
|
-
const sideBarDataForProd = ({ isAuthorized, userId, }) => {
|
|
53
|
+
export const sideBarDataForProd = ({ isAuthorized, userId, }) => {
|
|
61
54
|
return [
|
|
62
55
|
...(isAuthorized
|
|
63
56
|
? [
|
|
64
57
|
{
|
|
65
58
|
href: `/rewards/${userId}`,
|
|
66
59
|
title: 'Rewards',
|
|
67
|
-
icon: (
|
|
60
|
+
icon: _jsx(RewardsIcon, {}),
|
|
68
61
|
isExternalUrl: false,
|
|
69
62
|
},
|
|
70
63
|
{
|
|
71
64
|
href: '/invite-codes',
|
|
72
65
|
title: 'My invites',
|
|
73
|
-
icon: (
|
|
66
|
+
icon: _jsx(MyInvitesIcon, {}),
|
|
74
67
|
isExternalUrl: false,
|
|
75
68
|
},
|
|
76
69
|
]
|
|
77
70
|
: []),
|
|
78
71
|
];
|
|
79
72
|
};
|
|
80
|
-
exports.sideBarDataForProd = sideBarDataForProd;
|
|
@@ -1,51 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
30
|
-
const link_1 = __importDefault(require("next/link"));
|
|
31
|
-
const styled_components_1 = __importStar(require("styled-components"));
|
|
32
|
-
const sidebar_1 = require("@ludo.ninja/ui/build/components/sidebar");
|
|
33
|
-
const interface_1 = require("@ludo.ninja/ui/build/dto/Theme/interface");
|
|
34
|
-
const MainButton_1 = __importDefault(require("@ludo.ninja/ui/build/system/Buttons/MainButton"));
|
|
35
|
-
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
36
|
-
const data_1 = require("./data");
|
|
37
|
-
const sidebarInviteCodeLabel_1 = __importDefault(require("./sidebarInviteCodeLabel"));
|
|
38
|
-
const useSignOut_1 = require("../../modules/user/auth/useSignOut");
|
|
39
|
-
const store_1 = require("../../modules/user/store");
|
|
40
|
-
const env_1 = require("../../store/env");
|
|
41
|
-
const ui_1 = require("../../store/ui");
|
|
42
|
-
const ScreenWidth_1 = require("../../styles/ScreenWidth");
|
|
43
|
-
const Userpic_1 = __importDefault(require("../../system/Img/Userpic"));
|
|
44
|
-
const scale_1 = require("../../utils/adaptive/scale");
|
|
45
|
-
const auth_1 = require("../../utils/auth");
|
|
46
|
-
const screen_1 = require("../../utils/screen");
|
|
47
|
-
const useExtension_1 = __importDefault(require("../../hooks/extension/useExtension"));
|
|
48
|
-
const MenuItem = styled_components_1.default.div `
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Link from 'next/link';
|
|
3
|
+
import styled, { useTheme } from 'styled-components';
|
|
4
|
+
import { Sidebar as SidebarUi } from '@ludo.ninja/ui/build/components/sidebar';
|
|
5
|
+
import { ThemeEnum } from '@ludo.ninja/ui/build/dto/Theme/interface';
|
|
6
|
+
import MainButton from '@ludo.ninja/ui/build/system/Buttons/MainButton';
|
|
7
|
+
import { adaptiveValueCalc } from '@ludo.ninja/ui/build/utils/4k';
|
|
8
|
+
import { sideBarDataForDev, sideBarDataForProd, } from "./data";
|
|
9
|
+
import SidebarInviteCodeLabel from "./sidebarInviteCodeLabel";
|
|
10
|
+
import { useSignOut } from "../../modules/user/auth/useSignOut";
|
|
11
|
+
import { useUserStore } from "../../modules/user/store";
|
|
12
|
+
import { useEnvStore } from "../../store/env";
|
|
13
|
+
import { useUiStore } from "../../store/ui";
|
|
14
|
+
import { mediaQuery } from "../../styles/ScreenWidth";
|
|
15
|
+
import UserPic from "../../system/Img/Userpic";
|
|
16
|
+
import { getAdaptiveScale } from "../../utils/adaptive/scale";
|
|
17
|
+
import { useRedirectToLoginWindow } from "../../utils/auth";
|
|
18
|
+
import { useWindowDimensions, useWindowDimensionsWithServerInitial, } from "../../utils/screen";
|
|
19
|
+
import useExtension from "../../hooks/extension/useExtension";
|
|
20
|
+
const MenuItem = styled.div `
|
|
49
21
|
font-size: 15px;
|
|
50
22
|
font-weight: 500;
|
|
51
23
|
line-height: 22px;
|
|
@@ -58,7 +30,7 @@ const MenuItem = styled_components_1.default.div `
|
|
|
58
30
|
cursor: pointer;
|
|
59
31
|
color: ${({ theme }) => theme.colors.secondaryText};
|
|
60
32
|
|
|
61
|
-
${
|
|
33
|
+
${mediaQuery.mobile} {
|
|
62
34
|
font-size: 14px;
|
|
63
35
|
line-height: 20px;
|
|
64
36
|
}
|
|
@@ -72,30 +44,30 @@ const MenuItem = styled_components_1.default.div `
|
|
|
72
44
|
}
|
|
73
45
|
}
|
|
74
46
|
|
|
75
|
-
${
|
|
76
|
-
font-size: ${
|
|
77
|
-
line-height: ${
|
|
78
|
-
gap: ${
|
|
79
|
-
padding: ${
|
|
80
|
-
text-indent: ${
|
|
81
|
-
border-radius: ${
|
|
47
|
+
${mediaQuery.minWidthFourK} {
|
|
48
|
+
font-size: ${adaptiveValueCalc(15)};
|
|
49
|
+
line-height: ${adaptiveValueCalc(22)};
|
|
50
|
+
gap: ${adaptiveValueCalc(8)};
|
|
51
|
+
padding: ${adaptiveValueCalc(12)} ${adaptiveValueCalc(4)};
|
|
52
|
+
text-indent: ${adaptiveValueCalc(4)};
|
|
53
|
+
border-radius: ${adaptiveValueCalc(4)};
|
|
82
54
|
img {
|
|
83
|
-
width: ${
|
|
84
|
-
height: ${
|
|
55
|
+
width: ${adaptiveValueCalc(20)};
|
|
56
|
+
height: ${adaptiveValueCalc(20)};
|
|
85
57
|
}
|
|
86
58
|
}
|
|
87
59
|
`;
|
|
88
|
-
const BeforeMenuContainer =
|
|
60
|
+
const BeforeMenuContainer = styled.div `
|
|
89
61
|
padding: 12px 0;
|
|
90
62
|
border-bottom: 1px solid ${({ theme }) => theme.colors.divider};
|
|
91
63
|
|
|
92
|
-
${
|
|
93
|
-
padding: ${
|
|
94
|
-
border-bottom: ${
|
|
64
|
+
${mediaQuery.minWidthFourK} {
|
|
65
|
+
padding: ${adaptiveValueCalc(12)} 0;
|
|
66
|
+
border-bottom: ${adaptiveValueCalc(1)} solid
|
|
95
67
|
${({ theme }) => theme.colors.divider};
|
|
96
68
|
}
|
|
97
69
|
`;
|
|
98
|
-
const SLink = (
|
|
70
|
+
const SLink = styled(Link) `
|
|
99
71
|
&:not(:last-child) svg path {
|
|
100
72
|
fill: ${({ theme }) => theme.colors.sidebarSvgPathFill};
|
|
101
73
|
}
|
|
@@ -105,9 +77,9 @@ const SLink = (0, styled_components_1.default)(link_1.default) `
|
|
|
105
77
|
display: flex;
|
|
106
78
|
align-items: center;
|
|
107
79
|
justify-content: center;
|
|
108
|
-
${
|
|
109
|
-
width: ${
|
|
110
|
-
height: ${
|
|
80
|
+
${mediaQuery.minWidthFourK} {
|
|
81
|
+
width: ${adaptiveValueCalc(20)};
|
|
82
|
+
height: ${adaptiveValueCalc(20)};
|
|
111
83
|
svg {
|
|
112
84
|
transform: ${(props) => 'transform' in props.scale && props.scale.transform};
|
|
113
85
|
}
|
|
@@ -116,39 +88,39 @@ const SLink = (0, styled_components_1.default)(link_1.default) `
|
|
|
116
88
|
`;
|
|
117
89
|
// Component
|
|
118
90
|
const Sidebar = () => {
|
|
119
|
-
const redirectToLoginWindow =
|
|
120
|
-
const isProd =
|
|
121
|
-
const closeSidebar =
|
|
122
|
-
const isSidebarOpen =
|
|
123
|
-
const isAuthorized =
|
|
124
|
-
const getUser =
|
|
125
|
-
const signOut =
|
|
126
|
-
const { deviceType } =
|
|
127
|
-
const { isExtensionInstalled, openExtensionChromeStorePage, openExtension } = (
|
|
91
|
+
const redirectToLoginWindow = useRedirectToLoginWindow();
|
|
92
|
+
const isProd = useEnvStore((state) => state.isProd);
|
|
93
|
+
const closeSidebar = useUiStore((state) => state.closeSidebar);
|
|
94
|
+
const isSidebarOpen = useUiStore((state) => state.isSidebarOpen);
|
|
95
|
+
const isAuthorized = useUserStore((state) => state.isSignedIn);
|
|
96
|
+
const getUser = useUserStore((state) => state.user);
|
|
97
|
+
const signOut = useSignOut();
|
|
98
|
+
const { deviceType } = useWindowDimensions();
|
|
99
|
+
const { isExtensionInstalled, openExtensionChromeStorePage, openExtension } = useExtension();
|
|
128
100
|
const { wallets, userId } = getUser ?? [''];
|
|
129
|
-
const { type } =
|
|
130
|
-
const isDarkTheme = type ===
|
|
101
|
+
const { type } = useTheme();
|
|
102
|
+
const isDarkTheme = type === ThemeEnum.dark;
|
|
131
103
|
// Todo fav-list
|
|
132
104
|
const sideBarData = isProd()
|
|
133
|
-
?
|
|
134
|
-
:
|
|
135
|
-
const { windowDimensions } =
|
|
136
|
-
return ((
|
|
105
|
+
? sideBarDataForProd({ userId, isAuthorized })
|
|
106
|
+
: sideBarDataForDev({ userId, isAuthorized, isDarkTheme });
|
|
107
|
+
const { windowDimensions } = useWindowDimensionsWithServerInitial();
|
|
108
|
+
return (_jsx(SidebarUi, { closeSidebar: closeSidebar, isOpen: isSidebarOpen, handle: {
|
|
137
109
|
login: () => {
|
|
138
110
|
closeSidebar();
|
|
139
111
|
redirectToLoginWindow();
|
|
140
112
|
},
|
|
141
113
|
logout: signOut,
|
|
142
114
|
}, isAuthorized: isAuthorized, userWallets: wallets, slots: {
|
|
143
|
-
menu: sideBarData.map(({ title, href, icon, isExternalUrl }) => ((
|
|
144
|
-
userPicture: ({ children, height, width, isNeedBoxTransform }) => ((
|
|
145
|
-
inviteCode: (
|
|
115
|
+
menu: sideBarData.map(({ title, href, icon, isExternalUrl }) => (_jsxs(SLink, { href: href, target: isExternalUrl ? '_blank' : '_self', onClick: closeSidebar, passHref: isExternalUrl, scale: getAdaptiveScale({ windowDimensions, currentSize: 1 }), children: [_jsx("span", { className: "icon-wrapper", children: icon }), title] }, title))),
|
|
116
|
+
userPicture: ({ children, height, width, isNeedBoxTransform }) => (_jsx(UserPic, { width: width, height: height, userId: userId, isNeedBoxTransform: isNeedBoxTransform, children: children })),
|
|
117
|
+
inviteCode: _jsx(SidebarInviteCodeLabel, {}),
|
|
146
118
|
...(deviceType == 'isDesktop' && isAuthorized
|
|
147
119
|
? {
|
|
148
|
-
beforeMenu: ((
|
|
120
|
+
beforeMenu: (_jsx(BeforeMenuContainer, { children: isExtensionInstalled ? (_jsxs(MenuItem, { onClick: () => {
|
|
149
121
|
closeSidebar();
|
|
150
122
|
openExtension();
|
|
151
|
-
}, children: [(
|
|
123
|
+
}, children: [_jsx("img", { src: "/sidebar/ludoX.svg", alt: "Ludo X", width: 20, height: 20 }), "Open Ludo X"] })) : (_jsx("div", { style: { padding: '12px 0' }, children: _jsx(MainButton, { onClick: () => {
|
|
152
124
|
closeSidebar();
|
|
153
125
|
openExtensionChromeStorePage();
|
|
154
126
|
}, text: 'Install Ludo X now', variant: 'primaryM' }) })) })),
|
|
@@ -157,4 +129,4 @@ const Sidebar = () => {
|
|
|
157
129
|
} }));
|
|
158
130
|
};
|
|
159
131
|
// Export
|
|
160
|
-
|
|
132
|
+
export default Sidebar;
|
|
@@ -1,36 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.SidebarInitializer = void 0;
|
|
30
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
31
|
-
const dynamic_1 = __importDefault(require("next/dynamic"));
|
|
32
|
-
const Sidebar = (0, dynamic_1.default)(() => Promise.resolve().then(() => __importStar(require('./index'))).then((res) => res.default), {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import dynamic from 'next/dynamic';
|
|
3
|
+
const Sidebar = dynamic(() => import('./index').then((res) => res.default), {
|
|
33
4
|
ssr: false,
|
|
34
5
|
});
|
|
35
|
-
const SidebarInitializer = () => (
|
|
36
|
-
exports.SidebarInitializer = SidebarInitializer;
|
|
6
|
+
export const SidebarInitializer = () => _jsx(Sidebar, {});
|