@gem-sdk/components 2.0.0-dev.739 → 2.0.0-dev.741
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/dist/cjs/builder.js +2 -2
- package/dist/cjs/carousel/components/item/CarouselItem.js +1 -2
- package/dist/cjs/carousel/components/root/Carousel.liquid.js +3 -3
- package/dist/cjs/carousel/components/root/common/classes.js +2 -2
- package/dist/cjs/carousel/components/root/common/styles.js +0 -2
- package/dist/cjs/carousel/index.js +3 -3
- package/dist/cjs/hero-banner/settings/configs/settings.js +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/product/components/product-images/ProductGalleryCarousel.js +2 -2
- package/dist/cjs/product/components/product-images/ProductImagesLightBox.js +2 -2
- package/dist/cjs/product/components/product-images-v2/ProductImagesV2.liquid.js +3 -3
- package/dist/cjs/product/components/product-images-v2/components/child/ProductFeaturedImageCarousel.js +2 -2
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js +2 -2
- package/dist/cjs/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +2 -2
- package/dist/cjs/product/components/product-list/ProductListCarouselLayout.js +2 -2
- package/dist/cjs/product/index.js +1 -1
- package/dist/esm/builder.js +2 -2
- package/dist/esm/carousel/components/item/CarouselItem.js +1 -2
- package/dist/esm/carousel/components/root/Carousel.liquid.js +3 -3
- package/dist/esm/carousel/components/root/common/classes.js +2 -2
- package/dist/esm/carousel/components/root/common/styles.js +0 -2
- package/dist/esm/carousel/index.js +1 -1
- package/dist/esm/hero-banner/settings/configs/settings.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/product/components/product-images/ProductGalleryCarousel.js +2 -2
- package/dist/esm/product/components/product-images/ProductImagesLightBox.js +2 -2
- package/dist/esm/product/components/product-images-v2/ProductImagesV2.liquid.js +3 -3
- package/dist/esm/product/components/product-images-v2/components/child/ProductFeaturedImageCarousel.js +2 -2
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js +2 -2
- package/dist/esm/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +2 -2
- package/dist/esm/product/components/product-list/ProductListCarouselLayout.js +2 -2
- package/dist/esm/product/index.js +1 -1
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/cjs/carousel/components/root/CarouselWithSwiper.js +0 -131
- package/dist/cjs/carousel/components/root/CustomSwiper.js +0 -59
- package/dist/cjs/carousel/hooks/useCarouselWithSwiper.js +0 -343
- package/dist/esm/carousel/components/root/CarouselWithSwiper.js +0 -127
- package/dist/esm/carousel/components/root/CustomSwiper.js +0 -56
- package/dist/esm/carousel/hooks/useCarouselWithSwiper.js +0 -341
package/dist/types/index.d.ts
CHANGED
|
@@ -916,7 +916,7 @@ type CarouselItemProps = {
|
|
|
916
916
|
parentUid?: string;
|
|
917
917
|
} & BasePropsWrap & React.ComponentPropsWithoutRef<'div'>;
|
|
918
918
|
|
|
919
|
-
declare const
|
|
919
|
+
declare const Carousel$1: React.ForwardRefExoticComponent<_gem_sdk_core.BaseProps<CarouselSettings, CarouselStyles, Record<string, any>> & {
|
|
920
920
|
builderAttrs?: Record<string, any> | undefined;
|
|
921
921
|
style?: React.CSSProperties | undefined;
|
|
922
922
|
} & {
|
|
@@ -7908,4 +7908,4 @@ declare const convertUnitToNumber: (value: string | undefined | number, defaultV
|
|
|
7908
7908
|
declare const getAllHrefFromString: (htmlString: string) => string[];
|
|
7909
7909
|
declare const replaceAllHrefFromString: (htmlString: string, hrefs: string[]) => string;
|
|
7910
7910
|
|
|
7911
|
-
export { Accordion$1 as Accordion, AccordionItem$1 as AccordionItem, AccordionItemProps, AccordionProps, AftershipEmailMarketingsms$1 as AftershipEmailMarketingsms, AftershipEmailMarketingsmsProps, AirProductReviewsAppUgc$1 as AirProductReviewsAppUgc, AirProductReviewsAppUgcProps, AliReviews$1 as AliReviews, AliReviewsProps, AlsoBoughtCbb$1 as AlsoBoughtCbb, AlsoBoughtCbbProps, AovFreeGiftBuyXGetYBogo$1 as AovFreeGiftBuyXGetYBogo, AovFreeGiftBuyXGetYBogoProps, AppointmentBookingCowlendar$1 as AppointmentBookingCowlendar, AppointmentBookingCowlendarProps, AppstleBundlesDiscounts$1 as AppstleBundlesDiscounts, AppstleBundlesDiscountsProps, AppstleSubscriptions$1 as AppstleSubscriptions, AppstleSubscriptionsProps, ArticleAuthor$1 as ArticleAuthor, ArticleCategory$1 as ArticleCategory, ArticleContent$1 as ArticleContent, ArticleDate$1 as ArticleDate, ArticleExcerpt$1 as ArticleExcerpt, ArticleImage$1 as ArticleImage, ArticleList$1 as ArticleList, ArticlePagination$1 as ArticlePagination, ArticleReadMore$1 as ArticleReadMore, ArticleTag$1 as ArticleTag, ArticleTitle$1 as ArticleTitle, BasicHeader, BestBuyFulfillment$1 as BestBuyFulfillment, BestBuyFulfillmentProps, BfSizeChartSizeGuide$1 as BfSizeChartSizeGuide, BfSizeChartSizeGuideProps, BirdChime$1 as BirdChime, BirdChimeProps, Bogos$1 as Bogos, BogosProps, BoldProductOptions$1 as BoldProductOptions, BoldProductOptionsProps, BoldSubscriptions$1 as BoldSubscriptions, BoldSubscriptionsProps, BonLoyaltyRewardsReferrals$1 as BonLoyaltyRewardsReferrals, BonLoyaltyRewardsReferralsProps, BoostAISearchDiscovery$1 as BoostAISearchDiscovery, BoostAISearchDiscoveryProps, Breadcrumb$1 as Breadcrumb, Breadcrumb$1 as BreadcrumbProps, Bundler$1 as Bundler, BundlerProps, Button$2 as Button, ButtonProps, CONTINUE_SELLING_WHEN_OUT_OF_STOCK, CSSCode$1 as CSSCode, CSSCodeProps, CalloutBoxProps, CalloutTextProps, CarouselWithSwiper as Carousel, CarouselItem$1 as CarouselItem, CarouselItemProps, CarouselProps, CarouselSettings, CarouselStyles, Cart, CartCheckout, CartDiscount, CartLineAttribute, CartLineImage, CartLinePrice, CartLineVariant, CartList, CartOrderNote, CartProps, CartTotalItem, CartTotalPrice, CheckoutNow, CleanSizeChartProps, CleanSizeCharts$1 as CleanSizeCharts, Column$1 as Col, ColProps, CollectionBanner$1 as CollectionBanner, CollectionBannerProps, CollectionDescription$1 as CollectionDescription, CollectionDescriptionProps, CollectionPaginator$1 as CollectionPaginator, CollectionPaginatorProps, CollectionTitle$1 as CollectionTitle, CollectionTitleProps, CollectionToolbar$1 as CollectionToolbar, CollectionToolbarProps, ContactForm$1 as ContactForm, Countdown$1 as Countdown, CountdownProps, Coupon$1 as Coupon, CouponList, CouponProps, CrossSellCartUpsell$1 as CrossSellCartUpsell, CrossSellCartUpsellProps, CustomProductOptionsVariant$1 as CustomProductOptionsVariant, CustomProductOptionsVariantProps, DEFAULT_FONT_SIZE, DEFAULT_HIGHLIGHT_TAG, DEFAULT_PROGRESS_BAR_HEIGHT, DEFAULT_QUANTITY_TEMPLATE, DEFAULT_RANGE_STEP, DEFAULT_REMAINING_PERCENT, DEFAULT_REMAINING_QUANTITY, DEFAULT_SCARCITY_THRESHOLD, DataVideoType, DesktopMenu, Dialog$1 as Dialog, DiscountInput, DiscountyBulkDiscountSales$1 as DiscountyBulkDiscountSales, DiscountyBulkDiscountSalesProps, DynamicCheckout$1 as DynamicCheckout, DynamicCheckoutProps, ELEMENT_Z_INDEX, EasifyProductOptions$1 as EasifyProductOptions, EasifyProductOptionsProps, EasyBundleBuilderSkailama$1 as EasyBundleBuilderSkailama, EasyBundleBuilderSkailamaProps, EasySell as EasySellCOD, EasySellProps, EcoboostifyShoppableReelUgc$1 as EcoboostifyShoppableReelUgc, EcoboostifyShoppableReelUgcProps, EcomsendBackInStockAlert$1 as EcomsendBackInStockAlert, EcomsendBackInStockAlertProps, EssentialAnnouncementBar$1 as EssentialAnnouncementBar, EssentialAnnouncementBarProps, EssentialCountdownTimerBar$1 as EssentialCountdownTimerBar, EssentialCountdownTimerBarProps, EstimateDate$1 as EstimateDate, EstimateDateProps, EstimatedDeliveryDatePlus$1 as EstimatedDeliveryDatePlus, EstimatedDeliveryDatePlusProps, FastBundleBundlesDiscounts$1 as FastBundleBundlesDiscounts, FastBundleBundlesDiscountsProps, FeraReviews$1 as FeraReviews, FeraReviewsProps, FileUpload$1 as FileUpload, FileUploadProps, FirePush$1 as FirePush, FirePushProps, FlyBundlesUpsellsFbt$1 as FlyBundlesUpsellsFbt, FlyBundlesUpsellsFbtProps, FordeerProductLabels$1 as FordeerProductLabels, FordeerProductLabelsProps, FormCheckbox, FormCheckboxProps, FormDropdown$1 as FormDropdown, FormDropdownProps, FormEmail$1 as FormEmail, FormEmailProps, FormTextArea as FormTextarea, FrequentlyBoughtTogether$1 as FrequentlyBoughtTogether, FrequentlyBoughtTogetherProps, GloColorSwatchvariantImage$1 as GloColorSwatchvariantImage, GloColorSwatchvariantImageProps, GloboProductOptionsVariant$1 as GloboProductOptionsVariant, GloboProductOptionsVariantProps, GoogleReviewsByReputon$1 as GoogleReviewsByReputon, GoogleReviewsByReputonProps, Growave$1 as Growave, GrowaveProps, Header, HeaderProps, Heading$1 as Heading, HeadingProps, HeroBanner$1 as HeroBanner, HeroBannerProps, HextomCountdownTimerBar$1 as HextomCountdownTimerBar, HextomCountdownTimerBarProps, HextomFreeShippingBar$1 as HextomFreeShippingBar, HextomFreeShippingBarProps, HulkFormBuilder$1 as HulkFormBuilder, HulkFormBuilderProps, HulkProductOptions$1 as HulkProductOptions, HulkProductOptionsProps, Icon$1 as Icon, IconList$1 as IconList, IconListHoz$1 as IconListHoz, IconListHozItem, IconListHozProps, IconListItem$1 as IconListItem, IconListItemProps$1 as IconListItemProps, IconListProps$1 as IconListProps, IconListV2$1 as IconListV2, IconProps, Image$1 as Image, ImageComparison$1 as ImageComparison, ImageComparisonItem, ImageDetection, ImageDetectionProps, ImageProps, ImgProps, InfiniteOptions$1 as InfiniteOptions, InfiniteOptionsProps, Input, InputProps, Instafeed$1 as Instafeed, InstafeedProps, InstantJudgemeReviews, InstantKlaviyo, InstantLooxReviews, InstantYotpoLoyalty, InstasellShoppableInstagram$1 as InstasellShoppableInstagram, InstasellShoppableInstagramProps, JudgemeReviews$1 as JudgemeReviews, JudgemeReviewsProps, JunipProductReviewsUgc$1 as JunipProductReviewsUgc, JunipProductReviewsUgcProps, KachingBundles$1 as KachingBundles, KachingBundlesProps, KingProductOptions$1 as KingProductOptions, KingProductOptionsProps, KiteFreeGiftDiscount$1 as KiteFreeGiftDiscount, KiteFreeGiftDiscountProps, KlarnaMessaging$1 as KlarnaMessaging, KlarnaMessagingProps, Klaviyo$1 as Klaviyo, KlaviyoProps, KoalaBundleQuantityDiscount$1 as KoalaBundleQuantityDiscount, KoalaBundleQuantityDiscountProps, LaiProductReviews$1 as LaiProductReviews, LaiProductReviewsProps, Line$2 as Line, LineProps, Link$1 as Link, LinkProps, LoloyalLoyaltyReferrals$1 as LoloyalLoyaltyReferrals, LoloyalLoyaltyReferralsProps, LoopSubscriptions$1 as LoopSubscriptions, LoopSubscriptionsProps, LooxReviews$1 as LooxReviews, LooxReviewsProps, MAX_PROGRESS_BAR_HEIGHT, MAX_REMAINING_PERCENT, MIN_PROGRESS_BAR_HEIGHT, MIN_REMAINING_PERCENT, MIN_REMAINING_QUANTITY, Marquee$1 as Marquee, _default$4 as MarqueeItem, MarqueeItemProps, MarqueeProps, MaxbundleProductBundles$1 as MaxbundleProductBundles, MaxbundleProductBundlesProps, MbcBundleVolumeDiscount$1 as MbcBundleVolumeDiscount, MbcBundleVolumeDiscountProps, Menu, MenuProps, MobileMenu, Modal, ModernHeader, MyappgurusProductReviews$1 as MyappgurusProductReviews, MyappgurusProductReviewsProps, NO_PRODUCT_LEFT, Newsletter$1 as Newsletter, NewsletterProps, Notify as Notice, NotificationAPI, NotificationConfig, NotifyBackInStockPreOrder$1 as NotifyBackInStockPreOrder, NotifyBackInStockPreOrderProps, OUT_OF_STOCK, ObjectFit$1 as ObjectFit, OkendoReviewsLoyalty$1 as OkendoReviewsLoyalty, OkendoReviewsLoyaltyProps, Omnisend$1 as Omnisend, OmnisendProps, Opinew$1 as Opinew, OpinewProps, Pagination, PaginationProps, ParcelPanel$1 as ParcelPanel, ParcelPanelProps, PickyStory$1 as PickyStory, PickyStoryProps, PostPurchaseAcceptButton, PostPurchaseAdvancedList, PostPurchaseAdvancedListItem, PostPurchaseAdvancedListProps, Button$1 as PostPurchaseButton, PostPurchaseButtonProps, CalloutBox as PostPurchaseCalloutBox, CalloutText as PostPurchaseCalloutText, PostPurchaseCountdownTimer, PostPurchaseCountdownTimerProps, PostPurchaseHeading, PostPurchaseImage, PostPurchaseImageProps, Line$1 as PostPurchaseLine, PostPurchaseLineProps, Link as PostPurchaseLink, PostPurchaseLinkProps, PostPurchaseProductDescription, PostPurchaseProductDescriptionProps, PostPurchaseProductDiscountTag, PostPurchaseProductDiscountTagProps, PostPurchaseProductImages, PostPurchaseProductImagesProps, PostPurchaseProductOffer, PostPurchaseProductOfferProps$1 as PostPurchaseProductOfferProps, PostPurchaseProductPrice, PostPurchaseProductPriceBreakdown, PostPurchaseProductPriceBreakdownProps, PostPurchaseProductPriceProps, PostPurchaseProductQuantity, PostPurchaseProductQuantityProps, PostPurchaseProductTitle, PostPurchaseProductTitleProps, PostPurchaseProductVariants, PostPurchaseProductVariantsProps, Text$1 as PostPurchaseText, PostPurchaseTextProps, PowerfulContactFormBuilder$1 as PowerfulContactFormBuilder, PowerfulContactFormBuilderProps, PreorderNowPreOrderPq$1 as PreorderNowPreOrderPq, PreorderNowPreOrderPqProps, PreorderNowWodPresale$1 as PreorderNowWodPresale, PreorderNowWodPresaleProps, Product$1 as Product, ProductBadge$1 as ProductBadge, ProductBadgeProps, ProductBundleDiscount$1 as ProductBundleDiscount, ProductBundleDiscountItem$1 as ProductBundleDiscountItem, ProductBundleDiscountProps, ProductBundleItemDiscountProps, ProductButton$1 as ProductButton, ProductButtonProps, ProductDescription$1 as ProductDescription, ProductDescriptionProps, ProductImages$2 as ProductImages, ProductImagesProps, ProductImagesV2, ProductList$1 as ProductList, ProductListProps, ProductOptionsCustomizer$1 as ProductOptionsCustomizer, ProductOptionsCustomizerProps, ProductOptionsVariantOption$1 as ProductOptionsVariantOption, ProductOptionsVariantOptionProps, ProductPrice$1 as ProductPrice, ProductPriceProps, ProductPropertiesProps, ProductProperties$1 as ProductPropertyInput, ProductProps, ProductQuantity$1 as ProductQuantity, ProductQuantityProps, QuickView as ProductQuickView, ProductReviews$1 as ProductReviews, ProductReviewsProps, ProductSku$1 as ProductSku, ProductTag$1 as ProductTag, ProductTagProps, ProductTitle$1 as ProductTitle, ProductTitleProps, ProductVariants$1 as ProductVariants, ProductVariantsProps, ProductVendor$1 as ProductVendor, ProductViewMore$1 as ProductViewMore, ProductViewMoreProps, PumperBundlesVolumeDiscount$1 as PumperBundlesVolumeDiscount, PumperBundlesVolumeDiscountProps, PushOwl$1 as PushOwl, PushOwlProps, QUANTITY_SOURCE, QikifyUpsell$1 as QikifyUpsell, QikifyUpsellProps, Radio, RapiBundleQuantityBreaks$1 as RapiBundleQuantityBreaks, RapiBundleQuantityBreaksProps, RechargeSubscriptions$1 as RechargeSubscriptions, RechargeSubscriptionsProps, RecurpaySubscriptionApp$1 as RecurpaySubscriptionApp, RecurpaySubscriptionAppProps, Releasit$1 as Releasit, ReleasitProps, RequestQuoteHidePrice$1 as RequestQuoteHidePrice, RequestQuoteHidePriceProps, ReviewxpoProductReviewsApp$1 as ReviewxpoProductReviewsApp, ReviewxpoProductReviewsAppProps, Rivyo$1 as Rivyo, RivyoProps, Root$1 as Root, RootProps$1 as RootProps, Row$1 as Row, RowProps, Ryviu$1 as Ryviu, RyviuProps, SealSubscriptions$1 as SealSubscriptions, SealSubscriptionsProps, Section$1 as Section, SegunoEmailMarketing$1 as SegunoEmailMarketing, SegunoEmailMarketingProps, Select, Selleasy$1 as Selleasy, SelleasyProps, SeoantTrustBadgesIcon$1 as SeoantTrustBadgesIcon, SeoantTrustBadgesIconProps, ShopPayButton$1 as ShopPayButton, ShopPayButtonProps, ShopPayInstallments$1 as ShopPayInstallments, ShopifyForms$1 as ShopifyForms, ShopifyFormsProps, ShopifySubscriptions$1 as ShopifySubscriptions, ShopifySubscriptionsProps, SimpleBundlesKits$1 as SimpleBundlesKits, SimpleBundlesKitsProps, SkioSubscriptionsYcS20$1 as SkioSubscriptionsYcS20, SkioSubscriptionsYcS20Props, SkuProps, SmartSearchBarAndFilters$1 as SmartSearchBarAndFilters, SmartSearchBarAndFiltersProps, SproutPlantTreesGrowSales$1 as SproutPlantTreesGrowSales, SproutPlantTreesGrowSalesProps, Stamped$1 as Stamped, StampedProps, StellarDeliveryDatePickup$1 as StellarDeliveryDatePickup, StellarDeliveryDatePickupProps, Sticky$1 as Sticky, StockCounter$1 as StockCounter, SubifySubscriptionsApp$1 as SubifySubscriptionsApp, SubifySubscriptionsAppProps, SubmitButton$1 as SubmitButton, SubmitButtonProps, TabItem$1 as TabItem, TabItemProps, Tabs$1 as Tabs, TabsProps, TagembedSocialPostReview$1 as TagembedSocialPostReview, TagembedSocialPostReviewProps, TagshopShoppableVideosUgc$1 as TagshopShoppableVideosUgc, TagshopShoppableVideosUgcProps, TeeinblueProductPersonalizer$1 as TeeinblueProductPersonalizer, TeeinblueProductPersonalizerProps, Text$2 as Text, TextAreaProps, TextField$1 as TextField, TextFieldProps, TextInput$1 as TextInput, TextInputProps, TextProps, TextArea as Textarea, TextareaProps, ThirdPartySlot$1 as ThirdPartySlot, TrustBadgesBear$1 as TrustBadgesBear, TrustBadgesBearProps, TrustMe$1 as TrustMe, TrustMeProps, TrustedsiteTrustBadges$1 as TrustedsiteTrustBadges, TrustedsiteTrustBadgesProps, Trustoo$1 as Trustoo, TrustooProps, TrustreviewsProductReviews$1 as TrustreviewsProductReviews, TrustreviewsProductReviewsProps, TrustshopProductReviews$1 as TrustshopProductReviews, TrustshopProductReviewsProps, UltimateSalesBoost$1 as UltimateSalesBoost, UltimateSalesBoostProps, UnlimitedBundlesDiscounts$1 as UnlimitedBundlesDiscounts, UnlimitedBundlesDiscountsProps, VendorProps, Video$1 as Video, Vitals$1 as Vitals, VitalsProps, WhatmoreShoppableVideosreel$1 as WhatmoreShoppableVideosreel, WhatmoreShoppableVideosreelProps, WideBundle$1 as WideBundle, WideBundleProps, Wiser$1 as Wiser, WiserProps, WishlistKing$1 as WishlistKing, WishlistKingProps, WishlistPlus$1 as WishlistPlus, WishlistPlusProps, YotpoLoyalty, YotpoLoyaltyProps, YotpoReviews$1 as YotpoReviews, YotpoReviewsProps, accordionSetting, articleListSetting, bannerSetting, breadcrumbSetting, _default$2 as builderComponent, buttonSetting, carouselSetting, cartSetting, codeSetting, collectionSetting, _default$1 as componentSettings, contactFormSetting, convertSizeToWidth, convertUnitToNumber, countdownSetting, couponSetting, dialogSetting, estimateDeliverySetting, filterTruthyObject, filterTruthyStyles, getAllHrefFromString, getDisplayStyle, getDynamicSourceLocales, getInlineCss, getInsertLinkData, getLinkArticle, getLinkData, getLiquidInitData, getLiquidTextContent, getSettingPreloadData, getStaticLocale, getTextDisplayData, gridSetting, headerSetting, headingSetting, iconListHozSetting, iconListSetting, iconListSettingV2, iconSetting, imageComparisonSetting, imageDetectionSetting, imageSetting, inputSetting, isHexTransparent, isLinkedToSalesPage, isTransparentColor, isTransparentRGBA, lineSetting, linkSetting, index_liquid as liquidComponents, marqueeSetting, menuSetting, modalSetting, _default$3 as nextComponent, openConfirm, paginationSetting, postPurchaseAdvancedListSetting, postPurchaseButtonSetting, postPurchaseCalloutBoxSetting, postPurchaseCountdownTimerSetting, postPurchaseImageSetting, postPurchaseLineSetting, postPurchaseLinkSetting, postPurchaseProduct1Col, postPurchaseProduct2Col, postPurchaseProductDefault, postPurchaseProductSetting, _default as postPurchaseSettings, postPurchaseTextSetting, productSetting, radioSetting, replaceAllHrefFromString, replaceLinkData, selectSetting, shopPayInstallmentSetting, stickySetting, stockCounterSetting, tabSetting, textSetting, textareaSetting, thirdPartyInstantSetting, thirdPartySetting, thirdPartySlotSetting, transformHighlighTag, transformNumberTag, useNotification, videoSetting, youtubeShortsRegex };
|
|
7911
|
+
export { Accordion$1 as Accordion, AccordionItem$1 as AccordionItem, AccordionItemProps, AccordionProps, AftershipEmailMarketingsms$1 as AftershipEmailMarketingsms, AftershipEmailMarketingsmsProps, AirProductReviewsAppUgc$1 as AirProductReviewsAppUgc, AirProductReviewsAppUgcProps, AliReviews$1 as AliReviews, AliReviewsProps, AlsoBoughtCbb$1 as AlsoBoughtCbb, AlsoBoughtCbbProps, AovFreeGiftBuyXGetYBogo$1 as AovFreeGiftBuyXGetYBogo, AovFreeGiftBuyXGetYBogoProps, AppointmentBookingCowlendar$1 as AppointmentBookingCowlendar, AppointmentBookingCowlendarProps, AppstleBundlesDiscounts$1 as AppstleBundlesDiscounts, AppstleBundlesDiscountsProps, AppstleSubscriptions$1 as AppstleSubscriptions, AppstleSubscriptionsProps, ArticleAuthor$1 as ArticleAuthor, ArticleCategory$1 as ArticleCategory, ArticleContent$1 as ArticleContent, ArticleDate$1 as ArticleDate, ArticleExcerpt$1 as ArticleExcerpt, ArticleImage$1 as ArticleImage, ArticleList$1 as ArticleList, ArticlePagination$1 as ArticlePagination, ArticleReadMore$1 as ArticleReadMore, ArticleTag$1 as ArticleTag, ArticleTitle$1 as ArticleTitle, BasicHeader, BestBuyFulfillment$1 as BestBuyFulfillment, BestBuyFulfillmentProps, BfSizeChartSizeGuide$1 as BfSizeChartSizeGuide, BfSizeChartSizeGuideProps, BirdChime$1 as BirdChime, BirdChimeProps, Bogos$1 as Bogos, BogosProps, BoldProductOptions$1 as BoldProductOptions, BoldProductOptionsProps, BoldSubscriptions$1 as BoldSubscriptions, BoldSubscriptionsProps, BonLoyaltyRewardsReferrals$1 as BonLoyaltyRewardsReferrals, BonLoyaltyRewardsReferralsProps, BoostAISearchDiscovery$1 as BoostAISearchDiscovery, BoostAISearchDiscoveryProps, Breadcrumb$1 as Breadcrumb, Breadcrumb$1 as BreadcrumbProps, Bundler$1 as Bundler, BundlerProps, Button$2 as Button, ButtonProps, CONTINUE_SELLING_WHEN_OUT_OF_STOCK, CSSCode$1 as CSSCode, CSSCodeProps, CalloutBoxProps, CalloutTextProps, Carousel$1 as Carousel, CarouselItem$1 as CarouselItem, CarouselItemProps, CarouselProps, CarouselSettings, CarouselStyles, Cart, CartCheckout, CartDiscount, CartLineAttribute, CartLineImage, CartLinePrice, CartLineVariant, CartList, CartOrderNote, CartProps, CartTotalItem, CartTotalPrice, CheckoutNow, CleanSizeChartProps, CleanSizeCharts$1 as CleanSizeCharts, Column$1 as Col, ColProps, CollectionBanner$1 as CollectionBanner, CollectionBannerProps, CollectionDescription$1 as CollectionDescription, CollectionDescriptionProps, CollectionPaginator$1 as CollectionPaginator, CollectionPaginatorProps, CollectionTitle$1 as CollectionTitle, CollectionTitleProps, CollectionToolbar$1 as CollectionToolbar, CollectionToolbarProps, ContactForm$1 as ContactForm, Countdown$1 as Countdown, CountdownProps, Coupon$1 as Coupon, CouponList, CouponProps, CrossSellCartUpsell$1 as CrossSellCartUpsell, CrossSellCartUpsellProps, CustomProductOptionsVariant$1 as CustomProductOptionsVariant, CustomProductOptionsVariantProps, DEFAULT_FONT_SIZE, DEFAULT_HIGHLIGHT_TAG, DEFAULT_PROGRESS_BAR_HEIGHT, DEFAULT_QUANTITY_TEMPLATE, DEFAULT_RANGE_STEP, DEFAULT_REMAINING_PERCENT, DEFAULT_REMAINING_QUANTITY, DEFAULT_SCARCITY_THRESHOLD, DataVideoType, DesktopMenu, Dialog$1 as Dialog, DiscountInput, DiscountyBulkDiscountSales$1 as DiscountyBulkDiscountSales, DiscountyBulkDiscountSalesProps, DynamicCheckout$1 as DynamicCheckout, DynamicCheckoutProps, ELEMENT_Z_INDEX, EasifyProductOptions$1 as EasifyProductOptions, EasifyProductOptionsProps, EasyBundleBuilderSkailama$1 as EasyBundleBuilderSkailama, EasyBundleBuilderSkailamaProps, EasySell as EasySellCOD, EasySellProps, EcoboostifyShoppableReelUgc$1 as EcoboostifyShoppableReelUgc, EcoboostifyShoppableReelUgcProps, EcomsendBackInStockAlert$1 as EcomsendBackInStockAlert, EcomsendBackInStockAlertProps, EssentialAnnouncementBar$1 as EssentialAnnouncementBar, EssentialAnnouncementBarProps, EssentialCountdownTimerBar$1 as EssentialCountdownTimerBar, EssentialCountdownTimerBarProps, EstimateDate$1 as EstimateDate, EstimateDateProps, EstimatedDeliveryDatePlus$1 as EstimatedDeliveryDatePlus, EstimatedDeliveryDatePlusProps, FastBundleBundlesDiscounts$1 as FastBundleBundlesDiscounts, FastBundleBundlesDiscountsProps, FeraReviews$1 as FeraReviews, FeraReviewsProps, FileUpload$1 as FileUpload, FileUploadProps, FirePush$1 as FirePush, FirePushProps, FlyBundlesUpsellsFbt$1 as FlyBundlesUpsellsFbt, FlyBundlesUpsellsFbtProps, FordeerProductLabels$1 as FordeerProductLabels, FordeerProductLabelsProps, FormCheckbox, FormCheckboxProps, FormDropdown$1 as FormDropdown, FormDropdownProps, FormEmail$1 as FormEmail, FormEmailProps, FormTextArea as FormTextarea, FrequentlyBoughtTogether$1 as FrequentlyBoughtTogether, FrequentlyBoughtTogetherProps, GloColorSwatchvariantImage$1 as GloColorSwatchvariantImage, GloColorSwatchvariantImageProps, GloboProductOptionsVariant$1 as GloboProductOptionsVariant, GloboProductOptionsVariantProps, GoogleReviewsByReputon$1 as GoogleReviewsByReputon, GoogleReviewsByReputonProps, Growave$1 as Growave, GrowaveProps, Header, HeaderProps, Heading$1 as Heading, HeadingProps, HeroBanner$1 as HeroBanner, HeroBannerProps, HextomCountdownTimerBar$1 as HextomCountdownTimerBar, HextomCountdownTimerBarProps, HextomFreeShippingBar$1 as HextomFreeShippingBar, HextomFreeShippingBarProps, HulkFormBuilder$1 as HulkFormBuilder, HulkFormBuilderProps, HulkProductOptions$1 as HulkProductOptions, HulkProductOptionsProps, Icon$1 as Icon, IconList$1 as IconList, IconListHoz$1 as IconListHoz, IconListHozItem, IconListHozProps, IconListItem$1 as IconListItem, IconListItemProps$1 as IconListItemProps, IconListProps$1 as IconListProps, IconListV2$1 as IconListV2, IconProps, Image$1 as Image, ImageComparison$1 as ImageComparison, ImageComparisonItem, ImageDetection, ImageDetectionProps, ImageProps, ImgProps, InfiniteOptions$1 as InfiniteOptions, InfiniteOptionsProps, Input, InputProps, Instafeed$1 as Instafeed, InstafeedProps, InstantJudgemeReviews, InstantKlaviyo, InstantLooxReviews, InstantYotpoLoyalty, InstasellShoppableInstagram$1 as InstasellShoppableInstagram, InstasellShoppableInstagramProps, JudgemeReviews$1 as JudgemeReviews, JudgemeReviewsProps, JunipProductReviewsUgc$1 as JunipProductReviewsUgc, JunipProductReviewsUgcProps, KachingBundles$1 as KachingBundles, KachingBundlesProps, KingProductOptions$1 as KingProductOptions, KingProductOptionsProps, KiteFreeGiftDiscount$1 as KiteFreeGiftDiscount, KiteFreeGiftDiscountProps, KlarnaMessaging$1 as KlarnaMessaging, KlarnaMessagingProps, Klaviyo$1 as Klaviyo, KlaviyoProps, KoalaBundleQuantityDiscount$1 as KoalaBundleQuantityDiscount, KoalaBundleQuantityDiscountProps, LaiProductReviews$1 as LaiProductReviews, LaiProductReviewsProps, Line$2 as Line, LineProps, Link$1 as Link, LinkProps, LoloyalLoyaltyReferrals$1 as LoloyalLoyaltyReferrals, LoloyalLoyaltyReferralsProps, LoopSubscriptions$1 as LoopSubscriptions, LoopSubscriptionsProps, LooxReviews$1 as LooxReviews, LooxReviewsProps, MAX_PROGRESS_BAR_HEIGHT, MAX_REMAINING_PERCENT, MIN_PROGRESS_BAR_HEIGHT, MIN_REMAINING_PERCENT, MIN_REMAINING_QUANTITY, Marquee$1 as Marquee, _default$4 as MarqueeItem, MarqueeItemProps, MarqueeProps, MaxbundleProductBundles$1 as MaxbundleProductBundles, MaxbundleProductBundlesProps, MbcBundleVolumeDiscount$1 as MbcBundleVolumeDiscount, MbcBundleVolumeDiscountProps, Menu, MenuProps, MobileMenu, Modal, ModernHeader, MyappgurusProductReviews$1 as MyappgurusProductReviews, MyappgurusProductReviewsProps, NO_PRODUCT_LEFT, Newsletter$1 as Newsletter, NewsletterProps, Notify as Notice, NotificationAPI, NotificationConfig, NotifyBackInStockPreOrder$1 as NotifyBackInStockPreOrder, NotifyBackInStockPreOrderProps, OUT_OF_STOCK, ObjectFit$1 as ObjectFit, OkendoReviewsLoyalty$1 as OkendoReviewsLoyalty, OkendoReviewsLoyaltyProps, Omnisend$1 as Omnisend, OmnisendProps, Opinew$1 as Opinew, OpinewProps, Pagination, PaginationProps, ParcelPanel$1 as ParcelPanel, ParcelPanelProps, PickyStory$1 as PickyStory, PickyStoryProps, PostPurchaseAcceptButton, PostPurchaseAdvancedList, PostPurchaseAdvancedListItem, PostPurchaseAdvancedListProps, Button$1 as PostPurchaseButton, PostPurchaseButtonProps, CalloutBox as PostPurchaseCalloutBox, CalloutText as PostPurchaseCalloutText, PostPurchaseCountdownTimer, PostPurchaseCountdownTimerProps, PostPurchaseHeading, PostPurchaseImage, PostPurchaseImageProps, Line$1 as PostPurchaseLine, PostPurchaseLineProps, Link as PostPurchaseLink, PostPurchaseLinkProps, PostPurchaseProductDescription, PostPurchaseProductDescriptionProps, PostPurchaseProductDiscountTag, PostPurchaseProductDiscountTagProps, PostPurchaseProductImages, PostPurchaseProductImagesProps, PostPurchaseProductOffer, PostPurchaseProductOfferProps$1 as PostPurchaseProductOfferProps, PostPurchaseProductPrice, PostPurchaseProductPriceBreakdown, PostPurchaseProductPriceBreakdownProps, PostPurchaseProductPriceProps, PostPurchaseProductQuantity, PostPurchaseProductQuantityProps, PostPurchaseProductTitle, PostPurchaseProductTitleProps, PostPurchaseProductVariants, PostPurchaseProductVariantsProps, Text$1 as PostPurchaseText, PostPurchaseTextProps, PowerfulContactFormBuilder$1 as PowerfulContactFormBuilder, PowerfulContactFormBuilderProps, PreorderNowPreOrderPq$1 as PreorderNowPreOrderPq, PreorderNowPreOrderPqProps, PreorderNowWodPresale$1 as PreorderNowWodPresale, PreorderNowWodPresaleProps, Product$1 as Product, ProductBadge$1 as ProductBadge, ProductBadgeProps, ProductBundleDiscount$1 as ProductBundleDiscount, ProductBundleDiscountItem$1 as ProductBundleDiscountItem, ProductBundleDiscountProps, ProductBundleItemDiscountProps, ProductButton$1 as ProductButton, ProductButtonProps, ProductDescription$1 as ProductDescription, ProductDescriptionProps, ProductImages$2 as ProductImages, ProductImagesProps, ProductImagesV2, ProductList$1 as ProductList, ProductListProps, ProductOptionsCustomizer$1 as ProductOptionsCustomizer, ProductOptionsCustomizerProps, ProductOptionsVariantOption$1 as ProductOptionsVariantOption, ProductOptionsVariantOptionProps, ProductPrice$1 as ProductPrice, ProductPriceProps, ProductPropertiesProps, ProductProperties$1 as ProductPropertyInput, ProductProps, ProductQuantity$1 as ProductQuantity, ProductQuantityProps, QuickView as ProductQuickView, ProductReviews$1 as ProductReviews, ProductReviewsProps, ProductSku$1 as ProductSku, ProductTag$1 as ProductTag, ProductTagProps, ProductTitle$1 as ProductTitle, ProductTitleProps, ProductVariants$1 as ProductVariants, ProductVariantsProps, ProductVendor$1 as ProductVendor, ProductViewMore$1 as ProductViewMore, ProductViewMoreProps, PumperBundlesVolumeDiscount$1 as PumperBundlesVolumeDiscount, PumperBundlesVolumeDiscountProps, PushOwl$1 as PushOwl, PushOwlProps, QUANTITY_SOURCE, QikifyUpsell$1 as QikifyUpsell, QikifyUpsellProps, Radio, RapiBundleQuantityBreaks$1 as RapiBundleQuantityBreaks, RapiBundleQuantityBreaksProps, RechargeSubscriptions$1 as RechargeSubscriptions, RechargeSubscriptionsProps, RecurpaySubscriptionApp$1 as RecurpaySubscriptionApp, RecurpaySubscriptionAppProps, Releasit$1 as Releasit, ReleasitProps, RequestQuoteHidePrice$1 as RequestQuoteHidePrice, RequestQuoteHidePriceProps, ReviewxpoProductReviewsApp$1 as ReviewxpoProductReviewsApp, ReviewxpoProductReviewsAppProps, Rivyo$1 as Rivyo, RivyoProps, Root$1 as Root, RootProps$1 as RootProps, Row$1 as Row, RowProps, Ryviu$1 as Ryviu, RyviuProps, SealSubscriptions$1 as SealSubscriptions, SealSubscriptionsProps, Section$1 as Section, SegunoEmailMarketing$1 as SegunoEmailMarketing, SegunoEmailMarketingProps, Select, Selleasy$1 as Selleasy, SelleasyProps, SeoantTrustBadgesIcon$1 as SeoantTrustBadgesIcon, SeoantTrustBadgesIconProps, ShopPayButton$1 as ShopPayButton, ShopPayButtonProps, ShopPayInstallments$1 as ShopPayInstallments, ShopifyForms$1 as ShopifyForms, ShopifyFormsProps, ShopifySubscriptions$1 as ShopifySubscriptions, ShopifySubscriptionsProps, SimpleBundlesKits$1 as SimpleBundlesKits, SimpleBundlesKitsProps, SkioSubscriptionsYcS20$1 as SkioSubscriptionsYcS20, SkioSubscriptionsYcS20Props, SkuProps, SmartSearchBarAndFilters$1 as SmartSearchBarAndFilters, SmartSearchBarAndFiltersProps, SproutPlantTreesGrowSales$1 as SproutPlantTreesGrowSales, SproutPlantTreesGrowSalesProps, Stamped$1 as Stamped, StampedProps, StellarDeliveryDatePickup$1 as StellarDeliveryDatePickup, StellarDeliveryDatePickupProps, Sticky$1 as Sticky, StockCounter$1 as StockCounter, SubifySubscriptionsApp$1 as SubifySubscriptionsApp, SubifySubscriptionsAppProps, SubmitButton$1 as SubmitButton, SubmitButtonProps, TabItem$1 as TabItem, TabItemProps, Tabs$1 as Tabs, TabsProps, TagembedSocialPostReview$1 as TagembedSocialPostReview, TagembedSocialPostReviewProps, TagshopShoppableVideosUgc$1 as TagshopShoppableVideosUgc, TagshopShoppableVideosUgcProps, TeeinblueProductPersonalizer$1 as TeeinblueProductPersonalizer, TeeinblueProductPersonalizerProps, Text$2 as Text, TextAreaProps, TextField$1 as TextField, TextFieldProps, TextInput$1 as TextInput, TextInputProps, TextProps, TextArea as Textarea, TextareaProps, ThirdPartySlot$1 as ThirdPartySlot, TrustBadgesBear$1 as TrustBadgesBear, TrustBadgesBearProps, TrustMe$1 as TrustMe, TrustMeProps, TrustedsiteTrustBadges$1 as TrustedsiteTrustBadges, TrustedsiteTrustBadgesProps, Trustoo$1 as Trustoo, TrustooProps, TrustreviewsProductReviews$1 as TrustreviewsProductReviews, TrustreviewsProductReviewsProps, TrustshopProductReviews$1 as TrustshopProductReviews, TrustshopProductReviewsProps, UltimateSalesBoost$1 as UltimateSalesBoost, UltimateSalesBoostProps, UnlimitedBundlesDiscounts$1 as UnlimitedBundlesDiscounts, UnlimitedBundlesDiscountsProps, VendorProps, Video$1 as Video, Vitals$1 as Vitals, VitalsProps, WhatmoreShoppableVideosreel$1 as WhatmoreShoppableVideosreel, WhatmoreShoppableVideosreelProps, WideBundle$1 as WideBundle, WideBundleProps, Wiser$1 as Wiser, WiserProps, WishlistKing$1 as WishlistKing, WishlistKingProps, WishlistPlus$1 as WishlistPlus, WishlistPlusProps, YotpoLoyalty, YotpoLoyaltyProps, YotpoReviews$1 as YotpoReviews, YotpoReviewsProps, accordionSetting, articleListSetting, bannerSetting, breadcrumbSetting, _default$2 as builderComponent, buttonSetting, carouselSetting, cartSetting, codeSetting, collectionSetting, _default$1 as componentSettings, contactFormSetting, convertSizeToWidth, convertUnitToNumber, countdownSetting, couponSetting, dialogSetting, estimateDeliverySetting, filterTruthyObject, filterTruthyStyles, getAllHrefFromString, getDisplayStyle, getDynamicSourceLocales, getInlineCss, getInsertLinkData, getLinkArticle, getLinkData, getLiquidInitData, getLiquidTextContent, getSettingPreloadData, getStaticLocale, getTextDisplayData, gridSetting, headerSetting, headingSetting, iconListHozSetting, iconListSetting, iconListSettingV2, iconSetting, imageComparisonSetting, imageDetectionSetting, imageSetting, inputSetting, isHexTransparent, isLinkedToSalesPage, isTransparentColor, isTransparentRGBA, lineSetting, linkSetting, index_liquid as liquidComponents, marqueeSetting, menuSetting, modalSetting, _default$3 as nextComponent, openConfirm, paginationSetting, postPurchaseAdvancedListSetting, postPurchaseButtonSetting, postPurchaseCalloutBoxSetting, postPurchaseCountdownTimerSetting, postPurchaseImageSetting, postPurchaseLineSetting, postPurchaseLinkSetting, postPurchaseProduct1Col, postPurchaseProduct2Col, postPurchaseProductDefault, postPurchaseProductSetting, _default as postPurchaseSettings, postPurchaseTextSetting, productSetting, radioSetting, replaceAllHrefFromString, replaceLinkData, selectSetting, shopPayInstallmentSetting, stickySetting, stockCounterSetting, tabSetting, textSetting, textareaSetting, thirdPartyInstantSetting, thirdPartySetting, thirdPartySlotSetting, transformHighlighTag, transformNumberTag, useNotification, videoSetting, youtubeShortsRegex };
|
package/package.json
CHANGED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
var core = require('@gem-sdk/core');
|
|
8
|
-
var React = require('react');
|
|
9
|
-
var helpers = require('../arrow/common/helpers.js');
|
|
10
|
-
var useCarouselWithSwiper = require('../../hooks/useCarouselWithSwiper.js');
|
|
11
|
-
var helpers$1 = require('./common/helpers.js');
|
|
12
|
-
var classes = require('./common/classes.js');
|
|
13
|
-
var styles = require('./common/styles.js');
|
|
14
|
-
var attrs = require('./common/attrs.js');
|
|
15
|
-
var Arrow = require('../arrow/Arrow.js');
|
|
16
|
-
var Dots = require('../dot/Dots.js');
|
|
17
|
-
var CustomSwiper = require('./CustomSwiper.js');
|
|
18
|
-
|
|
19
|
-
const CarouselWithSwiper = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
20
|
-
const { children, builderAttrs, builderProps, styles: styles$1, isHiddenArrowWhenDisabled = true, hiddenDotWhenOnlyOne, elmRef } = props;
|
|
21
|
-
const setting = helpers.mappingNavigationCarousel(props.setting);
|
|
22
|
-
const renderData = {
|
|
23
|
-
...props,
|
|
24
|
-
setting
|
|
25
|
-
};
|
|
26
|
-
const [swiperInstance, setSwiperInstance] = React.useState(null);
|
|
27
|
-
const { arrowButtonSize, arrowBackgroundColor, arrowGapToEachSide = '16', roundedArrow, arrowIconSize, arrowCustomColor, arrowBorder, arrowShadow, showWhenHover } = setting ?? {};
|
|
28
|
-
const { isInfinity, localRef, sliderSettings, totalSlideItem, currentSlide, isRenderDots, showNavigation, handleDotClick, getItemsPerPage, handleNextAndPrevSlide, dispatchEventSelectSlide, getNumberOfFullWidthShow } = useCarouselWithSwiper.useCarouselWithSwiper(renderData, ref, swiperInstance);
|
|
29
|
-
const { loopConfig, arrowShowConfig } = helpers$1.getData(renderData);
|
|
30
|
-
const { rootClassRender, wrapperClassRender, wrapperInnerClass, sliderClass } = classes.getClass(renderData);
|
|
31
|
-
const { rootStyleRender, wrapperStyleRender, wrapperInnerStyle } = styles.getStyle(renderData);
|
|
32
|
-
const { rootAttrRender, sliderAttr } = attrs.getAttr(renderData);
|
|
33
|
-
const currentDevice = core.useCurrentDevice();
|
|
34
|
-
const enabledSneakPeak = setting?.sneakPeak?.[currentDevice];
|
|
35
|
-
const renderArrow = (position)=>{
|
|
36
|
-
const isNext = position === 'next';
|
|
37
|
-
const slidesPerView = getItemsPerPage();
|
|
38
|
-
const isDisable = isNext ? !isInfinity && currentSlide >= totalSlideItem - Math.floor(slidesPerView) : !isInfinity && currentSlide === 0;
|
|
39
|
-
return /*#__PURE__*/ jsxRuntime.jsx(Arrow.default, {
|
|
40
|
-
uid: builderProps?.uid,
|
|
41
|
-
custom: setting?.arrowCustom ?? '',
|
|
42
|
-
showArrow: arrowShowConfig,
|
|
43
|
-
arrowButtonSize: arrowButtonSize || {},
|
|
44
|
-
arrowIconSize: arrowIconSize || {},
|
|
45
|
-
arrowBackgroundColor: arrowBackgroundColor || '',
|
|
46
|
-
arrowCustomColor: arrowCustomColor,
|
|
47
|
-
gapToEachSize: arrowGapToEachSide,
|
|
48
|
-
showWhenHover: showWhenHover,
|
|
49
|
-
arrowBorder: arrowBorder || {},
|
|
50
|
-
arrowCorner: roundedArrow || {},
|
|
51
|
-
arrowShadow: arrowShadow || {},
|
|
52
|
-
onClick: (e)=>{
|
|
53
|
-
e.stopPropagation();
|
|
54
|
-
handleNextAndPrevSlide(position);
|
|
55
|
-
},
|
|
56
|
-
left: !isNext,
|
|
57
|
-
disabled: isDisable,
|
|
58
|
-
vertical: setting?.vertical,
|
|
59
|
-
isHiddenWhenDisabled: isHiddenArrowWhenDisabled,
|
|
60
|
-
rootId: props?.parentClass
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
const handleSliderReady = React.useCallback((swiper)=>{
|
|
64
|
-
setSwiperInstance(swiper);
|
|
65
|
-
}, []);
|
|
66
|
-
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
67
|
-
ref: elmRef,
|
|
68
|
-
...rootAttrRender,
|
|
69
|
-
className: rootClassRender,
|
|
70
|
-
style: rootStyleRender,
|
|
71
|
-
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
72
|
-
ref: localRef,
|
|
73
|
-
...builderAttrs,
|
|
74
|
-
className: wrapperClassRender,
|
|
75
|
-
style: wrapperStyleRender,
|
|
76
|
-
children: [
|
|
77
|
-
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
78
|
-
className: wrapperInnerClass,
|
|
79
|
-
style: wrapperInnerStyle,
|
|
80
|
-
children: [
|
|
81
|
-
showNavigation && renderArrow('prev'),
|
|
82
|
-
/*#__PURE__*/ jsxRuntime.jsx(CustomSwiper.Swiper, {
|
|
83
|
-
...sliderAttr,
|
|
84
|
-
...sliderSettings,
|
|
85
|
-
sliderClass: sliderClass,
|
|
86
|
-
onSwiperReady: handleSliderReady,
|
|
87
|
-
totalSlides: totalSlideItem,
|
|
88
|
-
children: core.isEmptyChildren(children) ? /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
89
|
-
children: "No Slider"
|
|
90
|
-
}) : React.Children.map(core.filterToolbarPreview(children), (child)=>{
|
|
91
|
-
if (/*#__PURE__*/ React.isValidElement(child)) {
|
|
92
|
-
return /*#__PURE__*/ jsxRuntime.jsx(child.type, {
|
|
93
|
-
...child.props,
|
|
94
|
-
parentSettings: setting,
|
|
95
|
-
parentStyle: styles$1,
|
|
96
|
-
background: setting?.background,
|
|
97
|
-
parentUid: builderProps?.uid,
|
|
98
|
-
dispatchEventSelectSlide: dispatchEventSelectSlide
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
return null;
|
|
102
|
-
})
|
|
103
|
-
}),
|
|
104
|
-
showNavigation && renderArrow('next')
|
|
105
|
-
]
|
|
106
|
-
}),
|
|
107
|
-
isRenderDots && /*#__PURE__*/ jsxRuntime.jsx(Dots.default, {
|
|
108
|
-
dotStyle: setting?.dotStyle,
|
|
109
|
-
dotGapToCarousel: setting?.dotGapToCarousel,
|
|
110
|
-
vertical: setting?.vertical,
|
|
111
|
-
showDots: setting?.dot,
|
|
112
|
-
slideItemsPerPage: getItemsPerPage(),
|
|
113
|
-
enabledSneakPeak: enabledSneakPeak,
|
|
114
|
-
dotColor: setting?.dotColor,
|
|
115
|
-
dotActiveColor: setting?.dotActiveColor,
|
|
116
|
-
dotSize: setting?.dotSize,
|
|
117
|
-
sneakPeakType: setting?.sneakPeakType,
|
|
118
|
-
totalSlideItem: totalSlideItem,
|
|
119
|
-
hiddenWhenOnlyOne: hiddenDotWhenOnlyOne,
|
|
120
|
-
currentSlide: currentSlide,
|
|
121
|
-
loop: loopConfig,
|
|
122
|
-
numberOfFullWidthShow: getNumberOfFullWidthShow(currentDevice),
|
|
123
|
-
onHandleClick: handleDotClick
|
|
124
|
-
}),
|
|
125
|
-
core.filterToolbarPreview(children, true)
|
|
126
|
-
]
|
|
127
|
-
})
|
|
128
|
-
});
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
exports.default = CarouselWithSwiper;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var bundle = require('swiper/element/bundle');
|
|
6
|
-
|
|
7
|
-
function Swiper(props) {
|
|
8
|
-
const swiperRef = React.useRef(null);
|
|
9
|
-
const { children, totalSlides, onSwiperReady, sliderClass, ...sliderSetting } = props;
|
|
10
|
-
const pauseOnMouseEnter = typeof props.autoplay === 'object' && props.autoplay !== null ? props.autoplay.pauseOnMouseEnter : undefined;
|
|
11
|
-
React.useEffect(()=>{
|
|
12
|
-
bundle.register();
|
|
13
|
-
Object.assign(swiperRef.current, sliderSetting);
|
|
14
|
-
swiperRef.current.initialize();
|
|
15
|
-
const instance = swiperRef.current.swiper;
|
|
16
|
-
onSwiperReady?.(instance);
|
|
17
|
-
}, []);
|
|
18
|
-
React.useEffect(()=>{
|
|
19
|
-
if (swiperRef.current?.swiper) {
|
|
20
|
-
const swiperInstance = swiperRef.current.swiper;
|
|
21
|
-
swiperInstance.destroy(true, true);
|
|
22
|
-
Object.assign(swiperRef.current, sliderSetting);
|
|
23
|
-
swiperRef.current.initialize();
|
|
24
|
-
onSwiperReady?.(swiperRef.current.swiper);
|
|
25
|
-
}
|
|
26
|
-
}, [
|
|
27
|
-
sliderSetting.dir,
|
|
28
|
-
sliderSetting.loop,
|
|
29
|
-
pauseOnMouseEnter,
|
|
30
|
-
sliderSetting.slidesPerView,
|
|
31
|
-
onSwiperReady,
|
|
32
|
-
totalSlides
|
|
33
|
-
]);
|
|
34
|
-
React.useEffect(()=>{
|
|
35
|
-
const swiperInstance = swiperRef.current?.swiper;
|
|
36
|
-
if (!swiperInstance) return;
|
|
37
|
-
Object.assign(swiperInstance.params, sliderSetting);
|
|
38
|
-
swiperInstance.update();
|
|
39
|
-
}, [
|
|
40
|
-
sliderSetting
|
|
41
|
-
]);
|
|
42
|
-
return /*#__PURE__*/ jsxRuntime.jsx("swiper-container", {
|
|
43
|
-
init: false,
|
|
44
|
-
className: sliderClass,
|
|
45
|
-
ref: swiperRef,
|
|
46
|
-
children: children
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
function SwiperSlide(props) {
|
|
50
|
-
const { children, className, ...rest } = props;
|
|
51
|
-
return /*#__PURE__*/ jsxRuntime.jsx("swiper-slide", {
|
|
52
|
-
...rest,
|
|
53
|
-
className: className,
|
|
54
|
-
children: children
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
exports.Swiper = Swiper;
|
|
59
|
-
exports.SwiperSlide = SwiperSlide;
|
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var core = require('@gem-sdk/core');
|
|
5
|
-
var useTrackPreviewPause = require('./useTrackPreviewPause.js');
|
|
6
|
-
|
|
7
|
-
const useCarouselWithSwiper = (props, ref, swiperInstance)=>{
|
|
8
|
-
const { builderProps, moveToIdx, styles, setting, isHiddenArrowWhenDisabled = true, elmRef, onClickArrow, onHandleChangeSlideByInteraction } = props;
|
|
9
|
-
const { loop, navigationEnable = {
|
|
10
|
-
desktop: true
|
|
11
|
-
}, navigationStyle } = setting ?? {};
|
|
12
|
-
const [totalSlideItem, setTotalSlideItem] = React.useState(0);
|
|
13
|
-
const [currentSlide, setCurrentSlide] = React.useState(setting?.defaultCurrentSlider ?? 0);
|
|
14
|
-
const isInfinity = React.useMemo(()=>{
|
|
15
|
-
return core.getResponsiveValueByScreen(loop, 'desktop', false);
|
|
16
|
-
}, [
|
|
17
|
-
loop
|
|
18
|
-
]);
|
|
19
|
-
const { isFirstPreviewClicked } = useTrackPreviewPause.default(setting?.runPreview);
|
|
20
|
-
// const { sliderSelector } = getData(props);
|
|
21
|
-
const localRef = React.useRef();
|
|
22
|
-
// const isRunningAnimation = useRef(false);
|
|
23
|
-
const previousIndex = React.useRef(moveToIdx ?? 0);
|
|
24
|
-
const isRenderDots = React.useMemo(()=>!!totalSlideItem && swiperInstance && core.getResponsiveValueByScreen(setting?.dot), [
|
|
25
|
-
swiperInstance,
|
|
26
|
-
setting?.dot,
|
|
27
|
-
totalSlideItem
|
|
28
|
-
]);
|
|
29
|
-
let delayTimeout;
|
|
30
|
-
const currentDevice = core.useCurrentDevice();
|
|
31
|
-
const mode = core.useEditorMode();
|
|
32
|
-
const { onListener, saveToElementInteractionData, getInteractionPreviousData, trigger } = core.useInteraction();
|
|
33
|
-
const getItemNumberFromOldData = React.useCallback(()=>{
|
|
34
|
-
if (!setting?.slidesToShow) return null;
|
|
35
|
-
const result = {};
|
|
36
|
-
core.DEVICES.forEach((device)=>{
|
|
37
|
-
const value = core.getResponsiveValueByScreen(setting?.slidesToShow, device);
|
|
38
|
-
result[device] = value ? value === 'auto' ? 4 : Math.floor(value) : 0;
|
|
39
|
-
});
|
|
40
|
-
return result;
|
|
41
|
-
}, [
|
|
42
|
-
setting?.slidesToShow
|
|
43
|
-
]);
|
|
44
|
-
const getSlideToShowFromOldData = React.useCallback(()=>{
|
|
45
|
-
if (!setting?.slidesToShow) return null;
|
|
46
|
-
const result = {};
|
|
47
|
-
core.DEVICES.forEach((device)=>{
|
|
48
|
-
const value = core.getResponsiveValueByScreen(setting?.slidesToShow, device);
|
|
49
|
-
result[device] = value ? value === 'auto' ? 4 : value : 0;
|
|
50
|
-
});
|
|
51
|
-
return result;
|
|
52
|
-
}, [
|
|
53
|
-
setting?.slidesToShow
|
|
54
|
-
]);
|
|
55
|
-
const showNavigation = React.useMemo(()=>{
|
|
56
|
-
const navigationEnableByDevice = core.getResponsiveValueByScreen(navigationEnable, currentDevice);
|
|
57
|
-
const navigationStyleByDevice = core.getResponsiveValueByScreen(navigationStyle, currentDevice);
|
|
58
|
-
return swiperInstance && navigationEnableByDevice && navigationStyleByDevice !== 'none';
|
|
59
|
-
}, [
|
|
60
|
-
swiperInstance,
|
|
61
|
-
navigationEnable,
|
|
62
|
-
navigationStyle,
|
|
63
|
-
currentDevice
|
|
64
|
-
]);
|
|
65
|
-
const slidesToShow = React.useMemo(()=>{
|
|
66
|
-
const oldData = getSlideToShowFromOldData();
|
|
67
|
-
if (oldData) {
|
|
68
|
-
return oldData;
|
|
69
|
-
}
|
|
70
|
-
const result = {};
|
|
71
|
-
core.DEVICES.forEach((device)=>{
|
|
72
|
-
const enableSneakPeak = core.getResponsiveValueByScreen(setting?.sneakPeak, device);
|
|
73
|
-
const offset = enableSneakPeak ? core.getResponsiveValueByScreen(setting?.sneakPeakType, device) === 'center' ? core.getResponsiveValueByScreen(setting?.sneakPeakOffsetCenter, device) ?? 0 : core.getResponsiveValueByScreen(setting?.sneakPeakOffsetForward, device) ?? 0 : 0;
|
|
74
|
-
const rx = core.getResponsiveValueByScreen(setting?.sneakPeakType, device) === 'center' ? -2 : -1;
|
|
75
|
-
const itemNumberByDevice = core.getResponsiveValueByScreen(setting?.itemNumber, device);
|
|
76
|
-
result[device] = typeof itemNumberByDevice === 'number' ? itemNumberByDevice + offset / 100 * rx : 'auto';
|
|
77
|
-
});
|
|
78
|
-
return result;
|
|
79
|
-
}, [
|
|
80
|
-
getSlideToShowFromOldData,
|
|
81
|
-
setting?.itemNumber,
|
|
82
|
-
setting?.sneakPeak,
|
|
83
|
-
setting?.sneakPeakOffsetCenter,
|
|
84
|
-
setting?.sneakPeakOffsetForward,
|
|
85
|
-
setting?.sneakPeakType
|
|
86
|
-
]);
|
|
87
|
-
const itemNumber = React.useMemo(()=>{
|
|
88
|
-
const oldData = getItemNumberFromOldData();
|
|
89
|
-
return oldData || setting?.itemNumber;
|
|
90
|
-
}, [
|
|
91
|
-
getItemNumberFromOldData,
|
|
92
|
-
setting?.itemNumber
|
|
93
|
-
]);
|
|
94
|
-
const getNumberOfFullWidthShow = React.useCallback((device)=>{
|
|
95
|
-
const sneakPeekTypeByNumber = core.getResponsiveValueByScreen(setting?.sneakPeakType, device) === 'center' ? 2 : 1;
|
|
96
|
-
return typeof core.getResponsiveValueByScreen(itemNumber, device, 4) === 'number' ? core.getResponsiveValueByScreen(itemNumber, device, 4) - sneakPeekTypeByNumber : undefined;
|
|
97
|
-
}, [
|
|
98
|
-
setting?.sneakPeakType,
|
|
99
|
-
itemNumber
|
|
100
|
-
]);
|
|
101
|
-
const getItemsPerPage = ()=>{
|
|
102
|
-
const items = core.getResponsiveValueByScreen(slidesToShow, currentDevice, 1) === 'auto' ? 1 : core.getResponsiveValueByScreen(slidesToShow, currentDevice, 1);
|
|
103
|
-
return items ?? 1;
|
|
104
|
-
};
|
|
105
|
-
const getIndexSlideItemBy = (pageIdx)=>{
|
|
106
|
-
let indexPage = pageIdx * getItemsPerPage();
|
|
107
|
-
if (indexPage >= totalSlideItem - getItemsPerPage()) {
|
|
108
|
-
indexPage = totalSlideItem - getItemsPerPage();
|
|
109
|
-
}
|
|
110
|
-
return indexPage;
|
|
111
|
-
};
|
|
112
|
-
const getAllowTouchMove = (screen)=>{
|
|
113
|
-
const value = mode === 'edit' ? {
|
|
114
|
-
[screen]: false
|
|
115
|
-
} : setting?.enableDrag;
|
|
116
|
-
return core.getResponsiveValueByScreen(value, screen);
|
|
117
|
-
};
|
|
118
|
-
const handleDotClick = (idx, isLoop)=>{
|
|
119
|
-
const index = setting?.sneakPeak?.[currentDevice] ? idx : isLoop ? idx : getIndexSlideItemBy(idx);
|
|
120
|
-
swiperInstance?.slideToLoop(index);
|
|
121
|
-
previousIndex.current = index;
|
|
122
|
-
};
|
|
123
|
-
React.useImperativeHandle(ref, ()=>({
|
|
124
|
-
nextSlideInteraction,
|
|
125
|
-
previousSlideInteraction,
|
|
126
|
-
moveToSlideInteraction
|
|
127
|
-
}));
|
|
128
|
-
const dispatchEventSelectSlide = (index)=>{
|
|
129
|
-
trigger({
|
|
130
|
-
event: 'gp:rollback:select-slide',
|
|
131
|
-
selector: `[data-id="${builderProps?.uid}"]`,
|
|
132
|
-
element: elmRef?.current
|
|
133
|
-
});
|
|
134
|
-
trigger({
|
|
135
|
-
event: 'gp:select-slide',
|
|
136
|
-
selector: `[data-id="${builderProps?.uid}"]`,
|
|
137
|
-
data: index,
|
|
138
|
-
element: elmRef?.current
|
|
139
|
-
});
|
|
140
|
-
};
|
|
141
|
-
const moveToIdxInteraction = (idx)=>{
|
|
142
|
-
swiperInstance?.slideTo(idx);
|
|
143
|
-
onHandleChangeSlideByInteraction && onHandleChangeSlideByInteraction(idx);
|
|
144
|
-
};
|
|
145
|
-
const handleDirectionalSlide = (params, direction)=>{
|
|
146
|
-
const { key, data, isRollback, element } = params;
|
|
147
|
-
const currentIndex = Math.max(swiperInstance?.activeIndex ?? 0, 0);
|
|
148
|
-
if (isRollback && data === undefined) {
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
if (isRollback) {
|
|
152
|
-
if (direction === 'specific') {
|
|
153
|
-
const { previousData } = getInteractionPreviousData(element, key);
|
|
154
|
-
moveToIdxInteraction(Number(previousData));
|
|
155
|
-
} else {
|
|
156
|
-
// For next/previous, move in opposite direction during rollback
|
|
157
|
-
const newIndex = direction === 'next' ? currentIndex - 1 : currentIndex + 1;
|
|
158
|
-
moveToIdxInteraction(newIndex);
|
|
159
|
-
}
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
// Save current state and move to new position
|
|
163
|
-
const indexToSave = direction === 'specific' ? Math.max(previousIndex.current, 0) : currentIndex;
|
|
164
|
-
saveToElementInteractionData(element, key, indexToSave.toString());
|
|
165
|
-
const targetIndex = direction === 'specific' ? Number(data) : direction === 'next' ? currentIndex + 1 : currentIndex - 1;
|
|
166
|
-
moveToIdxInteraction(targetIndex);
|
|
167
|
-
};
|
|
168
|
-
const nextSlideInteraction = (params)=>{
|
|
169
|
-
handleDirectionalSlide(params, 'next');
|
|
170
|
-
};
|
|
171
|
-
const previousSlideInteraction = (params)=>{
|
|
172
|
-
handleDirectionalSlide(params, 'previous');
|
|
173
|
-
};
|
|
174
|
-
const moveToSlideInteraction = (params)=>{
|
|
175
|
-
handleDirectionalSlide(params, 'specific');
|
|
176
|
-
};
|
|
177
|
-
const slidesPerView = getItemsPerPage();
|
|
178
|
-
const sliderSettings = React.useMemo(()=>{
|
|
179
|
-
return {
|
|
180
|
-
speed: styles?.playSpeed === 0 ? 1 : styles?.playSpeed ?? 500,
|
|
181
|
-
dir: setting?.rtl ? 'rtl' : 'ltr',
|
|
182
|
-
slidesPerView,
|
|
183
|
-
spaceBetween: core.getResponsiveValueByScreen(styles?.spacing, currentDevice),
|
|
184
|
-
loop: core.getResponsiveValueByScreen(loop, currentDevice, false),
|
|
185
|
-
breakpoints: {
|
|
186
|
-
0: {
|
|
187
|
-
allowTouchMove: getAllowTouchMove('mobile'),
|
|
188
|
-
centeredSlides: core.getResponsiveValueByScreen(setting?.sneakPeakType, 'mobile') === 'center'
|
|
189
|
-
},
|
|
190
|
-
768: {
|
|
191
|
-
allowTouchMove: getAllowTouchMove('tablet'),
|
|
192
|
-
centeredSlides: core.getResponsiveValueByScreen(setting?.sneakPeakType, 'tablet') === 'center'
|
|
193
|
-
},
|
|
194
|
-
1025: {
|
|
195
|
-
allowTouchMove: getAllowTouchMove('desktop'),
|
|
196
|
-
centeredSlides: core.getResponsiveValueByScreen(setting?.sneakPeakType, 'desktop') === 'center'
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
autoplay: {
|
|
200
|
-
delay: (setting?.autoplayTimeout ?? 1) * 1000,
|
|
201
|
-
pauseOnMouseEnter: setting?.pauseOnHover
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
}, [
|
|
205
|
-
styles?.playSpeed,
|
|
206
|
-
setting?.rtl,
|
|
207
|
-
styles?.spacing,
|
|
208
|
-
currentDevice,
|
|
209
|
-
loop,
|
|
210
|
-
slidesPerView,
|
|
211
|
-
setting?.sneakPeakType,
|
|
212
|
-
setting?.pauseOnHover,
|
|
213
|
-
setting?.autoplayTimeout
|
|
214
|
-
]);
|
|
215
|
-
React.useEffect(()=>{
|
|
216
|
-
const selector = `[data-id="${builderProps?.uid}"]`;
|
|
217
|
-
onListener({
|
|
218
|
-
event: 'gp:change-next-slide',
|
|
219
|
-
selector,
|
|
220
|
-
elementRef: localRef
|
|
221
|
-
}, (params)=>{
|
|
222
|
-
const { data, isRollback, uniqueStorageKey } = params || {};
|
|
223
|
-
nextSlideInteraction({
|
|
224
|
-
element: localRef.current,
|
|
225
|
-
data,
|
|
226
|
-
isRollback,
|
|
227
|
-
key: uniqueStorageKey
|
|
228
|
-
});
|
|
229
|
-
});
|
|
230
|
-
onListener({
|
|
231
|
-
event: 'gp:change-previous-slide',
|
|
232
|
-
selector,
|
|
233
|
-
elementRef: localRef
|
|
234
|
-
}, (params)=>{
|
|
235
|
-
const { data, isRollback, uniqueStorageKey } = params || {};
|
|
236
|
-
previousSlideInteraction({
|
|
237
|
-
element: localRef.current,
|
|
238
|
-
data,
|
|
239
|
-
isRollback,
|
|
240
|
-
key: uniqueStorageKey
|
|
241
|
-
});
|
|
242
|
-
});
|
|
243
|
-
onListener({
|
|
244
|
-
event: 'gp:change-image-step',
|
|
245
|
-
selector,
|
|
246
|
-
elementRef: localRef
|
|
247
|
-
}, (params)=>{
|
|
248
|
-
const { data, isRollback, uniqueStorageKey } = params || {};
|
|
249
|
-
moveToSlideInteraction({
|
|
250
|
-
element: localRef.current,
|
|
251
|
-
data,
|
|
252
|
-
isRollback,
|
|
253
|
-
key: uniqueStorageKey
|
|
254
|
-
});
|
|
255
|
-
});
|
|
256
|
-
onListener({
|
|
257
|
-
event: 'gp:change-index-slide',
|
|
258
|
-
selector
|
|
259
|
-
}, (params)=>{
|
|
260
|
-
const element = document.querySelector(selector);
|
|
261
|
-
const { data, isRollback, uniqueStorageKey } = params || {};
|
|
262
|
-
moveToSlideInteraction({
|
|
263
|
-
element,
|
|
264
|
-
data,
|
|
265
|
-
isRollback,
|
|
266
|
-
key: uniqueStorageKey
|
|
267
|
-
});
|
|
268
|
-
});
|
|
269
|
-
}, []);
|
|
270
|
-
const handleNextAndPrevSlide = (action)=>{
|
|
271
|
-
action === 'next' ? swiperInstance?.slideNext() : swiperInstance?.slidePrev();
|
|
272
|
-
if (onClickArrow) {
|
|
273
|
-
delayTimeout && clearTimeout(delayTimeout);
|
|
274
|
-
delayTimeout = setTimeout(()=>onClickArrow && onClickArrow(), 500);
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
React.useEffect(()=>{
|
|
278
|
-
if (typeof moveToIdx == 'number') {
|
|
279
|
-
previousIndex.current = moveToIdx;
|
|
280
|
-
swiperInstance?.slideTo(moveToIdx);
|
|
281
|
-
}
|
|
282
|
-
}, [
|
|
283
|
-
swiperInstance,
|
|
284
|
-
moveToIdx,
|
|
285
|
-
isHiddenArrowWhenDisabled
|
|
286
|
-
]);
|
|
287
|
-
React.useEffect(()=>{
|
|
288
|
-
if (!swiperInstance) return;
|
|
289
|
-
const updateState = ()=>{
|
|
290
|
-
const { realIndex, slides } = swiperInstance;
|
|
291
|
-
setCurrentSlide(realIndex);
|
|
292
|
-
setTotalSlideItem(slides?.length);
|
|
293
|
-
};
|
|
294
|
-
updateState();
|
|
295
|
-
swiperInstance.on('slideChange', updateState);
|
|
296
|
-
return ()=>{
|
|
297
|
-
swiperInstance?.off('slideChange', updateState);
|
|
298
|
-
};
|
|
299
|
-
}, [
|
|
300
|
-
swiperInstance
|
|
301
|
-
]);
|
|
302
|
-
React.useEffect(()=>{
|
|
303
|
-
if (swiperInstance?.wrapperEl) {
|
|
304
|
-
swiperInstance.wrapperEl.style.transitionTimingFunction = setting?.animationMode ?? 'ease';
|
|
305
|
-
}
|
|
306
|
-
}, [
|
|
307
|
-
swiperInstance,
|
|
308
|
-
setting?.animationMode
|
|
309
|
-
]);
|
|
310
|
-
React.useEffect(()=>{
|
|
311
|
-
if (!swiperInstance) return;
|
|
312
|
-
if (swiperInstance.autoplay) {
|
|
313
|
-
const shouldRunAutoplay = mode === 'edit' ? isFirstPreviewClicked ? setting?.runPreview && setting?.autoplay : false : setting?.autoplay;
|
|
314
|
-
if (shouldRunAutoplay) {
|
|
315
|
-
swiperInstance.autoplay.start();
|
|
316
|
-
} else {
|
|
317
|
-
swiperInstance.autoplay.stop();
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
}, [
|
|
321
|
-
swiperInstance,
|
|
322
|
-
setting?.autoplay,
|
|
323
|
-
mode,
|
|
324
|
-
isFirstPreviewClicked,
|
|
325
|
-
setting?.runPreview
|
|
326
|
-
]);
|
|
327
|
-
return {
|
|
328
|
-
isInfinity,
|
|
329
|
-
sliderSettings,
|
|
330
|
-
totalSlideItem,
|
|
331
|
-
currentSlide,
|
|
332
|
-
localRef,
|
|
333
|
-
isRenderDots,
|
|
334
|
-
showNavigation,
|
|
335
|
-
handleDotClick,
|
|
336
|
-
getItemsPerPage,
|
|
337
|
-
handleNextAndPrevSlide,
|
|
338
|
-
dispatchEventSelectSlide,
|
|
339
|
-
getNumberOfFullWidthShow
|
|
340
|
-
};
|
|
341
|
-
};
|
|
342
|
-
|
|
343
|
-
exports.useCarouselWithSwiper = useCarouselWithSwiper;
|