@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,25 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const client_1 = require("@apollo/client");
|
|
9
|
-
const api_1 = require("@ludo.ninja/api");
|
|
10
|
-
const type_1 = require("@ludo.ninja/ui/build/system/Alert/type");
|
|
11
|
-
const ui_1 = require("../../../../store/ui");
|
|
12
|
-
const CreationEntity_1 = __importDefault(require("../../../../dto/CreationEntity"));
|
|
13
|
-
const prefetchFindCreations = ({ term, input, page }, apolloClient) => {
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { NetworkStatus, } from '@apollo/client';
|
|
3
|
+
import { hosts, searchSchema as schema } from '@ludo.ninja/api';
|
|
4
|
+
import { alertVariants } from '@ludo.ninja/ui/build/system/Alert/type';
|
|
5
|
+
import { useUiStore } from "../../../../store/ui";
|
|
6
|
+
import CreationEntity from "../../../../dto/CreationEntity";
|
|
7
|
+
export const prefetchFindCreations = ({ term, input, page }, apolloClient) => {
|
|
14
8
|
return apolloClient
|
|
15
9
|
.query({
|
|
16
|
-
query:
|
|
10
|
+
query: schema.FindCreationsDocument,
|
|
17
11
|
variables: {
|
|
18
12
|
term,
|
|
19
13
|
input,
|
|
20
14
|
page,
|
|
21
15
|
},
|
|
22
|
-
context: { uri:
|
|
16
|
+
context: { uri: hosts.serverSearchHost },
|
|
23
17
|
fetchPolicy: 'network-only',
|
|
24
18
|
})
|
|
25
19
|
.catch(() => {
|
|
@@ -28,16 +22,15 @@ const prefetchFindCreations = ({ term, input, page }, apolloClient) => {
|
|
|
28
22
|
};
|
|
29
23
|
});
|
|
30
24
|
};
|
|
31
|
-
exports.prefetchFindCreations = prefetchFindCreations;
|
|
32
25
|
const maxCreationLength = 1000;
|
|
33
|
-
const useFindCreations = ({ term, input, page, }) => {
|
|
34
|
-
const [creations, setCreations] =
|
|
35
|
-
const [nextPageToken, setNextPageToken] =
|
|
36
|
-
const [results, setResults] =
|
|
37
|
-
const openAlert =
|
|
38
|
-
const { error, loading, fetchMore, networkStatus, refetch } =
|
|
26
|
+
export const useFindCreations = ({ term, input, page, }) => {
|
|
27
|
+
const [creations, setCreations] = useState([]);
|
|
28
|
+
const [nextPageToken, setNextPageToken] = useState(null);
|
|
29
|
+
const [results, setResults] = useState(0);
|
|
30
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
31
|
+
const { error, loading, fetchMore, networkStatus, refetch } = schema.useFindCreationsQuery({
|
|
39
32
|
context: {
|
|
40
|
-
uri:
|
|
33
|
+
uri: hosts.searchHost,
|
|
41
34
|
},
|
|
42
35
|
variables: {
|
|
43
36
|
term,
|
|
@@ -45,20 +38,20 @@ const useFindCreations = ({ term, input, page, }) => {
|
|
|
45
38
|
page,
|
|
46
39
|
},
|
|
47
40
|
onCompleted: ({ findCreations: { creations, ...nextPage } }) => {
|
|
48
|
-
setCreations(creations.map((creation) => new
|
|
41
|
+
setCreations(creations.map((creation) => new CreationEntity(creation)));
|
|
49
42
|
setResults(nextPage.nextPage?.elements || 0);
|
|
50
43
|
setNextPageToken(nextPage.nextPage?.token || null);
|
|
51
44
|
},
|
|
52
45
|
onError: () => {
|
|
53
46
|
openAlert({
|
|
54
|
-
type:
|
|
47
|
+
type: alertVariants.error,
|
|
55
48
|
caption: 'Oops, something went wrong.',
|
|
56
49
|
});
|
|
57
50
|
setCreations([]);
|
|
58
51
|
setNextPageToken(null);
|
|
59
52
|
},
|
|
60
53
|
});
|
|
61
|
-
const loadingMoreCreations = networkStatus ===
|
|
54
|
+
const loadingMoreCreations = networkStatus === NetworkStatus.fetchMore;
|
|
62
55
|
return {
|
|
63
56
|
loadMore,
|
|
64
57
|
loading: loading || loadingMoreCreations,
|
|
@@ -103,5 +96,4 @@ const useFindCreations = ({ term, input, page, }) => {
|
|
|
103
96
|
});
|
|
104
97
|
}
|
|
105
98
|
};
|
|
106
|
-
|
|
107
|
-
exports.default = { useFindCreations: exports.useFindCreations, prefetchFindCreations: exports.prefetchFindCreations };
|
|
99
|
+
export default { useFindCreations, prefetchFindCreations };
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const api_1 = require("@ludo.ninja/api");
|
|
6
|
-
const core_1 = require("@ludo.ninja/core");
|
|
7
|
-
const prefetchFindProfilesByName = ({ name, page }, apolloClient) => {
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { hosts, searchSchema as schema } from '@ludo.ninja/api';
|
|
3
|
+
import { ProfileEntity } from '@ludo.ninja/core';
|
|
4
|
+
export const prefetchFindProfilesByName = ({ name, page }, apolloClient) => {
|
|
8
5
|
return apolloClient
|
|
9
6
|
.query({
|
|
10
|
-
query:
|
|
7
|
+
query: schema.FindProfilesByNameDocument,
|
|
11
8
|
variables: {
|
|
12
9
|
name,
|
|
13
10
|
page,
|
|
14
11
|
},
|
|
15
|
-
context: { uri:
|
|
12
|
+
context: { uri: hosts.serverSearchHost },
|
|
16
13
|
fetchPolicy: 'network-only',
|
|
17
14
|
})
|
|
18
15
|
.catch(() => {
|
|
@@ -21,14 +18,13 @@ const prefetchFindProfilesByName = ({ name, page }, apolloClient) => {
|
|
|
21
18
|
};
|
|
22
19
|
});
|
|
23
20
|
};
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
const [
|
|
27
|
-
const [
|
|
28
|
-
const
|
|
29
|
-
const { data, error, loading } = api_1.searchSchema.useFindProfilesByNameQuery({
|
|
21
|
+
export const useFindProfilesByName = ({ name, page, }) => {
|
|
22
|
+
const [profiles, setProfiles] = useState(null);
|
|
23
|
+
const [nextPageToken, setNextPageToken] = useState(null);
|
|
24
|
+
const [results, setResults] = useState(0);
|
|
25
|
+
const { data, error, loading } = schema.useFindProfilesByNameQuery({
|
|
30
26
|
context: {
|
|
31
|
-
uri:
|
|
27
|
+
uri: hosts.searchHost,
|
|
32
28
|
},
|
|
33
29
|
variables: {
|
|
34
30
|
name,
|
|
@@ -36,7 +32,7 @@ const useFindProfilesByName = ({ name, page, }) => {
|
|
|
36
32
|
},
|
|
37
33
|
fetchPolicy: 'cache-first',
|
|
38
34
|
onCompleted: ({ findProfilesByName }) => {
|
|
39
|
-
setProfiles(findProfilesByName.profiles.map((profile) => new
|
|
35
|
+
setProfiles(findProfilesByName.profiles.map((profile) => new ProfileEntity(profile)));
|
|
40
36
|
setNextPageToken(findProfilesByName.nextPage?.token || null);
|
|
41
37
|
setResults(findProfilesByName.nextPage?.elements || 0);
|
|
42
38
|
},
|
|
@@ -55,5 +51,4 @@ const useFindProfilesByName = ({ name, page, }) => {
|
|
|
55
51
|
clientResults: results,
|
|
56
52
|
};
|
|
57
53
|
};
|
|
58
|
-
|
|
59
|
-
exports.default = { prefetchFindProfilesByName: exports.prefetchFindProfilesByName, useFindProfilesByName: exports.useFindProfilesByName };
|
|
54
|
+
export default { prefetchFindProfilesByName, useFindProfilesByName };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// import { useState } from 'react';
|
|
3
2
|
//
|
|
4
3
|
// import { useLazyQuery } from '@apollo/client';
|
|
5
4
|
//
|
|
6
5
|
// import { hosts, searchSchema as schema } from '@ludo.ninja/api';
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
6
|
const useFindShowCaseItems = () => {
|
|
9
7
|
// const [showcaseItemPage, setShowcaseItemPage] =
|
|
10
8
|
// useState<schema.IShowcaseItemPage | null>(null);
|
|
@@ -39,4 +37,4 @@ const useFindShowCaseItems = () => {
|
|
|
39
37
|
// });
|
|
40
38
|
// }
|
|
41
39
|
};
|
|
42
|
-
|
|
40
|
+
export default useFindShowCaseItems;
|
|
@@ -1,27 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
const getPageSizeAssets_1 = require("../../../../utils/getPageSizeAssets");
|
|
8
|
-
const api_1 = require("@ludo.ninja/api");
|
|
9
|
-
const CreationEntity_1 = __importDefault(require("../../../../dto/CreationEntity"));
|
|
1
|
+
import { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { getPageSize } from "../../../../utils/getPageSizeAssets";
|
|
3
|
+
import { hosts, searchSchema as schema } from '@ludo.ninja/api';
|
|
4
|
+
import CreationEntity from "../../../../dto/CreationEntity";
|
|
10
5
|
const limit = 20;
|
|
11
6
|
const useFindUserCreations = ({ ownerId, input, scrollTab, }) => {
|
|
12
|
-
const [creations, setCreations] =
|
|
13
|
-
const nextPageToken =
|
|
14
|
-
const [results, setResults] =
|
|
15
|
-
const [isLoading, setIsLoading] =
|
|
16
|
-
const [isNextLoading, setIsNextLoading] =
|
|
7
|
+
const [creations, setCreations] = useState([]);
|
|
8
|
+
const nextPageToken = useRef(null);
|
|
9
|
+
const [results, setResults] = useState(0);
|
|
10
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
11
|
+
const [isNextLoading, setIsNextLoading] = useState(false);
|
|
17
12
|
const isHaveNextPage = creations.length < results;
|
|
18
|
-
const [fetchCreations, { error, refetch, fetchMore }] =
|
|
13
|
+
const [fetchCreations, { error, refetch, fetchMore }] = schema.useFindUserCreationsLazyQuery({
|
|
19
14
|
context: {
|
|
20
|
-
uri:
|
|
15
|
+
uri: hosts.searchHost,
|
|
21
16
|
},
|
|
22
17
|
fetchPolicy: 'no-cache',
|
|
23
18
|
onCompleted: ({ findUserCreations: { creations, ...nextPage } }) => {
|
|
24
|
-
setCreations(creations.map((creation) => new
|
|
19
|
+
setCreations(creations.map((creation) => new CreationEntity(creation)));
|
|
25
20
|
setResults(nextPage.nextPage?.elements || 0);
|
|
26
21
|
setIsLoading(false);
|
|
27
22
|
nextPageToken.current = nextPage.nextPage?.token || null;
|
|
@@ -32,14 +27,14 @@ const useFindUserCreations = ({ ownerId, input, scrollTab, }) => {
|
|
|
32
27
|
nextPageToken.current = null;
|
|
33
28
|
},
|
|
34
29
|
});
|
|
35
|
-
|
|
30
|
+
useEffect(() => {
|
|
36
31
|
setIsLoading(true);
|
|
37
32
|
fetchCreations({
|
|
38
33
|
variables: {
|
|
39
34
|
ownerId,
|
|
40
35
|
input,
|
|
41
36
|
page: {
|
|
42
|
-
size:
|
|
37
|
+
size: getPageSize({
|
|
43
38
|
scrollTab,
|
|
44
39
|
limit,
|
|
45
40
|
}),
|
|
@@ -69,7 +64,7 @@ const useFindUserCreations = ({ ownerId, input, scrollTab, }) => {
|
|
|
69
64
|
const { creations: nextCreations, ...nextPage } = data.findUserCreations;
|
|
70
65
|
setCreations((prevCreations) => [
|
|
71
66
|
...prevCreations,
|
|
72
|
-
...nextCreations.map((creation) => new
|
|
67
|
+
...nextCreations.map((creation) => new CreationEntity(creation)),
|
|
73
68
|
]);
|
|
74
69
|
setResults(nextPage.nextPage?.elements || 0);
|
|
75
70
|
nextPageToken.current = nextPage.nextPage?.token || null;
|
|
@@ -92,4 +87,4 @@ const useFindUserCreations = ({ ownerId, input, scrollTab, }) => {
|
|
|
92
87
|
isNextLoading,
|
|
93
88
|
};
|
|
94
89
|
};
|
|
95
|
-
|
|
90
|
+
export default useFindUserCreations;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// import { useState } from 'react';
|
|
3
2
|
//
|
|
4
3
|
// import { useLazyQuery } from '@apollo/client';
|
|
5
4
|
//
|
|
6
5
|
// import { hosts, searchSchema as schema } from '@ludo.ninja/api';
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
6
|
const useFindUserShowcaseItems = () => {
|
|
9
7
|
// const [showcaseItemPage, setShowcaseItemPage] =
|
|
10
8
|
// useState<schema.IShowcaseItemPage | null>(null);
|
|
@@ -37,4 +35,4 @@ const useFindUserShowcaseItems = () => {
|
|
|
37
35
|
// });
|
|
38
36
|
// }
|
|
39
37
|
};
|
|
40
|
-
|
|
38
|
+
export default useFindUserShowcaseItems;
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const store_1 = require("../../modules/user/store");
|
|
10
|
-
const ui_1 = require("../../store/ui");
|
|
11
|
-
const notifications_1 = require("../../modules/notifications");
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { useRouter } from 'next/router';
|
|
4
|
+
import { useSubscription } from '@apollo/client';
|
|
5
|
+
import { authCookies, experiencesSchema as schema } from '@ludo.ninja/api';
|
|
6
|
+
import { useUserStore } from "../../modules/user/store";
|
|
7
|
+
import { useUiStore } from "../../store/ui";
|
|
8
|
+
import { createInviteNotification } from "../../modules/notifications";
|
|
12
9
|
const Subscription = () => {
|
|
13
|
-
const { authToken } =
|
|
14
|
-
const router =
|
|
15
|
-
const addNotification =
|
|
16
|
-
|
|
10
|
+
const { authToken } = authCookies.getCookies();
|
|
11
|
+
const router = useRouter();
|
|
12
|
+
const addNotification = useUiStore((state) => state.addNotification);
|
|
13
|
+
useSubscription(schema.OnInviteCodeUsedDocument, {
|
|
17
14
|
variables: { authToken },
|
|
18
15
|
// onComplete: () => {
|
|
19
16
|
// console.log('complete');
|
|
@@ -22,7 +19,7 @@ const Subscription = () => {
|
|
|
22
19
|
const inviteCode = options.data.data?.onInviteCodeUsed.inviteCode;
|
|
23
20
|
// console.log('onData', inviteCode);
|
|
24
21
|
if (inviteCode) {
|
|
25
|
-
addNotification(
|
|
22
|
+
addNotification(createInviteNotification({
|
|
26
23
|
inviteCode,
|
|
27
24
|
onClick: () => {
|
|
28
25
|
router.push(`/invite-codes`);
|
|
@@ -33,12 +30,11 @@ const Subscription = () => {
|
|
|
33
30
|
});
|
|
34
31
|
return null;
|
|
35
32
|
};
|
|
36
|
-
const SubscriberInviteNotification = () => {
|
|
37
|
-
const isSignedIn =
|
|
38
|
-
const [startSubscription, setStartSubscription] =
|
|
39
|
-
|
|
33
|
+
export const SubscriberInviteNotification = () => {
|
|
34
|
+
const isSignedIn = useUserStore((state) => state.isSignedIn);
|
|
35
|
+
const [startSubscription, setStartSubscription] = useState(false);
|
|
36
|
+
useEffect(() => {
|
|
40
37
|
setStartSubscription(isSignedIn);
|
|
41
38
|
}, [isSignedIn]);
|
|
42
|
-
return startSubscription ? (
|
|
39
|
+
return startSubscription ? _jsx(Subscription, {}) : null;
|
|
43
40
|
};
|
|
44
|
-
exports.SubscriberInviteNotification = SubscriberInviteNotification;
|
|
@@ -1,26 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const scale_1 = require("../../../utils/adaptive/scale");
|
|
13
|
-
const auth_1 = require("../../../utils/auth");
|
|
14
|
-
const screen_1 = require("../../../utils/screen");
|
|
15
|
-
const likes_1 = __importDefault(require("../../../hooks/likes"));
|
|
16
|
-
const heart_svg_1 = __importDefault(require("../../../public/showCaseIcons/heart"));
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import Skeleton from 'react-loading-skeleton';
|
|
3
|
+
import { LabelKeys } from "../../../dto/common/ItemType";
|
|
4
|
+
import { useUserStore } from "../../../modules/user/store";
|
|
5
|
+
import IconWithButton from "../../../system/Buttons/IconWithButton";
|
|
6
|
+
import { getAdaptiveValueWithCheck4k } from "../../../utils/adaptive/check4k";
|
|
7
|
+
import { getAdaptiveScale } from "../../../utils/adaptive/scale";
|
|
8
|
+
import { useRedirectToLoginWindow } from "../../../utils/auth";
|
|
9
|
+
import { useWindowDimensionsWithServerInitial } from "../../../utils/screen";
|
|
10
|
+
import useLikes from "../../../hooks/likes";
|
|
11
|
+
import HeartIcon from "../../../public/showCaseIcons/heart";
|
|
17
12
|
const AssetLikes = ({ assetId, likesByUser, isLikedByUser, }) => {
|
|
18
|
-
const redirectToLoginWindow =
|
|
19
|
-
const isSignedIn =
|
|
20
|
-
const { likes, addLike, deleteLike, isLoading } = (
|
|
13
|
+
const redirectToLoginWindow = useRedirectToLoginWindow();
|
|
14
|
+
const isSignedIn = useUserStore((state) => state.isSignedIn);
|
|
15
|
+
const { likes, addLike, deleteLike, isLoading } = useLikes({
|
|
21
16
|
defaultLikesCount: likesByUser,
|
|
22
17
|
defaultIsLiked: isLikedByUser,
|
|
23
|
-
itemType:
|
|
18
|
+
itemType: LabelKeys.asset,
|
|
24
19
|
});
|
|
25
20
|
const handleLikes = (isLiked) => {
|
|
26
21
|
if (!isSignedIn) {
|
|
@@ -31,28 +26,28 @@ const AssetLikes = ({ assetId, likesByUser, isLikedByUser, }) => {
|
|
|
31
26
|
}
|
|
32
27
|
};
|
|
33
28
|
const onLikeBtnClick = () => handleLikes(likes.isLiked);
|
|
34
|
-
const { windowDimensions } =
|
|
35
|
-
return ((
|
|
36
|
-
borderRadius: `${
|
|
29
|
+
const { windowDimensions } = useWindowDimensionsWithServerInitial();
|
|
30
|
+
return (_jsx(_Fragment, { children: isLoading ? (_jsx(Skeleton, { style: {
|
|
31
|
+
borderRadius: `${getAdaptiveValueWithCheck4k({
|
|
37
32
|
windowDimensions,
|
|
38
33
|
currentSize: 3,
|
|
39
34
|
})}px`,
|
|
40
|
-
marginRight: `${
|
|
35
|
+
marginRight: `${getAdaptiveValueWithCheck4k({
|
|
41
36
|
windowDimensions,
|
|
42
37
|
currentSize: 16.8,
|
|
43
38
|
})}px`,
|
|
44
|
-
}, height: "100%", width: `${
|
|
39
|
+
}, height: "100%", width: `${getAdaptiveValueWithCheck4k({
|
|
45
40
|
windowDimensions,
|
|
46
41
|
currentSize: 30,
|
|
47
|
-
})}px` })) : ((
|
|
48
|
-
width: `${
|
|
42
|
+
})}px` })) : (_jsx(IconWithButton, { variant: 'figcaption', text: likes.likesCount, onClick: onLikeBtnClick, children: _jsx("div", { style: {
|
|
43
|
+
width: `${getAdaptiveValueWithCheck4k({
|
|
49
44
|
windowDimensions,
|
|
50
45
|
currentSize: 18,
|
|
51
46
|
})}px`,
|
|
52
|
-
height: `${
|
|
47
|
+
height: `${getAdaptiveValueWithCheck4k({
|
|
53
48
|
windowDimensions,
|
|
54
49
|
currentSize: 18,
|
|
55
50
|
})}px`,
|
|
56
|
-
}, children: (
|
|
51
|
+
}, children: _jsx(HeartIcon, { className: `icon ${likes.isLiked ? 'liked' : ''}`, style: getAdaptiveScale({ windowDimensions, currentSize: 1 }) }) }) })) }));
|
|
57
52
|
};
|
|
58
|
-
|
|
53
|
+
export default AssetLikes;
|
|
@@ -1,37 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
-
const core_1 = require("@ludo.ninja/core");
|
|
10
|
-
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
11
|
-
const index_1 = require("../../../system/index");
|
|
12
|
-
const ResponsiveImage = (0, styled_components_1.default)(index_1.ExternalImage) `
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { isImage } from "@ludo.ninja/core";
|
|
4
|
+
import { mediaQuery } from "../../../styles/ScreenWidth";
|
|
5
|
+
import { Box, ExternalImage, Flex } from "../../../system/index";
|
|
6
|
+
const ResponsiveImage = styled(ExternalImage) `
|
|
13
7
|
max-width: 320px;
|
|
14
8
|
max-height: 320px;
|
|
15
9
|
|
|
16
|
-
${
|
|
10
|
+
${mediaQuery.tablet} {
|
|
17
11
|
max-width: 336px;
|
|
18
12
|
max-height: 336px;
|
|
19
13
|
}
|
|
20
14
|
|
|
21
|
-
${
|
|
15
|
+
${mediaQuery.desktop} {
|
|
22
16
|
max-width: 508px;
|
|
23
17
|
max-height: 508px;
|
|
24
18
|
}
|
|
25
19
|
`;
|
|
26
|
-
const EmptyState = () => ((
|
|
27
|
-
const AssetMedia = ({ medias }) => {
|
|
20
|
+
const EmptyState = () => (_jsx(Flex, { justifyContent: "center", children: _jsx(Box, { borderRadius: 16, overflow: "hidden" }) }));
|
|
21
|
+
export const AssetMedia = ({ medias }) => {
|
|
28
22
|
if (!medias?.length || medias.length > 1 || !medias[0])
|
|
29
|
-
return (
|
|
23
|
+
return _jsx(EmptyState, {});
|
|
30
24
|
const [media] = medias;
|
|
31
25
|
const { url, mimeType } = media;
|
|
32
|
-
if (url &&
|
|
33
|
-
return ((
|
|
26
|
+
if (url && isImage({ media: url, mimeType, originalMimeType: null })) {
|
|
27
|
+
return (_jsx(Flex, { justifyContent: "center", children: _jsx(Box, { borderRadius: 16, overflow: "hidden", children: _jsx(ResponsiveImage, { src: url }) }) }));
|
|
34
28
|
}
|
|
35
|
-
return (
|
|
29
|
+
return _jsx(EmptyState, {});
|
|
36
30
|
};
|
|
37
|
-
exports.AssetMedia = AssetMedia;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const index_1 = require("../../../system/index");
|
|
7
|
-
function Duration({ seconds }) {
|
|
8
|
-
return ((0, jsx_runtime_1.jsx)("time", { dateTime: `P${Math.round(seconds)}S`, children: (0, jsx_runtime_1.jsx)(index_1.H5, { color: colors_1.InactiveButtonColor, children: format(seconds) }) }));
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { InactiveButtonColor } from "../../../styles/colors";
|
|
3
|
+
import { H5 } from "../../../system/index";
|
|
4
|
+
export default function Duration({ seconds }) {
|
|
5
|
+
return (_jsx("time", { dateTime: `P${Math.round(seconds)}S`, children: _jsx(H5, { color: InactiveButtonColor, children: format(seconds) }) }));
|
|
9
6
|
}
|
|
10
7
|
function format(seconds) {
|
|
11
8
|
const date = new Date(seconds * 1000);
|