@enadhq/enad-react-sdk 1.0.0 → 1.0.2
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/README.md +288 -0
- package/dist/client/cart/adapters/brink.d.ts +29 -0
- package/dist/client/cart/adapters/brink.d.ts.map +1 -0
- package/dist/client/cart/adapters/brink.mjs +154 -0
- package/dist/client/cart/adapters/brink.mjs.map +1 -0
- package/dist/client/cart/adapters/index.d.ts +3 -0
- package/dist/client/cart/adapters/index.d.ts.map +1 -0
- package/dist/client/cart/adapters/index.mjs +5 -0
- package/dist/client/cart/adapters/index.mjs.map +1 -0
- package/dist/client/cart/adapters/mock.d.ts +20 -0
- package/dist/client/cart/adapters/mock.d.ts.map +1 -0
- package/dist/client/cart/adapters/mock.mjs +76 -0
- package/dist/client/cart/adapters/mock.mjs.map +1 -0
- package/dist/client/cart/components/cart-drawer.d.ts +17 -0
- package/dist/client/cart/components/cart-drawer.d.ts.map +1 -0
- package/dist/client/cart/components/cart-drawer.mjs +311 -0
- package/dist/client/cart/components/cart-drawer.mjs.map +1 -0
- package/dist/client/cart/components/cart-trigger.d.ts +10 -0
- package/dist/client/cart/components/cart-trigger.d.ts.map +1 -0
- package/dist/client/cart/components/cart-trigger.mjs +34 -0
- package/dist/client/cart/components/cart-trigger.mjs.map +1 -0
- package/dist/client/cart/components/promo-code-input.d.ts +16 -0
- package/dist/client/cart/components/promo-code-input.d.ts.map +1 -0
- package/dist/client/cart/components/promo-code-input.mjs +92 -0
- package/dist/client/cart/components/promo-code-input.mjs.map +1 -0
- package/dist/client/cart/constants/session.d.ts +2 -0
- package/dist/client/cart/constants/session.d.ts.map +1 -0
- package/dist/client/cart/constants/session.mjs +5 -0
- package/dist/client/cart/constants/session.mjs.map +1 -0
- package/dist/client/cart/contexts/cart.d.ts +36 -0
- package/dist/client/cart/contexts/cart.d.ts.map +1 -0
- package/dist/client/cart/contexts/cart.mjs +20 -0
- package/dist/client/cart/contexts/cart.mjs.map +1 -0
- package/dist/client/cart/hooks/useCart.d.ts +26 -0
- package/dist/client/cart/hooks/useCart.d.ts.map +1 -0
- package/dist/client/cart/hooks/useCart.mjs +25 -0
- package/dist/client/cart/hooks/useCart.mjs.map +1 -0
- package/dist/client/cart/hooks/useCartActions.d.ts +25 -0
- package/dist/client/cart/hooks/useCartActions.d.ts.map +1 -0
- package/dist/client/cart/hooks/useCartActions.mjs +49 -0
- package/dist/client/cart/hooks/useCartActions.mjs.map +1 -0
- package/dist/client/cart/index.d.ts +12 -0
- package/dist/client/cart/index.d.ts.map +1 -0
- package/dist/client/cart/index.mjs +16 -0
- package/dist/client/cart/index.mjs.map +1 -0
- package/dist/client/cart/queries/addToCartQueryFn.d.ts +7 -0
- package/dist/client/cart/queries/addToCartQueryFn.d.ts.map +1 -0
- package/dist/client/cart/queries/addToCartQueryFn.mjs +27 -0
- package/dist/client/cart/queries/addToCartQueryFn.mjs.map +1 -0
- package/dist/client/cart/queries/getCartQueryFn.d.ts +4 -0
- package/dist/client/cart/queries/getCartQueryFn.d.ts.map +1 -0
- package/dist/client/cart/queries/getCartQueryFn.mjs +34 -0
- package/dist/client/cart/queries/getCartQueryFn.mjs.map +1 -0
- package/dist/client/cart/queries/removeCartItemQueryFn.d.ts +6 -0
- package/dist/client/cart/queries/removeCartItemQueryFn.d.ts.map +1 -0
- package/dist/client/cart/queries/removeCartItemQueryFn.mjs +24 -0
- package/dist/client/cart/queries/removeCartItemQueryFn.mjs.map +1 -0
- package/dist/client/cart/queries/updateCartItemQueryFn.d.ts +7 -0
- package/dist/client/cart/queries/updateCartItemQueryFn.d.ts.map +1 -0
- package/dist/client/cart/queries/updateCartItemQueryFn.mjs +27 -0
- package/dist/client/cart/queries/updateCartItemQueryFn.mjs.map +1 -0
- package/dist/client/cart/types/adapter.d.ts +110 -0
- package/dist/client/cart/types/adapter.d.ts.map +1 -0
- package/dist/client/cart/types/adapter.mjs +12 -0
- package/dist/client/cart/types/adapter.mjs.map +1 -0
- package/dist/client/cart/types/cart.d.ts +52 -0
- package/dist/client/cart/types/cart.d.ts.map +1 -0
- package/dist/client/cart/types/cart.mjs +1 -0
- package/dist/client/cart/types/cart.mjs.map +1 -0
- package/dist/client/cart/utils/session.d.ts +5 -0
- package/dist/client/cart/utils/session.d.ts.map +1 -0
- package/dist/client/cart/utils/session.mjs +21 -0
- package/dist/client/cart/utils/session.mjs.map +1 -0
- package/dist/client/cms/storyblok/preview/registerStoryblokBridge.d.ts +7 -0
- package/dist/client/cms/storyblok/preview/registerStoryblokBridge.d.ts.map +1 -0
- package/dist/client/cms/storyblok/preview/registerStoryblokBridge.mjs +25 -0
- package/dist/client/cms/storyblok/preview/registerStoryblokBridge.mjs.map +1 -0
- package/dist/client/cms/storyblok/preview/storyblok-preview-syncer.d.ts +20 -0
- package/dist/client/cms/storyblok/preview/storyblok-preview-syncer.d.ts.map +1 -0
- package/dist/client/cms/storyblok/preview/storyblok-preview-syncer.mjs +79 -0
- package/dist/client/cms/storyblok/preview/storyblok-preview-syncer.mjs.map +1 -0
- package/dist/client/global/auth/withAuth.d.ts +5 -0
- package/dist/client/global/auth/withAuth.d.ts.map +1 -0
- package/dist/client/global/auth/withAuth.mjs +25 -0
- package/dist/client/global/auth/withAuth.mjs.map +1 -0
- package/dist/client/global/components/error-boundary.d.ts +18 -0
- package/dist/client/global/components/error-boundary.d.ts.map +1 -0
- package/dist/client/global/components/error-boundary.mjs +41 -0
- package/dist/client/global/components/error-boundary.mjs.map +1 -0
- package/dist/client/global/config/index.d.ts +17 -0
- package/dist/client/global/config/index.d.ts.map +1 -0
- package/dist/client/global/config/index.mjs +34 -0
- package/dist/client/global/config/index.mjs.map +1 -0
- package/dist/client/global/constants/tags.d.ts +15 -0
- package/dist/client/global/constants/tags.d.ts.map +1 -0
- package/dist/client/global/constants/tags.mjs +18 -0
- package/dist/client/global/constants/tags.mjs.map +1 -0
- package/dist/client/global/index.d.ts +6 -0
- package/dist/client/global/index.d.ts.map +1 -0
- package/dist/client/global/index.mjs +7 -0
- package/dist/client/global/index.mjs.map +1 -0
- package/dist/client/global/providers/enad-provider.d.ts +48 -0
- package/dist/client/global/providers/enad-provider.d.ts.map +1 -0
- package/dist/client/global/providers/enad-provider.mjs +40 -0
- package/dist/client/global/providers/enad-provider.mjs.map +1 -0
- package/dist/client/icons/adapters/hugeicons.d.ts +9 -0
- package/dist/client/icons/adapters/hugeicons.d.ts.map +1 -0
- package/dist/client/icons/adapters/hugeicons.mjs +117 -0
- package/dist/client/icons/adapters/hugeicons.mjs.map +1 -0
- package/dist/client/icons/adapters/lucide.d.ts +8 -0
- package/dist/client/icons/adapters/lucide.d.ts.map +1 -0
- package/dist/client/icons/adapters/lucide.mjs +108 -0
- package/dist/client/icons/adapters/lucide.mjs.map +1 -0
- package/dist/client/icons/adapters/phosphor.d.ts +11 -0
- package/dist/client/icons/adapters/phosphor.d.ts.map +1 -0
- package/dist/client/icons/adapters/phosphor.mjs +108 -0
- package/dist/client/icons/adapters/phosphor.mjs.map +1 -0
- package/dist/client/icons/icon-context.d.ts +13 -0
- package/dist/client/icons/icon-context.d.ts.map +1 -0
- package/dist/client/icons/icon-context.mjs +27 -0
- package/dist/client/icons/icon-context.mjs.map +1 -0
- package/dist/client/icons/index.d.ts +9 -0
- package/dist/client/icons/index.d.ts.map +1 -0
- package/dist/client/icons/index.mjs +16 -0
- package/dist/client/icons/index.mjs.map +1 -0
- package/dist/client/icons/types.d.ts +60 -0
- package/dist/client/icons/types.d.ts.map +1 -0
- package/dist/client/icons/types.mjs +1 -0
- package/dist/client/icons/types.mjs.map +1 -0
- package/dist/client/motion/config.d.ts +42 -0
- package/dist/client/motion/config.d.ts.map +1 -0
- package/dist/client/motion/config.mjs +44 -0
- package/dist/client/motion/config.mjs.map +1 -0
- package/dist/client/motion/hover.d.ts +36 -0
- package/dist/client/motion/hover.d.ts.map +1 -0
- package/dist/client/motion/hover.mjs +19 -0
- package/dist/client/motion/hover.mjs.map +1 -0
- package/dist/client/motion/index.d.ts +4 -0
- package/dist/client/motion/index.d.ts.map +1 -0
- package/dist/client/motion/index.mjs +13 -0
- package/dist/client/motion/index.mjs.map +1 -0
- package/dist/client/motion/stagger.d.ts +36 -0
- package/dist/client/motion/stagger.d.ts.map +1 -0
- package/dist/client/motion/stagger.mjs +17 -0
- package/dist/client/motion/stagger.mjs.map +1 -0
- package/dist/client/search/actions/searchAction.d.ts +2 -0
- package/dist/client/search/actions/searchAction.d.ts.map +1 -0
- package/dist/client/search/actions/searchAction.mjs +18 -0
- package/dist/client/search/actions/searchAction.mjs.map +1 -0
- package/dist/client/search/components/search-bar.d.ts +8 -0
- package/dist/client/search/components/search-bar.d.ts.map +1 -0
- package/dist/client/search/components/search-bar.mjs +34 -0
- package/dist/client/search/components/search-bar.mjs.map +1 -0
- package/dist/client/search/hooks/useSearch.d.ts +14 -0
- package/dist/client/search/hooks/useSearch.d.ts.map +1 -0
- package/dist/client/search/hooks/useSearch.mjs +37 -0
- package/dist/client/search/hooks/useSearch.mjs.map +1 -0
- package/dist/client/search/index.d.ts +2 -0
- package/dist/client/search/index.d.ts.map +1 -0
- package/dist/client/search/index.mjs +5 -0
- package/dist/client/search/index.mjs.map +1 -0
- package/dist/client/storefront/blocks/accordion-block.d.ts +4 -0
- package/dist/client/storefront/blocks/accordion-block.d.ts.map +1 -0
- package/dist/client/storefront/blocks/accordion-block.mjs +43 -0
- package/dist/client/storefront/blocks/accordion-block.mjs.map +1 -0
- package/dist/client/storefront/blocks/card-image-with-caption.d.ts +4 -0
- package/dist/client/storefront/blocks/card-image-with-caption.d.ts.map +1 -0
- package/dist/client/storefront/blocks/card-image-with-caption.mjs +27 -0
- package/dist/client/storefront/blocks/card-image-with-caption.mjs.map +1 -0
- package/dist/client/storefront/blocks/card-video.d.ts +4 -0
- package/dist/client/storefront/blocks/card-video.d.ts.map +1 -0
- package/dist/client/storefront/blocks/card-video.mjs +43 -0
- package/dist/client/storefront/blocks/card-video.mjs.map +1 -0
- package/dist/client/storefront/blocks/content-with-gallery.d.ts +4 -0
- package/dist/client/storefront/blocks/content-with-gallery.d.ts.map +1 -0
- package/dist/client/storefront/blocks/content-with-gallery.mjs +48 -0
- package/dist/client/storefront/blocks/content-with-gallery.mjs.map +1 -0
- package/dist/client/storefront/blocks/content-with-image-product-data.d.ts +4 -0
- package/dist/client/storefront/blocks/content-with-image-product-data.d.ts.map +1 -0
- package/dist/client/storefront/blocks/content-with-image-product-data.mjs +45 -0
- package/dist/client/storefront/blocks/content-with-image-product-data.mjs.map +1 -0
- package/dist/client/storefront/blocks/gallery-with-caption.d.ts +4 -0
- package/dist/client/storefront/blocks/gallery-with-caption.d.ts.map +1 -0
- package/dist/client/storefront/blocks/gallery-with-caption.mjs +36 -0
- package/dist/client/storefront/blocks/gallery-with-caption.mjs.map +1 -0
- package/dist/client/storefront/blocks/gallery-with-link-blocks.d.ts +4 -0
- package/dist/client/storefront/blocks/gallery-with-link-blocks.d.ts.map +1 -0
- package/dist/client/storefront/blocks/gallery-with-link-blocks.mjs +24 -0
- package/dist/client/storefront/blocks/gallery-with-link-blocks.mjs.map +1 -0
- package/dist/client/storefront/blocks/gallery.d.ts +4 -0
- package/dist/client/storefront/blocks/gallery.d.ts.map +1 -0
- package/dist/client/storefront/blocks/gallery.mjs +47 -0
- package/dist/client/storefront/blocks/gallery.mjs.map +1 -0
- package/dist/client/storefront/blocks/hero.d.ts +4 -0
- package/dist/client/storefront/blocks/hero.d.ts.map +1 -0
- package/dist/client/storefront/blocks/hero.mjs +357 -0
- package/dist/client/storefront/blocks/hero.mjs.map +1 -0
- package/dist/client/storefront/blocks/image-block.d.ts +4 -0
- package/dist/client/storefront/blocks/image-block.d.ts.map +1 -0
- package/dist/client/storefront/blocks/image-block.mjs +29 -0
- package/dist/client/storefront/blocks/image-block.mjs.map +1 -0
- package/dist/client/storefront/blocks/index.d.ts +20 -0
- package/dist/client/storefront/blocks/index.d.ts.map +1 -0
- package/dist/client/storefront/blocks/index.mjs +41 -0
- package/dist/client/storefront/blocks/index.mjs.map +1 -0
- package/dist/client/storefront/blocks/link-block-small.d.ts +4 -0
- package/dist/client/storefront/blocks/link-block-small.d.ts.map +1 -0
- package/dist/client/storefront/blocks/link-block-small.mjs +35 -0
- package/dist/client/storefront/blocks/link-block-small.mjs.map +1 -0
- package/dist/client/storefront/blocks/link-block.d.ts +4 -0
- package/dist/client/storefront/blocks/link-block.d.ts.map +1 -0
- package/dist/client/storefront/blocks/link-block.mjs +150 -0
- package/dist/client/storefront/blocks/link-block.mjs.map +1 -0
- package/dist/client/storefront/blocks/product-card.d.ts +4 -0
- package/dist/client/storefront/blocks/product-card.d.ts.map +1 -0
- package/dist/client/storefront/blocks/product-card.mjs +228 -0
- package/dist/client/storefront/blocks/product-card.mjs.map +1 -0
- package/dist/client/storefront/blocks/product-image.d.ts +4 -0
- package/dist/client/storefront/blocks/product-image.d.ts.map +1 -0
- package/dist/client/storefront/blocks/product-image.mjs +109 -0
- package/dist/client/storefront/blocks/product-image.mjs.map +1 -0
- package/dist/client/storefront/blocks/spacer.d.ts +4 -0
- package/dist/client/storefront/blocks/spacer.d.ts.map +1 -0
- package/dist/client/storefront/blocks/spacer.mjs +14 -0
- package/dist/client/storefront/blocks/spacer.mjs.map +1 -0
- package/dist/client/storefront/blocks/text-content-with-image.d.ts +4 -0
- package/dist/client/storefront/blocks/text-content-with-image.d.ts.map +1 -0
- package/dist/client/storefront/blocks/text-content-with-image.mjs +225 -0
- package/dist/client/storefront/blocks/text-content-with-image.mjs.map +1 -0
- package/dist/client/storefront/blocks/text-content.d.ts +4 -0
- package/dist/client/storefront/blocks/text-content.d.ts.map +1 -0
- package/dist/client/storefront/blocks/text-content.mjs +150 -0
- package/dist/client/storefront/blocks/text-content.mjs.map +1 -0
- package/dist/client/storefront/blocks/truncated-text.d.ts +4 -0
- package/dist/client/storefront/blocks/truncated-text.d.ts.map +1 -0
- package/dist/client/storefront/blocks/truncated-text.mjs +36 -0
- package/dist/client/storefront/blocks/truncated-text.mjs.map +1 -0
- package/dist/client/storefront/blocks/variable-text-content.d.ts +4 -0
- package/dist/client/storefront/blocks/variable-text-content.d.ts.map +1 -0
- package/dist/client/storefront/blocks/variable-text-content.mjs +15 -0
- package/dist/client/storefront/blocks/variable-text-content.mjs.map +1 -0
- package/dist/client/storefront/carousel/index.d.ts +2 -0
- package/dist/client/storefront/carousel/index.d.ts.map +1 -0
- package/dist/client/storefront/carousel/index.mjs +5 -0
- package/dist/client/storefront/carousel/index.mjs.map +1 -0
- package/dist/client/storefront/carousel/swipeable-carousel.d.ts +14 -0
- package/dist/client/storefront/carousel/swipeable-carousel.d.ts.map +1 -0
- package/dist/client/storefront/carousel/swipeable-carousel.mjs +80 -0
- package/dist/client/storefront/carousel/swipeable-carousel.mjs.map +1 -0
- package/dist/client/storefront/checkout/address-form.d.ts +31 -0
- package/dist/client/storefront/checkout/address-form.d.ts.map +1 -0
- package/dist/client/storefront/checkout/address-form.mjs +124 -0
- package/dist/client/storefront/checkout/address-form.mjs.map +1 -0
- package/dist/client/storefront/checkout/cart-summary.d.ts +40 -0
- package/dist/client/storefront/checkout/cart-summary.d.ts.map +1 -0
- package/dist/client/storefront/checkout/cart-summary.mjs +150 -0
- package/dist/client/storefront/checkout/cart-summary.mjs.map +1 -0
- package/dist/client/storefront/checkout/checkout-stepper.d.ts +13 -0
- package/dist/client/storefront/checkout/checkout-stepper.d.ts.map +1 -0
- package/dist/client/storefront/checkout/checkout-stepper.mjs +58 -0
- package/dist/client/storefront/checkout/checkout-stepper.mjs.map +1 -0
- package/dist/client/storefront/checkout/index.d.ts +15 -0
- package/dist/client/storefront/checkout/index.d.ts.map +1 -0
- package/dist/client/storefront/checkout/index.mjs +17 -0
- package/dist/client/storefront/checkout/index.mjs.map +1 -0
- package/dist/client/storefront/checkout/order-confirmation.d.ts +10 -0
- package/dist/client/storefront/checkout/order-confirmation.d.ts.map +1 -0
- package/dist/client/storefront/checkout/order-confirmation.mjs +27 -0
- package/dist/client/storefront/checkout/order-confirmation.mjs.map +1 -0
- package/dist/client/storefront/checkout/order-summary.d.ts +29 -0
- package/dist/client/storefront/checkout/order-summary.d.ts.map +1 -0
- package/dist/client/storefront/checkout/order-summary.mjs +106 -0
- package/dist/client/storefront/checkout/order-summary.mjs.map +1 -0
- package/dist/client/storefront/checkout/payment-method-selector.d.ts +18 -0
- package/dist/client/storefront/checkout/payment-method-selector.d.ts.map +1 -0
- package/dist/client/storefront/checkout/payment-method-selector.mjs +61 -0
- package/dist/client/storefront/checkout/payment-method-selector.mjs.map +1 -0
- package/dist/client/storefront/checkout/shipping-method-selector.d.ts +23 -0
- package/dist/client/storefront/checkout/shipping-method-selector.d.ts.map +1 -0
- package/dist/client/storefront/checkout/shipping-method-selector.mjs +77 -0
- package/dist/client/storefront/checkout/shipping-method-selector.mjs.map +1 -0
- package/dist/client/storefront/components/badge.d.ts +8 -0
- package/dist/client/storefront/components/badge.d.ts.map +1 -0
- package/dist/client/storefront/components/badge.mjs +28 -0
- package/dist/client/storefront/components/badge.mjs.map +1 -0
- package/dist/client/storefront/components/country-redirect.d.ts +30 -0
- package/dist/client/storefront/components/country-redirect.d.ts.map +1 -0
- package/dist/client/storefront/components/country-redirect.mjs +121 -0
- package/dist/client/storefront/components/country-redirect.mjs.map +1 -0
- package/dist/client/storefront/components/empty-state.d.ts +38 -0
- package/dist/client/storefront/components/empty-state.d.ts.map +1 -0
- package/dist/client/storefront/components/empty-state.mjs +55 -0
- package/dist/client/storefront/components/empty-state.mjs.map +1 -0
- package/dist/client/storefront/components/image-lightbox.d.ts +13 -0
- package/dist/client/storefront/components/image-lightbox.d.ts.map +1 -0
- package/dist/client/storefront/components/image-lightbox.mjs +275 -0
- package/dist/client/storefront/components/image-lightbox.mjs.map +1 -0
- package/dist/client/storefront/components/infinite-scroll.d.ts +37 -0
- package/dist/client/storefront/components/infinite-scroll.d.ts.map +1 -0
- package/dist/client/storefront/components/infinite-scroll.mjs +83 -0
- package/dist/client/storefront/components/infinite-scroll.mjs.map +1 -0
- package/dist/client/storefront/components/language-selector.d.ts +5 -0
- package/dist/client/storefront/components/language-selector.d.ts.map +1 -0
- package/dist/client/storefront/components/language-selector.mjs +58 -0
- package/dist/client/storefront/components/language-selector.mjs.map +1 -0
- package/dist/client/storefront/components/newsletter-signup.d.ts +14 -0
- package/dist/client/storefront/components/newsletter-signup.d.ts.map +1 -0
- package/dist/client/storefront/components/newsletter-signup.mjs +81 -0
- package/dist/client/storefront/components/newsletter-signup.mjs.map +1 -0
- package/dist/client/storefront/components/price.d.ts +14 -0
- package/dist/client/storefront/components/price.d.ts.map +1 -0
- package/dist/client/storefront/components/price.mjs +46 -0
- package/dist/client/storefront/components/price.mjs.map +1 -0
- package/dist/client/storefront/components/product-recommendations.d.ts +18 -0
- package/dist/client/storefront/components/product-recommendations.d.ts.map +1 -0
- package/dist/client/storefront/components/product-recommendations.mjs +108 -0
- package/dist/client/storefront/components/product-recommendations.mjs.map +1 -0
- package/dist/client/storefront/components/product-tabs.d.ts +12 -0
- package/dist/client/storefront/components/product-tabs.d.ts.map +1 -0
- package/dist/client/storefront/components/product-tabs.mjs +64 -0
- package/dist/client/storefront/components/product-tabs.mjs.map +1 -0
- package/dist/client/storefront/components/quick-view.d.ts +25 -0
- package/dist/client/storefront/components/quick-view.d.ts.map +1 -0
- package/dist/client/storefront/components/quick-view.mjs +149 -0
- package/dist/client/storefront/components/quick-view.mjs.map +1 -0
- package/dist/client/storefront/components/review-summary.d.ts +17 -0
- package/dist/client/storefront/components/review-summary.d.ts.map +1 -0
- package/dist/client/storefront/components/review-summary.mjs +66 -0
- package/dist/client/storefront/components/review-summary.mjs.map +1 -0
- package/dist/client/storefront/components/search-autocomplete.d.ts +25 -0
- package/dist/client/storefront/components/search-autocomplete.d.ts.map +1 -0
- package/dist/client/storefront/components/search-autocomplete.mjs +183 -0
- package/dist/client/storefront/components/search-autocomplete.mjs.map +1 -0
- package/dist/client/storefront/components/section-nav.d.ts +20 -0
- package/dist/client/storefront/components/section-nav.d.ts.map +1 -0
- package/dist/client/storefront/components/section-nav.mjs +175 -0
- package/dist/client/storefront/components/section-nav.mjs.map +1 -0
- package/dist/client/storefront/components/share-button.d.ts +19 -0
- package/dist/client/storefront/components/share-button.d.ts.map +1 -0
- package/dist/client/storefront/components/share-button.mjs +95 -0
- package/dist/client/storefront/components/share-button.mjs.map +1 -0
- package/dist/client/storefront/components/skeleton.d.ts +12 -0
- package/dist/client/storefront/components/skeleton.d.ts.map +1 -0
- package/dist/client/storefront/components/skeleton.mjs +70 -0
- package/dist/client/storefront/components/skeleton.mjs.map +1 -0
- package/dist/client/storefront/components/star-rating.d.ts +13 -0
- package/dist/client/storefront/components/star-rating.d.ts.map +1 -0
- package/dist/client/storefront/components/star-rating.mjs +240 -0
- package/dist/client/storefront/components/star-rating.mjs.map +1 -0
- package/dist/client/storefront/components/testimonial.d.ts +20 -0
- package/dist/client/storefront/components/testimonial.d.ts.map +1 -0
- package/dist/client/storefront/components/testimonial.mjs +53 -0
- package/dist/client/storefront/components/testimonial.mjs.map +1 -0
- package/dist/client/storefront/components/trust-badges.d.ts +14 -0
- package/dist/client/storefront/components/trust-badges.d.ts.map +1 -0
- package/dist/client/storefront/components/trust-badges.mjs +25 -0
- package/dist/client/storefront/components/trust-badges.mjs.map +1 -0
- package/dist/client/storefront/components/variant-selector.d.ts +21 -0
- package/dist/client/storefront/components/variant-selector.d.ts.map +1 -0
- package/dist/client/storefront/components/variant-selector.mjs +41 -0
- package/dist/client/storefront/components/variant-selector.mjs.map +1 -0
- package/dist/client/storefront/components/wishlist-toggle.d.ts +12 -0
- package/dist/client/storefront/components/wishlist-toggle.d.ts.map +1 -0
- package/dist/client/storefront/components/wishlist-toggle.mjs +58 -0
- package/dist/client/storefront/components/wishlist-toggle.mjs.map +1 -0
- package/dist/client/storefront/filters/filter-chip.d.ts +10 -0
- package/dist/client/storefront/filters/filter-chip.d.ts.map +1 -0
- package/dist/client/storefront/filters/filter-chip.mjs +30 -0
- package/dist/client/storefront/filters/filter-chip.mjs.map +1 -0
- package/dist/client/storefront/filters/filter-group.d.ts +22 -0
- package/dist/client/storefront/filters/filter-group.d.ts.map +1 -0
- package/dist/client/storefront/filters/filter-group.mjs +102 -0
- package/dist/client/storefront/filters/filter-group.mjs.map +1 -0
- package/dist/client/storefront/filters/filter-panel.d.ts +25 -0
- package/dist/client/storefront/filters/filter-panel.d.ts.map +1 -0
- package/dist/client/storefront/filters/filter-panel.mjs +110 -0
- package/dist/client/storefront/filters/filter-panel.mjs.map +1 -0
- package/dist/client/storefront/filters/index.d.ts +6 -0
- package/dist/client/storefront/filters/index.d.ts.map +1 -0
- package/dist/client/storefront/filters/index.mjs +13 -0
- package/dist/client/storefront/filters/index.mjs.map +1 -0
- package/dist/client/storefront/filters/sort-select.d.ts +12 -0
- package/dist/client/storefront/filters/sort-select.d.ts.map +1 -0
- package/dist/client/storefront/filters/sort-select.mjs +34 -0
- package/dist/client/storefront/filters/sort-select.mjs.map +1 -0
- package/dist/client/storefront/filters/toggle-list-view.d.ts +8 -0
- package/dist/client/storefront/filters/toggle-list-view.d.ts.map +1 -0
- package/dist/client/storefront/filters/toggle-list-view.mjs +30 -0
- package/dist/client/storefront/filters/toggle-list-view.mjs.map +1 -0
- package/dist/client/storefront/hooks/use-section-observer.d.ts +12 -0
- package/dist/client/storefront/hooks/use-section-observer.d.ts.map +1 -0
- package/dist/client/storefront/hooks/use-section-observer.mjs +46 -0
- package/dist/client/storefront/hooks/use-section-observer.mjs.map +1 -0
- package/dist/client/storefront/index.d.ts +24 -0
- package/dist/client/storefront/index.d.ts.map +1 -0
- package/dist/client/storefront/index.mjs +26 -0
- package/dist/client/storefront/index.mjs.map +1 -0
- package/dist/client/storefront/layout/footer.d.ts +4 -0
- package/dist/client/storefront/layout/footer.d.ts.map +1 -0
- package/dist/client/storefront/layout/footer.mjs +56 -0
- package/dist/client/storefront/layout/footer.mjs.map +1 -0
- package/dist/client/storefront/layout/header.d.ts +4 -0
- package/dist/client/storefront/layout/header.d.ts.map +1 -0
- package/dist/client/storefront/layout/header.mjs +367 -0
- package/dist/client/storefront/layout/header.mjs.map +1 -0
- package/dist/client/storefront/layout/index.d.ts +5 -0
- package/dist/client/storefront/layout/index.d.ts.map +1 -0
- package/dist/client/storefront/layout/index.mjs +11 -0
- package/dist/client/storefront/layout/index.mjs.map +1 -0
- package/dist/client/storefront/layout/mobile-menu-drawer.d.ts +4 -0
- package/dist/client/storefront/layout/mobile-menu-drawer.d.ts.map +1 -0
- package/dist/client/storefront/layout/mobile-menu-drawer.mjs +93 -0
- package/dist/client/storefront/layout/mobile-menu-drawer.mjs.map +1 -0
- package/dist/client/storefront/layout/promotion-bar.d.ts +4 -0
- package/dist/client/storefront/layout/promotion-bar.d.ts.map +1 -0
- package/dist/client/storefront/layout/promotion-bar.mjs +79 -0
- package/dist/client/storefront/layout/promotion-bar.mjs.map +1 -0
- package/dist/client/storefront/primitives/breadcrumbs.d.ts +12 -0
- package/dist/client/storefront/primitives/breadcrumbs.d.ts.map +1 -0
- package/dist/client/storefront/primitives/breadcrumbs.mjs +37 -0
- package/dist/client/storefront/primitives/breadcrumbs.mjs.map +1 -0
- package/dist/client/storefront/primitives/button.d.ts +12 -0
- package/dist/client/storefront/primitives/button.d.ts.map +1 -0
- package/dist/client/storefront/primitives/button.mjs +51 -0
- package/dist/client/storefront/primitives/button.mjs.map +1 -0
- package/dist/client/storefront/primitives/checkbox.d.ts +10 -0
- package/dist/client/storefront/primitives/checkbox.d.ts.map +1 -0
- package/dist/client/storefront/primitives/checkbox.mjs +23 -0
- package/dist/client/storefront/primitives/checkbox.mjs.map +1 -0
- package/dist/client/storefront/primitives/download-item.d.ts +9 -0
- package/dist/client/storefront/primitives/download-item.d.ts.map +1 -0
- package/dist/client/storefront/primitives/download-item.mjs +28 -0
- package/dist/client/storefront/primitives/download-item.mjs.map +1 -0
- package/dist/client/storefront/primitives/index.d.ts +10 -0
- package/dist/client/storefront/primitives/index.d.ts.map +1 -0
- package/dist/client/storefront/primitives/index.mjs +21 -0
- package/dist/client/storefront/primitives/index.mjs.map +1 -0
- package/dist/client/storefront/primitives/input.d.ts +18 -0
- package/dist/client/storefront/primitives/input.d.ts.map +1 -0
- package/dist/client/storefront/primitives/input.mjs +118 -0
- package/dist/client/storefront/primitives/input.mjs.map +1 -0
- package/dist/client/storefront/primitives/pagination.d.ts +9 -0
- package/dist/client/storefront/primitives/pagination.d.ts.map +1 -0
- package/dist/client/storefront/primitives/pagination.mjs +86 -0
- package/dist/client/storefront/primitives/pagination.mjs.map +1 -0
- package/dist/client/storefront/primitives/quick-links.d.ts +11 -0
- package/dist/client/storefront/primitives/quick-links.d.ts.map +1 -0
- package/dist/client/storefront/primitives/quick-links.mjs +17 -0
- package/dist/client/storefront/primitives/quick-links.mjs.map +1 -0
- package/dist/client/storefront/primitives/select.d.ts +16 -0
- package/dist/client/storefront/primitives/select.d.ts.map +1 -0
- package/dist/client/storefront/primitives/select.mjs +35 -0
- package/dist/client/storefront/primitives/select.mjs.map +1 -0
- package/dist/client/storefront/primitives/text-link.d.ts +7 -0
- package/dist/client/storefront/primitives/text-link.d.ts.map +1 -0
- package/dist/client/storefront/primitives/text-link.mjs +10 -0
- package/dist/client/storefront/primitives/text-link.mjs.map +1 -0
- package/dist/client/storefront/product/color-swatch.d.ts +10 -0
- package/dist/client/storefront/product/color-swatch.d.ts.map +1 -0
- package/dist/client/storefront/product/color-swatch.mjs +32 -0
- package/dist/client/storefront/product/color-swatch.mjs.map +1 -0
- package/dist/client/storefront/product/index.d.ts +5 -0
- package/dist/client/storefront/product/index.d.ts.map +1 -0
- package/dist/client/storefront/product/index.mjs +11 -0
- package/dist/client/storefront/product/index.mjs.map +1 -0
- package/dist/client/storefront/product/material-selector.d.ts +15 -0
- package/dist/client/storefront/product/material-selector.d.ts.map +1 -0
- package/dist/client/storefront/product/material-selector.mjs +35 -0
- package/dist/client/storefront/product/material-selector.mjs.map +1 -0
- package/dist/client/storefront/product/product-usp.d.ts +7 -0
- package/dist/client/storefront/product/product-usp.d.ts.map +1 -0
- package/dist/client/storefront/product/product-usp.mjs +14 -0
- package/dist/client/storefront/product/product-usp.mjs.map +1 -0
- package/dist/client/storefront/product/quantity-picker.d.ts +10 -0
- package/dist/client/storefront/product/quantity-picker.d.ts.map +1 -0
- package/dist/client/storefront/product/quantity-picker.mjs +56 -0
- package/dist/client/storefront/product/quantity-picker.mjs.map +1 -0
- package/dist/client/storefront/types.d.ts +284 -0
- package/dist/client/storefront/types.d.ts.map +1 -0
- package/dist/client/storefront/types.mjs +20 -0
- package/dist/client/storefront/types.mjs.map +1 -0
- package/dist/client/theme/apply.d.ts +17 -0
- package/dist/client/theme/apply.d.ts.map +1 -0
- package/dist/client/theme/apply.mjs +133 -0
- package/dist/client/theme/apply.mjs.map +1 -0
- package/dist/client/theme/cli.d.ts +2 -0
- package/dist/client/theme/cli.d.ts.map +1 -0
- package/dist/client/theme/cli.mjs +453 -0
- package/dist/client/theme/cli.mjs.map +1 -0
- package/dist/client/theme/codec.d.ts +28 -0
- package/dist/client/theme/codec.d.ts.map +1 -0
- package/dist/client/theme/codec.mjs +88 -0
- package/dist/client/theme/codec.mjs.map +1 -0
- package/dist/client/theme/defaults.d.ts +64 -0
- package/dist/client/theme/defaults.d.ts.map +1 -0
- package/dist/client/theme/defaults.mjs +158 -0
- package/dist/client/theme/defaults.mjs.map +1 -0
- package/dist/client/theme/index.d.ts +8 -0
- package/dist/client/theme/index.d.ts.map +1 -0
- package/dist/client/theme/index.mjs +20 -0
- package/dist/client/theme/index.mjs.map +1 -0
- package/dist/client/theme/scan.d.ts +16 -0
- package/dist/client/theme/scan.d.ts.map +1 -0
- package/dist/client/theme/scan.mjs +25 -0
- package/dist/client/theme/scan.mjs.map +1 -0
- package/dist/client/ui/accordion.d.ts +8 -0
- package/dist/client/ui/accordion.d.ts.map +1 -0
- package/dist/client/ui/accordion.mjs +66 -0
- package/dist/client/ui/accordion.mjs.map +1 -0
- package/dist/client/ui/breadcrumb.d.ts +12 -0
- package/dist/client/ui/breadcrumb.d.ts.map +1 -0
- package/dist/client/ui/breadcrumb.mjs +104 -0
- package/dist/client/ui/breadcrumb.mjs.map +1 -0
- package/dist/client/ui/button.d.ts +11 -0
- package/dist/client/ui/button.d.ts.map +1 -0
- package/dist/client/ui/button.mjs +57 -0
- package/dist/client/ui/button.mjs.map +1 -0
- package/dist/client/ui/card.d.ts +10 -0
- package/dist/client/ui/card.d.ts.map +1 -0
- package/dist/client/ui/card.mjs +91 -0
- package/dist/client/ui/card.mjs.map +1 -0
- package/dist/client/ui/carousel.d.ts +20 -0
- package/dist/client/ui/carousel.d.ts.map +1 -0
- package/dist/client/ui/carousel.mjs +202 -0
- package/dist/client/ui/carousel.mjs.map +1 -0
- package/dist/client/ui/checkbox.d.ts +5 -0
- package/dist/client/ui/checkbox.d.ts.map +1 -0
- package/dist/client/ui/checkbox.mjs +34 -0
- package/dist/client/ui/checkbox.mjs.map +1 -0
- package/dist/client/ui/collapsible.d.ts +6 -0
- package/dist/client/ui/collapsible.d.ts.map +1 -0
- package/dist/client/ui/collapsible.mjs +36 -0
- package/dist/client/ui/collapsible.mjs.map +1 -0
- package/dist/client/ui/input.d.ts +4 -0
- package/dist/client/ui/input.d.ts.map +1 -0
- package/dist/client/ui/input.mjs +22 -0
- package/dist/client/ui/input.mjs.map +1 -0
- package/dist/client/ui/label.d.ts +5 -0
- package/dist/client/ui/label.d.ts.map +1 -0
- package/dist/client/ui/label.mjs +23 -0
- package/dist/client/ui/label.mjs.map +1 -0
- package/dist/client/ui/mid-truncate.d.ts +27 -0
- package/dist/client/ui/mid-truncate.d.ts.map +1 -0
- package/dist/client/ui/mid-truncate.mjs +25 -0
- package/dist/client/ui/mid-truncate.mjs.map +1 -0
- package/dist/client/ui/navigation-menu.d.ts +15 -0
- package/dist/client/ui/navigation-menu.d.ts.map +1 -0
- package/dist/client/ui/navigation-menu.mjs +172 -0
- package/dist/client/ui/navigation-menu.mjs.map +1 -0
- package/dist/client/ui/pagination.d.ts +14 -0
- package/dist/client/ui/pagination.d.ts.map +1 -0
- package/dist/client/ui/pagination.mjs +124 -0
- package/dist/client/ui/pagination.mjs.map +1 -0
- package/dist/client/ui/popover.d.ts +11 -0
- package/dist/client/ui/popover.d.ts.map +1 -0
- package/dist/client/ui/popover.mjs +82 -0
- package/dist/client/ui/popover.mjs.map +1 -0
- package/dist/client/ui/select.d.ts +16 -0
- package/dist/client/ui/select.d.ts.map +1 -0
- package/dist/client/ui/select.mjs +183 -0
- package/dist/client/ui/select.mjs.map +1 -0
- package/dist/client/ui/separator.d.ts +5 -0
- package/dist/client/ui/separator.d.ts.map +1 -0
- package/dist/client/ui/separator.mjs +27 -0
- package/dist/client/ui/separator.mjs.map +1 -0
- package/dist/client/ui/sheet.d.ts +15 -0
- package/dist/client/ui/sheet.d.ts.map +1 -0
- package/dist/client/ui/sheet.mjs +130 -0
- package/dist/client/ui/sheet.mjs.map +1 -0
- package/dist/client/ui/toggle-group.d.ts +10 -0
- package/dist/client/ui/toggle-group.d.ts.map +1 -0
- package/dist/client/ui/toggle-group.mjs +69 -0
- package/dist/client/ui/toggle-group.mjs.map +1 -0
- package/dist/client/ui/toggle.d.ts +10 -0
- package/dist/client/ui/toggle.d.ts.map +1 -0
- package/dist/client/ui/toggle.mjs +44 -0
- package/dist/client/ui/toggle.mjs.map +1 -0
- package/dist/client/ui/utils.d.ts +3 -0
- package/dist/client/ui/utils.d.ts.map +1 -0
- package/dist/client/ui/utils.mjs +9 -0
- package/dist/client/ui/utils.mjs.map +1 -0
- package/dist/client/ui-interfaces/accordion.d.ts +8 -0
- package/dist/client/ui-interfaces/accordion.d.ts.map +1 -0
- package/dist/client/ui-interfaces/accordion.mjs +72 -0
- package/dist/client/ui-interfaces/accordion.mjs.map +1 -0
- package/dist/client/ui-interfaces/breadcrumb.d.ts +12 -0
- package/dist/client/ui-interfaces/breadcrumb.d.ts.map +1 -0
- package/dist/client/ui-interfaces/breadcrumb.mjs +97 -0
- package/dist/client/ui-interfaces/breadcrumb.mjs.map +1 -0
- package/dist/client/ui-interfaces/button.d.ts +11 -0
- package/dist/client/ui-interfaces/button.d.ts.map +1 -0
- package/dist/client/ui-interfaces/button.mjs +57 -0
- package/dist/client/ui-interfaces/button.mjs.map +1 -0
- package/dist/client/ui-interfaces/card.d.ts +10 -0
- package/dist/client/ui-interfaces/card.d.ts.map +1 -0
- package/dist/client/ui-interfaces/card.mjs +78 -0
- package/dist/client/ui-interfaces/card.mjs.map +1 -0
- package/dist/client/ui-interfaces/carousel.d.ts +20 -0
- package/dist/client/ui-interfaces/carousel.d.ts.map +1 -0
- package/dist/client/ui-interfaces/carousel.mjs +188 -0
- package/dist/client/ui-interfaces/carousel.mjs.map +1 -0
- package/dist/client/ui-interfaces/checkbox.d.ts +5 -0
- package/dist/client/ui-interfaces/checkbox.d.ts.map +1 -0
- package/dist/client/ui-interfaces/checkbox.mjs +30 -0
- package/dist/client/ui-interfaces/checkbox.mjs.map +1 -0
- package/dist/client/ui-interfaces/collapsible.d.ts +7 -0
- package/dist/client/ui-interfaces/collapsible.d.ts.map +1 -0
- package/dist/client/ui-interfaces/collapsible.mjs +42 -0
- package/dist/client/ui-interfaces/collapsible.mjs.map +1 -0
- package/dist/client/ui-interfaces/index.d.ts +18 -0
- package/dist/client/ui-interfaces/index.d.ts.map +1 -0
- package/dist/client/ui-interfaces/index.mjs +18 -0
- package/dist/client/ui-interfaces/index.mjs.map +1 -0
- package/dist/client/ui-interfaces/input.d.ts +7 -0
- package/dist/client/ui-interfaces/input.d.ts.map +1 -0
- package/dist/client/ui-interfaces/input.mjs +39 -0
- package/dist/client/ui-interfaces/input.mjs.map +1 -0
- package/dist/client/ui-interfaces/label.d.ts +5 -0
- package/dist/client/ui-interfaces/label.d.ts.map +1 -0
- package/dist/client/ui-interfaces/label.mjs +23 -0
- package/dist/client/ui-interfaces/label.mjs.map +1 -0
- package/dist/client/ui-interfaces/navigation-menu.d.ts +15 -0
- package/dist/client/ui-interfaces/navigation-menu.d.ts.map +1 -0
- package/dist/client/ui-interfaces/navigation-menu.mjs +163 -0
- package/dist/client/ui-interfaces/navigation-menu.mjs.map +1 -0
- package/dist/client/ui-interfaces/pagination.d.ts +14 -0
- package/dist/client/ui-interfaces/pagination.d.ts.map +1 -0
- package/dist/client/ui-interfaces/pagination.mjs +103 -0
- package/dist/client/ui-interfaces/pagination.mjs.map +1 -0
- package/dist/client/ui-interfaces/popover.d.ts +8 -0
- package/dist/client/ui-interfaces/popover.d.ts.map +1 -0
- package/dist/client/ui-interfaces/popover.mjs +50 -0
- package/dist/client/ui-interfaces/popover.mjs.map +1 -0
- package/dist/client/ui-interfaces/select.d.ts +16 -0
- package/dist/client/ui-interfaces/select.d.ts.map +1 -0
- package/dist/client/ui-interfaces/select.mjs +159 -0
- package/dist/client/ui-interfaces/select.mjs.map +1 -0
- package/dist/client/ui-interfaces/separator.d.ts +5 -0
- package/dist/client/ui-interfaces/separator.d.ts.map +1 -0
- package/dist/client/ui-interfaces/separator.mjs +28 -0
- package/dist/client/ui-interfaces/separator.mjs.map +1 -0
- package/dist/client/ui-interfaces/sheet.d.ts +14 -0
- package/dist/client/ui-interfaces/sheet.d.ts.map +1 -0
- package/dist/client/ui-interfaces/sheet.mjs +140 -0
- package/dist/client/ui-interfaces/sheet.mjs.map +1 -0
- package/dist/client/ui-interfaces/toggle-group.d.ts +10 -0
- package/dist/client/ui-interfaces/toggle-group.d.ts.map +1 -0
- package/dist/client/ui-interfaces/toggle-group.mjs +67 -0
- package/dist/client/ui-interfaces/toggle-group.mjs.map +1 -0
- package/dist/client/ui-interfaces/toggle.d.ts +10 -0
- package/dist/client/ui-interfaces/toggle.d.ts.map +1 -0
- package/dist/client/ui-interfaces/toggle.mjs +45 -0
- package/dist/client/ui-interfaces/toggle.mjs.map +1 -0
- package/dist/client/ui-resolver/accordion.d.ts +11 -0
- package/dist/client/ui-resolver/accordion.d.ts.map +1 -0
- package/dist/client/ui-resolver/accordion.mjs +35 -0
- package/dist/client/ui-resolver/accordion.mjs.map +1 -0
- package/dist/client/ui-resolver/breadcrumb.d.ts +14 -0
- package/dist/client/ui-resolver/breadcrumb.d.ts.map +1 -0
- package/dist/client/ui-resolver/breadcrumb.mjs +53 -0
- package/dist/client/ui-resolver/breadcrumb.mjs.map +1 -0
- package/dist/client/ui-resolver/button.d.ts +12 -0
- package/dist/client/ui-resolver/button.d.ts.map +1 -0
- package/dist/client/ui-resolver/button.mjs +25 -0
- package/dist/client/ui-resolver/button.mjs.map +1 -0
- package/dist/client/ui-resolver/card.d.ts +14 -0
- package/dist/client/ui-resolver/card.d.ts.map +1 -0
- package/dist/client/ui-resolver/card.mjs +53 -0
- package/dist/client/ui-resolver/card.mjs.map +1 -0
- package/dist/client/ui-resolver/carousel.d.ts +13 -0
- package/dist/client/ui-resolver/carousel.d.ts.map +1 -0
- package/dist/client/ui-resolver/carousel.mjs +41 -0
- package/dist/client/ui-resolver/carousel.mjs.map +1 -0
- package/dist/client/ui-resolver/checkbox.d.ts +8 -0
- package/dist/client/ui-resolver/checkbox.d.ts.map +1 -0
- package/dist/client/ui-resolver/checkbox.mjs +17 -0
- package/dist/client/ui-resolver/checkbox.mjs.map +1 -0
- package/dist/client/ui-resolver/collapsible.d.ts +10 -0
- package/dist/client/ui-resolver/collapsible.d.ts.map +1 -0
- package/dist/client/ui-resolver/collapsible.mjs +29 -0
- package/dist/client/ui-resolver/collapsible.mjs.map +1 -0
- package/dist/client/ui-resolver/context.d.ts +10 -0
- package/dist/client/ui-resolver/context.d.ts.map +1 -0
- package/dist/client/ui-resolver/context.mjs +28 -0
- package/dist/client/ui-resolver/context.mjs.map +1 -0
- package/dist/client/ui-resolver/index.d.ts +19 -0
- package/dist/client/ui-resolver/index.d.ts.map +1 -0
- package/dist/client/ui-resolver/index.mjs +156 -0
- package/dist/client/ui-resolver/index.mjs.map +1 -0
- package/dist/client/ui-resolver/input.d.ts +8 -0
- package/dist/client/ui-resolver/input.d.ts.map +1 -0
- package/dist/client/ui-resolver/input.mjs +17 -0
- package/dist/client/ui-resolver/input.mjs.map +1 -0
- package/dist/client/ui-resolver/label.d.ts +8 -0
- package/dist/client/ui-resolver/label.d.ts.map +1 -0
- package/dist/client/ui-resolver/label.mjs +17 -0
- package/dist/client/ui-resolver/label.mjs.map +1 -0
- package/dist/client/ui-resolver/navigation-menu.d.ts +16 -0
- package/dist/client/ui-resolver/navigation-menu.d.ts.map +1 -0
- package/dist/client/ui-resolver/navigation-menu.mjs +64 -0
- package/dist/client/ui-resolver/navigation-menu.mjs.map +1 -0
- package/dist/client/ui-resolver/pagination.d.ts +14 -0
- package/dist/client/ui-resolver/pagination.d.ts.map +1 -0
- package/dist/client/ui-resolver/pagination.mjs +53 -0
- package/dist/client/ui-resolver/pagination.mjs.map +1 -0
- package/dist/client/ui-resolver/popover.d.ts +11 -0
- package/dist/client/ui-resolver/popover.d.ts.map +1 -0
- package/dist/client/ui-resolver/popover.mjs +35 -0
- package/dist/client/ui-resolver/popover.mjs.map +1 -0
- package/dist/client/ui-resolver/select.d.ts +15 -0
- package/dist/client/ui-resolver/select.d.ts.map +1 -0
- package/dist/client/ui-resolver/select.mjs +59 -0
- package/dist/client/ui-resolver/select.mjs.map +1 -0
- package/dist/client/ui-resolver/separator.d.ts +8 -0
- package/dist/client/ui-resolver/separator.d.ts.map +1 -0
- package/dist/client/ui-resolver/separator.mjs +17 -0
- package/dist/client/ui-resolver/separator.mjs.map +1 -0
- package/dist/client/ui-resolver/sheet.d.ts +15 -0
- package/dist/client/ui-resolver/sheet.d.ts.map +1 -0
- package/dist/client/ui-resolver/sheet.mjs +59 -0
- package/dist/client/ui-resolver/sheet.mjs.map +1 -0
- package/dist/client/ui-resolver/toggle-group.d.ts +9 -0
- package/dist/client/ui-resolver/toggle-group.d.ts.map +1 -0
- package/dist/client/ui-resolver/toggle-group.mjs +23 -0
- package/dist/client/ui-resolver/toggle-group.mjs.map +1 -0
- package/dist/client/ui-resolver/toggle.d.ts +12 -0
- package/dist/client/ui-resolver/toggle.d.ts.map +1 -0
- package/dist/client/ui-resolver/toggle.mjs +25 -0
- package/dist/client/ui-resolver/toggle.mjs.map +1 -0
- package/dist/client/user/actions/createResetPasswordLinkAction.d.ts +14 -0
- package/dist/client/user/actions/createResetPasswordLinkAction.d.ts.map +1 -0
- package/dist/client/user/actions/createResetPasswordLinkAction.mjs +30 -0
- package/dist/client/user/actions/createResetPasswordLinkAction.mjs.map +1 -0
- package/dist/client/user/actions/getUserAction.d.ts +3 -0
- package/dist/client/user/actions/getUserAction.d.ts.map +1 -0
- package/dist/client/user/actions/getUserAction.mjs +19 -0
- package/dist/client/user/actions/getUserAction.mjs.map +1 -0
- package/dist/client/user/actions/logInUserAction.d.ts +15 -0
- package/dist/client/user/actions/logInUserAction.d.ts.map +1 -0
- package/dist/client/user/actions/logInUserAction.mjs +34 -0
- package/dist/client/user/actions/logInUserAction.mjs.map +1 -0
- package/dist/client/user/actions/logoutUserAction.d.ts +2 -0
- package/dist/client/user/actions/logoutUserAction.d.ts.map +1 -0
- package/dist/client/user/actions/logoutUserAction.mjs +10 -0
- package/dist/client/user/actions/logoutUserAction.mjs.map +1 -0
- package/dist/client/user/actions/registerOrganisationAction.d.ts +9 -0
- package/dist/client/user/actions/registerOrganisationAction.d.ts.map +1 -0
- package/dist/client/user/actions/registerOrganisationAction.mjs +18 -0
- package/dist/client/user/actions/registerOrganisationAction.mjs.map +1 -0
- package/dist/client/user/actions/registerUserAction.d.ts +18 -0
- package/dist/client/user/actions/registerUserAction.d.ts.map +1 -0
- package/dist/client/user/actions/registerUserAction.mjs +42 -0
- package/dist/client/user/actions/registerUserAction.mjs.map +1 -0
- package/dist/client/user/actions/registerUserWithoutRedirectAction.d.ts +41 -0
- package/dist/client/user/actions/registerUserWithoutRedirectAction.d.ts.map +1 -0
- package/dist/client/user/actions/registerUserWithoutRedirectAction.mjs +58 -0
- package/dist/client/user/actions/registerUserWithoutRedirectAction.mjs.map +1 -0
- package/dist/client/user/actions/updatePasswordAction.d.ts +21 -0
- package/dist/client/user/actions/updatePasswordAction.d.ts.map +1 -0
- package/dist/client/user/actions/updatePasswordAction.mjs +37 -0
- package/dist/client/user/actions/updatePasswordAction.mjs.map +1 -0
- package/dist/client/user/api/userRoute.d.ts +7 -0
- package/dist/client/user/api/userRoute.d.ts.map +1 -0
- package/dist/client/user/api/userRoute.mjs +65 -0
- package/dist/client/user/api/userRoute.mjs.map +1 -0
- package/dist/client/user/clients/enad.d.ts +4 -0
- package/dist/client/user/clients/enad.d.ts.map +1 -0
- package/dist/client/user/clients/enad.mjs +19 -0
- package/dist/client/user/clients/enad.mjs.map +1 -0
- package/dist/client/user/components/login-form.d.ts +23 -0
- package/dist/client/user/components/login-form.d.ts.map +1 -0
- package/dist/client/user/components/login-form.mjs +117 -0
- package/dist/client/user/components/login-form.mjs.map +1 -0
- package/dist/client/user/components/reset-password-form.d.ts +20 -0
- package/dist/client/user/components/reset-password-form.d.ts.map +1 -0
- package/dist/client/user/components/reset-password-form.mjs +93 -0
- package/dist/client/user/components/reset-password-form.mjs.map +1 -0
- package/dist/client/user/components/sign-out.d.ts +8 -0
- package/dist/client/user/components/sign-out.d.ts.map +1 -0
- package/dist/client/user/components/sign-out.mjs +26 -0
- package/dist/client/user/components/sign-out.mjs.map +1 -0
- package/dist/client/user/components/signup-form.d.ts +27 -0
- package/dist/client/user/components/signup-form.d.ts.map +1 -0
- package/dist/client/user/components/signup-form.mjs +188 -0
- package/dist/client/user/components/signup-form.mjs.map +1 -0
- package/dist/client/user/components/signup-organisation-form.d.ts +55 -0
- package/dist/client/user/components/signup-organisation-form.d.ts.map +1 -0
- package/dist/client/user/components/signup-organisation-form.mjs +864 -0
- package/dist/client/user/components/signup-organisation-form.mjs.map +1 -0
- package/dist/client/user/components/update-password-form.d.ts +17 -0
- package/dist/client/user/components/update-password-form.d.ts.map +1 -0
- package/dist/client/user/components/update-password-form.mjs +60 -0
- package/dist/client/user/components/update-password-form.mjs.map +1 -0
- package/dist/client/user/hooks/index.d.ts +2 -0
- package/dist/client/user/hooks/index.d.ts.map +1 -0
- package/dist/client/user/hooks/index.mjs +2 -0
- package/dist/client/user/hooks/index.mjs.map +1 -0
- package/dist/client/user/hooks/useUser.d.ts +12 -0
- package/dist/client/user/hooks/useUser.d.ts.map +1 -0
- package/dist/client/user/hooks/useUser.mjs +32 -0
- package/dist/client/user/hooks/useUser.mjs.map +1 -0
- package/dist/client/user/index.d.ts +9 -0
- package/dist/client/user/index.d.ts.map +1 -0
- package/dist/client/user/index.mjs +17 -0
- package/dist/client/user/index.mjs.map +1 -0
- package/dist/client/user/types/user.d.ts +201 -0
- package/dist/client/user/types/user.d.ts.map +1 -0
- package/dist/client/user/types/user.mjs +1 -0
- package/dist/client/user/types/user.mjs.map +1 -0
- package/dist/client/user/utils/userCookieService.d.ts +19 -0
- package/dist/client/user/utils/userCookieService.d.ts.map +1 -0
- package/dist/client/user/utils/userCookieService.mjs +51 -0
- package/dist/client/user/utils/userCookieService.mjs.map +1 -0
- package/dist/client/wishlist/actions/addItemsToWishlistAction.d.ts +5 -0
- package/dist/client/wishlist/actions/addItemsToWishlistAction.d.ts.map +1 -0
- package/dist/client/wishlist/actions/addItemsToWishlistAction.mjs +20 -0
- package/dist/client/wishlist/actions/addItemsToWishlistAction.mjs.map +1 -0
- package/dist/client/wishlist/actions/createOrGetShareTokenAction.d.ts +3 -0
- package/dist/client/wishlist/actions/createOrGetShareTokenAction.d.ts.map +1 -0
- package/dist/client/wishlist/actions/createOrGetShareTokenAction.mjs +20 -0
- package/dist/client/wishlist/actions/createOrGetShareTokenAction.mjs.map +1 -0
- package/dist/client/wishlist/actions/createWishlistAction.d.ts +3 -0
- package/dist/client/wishlist/actions/createWishlistAction.d.ts.map +1 -0
- package/dist/client/wishlist/actions/createWishlistAction.mjs +16 -0
- package/dist/client/wishlist/actions/createWishlistAction.mjs.map +1 -0
- package/dist/client/wishlist/actions/deleteItemsFromWishlistAction.d.ts +5 -0
- package/dist/client/wishlist/actions/deleteItemsFromWishlistAction.d.ts.map +1 -0
- package/dist/client/wishlist/actions/deleteItemsFromWishlistAction.mjs +20 -0
- package/dist/client/wishlist/actions/deleteItemsFromWishlistAction.mjs.map +1 -0
- package/dist/client/wishlist/actions/deleteWishlistAction.d.ts +4 -0
- package/dist/client/wishlist/actions/deleteWishlistAction.d.ts.map +1 -0
- package/dist/client/wishlist/actions/deleteWishlistAction.mjs +16 -0
- package/dist/client/wishlist/actions/deleteWishlistAction.mjs.map +1 -0
- package/dist/client/wishlist/actions/getSharedWishlistAction.d.ts +3 -0
- package/dist/client/wishlist/actions/getSharedWishlistAction.d.ts.map +1 -0
- package/dist/client/wishlist/actions/getSharedWishlistAction.mjs +20 -0
- package/dist/client/wishlist/actions/getSharedWishlistAction.mjs.map +1 -0
- package/dist/client/wishlist/actions/getSpecificWishlistAction.d.ts +3 -0
- package/dist/client/wishlist/actions/getSpecificWishlistAction.d.ts.map +1 -0
- package/dist/client/wishlist/actions/getSpecificWishlistAction.mjs +20 -0
- package/dist/client/wishlist/actions/getSpecificWishlistAction.mjs.map +1 -0
- package/dist/client/wishlist/actions/getUserWishlists.d.ts +4 -0
- package/dist/client/wishlist/actions/getUserWishlists.d.ts.map +1 -0
- package/dist/client/wishlist/actions/getUserWishlists.mjs +25 -0
- package/dist/client/wishlist/actions/getUserWishlists.mjs.map +1 -0
- package/dist/client/wishlist/actions/revokeShareTokenAction.d.ts +4 -0
- package/dist/client/wishlist/actions/revokeShareTokenAction.d.ts.map +1 -0
- package/dist/client/wishlist/actions/revokeShareTokenAction.mjs +20 -0
- package/dist/client/wishlist/actions/revokeShareTokenAction.mjs.map +1 -0
- package/dist/client/wishlist/actions/updateWishlistAction.d.ts +3 -0
- package/dist/client/wishlist/actions/updateWishlistAction.d.ts.map +1 -0
- package/dist/client/wishlist/actions/updateWishlistAction.mjs +20 -0
- package/dist/client/wishlist/actions/updateWishlistAction.mjs.map +1 -0
- package/dist/client/wishlist/hooks/index.d.ts +2 -0
- package/dist/client/wishlist/hooks/index.d.ts.map +1 -0
- package/dist/client/wishlist/hooks/index.mjs +2 -0
- package/dist/client/wishlist/hooks/index.mjs.map +1 -0
- package/dist/client/wishlist/hooks/useWishlist.d.ts +95 -0
- package/dist/client/wishlist/hooks/useWishlist.d.ts.map +1 -0
- package/dist/client/wishlist/hooks/useWishlist.mjs +76 -0
- package/dist/client/wishlist/hooks/useWishlist.mjs.map +1 -0
- package/dist/client/wishlist/hooks/useWishlistActions.d.ts +44 -0
- package/dist/client/wishlist/hooks/useWishlistActions.d.ts.map +1 -0
- package/dist/client/wishlist/hooks/useWishlistActions.mjs +101 -0
- package/dist/client/wishlist/hooks/useWishlistActions.mjs.map +1 -0
- package/dist/client/wishlist/index.d.ts +5 -0
- package/dist/client/wishlist/index.d.ts.map +1 -0
- package/dist/client/wishlist/index.mjs +9 -0
- package/dist/client/wishlist/index.mjs.map +1 -0
- package/dist/client/wishlist/wishlist-drawer.d.ts +17 -0
- package/dist/client/wishlist/wishlist-drawer.d.ts.map +1 -0
- package/dist/client/wishlist/wishlist-drawer.mjs +199 -0
- package/dist/client/wishlist/wishlist-drawer.mjs.map +1 -0
- package/dist/styles.css +2 -0
- package/package.json +54 -32
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { cookies } from "next/headers";
|
|
2
|
+
const COOKIE_OPTIONS = {
|
|
3
|
+
httpOnly: true,
|
|
4
|
+
secure: process.env.NODE_ENV === "production",
|
|
5
|
+
path: "/"
|
|
6
|
+
// ensure cookies are available across the whole app
|
|
7
|
+
};
|
|
8
|
+
const userCookieService = {
|
|
9
|
+
/** Get all relevant cookies */
|
|
10
|
+
async get() {
|
|
11
|
+
const store = await cookies();
|
|
12
|
+
return {
|
|
13
|
+
accessToken: store.get("access_token")?.value || null,
|
|
14
|
+
refreshToken: store.get("refresh_token")?.value || null,
|
|
15
|
+
signedIn: store.get("user_sign_in")?.value === "true"
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
/** Set tokens and mark user as signed in */
|
|
19
|
+
async setTokens(accessToken, refreshToken) {
|
|
20
|
+
const store = await cookies();
|
|
21
|
+
store.set("access_token", accessToken, COOKIE_OPTIONS);
|
|
22
|
+
store.set("refresh_token", refreshToken, COOKIE_OPTIONS);
|
|
23
|
+
store.set("user_sign_in", "true");
|
|
24
|
+
},
|
|
25
|
+
/** Clear all auth-related cookies */
|
|
26
|
+
async clear() {
|
|
27
|
+
const store = await cookies();
|
|
28
|
+
store.delete("access_token");
|
|
29
|
+
store.delete("refresh_token");
|
|
30
|
+
store.delete("user_sign_in");
|
|
31
|
+
},
|
|
32
|
+
/** Set a single cookie (for flexibility) */
|
|
33
|
+
async set(name, value) {
|
|
34
|
+
const store = await cookies();
|
|
35
|
+
store.set(name, value, COOKIE_OPTIONS);
|
|
36
|
+
},
|
|
37
|
+
/** Get a single cookie value */
|
|
38
|
+
async getValue(name) {
|
|
39
|
+
const store = await cookies();
|
|
40
|
+
return store.get(name)?.value ?? null;
|
|
41
|
+
},
|
|
42
|
+
/** Delete a single cookie */
|
|
43
|
+
async delete(name) {
|
|
44
|
+
const store = await cookies();
|
|
45
|
+
store.delete(name);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
userCookieService
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=userCookieService.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/client/user/utils/userCookieService.ts"],"sourcesContent":["import { cookies } from \"next/headers\"\n\n/**\n * Centralized helper for managing authentication-related cookies.\n */\nconst COOKIE_OPTIONS = {\n httpOnly: true,\n secure: process.env.NODE_ENV === \"production\",\n path: \"/\", // ensure cookies are available across the whole app\n} as const\n\nexport const userCookieService = {\n /** Get all relevant cookies */\n async get() {\n const store = await cookies()\n\n return {\n accessToken: store.get(\"access_token\")?.value || null,\n refreshToken: store.get(\"refresh_token\")?.value || null,\n signedIn: store.get(\"user_sign_in\")?.value === \"true\",\n }\n },\n\n /** Set tokens and mark user as signed in */\n async setTokens(accessToken: string, refreshToken: string) {\n const store = await cookies()\n\n store.set(\"access_token\", accessToken, COOKIE_OPTIONS)\n store.set(\"refresh_token\", refreshToken, COOKIE_OPTIONS)\n store.set(\"user_sign_in\", \"true\")\n },\n\n /** Clear all auth-related cookies */\n async clear() {\n const store = await cookies()\n\n store.delete(\"access_token\")\n store.delete(\"refresh_token\")\n store.delete(\"user_sign_in\")\n },\n\n /** Set a single cookie (for flexibility) */\n async set(name: string, value: string) {\n const store = await cookies()\n store.set(name, value, COOKIE_OPTIONS)\n },\n\n /** Get a single cookie value */\n async getValue(name: string): Promise<string | null> {\n const store = await cookies()\n return store.get(name)?.value ?? null\n },\n\n /** Delete a single cookie */\n async delete(name: string) {\n const store = await cookies()\n store.delete(name)\n },\n}\n"],"mappings":"AAAA,SAAS,eAAe;AAKxB,MAAM,iBAAiB;AAAA,EACrB,UAAU;AAAA,EACV,QAAQ,QAAQ,IAAI,aAAa;AAAA,EACjC,MAAM;AAAA;AACR;AAEO,MAAM,oBAAoB;AAAA;AAAA,EAE/B,MAAM,MAAM;AACV,UAAM,QAAQ,MAAM,QAAQ;AAE5B,WAAO;AAAA,MACL,aAAa,MAAM,IAAI,cAAc,GAAG,SAAS;AAAA,MACjD,cAAc,MAAM,IAAI,eAAe,GAAG,SAAS;AAAA,MACnD,UAAU,MAAM,IAAI,cAAc,GAAG,UAAU;AAAA,IACjD;AAAA,EACF;AAAA;AAAA,EAGA,MAAM,UAAU,aAAqB,cAAsB;AACzD,UAAM,QAAQ,MAAM,QAAQ;AAE5B,UAAM,IAAI,gBAAgB,aAAa,cAAc;AACrD,UAAM,IAAI,iBAAiB,cAAc,cAAc;AACvD,UAAM,IAAI,gBAAgB,MAAM;AAAA,EAClC;AAAA;AAAA,EAGA,MAAM,QAAQ;AACZ,UAAM,QAAQ,MAAM,QAAQ;AAE5B,UAAM,OAAO,cAAc;AAC3B,UAAM,OAAO,eAAe;AAC5B,UAAM,OAAO,cAAc;AAAA,EAC7B;AAAA;AAAA,EAGA,MAAM,IAAI,MAAc,OAAe;AACrC,UAAM,QAAQ,MAAM,QAAQ;AAC5B,UAAM,IAAI,MAAM,OAAO,cAAc;AAAA,EACvC;AAAA;AAAA,EAGA,MAAM,SAAS,MAAsC;AACnD,UAAM,QAAQ,MAAM,QAAQ;AAC5B,WAAO,MAAM,IAAI,IAAI,GAAG,SAAS;AAAA,EACnC;AAAA;AAAA,EAGA,MAAM,OAAO,MAAc;AACzB,UAAM,QAAQ,MAAM,QAAQ;AAC5B,UAAM,OAAO,IAAI;AAAA,EACnB;AACF;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addItemsToWishlistAction.d.ts","sourceRoot":"","sources":["../../../../src/client/wishlist/actions/addItemsToWishlistAction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qBAAqB,CAAA;AAiBpE,eAAO,MAAM,wBAAwB,GAAI,YAAY,MAAM,EAAE,UAAU,yBAAyB;;EACvC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import { cookies } from "next/headers";
|
|
3
|
+
import { withAuth } from "../../global/auth/withAuth";
|
|
4
|
+
import { customerClient } from "../../user/clients/enad";
|
|
5
|
+
const addItemsToWishlist = async (wishlistId, options) => {
|
|
6
|
+
const cookieStore = await cookies();
|
|
7
|
+
const token = cookieStore.get("access_token");
|
|
8
|
+
const [data, error] = await customerClient.wishlist.addItemsToWishlist(
|
|
9
|
+
token?.value || "",
|
|
10
|
+
wishlistId,
|
|
11
|
+
options
|
|
12
|
+
);
|
|
13
|
+
if (error) throw error;
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
const addItemsToWishlistAction = (wishlistId, options) => withAuth(() => addItemsToWishlist(wishlistId, options));
|
|
17
|
+
export {
|
|
18
|
+
addItemsToWishlistAction
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=addItemsToWishlistAction.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/client/wishlist/actions/addItemsToWishlistAction.ts"],"sourcesContent":["\"use server\"\n\nimport { type AddItemsToWishlistOptions } from \"@enadhq/enad-ts-sdk\"\nimport { cookies } from \"next/headers\"\nimport { withAuth } from \"../../global/auth/withAuth\"\nimport { customerClient } from \"../../user/clients/enad\"\n\nconst addItemsToWishlist = async (wishlistId: string, options?: AddItemsToWishlistOptions) => {\n const cookieStore = await cookies()\n const token = cookieStore.get(\"access_token\")\n const [data, error] = await customerClient.wishlist.addItemsToWishlist(\n token?.value || \"\",\n wishlistId,\n options\n )\n if (error) throw error\n return data\n}\n\nexport const addItemsToWishlistAction = (wishlistId: string, options?: AddItemsToWishlistOptions) =>\n withAuth(() => addItemsToWishlist(wishlistId, options))\n"],"mappings":";AAGA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAE/B,MAAM,qBAAqB,OAAO,YAAoB,YAAwC;AAC5F,QAAM,cAAc,MAAM,QAAQ;AAClC,QAAM,QAAQ,YAAY,IAAI,cAAc;AAC5C,QAAM,CAAC,MAAM,KAAK,IAAI,MAAM,eAAe,SAAS;AAAA,IAClD,OAAO,SAAS;AAAA,IAChB;AAAA,IACA;AAAA,EACF;AACA,MAAI,MAAO,OAAM;AACjB,SAAO;AACT;AAEO,MAAM,2BAA2B,CAAC,YAAoB,YAC3D,SAAS,MAAM,mBAAmB,YAAY,OAAO,CAAC;","names":[]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type CreateOrGetShareTokenForWishlistOptions } from "@enadhq/enad-ts-sdk";
|
|
2
|
+
export declare const createOrGetShareTokenAction: (wishlistId: string, options?: CreateOrGetShareTokenForWishlistOptions) => Promise<import("@enadhq/enad-ts-sdk").WishlistShareTokenResponse>;
|
|
3
|
+
//# sourceMappingURL=createOrGetShareTokenAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createOrGetShareTokenAction.d.ts","sourceRoot":"","sources":["../../../../src/client/wishlist/actions/createOrGetShareTokenAction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,uCAAuC,EAAE,MAAM,qBAAqB,CAAA;AAoBlF,eAAO,MAAM,2BAA2B,GACtC,YAAY,MAAM,EAClB,UAAU,uCAAuC,sEACY,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import { cookies } from "next/headers";
|
|
3
|
+
import { withAuth } from "../../global/auth/withAuth";
|
|
4
|
+
import { customerClient } from "../../user/clients/enad";
|
|
5
|
+
const createOrGetShareToken = async (wishlistId, options) => {
|
|
6
|
+
const cookieStore = await cookies();
|
|
7
|
+
const token = cookieStore.get("access_token");
|
|
8
|
+
const [data, error] = await customerClient.wishlist.createOrGetShareTokenForWishlist(
|
|
9
|
+
token?.value || "",
|
|
10
|
+
wishlistId,
|
|
11
|
+
options
|
|
12
|
+
);
|
|
13
|
+
if (error) throw error;
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
const createOrGetShareTokenAction = (wishlistId, options) => withAuth(() => createOrGetShareToken(wishlistId, options));
|
|
17
|
+
export {
|
|
18
|
+
createOrGetShareTokenAction
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=createOrGetShareTokenAction.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/client/wishlist/actions/createOrGetShareTokenAction.ts"],"sourcesContent":["\"use server\"\n\nimport { type CreateOrGetShareTokenForWishlistOptions } from \"@enadhq/enad-ts-sdk\"\nimport { cookies } from \"next/headers\"\nimport { withAuth } from \"../../global/auth/withAuth\"\nimport { customerClient } from \"../../user/clients/enad\"\n\nconst createOrGetShareToken = async (\n wishlistId: string,\n options?: CreateOrGetShareTokenForWishlistOptions\n) => {\n const cookieStore = await cookies()\n const token = cookieStore.get(\"access_token\")\n const [data, error] = await customerClient.wishlist.createOrGetShareTokenForWishlist(\n token?.value || \"\",\n wishlistId,\n options\n )\n if (error) throw error\n return data\n}\n\nexport const createOrGetShareTokenAction = (\n wishlistId: string,\n options?: CreateOrGetShareTokenForWishlistOptions\n) => withAuth(() => createOrGetShareToken(wishlistId, options))\n"],"mappings":";AAGA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAE/B,MAAM,wBAAwB,OAC5B,YACA,YACG;AACH,QAAM,cAAc,MAAM,QAAQ;AAClC,QAAM,QAAQ,YAAY,IAAI,cAAc;AAC5C,QAAM,CAAC,MAAM,KAAK,IAAI,MAAM,eAAe,SAAS;AAAA,IAClD,OAAO,SAAS;AAAA,IAChB;AAAA,IACA;AAAA,EACF;AACA,MAAI,MAAO,OAAM;AACjB,SAAO;AACT;AAEO,MAAM,8BAA8B,CACzC,YACA,YACG,SAAS,MAAM,sBAAsB,YAAY,OAAO,CAAC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createWishlistAction.d.ts","sourceRoot":"","sources":["../../../../src/client/wishlist/actions/createWishlistAction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAahE,eAAO,MAAM,oBAAoB,GAAI,UAAU,qBAAqB,wDAC3B,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import { cookies } from "next/headers";
|
|
3
|
+
import { withAuth } from "../../global/auth/withAuth";
|
|
4
|
+
import { customerClient } from "../../user/clients/enad";
|
|
5
|
+
const createWishlist = async (options) => {
|
|
6
|
+
const cookieStore = await cookies();
|
|
7
|
+
const token = cookieStore.get("access_token");
|
|
8
|
+
const [data, error] = await customerClient.wishlist.createNewWishlist(token?.value || "", options);
|
|
9
|
+
if (error) throw error;
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
const createWishlistAction = (options) => withAuth(() => createWishlist(options));
|
|
13
|
+
export {
|
|
14
|
+
createWishlistAction
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=createWishlistAction.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/client/wishlist/actions/createWishlistAction.ts"],"sourcesContent":["\"use server\"\n\nimport { type CreateWishlistOptions } from \"@enadhq/enad-ts-sdk\"\nimport { cookies } from \"next/headers\"\nimport { withAuth } from \"../../global/auth/withAuth\"\nimport { customerClient } from \"../../user/clients/enad\"\n\nconst createWishlist = async (options?: CreateWishlistOptions) => {\n const cookieStore = await cookies()\n const token = cookieStore.get(\"access_token\")\n const [data, error] = await customerClient.wishlist.createNewWishlist(token?.value || \"\", options)\n if (error) throw error\n return data\n}\n\nexport const createWishlistAction = (options?: CreateWishlistOptions) =>\n withAuth(() => createWishlist(options))\n"],"mappings":";AAGA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAE/B,MAAM,iBAAiB,OAAO,YAAoC;AAChE,QAAM,cAAc,MAAM,QAAQ;AAClC,QAAM,QAAQ,YAAY,IAAI,cAAc;AAC5C,QAAM,CAAC,MAAM,KAAK,IAAI,MAAM,eAAe,SAAS,kBAAkB,OAAO,SAAS,IAAI,OAAO;AACjG,MAAI,MAAO,OAAM;AACjB,SAAO;AACT;AAEO,MAAM,uBAAuB,CAAC,YACnC,SAAS,MAAM,eAAe,OAAO,CAAC;","names":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type DeleteItemsFromWishlistOptions } from "@enadhq/enad-ts-sdk";
|
|
2
|
+
export declare const deleteItemsFromWishlistAction: (wishlistId: string, options?: DeleteItemsFromWishlistOptions) => Promise<{
|
|
3
|
+
message: string;
|
|
4
|
+
}>;
|
|
5
|
+
//# sourceMappingURL=deleteItemsFromWishlistAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteItemsFromWishlistAction.d.ts","sourceRoot":"","sources":["../../../../src/client/wishlist/actions/deleteItemsFromWishlistAction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,qBAAqB,CAAA;AAoBzE,eAAO,MAAM,6BAA6B,GACxC,YAAY,MAAM,EAClB,UAAU,8BAA8B;;EACuB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import { cookies } from "next/headers";
|
|
3
|
+
import { withAuth } from "../../global/auth/withAuth";
|
|
4
|
+
import { customerClient } from "../../user/clients/enad";
|
|
5
|
+
const deleteItemsFromWishlist = async (wishlistId, options) => {
|
|
6
|
+
const cookieStore = await cookies();
|
|
7
|
+
const token = cookieStore.get("access_token");
|
|
8
|
+
const [data, error] = await customerClient.wishlist.deleteItemsFromWishlist(
|
|
9
|
+
token?.value || "",
|
|
10
|
+
wishlistId,
|
|
11
|
+
options
|
|
12
|
+
);
|
|
13
|
+
if (error) throw error;
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
const deleteItemsFromWishlistAction = (wishlistId, options) => withAuth(() => deleteItemsFromWishlist(wishlistId, options));
|
|
17
|
+
export {
|
|
18
|
+
deleteItemsFromWishlistAction
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=deleteItemsFromWishlistAction.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/client/wishlist/actions/deleteItemsFromWishlistAction.ts"],"sourcesContent":["\"use server\"\n\nimport { type DeleteItemsFromWishlistOptions } from \"@enadhq/enad-ts-sdk\"\nimport { cookies } from \"next/headers\"\nimport { withAuth } from \"../../global/auth/withAuth\"\nimport { customerClient } from \"../../user/clients/enad\"\n\nconst deleteItemsFromWishlist = async (\n wishlistId: string,\n options?: DeleteItemsFromWishlistOptions\n) => {\n const cookieStore = await cookies()\n const token = cookieStore.get(\"access_token\")\n const [data, error] = await customerClient.wishlist.deleteItemsFromWishlist(\n token?.value || \"\",\n wishlistId,\n options\n )\n if (error) throw error\n return data\n}\n\nexport const deleteItemsFromWishlistAction = (\n wishlistId: string,\n options?: DeleteItemsFromWishlistOptions\n) => withAuth(() => deleteItemsFromWishlist(wishlistId, options))\n"],"mappings":";AAGA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAE/B,MAAM,0BAA0B,OAC9B,YACA,YACG;AACH,QAAM,cAAc,MAAM,QAAQ;AAClC,QAAM,QAAQ,YAAY,IAAI,cAAc;AAC5C,QAAM,CAAC,MAAM,KAAK,IAAI,MAAM,eAAe,SAAS;AAAA,IAClD,OAAO,SAAS;AAAA,IAChB;AAAA,IACA;AAAA,EACF;AACA,MAAI,MAAO,OAAM;AACjB,SAAO;AACT;AAEO,MAAM,gCAAgC,CAC3C,YACA,YACG,SAAS,MAAM,wBAAwB,YAAY,OAAO,CAAC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteWishlistAction.d.ts","sourceRoot":"","sources":["../../../../src/client/wishlist/actions/deleteWishlistAction.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,oBAAoB,GAAI,YAAY,MAAM;;EACX,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import { cookies } from "next/headers";
|
|
3
|
+
import { withAuth } from "../../global/auth/withAuth";
|
|
4
|
+
import { customerClient } from "../../user/clients/enad";
|
|
5
|
+
const deleteWishlist = async (wishlistId) => {
|
|
6
|
+
const cookieStore = await cookies();
|
|
7
|
+
const token = cookieStore.get("access_token");
|
|
8
|
+
const [data, error] = await customerClient.wishlist.deleteWishlist(token?.value || "", wishlistId);
|
|
9
|
+
if (error) throw error;
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
const deleteWishlistAction = (wishlistId) => withAuth(() => deleteWishlist(wishlistId));
|
|
13
|
+
export {
|
|
14
|
+
deleteWishlistAction
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=deleteWishlistAction.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/client/wishlist/actions/deleteWishlistAction.ts"],"sourcesContent":["\"use server\"\n\nimport { cookies } from \"next/headers\"\nimport { withAuth } from \"../../global/auth/withAuth\"\nimport { customerClient } from \"../../user/clients/enad\"\n\nconst deleteWishlist = async (wishlistId: string) => {\n const cookieStore = await cookies()\n const token = cookieStore.get(\"access_token\")\n const [data, error] = await customerClient.wishlist.deleteWishlist(token?.value || \"\", wishlistId)\n\n if (error) throw error\n return data\n}\n\nexport const deleteWishlistAction = (wishlistId: string) =>\n withAuth(() => deleteWishlist(wishlistId))\n"],"mappings":";AAEA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAE/B,MAAM,iBAAiB,OAAO,eAAuB;AACnD,QAAM,cAAc,MAAM,QAAQ;AAClC,QAAM,QAAQ,YAAY,IAAI,cAAc;AAC5C,QAAM,CAAC,MAAM,KAAK,IAAI,MAAM,eAAe,SAAS,eAAe,OAAO,SAAS,IAAI,UAAU;AAEjG,MAAI,MAAO,OAAM;AACjB,SAAO;AACT;AAEO,MAAM,uBAAuB,CAAC,eACnC,SAAS,MAAM,eAAe,UAAU,CAAC;","names":[]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type CreateWishlistOptions } from "@enadhq/enad-ts-sdk";
|
|
2
|
+
export declare const getSharedWishlistAction: (wishlistShareToken: string, options?: CreateWishlistOptions) => Promise<import("@enadhq/enad-ts-sdk").WishlistWithItemsResponse>;
|
|
3
|
+
//# sourceMappingURL=getSharedWishlistAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSharedWishlistAction.d.ts","sourceRoot":"","sources":["../../../../src/client/wishlist/actions/getSharedWishlistAction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAiBhE,eAAO,MAAM,uBAAuB,GAClC,oBAAoB,MAAM,EAC1B,UAAU,qBAAqB,qEACkC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import { cookies } from "next/headers";
|
|
3
|
+
import { withAuth } from "../../global/auth/withAuth";
|
|
4
|
+
import { customerClient } from "../../user/clients/enad";
|
|
5
|
+
const getSharedWishlist = async (wishlistShareToken, options) => {
|
|
6
|
+
const cookieStore = await cookies();
|
|
7
|
+
const token = cookieStore.get("access_token");
|
|
8
|
+
const [data, error] = await customerClient.wishlist.getSharedWishlists(
|
|
9
|
+
token?.value || "",
|
|
10
|
+
wishlistShareToken,
|
|
11
|
+
options
|
|
12
|
+
);
|
|
13
|
+
if (error) throw error;
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
const getSharedWishlistAction = (wishlistShareToken, options) => withAuth(() => getSharedWishlist(wishlistShareToken, options));
|
|
17
|
+
export {
|
|
18
|
+
getSharedWishlistAction
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=getSharedWishlistAction.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/client/wishlist/actions/getSharedWishlistAction.ts"],"sourcesContent":["\"use server\"\n\nimport { type CreateWishlistOptions } from \"@enadhq/enad-ts-sdk\"\nimport { cookies } from \"next/headers\"\nimport { withAuth } from \"../../global/auth/withAuth\"\nimport { customerClient } from \"../../user/clients/enad\"\n\nconst getSharedWishlist = async (wishlistShareToken: string, options?: CreateWishlistOptions) => {\n const cookieStore = await cookies()\n const token = cookieStore.get(\"access_token\")\n const [data, error] = await customerClient.wishlist.getSharedWishlists(\n token?.value || \"\",\n wishlistShareToken,\n options\n )\n if (error) throw error\n return data\n}\n\nexport const getSharedWishlistAction = (\n wishlistShareToken: string,\n options?: CreateWishlistOptions\n) => withAuth(() => getSharedWishlist(wishlistShareToken, options))\n"],"mappings":";AAGA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAE/B,MAAM,oBAAoB,OAAO,oBAA4B,YAAoC;AAC/F,QAAM,cAAc,MAAM,QAAQ;AAClC,QAAM,QAAQ,YAAY,IAAI,cAAc;AAC5C,QAAM,CAAC,MAAM,KAAK,IAAI,MAAM,eAAe,SAAS;AAAA,IAClD,OAAO,SAAS;AAAA,IAChB;AAAA,IACA;AAAA,EACF;AACA,MAAI,MAAO,OAAM;AACjB,SAAO;AACT;AAEO,MAAM,0BAA0B,CACrC,oBACA,YACG,SAAS,MAAM,kBAAkB,oBAAoB,OAAO,CAAC;","names":[]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type GetWishlistOptions } from "@enadhq/enad-ts-sdk";
|
|
2
|
+
export declare const getSpecificWishlistAction: (wishlistId: string, options?: GetWishlistOptions) => Promise<import("@enadhq/enad-ts-sdk").WishlistWithItemsResponse>;
|
|
3
|
+
//# sourceMappingURL=getSpecificWishlistAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSpecificWishlistAction.d.ts","sourceRoot":"","sources":["../../../../src/client/wishlist/actions/getSpecificWishlistAction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAiB7D,eAAO,MAAM,yBAAyB,GAAI,YAAY,MAAM,EAAE,UAAU,kBAAkB,qEAChC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import { cookies } from "next/headers";
|
|
3
|
+
import { withAuth } from "../../global/auth/withAuth";
|
|
4
|
+
import { customerClient } from "../../user/clients/enad";
|
|
5
|
+
const getSpecificWishlist = async (wishlistId, options) => {
|
|
6
|
+
const cookieStore = await cookies();
|
|
7
|
+
const token = cookieStore.get("access_token");
|
|
8
|
+
const [data, error] = await customerClient.wishlist.getSpecificWishlist(
|
|
9
|
+
token?.value || "",
|
|
10
|
+
wishlistId,
|
|
11
|
+
options
|
|
12
|
+
);
|
|
13
|
+
if (error) throw error;
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
const getSpecificWishlistAction = (wishlistId, options) => withAuth(() => getSpecificWishlist(wishlistId, options));
|
|
17
|
+
export {
|
|
18
|
+
getSpecificWishlistAction
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=getSpecificWishlistAction.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/client/wishlist/actions/getSpecificWishlistAction.ts"],"sourcesContent":["\"use server\"\n\nimport { type GetWishlistOptions } from \"@enadhq/enad-ts-sdk\"\nimport { cookies } from \"next/headers\"\nimport { withAuth } from \"../../global/auth/withAuth\"\nimport { customerClient } from \"../../user/clients/enad\"\n\nconst getSpecificWishlist = async (wishlistId: string, options?: GetWishlistOptions) => {\n const cookieStore = await cookies()\n const token = cookieStore.get(\"access_token\")\n const [data, error] = await customerClient.wishlist.getSpecificWishlist(\n token?.value || \"\",\n wishlistId,\n options\n )\n if (error) throw error\n return data\n}\n\nexport const getSpecificWishlistAction = (wishlistId: string, options?: GetWishlistOptions) =>\n withAuth(() => getSpecificWishlist(wishlistId, options))\n"],"mappings":";AAGA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAE/B,MAAM,sBAAsB,OAAO,YAAoB,YAAiC;AACtF,QAAM,cAAc,MAAM,QAAQ;AAClC,QAAM,QAAQ,YAAY,IAAI,cAAc;AAC5C,QAAM,CAAC,MAAM,KAAK,IAAI,MAAM,eAAe,SAAS;AAAA,IAClD,OAAO,SAAS;AAAA,IAChB;AAAA,IACA;AAAA,EACF;AACA,MAAI,MAAO,OAAM;AACjB,SAAO;AACT;AAEO,MAAM,4BAA4B,CAAC,YAAoB,YAC5D,SAAS,MAAM,oBAAoB,YAAY,OAAO,CAAC;","names":[]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type ListWishlistsOptions } from "@enadhq/enad-ts-sdk";
|
|
2
|
+
export declare const getUserWishlists: (options?: ListWishlistsOptions) => Promise<import("@enadhq/enad-ts-sdk").ListWishlistsResponse>;
|
|
3
|
+
export declare const getUserWishlistsAction: (options?: ListWishlistsOptions) => Promise<import("@enadhq/enad-ts-sdk").ListWishlistsResponse>;
|
|
4
|
+
//# sourceMappingURL=getUserWishlists.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUserWishlists.d.ts","sourceRoot":"","sources":["../../../../src/client/wishlist/actions/getUserWishlists.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAM/D,eAAO,MAAM,gBAAgB,GAAU,UAAU,oBAAoB,iEAiBpE,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,UAAU,oBAAoB,iEAC1B,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import { cookies } from "next/headers";
|
|
3
|
+
import { withAuth } from "../../global/auth/withAuth";
|
|
4
|
+
import { customerClient } from "../../user/clients/enad";
|
|
5
|
+
const getUserWishlists = async (options) => {
|
|
6
|
+
const cookieStore = await cookies();
|
|
7
|
+
const token = cookieStore.get("access_token");
|
|
8
|
+
const listOptions = {
|
|
9
|
+
page: options?.page ?? 1,
|
|
10
|
+
...options?.name && { name: options.name },
|
|
11
|
+
...options?.per_page && { per_page: options.per_page }
|
|
12
|
+
};
|
|
13
|
+
const [data, error] = await customerClient.wishlist.listWishlists(token?.value || "", listOptions);
|
|
14
|
+
if (error) {
|
|
15
|
+
console.error("Get user wishlists error:", error);
|
|
16
|
+
throw new Error("Failed to fetch user wishlists");
|
|
17
|
+
}
|
|
18
|
+
return data;
|
|
19
|
+
};
|
|
20
|
+
const getUserWishlistsAction = (options) => withAuth(() => getUserWishlists(options));
|
|
21
|
+
export {
|
|
22
|
+
getUserWishlists,
|
|
23
|
+
getUserWishlistsAction
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=getUserWishlists.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/client/wishlist/actions/getUserWishlists.tsx"],"sourcesContent":["\"use server\"\n\nimport { type ListWishlistsOptions } from \"@enadhq/enad-ts-sdk\"\nimport { cookies } from \"next/headers\"\n\nimport { withAuth } from \"../../global/auth/withAuth\"\nimport { customerClient } from \"../../user/clients/enad\"\n\nexport const getUserWishlists = async (options?: ListWishlistsOptions) => {\n const cookieStore = await cookies()\n const token = cookieStore.get(\"access_token\")\n \n const listOptions: ListWishlistsOptions = {\n page: options?.page ?? 1,\n ...(options?.name && { name: options.name }),\n ...(options?.per_page && { per_page: options.per_page }),\n }\n \n const [data, error] = await customerClient.wishlist.listWishlists(token?.value || \"\", listOptions)\n\n if (error) {\n console.error(\"Get user wishlists error:\", error)\n throw new Error(\"Failed to fetch user wishlists\")\n }\n return data\n}\n\nexport const getUserWishlistsAction = (options?: ListWishlistsOptions) => \n withAuth(() => getUserWishlists(options))\n"],"mappings":";AAGA,SAAS,eAAe;AAExB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAExB,MAAM,mBAAmB,OAAO,YAAmC;AACxE,QAAM,cAAc,MAAM,QAAQ;AAClC,QAAM,QAAQ,YAAY,IAAI,cAAc;AAE5C,QAAM,cAAoC;AAAA,IACxC,MAAM,SAAS,QAAQ;AAAA,IACvB,GAAI,SAAS,QAAQ,EAAE,MAAM,QAAQ,KAAK;AAAA,IAC1C,GAAI,SAAS,YAAY,EAAE,UAAU,QAAQ,SAAS;AAAA,EACxD;AAEA,QAAM,CAAC,MAAM,KAAK,IAAI,MAAM,eAAe,SAAS,cAAc,OAAO,SAAS,IAAI,WAAW;AAEjG,MAAI,OAAO;AACT,YAAQ,MAAM,6BAA6B,KAAK;AAChD,UAAM,IAAI,MAAM,gCAAgC;AAAA,EAClD;AACA,SAAO;AACT;AAEO,MAAM,yBAAyB,CAAC,YACrC,SAAS,MAAM,iBAAiB,OAAO,CAAC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revokeShareTokenAction.d.ts","sourceRoot":"","sources":["../../../../src/client/wishlist/actions/revokeShareTokenAction.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,sBAAsB,GAAI,YAAY,MAAM,EAAE,YAAY,MAAM;;EACnB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import { cookies } from "next/headers";
|
|
3
|
+
import { withAuth } from "../../global/auth/withAuth";
|
|
4
|
+
import { customerClient } from "../../user/clients/enad";
|
|
5
|
+
const revokeShareToken = async (wishlistId, shareToken) => {
|
|
6
|
+
const cookieStore = await cookies();
|
|
7
|
+
const token = cookieStore.get("access_token");
|
|
8
|
+
const [data, error] = await customerClient.wishlist.revokeWishlistShareToken(
|
|
9
|
+
token?.value || "",
|
|
10
|
+
wishlistId,
|
|
11
|
+
shareToken
|
|
12
|
+
);
|
|
13
|
+
if (error) throw error;
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
const revokeShareTokenAction = (wishlistId, shareToken) => withAuth(() => revokeShareToken(wishlistId, shareToken));
|
|
17
|
+
export {
|
|
18
|
+
revokeShareTokenAction
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=revokeShareTokenAction.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/client/wishlist/actions/revokeShareTokenAction.ts"],"sourcesContent":["\"use server\"\n\nimport { cookies } from \"next/headers\"\nimport { withAuth } from \"../../global/auth/withAuth\"\nimport { customerClient } from \"../../user/clients/enad\"\n\nconst revokeShareToken = async (wishlistId: string, shareToken: string) => {\n const cookieStore = await cookies()\n const token = cookieStore.get(\"access_token\")\n const [data, error] = await customerClient.wishlist.revokeWishlistShareToken(\n token?.value || \"\",\n wishlistId,\n shareToken\n )\n if (error) throw error\n return data\n}\n\nexport const revokeShareTokenAction = (wishlistId: string, shareToken: string) =>\n withAuth(() => revokeShareToken(wishlistId, shareToken))\n"],"mappings":";AAEA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAE/B,MAAM,mBAAmB,OAAO,YAAoB,eAAuB;AACzE,QAAM,cAAc,MAAM,QAAQ;AAClC,QAAM,QAAQ,YAAY,IAAI,cAAc;AAC5C,QAAM,CAAC,MAAM,KAAK,IAAI,MAAM,eAAe,SAAS;AAAA,IAClD,OAAO,SAAS;AAAA,IAChB;AAAA,IACA;AAAA,EACF;AACA,MAAI,MAAO,OAAM;AACjB,SAAO;AACT;AAEO,MAAM,yBAAyB,CAAC,YAAoB,eACzD,SAAS,MAAM,iBAAiB,YAAY,UAAU,CAAC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateWishlistAction.d.ts","sourceRoot":"","sources":["../../../../src/client/wishlist/actions/updateWishlistAction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAiBhE,eAAO,MAAM,oBAAoB,GAAI,YAAY,MAAM,EAAE,UAAU,qBAAqB,wDACnC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import { cookies } from "next/headers";
|
|
3
|
+
import { withAuth } from "../../global/auth/withAuth";
|
|
4
|
+
import { customerClient } from "../../user/clients/enad";
|
|
5
|
+
const updateWishlist = async (wishlistId, options) => {
|
|
6
|
+
const cookieStore = await cookies();
|
|
7
|
+
const token = cookieStore.get("access_token");
|
|
8
|
+
const [data, error] = await customerClient.wishlist.updateWishlist(
|
|
9
|
+
token?.value || "",
|
|
10
|
+
wishlistId,
|
|
11
|
+
options
|
|
12
|
+
);
|
|
13
|
+
if (error) throw error;
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
const updateWishlistAction = (wishlistId, options) => withAuth(() => updateWishlist(wishlistId, options));
|
|
17
|
+
export {
|
|
18
|
+
updateWishlistAction
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=updateWishlistAction.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/client/wishlist/actions/updateWishlistAction.ts"],"sourcesContent":["\"use server\"\n\nimport { type UpdateWishlistOptions } from \"@enadhq/enad-ts-sdk\"\nimport { cookies } from \"next/headers\"\nimport { withAuth } from \"../../global/auth/withAuth\"\nimport { customerClient } from \"../../user/clients/enad\"\n\nconst updateWishlist = async (wishlistId: string, options?: UpdateWishlistOptions) => {\n const cookieStore = await cookies()\n const token = cookieStore.get(\"access_token\")\n const [data, error] = await customerClient.wishlist.updateWishlist(\n token?.value || \"\",\n wishlistId,\n options\n )\n if (error) throw error\n return data\n}\n\nexport const updateWishlistAction = (wishlistId: string, options?: UpdateWishlistOptions) =>\n withAuth(() => updateWishlist(wishlistId, options))\n"],"mappings":";AAGA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAE/B,MAAM,iBAAiB,OAAO,YAAoB,YAAoC;AACpF,QAAM,cAAc,MAAM,QAAQ;AAClC,QAAM,QAAQ,YAAY,IAAI,cAAc;AAC5C,QAAM,CAAC,MAAM,KAAK,IAAI,MAAM,eAAe,SAAS;AAAA,IAClD,OAAO,SAAS;AAAA,IAChB;AAAA,IACA;AAAA,EACF;AACA,MAAI,MAAO,OAAM;AACjB,SAAO;AACT;AAEO,MAAM,uBAAuB,CAAC,YAAoB,YACvD,SAAS,MAAM,eAAe,YAAY,OAAO,CAAC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/wishlist/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/client/wishlist/hooks/index.ts"],"sourcesContent":["export * from \"./useWishlist\"\n"],"mappings":"AAAA,cAAc;","names":[]}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { type CreateWishlistOptions, type GetWishlistOptions, type ListWishlistsOptions } from "@enadhq/enad-ts-sdk";
|
|
2
|
+
interface UseWishlistOptions {
|
|
3
|
+
/** Fetch a specific wishlist by ID */
|
|
4
|
+
wishlistId?: string;
|
|
5
|
+
/** Fetch a shared wishlist by share token */
|
|
6
|
+
shareToken?: string;
|
|
7
|
+
/** Pagination options for specific wishlist */
|
|
8
|
+
options?: GetWishlistOptions | CreateWishlistOptions;
|
|
9
|
+
/** Pagination options for listing wishlists */
|
|
10
|
+
listOptions?: ListWishlistsOptions;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Hook to manage wishlist state and actions.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* // List all wishlists
|
|
17
|
+
* const { wishlists } = useWishlist()
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* // Get specific wishlist
|
|
21
|
+
* const { wishlist } = useWishlist({ wishlistId: "123" })
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* // Get shared wishlist
|
|
25
|
+
* const { wishlist } = useWishlist({ shareToken: "abc" })
|
|
26
|
+
*/
|
|
27
|
+
export declare const useWishlist: (params?: UseWishlistOptions) => {
|
|
28
|
+
createWishlist: import("@tanstack/react-query").UseMutateAsyncFunction<import("@enadhq/enad-ts-sdk").WishlistItem, Error, CreateWishlistOptions | undefined, unknown>;
|
|
29
|
+
updateWishlist: import("@tanstack/react-query").UseMutateAsyncFunction<import("@enadhq/enad-ts-sdk").WishlistItem, Error, {
|
|
30
|
+
wishlistId: string;
|
|
31
|
+
options?: import("@enadhq/enad-ts-sdk").UpdateWishlistOptions;
|
|
32
|
+
}, unknown>;
|
|
33
|
+
deleteWishlist: import("@tanstack/react-query").UseMutateAsyncFunction<{
|
|
34
|
+
message: string;
|
|
35
|
+
}, Error, string, unknown>;
|
|
36
|
+
addItems: import("@tanstack/react-query").UseMutateAsyncFunction<{
|
|
37
|
+
message: string;
|
|
38
|
+
}, Error, {
|
|
39
|
+
wishlistId: string;
|
|
40
|
+
options?: import("@enadhq/enad-ts-sdk").AddItemsToWishlistOptions;
|
|
41
|
+
}, unknown>;
|
|
42
|
+
deleteItems: import("@tanstack/react-query").UseMutateAsyncFunction<{
|
|
43
|
+
message: string;
|
|
44
|
+
}, Error, {
|
|
45
|
+
wishlistId: string;
|
|
46
|
+
options?: import("@enadhq/enad-ts-sdk").DeleteItemsFromWishlistOptions;
|
|
47
|
+
}, unknown>;
|
|
48
|
+
createOrGetShareToken: import("@tanstack/react-query").UseMutateAsyncFunction<import("@enadhq/enad-ts-sdk").WishlistShareTokenResponse, Error, {
|
|
49
|
+
wishlistId: string;
|
|
50
|
+
options?: import("@enadhq/enad-ts-sdk").CreateOrGetShareTokenForWishlistOptions;
|
|
51
|
+
}, unknown>;
|
|
52
|
+
revokeShareToken: import("@tanstack/react-query").UseMutateAsyncFunction<{
|
|
53
|
+
message: string;
|
|
54
|
+
}, Error, {
|
|
55
|
+
wishlistId: string;
|
|
56
|
+
shareToken: string;
|
|
57
|
+
}, unknown>;
|
|
58
|
+
isCreatingWishlist: boolean;
|
|
59
|
+
isUpdatingWishlist: boolean;
|
|
60
|
+
isDeletingWishlist: boolean;
|
|
61
|
+
isAddingItemsToWishlist: boolean;
|
|
62
|
+
isDeletingItemsFromWishlist: boolean;
|
|
63
|
+
isCreatingShareToken: boolean;
|
|
64
|
+
isRevokingShareToken: boolean;
|
|
65
|
+
wishlists: import("@enadhq/enad-ts-sdk").ListWishlistsResponse | undefined;
|
|
66
|
+
specificWishlist: import("@enadhq/enad-ts-sdk").WishlistWithItemsResponse | undefined;
|
|
67
|
+
sharedWishlist: import("@enadhq/enad-ts-sdk").WishlistWithItemsResponse | undefined;
|
|
68
|
+
wishlist: import("@enadhq/enad-ts-sdk").WishlistWithItemsResponse | undefined;
|
|
69
|
+
data: import("@enadhq/enad-ts-sdk").WishlistWithItemsResponse | undefined;
|
|
70
|
+
isLoading: boolean;
|
|
71
|
+
isFetching: boolean;
|
|
72
|
+
error: Error | null;
|
|
73
|
+
refetch: ((options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@enadhq/enad-ts-sdk").ListWishlistsResponse, Error>>) | ((options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@enadhq/enad-ts-sdk").WishlistWithItemsResponse, Error>>);
|
|
74
|
+
refetchWishlists: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@enadhq/enad-ts-sdk").ListWishlistsResponse, Error>>;
|
|
75
|
+
wishlistsStatus: {
|
|
76
|
+
isLoading: boolean;
|
|
77
|
+
isFetching: boolean;
|
|
78
|
+
error: Error | null;
|
|
79
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@enadhq/enad-ts-sdk").ListWishlistsResponse, Error>>;
|
|
80
|
+
};
|
|
81
|
+
specificWishlistStatus: {
|
|
82
|
+
isLoading: boolean;
|
|
83
|
+
isFetching: boolean;
|
|
84
|
+
error: Error | null;
|
|
85
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@enadhq/enad-ts-sdk").WishlistWithItemsResponse, Error>>;
|
|
86
|
+
};
|
|
87
|
+
sharedWishlistStatus: {
|
|
88
|
+
isLoading: boolean;
|
|
89
|
+
isFetching: boolean;
|
|
90
|
+
error: Error | null;
|
|
91
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@enadhq/enad-ts-sdk").WishlistWithItemsResponse, Error>>;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export {};
|
|
95
|
+
//# sourceMappingURL=useWishlist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWishlist.d.ts","sourceRoot":"","sources":["../../../../src/client/wishlist/hooks/useWishlist.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AASpH,UAAU,kBAAkB;IAC1B,sCAAsC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,kBAAkB,GAAG,qBAAqB,CAAA;IACpD,+CAA+C;IAC/C,WAAW,CAAC,EAAE,oBAAoB,CAAA;CACnC;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW,GAAI,SAAS,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsEtD,CAAA"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { CACHE_TAGS } from "../../global/constants/tags";
|
|
4
|
+
import { getSharedWishlistAction } from "../actions/getSharedWishlistAction";
|
|
5
|
+
import { getSpecificWishlistAction } from "../actions/getSpecificWishlistAction";
|
|
6
|
+
import { getUserWishlistsAction } from "../actions/getUserWishlists";
|
|
7
|
+
import { useWishlistActions } from "./useWishlistActions";
|
|
8
|
+
const useWishlist = (params) => {
|
|
9
|
+
const { wishlistId, shareToken, options, listOptions } = params || {};
|
|
10
|
+
const listQuery = useQuery({
|
|
11
|
+
queryKey: [CACHE_TAGS.wishlist, listOptions],
|
|
12
|
+
queryFn: () => getUserWishlistsAction(listOptions),
|
|
13
|
+
enabled: true,
|
|
14
|
+
refetchOnMount: false
|
|
15
|
+
});
|
|
16
|
+
const specificQuery = useQuery({
|
|
17
|
+
queryKey: [CACHE_TAGS.wishlist, wishlistId, options],
|
|
18
|
+
queryFn: () => getSpecificWishlistAction(wishlistId, options),
|
|
19
|
+
enabled: Boolean(wishlistId) && !shareToken,
|
|
20
|
+
refetchOnMount: false
|
|
21
|
+
});
|
|
22
|
+
const sharedQuery = useQuery({
|
|
23
|
+
queryKey: [CACHE_TAGS.wishlist, "shared", shareToken, options],
|
|
24
|
+
queryFn: () => getSharedWishlistAction(shareToken, options),
|
|
25
|
+
enabled: Boolean(shareToken),
|
|
26
|
+
refetchOnMount: false
|
|
27
|
+
});
|
|
28
|
+
const wishlistActions = useWishlistActions();
|
|
29
|
+
const getActiveQuery = () => {
|
|
30
|
+
if (shareToken) return sharedQuery;
|
|
31
|
+
if (wishlistId) return specificQuery;
|
|
32
|
+
return listQuery;
|
|
33
|
+
};
|
|
34
|
+
const activeQuery = getActiveQuery();
|
|
35
|
+
const getActiveWishlist = () => {
|
|
36
|
+
if (shareToken) return sharedQuery.data;
|
|
37
|
+
if (wishlistId) return specificQuery.data;
|
|
38
|
+
return void 0;
|
|
39
|
+
};
|
|
40
|
+
const activeWishlist = getActiveWishlist();
|
|
41
|
+
return {
|
|
42
|
+
wishlists: listQuery.data,
|
|
43
|
+
specificWishlist: specificQuery.data,
|
|
44
|
+
sharedWishlist: sharedQuery.data,
|
|
45
|
+
wishlist: activeWishlist,
|
|
46
|
+
data: activeWishlist,
|
|
47
|
+
isLoading: activeQuery.isLoading,
|
|
48
|
+
isFetching: activeQuery.isFetching,
|
|
49
|
+
error: activeQuery.error,
|
|
50
|
+
refetch: activeQuery.refetch,
|
|
51
|
+
refetchWishlists: listQuery.refetch,
|
|
52
|
+
wishlistsStatus: {
|
|
53
|
+
isLoading: listQuery.isLoading,
|
|
54
|
+
isFetching: listQuery.isFetching,
|
|
55
|
+
error: listQuery.error,
|
|
56
|
+
refetch: listQuery.refetch
|
|
57
|
+
},
|
|
58
|
+
specificWishlistStatus: {
|
|
59
|
+
isLoading: specificQuery.isLoading,
|
|
60
|
+
isFetching: specificQuery.isFetching,
|
|
61
|
+
error: specificQuery.error,
|
|
62
|
+
refetch: specificQuery.refetch
|
|
63
|
+
},
|
|
64
|
+
sharedWishlistStatus: {
|
|
65
|
+
isLoading: sharedQuery.isLoading,
|
|
66
|
+
isFetching: sharedQuery.isFetching,
|
|
67
|
+
error: sharedQuery.error,
|
|
68
|
+
refetch: sharedQuery.refetch
|
|
69
|
+
},
|
|
70
|
+
...wishlistActions
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
export {
|
|
74
|
+
useWishlist
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=useWishlist.mjs.map
|