@revenexx/cover 0.1.0
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/LICENSE +21 -0
- package/README.md +39 -0
- package/app/api/account.ts +8 -0
- package/app/api/categories.ts +3 -0
- package/app/api/checkout.ts +6 -0
- package/app/api/images.ts +4 -0
- package/app/api/markets.ts +3 -0
- package/app/api/product.ts +3 -0
- package/app/api/products.ts +4 -0
- package/app/api/search.ts +4 -0
- package/app/app.config.ts +29 -0
- package/app/assets/css/cover.css +25 -0
- package/app/components/account/AccountMenu.vue +30 -0
- package/app/components/account/AccountShell.vue +18 -0
- package/app/components/account/AccountSidebar.vue +90 -0
- package/app/components/account/address/AccountAddressCard.vue +287 -0
- package/app/components/account/carts/AccountCartsTable.vue +284 -0
- package/app/components/account/dashboard/AccountDashboard.vue +351 -0
- package/app/components/account/directorder/AccountDirectOrder.vue +512 -0
- package/app/components/account/governance/AccountApprovalLimitsTable.vue +221 -0
- package/app/components/account/governance/AccountCostCenterDetail.vue +276 -0
- package/app/components/account/governance/AccountCostCentersTable.vue +252 -0
- package/app/components/account/governance/AccountRequisitionDetail.vue +295 -0
- package/app/components/account/governance/AccountRequisitionsTable.vue +255 -0
- package/app/components/account/governance/AccountWorkflowDetail.vue +215 -0
- package/app/components/account/governance/AccountWorkflowsTable.vue +168 -0
- package/app/components/account/governance/GovernanceApprovalLimitModal.vue +183 -0
- package/app/components/account/governance/GovernanceCostCenterModal.vue +188 -0
- package/app/components/account/governance/GovernanceWorkflowModal.vue +191 -0
- package/app/components/account/orderlists/AccountOrderListDetail.vue +349 -0
- package/app/components/account/orderlists/AccountOrderListsTable.vue +352 -0
- package/app/components/account/orders/AccountOrderDetail.vue +376 -0
- package/app/components/account/orders/AccountOrdersTable.vue +281 -0
- package/app/components/account/preferences/AccountPreferences.vue +50 -0
- package/app/components/auth/AuthForgotPasswordPanel.vue +88 -0
- package/app/components/auth/AuthLoginPanel.vue +103 -0
- package/app/components/auth/AuthLoginTeaser.vue +24 -0
- package/app/components/auth/AuthPageHeader.vue +21 -0
- package/app/components/auth/AuthRegisterPanel.vue +431 -0
- package/app/components/auth/AuthRegisterTeaser.vue +24 -0
- package/app/components/auth/AuthResetPasswordPanel.vue +115 -0
- package/app/components/cart/CartButton.vue +42 -0
- package/app/components/cart/actions/CartCostCenterModal.vue +110 -0
- package/app/components/cart/actions/CartExportModal.vue +82 -0
- package/app/components/cart/actions/CartPositionTextsModal.vue +92 -0
- package/app/components/cart/actions/CartSaveToListModal.vue +177 -0
- package/app/components/cart/actions/CartWorkflowPickerModal.vue +64 -0
- package/app/components/cart/drawer/CartDrawer.vue +49 -0
- package/app/components/cart/item/CartItem.vue +318 -0
- package/app/components/cart/manage/CartNameModal.vue +68 -0
- package/app/components/cart/position/CartPosition.vue +369 -0
- package/app/components/cart/quickadd/CartQuickAdd.vue +145 -0
- package/app/components/cart/recommend/CartCrossSell.vue +102 -0
- package/app/components/cart/recommend/CartRecommendCard.vue +59 -0
- package/app/components/cart/recommend/CartReorderStrip.vue +108 -0
- package/app/components/cart/requisition/CartRequisitionGroup.vue +74 -0
- package/app/components/cart/skeleton/CartSkeleton.vue +18 -0
- package/app/components/cart/summary/CartSummary.vue +25 -0
- package/app/components/cart/summary/CartSummaryBreakdown.vue +35 -0
- package/app/components/cart/switcher/CartSwitcher.vue +147 -0
- package/app/components/cart/target/CartTargetModal.vue +129 -0
- package/app/components/cart/view/CartApprovalsPanel.vue +89 -0
- package/app/components/cart/view/CartListHeader.vue +86 -0
- package/app/components/cart/view/CartPositionList.vue +94 -0
- package/app/components/cart/view/CartSummaryPanel.vue +254 -0
- package/app/components/cart/view/CartView.vue +310 -0
- package/app/components/category/info/CategoryPrice.vue +47 -0
- package/app/components/category/info/CategorySku.vue +15 -0
- package/app/components/category/info/CategoryStock.vue +25 -0
- package/app/components/category/list/CategoryItemCount.vue +27 -0
- package/app/components/category/list/CategoryListPagination.vue +81 -0
- package/app/components/category/skeleton/CategoryDetailSkeleton.vue +12 -0
- package/app/components/category/skeleton/CategoryListSkeleton.vue +65 -0
- package/app/components/category/view/CategoryViewToggle.vue +33 -0
- package/app/components/category/view/GridView.vue +78 -0
- package/app/components/category/view/ListView.vue +80 -0
- package/app/components/checkout/confirmation/CheckoutConfirmationView.vue +289 -0
- package/app/components/checkout/form/CheckoutSchemaForm.vue +72 -0
- package/app/components/checkout/onepage/CheckoutAddressPickerModal.vue +260 -0
- package/app/components/checkout/onepage/CheckoutAddressSection.vue +186 -0
- package/app/components/checkout/onepage/CheckoutDeliverySection.vue +158 -0
- package/app/components/checkout/onepage/CheckoutGate.vue +67 -0
- package/app/components/checkout/onepage/CheckoutGuestDetailsSection.vue +154 -0
- package/app/components/checkout/onepage/CheckoutNotesSection.vue +62 -0
- package/app/components/checkout/onepage/CheckoutOnePageView.vue +77 -0
- package/app/components/checkout/onepage/CheckoutPaymentSection.vue +181 -0
- package/app/components/checkout/onepage/CheckoutSectionTitle.vue +18 -0
- package/app/components/checkout/onepage/CheckoutSummarySection.vue +211 -0
- package/app/components/checkout/onepage/CheckoutWorkflowPanel.vue +38 -0
- package/app/components/layout/AppLogo.vue +21 -0
- package/app/components/layout/footer/Footer.vue +148 -0
- package/app/components/layout/header/AppBar.vue +75 -0
- package/app/components/layout/header/CategoryNav.vue +93 -0
- package/app/components/layout/header/HeaderActionItem.vue +81 -0
- package/app/components/layout/header/LocaleSwitcher.vue +123 -0
- package/app/components/layout/header/MainNav.vue +61 -0
- package/app/components/layout/header/MobileMenu.vue +81 -0
- package/app/components/layout/header/TopBar.vue +63 -0
- package/app/components/listing/ListingView.vue +227 -0
- package/app/components/product/detail/ProductDetailAddToCart.vue +188 -0
- package/app/components/product/detail/ProductDetailDescription.vue +20 -0
- package/app/components/product/detail/ProductDetailImageGallery.vue +58 -0
- package/app/components/product/detail/ProductDetailPricing.vue +108 -0
- package/app/components/product/detail/ProductDetailSaveToList.vue +291 -0
- package/app/components/product/detail/ProductDetailSpecifications.vue +33 -0
- package/app/components/product/detail/ProductDetailStock.vue +36 -0
- package/app/components/search/filter/SearchFacets.vue +256 -0
- package/app/components/search/filter/SearchFacetsDrawer.vue +58 -0
- package/app/components/ui/AppShell.vue +7 -0
- package/app/components/ui/debug/PiniaStateCard.vue +106 -0
- package/app/components/ui/feedback/EmptyState.vue +30 -0
- package/app/components/ui/feedback/ErrorBoundary.vue +44 -0
- package/app/components/ui/feedback/NotFound.vue +34 -0
- package/app/components/ui/forms/CountrySelection.vue +14 -0
- package/app/components/ui/forms/FormKitDatePicker.vue +124 -0
- package/app/components/ui/forms/PasswordInput.vue +136 -0
- package/app/components/ui/forms/SearchInput.vue +213 -0
- package/app/components/ui/table/TableSortButton.vue +51 -0
- package/app/components/ui/table/TableToolbar.vue +66 -0
- package/app/composables/useAccount.ts +27 -0
- package/app/composables/useAccountAddresses.ts +116 -0
- package/app/composables/useAccountOrders.ts +18 -0
- package/app/composables/useAppUrl.ts +38 -0
- package/app/composables/useAuthStore.ts +202 -0
- package/app/composables/useB2BContext.ts +23 -0
- package/app/composables/useCartActions.ts +25 -0
- package/app/composables/useCartCalculation.ts +90 -0
- package/app/composables/useCartSelection.ts +46 -0
- package/app/composables/useCartStore.ts +837 -0
- package/app/composables/useCartSummaryFormatting.ts +28 -0
- package/app/composables/useCategories.ts +29 -0
- package/app/composables/useCheckoutOnePage.ts +438 -0
- package/app/composables/useCheckoutProfileSource.ts +8 -0
- package/app/composables/useCheckoutSchema.ts +28 -0
- package/app/composables/useDataTable.ts +14 -0
- package/app/composables/useFormValidation.ts +29 -0
- package/app/composables/useIcons.ts +17 -0
- package/app/composables/useLocalePreferences.ts +45 -0
- package/app/composables/useMarkets.ts +15 -0
- package/app/composables/useProduct.ts +89 -0
- package/app/composables/useProductCard.ts +8 -0
- package/app/composables/useProductCardActions.ts +106 -0
- package/app/composables/useProductImage.ts +12 -0
- package/app/composables/useProductListing.ts +210 -0
- package/app/composables/useProductUrl.ts +17 -0
- package/app/composables/useProducts.ts +130 -0
- package/app/composables/useSearch.ts +12 -0
- package/app/composables/useThemeStore.ts +81 -0
- package/app/composables/useViewMode.ts +18 -0
- package/app/config/countries.ts +74 -0
- package/app/config/icons.ts +283 -0
- package/app/config/navigation.ts +191 -0
- package/app/config/palette.ts +13 -0
- package/app/config/themes.ts +20 -0
- package/app/formkit.config.ts +50 -0
- package/app/interfaces/account/address-list.ts +34 -0
- package/app/interfaces/account/order-list.ts +47 -0
- package/app/interfaces/account/order-lists.ts +35 -0
- package/app/interfaces/account/profile.ts +17 -0
- package/app/interfaces/account.ts +3 -0
- package/app/interfaces/address.ts +9 -0
- package/app/interfaces/auth.ts +104 -0
- package/app/interfaces/b2b.ts +234 -0
- package/app/interfaces/cart-calculation.ts +131 -0
- package/app/interfaces/cart-item.ts +45 -0
- package/app/interfaces/checkout-draft.ts +4 -0
- package/app/interfaces/checkout.ts +43 -0
- package/app/interfaces/delivery.ts +13 -0
- package/app/interfaces/market.ts +24 -0
- package/app/interfaces/payment.ts +19 -0
- package/app/interfaces/persisted-cart.ts +10 -0
- package/app/interfaces/product-detail.ts +54 -0
- package/app/interfaces/product-list.ts +33 -0
- package/app/interfaces/search-facets.ts +14 -0
- package/app/interfaces/validation.ts +14 -0
- package/app/layouts/default.vue +78 -0
- package/app/layouts/focus.vue +80 -0
- package/app/plugins/formkit-locale.client.ts +23 -0
- package/app/shared/constants.ts +1 -0
- package/app/validations/companyName.ts +18 -0
- package/app/validations/emailFormat.ts +10 -0
- package/app/validations/formValidationConfig.ts +50 -0
- package/app/validations/maxLength.ts +12 -0
- package/app/validations/minLength.ts +9 -0
- package/app/validations/optionalCompanyName.ts +23 -0
- package/app/validations/passwordsMatch.ts +5 -0
- package/app/validations/phoneNumber.ts +19 -0
- package/app/validations/required.ts +11 -0
- package/app/validations/termsRequired.ts +4 -0
- package/app/validations/types.ts +10 -0
- package/app/validations/zipCode.ts +15 -0
- package/i18n/locales/de/account.json +458 -0
- package/i18n/locales/de/auth.json +155 -0
- package/i18n/locales/de/cart.json +263 -0
- package/i18n/locales/de/checkout.json +217 -0
- package/i18n/locales/de/common.json +80 -0
- package/i18n/locales/de/cover.json +33 -0
- package/i18n/locales/de/order.json +1 -0
- package/i18n/locales/de/product.json +71 -0
- package/i18n/locales/de/search.json +54 -0
- package/i18n/locales/de/validation.json +12 -0
- package/i18n/locales/en/account.json +458 -0
- package/i18n/locales/en/auth.json +155 -0
- package/i18n/locales/en/cart.json +263 -0
- package/i18n/locales/en/checkout.json +217 -0
- package/i18n/locales/en/common.json +80 -0
- package/i18n/locales/en/cover.json +33 -0
- package/i18n/locales/en/order.json +1 -0
- package/i18n/locales/en/product.json +71 -0
- package/i18n/locales/en/search.json +54 -0
- package/i18n/locales/en/validation.json +12 -0
- package/nuxt.config.ts +109 -0
- package/package.json +65 -0
- package/public/img/product-placeholder.svg +8 -0
- package/public/templates/direct-order-template.csv +3 -0
- package/public/templates/direct-order-template.xlsx +0 -0
- package/server/api/account/address/[id].delete.ts +51 -0
- package/server/api/account/address/[id].put.ts +83 -0
- package/server/api/account/address/index.post.ts +60 -0
- package/server/api/account/addresses.get.ts +25 -0
- package/server/api/account/context.get.ts +16 -0
- package/server/api/account/governance/[domain]/[id].put.ts +57 -0
- package/server/api/account/governance/[domain].post.ts +111 -0
- package/server/api/account/order-lists/[id].delete.ts +22 -0
- package/server/api/account/order-lists/[id].get.ts +17 -0
- package/server/api/account/order-lists/[id].put.ts +46 -0
- package/server/api/account/order-lists/index.get.ts +14 -0
- package/server/api/account/order-lists/index.post.ts +38 -0
- package/server/api/account/orders/[id].get.ts +35 -0
- package/server/api/account/orders.get.ts +35 -0
- package/server/api/account/profile.get.ts +56 -0
- package/server/api/account/profile.put.ts +128 -0
- package/server/api/account/requisitions/[id].get.ts +15 -0
- package/server/api/account/requisitions.get.ts +23 -0
- package/server/api/auth/login.post.ts +37 -0
- package/server/api/auth/logout.post.ts +4 -0
- package/server/api/auth/me.get.ts +3 -0
- package/server/api/auth/personas.get.ts +7 -0
- package/server/api/auth/recovery.post.ts +32 -0
- package/server/api/auth/recovery.put.ts +37 -0
- package/server/api/auth/register.post.ts +126 -0
- package/server/api/cart/calculate.post.ts +25 -0
- package/server/api/cart/export.post.ts +81 -0
- package/server/api/cart/index.delete.ts +10 -0
- package/server/api/cart/index.get.ts +10 -0
- package/server/api/cart/sync.post.ts +14 -0
- package/server/api/carts/[id]/activate.post.ts +18 -0
- package/server/api/carts/[id]/index.delete.ts +18 -0
- package/server/api/carts/[id]/index.put.ts +19 -0
- package/server/api/carts/[id]/items.post.ts +21 -0
- package/server/api/carts/index.get.ts +14 -0
- package/server/api/carts/index.post.ts +14 -0
- package/server/api/categories/[slug].get.ts +22 -0
- package/server/api/categories/index.get.ts +11 -0
- package/server/api/checkout/profile.get.ts +21 -0
- package/server/api/checkout/schema/[key].get.ts +19 -0
- package/server/api/checkout/session.post.ts +8 -0
- package/server/api/images/detail/[filename].get.ts +18 -0
- package/server/api/images/list/[filename].get.ts +17 -0
- package/server/api/markets.get.ts +9 -0
- package/server/api/orders/index.post.ts +376 -0
- package/server/api/payment/methods.post.ts +65 -0
- package/server/api/product/[id].get.ts +29 -0
- package/server/api/products/[id].get.ts +30 -0
- package/server/api/products/index.get.ts +21 -0
- package/server/api/requisitions/index.post.ts +67 -0
- package/server/api/shipping/rates.post.ts +70 -0
- package/server/api/themes/index.get.ts +9 -0
- package/server/api/typesense/drop.get.ts +22 -0
- package/server/api/typesense/health.get.ts +9 -0
- package/server/api/typesense/search.post.ts +199 -0
- package/server/api/typesense/seed.get.ts +112 -0
- package/server/api/typesense/suggest.post.ts +69 -0
- package/server/config/account/organization.json +146 -0
- package/server/config/account/personas.json +169 -0
- package/server/config/account/user.json +8 -0
- package/server/config/account/workflows.json +19 -0
- package/server/data/account/address-list.json +103 -0
- package/server/data/account/order-list.json +491 -0
- package/server/data/account/order-lists.json +149 -0
- package/server/data/account/profile.json +9 -0
- package/server/data/account/registration-requests.json +3 -0
- package/server/data/account/requisitions.json +686 -0
- package/server/data/categories.json +186 -0
- package/server/data/forms/checkout/add-address.json +24 -0
- package/server/data/list/5137-1.png +0 -0
- package/server/data/list/5498-1.png +0 -0
- package/server/data/list/5498-2.png +0 -0
- package/server/data/list/5498-3.png +0 -0
- package/server/data/list/5498-4.png +0 -0
- package/server/data/list/5498-5.png +0 -0
- package/server/data/list/5498-6.png +0 -0
- package/server/data/list/5519-1.png +0 -0
- package/server/data/list/5713-1.png +0 -0
- package/server/data/list/5789-1.png +0 -0
- package/server/data/list/5930-1.png +0 -0
- package/server/data/list/6127-1.png +0 -0
- package/server/data/list/6234-1.png +0 -0
- package/server/data/list/6238-1.png +0 -0
- package/server/data/list/6246-1.png +0 -0
- package/server/data/list/6270-1.png +0 -0
- package/server/data/list/6330-1.png +0 -0
- package/server/data/list/6336-1.png +0 -0
- package/server/data/list/6360-1.png +0 -0
- package/server/data/list/6363-1.png +0 -0
- package/server/data/list/6375-1.png +0 -0
- package/server/data/list/6385-1.png +0 -0
- package/server/data/list/6413-1.png +0 -0
- package/server/data/list/6418-1.png +0 -0
- package/server/data/list/6465-1.png +0 -0
- package/server/data/list/6477-1.png +0 -0
- package/server/data/list/6509-1.png +0 -0
- package/server/data/list/6545-1.png +0 -0
- package/server/data/list/6548-1.png +0 -0
- package/server/data/list/6566-1.png +0 -0
- package/server/data/list/6581-1.png +0 -0
- package/server/data/list/6609-1.png +0 -0
- package/server/data/list/6611-1.png +0 -0
- package/server/data/list/6641-1.png +0 -0
- package/server/data/list/6659-1.png +0 -0
- package/server/data/list/6662-1.png +0 -0
- package/server/data/list/6689-1.png +0 -0
- package/server/data/list/6698-1.png +0 -0
- package/server/data/list/6701-1.png +0 -0
- package/server/data/list/6752-1.png +0 -0
- package/server/data/list/6755-1.png +0 -0
- package/server/data/list/6837-1.png +0 -0
- package/server/data/list/6841-1.png +0 -0
- package/server/data/list/6844-1.png +0 -0
- package/server/data/list/6846-1.png +0 -0
- package/server/data/list/6886-1.png +0 -0
- package/server/data/list/6895-1.png +0 -0
- package/server/data/list/6897-1.png +0 -0
- package/server/data/list/6919-1.png +0 -0
- package/server/data/list/6977-1.png +0 -0
- package/server/data/list/6983-1.png +0 -0
- package/server/data/list/6984-1.png +0 -0
- package/server/data/list/6985-1.png +0 -0
- package/server/data/list/6986-1.png +0 -0
- package/server/data/list/6989-1.png +0 -0
- package/server/data/list/6995-1.png +0 -0
- package/server/data/list/6998-1.png +0 -0
- package/server/data/markets.json +24 -0
- package/server/data/product-detail.json +2450 -0
- package/server/data/product-list.json +2450 -0
- package/server/data/themes.json +8 -0
- package/server/interfaces/account.ts +20 -0
- package/server/interfaces/auth.ts +32 -0
- package/server/interfaces/b2bContext.ts +23 -0
- package/server/interfaces/cart.ts +46 -0
- package/server/interfaces/cartCalculation.ts +17 -0
- package/server/interfaces/category.ts +12 -0
- package/server/interfaces/checkoutProfile.ts +5 -0
- package/server/interfaces/log.ts +3 -0
- package/server/interfaces/market.ts +10 -0
- package/server/interfaces/product.ts +21 -0
- package/server/interfaces/schema.ts +20 -0
- package/server/interfaces/theme.ts +10 -0
- package/server/services/ApiAuthService.ts +138 -0
- package/server/services/ApiCartService.ts +254 -0
- package/server/services/ApiCategoryService.ts +25 -0
- package/server/services/ApiMarketService.ts +71 -0
- package/server/services/ApiProductService.ts +53 -0
- package/server/services/LocalFileCategoryService.ts +23 -0
- package/server/services/LocalFileCheckoutProfileService.ts +117 -0
- package/server/services/LocalFileProductService.ts +128 -0
- package/server/services/LocalFileSchemaService.ts +70 -0
- package/server/services/LocalFileThemeService.ts +18 -0
- package/server/services/LogService.ts +28 -0
- package/server/services/MockAccountService.ts +58 -0
- package/server/services/MockAuthService.ts +105 -0
- package/server/services/MockB2BContextService.ts +149 -0
- package/server/services/MockCartCalculationService.ts +395 -0
- package/server/services/MockMarketService.ts +18 -0
- package/server/services/SdkAccountService.ts +56 -0
- package/server/services/SdkAuthService.ts +83 -0
- package/server/services/SessionCartService.ts +31 -0
- package/server/utils/accountService.ts +30 -0
- package/server/utils/authCookie.ts +13 -0
- package/server/utils/authService.ts +43 -0
- package/server/utils/b2bService.ts +49 -0
- package/server/utils/cartService.ts +59 -0
- package/server/utils/categoryService.ts +19 -0
- package/server/utils/checkoutProfileService.ts +9 -0
- package/server/utils/checkoutSession.ts +38 -0
- package/server/utils/coverData.ts +84 -0
- package/server/utils/governanceStore.ts +38 -0
- package/server/utils/i18n.ts +76 -0
- package/server/utils/inventoryService.ts +14 -0
- package/server/utils/liveCatalog.ts +234 -0
- package/server/utils/liveInventories.ts +76 -0
- package/server/utils/liveOrders.ts +139 -0
- package/server/utils/livePrices.ts +93 -0
- package/server/utils/locale.ts +39 -0
- package/server/utils/logService.ts +19 -0
- package/server/utils/marketService.ts +24 -0
- package/server/utils/orderService.ts +14 -0
- package/server/utils/paymentService.ts +14 -0
- package/server/utils/priceService.ts +14 -0
- package/server/utils/productService.ts +28 -0
- package/server/utils/productsSchema.ts +30 -0
- package/server/utils/revenexxApi.ts +136 -0
- package/server/utils/schemaService.ts +25 -0
- package/server/utils/serviceMode.ts +70 -0
- package/server/utils/shippingService.ts +14 -0
- package/server/utils/shopSdk.ts +88 -0
- package/server/utils/themeService.ts +16 -0
- package/server/utils/typesense.ts +27 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Locale selector (Smashing Magazine, "Designing A Better Language
|
|
4
|
+
* Selector"): a non-modal popover that decouples language and market.
|
|
5
|
+
* Markets come from the markets app (live: /v1/markets via the BFF) and
|
|
6
|
+
* carry region + currency; languages show their native full names (never
|
|
7
|
+
* flags or codes) and are limited to the locales the selected market
|
|
8
|
+
* offers. The trigger shows the current combination prominently.
|
|
9
|
+
*/
|
|
10
|
+
const { icon } = useIcons();
|
|
11
|
+
const { t, locale, locales } = useI18n();
|
|
12
|
+
const switchLocalePath = useSwitchLocalePath();
|
|
13
|
+
const { markets } = useMarkets();
|
|
14
|
+
const { market, setMarket, region, currencySymbol } = useLocalePreferences(markets);
|
|
15
|
+
|
|
16
|
+
const open = ref(false);
|
|
17
|
+
|
|
18
|
+
const marketItems = computed(() => markets.value.map(entry => ({
|
|
19
|
+
code: entry.code,
|
|
20
|
+
name: entry.name,
|
|
21
|
+
active: entry.code === market.value?.code,
|
|
22
|
+
})));
|
|
23
|
+
|
|
24
|
+
const languageItems = computed(() => {
|
|
25
|
+
const offered = new Set(market.value?.locales.map(entry => entry.language) ?? []);
|
|
26
|
+
return locales.value
|
|
27
|
+
.filter(entry => offered.size === 0 || offered.has(entry.code))
|
|
28
|
+
.map(entry => ({
|
|
29
|
+
code: entry.code,
|
|
30
|
+
/** Native full name ("Deutsch", "English") — never flags or codes. */
|
|
31
|
+
name: entry.name ?? entry.code,
|
|
32
|
+
to: switchLocalePath(entry.code),
|
|
33
|
+
active: entry.code === locale.value,
|
|
34
|
+
}));
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const currentLanguageName = computed(() =>
|
|
38
|
+
languageItems.value.find(item => item.active)?.name ?? locale.value);
|
|
39
|
+
|
|
40
|
+
async function onLanguageChange(code: string): Promise<void> {
|
|
41
|
+
const target = languageItems.value.find(item => item.code === code);
|
|
42
|
+
if (target && !target.active) {
|
|
43
|
+
await navigateTo(target.to);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async function onMarketChange(code: string): Promise<void> {
|
|
48
|
+
setMarket(code);
|
|
49
|
+
// The market may not offer the current language — fall back to its first.
|
|
50
|
+
const fallback = languageItems.value[0];
|
|
51
|
+
if (fallback && !languageItems.value.some(item => item.active)) {
|
|
52
|
+
await navigateTo(fallback.to);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** The trigger states the full current selection, e.g. "Deutschland (Deutsch) in €". */
|
|
57
|
+
const triggerLabel = computed(() =>
|
|
58
|
+
region.value
|
|
59
|
+
? `${region.value} (${currentLanguageName.value}) in ${currencySymbol.value}`
|
|
60
|
+
: currentLanguageName.value);
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<template>
|
|
64
|
+
<UPopover
|
|
65
|
+
v-model:open="open"
|
|
66
|
+
:content="{ align: 'end' }"
|
|
67
|
+
>
|
|
68
|
+
<button
|
|
69
|
+
type="button"
|
|
70
|
+
tabindex="0"
|
|
71
|
+
class="flex gap-1.5 items-center cursor-pointer hover:underline underline-offset-4 decoration-2"
|
|
72
|
+
:aria-label="t('topbar.switchLocale')"
|
|
73
|
+
>
|
|
74
|
+
<UIcon
|
|
75
|
+
:name="icon('globe')"
|
|
76
|
+
class="size-4"
|
|
77
|
+
/>
|
|
78
|
+
{{ triggerLabel }}
|
|
79
|
+
<UIcon
|
|
80
|
+
:name="icon('chevron-down')"
|
|
81
|
+
class="size-3.5"
|
|
82
|
+
/>
|
|
83
|
+
</button>
|
|
84
|
+
|
|
85
|
+
<template #content>
|
|
86
|
+
<div class="w-80 p-4 space-y-4">
|
|
87
|
+
<!-- Market: region + currency in one choice, served by the markets app -->
|
|
88
|
+
<UFormField :label="t('topbar.localePanel.region')">
|
|
89
|
+
<USelect
|
|
90
|
+
:model-value="market?.code"
|
|
91
|
+
value-key="code"
|
|
92
|
+
label-key="name"
|
|
93
|
+
:items="marketItems"
|
|
94
|
+
class="w-full"
|
|
95
|
+
@update:model-value="(code: string) => onMarketChange(code)"
|
|
96
|
+
/>
|
|
97
|
+
</UFormField>
|
|
98
|
+
|
|
99
|
+
<!-- Language: native full names within the market's locales -->
|
|
100
|
+
<UFormField :label="t('topbar.localePanel.language')">
|
|
101
|
+
<USelect
|
|
102
|
+
:model-value="locale"
|
|
103
|
+
value-key="code"
|
|
104
|
+
label-key="name"
|
|
105
|
+
:items="languageItems"
|
|
106
|
+
class="w-full"
|
|
107
|
+
@update:model-value="(code: string) => onLanguageChange(code)"
|
|
108
|
+
/>
|
|
109
|
+
</UFormField>
|
|
110
|
+
|
|
111
|
+
<!-- Currency: defined by the market -->
|
|
112
|
+
<div class="flex items-center justify-between text-sm">
|
|
113
|
+
<span class="text-muted">{{ t('topbar.localePanel.currency') }}</span>
|
|
114
|
+
<span class="font-medium">{{ currencySymbol }}</span>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
<p class="text-xs text-dimmed">
|
|
118
|
+
{{ t('topbar.localePanel.hint') }}
|
|
119
|
+
</p>
|
|
120
|
+
</div>
|
|
121
|
+
</template>
|
|
122
|
+
</UPopover>
|
|
123
|
+
</template>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { mainNavigation, mainNavigationSecondary } from "../../../config/navigation";
|
|
3
|
+
|
|
4
|
+
const { t } = useI18n();
|
|
5
|
+
const localePath = useLocalePath();
|
|
6
|
+
const route = useRoute();
|
|
7
|
+
|
|
8
|
+
function isActive(to: string): boolean {
|
|
9
|
+
const localized = localePath(to);
|
|
10
|
+
if (to === "/") {
|
|
11
|
+
return route.path === localized;
|
|
12
|
+
}
|
|
13
|
+
return route.path === localized || route.path.startsWith(`${localized}/`);
|
|
14
|
+
}
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<nav
|
|
19
|
+
:aria-label="t('nav.mainNavigation')"
|
|
20
|
+
class="bg-inverted text-inverted"
|
|
21
|
+
>
|
|
22
|
+
<div
|
|
23
|
+
class="px-4 sm:px-6 lg:px-8 max-w-(--ui-container) mx-auto w-full
|
|
24
|
+
py-3 flex items-center gap-8"
|
|
25
|
+
>
|
|
26
|
+
<ul
|
|
27
|
+
role="list"
|
|
28
|
+
class="flex-1 flex items-center gap-6 lg:gap-8 overflow-x-auto"
|
|
29
|
+
>
|
|
30
|
+
<li
|
|
31
|
+
v-for="item in mainNavigation"
|
|
32
|
+
:key="item.to"
|
|
33
|
+
>
|
|
34
|
+
<NuxtLink
|
|
35
|
+
:to="localePath(item.to)"
|
|
36
|
+
class="inline-block py-0.5 whitespace-nowrap underline-offset-4 decoration-2 hover:underline"
|
|
37
|
+
:class="{ 'underline': isActive(item.to) }"
|
|
38
|
+
>
|
|
39
|
+
{{ t(item.labelKey) }}
|
|
40
|
+
</NuxtLink>
|
|
41
|
+
</li>
|
|
42
|
+
</ul>
|
|
43
|
+
<ul
|
|
44
|
+
role="list"
|
|
45
|
+
class="hidden md:flex items-center gap-6"
|
|
46
|
+
>
|
|
47
|
+
<li
|
|
48
|
+
v-for="item in mainNavigationSecondary"
|
|
49
|
+
:key="item.to"
|
|
50
|
+
>
|
|
51
|
+
<NuxtLink
|
|
52
|
+
:to="localePath(item.to)"
|
|
53
|
+
class="inline-block py-0.5 whitespace-nowrap underline-offset-4 decoration-2 hover:underline"
|
|
54
|
+
>
|
|
55
|
+
{{ t(item.labelKey) }}
|
|
56
|
+
</NuxtLink>
|
|
57
|
+
</li>
|
|
58
|
+
</ul>
|
|
59
|
+
</div>
|
|
60
|
+
</nav>
|
|
61
|
+
</template>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const { icon } = useIcons();
|
|
3
|
+
|
|
4
|
+
const { categoryNavItems } = useCategories();
|
|
5
|
+
const auth = useAuthStore();
|
|
6
|
+
const toast = useToast();
|
|
7
|
+
const { t } = useI18n();
|
|
8
|
+
const localePath = useLocalePath();
|
|
9
|
+
|
|
10
|
+
const accountLinks = computed(() => [
|
|
11
|
+
{ label: t("menu.profile"), icon: icon("user"), to: "/account", tabindex: 0 },
|
|
12
|
+
{ label: t("menu.addresses"), icon: icon("location"), to: "/account/addresses", tabindex: 0 },
|
|
13
|
+
{ label: t("menu.orders"), icon: icon("orders"), to: "/account/orders", tabindex: 0 },
|
|
14
|
+
]);
|
|
15
|
+
|
|
16
|
+
const onLogout = async () => {
|
|
17
|
+
await auth.logout();
|
|
18
|
+
toast.add({
|
|
19
|
+
title: t("auth.logout.success"),
|
|
20
|
+
color: "primary",
|
|
21
|
+
icon: icon("check"),
|
|
22
|
+
duration: 1000,
|
|
23
|
+
});
|
|
24
|
+
await navigateTo(localePath("/login"));
|
|
25
|
+
};
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<div class="flex flex-col gap-4 pb-4">
|
|
30
|
+
<div class="md:hidden">
|
|
31
|
+
<UNavigationMenu
|
|
32
|
+
:items="categoryNavItems"
|
|
33
|
+
orientation="vertical"
|
|
34
|
+
:ui="{ linkLeadingIcon: 'text-(--ui-primary)', childLinkIcon: 'text-(--ui-primary)' }"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<USeparator class="md:hidden" />
|
|
39
|
+
|
|
40
|
+
<template v-if="auth.isLoggedIn">
|
|
41
|
+
<UNavigationMenu
|
|
42
|
+
:items="accountLinks"
|
|
43
|
+
orientation="vertical"
|
|
44
|
+
:ui="{ linkLeadingIcon: 'text-(--ui-primary)' }"
|
|
45
|
+
/>
|
|
46
|
+
|
|
47
|
+
<UButton
|
|
48
|
+
:label="t('menu.logout')"
|
|
49
|
+
:icon="icon('logout')"
|
|
50
|
+
color="error"
|
|
51
|
+
variant="ghost"
|
|
52
|
+
class="w-full justify-start"
|
|
53
|
+
tabindex="0"
|
|
54
|
+
@click="onLogout"
|
|
55
|
+
/>
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<template v-else>
|
|
59
|
+
<div class="flex flex-col gap-2">
|
|
60
|
+
<UButton
|
|
61
|
+
:label="t('auth.login.submit')"
|
|
62
|
+
:icon="icon('login')"
|
|
63
|
+
color="primary"
|
|
64
|
+
variant="solid"
|
|
65
|
+
class="w-full justify-center"
|
|
66
|
+
:to="localePath('/login')"
|
|
67
|
+
tabindex="0"
|
|
68
|
+
/>
|
|
69
|
+
<UButton
|
|
70
|
+
:label="t('auth.register.submit')"
|
|
71
|
+
:icon="icon('register')"
|
|
72
|
+
color="primary"
|
|
73
|
+
variant="outline"
|
|
74
|
+
class="w-full justify-center"
|
|
75
|
+
:to="localePath('/register')"
|
|
76
|
+
tabindex="0"
|
|
77
|
+
/>
|
|
78
|
+
</div>
|
|
79
|
+
</template>
|
|
80
|
+
</div>
|
|
81
|
+
</template>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { topbarQuickLinks, topbarUsps } from "../../../config/navigation";
|
|
3
|
+
|
|
4
|
+
const { icon } = useIcons();
|
|
5
|
+
const { t } = useI18n();
|
|
6
|
+
const localePath = useLocalePath();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div class="bg-elevated text-sm text-muted border-b border-default">
|
|
11
|
+
<div
|
|
12
|
+
class="px-4 sm:px-6 lg:px-8 max-w-(--ui-container) mx-auto w-full
|
|
13
|
+
py-2 flex items-center gap-6"
|
|
14
|
+
>
|
|
15
|
+
<ul
|
|
16
|
+
role="list"
|
|
17
|
+
class="flex-1 hidden lg:flex items-center gap-6"
|
|
18
|
+
>
|
|
19
|
+
<li
|
|
20
|
+
v-for="usp in topbarUsps"
|
|
21
|
+
:key="usp.labelKey"
|
|
22
|
+
class="flex items-center gap-2"
|
|
23
|
+
>
|
|
24
|
+
<UIcon
|
|
25
|
+
:name="icon(usp.icon)"
|
|
26
|
+
class="size-4 shrink-0 text-primary"
|
|
27
|
+
/>
|
|
28
|
+
{{ t(usp.labelKey) }}
|
|
29
|
+
</li>
|
|
30
|
+
</ul>
|
|
31
|
+
<ul
|
|
32
|
+
role="list"
|
|
33
|
+
class="ml-auto flex items-center gap-5"
|
|
34
|
+
>
|
|
35
|
+
<li
|
|
36
|
+
v-for="link in topbarQuickLinks"
|
|
37
|
+
:key="link.to"
|
|
38
|
+
class="max-sm:hidden"
|
|
39
|
+
>
|
|
40
|
+
<NuxtLink
|
|
41
|
+
:to="localePath(link.to)"
|
|
42
|
+
class="hover:underline underline-offset-4 decoration-2"
|
|
43
|
+
>
|
|
44
|
+
{{ t(link.labelKey) }}
|
|
45
|
+
</NuxtLink>
|
|
46
|
+
</li>
|
|
47
|
+
<li>
|
|
48
|
+
<LayoutHeaderLocaleSwitcher />
|
|
49
|
+
</li>
|
|
50
|
+
<li class="flex items-center">
|
|
51
|
+
<UTooltip :text="t('nav.darkModeToggle')">
|
|
52
|
+
<UColorModeButton
|
|
53
|
+
color="neutral"
|
|
54
|
+
size="xs"
|
|
55
|
+
class="cursor-pointer"
|
|
56
|
+
tabindex="0"
|
|
57
|
+
/>
|
|
58
|
+
</UTooltip>
|
|
59
|
+
</li>
|
|
60
|
+
</ul>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import SearchFacets from "../search/filter/SearchFacets.vue";
|
|
3
|
+
import type { ProductListing } from "../../composables/useProductListing";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The shared product listing composition for search and category pages:
|
|
7
|
+
* toolbar (result count, sort, view toggle, mobile filter button), facet
|
|
8
|
+
* rail on desktop, filter drawer on mobile, active filter chips, the
|
|
9
|
+
* product grid/list and pagination. Pages provide their own header above.
|
|
10
|
+
*/
|
|
11
|
+
const props = defineProps<{
|
|
12
|
+
listing: ProductListing;
|
|
13
|
+
}>();
|
|
14
|
+
|
|
15
|
+
const { icon } = useIcons();
|
|
16
|
+
const { t } = useI18n();
|
|
17
|
+
const { viewMode } = useViewMode();
|
|
18
|
+
|
|
19
|
+
const drawerOpen = ref(false);
|
|
20
|
+
|
|
21
|
+
const FACET_VALUE_LABELS: Record<string, Record<string, string>> = {
|
|
22
|
+
available: { true: "search.filters.values.inStock", false: "search.filters.values.outOfStock" },
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
function chipLabel(field: string, value: string): string {
|
|
26
|
+
const key = FACET_VALUE_LABELS[field]?.[value];
|
|
27
|
+
return key ? t(key) : value;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const listing = props.listing;
|
|
31
|
+
|
|
32
|
+
const gridClasses = computed(() => viewMode.value === "grid"
|
|
33
|
+
? "grid grid-cols-2 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 gap-4"
|
|
34
|
+
: "flex flex-col gap-4");
|
|
35
|
+
|
|
36
|
+
const listView = resolveComponent("CategoryViewListView");
|
|
37
|
+
const gridView = resolveComponent("CategoryViewGridView");
|
|
38
|
+
const productComponent = computed(() => viewMode.value === "list" ? listView : gridView);
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<div>
|
|
43
|
+
<!-- Toolbar -->
|
|
44
|
+
<div
|
|
45
|
+
class="flex flex-wrap items-center justify-between gap-3 border-b border-(--ui-border)
|
|
46
|
+
pb-4"
|
|
47
|
+
>
|
|
48
|
+
<p
|
|
49
|
+
class="text-sm text-muted tabular-nums"
|
|
50
|
+
aria-live="polite"
|
|
51
|
+
>
|
|
52
|
+
<template v-if="listing.pending.value && !listing.data.value">
|
|
53
|
+
|
|
54
|
+
</template>
|
|
55
|
+
<template v-else>
|
|
56
|
+
{{ t('search.results.count', listing.found.value, { count: listing.found.value }) }}
|
|
57
|
+
</template>
|
|
58
|
+
</p>
|
|
59
|
+
<div class="flex items-center gap-2">
|
|
60
|
+
<UButton
|
|
61
|
+
color="neutral"
|
|
62
|
+
variant="outline"
|
|
63
|
+
size="sm"
|
|
64
|
+
tabindex="0"
|
|
65
|
+
class="lg:hidden"
|
|
66
|
+
:icon="icon('filters')"
|
|
67
|
+
:label="t('search.filters.title')"
|
|
68
|
+
@click="drawerOpen = true"
|
|
69
|
+
>
|
|
70
|
+
<template
|
|
71
|
+
v-if="listing.activeFilterCount.value"
|
|
72
|
+
#trailing
|
|
73
|
+
>
|
|
74
|
+
<UBadge
|
|
75
|
+
color="primary"
|
|
76
|
+
variant="solid"
|
|
77
|
+
size="sm"
|
|
78
|
+
:label="String(listing.activeFilterCount.value)"
|
|
79
|
+
/>
|
|
80
|
+
</template>
|
|
81
|
+
</UButton>
|
|
82
|
+
<USelect
|
|
83
|
+
v-model="listing.sort.value"
|
|
84
|
+
:items="listing.sortOptions.value"
|
|
85
|
+
value-key="value"
|
|
86
|
+
size="sm"
|
|
87
|
+
class="w-44"
|
|
88
|
+
:aria-label="t('search.sort.label')"
|
|
89
|
+
/>
|
|
90
|
+
<CategoryViewToggle class="max-sm:hidden" />
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<div class="flex gap-8 items-start pt-6">
|
|
95
|
+
<!-- Desktop facet rail -->
|
|
96
|
+
<div class="hidden lg:block w-60 shrink-0 sticky top-(--ui-header-height) pt-1">
|
|
97
|
+
<SearchFacets
|
|
98
|
+
v-model="listing.activeFilters.value"
|
|
99
|
+
v-model:price-range="listing.priceRange.value"
|
|
100
|
+
:facets="listing.facets.value"
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<div class="flex-1 min-w-0">
|
|
105
|
+
<!-- Active filter chips -->
|
|
106
|
+
<div
|
|
107
|
+
v-if="listing.chips.value.length"
|
|
108
|
+
class="flex flex-wrap items-center gap-2 mb-4"
|
|
109
|
+
>
|
|
110
|
+
<button
|
|
111
|
+
v-for="chip in listing.chips.value"
|
|
112
|
+
:key="`${chip.field}:${chip.value}`"
|
|
113
|
+
type="button"
|
|
114
|
+
tabindex="0"
|
|
115
|
+
class="inline-flex items-center gap-1.5 ps-3 pe-2 py-1 rounded-full text-xs
|
|
116
|
+
font-medium bg-elevated text-highlighted border border-(--ui-border)
|
|
117
|
+
hover:border-(--ui-primary) transition-colors cursor-pointer"
|
|
118
|
+
:aria-label="t('search.filters.removeFilter', { value: chipLabel(chip.field, chip.value) })"
|
|
119
|
+
@click="listing.removeChip(chip.field, chip.value)"
|
|
120
|
+
>
|
|
121
|
+
{{ chipLabel(chip.field, chip.value) }}
|
|
122
|
+
<UIcon
|
|
123
|
+
:name="icon('close')"
|
|
124
|
+
class="size-3.5 text-muted"
|
|
125
|
+
/>
|
|
126
|
+
</button>
|
|
127
|
+
<button
|
|
128
|
+
type="button"
|
|
129
|
+
tabindex="0"
|
|
130
|
+
class="text-xs text-muted hover:text-highlighted underline underline-offset-4
|
|
131
|
+
decoration-2 transition-colors cursor-pointer"
|
|
132
|
+
@click="listing.clearFilters()"
|
|
133
|
+
>
|
|
134
|
+
{{ t('search.filters.clearAll') }}
|
|
135
|
+
</button>
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
<!-- Loading skeleton -->
|
|
139
|
+
<div
|
|
140
|
+
v-if="listing.pending.value && !listing.data.value"
|
|
141
|
+
:class="gridClasses"
|
|
142
|
+
>
|
|
143
|
+
<div
|
|
144
|
+
v-for="n in 8"
|
|
145
|
+
:key="n"
|
|
146
|
+
class="space-y-3"
|
|
147
|
+
>
|
|
148
|
+
<USkeleton class="h-44 w-full rounded-lg" />
|
|
149
|
+
<USkeleton class="h-4 w-3/4" />
|
|
150
|
+
<USkeleton class="h-4 w-1/2" />
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
|
|
154
|
+
<UiFeedbackErrorBoundary
|
|
155
|
+
v-else-if="listing.error.value"
|
|
156
|
+
:title="t('search.results.error')"
|
|
157
|
+
@retry="listing.execute"
|
|
158
|
+
/>
|
|
159
|
+
|
|
160
|
+
<!-- Results -->
|
|
161
|
+
<template v-else-if="listing.products.value.length">
|
|
162
|
+
<div
|
|
163
|
+
:class="[gridClasses, listing.pending.value ? 'opacity-60 transition-opacity' : '']"
|
|
164
|
+
>
|
|
165
|
+
<component
|
|
166
|
+
:is="productComponent"
|
|
167
|
+
v-for="product in listing.products.value"
|
|
168
|
+
:key="product.id"
|
|
169
|
+
:product="product"
|
|
170
|
+
/>
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
<div
|
|
174
|
+
v-if="listing.totalPages.value > 1"
|
|
175
|
+
class="mt-8 flex flex-col items-center gap-2"
|
|
176
|
+
>
|
|
177
|
+
<UPagination
|
|
178
|
+
v-model:page="listing.page.value"
|
|
179
|
+
:total="listing.found.value"
|
|
180
|
+
:items-per-page="listing.perPage"
|
|
181
|
+
/>
|
|
182
|
+
</div>
|
|
183
|
+
</template>
|
|
184
|
+
|
|
185
|
+
<!-- Empty -->
|
|
186
|
+
<slot
|
|
187
|
+
v-else-if="listing.isEmpty.value"
|
|
188
|
+
name="empty"
|
|
189
|
+
>
|
|
190
|
+
<UiFeedbackEmptyState
|
|
191
|
+
icon="no-results"
|
|
192
|
+
:title="t('search.results.emptyTitle')"
|
|
193
|
+
:description="t('search.results.emptyDescription')"
|
|
194
|
+
/>
|
|
195
|
+
</slot>
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
|
|
199
|
+
<!-- Mobile filter drawer -->
|
|
200
|
+
<UDrawer
|
|
201
|
+
v-model:open="drawerOpen"
|
|
202
|
+
direction="left"
|
|
203
|
+
:ui="{ content: 'w-80 max-w-[85vw] h-full' }"
|
|
204
|
+
>
|
|
205
|
+
<template #content>
|
|
206
|
+
<div class="flex h-full flex-col">
|
|
207
|
+
<div class="flex-1 overflow-y-auto p-4">
|
|
208
|
+
<SearchFacets
|
|
209
|
+
v-model="listing.activeFilters.value"
|
|
210
|
+
v-model:price-range="listing.priceRange.value"
|
|
211
|
+
:facets="listing.facets.value"
|
|
212
|
+
/>
|
|
213
|
+
</div>
|
|
214
|
+
<div class="border-t border-(--ui-border) p-4">
|
|
215
|
+
<UButton
|
|
216
|
+
block
|
|
217
|
+
color="primary"
|
|
218
|
+
tabindex="0"
|
|
219
|
+
:label="t('search.filters.showResults', listing.found.value, { count: listing.found.value })"
|
|
220
|
+
@click="drawerOpen = false"
|
|
221
|
+
/>
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
</template>
|
|
225
|
+
</UDrawer>
|
|
226
|
+
</div>
|
|
227
|
+
</template>
|