@ludo.ninja/components 2.0.10 → 2.0.12
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 +5 -4
- /package/build/public/404/{404.js → 404.cjs} +0 -0
- /package/build/public/500/{500.js → 500.cjs} +0 -0
- /package/build/public/MobileSearchBtn/{close.js → close.cjs} +0 -0
- /package/build/public/{search/search.js → MobileSearchBtn/search.cjs} +0 -0
- /package/build/public/MobileSearchBtn/test/{pirate.js → pirate.cjs} +0 -0
- /package/build/public/MobileSearchBtn/test/{squircle.js → squircle.cjs} +0 -0
- /package/build/public/alerts/{close.js → close.cjs} +0 -0
- /package/build/public/alerts/{errorIcon.js → errorIcon.cjs} +0 -0
- /package/build/public/alerts/{successIcon.js → successIcon.cjs} +0 -0
- /package/build/public/alerts/{warningIcon.js → warningIcon.cjs} +0 -0
- /package/build/public/assetPage/{arrow.js → arrow.cjs} +0 -0
- /package/build/public/assetPage/{audioPlaceholder.js → audioPlaceholder.cjs} +0 -0
- /package/build/public/assetPage/{details.js → details.cjs} +0 -0
- /package/build/public/assetPage/{favorite.js → favorite.cjs} +0 -0
- /package/build/public/assetPage/{favorite_hover.js → favorite_hover.cjs} +0 -0
- /package/build/public/assetPage/{flag.js → flag.cjs} +0 -0
- /package/build/public/assetPage/{fullScreen.js → fullScreen.cjs} +0 -0
- /package/build/public/assetPage/{owners.js → owners.cjs} +0 -0
- /package/build/public/assetPage/{pause.js → pause.cjs} +0 -0
- /package/build/public/assetPage/{play.js → play.cjs} +0 -0
- /package/build/public/assetPage/{share.js → share.cjs} +0 -0
- /package/build/public/assetPage/{share2.js → share2.cjs} +0 -0
- /package/build/public/assetPage/{share2_hover.js → share2_hover.cjs} +0 -0
- /package/build/public/assetPage/{shareWithDots.js → shareWithDots.cjs} +0 -0
- /package/build/public/assetPage/{shareWithDots_hover.js → shareWithDots_hover.cjs} +0 -0
- /package/build/public/assetPage/{share_hover.js → share_hover.cjs} +0 -0
- /package/build/public/assetPage/{soundOf.js → soundOf.cjs} +0 -0
- /package/build/public/assetPage/{soundOn.js → soundOn.cjs} +0 -0
- /package/build/public/banner/{banner_img.js → banner_img.cjs} +0 -0
- /package/build/public/banner/{banner_stroke.js → banner_stroke.cjs} +0 -0
- /package/build/public/button_skin/{accept.js → accept.cjs} +0 -0
- /package/build/public/button_skin/{decline.js → decline.cjs} +0 -0
- /package/build/public/{calendar.js → calendar.cjs} +0 -0
- /package/build/public/cards/{addToFavListIcon.js → addToFavListIcon.cjs} +0 -0
- /package/build/public/cards/{addToGalleryIcon.js → addToGalleryIcon.cjs} +0 -0
- /package/build/public/cards/{heart.js → heart.cjs} +0 -0
- /package/build/public/cardsHolderLoader/{loader.js → loader.cjs} +0 -0
- /package/build/public/{checkbox-on.js → checkbox-on.cjs} +0 -0
- /package/build/public/{checkboxArrow.js → checkboxArrow.cjs} +0 -0
- /package/build/public/{close.js → close.cjs} +0 -0
- /package/build/public/{close20.js → close20.cjs} +0 -0
- /package/build/public/collectionPage/{export.js → export.cjs} +0 -0
- /package/build/public/{copied.js → copied.cjs} +0 -0
- /package/build/public/{copy-icon-new.js → copy-icon-new.cjs} +0 -0
- /package/build/public/creation/card/{moreBtn.js → moreBtn.cjs} +0 -0
- /package/build/public/creation/card/{moreBtnVertical.js → moreBtnVertical.cjs} +0 -0
- /package/build/public/creation/card/{moreBtn_hover.js → moreBtn_hover.cjs} +0 -0
- /package/build/public/defaultUserpics/{0.js → 0.cjs} +0 -0
- /package/build/public/defaultUserpics/{1.js → 1.cjs} +0 -0
- /package/build/public/defaultUserpics/{10.js → 10.cjs} +0 -0
- /package/build/public/defaultUserpics/{11.js → 11.cjs} +0 -0
- /package/build/public/defaultUserpics/{12.js → 12.cjs} +0 -0
- /package/build/public/defaultUserpics/{13.js → 13.cjs} +0 -0
- /package/build/public/defaultUserpics/{14.js → 14.cjs} +0 -0
- /package/build/public/defaultUserpics/{15.js → 15.cjs} +0 -0
- /package/build/public/defaultUserpics/{16.js → 16.cjs} +0 -0
- /package/build/public/defaultUserpics/{17.js → 17.cjs} +0 -0
- /package/build/public/defaultUserpics/{18.js → 18.cjs} +0 -0
- /package/build/public/defaultUserpics/{19.js → 19.cjs} +0 -0
- /package/build/public/defaultUserpics/{2.js → 2.cjs} +0 -0
- /package/build/public/defaultUserpics/{20.js → 20.cjs} +0 -0
- /package/build/public/defaultUserpics/{3.js → 3.cjs} +0 -0
- /package/build/public/defaultUserpics/{4.js → 4.cjs} +0 -0
- /package/build/public/defaultUserpics/{5.js → 5.cjs} +0 -0
- /package/build/public/defaultUserpics/{6.js → 6.cjs} +0 -0
- /package/build/public/defaultUserpics/{7.js → 7.cjs} +0 -0
- /package/build/public/defaultUserpics/{8.js → 8.cjs} +0 -0
- /package/build/public/defaultUserpics/{9.js → 9.cjs} +0 -0
- /package/build/public/defaultUserpics/{defaultUserpic.js → defaultUserpic.cjs} +0 -0
- /package/build/public/dropDown/{arrow_down.js → arrow_down.cjs} +0 -0
- /package/build/public/{dropdown-arrow-down.js → dropdown-arrow-down.cjs} +0 -0
- /package/build/public/{dropdown-arrow-up.js → dropdown-arrow-up.cjs} +0 -0
- /package/build/public/error/{refresh.js → refresh.cjs} +0 -0
- /package/build/public/{follower.js → follower.cjs} +0 -0
- /package/build/public/forms/checkbox/{checked.js → checked.cjs} +0 -0
- /package/build/public/gallery/{defaultImage.js → defaultImage.cjs} +0 -0
- /package/build/public/gallery/{delete.js → delete.cjs} +0 -0
- /package/build/public/header/mobile_menu_icons/arrows/{arrow_down.js → arrow_down.cjs} +0 -0
- /package/build/public/header/mobile_menu_icons/arrows/{arrow_up.js → arrow_up.cjs} +0 -0
- /package/build/public/header/mobile_menu_icons/{campaigns.js → campaigns.cjs} +0 -0
- /package/build/public/header/mobile_menu_icons/dropdown/{add_new_campaign.js → add_new_campaign.cjs} +0 -0
- /package/build/public/header/mobile_menu_icons/dropdown/{my_galleries.js → my_galleries.cjs} +0 -0
- /package/build/public/header/mobile_menu_icons/dropdown/{my_profile.js → my_profile.cjs} +0 -0
- /package/build/public/header/mobile_menu_icons/dropdown/{my_wallets.js → my_wallets.cjs} +0 -0
- /package/build/public/header/mobile_menu_icons/dropdown/{notifications.js → notifications.cjs} +0 -0
- /package/build/public/header/mobile_menu_icons/dropdown/{top_campaigns.js → top_campaigns.cjs} +0 -0
- /package/build/public/header/mobile_menu_icons/dropdown/{top_creations.js → top_creations.cjs} +0 -0
- /package/build/public/header/mobile_menu_icons/dropdown/{top_creators.js → top_creators.cjs} +0 -0
- /package/build/public/header/mobile_menu_icons/dropdown/{top_galleries.js → top_galleries.cjs} +0 -0
- /package/build/public/header/mobile_menu_icons/dropdown/top_/321/{201ollectors.js" → 201ollectors.cjs"} +0 -0
- /package/build/public/header/mobile_menu_icons/{experiences.js → experiences.cjs} +0 -0
- /package/build/public/header/mobile_menu_icons/{settings.js → settings.cjs} +0 -0
- /package/build/public/header/mobile_menu_icons/{sign_out.js → sign_out.cjs} +0 -0
- /package/build/public/header/mobile_menu_icons/{submit_nft.js → submit_nft.cjs} +0 -0
- /package/build/public/header/mobile_menu_icons/{top.js → top.cjs} +0 -0
- /package/build/public/header/mobile_toggle/{close.js → close.cjs} +0 -0
- /package/build/public/header/mobile_toggle/{regular.js → regular.cjs} +0 -0
- /package/build/public/iconButton/{share.js → share.cjs} +0 -0
- /package/build/public/iconButton/{trash.js → trash.cjs} +0 -0
- /package/build/public/iconButton/{trash_open.js → trash_open.cjs} +0 -0
- /package/build/public/{like-icon-active.js → like-icon-active.cjs} +0 -0
- /package/build/public/{like-icon.js → like-icon.cjs} +0 -0
- /package/build/public/logOut/{logOutBtn.js → logOutBtn.cjs} +0 -0
- /package/build/public/logo/{main_logo.js → main_logo.cjs} +0 -0
- /package/build/public/logo/{main_logo_dark.js → main_logo_dark.cjs} +0 -0
- /package/build/public/logo/{mobile_logo.js → mobile_logo.cjs} +0 -0
- /package/build/public/logo/{mobile_logo_dark.js → mobile_logo_dark.cjs} +0 -0
- /package/build/public/{ludo-logo-small.js → ludo-logo-small.cjs} +0 -0
- /package/build/public/{ludo-logo-square.js → ludo-logo-square.cjs} +0 -0
- /package/build/public/{sidebar/close.js → modal/close.cjs} +0 -0
- /package/build/public/noContent/{noContent.js → noContent.cjs} +0 -0
- /package/build/public/noContent/{noContentAudio.js → noContentAudio.cjs} +0 -0
- /package/build/public/noContent/{noContentObject.js → noContentObject.cjs} +0 -0
- /package/build/public/{no_image placeholder.js → no_image placeholder.cjs} +0 -0
- /package/build/public/{no_media_placeholder.js → no_media_placeholder.cjs} +0 -0
- /package/build/public/{report.js → report.cjs} +0 -0
- /package/build/public/rewardsPage/{XP_logo.js → XP_logo.cjs} +0 -0
- /package/build/public/rewardsPage/{arrow_up_light.js → arrow_up_light.cjs} +0 -0
- /package/build/public/rewardsPage/{banner_rewards.js → banner_rewards.cjs} +0 -0
- /package/build/public/rewardsPage/{banner_rewards_mobile.js → banner_rewards_mobile.cjs} +0 -0
- /package/build/public/rewardsPage/{banner_rewards_tablet.js → banner_rewards_tablet.cjs} +0 -0
- /package/build/public/rewardsPage/{banner_seasons.js → banner_seasons.cjs} +0 -0
- /package/build/public/rewardsPage/{defaultUserPic.js → defaultUserPic.cjs} +0 -0
- /package/build/public/rewardsPage/{ludo_logo_white.js → ludo_logo_white.cjs} +0 -0
- /package/build/public/search/{arrow_up.js → arrow_up.cjs} +0 -0
- /package/build/public/search/{back.js → back.cjs} +0 -0
- /package/build/public/search/{close.js → close.cjs} +0 -0
- /package/build/public/search/{no_found.js → no_found.cjs} +0 -0
- /package/build/public/{MobileSearchBtn/search.js → search/search.cjs} +0 -0
- /package/build/public/{search-icon.js → search-icon.cjs} +0 -0
- /package/build/public/selects/{arrow_down.js → arrow_down.cjs} +0 -0
- /package/build/public/services/{opensea.js → opensea.cjs} +0 -0
- /package/build/public/services/{other.js → other.cjs} +0 -0
- /package/build/public/services/{rarible.js → rarible.cjs} +0 -0
- /package/build/public/settings_page/{back.js → back.cjs} +0 -0
- /package/build/public/settings_page/{burger_menu.js → burger_menu.cjs} +0 -0
- /package/build/public/settings_page/{notifications.js → notifications.cjs} +0 -0
- /package/build/public/settings_page/{notifications_active.js → notifications_active.cjs} +0 -0
- /package/build/public/settings_page/{privacy.js → privacy.cjs} +0 -0
- /package/build/public/settings_page/{privacy_active.js → privacy_active.cjs} +0 -0
- /package/build/public/settings_page/{settings.js → settings.cjs} +0 -0
- /package/build/public/settings_page/{settings_active.js → settings_active.cjs} +0 -0
- /package/build/public/settings_page/{upload.js → upload.cjs} +0 -0
- /package/build/public/share/{copy-link-btn.js → copy-link-btn.cjs} +0 -0
- /package/build/public/share/{email-btn.js → email-btn.cjs} +0 -0
- /package/build/public/share/{facebook-btn.js → facebook-btn.cjs} +0 -0
- /package/build/public/share/{insta-btn.js → insta-btn.cjs} +0 -0
- /package/build/public/share/{reddit-btn.js → reddit-btn.cjs} +0 -0
- /package/build/public/share/{telegram-btn.js → telegram-btn.cjs} +0 -0
- /package/build/public/share/{twitter-btn.js → twitter-btn.cjs} +0 -0
- /package/build/public/share/{whatsapp-btn.js → whatsapp-btn.cjs} +0 -0
- /package/build/public/{share-icon.js → share-icon.cjs} +0 -0
- /package/build/public/showCaseIcons/{heart.js → heart.cjs} +0 -0
- /package/build/public/sidebar/{aboutLudo.js → aboutLudo.cjs} +0 -0
- /package/build/public/sidebar/{aboutLudoDark.js → aboutLudoDark.cjs} +0 -0
- /package/build/public/sidebar/{api.js → api.cjs} +0 -0
- /package/build/public/{modal/close.js → sidebar/close.cjs} +0 -0
- /package/build/public/sidebar/{disconnect.js → disconnect.cjs} +0 -0
- /package/build/public/sidebar/{explore.js → explore.cjs} +0 -0
- /package/build/public/sidebar/{ludoX.js → ludoX.cjs} +0 -0
- /package/build/public/sidebar/{my-invites.js → my-invites.cjs} +0 -0
- /package/build/public/sidebar/{rewards.js → rewards.cjs} +0 -0
- /package/build/public/sidebar/{submitNft.js → submitNft.cjs} +0 -0
- /package/build/public/socials/{facebook.js → facebook.cjs} +0 -0
- /package/build/public/socials/{instagram.js → instagram.cjs} +0 -0
- /package/build/public/socials/{twitter.js → twitter.cjs} +0 -0
- /package/build/public/socials/{website.js → website.cjs} +0 -0
- /package/build/public/tabs/{arrow_right.js → arrow_right.cjs} +0 -0
- /package/build/public/tabs/{arrow_right_dark.js → arrow_right_dark.cjs} +0 -0
- /package/build/public/tests/{test_1.js → test_1.cjs} +0 -0
- /package/build/public/toTopBtn/{toTopBtn.js → toTopBtn.cjs} +0 -0
- /package/build/public/{upload-userpic.js → upload-userpic.cjs} +0 -0
- /package/build/public/userpics/{placeholder-lg-1.js → placeholder-lg-1.cjs} +0 -0
- /package/build/public/userpics/{placeholder-sm-1.js → placeholder-sm-1.cjs} +0 -0
- /package/build/public/video/{pause.js → pause.cjs} +0 -0
- /package/build/public/video/{play.js → play.cjs} +0 -0
- /package/build/public/wallets/{arkane-btn.js → arkane-btn.cjs} +0 -0
- /package/build/public/wallets/{bitski-btn.js → bitski-btn.cjs} +0 -0
- /package/build/public/wallets/{elrond-btn.js → elrond-btn.cjs} +0 -0
- /package/build/public/wallets/{elrond-icon-sm.js → elrond-icon-sm.cjs} +0 -0
- /package/build/public/wallets/{elrond.js → elrond.cjs} +0 -0
- /package/build/public/wallets/{ethereum-icon-sm.js → ethereum-icon-sm.cjs} +0 -0
- /package/build/public/wallets/{flow-btn.js → flow-btn.cjs} +0 -0
- /package/build/public/wallets/{flow-icon-sm.js → flow-icon-sm.cjs} +0 -0
- /package/build/public/wallets/{formatic-btn.js → formatic-btn.cjs} +0 -0
- /package/build/public/wallets/{formatic-icon-sm.js → formatic-icon-sm.cjs} +0 -0
- /package/build/public/wallets/{maiar-btn.js → maiar-btn.cjs} +0 -0
- /package/build/public/wallets/{maiar-icon-sm.js → maiar-icon-sm.cjs} +0 -0
- /package/build/public/wallets/{metamask-btn.js → metamask-btn.cjs} +0 -0
- /package/build/public/wallets/{metamask-icon-sm.js → metamask-icon-sm.cjs} +0 -0
- /package/build/public/wallets/{phantom.js → phantom.cjs} +0 -0
- /package/build/public/wallets/{plus.js → plus.cjs} +0 -0
- /package/build/public/wallets/{solana-btn.js → solana-btn.cjs} +0 -0
- /package/build/public/wallets/{solana-icon-sm.js → solana-icon-sm.cjs} +0 -0
- /package/build/public/wallets/{terra-btn.js → terra-btn.cjs} +0 -0
- /package/build/public/wallets/{terra-icon-sm.js → terra-icon-sm.cjs} +0 -0
- /package/build/public/wallets/{tezos-btn.js → tezos-btn.cjs} +0 -0
- /package/build/public/wallets/{tezos-icon-sm.js → tezos-icon-sm.cjs} +0 -0
- /package/build/public/wallets/{wallet_connect.js → wallet_connect.cjs} +0 -0
- /package/build/public/wallets/{walletconnect-btn.js → walletconnect-btn.cjs} +0 -0
- /package/build/public/wallets/{walletlink-btn.js → walletlink-btn.cjs} +0 -0
- /package/build/public/wallets/{walletlink-icon-sm.js → walletlink-icon-sm.cjs} +0 -0
- /package/build/public/wallets/{xdefi-btn.js → xdefi-btn.cjs} +0 -0
- /package/build/public/wallets/{xdefi-icon-sm.js → xdefi-icon-sm.cjs} +0 -0
- /package/build/public/{warning.js → warning.cjs} +0 -0
|
@@ -1,94 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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.SearchInputContainer = void 0;
|
|
30
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
31
|
-
const react_1 = __importStar(require("react"));
|
|
32
|
-
const router_1 = require("next/router");
|
|
33
|
-
const lodash_debounce_1 = __importDefault(require("lodash.debounce"));
|
|
34
|
-
const styled_components_1 = __importStar(require("styled-components"));
|
|
35
|
-
const colors_1 = require("@ludo.ninja/ui/build/styles/colors");
|
|
36
|
-
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
37
|
-
const utils_1 = require("@ludo.ninja/utils");
|
|
38
|
-
const useFetchFindAllTopEntitiesByName_1 = require("../../api/server-search/queries/useFetchFindAllTopEntitiesByName");
|
|
39
|
-
const searchCloseMoreButtons_1 = __importDefault(require("./searchCloseMoreButtons"));
|
|
40
|
-
const searchSuggestions_1 = __importDefault(require("./searchSuggestions"));
|
|
41
|
-
const env_1 = require("../../store/env");
|
|
42
|
-
const ui_1 = require("../../store/ui");
|
|
43
|
-
const ScreenWidth_1 = require("../../styles/ScreenWidth");
|
|
44
|
-
const screen_1 = require("../../utils/screen");
|
|
45
|
-
const seacrhTabs_1 = require("../../utils/seacrhTabs");
|
|
46
|
-
const back_svg_1 = __importDefault(require("../../public/search/back"));
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useCallback, useEffect, useRef, useState, } from 'react';
|
|
3
|
+
import { useRouter } from 'next/router';
|
|
4
|
+
import _debounce from 'lodash.debounce';
|
|
5
|
+
import styled, { keyframes } from 'styled-components';
|
|
6
|
+
import { WhiteColor } from '@ludo.ninja/ui/build/styles/colors';
|
|
7
|
+
import { adaptiveValueCalc } from '@ludo.ninja/ui/build/utils/4k';
|
|
8
|
+
import { rootAddOverflow, rootRemoveOverflow } from '@ludo.ninja/utils';
|
|
9
|
+
import { useFetchFindAllTopEntitiesByName } from "../../api/server-search/queries/useFetchFindAllTopEntitiesByName";
|
|
10
|
+
import SearchCloseMoreButtons from "./searchCloseMoreButtons";
|
|
11
|
+
import SearchSuggestions from "./searchSuggestions";
|
|
12
|
+
import { useEnvStore } from "../../store/env";
|
|
13
|
+
import { useUiStore } from "../../store/ui";
|
|
14
|
+
import { mediaQuery } from "../../styles/ScreenWidth";
|
|
15
|
+
import { useWindowDimensionsWithServerInitial } from "../../utils/screen";
|
|
16
|
+
import { searchTabs } from "../../utils/seacrhTabs";
|
|
17
|
+
import BackIcon from "../../public/search/back";
|
|
47
18
|
const enterKey = 'Enter';
|
|
48
|
-
const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputComponent, }) => {
|
|
49
|
-
const NEXT_PUBLIC_ENV_SEARCH_DOMAIN =
|
|
50
|
-
const inputSearch =
|
|
51
|
-
const [searchValue, setSearchValue] =
|
|
19
|
+
export const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputComponent, }) => {
|
|
20
|
+
const NEXT_PUBLIC_ENV_SEARCH_DOMAIN = useEnvStore((state) => state.NEXT_PUBLIC_ENV_SEARCH_DOMAIN);
|
|
21
|
+
const inputSearch = useRef(null);
|
|
22
|
+
const [searchValue, setSearchValue] = useState('');
|
|
52
23
|
//fix cache apollo with debounce
|
|
53
|
-
const [debouncedValue, setDebouncedValue] =
|
|
54
|
-
const [isDebounceLoading, setIsDebounceLoading] =
|
|
55
|
-
const [isSearchFocused, setSearchFocused] =
|
|
56
|
-
const { openOverLay, closeOverlay } =
|
|
24
|
+
const [debouncedValue, setDebouncedValue] = useState('');
|
|
25
|
+
const [isDebounceLoading, setIsDebounceLoading] = useState(false);
|
|
26
|
+
const [isSearchFocused, setSearchFocused] = useState(false);
|
|
27
|
+
const { openOverLay, closeOverlay } = useUiStore((state) => ({
|
|
57
28
|
openOverLay: state.openOverLay,
|
|
58
29
|
closeOverlay: state.closeOverlay,
|
|
59
30
|
}));
|
|
60
|
-
const { isMobile } =
|
|
61
|
-
const { load, topEntities, loading, clearTopEntitiesState } =
|
|
62
|
-
const router =
|
|
63
|
-
|
|
31
|
+
const { isMobile } = useWindowDimensionsWithServerInitial();
|
|
32
|
+
const { load, topEntities, loading, clearTopEntitiesState } = useFetchFindAllTopEntitiesByName();
|
|
33
|
+
const router = useRouter();
|
|
34
|
+
useEffect(() => {
|
|
64
35
|
const term = router.query?.term;
|
|
65
36
|
if (term) {
|
|
66
37
|
setSearchValue(term);
|
|
67
38
|
}
|
|
68
39
|
}, []);
|
|
69
|
-
const updateDebouncedValue =
|
|
70
|
-
|
|
40
|
+
const updateDebouncedValue = useCallback(_debounce(setDebouncedValue, 200), []);
|
|
41
|
+
useEffect(() => {
|
|
71
42
|
if (searchValue.length) {
|
|
72
43
|
setIsDebounceLoading(true);
|
|
73
44
|
}
|
|
74
45
|
updateDebouncedValue(searchValue);
|
|
75
46
|
}, [searchValue]);
|
|
76
|
-
|
|
47
|
+
useEffect(() => {
|
|
77
48
|
if (debouncedValue.length) {
|
|
78
49
|
load({ name: debouncedValue, pageSize: 4 }).then(() => {
|
|
79
50
|
setIsDebounceLoading(false);
|
|
80
51
|
});
|
|
81
52
|
}
|
|
82
53
|
}, [debouncedValue]);
|
|
83
|
-
const [isMobileOpen, setIsMobileOpen] =
|
|
84
|
-
const Container = isMobileOpen ? SMobileContainer :
|
|
54
|
+
const [isMobileOpen, setIsMobileOpen] = useState(false);
|
|
55
|
+
const Container = isMobileOpen ? SMobileContainer : React.Fragment;
|
|
85
56
|
const SearchContainer = isMobileOpen
|
|
86
57
|
? SMobileSearchContainer
|
|
87
|
-
:
|
|
88
|
-
const searchSuggestion = ((
|
|
89
|
-
return ((
|
|
58
|
+
: React.Fragment;
|
|
59
|
+
const searchSuggestion = (_jsx(SearchSuggestions, { isLoading: loading || isDebounceLoading, searchTerm: debouncedValue, assets: topEntities?.assets || [], profiles: topEntities?.profiles || [], collections: topEntities?.collections || [] }));
|
|
60
|
+
return (_jsxs(Container, { children: [_jsxs(SearchContainer, { children: [isMobileOpen && (_jsx(BackIcon, { onClick: () => {
|
|
90
61
|
setIsMobileOpen(false);
|
|
91
|
-
|
|
62
|
+
rootRemoveOverflow();
|
|
92
63
|
if (isClearOnBlur) {
|
|
93
64
|
setSearchValue('');
|
|
94
65
|
clearTopEntitiesState();
|
|
@@ -108,7 +79,7 @@ const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputCo
|
|
|
108
79
|
}
|
|
109
80
|
if (isMobile) {
|
|
110
81
|
setIsMobileOpen(true);
|
|
111
|
-
|
|
82
|
+
rootAddOverflow();
|
|
112
83
|
return;
|
|
113
84
|
}
|
|
114
85
|
openOverLay();
|
|
@@ -123,7 +94,7 @@ const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputCo
|
|
|
123
94
|
return;
|
|
124
95
|
}
|
|
125
96
|
if (isMobile) {
|
|
126
|
-
|
|
97
|
+
rootRemoveOverflow();
|
|
127
98
|
return;
|
|
128
99
|
}
|
|
129
100
|
setTimeout(() => {
|
|
@@ -142,7 +113,7 @@ const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputCo
|
|
|
142
113
|
const { value } = e.target;
|
|
143
114
|
const newSearchValue = value.length ? searchValue : '';
|
|
144
115
|
if (NEXT_PUBLIC_ENV_SEARCH_DOMAIN?.includes('search.') &&
|
|
145
|
-
|
|
116
|
+
searchTabs.find((el) => router.pathname.includes(el.link))) {
|
|
146
117
|
await router.replace({
|
|
147
118
|
query: { ...router.query, term: newSearchValue },
|
|
148
119
|
}, undefined, { shallow: true });
|
|
@@ -151,7 +122,7 @@ const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputCo
|
|
|
151
122
|
closeOverlay();
|
|
152
123
|
}
|
|
153
124
|
else {
|
|
154
|
-
window.open(`${NEXT_PUBLIC_ENV_SEARCH_DOMAIN}/${
|
|
125
|
+
window.open(`${NEXT_PUBLIC_ENV_SEARCH_DOMAIN}/${searchTabs[0].link}${newSearchValue ? `?term=${newSearchValue}` : ''}`, '_self');
|
|
155
126
|
// await router.push({
|
|
156
127
|
// pathname: searchTabs[0].link,
|
|
157
128
|
// query: { term: newSearchValue },
|
|
@@ -163,16 +134,15 @@ const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputCo
|
|
|
163
134
|
}
|
|
164
135
|
},
|
|
165
136
|
},
|
|
166
|
-
searchSuggestion: !isMobile && searchValue && ((
|
|
167
|
-
searchCloseButton: ((
|
|
137
|
+
searchSuggestion: !isMobile && searchValue && (_jsx("div", { className: "suggestionBar", children: searchSuggestion })),
|
|
138
|
+
searchCloseButton: (_jsx(SearchCloseMoreButtons, { isNeedToShow: Boolean(searchValue.length), position: {
|
|
168
139
|
top: '50%',
|
|
169
140
|
right: '0',
|
|
170
141
|
transform: 'translate(-50%, -50%)',
|
|
171
142
|
}, clearSearchValue: setSearchValue })),
|
|
172
|
-
})] }), isMobileOpen && searchValue && ((
|
|
143
|
+
})] }), isMobileOpen && searchValue && (_jsx(SSuggestions, { children: searchSuggestion }))] }));
|
|
173
144
|
};
|
|
174
|
-
|
|
175
|
-
const show = (0, styled_components_1.keyframes) `
|
|
145
|
+
const show = keyframes `
|
|
176
146
|
0% {
|
|
177
147
|
opacity: 0;
|
|
178
148
|
}
|
|
@@ -180,31 +150,31 @@ const show = (0, styled_components_1.keyframes) `
|
|
|
180
150
|
opacity: 1;
|
|
181
151
|
}
|
|
182
152
|
`;
|
|
183
|
-
const SMobileContainer =
|
|
153
|
+
const SMobileContainer = styled.div `
|
|
184
154
|
position: fixed;
|
|
185
155
|
z-index: 100000;
|
|
186
156
|
top: 0;
|
|
187
157
|
left: 0;
|
|
188
158
|
width: 100vw;
|
|
189
159
|
height: var(--app-height);
|
|
190
|
-
background-color: ${
|
|
160
|
+
background-color: ${WhiteColor};
|
|
191
161
|
padding: 17px 20px 0;
|
|
192
162
|
animation: ${show} 300ms forwards;
|
|
193
163
|
|
|
194
|
-
${
|
|
195
|
-
padding: ${
|
|
164
|
+
${mediaQuery.minWidthFourK} {
|
|
165
|
+
padding: ${adaptiveValueCalc(17)} ${adaptiveValueCalc(20)} 0;
|
|
196
166
|
}
|
|
197
167
|
`;
|
|
198
|
-
const SMobileSearchContainer =
|
|
168
|
+
const SMobileSearchContainer = styled.div `
|
|
199
169
|
display: flex;
|
|
200
170
|
align-items: center;
|
|
201
171
|
gap: 2px;
|
|
202
172
|
|
|
203
|
-
${
|
|
204
|
-
gap: ${
|
|
173
|
+
${mediaQuery.minWidthFourK} {
|
|
174
|
+
gap: ${adaptiveValueCalc(2)};
|
|
205
175
|
}
|
|
206
176
|
`;
|
|
207
|
-
const SSuggestions =
|
|
177
|
+
const SSuggestions = styled.div `
|
|
208
178
|
display: flex;
|
|
209
179
|
overflow-y: auto;
|
|
210
180
|
overflow-x: hidden;
|
|
@@ -215,12 +185,12 @@ const SSuggestions = styled_components_1.default.div `
|
|
|
215
185
|
padding-right: 5px;
|
|
216
186
|
width: calc(100% + 10px);
|
|
217
187
|
|
|
218
|
-
${
|
|
219
|
-
height: calc(100% - ${
|
|
220
|
-
margin-left: ${
|
|
221
|
-
margin-right: ${
|
|
222
|
-
padding-left: ${
|
|
223
|
-
padding-right: ${
|
|
224
|
-
width: calc(100% + ${
|
|
188
|
+
${mediaQuery.minWidthFourK} {
|
|
189
|
+
height: calc(100% - ${adaptiveValueCalc(36)} - ${adaptiveValueCalc(17)});
|
|
190
|
+
margin-left: ${adaptiveValueCalc(-5)};
|
|
191
|
+
margin-right: ${adaptiveValueCalc(-5)};
|
|
192
|
+
padding-left: ${adaptiveValueCalc(5)};
|
|
193
|
+
padding-right: ${adaptiveValueCalc(5)};
|
|
194
|
+
width: calc(100% + ${adaptiveValueCalc(10)});
|
|
225
195
|
}
|
|
226
196
|
`;
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const screen_1 = require("../../../utils/screen");
|
|
11
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
13
|
-
const close_svg_1 = __importDefault(require("../../../public/search/close"));
|
|
14
|
-
const StyledSearchCloseMoreButtons = styled_components_1.default.div `
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRouter } from 'next/router';
|
|
3
|
+
import { mediaQuery } from "../../../styles/ScreenWidth";
|
|
4
|
+
import { getAdaptiveScale } from "../../../utils/adaptive/scale";
|
|
5
|
+
import { useWindowDimensionsWithServerInitial } from "../../../utils/screen";
|
|
6
|
+
import styled from 'styled-components';
|
|
7
|
+
import { adaptiveValueCalc } from '@ludo.ninja/ui/build/utils/4k';
|
|
8
|
+
import SearchCloseIcon from "../../../public/search/close";
|
|
9
|
+
const StyledSearchCloseMoreButtons = styled.div `
|
|
15
10
|
position: absolute;
|
|
16
11
|
right: ${(props) => props.position.right};
|
|
17
12
|
top: ${(props) => props.position.top};
|
|
@@ -20,30 +15,30 @@ const StyledSearchCloseMoreButtons = styled_components_1.default.div `
|
|
|
20
15
|
transform: ${(props) => props.position.transform};
|
|
21
16
|
display: flex;
|
|
22
17
|
height: 40px;
|
|
23
|
-
${
|
|
24
|
-
height: ${
|
|
18
|
+
${mediaQuery.minWidthFourK} {
|
|
19
|
+
height: ${adaptiveValueCalc(40)};
|
|
25
20
|
}
|
|
26
21
|
`;
|
|
27
|
-
const StyledCloseIcon =
|
|
22
|
+
const StyledCloseIcon = styled.div `
|
|
28
23
|
cursor: pointer;
|
|
29
24
|
z-index: 1;
|
|
30
25
|
padding: 8px 6px;
|
|
31
26
|
|
|
32
|
-
${
|
|
27
|
+
${mediaQuery.minWidthFourK} {
|
|
33
28
|
display: flex;
|
|
34
29
|
align-items: center;
|
|
35
|
-
padding: ${
|
|
30
|
+
padding: ${adaptiveValueCalc(8)} ${adaptiveValueCalc(6)};
|
|
36
31
|
}
|
|
37
32
|
`;
|
|
38
33
|
const SearchCloseIconResize = () => {
|
|
39
|
-
const { windowDimensions } =
|
|
40
|
-
return ((
|
|
34
|
+
const { windowDimensions } = useWindowDimensionsWithServerInitial();
|
|
35
|
+
return (_jsx(SearchCloseIcon, { style: getAdaptiveScale({ windowDimensions, currentSize: 1 }) }));
|
|
41
36
|
};
|
|
42
37
|
// Components
|
|
43
38
|
const SearchCloseMoreButtons = ({ isNeedToShow, position, clearSearchValue, }) => {
|
|
44
|
-
const router =
|
|
39
|
+
const router = useRouter();
|
|
45
40
|
const { term } = router.query;
|
|
46
|
-
return ((
|
|
41
|
+
return (_jsx(StyledSearchCloseMoreButtons, { position: position, children: isNeedToShow ? (_jsx(StyledCloseIcon, { onClick: () => {
|
|
47
42
|
if (term) {
|
|
48
43
|
router
|
|
49
44
|
.push({
|
|
@@ -52,7 +47,7 @@ const SearchCloseMoreButtons = ({ isNeedToShow, position, clearSearchValue, }) =
|
|
|
52
47
|
.then(() => clearSearchValue(''));
|
|
53
48
|
}
|
|
54
49
|
clearSearchValue('');
|
|
55
|
-
}, children: (
|
|
50
|
+
}, children: _jsx(SearchCloseIconResize, {}) })) : null }));
|
|
56
51
|
};
|
|
57
52
|
// Export
|
|
58
|
-
|
|
53
|
+
export default SearchCloseMoreButtons;
|
|
@@ -1,43 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
30
|
-
const styled_components_1 = __importStar(require("styled-components"));
|
|
31
|
-
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
32
|
-
const SearchInputContainer_1 = require("../SearchInputContainer");
|
|
33
|
-
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
34
|
-
const typography_1 = require("../../../styles/typography");
|
|
35
|
-
const scale_1 = require("../../../utils/adaptive/scale");
|
|
36
|
-
const screen_1 = require("../../../utils/screen");
|
|
37
|
-
const vars_1 = require("../../../fonts/vars");
|
|
38
|
-
const search_svg_1 = __importDefault(require("../../../public/search/search"));
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { adaptiveValueCalc } from '@ludo.ninja/ui/build/utils/4k';
|
|
4
|
+
import { SearchInputContainer } from "../SearchInputContainer";
|
|
5
|
+
import { mediaQuery } from "../../../styles/ScreenWidth";
|
|
6
|
+
import { FH6 } from "../../../styles/typography";
|
|
7
|
+
import { getAdaptiveScale } from "../../../utils/adaptive/scale";
|
|
8
|
+
import { useWindowDimensionsWithServerInitial } from "../../../utils/screen";
|
|
9
|
+
import { dmsansFontVarCss } from "../../../fonts/vars";
|
|
10
|
+
import SearchGlassIcon from "../../../public/search/search";
|
|
39
11
|
// Styles
|
|
40
|
-
const StyledSearchSimpleInput =
|
|
12
|
+
const StyledSearchSimpleInput = styled.div `
|
|
41
13
|
position: relative;
|
|
42
14
|
width: 40%;
|
|
43
15
|
|
|
@@ -48,21 +20,21 @@ const StyledSearchSimpleInput = styled_components_1.default.div `
|
|
|
48
20
|
right: 0;
|
|
49
21
|
}
|
|
50
22
|
|
|
51
|
-
${
|
|
23
|
+
${mediaQuery.mobile} {
|
|
52
24
|
width: 188px;
|
|
53
25
|
${(props) => props.isMobileOpen &&
|
|
54
|
-
|
|
26
|
+
css `
|
|
55
27
|
width: 100%;
|
|
56
28
|
`}
|
|
57
29
|
}
|
|
58
30
|
|
|
59
|
-
${
|
|
31
|
+
${mediaQuery.minWidthFourK} {
|
|
60
32
|
.suggestionBar {
|
|
61
|
-
top: ${
|
|
33
|
+
top: ${adaptiveValueCalc(40)};
|
|
62
34
|
}
|
|
63
35
|
}
|
|
64
36
|
`;
|
|
65
|
-
const StyledInput =
|
|
37
|
+
const StyledInput = styled.input `
|
|
66
38
|
position: relative;
|
|
67
39
|
width: 100%;
|
|
68
40
|
height: 40px;
|
|
@@ -79,30 +51,30 @@ const StyledInput = styled_components_1.default.input `
|
|
|
79
51
|
border-top-left-radius: 24px;
|
|
80
52
|
border-bottom-right-radius: ${(props) => (props.isActive ? 'none' : '24px')};
|
|
81
53
|
border-bottom-left-radius: ${(props) => (props.isActive ? 'none' : '24px')};
|
|
82
|
-
font-family: ${
|
|
54
|
+
font-family: ${dmsansFontVarCss.css};
|
|
83
55
|
|
|
84
56
|
::placeholder {
|
|
85
57
|
color: ${({ theme }) => theme.colors.placeholderText};
|
|
86
58
|
}
|
|
87
59
|
|
|
88
|
-
${
|
|
89
|
-
${
|
|
60
|
+
${mediaQuery.mobile} {
|
|
61
|
+
${FH6};
|
|
90
62
|
padding-left: 32px;
|
|
91
63
|
height: 36px;
|
|
92
64
|
}
|
|
93
65
|
|
|
94
|
-
${
|
|
95
|
-
height: ${
|
|
96
|
-
font-size: ${
|
|
97
|
-
padding-left: ${
|
|
98
|
-
padding-right: ${
|
|
99
|
-
border-top-right-radius: ${
|
|
100
|
-
border-top-left-radius: ${
|
|
101
|
-
border-bottom-right-radius: ${(props) => props.isActive ? 'none' :
|
|
102
|
-
border-bottom-left-radius: ${(props) => props.isActive ? 'none' :
|
|
66
|
+
${mediaQuery.minWidthFourK} {
|
|
67
|
+
height: ${adaptiveValueCalc(40)};
|
|
68
|
+
font-size: ${adaptiveValueCalc(14)};
|
|
69
|
+
padding-left: ${adaptiveValueCalc(48)};
|
|
70
|
+
padding-right: ${adaptiveValueCalc(48)};
|
|
71
|
+
border-top-right-radius: ${adaptiveValueCalc(24)};
|
|
72
|
+
border-top-left-radius: ${adaptiveValueCalc(24)};
|
|
73
|
+
border-bottom-right-radius: ${(props) => props.isActive ? 'none' : adaptiveValueCalc(24)};
|
|
74
|
+
border-bottom-left-radius: ${(props) => props.isActive ? 'none' : adaptiveValueCalc(24)};
|
|
103
75
|
}
|
|
104
76
|
`;
|
|
105
|
-
const StyledSearchIcon =
|
|
77
|
+
const StyledSearchIcon = styled.div `
|
|
106
78
|
position: absolute;
|
|
107
79
|
top: 8px;
|
|
108
80
|
bottom: 8px;
|
|
@@ -123,17 +95,17 @@ const StyledSearchIcon = styled_components_1.default.div `
|
|
|
123
95
|
left: 8px;
|
|
124
96
|
}
|
|
125
97
|
|
|
126
|
-
${
|
|
127
|
-
top: ${
|
|
128
|
-
bottom: ${
|
|
129
|
-
left: ${
|
|
98
|
+
${mediaQuery.minWidthFourK} {
|
|
99
|
+
top: ${adaptiveValueCalc(8)};
|
|
100
|
+
bottom: ${adaptiveValueCalc(8)};
|
|
101
|
+
left: ${adaptiveValueCalc(16)};
|
|
130
102
|
}
|
|
131
103
|
`;
|
|
132
104
|
const SearchGlassIconResize = () => {
|
|
133
|
-
const { windowDimensions } =
|
|
134
|
-
return ((
|
|
105
|
+
const { windowDimensions } = useWindowDimensionsWithServerInitial();
|
|
106
|
+
return (_jsx(SearchGlassIcon, { style: getAdaptiveScale({ windowDimensions, currentSize: 1 }) }));
|
|
135
107
|
};
|
|
136
108
|
// Components
|
|
137
|
-
const SearchSimpleInput = ({ onFocusHandler, }) => ((
|
|
109
|
+
const SearchSimpleInput = ({ onFocusHandler, }) => (_jsx(SearchInputContainer, { onFocusHandler: onFocusHandler, initializeInputComponent: ({ searchValue, handle, inputRef, isSearchFocused, mobileOrDesktopPlaceHolder, searchSuggestion, isMobileOpen, searchCloseButton, }) => (_jsxs(StyledSearchSimpleInput, { isMobileOpen: isMobileOpen, children: [_jsx(StyledSearchIcon, { isActive: Boolean(searchValue.length), children: _jsx(SearchGlassIconResize, {}) }), _jsx(StyledInput, { isActive: Boolean(searchValue.length) && isSearchFocused, autoComplete: 'off', onChange: handle.change, ref: inputRef, tabIndex: 1, onFocus: handle.focus, onBlur: handle.blur, onKeyPress: handle.keyPress, value: searchValue, type: 'text', placeholder: mobileOrDesktopPlaceHolder }), searchCloseButton, isSearchFocused && searchSuggestion] })) }));
|
|
138
110
|
// Export
|
|
139
|
-
|
|
111
|
+
export default SearchSimpleInput;
|
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const searchSuggestionsNotFound_1 = __importDefault(require("./searchSuggestionsNotFound"));
|
|
14
|
-
const Urls_1 = require("../../../dto/common/Media/Urls");
|
|
15
|
-
const env_1 = require("../../../store/env");
|
|
16
|
-
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
17
|
-
const _3d_1 = require("../../../utils/3d");
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { adaptiveValueCalc } from '@ludo.ninja/ui/build/utils/4k';
|
|
4
|
+
import SearchSuggestionsCaption from "./searchSuggestionsCaption";
|
|
5
|
+
import SearchSuggestionsFooter from "./searchSuggestionsFooter";
|
|
6
|
+
import SearchSuggestionsItem from "./searchSuggestionsItem";
|
|
7
|
+
import { SearchSuggestionsItemsSkeleton } from "./searchSuggestionsItem/searchSuggestionsItemSkeleton";
|
|
8
|
+
import SearchSuggestionsNotFound from "./searchSuggestionsNotFound";
|
|
9
|
+
import { getAssetImage, isExternalMediaAudio, isExternalMediaVideo, mediaSizes, } from "../../../dto/common/Media/Urls";
|
|
10
|
+
import { useEnvStore } from "../../../store/env";
|
|
11
|
+
import { mediaQuery } from "../../../styles/ScreenWidth";
|
|
12
|
+
import { isObject3D } from "../../../utils/3d";
|
|
18
13
|
// Styles
|
|
19
|
-
const StyledSearchSuggestions =
|
|
14
|
+
const StyledSearchSuggestions = styled.div `
|
|
20
15
|
position: relative;
|
|
21
16
|
z-index: 1;
|
|
22
17
|
width: 100%;
|
|
@@ -55,28 +50,28 @@ const StyledSearchSuggestions = styled_components_1.default.div `
|
|
|
55
50
|
}
|
|
56
51
|
}
|
|
57
52
|
|
|
58
|
-
${
|
|
59
|
-
border-bottom-left-radius: ${
|
|
60
|
-
border-bottom-right-radius: ${
|
|
53
|
+
${mediaQuery.minWidthFourK} {
|
|
54
|
+
border-bottom-left-radius: ${adaptiveValueCalc(28)};
|
|
55
|
+
border-bottom-right-radius: ${adaptiveValueCalc(28)};
|
|
61
56
|
|
|
62
57
|
.content {
|
|
63
|
-
padding: 0 ${
|
|
64
|
-
border-bottom-right-radius: ${
|
|
65
|
-
border-bottom-left-radius: ${
|
|
58
|
+
padding: 0 ${adaptiveValueCalc(44)};
|
|
59
|
+
border-bottom-right-radius: ${adaptiveValueCalc(20)};
|
|
60
|
+
border-bottom-left-radius: ${adaptiveValueCalc(20)};
|
|
66
61
|
}
|
|
67
62
|
}
|
|
68
63
|
`;
|
|
69
64
|
// Components
|
|
70
65
|
const SearchSuggestions = ({ searchTerm, assets, profiles, collections, isLoading, }) => {
|
|
71
66
|
const isNotFound = !assets?.length && !profiles?.length && !collections?.length;
|
|
72
|
-
const { getMediaENVDomain, getVideoENVDomain, getAudioENVDomain, NEXT_PUBLIC_STATIC_DOMAIN, } =
|
|
67
|
+
const { getMediaENVDomain, getVideoENVDomain, getAudioENVDomain, NEXT_PUBLIC_STATIC_DOMAIN, } = useEnvStore((state) => ({
|
|
73
68
|
getMediaENVDomain: state.getMediaDomain,
|
|
74
69
|
getVideoENVDomain: state.getVideoDomain,
|
|
75
70
|
getAudioENVDomain: state.getAudioDomain,
|
|
76
71
|
NEXT_PUBLIC_STATIC_DOMAIN: state.NEXT_PUBLIC_STATIC_DOMAIN,
|
|
77
72
|
}));
|
|
78
|
-
return ((
|
|
79
|
-
(isNotFound ? ((
|
|
73
|
+
return (_jsx(StyledSearchSuggestions, { children: _jsxs("div", { className: 'content', children: [isLoading && _jsx(SearchSuggestionsItemsSkeleton, {}), !isLoading &&
|
|
74
|
+
(isNotFound ? (_jsx(SearchSuggestionsNotFound, { notFoundText: searchTerm })) : (_jsxs(_Fragment, { children: [_jsx("div", { className: "scroller", children: [
|
|
80
75
|
...(assets?.length
|
|
81
76
|
? [
|
|
82
77
|
{
|
|
@@ -97,12 +92,12 @@ const SearchSuggestions = ({ searchTerm, assets, profiles, collections, isLoadin
|
|
|
97
92
|
let miniatureUrl = '';
|
|
98
93
|
const mimeType = currentMedia?.mimeType;
|
|
99
94
|
if (mimeType?.includes('video')) {
|
|
100
|
-
miniatureUrl =
|
|
95
|
+
miniatureUrl = isExternalMediaVideo(currentMedia?.previewUrl || null, getVideoENVDomain);
|
|
101
96
|
}
|
|
102
97
|
if (mimeType?.includes('audio')) {
|
|
103
|
-
miniatureUrl =
|
|
98
|
+
miniatureUrl = isExternalMediaAudio(currentMedia?.previewUrl || null, getAudioENVDomain);
|
|
104
99
|
}
|
|
105
|
-
if (
|
|
100
|
+
if (isObject3D({
|
|
106
101
|
media: currentMedia?.url,
|
|
107
102
|
mimeType: currentMedia?.mimeType,
|
|
108
103
|
})) {
|
|
@@ -114,9 +109,9 @@ const SearchSuggestions = ({ searchTerm, assets, profiles, collections, isLoadin
|
|
|
114
109
|
}
|
|
115
110
|
if (!miniatureUrl) {
|
|
116
111
|
// image and screenshots
|
|
117
|
-
miniatureUrl =
|
|
112
|
+
miniatureUrl = getAssetImage(currentMedia?.url, '/noContent/noContent.svg', mediaSizes.small, NEXT_PUBLIC_STATIC_DOMAIN);
|
|
118
113
|
}
|
|
119
|
-
return ((
|
|
114
|
+
return (_jsx(SearchSuggestionsItem, { name: asset?.getName(), link: asset.getAssetLink(), imgUrl: miniatureUrl, searchTerm: searchTerm }, `${asset?.getAssetId()}.${Math.random()}`));
|
|
120
115
|
}),
|
|
121
116
|
},
|
|
122
117
|
]
|
|
@@ -125,7 +120,7 @@ const SearchSuggestions = ({ searchTerm, assets, profiles, collections, isLoadin
|
|
|
125
120
|
? [
|
|
126
121
|
{
|
|
127
122
|
caption: 'Collections',
|
|
128
|
-
children: collections.map((collection) => ((
|
|
123
|
+
children: collections.map((collection) => (_jsx(SearchSuggestionsItem, { name: collection?.collectionTitle, link: `/collection/${collection?.collectionId}`, imgUrl: '/noContent/noContent.svg', searchTerm: searchTerm }, `${collection?.collectionId}.${Math.random()}`))),
|
|
129
124
|
},
|
|
130
125
|
]
|
|
131
126
|
: []),
|
|
@@ -133,13 +128,13 @@ const SearchSuggestions = ({ searchTerm, assets, profiles, collections, isLoadin
|
|
|
133
128
|
? [
|
|
134
129
|
{
|
|
135
130
|
caption: 'Profiles',
|
|
136
|
-
children: profiles.map((profile) => ((
|
|
131
|
+
children: profiles.map((profile) => (_jsx(SearchSuggestionsItem, { borderRadius: true, name: profile.getName() || '', link: `/profile/${profile.getUserId()}/nfts`, imgUrl: profile.getUserPic({
|
|
137
132
|
mediaDomain: getMediaENVDomain(),
|
|
138
|
-
}), additionalHTML: Boolean(profile.getFollowings()) && ((
|
|
133
|
+
}), additionalHTML: Boolean(profile.getFollowings()) && (_jsxs("span", { className: 'additional', children: [profile.getFollowings(), " followers"] })), searchTerm: searchTerm }, profile.getUserId()))),
|
|
139
134
|
},
|
|
140
135
|
]
|
|
141
136
|
: []),
|
|
142
|
-
].map(({ caption, children }) => ((
|
|
137
|
+
].map(({ caption, children }) => (_jsx(SearchSuggestionsCaption, { caption: caption, children: children }, caption))) }), _jsx(SearchSuggestionsFooter, {})] })))] }) }));
|
|
143
138
|
};
|
|
144
139
|
// Export
|
|
145
|
-
|
|
140
|
+
export default SearchSuggestions;
|