storefront-layouts 1.0.6 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/route-skeleton-loader.d.ts.map +1 -1
- package/dist/components/ui/route-skeleton-loader.js +6 -1
- package/dist/editor/alignment-schemas/booking-footer-section.d.ts.map +1 -1
- package/dist/editor/alignment-schemas/booking-footer-section.js +0 -1
- package/dist/editor/alignment-schemas/clothing.d.ts.map +1 -1
- package/dist/editor/alignment-schemas/clothing.js +0 -1
- package/dist/editor/alignment-schemas/food.d.ts.map +1 -1
- package/dist/editor/alignment-schemas/food.js +0 -1
- package/dist/hooks/use-category-products.d.ts +5 -1
- package/dist/hooks/use-category-products.d.ts.map +1 -1
- package/dist/hooks/use-category-products.js +8 -5
- package/dist/hooks/use-filtered-products-fetch.d.ts +12 -0
- package/dist/hooks/use-filtered-products-fetch.d.ts.map +1 -0
- package/dist/hooks/use-filtered-products-fetch.js +59 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/layouts/booking/components/BookingHomePage.d.ts.map +1 -1
- package/dist/layouts/booking/components/BookingHomePage.js +3 -1
- package/dist/layouts/booking/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/booking/pages/AboutPage.js +3 -1
- package/dist/layouts/booking/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/booking/pages/CategoryPage.js +3 -1
- package/dist/layouts/booking/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/booking/pages/ProductDetailPage.js +2 -1
- package/dist/layouts/booking/pages/ServicesPage.d.ts.map +1 -1
- package/dist/layouts/booking/pages/ServicesPage.js +4 -2
- package/dist/layouts/booking-agenda/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/pages/AboutPage.js +3 -1
- package/dist/layouts/booking-agenda/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/pages/CategoryPage.js +3 -1
- package/dist/layouts/booking-agenda/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/pages/ProductDetailPage.js +2 -1
- package/dist/layouts/booking-agenda/pages/ServicesPage.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/pages/ServicesPage.js +4 -2
- package/dist/layouts/clothing/components/ClothingHomePage.d.ts.map +1 -1
- package/dist/layouts/clothing/components/ClothingHomePage.js +5 -4
- package/dist/layouts/clothing/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/clothing/pages/AboutPage.js +2 -1
- package/dist/layouts/clothing/pages/CategoriesPage.d.ts.map +1 -1
- package/dist/layouts/clothing/pages/CategoriesPage.js +3 -2
- package/dist/layouts/clothing/pages/CategoryPage.d.ts +3 -1
- package/dist/layouts/clothing/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/clothing/pages/CategoryPage.js +4 -3
- package/dist/layouts/clothing/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/clothing/pages/ProductDetailPage.js +3 -2
- package/dist/layouts/clothing/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/clothing/pages/ProductsPage.js +56 -70
- package/dist/layouts/clothing-minimal/components/ClothingHomePageMinimal.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/components/ClothingHomePageMinimal.js +4 -3
- package/dist/layouts/clothing-minimal/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/pages/AboutPage.js +2 -1
- package/dist/layouts/clothing-minimal/pages/CategoriesPage.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/pages/CategoriesPage.js +3 -2
- package/dist/layouts/clothing-minimal/pages/CategoryPage.d.ts +3 -1
- package/dist/layouts/clothing-minimal/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/pages/CategoryPage.js +4 -3
- package/dist/layouts/clothing-minimal/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/pages/ProductDetailPage.js +2 -1
- package/dist/layouts/clothing-minimal/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/pages/ProductsPage.js +56 -70
- package/dist/layouts/electronics/components/ElectronicsHomePage.d.ts.map +1 -1
- package/dist/layouts/electronics/components/ElectronicsHomePage.js +2 -1
- package/dist/layouts/electronics/components/ElectronicsProductsPage.d.ts.map +1 -1
- package/dist/layouts/electronics/components/ElectronicsProductsPage.js +45 -36
- package/dist/layouts/electronics/components/ElectronicsStoreFooter.d.ts.map +1 -1
- package/dist/layouts/electronics/components/ElectronicsStoreFooter.js +2 -1
- package/dist/layouts/electronics/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/electronics/pages/AboutPage.js +3 -1
- package/dist/layouts/electronics/pages/CategoryPage.d.ts +3 -1
- package/dist/layouts/electronics/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/electronics/pages/CategoryPage.js +4 -3
- package/dist/layouts/electronics/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/electronics/pages/ProductDetailPage.js +2 -1
- package/dist/layouts/electronics/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/electronics/pages/ProductsPage.js +56 -70
- package/dist/layouts/electronics-grid/components/ElectronicsHomePageGrid.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/components/ElectronicsHomePageGrid.js +2 -1
- package/dist/layouts/electronics-grid/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/pages/AboutPage.js +3 -1
- package/dist/layouts/electronics-grid/pages/CategoryPage.d.ts +3 -1
- package/dist/layouts/electronics-grid/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/pages/CategoryPage.js +4 -3
- package/dist/layouts/electronics-grid/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/pages/ProductDetailPage.js +2 -1
- package/dist/layouts/electronics-grid/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/pages/ProductsPage.js +56 -70
- package/dist/layouts/food/components/FoodHomePage.d.ts.map +1 -1
- package/dist/layouts/food/components/FoodHomePage.js +6 -4
- package/dist/layouts/food/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/food/pages/AboutPage.js +2 -1
- package/dist/layouts/food/pages/CategoryPage.d.ts +3 -1
- package/dist/layouts/food/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/food/pages/CategoryPage.js +5 -3
- package/dist/layouts/food/pages/MenuPage.js +1 -1
- package/dist/layouts/food/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/food/pages/ProductDetailPage.js +2 -1
- package/dist/layouts/food/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/food/pages/ProductsPage.js +54 -63
- package/dist/layouts/food-modern/components/FoodHomePageModern.d.ts.map +1 -1
- package/dist/layouts/food-modern/components/FoodHomePageModern.js +4 -2
- package/dist/layouts/food-modern/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/food-modern/pages/AboutPage.js +3 -1
- package/dist/layouts/food-modern/pages/CategoryPage.d.ts +3 -1
- package/dist/layouts/food-modern/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/food-modern/pages/CategoryPage.js +5 -3
- package/dist/layouts/food-modern/pages/MenuPage.js +1 -1
- package/dist/layouts/food-modern/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/food-modern/pages/ProductDetailPage.js +2 -1
- package/dist/layouts/food-modern/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/food-modern/pages/ProductsPage.js +54 -63
- package/dist/layouts/motivational-speaker/components/MotivationalHomePage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/components/MotivationalHomePage.js +4 -2
- package/dist/layouts/motivational-speaker/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/AboutPage.js +3 -1
- package/dist/layouts/motivational-speaker/pages/CategoryPage.d.ts +3 -1
- package/dist/layouts/motivational-speaker/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/CategoryPage.js +6 -4
- package/dist/layouts/motivational-speaker/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/ProductsPage.js +56 -70
- package/dist/layouts/motivational-speaker/pages/ServiceDetailPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/ServiceDetailPage.js +2 -1
- package/dist/layouts/motivational-speaker/pages/ServicesPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/ServicesPage.js +4 -2
- package/dist/layouts/motivational-speaker/pages/SubscriptionPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/SubscriptionPage.js +3 -2
- package/dist/layouts/shared/components/StoreFooter.d.ts.map +1 -1
- package/dist/layouts/shared/components/StoreFooter.js +3 -13
- package/dist/layouts/shared/pages/PortfolioPage.d.ts.map +1 -1
- package/dist/layouts/shared/pages/PortfolioPage.js +2 -1
- package/dist/layouts/shared/pages/StoreMaintenanceScreen.d.ts +9 -0
- package/dist/layouts/shared/pages/StoreMaintenanceScreen.d.ts.map +1 -0
- package/dist/layouts/shared/pages/StoreMaintenanceScreen.js +10 -0
- package/dist/layouts/shared/pages/StoreOfflinePage.d.ts +19 -0
- package/dist/layouts/shared/pages/StoreOfflinePage.d.ts.map +1 -0
- package/dist/layouts/shared/pages/StoreOfflinePage.js +113 -0
- package/dist/layouts/shared/pages/WishlistPage.d.ts.map +1 -1
- package/dist/layouts/shared/pages/WishlistPage.js +11 -14
- package/dist/lib/content-selectors.js +3 -3
- package/dist/lib/layout-route-utils.d.ts +1 -0
- package/dist/lib/layout-route-utils.d.ts.map +1 -1
- package/dist/lib/layout-route-utils.js +1 -1
- package/dist/lib/services/product.service.d.ts +1 -0
- package/dist/lib/services/product.service.d.ts.map +1 -1
- package/dist/lib/store-context.d.ts +1 -0
- package/dist/lib/store-context.d.ts.map +1 -1
- package/dist/lib/store-context.js +1 -0
- package/dist/lib/store-types.d.ts +1 -0
- package/dist/lib/store-types.d.ts.map +1 -1
- package/dist/lib/utils/catalog-price-bounds.d.ts +2 -0
- package/dist/lib/utils/catalog-price-bounds.d.ts.map +1 -1
- package/dist/lib/utils/catalog-price-bounds.js +21 -0
- package/dist/lib/utils/filtered-product-query.d.ts +35 -0
- package/dist/lib/utils/filtered-product-query.d.ts.map +1 -0
- package/dist/lib/utils/filtered-product-query.js +88 -0
- package/dist/lib/utils/filtered-products-inflight.d.ts +3 -0
- package/dist/lib/utils/filtered-products-inflight.d.ts.map +1 -0
- package/dist/lib/utils/filtered-products-inflight.js +15 -0
- package/dist/lib/utils/url-helpers.d.ts.map +1 -1
- package/dist/lib/utils/url-helpers.js +2 -11
- package/dist/styles/index.css +33 -6
- package/package.json +2 -2
|
@@ -13,10 +13,12 @@ import { ProductCard } from '../../../components/ui/product-card.js';
|
|
|
13
13
|
import { getLayoutText, getTextContent } from '../../../lib/utils/asset-helpers.js';
|
|
14
14
|
import { formatCurrency, filterActiveServices } from '../../../lib/utils/index.js';
|
|
15
15
|
import Image from 'next/image';
|
|
16
|
-
|
|
16
|
+
import { CategoryDescription } from '../../../components/rich-text/CategoryDescription.js';
|
|
17
|
+
import { RichTextExcerpt } from '../../../components/rich-text/RichTextExcerpt.js';
|
|
18
|
+
export function CategoryPage({ storeConfig, categorySlug, categoryProductsSeed }) {
|
|
17
19
|
const categories = storeConfig.categories || [];
|
|
18
20
|
const category = categories.find(c => c.slug === categorySlug);
|
|
19
|
-
const { products, isLoading, hasMore, loadMore } = useCategoryProducts(storeConfig.id, category?.id);
|
|
21
|
+
const { products, isLoading, hasMore, loadMore } = useCategoryProducts(storeConfig.id, category?.id, categoryProductsSeed);
|
|
20
22
|
const services = filterActiveServices(storeConfig.services?.filter(s => s.categoryId === category?.id) || []);
|
|
21
23
|
const { addToCart } = useStore();
|
|
22
24
|
const { addToast } = useToast();
|
|
@@ -57,12 +59,12 @@ export function CategoryPage({ storeConfig, categorySlug }) {
|
|
|
57
59
|
const isDarkTheme = storeConfig.type === 'food-modern' || storeConfig.branding.theme === 'dark';
|
|
58
60
|
const bgColor = isDarkTheme ? 'bg-[#0F0F0F]' : 'bg-gray-50';
|
|
59
61
|
const textColor = isDarkTheme ? 'text-white' : 'text-gray-900';
|
|
60
|
-
return (_jsxs("div", { className: `min-h-screen ${bgColor} ${textColor} transition-colors duration-300`, children: [_jsxs("div", { className: "relative h-[40vh] overflow-hidden", children: [_jsx(ImageWithFallback, { src: category.image, alt: category.name, className: "w-full h-full object-cover", skeletonAspectRatio: "16/9" }), _jsx("div", { className: `absolute inset-0 ${isDarkTheme ? 'bg-black/60' : 'bg-black/40'} backdrop-blur-[2px]` }), _jsxs("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-center p-6 text-white", children: [_jsx("h1", { className: "text-5xl md:text-7xl font-bold tracking-tight mb-4", children: category.name }),
|
|
62
|
+
return (_jsxs("div", { className: `min-h-screen ${bgColor} ${textColor} transition-colors duration-300`, children: [_jsxs("div", { className: "relative h-[40vh] overflow-hidden", children: [_jsx(ImageWithFallback, { src: category.image, alt: category.name, className: "w-full h-full object-cover", skeletonAspectRatio: "16/9" }), _jsx("div", { className: `absolute inset-0 ${isDarkTheme ? 'bg-black/60' : 'bg-black/40'} backdrop-blur-[2px]` }), _jsxs("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-center p-6 text-white", children: [_jsx("h1", { className: "text-5xl md:text-7xl font-bold tracking-tight mb-4", children: category.name }), _jsx(CategoryDescription, { description: category.description })] })] }), _jsxs("div", { className: "container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-12", children: [_jsxs("div", { className: "flex flex-col md:flex-row justify-between items-center mb-10 gap-4", children: [_jsxs(Link, { href: `/${storeConfig.slug}/categories`, className: `inline-flex items-center text-sm font-medium ${isDarkTheme ? 'text-gray-400 hover:text-white' : 'text-gray-600 hover:text-gray-900'}`, children: [_jsx(ArrowLeft, { className: "h-4 w-4 mr-2" }), "Back to All Categories"] }), _jsx("div", { className: "flex items-center gap-4", children: _jsxs(Button, { variant: "outline", className: `${isDarkTheme ? 'border-white/20 text-white hover:bg-white/10' : 'bg-white'}`, children: [_jsx(Filter, { className: "h-4 w-4 mr-2" }), " Filter"] }) })] }), !hasItems ? (_jsxs("div", { className: "text-center py-20 border border-dashed border-gray-300 rounded-3xl", children: [_jsx("p", { className: "text-gray-500 text-lg", children: (() => {
|
|
61
63
|
const itemType = isServiceStore ? 'services' : 'products';
|
|
62
64
|
const defaultMessage = isServiceStore
|
|
63
65
|
? 'No services found in this category.'
|
|
64
66
|
: 'No products found in this category.';
|
|
65
67
|
// Try to get from layout config, fallback to default
|
|
66
68
|
return getLayoutText(storeConfig, `sections.categories.emptyState.${itemType}`, getTextContent(storeConfig, `category_empty_${itemType}`, defaultMessage));
|
|
67
|
-
})() }), _jsx(Button, { className: "mt-4", onClick: () => window.history.back(), children: "Go Back" })] })) : (_jsxs(_Fragment, { children: [_jsxs("div", { className: "space-y-12", children: [shouldShowServices && services.length > 0 && (_jsxs("div", { children: [_jsx("h2", { className: "text-2xl font-bold mb-6", children: isServiceStore ? 'Services' : 'Services in this Category' }), _jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8", children: services.map((service) => (_jsxs("div", { className: "group flex flex-col h-full", children: [_jsxs(Link, { href: `/${storeConfig.slug}/book?service=${service.slug}`, className: "block relative aspect-[4/3] rounded-2xl overflow-hidden bg-gray-100 mb-4 shadow-sm group-hover:shadow-xl transition-all duration-500", children: [_jsx(Image, { src: service.image || 'https://images.unsplash.com/photo-1629909613654-28e377c37b09?w=800&auto=format&fit=crop&q=60', alt: service.name, fill: true, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-105" }), _jsx("div", { className: "absolute bottom-4 left-4 bg-white/95 backdrop-blur px-4 py-2 rounded-full text-sm font-bold shadow-sm text-gray-900", children: formatCurrency(service.price, service.currency || storeConfig.settings?.currency || 'USD') }), _jsx("div", { className: "absolute inset-0 bg-black/20 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-center justify-center", children: _jsx(Button, { className: "rounded-full bg-white text-black hover:bg-gray-100 transform translate-y-4 group-hover:translate-y-0 transition-all duration-300 shadow-lg font-bold px-8", children: "Book Now" }) })] }), _jsxs("div", { className: "flex flex-col flex-1", children: [_jsx(Link, { href: `/${storeConfig.slug}/book?service=${service.slug}`, children: _jsx("h3", { className: "text-xl font-bold text-gray-900 mb-2 group-hover:text-gray-600 transition-colors", children: service.name }) }), _jsx("p",
|
|
69
|
+
})() }), _jsx(Button, { className: "mt-4", onClick: () => window.history.back(), children: "Go Back" })] })) : (_jsxs(_Fragment, { children: [_jsxs("div", { className: "space-y-12", children: [shouldShowServices && services.length > 0 && (_jsxs("div", { children: [_jsx("h2", { className: "text-2xl font-bold mb-6", children: isServiceStore ? 'Services' : 'Services in this Category' }), _jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8", children: services.map((service) => (_jsxs("div", { className: "group flex flex-col h-full", children: [_jsxs(Link, { href: `/${storeConfig.slug}/book?service=${service.slug}`, className: "block relative aspect-[4/3] rounded-2xl overflow-hidden bg-gray-100 mb-4 shadow-sm group-hover:shadow-xl transition-all duration-500", children: [_jsx(Image, { src: service.image || 'https://images.unsplash.com/photo-1629909613654-28e377c37b09?w=800&auto=format&fit=crop&q=60', alt: service.name, fill: true, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-105" }), _jsx("div", { className: "absolute bottom-4 left-4 bg-white/95 backdrop-blur px-4 py-2 rounded-full text-sm font-bold shadow-sm text-gray-900", children: formatCurrency(service.price, service.currency || storeConfig.settings?.currency || 'USD') }), _jsx("div", { className: "absolute inset-0 bg-black/20 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-center justify-center", children: _jsx(Button, { className: "rounded-full bg-white text-black hover:bg-gray-100 transform translate-y-4 group-hover:translate-y-0 transition-all duration-300 shadow-lg font-bold px-8", children: "Book Now" }) })] }), _jsxs("div", { className: "flex flex-col flex-1", children: [_jsx(Link, { href: `/${storeConfig.slug}/book?service=${service.slug}`, children: _jsx("h3", { className: "text-xl font-bold text-gray-900 mb-2 group-hover:text-gray-600 transition-colors", children: service.name }) }), _jsx(RichTextExcerpt, { value: service.description, as: "p", className: "text-gray-500 mb-4 line-clamp-2 leading-relaxed text-sm flex-1" }), _jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-100 text-sm font-medium text-gray-500", children: [_jsxs("div", { className: "flex items-center gap-4", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Clock, { className: "w-4 h-4 text-gray-400" }), service.duration, " mins"] }), service.provider && service.provider.rating && (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Star, { className: "w-4 h-4 fill-gray-200 text-gray-200" }), service.provider.rating] }))] }), _jsxs(Link, { href: `/${storeConfig.slug}/book?service=${service.slug}`, className: "flex items-center gap-2 text-black font-bold group/link", children: ["Book ", _jsx(ArrowRight, { className: "w-4 h-4 transition-transform group-hover/link:translate-x-1" })] })] })] })] }, service.id))) })] })), shouldShowProducts && products.length > 0 && (_jsxs("div", { children: [shouldShowServices && services.length > 0 && (_jsx("h2", { className: "text-2xl font-bold mb-6", children: "Products in this Category" })), _jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-8", children: products.map((product) => (_jsx(ProductCard, { product: product, storeSlug: storeConfig.slug, onAddToCart: handleAddToCart, onQuickView: handleQuickView }, product.id))) })] }))] }), hasMore && (_jsx("div", { className: "mt-10 flex justify-center", children: _jsx(Button, { onClick: loadMore, disabled: isLoading, children: "Load more" }) }))] }))] })] }));
|
|
68
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductsPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/motivational-speaker/pages/ProductsPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAgB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ProductsPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/motivational-speaker/pages/ProductsPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAiC9D,UAAU,iBAAiB;IACzB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAuvBD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,+BAMpD"}
|
|
@@ -13,14 +13,17 @@ import { useLoading } from '../../../lib/loading-context.js';
|
|
|
13
13
|
import { useAnalytics } from '../../../hooks/use-analytics.js';
|
|
14
14
|
import { ChevronDown, ChevronUp, Star, Check, Search, RotateCcw, SlidersHorizontal } from 'lucide-react';
|
|
15
15
|
import { useSearchParams } from 'next/navigation';
|
|
16
|
-
import { useState, useMemo, useEffect,
|
|
16
|
+
import { useState, useMemo, useEffect, Suspense } from 'react';
|
|
17
17
|
import { useProductBrands } from '../../../hooks/use-product-brands.js';
|
|
18
|
+
import { useFilteredProductsFetch } from '../../../hooks/use-filtered-products-fetch.js';
|
|
18
19
|
import { filterActiveProducts } from '../../../lib/utils/index.js';
|
|
19
20
|
import { getAllCategoryIds, flattenCategoryTree, buildCategoryTree } from '../../../lib/utils/category-tree.js';
|
|
20
21
|
import { getBannerImage, getLayoutText } from '../../../lib/utils/asset-helpers.js';
|
|
21
22
|
import { shouldUseAPI } from '../../../lib/utils/demo-detection.js';
|
|
22
23
|
import { useCatalogPriceRange } from '../../../hooks/use-catalog-price-range.js';
|
|
23
|
-
import { isWithinActivePriceRange } from '../../../lib/utils/catalog-price-bounds.js';
|
|
24
|
+
import { getApiPriceFilterActive, isWithinActivePriceRange } from '../../../lib/utils/catalog-price-bounds.js';
|
|
25
|
+
import { buildFilteredProductQuery, getFilteredProductQueryKey, productMatchesCategoryIds, productMatchesCategorySlug, } from '../../../lib/utils/filtered-product-query.js';
|
|
26
|
+
import { transformProductToStoreProduct } from '../../../lib/store-config-utils.js';
|
|
24
27
|
import { ProductPriceFilterSection } from '../../shared/components/ProductPriceFilterSection';
|
|
25
28
|
function ProductsPageContent({ storeConfig }) {
|
|
26
29
|
const searchParams = useSearchParams();
|
|
@@ -62,7 +65,9 @@ function ProductsPageContent({ storeConfig }) {
|
|
|
62
65
|
const [selectedBrands, setSelectedBrands] = useState([]);
|
|
63
66
|
const [selectedCategories, setSelectedCategories] = useState([]);
|
|
64
67
|
const storeCurrency = storeConfig.settings?.currency || 'NGN';
|
|
65
|
-
const
|
|
68
|
+
const bootstrapProducts = useMemo(() => filterActiveProducts(storeConfig.products || []), [storeConfig.products]);
|
|
69
|
+
const priceCatalogItems = bootstrapProducts.length > 0 ? bootstrapProducts : products;
|
|
70
|
+
const { priceRange, setPriceRange, catalogBounds, resetPriceRange, hasActivePriceFilter, } = useCatalogPriceRange(priceCatalogItems);
|
|
66
71
|
const [selectedCategoryFilter, setSelectedCategoryFilter] = useState(null);
|
|
67
72
|
// Initialize filters from URL
|
|
68
73
|
useEffect(() => {
|
|
@@ -76,7 +81,6 @@ function ProductsPageContent({ storeConfig }) {
|
|
|
76
81
|
const [isFilterOpen, setIsFilterOpen] = useState(false);
|
|
77
82
|
const [sortBy, setSortBy] = useState('featured');
|
|
78
83
|
const [visibleProducts, setVisibleProducts] = useState(12);
|
|
79
|
-
const [isFiltering, setIsFiltering] = useState(false);
|
|
80
84
|
// Fallback brands from the loaded page; full catalog brands come from the brands API.
|
|
81
85
|
const fallbackBrands = useMemo(() => {
|
|
82
86
|
const brandSet = new Set();
|
|
@@ -91,12 +95,6 @@ function ProductsPageContent({ storeConfig }) {
|
|
|
91
95
|
return Array.from(brandSet).sort();
|
|
92
96
|
}, [products]);
|
|
93
97
|
const brands = useProductBrands(storeConfig.id, fallbackBrands);
|
|
94
|
-
// Track filter changes and show loading
|
|
95
|
-
useEffect(() => {
|
|
96
|
-
setIsFiltering(true);
|
|
97
|
-
const timer = setTimeout(() => setIsFiltering(false), 300);
|
|
98
|
-
return () => clearTimeout(timer);
|
|
99
|
-
}, [selectedBrands, selectedCategories, priceRange, selectedCategoryFilter, minRating, showInStockOnly, sortBy]);
|
|
100
98
|
// Build category tree for filtering
|
|
101
99
|
const categoryTree = useMemo(() => buildCategoryTree(categories), [categories]);
|
|
102
100
|
// Get all category IDs to filter (including children of selected parent categories)
|
|
@@ -129,7 +127,7 @@ function ProductsPageContent({ storeConfig }) {
|
|
|
129
127
|
}
|
|
130
128
|
// Category filter (Sidebar) - includes parent and child categories
|
|
131
129
|
if (effectiveCategoryIds.length > 0) {
|
|
132
|
-
if (!
|
|
130
|
+
if (!productMatchesCategoryIds(product, effectiveCategoryIds)) {
|
|
133
131
|
return false;
|
|
134
132
|
}
|
|
135
133
|
}
|
|
@@ -140,7 +138,7 @@ function ProductsPageContent({ storeConfig }) {
|
|
|
140
138
|
// Category Filter (Top Buttons)
|
|
141
139
|
if (selectedCategoryFilter) {
|
|
142
140
|
const category = categories.find(c => c.slug === selectedCategoryFilter);
|
|
143
|
-
if (
|
|
141
|
+
if (!productMatchesCategorySlug(product, category)) {
|
|
144
142
|
return false;
|
|
145
143
|
}
|
|
146
144
|
}
|
|
@@ -180,64 +178,52 @@ function ProductsPageContent({ storeConfig }) {
|
|
|
180
178
|
}
|
|
181
179
|
return result;
|
|
182
180
|
}, [products, selectedBrands, effectiveCategoryIds, priceRange, selectedCategoryFilter, minRating, showInStockOnly, sortBy, categories]);
|
|
183
|
-
const
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
return {
|
|
181
|
+
const hasApiPriceFilter = getApiPriceFilterActive(priceRange, bootstrapProducts);
|
|
182
|
+
const priceQueryMin = hasApiPriceFilter ? priceRange[0] : undefined;
|
|
183
|
+
const priceQueryMax = hasApiPriceFilter ? priceRange[1] : undefined;
|
|
184
|
+
const { productQueryParams, productQueryKey } = useMemo(() => {
|
|
185
|
+
const params = buildFilteredProductQuery({
|
|
189
186
|
storeId: storeConfig.id,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
187
|
+
categories,
|
|
188
|
+
effectiveCategoryIds,
|
|
189
|
+
selectedCategoryFilter,
|
|
190
|
+
selectedBrands,
|
|
191
|
+
priceRange,
|
|
192
|
+
hasActivePriceFilter: hasApiPriceFilter,
|
|
193
|
+
minRating,
|
|
194
|
+
showInStockOnly,
|
|
196
195
|
sortBy,
|
|
196
|
+
});
|
|
197
|
+
return {
|
|
198
|
+
productQueryParams: params,
|
|
199
|
+
productQueryKey: getFilteredProductQueryKey(params),
|
|
197
200
|
};
|
|
198
|
-
}, [
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
setProducts(response.data.map(transformProductToStoreProduct));
|
|
225
|
-
setCurrentPage(1);
|
|
226
|
-
setTotalProducts(response.meta.total);
|
|
227
|
-
setVisibleProducts(12);
|
|
228
|
-
}
|
|
229
|
-
catch (error) {
|
|
230
|
-
if (!cancelled)
|
|
231
|
-
console.error('Failed to fetch products:', error);
|
|
232
|
-
}
|
|
233
|
-
finally {
|
|
234
|
-
if (!cancelled)
|
|
235
|
-
setIsLoadingProducts(false);
|
|
236
|
-
}
|
|
237
|
-
};
|
|
238
|
-
fetchFilteredProducts();
|
|
239
|
-
return () => { cancelled = true; };
|
|
240
|
-
}, [productQuery]);
|
|
201
|
+
}, [
|
|
202
|
+
storeConfig.id,
|
|
203
|
+
categories,
|
|
204
|
+
effectiveCategoryIds,
|
|
205
|
+
selectedCategoryFilter,
|
|
206
|
+
selectedBrands,
|
|
207
|
+
hasApiPriceFilter,
|
|
208
|
+
priceQueryMin,
|
|
209
|
+
priceQueryMax,
|
|
210
|
+
minRating,
|
|
211
|
+
showInStockOnly,
|
|
212
|
+
sortBy,
|
|
213
|
+
]);
|
|
214
|
+
useFilteredProductsFetch(productQueryParams, productQueryKey, {
|
|
215
|
+
bootstrapItemCount: bootstrapProducts.length,
|
|
216
|
+
bootstrapTotal: storeConfig.productsTotal,
|
|
217
|
+
mapResponse: (data) => data.map(transformProductToStoreProduct),
|
|
218
|
+
applyResults: (items, total) => {
|
|
219
|
+
setProducts(items);
|
|
220
|
+
setCurrentPage(1);
|
|
221
|
+
setTotalProducts(total);
|
|
222
|
+
setVisibleProducts(12);
|
|
223
|
+
},
|
|
224
|
+
setTotalProducts,
|
|
225
|
+
setLoading: setIsLoadingProducts,
|
|
226
|
+
});
|
|
241
227
|
const displayedProducts = filteredAndSortedProducts.slice(0, visibleProducts);
|
|
242
228
|
const hasMore = currentPage * 12 < totalProducts;
|
|
243
229
|
const handleLoadMore = async () => {
|
|
@@ -248,7 +234,7 @@ function ProductsPageContent({ storeConfig }) {
|
|
|
248
234
|
const { productService } = await import('../../../lib/services/product.service.js');
|
|
249
235
|
const { transformProductToStoreProduct } = await import('../../../lib/store-config-utils.js');
|
|
250
236
|
const nextPage = currentPage + 1;
|
|
251
|
-
const response = await productService.getProducts({ ...
|
|
237
|
+
const response = await productService.getProducts({ ...productQueryParams, page: nextPage, limit: 12 });
|
|
252
238
|
setProducts((current) => [...current, ...response.data.map(transformProductToStoreProduct)]);
|
|
253
239
|
setCurrentPage(nextPage);
|
|
254
240
|
setTotalProducts(response.meta.total);
|
|
@@ -318,7 +304,7 @@ function ProductsPageContent({ storeConfig }) {
|
|
|
318
304
|
const secondaryButtonText = hasSecondaryButtonFromConfig
|
|
319
305
|
? (categoryHeaderSecondaryButton && categoryHeaderSecondaryButton.trim() !== '' ? categoryHeaderSecondaryButton.trim() : null)
|
|
320
306
|
: getLayoutText(storeConfig, 'sections.categories.viewAll', 'View Categories');
|
|
321
|
-
return (_jsxs("div", { className: "min-h-screen bg-white font-sans text-slate-900", children: [_jsxs("div", { className: "relative overflow-hidden bg-white", children: [categoryHeaderImage && (_jsxs("div", { className: "absolute inset-0 z-0", children: [_jsx(ImageWithFallback, { src: categoryHeaderImage, alt: categoryHeaderTitle || storeConfig.name, className: "w-full h-full object-cover", skeletonAspectRatio: "16/9" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-black/60 via-black/40 to-black/60" })] })), !categoryHeaderImage && (_jsxs("div", { className: "absolute top-0 left-0 w-full h-full overflow-hidden z-0 pointer-events-none", children: [_jsx("div", { className: "absolute top-[-10%] right-[-5%] w-[500px] h-[500px] bg-gray-100 rounded-full mix-blend-multiply filter blur-3xl opacity-70 animate-pulse-slow" }), _jsx("div", { className: "absolute bottom-[-10%] left-[-10%] w-[400px] h-[400px] bg-gray-50 rounded-full mix-blend-multiply filter blur-3xl opacity-70 animate-pulse-slow", style: { animationDelay: '2s' } })] })), _jsx("div", { className: `container mx-auto px-4 sm:px-6 lg:px-8 relative z-10 pt-12 pb-16 lg:pt-20 lg:pb-24 ${categoryHeaderImage ? 'min-h-[500px] flex items-center' : ''}`, children: _jsx("div", { className: "flex flex-col items-center w-full max-w-4xl mx-auto", children: _jsxs("div", { className: `w-full text-center lg:text-left animate-fade-in-up ${categoryHeaderImage ? 'text-white' : ''}`, children: [_jsx("div", { className: "flex justify-center lg:justify-start mb-6", children: _jsx("div", { className: categoryHeaderImage ? 'bg-white/10 backdrop-blur-md px-4 py-2 rounded-full border border-white/20' : '', children: _jsx(Breadcrumbs, { items: breadcrumbItems, variant: categoryHeaderImage ? 'light' : 'default' }) }) }),
|
|
307
|
+
return (_jsxs("div", { className: "min-h-screen bg-white font-sans text-slate-900", children: [_jsxs("div", { className: "relative overflow-hidden bg-white", children: [categoryHeaderImage && (_jsxs("div", { className: "absolute inset-0 z-0", children: [_jsx(ImageWithFallback, { src: categoryHeaderImage, alt: categoryHeaderTitle || storeConfig.name, className: "w-full h-full object-cover", skeletonAspectRatio: "16/9" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-black/60 via-black/40 to-black/60" })] })), !categoryHeaderImage && (_jsxs("div", { className: "absolute top-0 left-0 w-full h-full overflow-hidden z-0 pointer-events-none", children: [_jsx("div", { className: "absolute top-[-10%] right-[-5%] w-[500px] h-[500px] bg-gray-100 rounded-full mix-blend-multiply filter blur-3xl opacity-70 animate-pulse-slow" }), _jsx("div", { className: "absolute bottom-[-10%] left-[-10%] w-[400px] h-[400px] bg-gray-50 rounded-full mix-blend-multiply filter blur-3xl opacity-70 animate-pulse-slow", style: { animationDelay: '2s' } })] })), _jsx("div", { className: `container mx-auto px-4 sm:px-6 lg:px-8 relative z-10 pt-12 pb-16 lg:pt-20 lg:pb-24 ${categoryHeaderImage ? 'min-h-[500px] flex items-center' : ''}`, children: _jsx("div", { className: "flex flex-col items-center w-full max-w-4xl mx-auto", children: _jsxs("div", { className: `w-full text-center lg:text-left animate-fade-in-up ${categoryHeaderImage ? 'text-white' : ''}`, children: [_jsx("div", { className: "flex justify-center lg:justify-start mb-6", children: _jsx("div", { className: categoryHeaderImage ? 'bg-white/10 backdrop-blur-md px-4 py-2 rounded-full border border-white/20' : '', children: _jsx(Breadcrumbs, { items: breadcrumbItems, variant: categoryHeaderImage ? 'light' : 'default' }) }) }), _jsx("h1", { className: `text-4xl sm:text-5xl lg:text-6xl font-bold tracking-tight mb-6 leading-[1.1] ${categoryHeaderImage ? 'text-white' : 'text-gray-900'}`, children: categoryHeaderTitle || (_jsxs(_Fragment, { children: ["Explore The Collections of ", _jsx("br", {}), _jsx("span", { className: "text-transparent bg-clip-text bg-gradient-to-r from-gray-900 via-gray-700 to-gray-900", children: storeConfig.name })] })) }), _jsx("p", { className: `text-lg mb-8 leading-relaxed max-w-lg mx-auto lg:mx-0 ${categoryHeaderImage ? 'text-white/90' : 'text-gray-600'}`, children: getLayoutText(storeConfig, 'category_header:description', "Don't miss out on shopping our latest collection! curated for quality and style. Experience the perfect blend of modern aesthetics and premium craftsmanship.") }), _jsxs("div", { className: "flex flex-col sm:flex-row gap-4 justify-center lg:justify-start", children: [primaryButtonText && primaryButtonText.trim() !== '' && (_jsx(Button, { className: `h-12 px-8 rounded-full text-base font-medium shadow-lg hover:shadow-xl transition-all duration-300 transform hover:-translate-y-1 ${categoryHeaderImage ? 'bg-white text-gray-900 hover:bg-gray-100' : ''}`, onClick: () => {
|
|
322
308
|
const element = document.getElementById('product-grid');
|
|
323
309
|
element?.scrollIntoView({ behavior: 'smooth' });
|
|
324
310
|
}, children: primaryButtonText })), secondaryButtonText && secondaryButtonText.trim() !== '' && (_jsx(Button, { className: `h-12 px-8 rounded-full text-base font-medium shadow-lg hover:shadow-xl transition-all duration-300 transform hover:-translate-y-1 ${categoryHeaderImage ? 'bg-white/10 backdrop-blur-md text-white border border-white/30 hover:bg-white/20' : 'bg-gray-100 text-gray-900 hover:bg-gray-200 border border-gray-200'}`, onClick: () => {
|
|
@@ -331,7 +317,7 @@ function ProductsPageContent({ storeConfig }) {
|
|
|
331
317
|
setSelectedCategories(prev => isSelected
|
|
332
318
|
? [...prev, categoryId]
|
|
333
319
|
: prev.filter(id => id !== categoryId));
|
|
334
|
-
}, mode: "checkbox" })] }), _jsx(ProductPriceFilterSection, { currency: storeCurrency, priceRange: priceRange, onPriceRangeChange: setPriceRange, bounds: catalogBounds, isFilterActive: hasActivePriceFilter, onReset: resetPriceRange }), _jsxs("div", { children: [_jsx("h3", { className: "text-sm font-semibold text-gray-900 uppercase tracking-wide mb-4", children: "Rating" }), _jsx("div", { className: "space-y-2", children: [4, 3, 2, 1].map((rating) => (_jsxs("label", { className: "flex items-center gap-3 cursor-pointer group p-2 -ml-2 rounded-lg hover:bg-blue-50 hover:text-blue-600 transition-colors", children: [_jsx("div", { className: `w-5 h-5 rounded-full border flex items-center justify-center transition-colors ${minRating === rating ? 'border-blue-600 bg-blue-600' : 'border-gray-300 group-hover:border-blue-400'}`, children: minRating === rating && _jsx("div", { className: "w-2.5 h-2.5 bg-white rounded-full" }) }), _jsx("input", { type: "radio", name: "rating", checked: minRating === rating, onChange: () => setMinRating(minRating === rating ? null : rating), className: "hidden" }), _jsxs("div", { className: "flex items-center gap-1", children: [_jsx("div", { className: "flex text-yellow-400", children: Array.from({ length: 5 }).map((_, i) => (_jsx(Star, { className: `h-3.5 w-3.5 ${i < rating ? 'fill-current' : 'text-gray-200 fill-gray-200'}` }, i))) }), _jsx("span", { className: "text-sm text-gray-600", children: "& Up" })] })] }, rating))) })] })] }), _jsxs("div", { className: "lg:col-span-3", children: [_jsxs("div", { className: "lg:hidden mb-6 flex items-center justify-between", children: [_jsxs(Button, { onClick: () => setIsFilterOpen(true), variant: "outline", className: "flex items-center gap-2", children: [_jsx(SlidersHorizontal, { className: "h-4 w-4" }), " Filters"] }), _jsxs("select", { value: sortBy, onChange: (e) => setSortBy(e.target.value), className: "bg-transparent text-sm font-medium text-gray-700 focus:outline-none", children: [_jsx("option", { value: "featured", children: "Sort by: Featured" }), _jsx("option", { value: "newest", children: "Sort by: Newest" }), _jsx("option", { value: "price-asc", children: "Sort by: Price Low-High" }), _jsx("option", { value: "price-desc", children: "Sort by: Price High-Low" })] })] }), _jsxs("div", { className: "hidden lg:flex items-center justify-between mb-6", children: [_jsxs("p", { className: "text-sm text-gray-600", children: ["Showing ", _jsx("span", { className: "font-semibold text-gray-900", children: filteredAndSortedProducts.length }), " products"] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-sm text-gray-500", children: "Sort by:" }), _jsxs("select", { value: sortBy, onChange: (e) => setSortBy(e.target.value), className: "bg-transparent text-sm font-medium text-gray-900 focus:outline-none cursor-pointer hover:text-blue-600 transition-colors", children: [_jsx("option", { value: "featured", children: "Featured" }), _jsx("option", { value: "newest", children: "Newest Arrivals" }), _jsx("option", { value: "price-asc", children: "Price: Low to High" }), _jsx("option", { value: "price-desc", children: "Price: High to Low" }), _jsx("option", { value: "rating", children: "Top Rated" })] })] })] }), isLoadingProducts
|
|
320
|
+
}, mode: "checkbox" })] }), _jsx(ProductPriceFilterSection, { currency: storeCurrency, priceRange: priceRange, onPriceRangeChange: setPriceRange, bounds: catalogBounds, isFilterActive: hasActivePriceFilter, onReset: resetPriceRange }), _jsxs("div", { children: [_jsx("h3", { className: "text-sm font-semibold text-gray-900 uppercase tracking-wide mb-4", children: "Rating" }), _jsx("div", { className: "space-y-2", children: [4, 3, 2, 1].map((rating) => (_jsxs("label", { className: "flex items-center gap-3 cursor-pointer group p-2 -ml-2 rounded-lg hover:bg-blue-50 hover:text-blue-600 transition-colors", children: [_jsx("div", { className: `w-5 h-5 rounded-full border flex items-center justify-center transition-colors ${minRating === rating ? 'border-blue-600 bg-blue-600' : 'border-gray-300 group-hover:border-blue-400'}`, children: minRating === rating && _jsx("div", { className: "w-2.5 h-2.5 bg-white rounded-full" }) }), _jsx("input", { type: "radio", name: "rating", checked: minRating === rating, onChange: () => setMinRating(minRating === rating ? null : rating), className: "hidden" }), _jsxs("div", { className: "flex items-center gap-1", children: [_jsx("div", { className: "flex text-yellow-400", children: Array.from({ length: 5 }).map((_, i) => (_jsx(Star, { className: `h-3.5 w-3.5 ${i < rating ? 'fill-current' : 'text-gray-200 fill-gray-200'}` }, i))) }), _jsx("span", { className: "text-sm text-gray-600", children: "& Up" })] })] }, rating))) })] })] }), _jsxs("div", { className: "lg:col-span-3", children: [_jsxs("div", { className: "lg:hidden mb-6 flex items-center justify-between", children: [_jsxs(Button, { onClick: () => setIsFilterOpen(true), variant: "outline", className: "flex items-center gap-2", children: [_jsx(SlidersHorizontal, { className: "h-4 w-4" }), " Filters"] }), _jsxs("select", { value: sortBy, onChange: (e) => setSortBy(e.target.value), className: "bg-transparent text-sm font-medium text-gray-700 focus:outline-none", children: [_jsx("option", { value: "featured", children: "Sort by: Featured" }), _jsx("option", { value: "newest", children: "Sort by: Newest" }), _jsx("option", { value: "price-asc", children: "Sort by: Price Low-High" }), _jsx("option", { value: "price-desc", children: "Sort by: Price High-Low" })] })] }), _jsxs("div", { className: "hidden lg:flex items-center justify-between mb-6", children: [_jsxs("p", { className: "text-sm text-gray-600", children: ["Showing ", _jsx("span", { className: "font-semibold text-gray-900", children: filteredAndSortedProducts.length }), " products"] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-sm text-gray-500", children: "Sort by:" }), _jsxs("select", { value: sortBy, onChange: (e) => setSortBy(e.target.value), className: "bg-transparent text-sm font-medium text-gray-900 focus:outline-none cursor-pointer hover:text-blue-600 transition-colors", children: [_jsx("option", { value: "featured", children: "Featured" }), _jsx("option", { value: "newest", children: "Newest Arrivals" }), _jsx("option", { value: "price-asc", children: "Price: Low to High" }), _jsx("option", { value: "price-desc", children: "Price: High to Low" }), _jsx("option", { value: "rating", children: "Top Rated" })] })] })] }), isLoadingProducts ? (_jsx(ProductGridSkeleton, { count: 12, columns: 3 })) : displayedProducts.length > 0 ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6", children: displayedProducts.map((product) => (_jsx(ProductCard, { product: product, storeSlug: storeConfig.slug, onAddToCart: handleAddToCart, onQuickView: handleQuickView }, product.id))) }), hasMore && (_jsx("div", { className: "mt-12 text-center", children: _jsx(Button, { onClick: handleLoadMore, variant: "outline", className: "min-w-[200px]", children: "Load More" }) }))] })) : (_jsxs("div", { className: "flex flex-col items-center justify-center py-20 bg-white rounded-lg border border-dashed border-gray-200 text-center", children: [_jsx("div", { className: "w-12 h-12 bg-gray-50 rounded-full flex items-center justify-center mb-4 text-gray-400", children: _jsx(Search, { className: "h-6 w-6" }) }), _jsx("h3", { className: "text-lg font-semibold text-gray-900 mb-1", children: "No products found" }), _jsx("p", { className: "text-sm text-gray-500 mb-6", children: "Try adjusting your filters or search criteria." }), _jsx(Button, { onClick: clearAllFilters, variant: "outline", children: "Clear All Filters" })] }))] })] })] }), _jsxs(Sheet, { isOpen: isFilterOpen, onClose: () => setIsFilterOpen(false), title: "Filters", side: "right", children: [_jsxs("div", { className: "flex flex-col h-full overflow-y-auto pb-20 space-y-8 p-1", children: [_jsxs("div", { className: "pb-6 border-b border-gray-100", children: [_jsx("h3", { className: "font-bold text-sm uppercase tracking-widest mb-4", children: "Availability" }), _jsxs("label", { className: "flex items-center gap-3", children: [_jsx("input", { type: "checkbox", checked: showInStockOnly, onChange: () => setShowInStockOnly(!showInStockOnly), className: "rounded border-gray-300 text-black focus:ring-black" }), _jsx("span", { className: "text-sm text-gray-700", children: "In Stock Only" })] })] }), _jsx(ProductPriceFilterSection, { currency: storeCurrency, priceRange: priceRange, onPriceRangeChange: setPriceRange, bounds: catalogBounds, isFilterActive: hasActivePriceFilter, onReset: resetPriceRange }), _jsxs("div", { children: [_jsx("h3", { className: "font-bold text-sm uppercase tracking-widest mb-4", children: "Categories" }), _jsx(CategoryTree, { categories: categories, selectedCategoryIds: selectedCategories, onCategoryToggle: (categoryId, isSelected) => {
|
|
335
321
|
setSelectedCategories(prev => isSelected
|
|
336
322
|
? [...prev, categoryId]
|
|
337
323
|
: prev.filter(id => id !== categoryId));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/motivational-speaker/pages/ServiceDetailPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAgB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ServiceDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/motivational-speaker/pages/ServiceDetailPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAiB9D,UAAU,sBAAsB;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,sBAAsB,+BA8hBrF"}
|
|
@@ -12,6 +12,7 @@ import Image from 'next/image';
|
|
|
12
12
|
import { formatCurrency, filterActiveServices } from '../../../lib/utils/index.js';
|
|
13
13
|
import { getServiceImage } from '../../../lib/utils/asset-helpers.js';
|
|
14
14
|
import { motion } from 'framer-motion';
|
|
15
|
+
import { SafeRichHtml } from '../../../components/rich-text/SafeRichHtml.js';
|
|
15
16
|
import Link from 'next/link';
|
|
16
17
|
import { cn } from '../../../lib/utils/index.js';
|
|
17
18
|
export function ServiceDetailPage({ storeConfig, serviceSlug }) {
|
|
@@ -117,7 +118,7 @@ export function ServiceDetailPage({ storeConfig, serviceSlug }) {
|
|
|
117
118
|
}
|
|
118
119
|
}
|
|
119
120
|
};
|
|
120
|
-
return (_jsx("div", { className: "min-h-screen bg-white", children: _jsxs("div", { className: "container mx-auto px-4 sm:px-6 lg:px-8 py-8 lg:py-12 max-w-7xl", children: [_jsx("div", { className: "mb-6", children: _jsx(Breadcrumbs, { items: breadcrumbItems }) }), _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-3 gap-8 lg:gap-12 mb-20", children: [_jsxs("div", { className: "lg:col-span-2 space-y-8", children: [_jsxs("div", { className: "relative aspect-video bg-black rounded-2xl overflow-hidden group shadow-2xl border border-gray-800", children: [isPlaying && hasAccess ? (_jsxs("div", { className: "absolute inset-0 bg-black flex items-center justify-center", children: [service.contentType === 'video' ? (_jsx("video", { src: service.contentUrl, controls: true, autoPlay: true, className: "w-full h-full object-contain", poster: getServiceImage(service.image, storeConfig, ""), children: "Your browser does not support the video tag." })) : service.contentType === 'audio' ? (_jsxs("div", { className: "w-full h-full flex flex-col items-center justify-center p-8 bg-gradient-to-br from-gray-900 to-slate-900 text-white", children: [_jsxs("div", { className: "w-32 h-32 bg-white/5 rounded-full flex items-center justify-center mb-6 backdrop-blur-xl border border-white/10 shadow-2xl relative", children: [_jsx(Headphones, { className: "w-12 h-12 text-white relative z-10" }), _jsx("div", { className: "absolute inset-0 bg-blue-500/20 rounded-full animate-ping opacity-20" })] }), _jsx("h3", { className: "text-xl font-bold mb-2", children: service.name }), _jsx("p", { className: "text-gray-400 mb-8", children: "Now Playing \u2022 Audiobook" }), _jsx("audio", { src: service.contentUrl, controls: true, autoPlay: true, className: "w-full max-w-md h-12" })] })) : (_jsxs("div", { className: "w-full h-full flex flex-col items-center justify-center p-8 bg-gray-50", children: [_jsx("div", { className: "w-24 h-24 bg-blue-100 rounded-2xl flex items-center justify-center mb-6 shadow-sm", children: _jsx(FileText, { className: "w-12 h-12 text-blue-600" }) }), _jsx("h3", { className: "text-2xl font-bold text-gray-900 mb-2", children: "Resource Ready" }), _jsx("p", { className: "text-gray-500 mb-8 text-center max-w-sm", children: "You have access to this premium guide. Download it below to start reading." }), _jsxs("a", { href: service.contentUrl, target: "_blank", rel: "noopener noreferrer", className: "bg-black text-white px-10 py-4 rounded-full font-bold hover:bg-gray-800 transition-all flex items-center gap-3 shadow-xl", children: [_jsx(Download, { className: "w-5 h-5" }), " Download PDF Guide"] })] })), _jsx("button", { onClick: () => setIsPlaying(false), className: "absolute top-6 right-6 bg-black/40 hover:bg-black/60 p-3 rounded-full backdrop-blur-md transition-all border border-white/10 group/close", title: "Close player", children: _jsx(X, { className: "w-5 h-5 text-white group-hover/close:rotate-90 transition-transform" }) })] })) : (_jsxs(_Fragment, { children: [_jsx(Image, { src: getServiceImage(service.image, storeConfig, "https://images.unsplash.com/photo-1516321318423-f06f85e504b3?w=800&auto=format&fit=crop"), alt: service.name, fill: true, className: "object-cover transition-transform duration-700 group-hover:scale-105 opacity-80" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/90 via-black/40 to-transparent" }), _jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: hasAccess ? (_jsxs(motion.button, { whileHover: { scale: 1.1 }, whileTap: { scale: 0.9 }, onClick: () => setIsPlaying(true), className: "w-24 h-24 rounded-full bg-white/10 backdrop-blur-xl flex items-center justify-center shadow-2xl hover:bg-white/20 transition-colors border border-white/30 relative group/play", children: [_jsx("div", { className: "absolute inset-0 bg-white/20 rounded-full blur-xl group-hover/play:blur-2xl transition-all" }), service.contentType === 'pdf' ? (_jsx(Download, { className: "w-10 h-10 text-white relative z-10" })) : (_jsx(Play, { className: "w-10 h-10 text-white ml-1 relative z-10", fill: "currentColor" }))] })) : (_jsxs("div", { className: "text-center p-6 backdrop-blur-md bg-black/40 rounded-3xl border border-white/10 max-w-sm mx-4", children: [_jsx("div", { className: "w-16 h-16 bg-white/10 rounded-full flex items-center justify-center mx-auto mb-4 border border-white/20", children: _jsx(Lock, { className: "w-8 h-8 text-white" }) }), _jsx("h3", { className: "text-xl font-bold text-white mb-2", children: "Premium Content" }), _jsxs("p", { className: "text-gray-300 text-sm mb-6", children: ["This ", typeLabel.toLowerCase(), " is exclusive to members. Unlock it now to start learning."] }), _jsxs(Button, { onClick: handleAddToCart, className: "bg-white text-black hover:bg-gray-200 rounded-full px-8 h-14 font-bold text-base w-full shadow-2xl", children: ["Unlock For ", formatCurrency(service.price, service.currency || 'USD')] })] })) })] })), _jsx("div", { className: "absolute top-6 left-6", children: _jsxs("div", { className: cn("px-4 py-2 rounded-full text-white text-xs font-bold uppercase tracking-wider flex items-center gap-2 backdrop-blur-md shadow-lg", contentTypeColor), children: [_jsx(TypeIcon, { className: "w-3 h-3" }), " ", typeLabel] }) }), !hasAccess && isLocked && (_jsx("div", { className: "absolute top-6 right-6", children: _jsxs("div", { className: "px-4 py-2 rounded-full bg-black/90 backdrop-blur-md text-white text-xs font-bold uppercase tracking-wider flex items-center gap-2 shadow-lg", children: [_jsx(Lock, { className: "w-3 h-3" }), " Premium"] }) }))] }), _jsxs("div", { children: [_jsxs("div", { className: "flex items-center gap-3 mb-4", children: [_jsx("span", { className: "text-sm font-semibold text-gray-700 uppercase tracking-wide", children: category?.name || 'Course' }), _jsx("span", { className: "text-gray-300", children: "\u2022" }), _jsxs("div", { className: "flex items-center gap-1", children: [_jsx(Star, { className: "w-4 h-4 fill-yellow-400 text-yellow-400" }), _jsx("span", { className: "text-sm font-semibold", children: "4.9" }), _jsx("span", { className: "text-sm text-gray-500", children: "(127 reviews)" })] })] }), _jsx("h1", { className: "text-4xl md:text-5xl font-serif text-gray-900 mb-4 leading-tight", children: service.name }), _jsx("
|
|
121
|
+
return (_jsx("div", { className: "min-h-screen bg-white", children: _jsxs("div", { className: "container mx-auto px-4 sm:px-6 lg:px-8 py-8 lg:py-12 max-w-7xl", children: [_jsx("div", { className: "mb-6", children: _jsx(Breadcrumbs, { items: breadcrumbItems }) }), _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-3 gap-8 lg:gap-12 mb-20", children: [_jsxs("div", { className: "lg:col-span-2 space-y-8", children: [_jsxs("div", { className: "relative aspect-video bg-black rounded-2xl overflow-hidden group shadow-2xl border border-gray-800", children: [isPlaying && hasAccess ? (_jsxs("div", { className: "absolute inset-0 bg-black flex items-center justify-center", children: [service.contentType === 'video' ? (_jsx("video", { src: service.contentUrl, controls: true, autoPlay: true, className: "w-full h-full object-contain", poster: getServiceImage(service.image, storeConfig, ""), children: "Your browser does not support the video tag." })) : service.contentType === 'audio' ? (_jsxs("div", { className: "w-full h-full flex flex-col items-center justify-center p-8 bg-gradient-to-br from-gray-900 to-slate-900 text-white", children: [_jsxs("div", { className: "w-32 h-32 bg-white/5 rounded-full flex items-center justify-center mb-6 backdrop-blur-xl border border-white/10 shadow-2xl relative", children: [_jsx(Headphones, { className: "w-12 h-12 text-white relative z-10" }), _jsx("div", { className: "absolute inset-0 bg-blue-500/20 rounded-full animate-ping opacity-20" })] }), _jsx("h3", { className: "text-xl font-bold mb-2", children: service.name }), _jsx("p", { className: "text-gray-400 mb-8", children: "Now Playing \u2022 Audiobook" }), _jsx("audio", { src: service.contentUrl, controls: true, autoPlay: true, className: "w-full max-w-md h-12" })] })) : (_jsxs("div", { className: "w-full h-full flex flex-col items-center justify-center p-8 bg-gray-50", children: [_jsx("div", { className: "w-24 h-24 bg-blue-100 rounded-2xl flex items-center justify-center mb-6 shadow-sm", children: _jsx(FileText, { className: "w-12 h-12 text-blue-600" }) }), _jsx("h3", { className: "text-2xl font-bold text-gray-900 mb-2", children: "Resource Ready" }), _jsx("p", { className: "text-gray-500 mb-8 text-center max-w-sm", children: "You have access to this premium guide. Download it below to start reading." }), _jsxs("a", { href: service.contentUrl, target: "_blank", rel: "noopener noreferrer", className: "bg-black text-white px-10 py-4 rounded-full font-bold hover:bg-gray-800 transition-all flex items-center gap-3 shadow-xl", children: [_jsx(Download, { className: "w-5 h-5" }), " Download PDF Guide"] })] })), _jsx("button", { onClick: () => setIsPlaying(false), className: "absolute top-6 right-6 bg-black/40 hover:bg-black/60 p-3 rounded-full backdrop-blur-md transition-all border border-white/10 group/close", title: "Close player", children: _jsx(X, { className: "w-5 h-5 text-white group-hover/close:rotate-90 transition-transform" }) })] })) : (_jsxs(_Fragment, { children: [_jsx(Image, { src: getServiceImage(service.image, storeConfig, "https://images.unsplash.com/photo-1516321318423-f06f85e504b3?w=800&auto=format&fit=crop"), alt: service.name, fill: true, className: "object-cover transition-transform duration-700 group-hover:scale-105 opacity-80" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/90 via-black/40 to-transparent" }), _jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: hasAccess ? (_jsxs(motion.button, { whileHover: { scale: 1.1 }, whileTap: { scale: 0.9 }, onClick: () => setIsPlaying(true), className: "w-24 h-24 rounded-full bg-white/10 backdrop-blur-xl flex items-center justify-center shadow-2xl hover:bg-white/20 transition-colors border border-white/30 relative group/play", children: [_jsx("div", { className: "absolute inset-0 bg-white/20 rounded-full blur-xl group-hover/play:blur-2xl transition-all" }), service.contentType === 'pdf' ? (_jsx(Download, { className: "w-10 h-10 text-white relative z-10" })) : (_jsx(Play, { className: "w-10 h-10 text-white ml-1 relative z-10", fill: "currentColor" }))] })) : (_jsxs("div", { className: "text-center p-6 backdrop-blur-md bg-black/40 rounded-3xl border border-white/10 max-w-sm mx-4", children: [_jsx("div", { className: "w-16 h-16 bg-white/10 rounded-full flex items-center justify-center mx-auto mb-4 border border-white/20", children: _jsx(Lock, { className: "w-8 h-8 text-white" }) }), _jsx("h3", { className: "text-xl font-bold text-white mb-2", children: "Premium Content" }), _jsxs("p", { className: "text-gray-300 text-sm mb-6", children: ["This ", typeLabel.toLowerCase(), " is exclusive to members. Unlock it now to start learning."] }), _jsxs(Button, { onClick: handleAddToCart, className: "bg-white text-black hover:bg-gray-200 rounded-full px-8 h-14 font-bold text-base w-full shadow-2xl", children: ["Unlock For ", formatCurrency(service.price, service.currency || 'USD')] })] })) })] })), _jsx("div", { className: "absolute top-6 left-6", children: _jsxs("div", { className: cn("px-4 py-2 rounded-full text-white text-xs font-bold uppercase tracking-wider flex items-center gap-2 backdrop-blur-md shadow-lg", contentTypeColor), children: [_jsx(TypeIcon, { className: "w-3 h-3" }), " ", typeLabel] }) }), !hasAccess && isLocked && (_jsx("div", { className: "absolute top-6 right-6", children: _jsxs("div", { className: "px-4 py-2 rounded-full bg-black/90 backdrop-blur-md text-white text-xs font-bold uppercase tracking-wider flex items-center gap-2 shadow-lg", children: [_jsx(Lock, { className: "w-3 h-3" }), " Premium"] }) }))] }), _jsxs("div", { children: [_jsxs("div", { className: "flex items-center gap-3 mb-4", children: [_jsx("span", { className: "text-sm font-semibold text-gray-700 uppercase tracking-wide", children: category?.name || 'Course' }), _jsx("span", { className: "text-gray-300", children: "\u2022" }), _jsxs("div", { className: "flex items-center gap-1", children: [_jsx(Star, { className: "w-4 h-4 fill-yellow-400 text-yellow-400" }), _jsx("span", { className: "text-sm font-semibold", children: "4.9" }), _jsx("span", { className: "text-sm text-gray-500", children: "(127 reviews)" })] })] }), _jsx("h1", { className: "text-4xl md:text-5xl font-serif text-gray-900 mb-4 leading-tight", children: service.name }), _jsx(SafeRichHtml, { value: service.description, as: "div", className: "text-xl text-gray-600 leading-relaxed [&_p]:mb-0 [&_p+p]:mt-2" })] }), _jsx("div", { className: "border-b border-gray-200", children: _jsx("div", { className: "flex gap-8", children: [
|
|
121
122
|
{ id: 'overview', label: 'Overview' },
|
|
122
123
|
{ id: 'curriculum', label: 'Curriculum' },
|
|
123
124
|
{ id: 'reviews', label: 'Reviews' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServicesPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/motivational-speaker/pages/ServicesPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ServicesPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/motivational-speaker/pages/ServicesPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAUhD,UAAU,iBAAiB;IACzB,WAAW,EAAE,WAAW,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,YAAY,CAAC,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,EAAE,iBAAiB,+BA+J9F"}
|
|
@@ -3,6 +3,8 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
3
3
|
import { Button } from '../../../components/ui/button.js';
|
|
4
4
|
import { Clock, ArrowRight, Filter } from 'lucide-react';
|
|
5
5
|
import Link from 'next/link';
|
|
6
|
+
import { RichTextExcerpt } from '../../../components/rich-text/RichTextExcerpt.js';
|
|
7
|
+
import { SafeRichHtml } from '../../../components/rich-text/SafeRichHtml.js';
|
|
6
8
|
import { useState } from 'react';
|
|
7
9
|
import { cn, formatCurrency, filterActiveServices } from '../../../lib/utils/index.js';
|
|
8
10
|
import Image from 'next/image';
|
|
@@ -25,7 +27,7 @@ export function ServicesPage({ storeConfig, initialCategory, titleOverride }) {
|
|
|
25
27
|
return `/${storeConfig.slug}/services/${slug}`;
|
|
26
28
|
};
|
|
27
29
|
const pageTitle = titleOverride || servicesConfig?.title || (_jsxs(_Fragment, { children: ["Signature ", _jsx("span", { className: "font-bold font-sans", style: { color: primaryColor }, children: serviceLabel })] }));
|
|
28
|
-
return (_jsxs("div", { className: "min-h-screen bg-white pb-20", children: [_jsxs("div", { "data-section": "hero", className: "relative bg-gray-900 py-32 px-4 text-center overflow-hidden", children: [_jsxs("div", { className: "absolute inset-0", children: [_jsx(Image, { src: "https://images.unsplash.com/photo-1544531696-608a67ed9739?q=80&w=2070&auto=format&fit=crop", alt: "Service Menu", fill: true, className: "w-full h-full object-cover opacity-60" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-black/30" })] }), _jsxs("div", { className: "container mx-auto max-w-4xl relative z-10", children: [_jsx("span", { className: "inline-block py-1 px-3 rounded-full bg-white/10 backdrop-blur-md border border-white/20 text-xs font-bold uppercase tracking-widest text-white mb-6 shadow-sm", children: storeConfig.name }), _jsx("h1", { className: "text-5xl md:text-7xl font-serif font-light mb-6 tracking-tight text-white leading-tight", children: pageTitle }), _jsx(
|
|
30
|
+
return (_jsxs("div", { className: "min-h-screen bg-white pb-20", children: [_jsxs("div", { "data-section": "hero", className: "relative bg-gray-900 py-32 px-4 text-center overflow-hidden", children: [_jsxs("div", { className: "absolute inset-0", children: [_jsx(Image, { src: "https://images.unsplash.com/photo-1544531696-608a67ed9739?q=80&w=2070&auto=format&fit=crop", alt: "Service Menu", fill: true, className: "w-full h-full object-cover opacity-60" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-black/30" })] }), _jsxs("div", { className: "container mx-auto max-w-4xl relative z-10", children: [_jsx("span", { className: "inline-block py-1 px-3 rounded-full bg-white/10 backdrop-blur-md border border-white/20 text-xs font-bold uppercase tracking-widest text-white mb-6 shadow-sm", children: storeConfig.name }), _jsx("h1", { className: "text-5xl md:text-7xl font-serif font-light mb-6 tracking-tight text-white leading-tight", children: pageTitle }), _jsx(SafeRichHtml, { value: servicesConfig?.description || storeConfig.description || `Explore our curated selection of premium ${serviceLabel.toLowerCase()} designed for your success.`, as: "div", className: "text-gray-200 max-w-2xl mx-auto text-lg font-light leading-relaxed [&_p]:mb-0" })] })] }), _jsx("div", { className: "sticky top-16 z-30 bg-white/80 backdrop-blur-xl border-b border-gray-100 transition-all", children: _jsx("div", { className: "container mx-auto px-4", children: _jsxs("div", { className: "flex items-center gap-3 overflow-x-auto py-4 scrollbar-hide no-scrollbar", children: [_jsxs("div", { className: "flex items-center gap-2 text-xs font-bold text-gray-400 uppercase tracking-wider px-4 border-r border-gray-100 hidden md:flex shrink-0", children: [_jsx(Filter, { className: "w-3.5 h-3.5" }), categoryLabel] }), categories.map((cat) => (_jsx("button", { onClick: () => setActiveCategory(cat.slug), className: cn("px-6 py-2.5 rounded-full text-sm font-bold whitespace-nowrap transition-all duration-300 border flex-shrink-0", activeCategory === cat.slug
|
|
29
31
|
? "text-white shadow-lg scale-105 border-transparent"
|
|
30
|
-
: "bg-white text-gray-500 border-gray-100 hover:border-gray-300 hover:text-black"), style: activeCategory === cat.slug ? { backgroundColor: primaryColor } : {}, children: cat.name }, cat.id)))] }) }) }), _jsx("div", { "data-section": "services-list", className: "container mx-auto px-4 max-w-7xl py-16", children: _jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-x-10 gap-y-16", children: filteredServices.map((service) => (_jsxs("div", { className: "group flex flex-col h-full", children: [_jsxs(Link, { href: getServiceLink(service.slug), className: "block relative aspect-[4/3] rounded-3xl overflow-hidden bg-gray-100 mb-6 shadow-sm group-hover:shadow-xl transition-all duration-500", children: [_jsx(Image, { src: service.image || 'https://images.unsplash.com/photo-1629909613654-28e377c37b09?w=800&auto=format&fit=crop&q=60', alt: service.name, fill: true, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-105" }), _jsx("div", { className: "absolute bottom-4 left-4 bg-white/95 backdrop-blur px-4 py-2 rounded-full text-sm font-bold shadow-sm text-gray-900", children: service.price > 0 ? formatCurrency(service.price, service.currency || storeConfig.settings?.currency || 'USD') : 'Free' }), _jsx("div", { className: "absolute inset-0 bg-black/20 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-center justify-center", children: _jsx(Button, { className: "rounded-full bg-white text-black hover:bg-gray-100 transform translate-y-4 group-hover:translate-y-0 transition-all duration-300 shadow-lg font-bold px-8", children: "View Content" }) })] }), _jsxs("div", { className: "flex flex-col flex-1", children: [_jsx("div", { className: "flex justify-between items-start mb-3", children: _jsx(Link, { href: getServiceLink(service.slug), children: _jsx("h3", { className: "text-2xl font-bold text-gray-900 group-hover:text-gray-600 transition-colors", children: service.name }) }) }), _jsx("p",
|
|
32
|
+
: "bg-white text-gray-500 border-gray-100 hover:border-gray-300 hover:text-black"), style: activeCategory === cat.slug ? { backgroundColor: primaryColor } : {}, children: cat.name }, cat.id)))] }) }) }), _jsx("div", { "data-section": "services-list", className: "container mx-auto px-4 max-w-7xl py-16", children: _jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-x-10 gap-y-16", children: filteredServices.map((service) => (_jsxs("div", { className: "group flex flex-col h-full", children: [_jsxs(Link, { href: getServiceLink(service.slug), className: "block relative aspect-[4/3] rounded-3xl overflow-hidden bg-gray-100 mb-6 shadow-sm group-hover:shadow-xl transition-all duration-500", children: [_jsx(Image, { src: service.image || 'https://images.unsplash.com/photo-1629909613654-28e377c37b09?w=800&auto=format&fit=crop&q=60', alt: service.name, fill: true, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-105" }), _jsx("div", { className: "absolute bottom-4 left-4 bg-white/95 backdrop-blur px-4 py-2 rounded-full text-sm font-bold shadow-sm text-gray-900", children: service.price > 0 ? formatCurrency(service.price, service.currency || storeConfig.settings?.currency || 'USD') : 'Free' }), _jsx("div", { className: "absolute inset-0 bg-black/20 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-center justify-center", children: _jsx(Button, { className: "rounded-full bg-white text-black hover:bg-gray-100 transform translate-y-4 group-hover:translate-y-0 transition-all duration-300 shadow-lg font-bold px-8", children: "View Content" }) })] }), _jsxs("div", { className: "flex flex-col flex-1", children: [_jsx("div", { className: "flex justify-between items-start mb-3", children: _jsx(Link, { href: getServiceLink(service.slug), children: _jsx("h3", { className: "text-2xl font-bold text-gray-900 group-hover:text-gray-600 transition-colors", children: service.name }) }) }), _jsx(RichTextExcerpt, { value: service.description, as: "p", className: "text-gray-500 mb-6 line-clamp-2 leading-relaxed text-base flex-1" }), _jsxs("div", { className: "flex items-center justify-between pt-4 border-t border-gray-100 text-sm font-medium text-gray-500", children: [_jsxs("div", { className: "flex items-center gap-6", children: [service.duration > 0 && (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Clock, { className: "w-4 h-4 text-gray-400" }), service.duration, " mins"] })), service.contentType && (_jsx("div", { className: "flex items-center gap-2 uppercase tracking-widest text-[10px] font-black", children: service.contentType }))] }), _jsxs(Link, { href: getServiceLink(service.slug), className: "flex items-center gap-2 text-black font-bold group/link", children: ["Explore ", _jsx(ArrowRight, { className: "w-4 h-4 transition-transform group-hover/link:translate-x-1" })] })] })] })] }, service.id))) }) })] }));
|
|
31
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriptionPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/motivational-speaker/pages/SubscriptionPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"SubscriptionPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/motivational-speaker/pages/SubscriptionPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAehD,UAAU,qBAAqB;IAC7B,WAAW,EAAE,WAAW,CAAC;CAC1B;AAcD,wBAAgB,4BAA4B,CAAC,EAAE,WAAW,EAAE,EAAE,qBAAqB,+BA8TlF"}
|
|
@@ -11,6 +11,7 @@ import { useState } from 'react';
|
|
|
11
11
|
import { useStore } from '../../../lib/store-context.js';
|
|
12
12
|
import { useToast } from '../../../components/ui/toast.js';
|
|
13
13
|
import { cn } from '../../../lib/utils/index.js';
|
|
14
|
+
import { RichTextExcerpt } from '../../../components/rich-text/RichTextExcerpt.js';
|
|
14
15
|
import { showLayoutDecorativeBadges } from '../../../lib/layout-badges.js';
|
|
15
16
|
export function MotivationalSubscriptionPage({ storeConfig }) {
|
|
16
17
|
const router = useRouter();
|
|
@@ -100,7 +101,7 @@ export function MotivationalSubscriptionPage({ storeConfig }) {
|
|
|
100
101
|
];
|
|
101
102
|
return (_jsx("div", { className: "min-h-screen bg-gradient-to-b from-gray-50 to-white", children: _jsxs("div", { className: "container mx-auto px-4 sm:px-6 lg:px-8 py-12 max-w-7xl", children: [_jsx("div", { className: "mb-8", children: _jsx(Breadcrumbs, { items: breadcrumbItems }) }), _jsxs(motion.div, { initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6 }, className: "text-center mb-16", children: [showLayoutDecorativeBadges() && (_jsxs("div", { className: "inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-yellow-100 text-yellow-800 text-xs font-bold uppercase tracking-widest mb-6", children: [_jsx(Star, { className: "w-3 h-3" }), "Choose Your Path"] })), _jsx("h1", { className: "text-5xl md:text-6xl font-serif text-gray-900 mb-6 leading-tight", children: "Membership Plans" }), _jsx("p", { className: "text-xl text-gray-600 max-w-2xl mx-auto mb-8", children: "Unlock your potential with unlimited access to all courses, exclusive content, and a community of like-minded individuals." }), _jsxs("div", { className: "flex items-center justify-center gap-4", children: [_jsx("span", { className: cn("text-sm font-medium", billingPeriod === 'month' ? 'text-gray-900' : 'text-gray-500'), children: "Monthly" }), _jsx("button", { onClick: () => setBillingPeriod(billingPeriod === 'month' ? 'year' : 'month'), className: cn("relative w-14 h-8 rounded-full transition-colors", billingPeriod === 'year' ? 'bg-yellow-500' : 'bg-gray-300'), children: _jsx(motion.div, { layout: true, className: cn("absolute top-1 w-6 h-6 rounded-full bg-white shadow-lg", billingPeriod === 'year' ? 'right-1' : 'left-1') }) }), _jsxs("span", { className: cn("text-sm font-medium", billingPeriod === 'year' ? 'text-gray-900' : 'text-gray-500'), children: ["Yearly", _jsx("span", { className: "ml-2 text-yellow-600 font-bold", children: "Save 17%" })] })] })] }), _jsx("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 mb-16", children: pricingTiers.map((tier, index) => (_jsxs(motion.div, { initial: { opacity: 0, y: 30 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: index * 0.1 }, className: cn("relative bg-white rounded-2xl border-2 p-8 flex flex-col", tier.popular
|
|
102
103
|
? "border-yellow-500 shadow-2xl scale-105"
|
|
103
|
-
: "border-gray-200 hover:border-gray-300 hover:shadow-xl transition-all"), children: [tier.popular && (_jsx("div", { className: "absolute -top-4 left-1/2 -translate-x-1/2", children: _jsx("div", { className: "px-4 py-1 bg-yellow-500 text-black text-xs font-bold uppercase tracking-wider rounded-full", children: "Most Popular" }) })), _jsx("div", { className: cn("w-12 h-12 rounded-full flex items-center justify-center text-white mb-6", tier.color), children: tier.icon }), _jsx("h3", { className: "text-2xl font-serif text-gray-900 mb-2", children: tier.name }), _jsx("p",
|
|
104
|
+
: "border-gray-200 hover:border-gray-300 hover:shadow-xl transition-all"), children: [tier.popular && (_jsx("div", { className: "absolute -top-4 left-1/2 -translate-x-1/2", children: _jsx("div", { className: "px-4 py-1 bg-yellow-500 text-black text-xs font-bold uppercase tracking-wider rounded-full", children: "Most Popular" }) })), _jsx("div", { className: cn("w-12 h-12 rounded-full flex items-center justify-center text-white mb-6", tier.color), children: tier.icon }), _jsx("h3", { className: "text-2xl font-serif text-gray-900 mb-2", children: tier.name }), _jsx(RichTextExcerpt, { value: tier.description, as: "p", className: "text-gray-600 mb-6" }), _jsxs("div", { className: "mb-6", children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-5xl font-bold text-gray-900", children: tier.price === 0 ? 'Free' : formatCurrency(tier.price, storeConfig.settings?.currency || 'USD') }), tier.price > 0 && (_jsxs("span", { className: "text-gray-500", children: ["/", tier.period === 'month' ? 'mo' : 'yr'] }))] }), tier.price > 0 && billingPeriod === 'year' && (_jsxs("p", { className: "text-sm text-gray-500 mt-1", children: [formatCurrency(tier.price / 12, storeConfig.settings?.currency || 'USD'), " per month"] }))] }), _jsx("ul", { className: "space-y-4 mb-8 flex-1", children: tier.features.map((feature, i) => (_jsxs("li", { className: "flex items-start gap-3", children: [_jsx(CheckCircle, { className: "w-5 h-5 text-green-500 shrink-0 mt-0.5" }), _jsx("span", { className: "text-gray-700", children: feature })] }, i))) }), _jsxs(Button, { size: "lg", onClick: () => handleSubscribe(tier), className: cn("w-full h-14 rounded-full font-bold text-lg transition-all", tier.popular
|
|
104
105
|
? "bg-yellow-500 text-black hover:bg-yellow-400 hover:shadow-xl transform hover:-translate-y-1"
|
|
105
106
|
: tier.id === 'free'
|
|
106
107
|
? "bg-gray-900 text-white hover:bg-gray-800"
|
|
@@ -120,7 +121,7 @@ export function MotivationalSubscriptionPage({ storeConfig }) {
|
|
|
120
121
|
title: 'Live Sessions',
|
|
121
122
|
description: 'Monthly Q&A sessions and exclusive masterclasses',
|
|
122
123
|
},
|
|
123
|
-
].map((feature, i) => (_jsxs("div", { className: "text-center", children: [_jsx("div", { className: "w-16 h-16 rounded-full bg-gray-100 flex items-center justify-center mx-auto mb-4 text-gray-700", children: feature.icon }), _jsx("h3", { className: "text-xl font-semibold text-gray-900 mb-2", children: feature.title }), _jsx("p",
|
|
124
|
+
].map((feature, i) => (_jsxs("div", { className: "text-center", children: [_jsx("div", { className: "w-16 h-16 rounded-full bg-gray-100 flex items-center justify-center mx-auto mb-4 text-gray-700", children: feature.icon }), _jsx("h3", { className: "text-xl font-semibold text-gray-900 mb-2", children: feature.title }), _jsx(RichTextExcerpt, { value: feature.description, as: "p", className: "text-gray-600" })] }, i))) })] }), _jsxs(motion.div, { initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.6 }, className: "text-center", children: [_jsx("h2", { className: "text-3xl font-serif text-gray-900 mb-8", children: "Frequently Asked Questions" }), _jsx("div", { className: "max-w-3xl mx-auto space-y-4", children: [
|
|
124
125
|
{
|
|
125
126
|
question: 'Can I cancel my subscription anytime?',
|
|
126
127
|
answer: 'Yes, you can cancel your subscription at any time. You\'ll continue to have access until the end of your billing period.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoreFooter.d.ts","sourceRoot":"","sources":["../../../../src/layouts/shared/components/StoreFooter.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"StoreFooter.d.ts","sourceRoot":"","sources":["../../../../src/layouts/shared/components/StoreFooter.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAkBvD,UAAU,gBAAgB;IACxB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,WAAW,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,gBAAgB,+BA6Y3E"}
|
|
@@ -11,17 +11,8 @@ import { useStore } from '../../../lib/store-context';
|
|
|
11
11
|
import { payazaInlineBindingProps } from '../../../preview/canvas/field-key';
|
|
12
12
|
import { isEditorPreviewMode } from '../../../lib/utils/editor-preview';
|
|
13
13
|
import { resolveStoreLink } from '../../../lib/layout-route-utils';
|
|
14
|
+
import { RichTextExcerpt } from '../../../components/rich-text/RichTextExcerpt.js';
|
|
14
15
|
import { BOOKING_DEFAULT_FOOTER_TAGLINE, resolveBookingFooterMainLinks, resolveBookingFooterSupportLinks, resolveBookingFooterPrimaryColumnTitle, } from '../../booking/components/booking-footer-defaults';
|
|
15
|
-
const PAYMENT_METHODS = [
|
|
16
|
-
'Bank Transfer',
|
|
17
|
-
'Visa',
|
|
18
|
-
'Mastercard',
|
|
19
|
-
'Verve',
|
|
20
|
-
'Afrigo',
|
|
21
|
-
'ApplePay',
|
|
22
|
-
'Google Pay',
|
|
23
|
-
'Mobile Money',
|
|
24
|
-
];
|
|
25
16
|
export function StoreFooter({ storeConfig: initialConfig }) {
|
|
26
17
|
const { store } = useStore();
|
|
27
18
|
const storeConfig = store || initialConfig;
|
|
@@ -60,7 +51,6 @@ export function StoreFooter({ storeConfig: initialConfig }) {
|
|
|
60
51
|
const copyrightLine = footerConfig?.copyrightText?.trim() ||
|
|
61
52
|
`© ${currentYear} ${storeConfig.name}. All rights reserved.`;
|
|
62
53
|
const showSocial = footerConfig?.showSocialLinks !== false;
|
|
63
|
-
const showPaymentBadges = footerConfig?.showPaymentBadges !== false;
|
|
64
54
|
const bgPrimary = isDarkTheme ? '#000000' : '#F8FAFC';
|
|
65
55
|
const bgSecondary = isDarkTheme ? '#0a0a0f' : '#FFFFFF';
|
|
66
56
|
const bgDark = '#000000';
|
|
@@ -76,7 +66,7 @@ export function StoreFooter({ storeConfig: initialConfig }) {
|
|
|
76
66
|
borderTopStyle: 'solid',
|
|
77
67
|
}, children: [_jsx("div", { className: "absolute inset-0 z-0 opacity-[0.4] pointer-events-none", children: _jsx(DotPattern, { color: isDarkTheme ? "#3b82f6" : "#94a3b8", cx: 1, cy: 1, cr: 1, width: 20, height: 20 }) }), _jsxs("div", { className: "relative z-10 container mx-auto px-4 sm:px-6 lg:px-8 pt-16 pb-8", children: [_jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-12 gap-12 lg:gap-8 mb-16", children: [_jsxs("div", { className: "lg:col-span-4 space-y-6", children: [_jsx(Link, { href: `/${storeConfig.slug}`, className: "inline-block", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(StoreLogo, { storeConfig: storeConfig, className: "h-10 w-10", alt: storeConfig.name }), !getLogoUrl(storeConfig) && (_jsx("span", { className: cn("text-2xl font-extrabold tracking-tight", isDarkTheme ? "text-white" : ""), style: {
|
|
78
68
|
color: isDarkTheme ? undefined : primaryColor,
|
|
79
|
-
}, children: storeConfig.name }))] }) }), _jsx("p", { className: cn("text-base leading-relaxed max-w-sm", isDarkTheme ? "text-gray-400" : "text-gray-500"), children: _jsx("span", { ...inline(['tagline']), children: tagline }) }), showSocial && storeConfig.branding.socialMedia && (_jsxs("div", { className: "flex items-center gap-4 pt-2", children: [storeConfig.branding.socialMedia.facebook && (_jsx("a", { href: storeConfig.branding.socialMedia.facebook, target: "_blank", rel: "noopener noreferrer", className: cn("h-10 w-10 flex items-center justify-center rounded-full transition-all duration-300 transform hover:scale-110 shadow-sm", isDarkTheme
|
|
69
|
+
}, children: storeConfig.name }))] }) }), _jsx("p", { className: cn("text-base leading-relaxed max-w-sm", isDarkTheme ? "text-gray-400" : "text-gray-500"), children: _jsx("span", { ...inline(['tagline']), children: _jsx(RichTextExcerpt, { value: tagline, as: "span" }) }) }), showSocial && storeConfig.branding.socialMedia && (_jsxs("div", { className: "flex items-center gap-4 pt-2", children: [storeConfig.branding.socialMedia.facebook && (_jsx("a", { href: storeConfig.branding.socialMedia.facebook, target: "_blank", rel: "noopener noreferrer", className: cn("h-10 w-10 flex items-center justify-center rounded-full transition-all duration-300 transform hover:scale-110 shadow-sm", isDarkTheme
|
|
80
70
|
? "bg-white/10 border border-white/20 text-gray-400 hover:text-white hover:border-white/40"
|
|
81
71
|
: "bg-white border border-gray-200 text-gray-500 hover:text-white hover:border-transparent"), style: {
|
|
82
72
|
'--hover-bg': primaryColor
|
|
@@ -152,5 +142,5 @@ export function StoreFooter({ storeConfig: initialConfig }) {
|
|
|
152
142
|
e.currentTarget.style.color = '#6b7280';
|
|
153
143
|
e.currentTarget.style.borderColor = '#e5e7eb';
|
|
154
144
|
}
|
|
155
|
-
}, children: _jsx(Share2, { className: "h-5 w-5" }) }))] }))] }), _jsxs("div", { className: "lg:col-span-8 grid grid-cols-2 sm:grid-cols-3 gap-8", children: [_jsxs("div", { children: [_jsx("h4", { className: cn("font-bold text-lg mb-6", isDarkTheme ? "text-white" : "text-gray-900"), children: _jsx("span", { ...inline(['primaryColumnTitle']), children: primaryColumnTitle }) }), _jsx("ul", { className: "space-y-4", children: mainLinks.map((link, index) => (_jsx("li", { children: _jsx(Link, { href: resolveStoreLink(link.href, storeConfig.slug), className: cn("transition-colors flex items-center group", isDarkTheme ? "text-gray-400 hover:text-white" : "text-gray-500 hover:text-gray-900"), children: _jsxs("span", { className: "relative", children: [_jsx("span", { ...inline(['mainLinks', String(index), 'label']), children: link.label }), _jsx("span", { className: cn("absolute -bottom-1 left-0 w-0 h-0.5 transition-all group-hover:w-full", isDarkTheme ? "bg-white" : "bg-gray-900") })] }) }) }, link.id || `${index}-${link.href}`))) })] }), _jsxs("div", { children: [_jsx("h4", { className: cn("font-bold text-lg mb-6", isDarkTheme ? "text-white" : "text-gray-900"), children: _jsx("span", { ...inline(['supportColumnTitle']), children: supportColumnTitle }) }), _jsx("ul", { className: "space-y-4", children: supportLinks.map((link, index) => (_jsx("li", { children: _jsx(Link, { href: resolveStoreLink(link.href, storeConfig.slug), className: cn("transition-colors group flex items-center", isDarkTheme ? "text-gray-400 hover:text-white" : "text-gray-500 hover:text-gray-900"), children: _jsxs("span", { className: "relative", children: [_jsx("span", { ...inline(['supportLinks', String(index), 'label']), children: link.label }), _jsx("span", { className: cn("absolute -bottom-1 left-0 w-0 h-0.5 transition-all group-hover:w-full", isDarkTheme ? "bg-white" : "bg-gray-900") })] }) }) }, link.id || `support-${index}-${link.href}`))) })] }), _jsxs("div", { children: [_jsx("h4", { className: cn("font-bold text-lg mb-6", isDarkTheme ? "text-white" : "text-gray-900"), children: _jsx("span", { ...inline(['contactColumnTitle']), children: contactColumnTitle }) }), _jsxs("ul", { className: "space-y-4", children: [footerAddress && (_jsx("li", { className: cn("text-sm leading-relaxed whitespace-pre-line", isDarkTheme ? "text-gray-400" : "text-gray-500"), children: _jsx("span", { ...inline(['address']), children: footerAddress }) })), footerEmail && (_jsx("li", { className: cn(isDarkTheme ? "text-gray-400" : "text-gray-500"), children: _jsx("a", { href: `mailto:${footerEmail}`, className: cn("transition-colors", isDarkTheme ? "hover:text-white" : "hover:text-gray-900"), children: _jsx("span", { ...inline(['email']), children: footerEmail }) }) })), footerPhone && (_jsx("li", { className: cn(isDarkTheme ? "text-gray-400" : "text-gray-500"), children: _jsx("a", { href: `tel:${footerPhone.replace(/\D/g, '')}`, className: cn("transition-colors", isDarkTheme ? "hover:text-white" : "hover:text-gray-900"), children: _jsx("span", { ...inline(['phone']), children: footerPhone }) }) }))] })] })] })] }),
|
|
145
|
+
}, children: _jsx(Share2, { className: "h-5 w-5" }) }))] }))] }), _jsxs("div", { className: "lg:col-span-8 grid grid-cols-2 sm:grid-cols-3 gap-8", children: [_jsxs("div", { children: [_jsx("h4", { className: cn("font-bold text-lg mb-6", isDarkTheme ? "text-white" : "text-gray-900"), children: _jsx("span", { ...inline(['primaryColumnTitle']), children: primaryColumnTitle }) }), _jsx("ul", { className: "space-y-4", children: mainLinks.map((link, index) => (_jsx("li", { children: _jsx(Link, { href: resolveStoreLink(link.href, storeConfig.slug), className: cn("transition-colors flex items-center group", isDarkTheme ? "text-gray-400 hover:text-white" : "text-gray-500 hover:text-gray-900"), children: _jsxs("span", { className: "relative", children: [_jsx("span", { ...inline(['mainLinks', String(index), 'label']), children: link.label }), _jsx("span", { className: cn("absolute -bottom-1 left-0 w-0 h-0.5 transition-all group-hover:w-full", isDarkTheme ? "bg-white" : "bg-gray-900") })] }) }) }, link.id || `${index}-${link.href}`))) })] }), _jsxs("div", { children: [_jsx("h4", { className: cn("font-bold text-lg mb-6", isDarkTheme ? "text-white" : "text-gray-900"), children: _jsx("span", { ...inline(['supportColumnTitle']), children: supportColumnTitle }) }), _jsx("ul", { className: "space-y-4", children: supportLinks.map((link, index) => (_jsx("li", { children: _jsx(Link, { href: resolveStoreLink(link.href, storeConfig.slug), className: cn("transition-colors group flex items-center", isDarkTheme ? "text-gray-400 hover:text-white" : "text-gray-500 hover:text-gray-900"), children: _jsxs("span", { className: "relative", children: [_jsx("span", { ...inline(['supportLinks', String(index), 'label']), children: link.label }), _jsx("span", { className: cn("absolute -bottom-1 left-0 w-0 h-0.5 transition-all group-hover:w-full", isDarkTheme ? "bg-white" : "bg-gray-900") })] }) }) }, link.id || `support-${index}-${link.href}`))) })] }), _jsxs("div", { children: [_jsx("h4", { className: cn("font-bold text-lg mb-6", isDarkTheme ? "text-white" : "text-gray-900"), children: _jsx("span", { ...inline(['contactColumnTitle']), children: contactColumnTitle }) }), _jsxs("ul", { className: "space-y-4", children: [footerAddress && (_jsx("li", { className: cn("text-sm leading-relaxed whitespace-pre-line", isDarkTheme ? "text-gray-400" : "text-gray-500"), children: _jsx("span", { ...inline(['address']), children: footerAddress }) })), footerEmail && (_jsx("li", { className: cn(isDarkTheme ? "text-gray-400" : "text-gray-500"), children: _jsx("a", { href: `mailto:${footerEmail}`, className: cn("transition-colors", isDarkTheme ? "hover:text-white" : "hover:text-gray-900"), children: _jsx("span", { ...inline(['email']), children: footerEmail }) }) })), footerPhone && (_jsx("li", { className: cn(isDarkTheme ? "text-gray-400" : "text-gray-500"), children: _jsx("a", { href: `tel:${footerPhone.replace(/\D/g, '')}`, className: cn("transition-colors", isDarkTheme ? "hover:text-white" : "hover:text-gray-900"), children: _jsx("span", { ...inline(['phone']), children: footerPhone }) }) }))] })] })] })] }), _jsx("div", { className: cn("pt-8 border-t flex flex-col md:flex-row justify-between items-center gap-4", isDarkTheme ? "border-white/10" : "border-slate-200"), children: _jsx("p", { className: cn("text-sm font-medium", isDarkTheme ? "text-gray-500" : "text-gray-500"), children: _jsx("span", { ...inline(['copyrightText']), children: copyrightLine }) }) })] })] }));
|
|
156
146
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PortfolioPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/shared/pages/PortfolioPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"PortfolioPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/shared/pages/PortfolioPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAQhD,UAAU,kBAAkB;IAC1B,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,aAAa,CAAC,EAAE,WAAW,EAAE,EAAE,kBAAkB,+BAsThE"}
|