@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,36 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useI18n } from "vue-i18n";
|
|
3
|
+
|
|
4
|
+
import type { ProductDetailStock } from "../../../interfaces/product-detail";
|
|
5
|
+
|
|
6
|
+
defineProps<{
|
|
7
|
+
stocks: ProductDetailStock[];
|
|
8
|
+
available: boolean;
|
|
9
|
+
}>();
|
|
10
|
+
|
|
11
|
+
const { t } = useI18n();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div class="flex flex-wrap items-center gap-x-4 gap-y-1.5 text-sm">
|
|
16
|
+
<span class="inline-flex items-center gap-1.5 font-medium">
|
|
17
|
+
<span
|
|
18
|
+
class="size-2 rounded-full"
|
|
19
|
+
:class="available ? 'bg-success' : 'bg-error'"
|
|
20
|
+
/>
|
|
21
|
+
<span :class="available ? 'text-success' : 'text-error'">
|
|
22
|
+
{{ available ? t('product.stock.available') : t('product.stock.unavailable') }}
|
|
23
|
+
</span>
|
|
24
|
+
</span>
|
|
25
|
+
<template v-if="available && stocks.length">
|
|
26
|
+
<span
|
|
27
|
+
v-for="(stock, index) in stocks"
|
|
28
|
+
:key="index"
|
|
29
|
+
class="text-muted"
|
|
30
|
+
>
|
|
31
|
+
{{ t('product.stock.unitsAvailable', { count: stock.quantity.toLocaleString('de-DE') }) }}
|
|
32
|
+
· {{ t('product.stock.maxPerOrder', { max: stock.maxOrderQuantity }) }}
|
|
33
|
+
</span>
|
|
34
|
+
</template>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useDebounceFn } from "@vueuse/core";
|
|
3
|
+
|
|
4
|
+
import type { PriceRange, SearchFacet } from "../../../interfaces/search-facets";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Facet filter panel: collapsible groups with value counts and a price
|
|
8
|
+
* range. Used as the desktop rail and inside the mobile filter drawer.
|
|
9
|
+
*/
|
|
10
|
+
const props = defineProps<{
|
|
11
|
+
facets: SearchFacet[];
|
|
12
|
+
modelValue: Record<string, string[]>;
|
|
13
|
+
priceRange: PriceRange;
|
|
14
|
+
}>();
|
|
15
|
+
|
|
16
|
+
const emit = defineEmits<{
|
|
17
|
+
"update:modelValue": [value: Record<string, string[]>];
|
|
18
|
+
"update:priceRange": [value: PriceRange];
|
|
19
|
+
}>();
|
|
20
|
+
|
|
21
|
+
const { icon } = useIcons();
|
|
22
|
+
const { t } = useI18n();
|
|
23
|
+
|
|
24
|
+
const FACET_VALUE_KEY_MAP: Record<string, Record<string, string>> = {
|
|
25
|
+
available: {
|
|
26
|
+
true: "search.filters.values.inStock",
|
|
27
|
+
false: "search.filters.values.outOfStock",
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const visibleFacets = computed(() => props.facets.filter(f => f.counts.length > 0));
|
|
32
|
+
|
|
33
|
+
const hasActiveFilters = computed(() =>
|
|
34
|
+
Object.values(props.modelValue).some(v => v.length > 0)
|
|
35
|
+
|| props.priceRange.min !== undefined
|
|
36
|
+
|| props.priceRange.max !== undefined,
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const openGroups = ref<Record<string, boolean>>({});
|
|
40
|
+
|
|
41
|
+
function isOpen(field: string): boolean {
|
|
42
|
+
return openGroups.value[field] ?? true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function toggleGroup(field: string): void {
|
|
46
|
+
openGroups.value = { ...openGroups.value, [field]: !isOpen(field) };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function activeCount(field: string): number {
|
|
50
|
+
return props.modelValue[field]?.length ?? 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function isChecked(field: string, value: string): boolean {
|
|
54
|
+
return props.modelValue[field]?.includes(value) ?? false;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function toggle(field: string, value: string) {
|
|
58
|
+
const current = props.modelValue[field] ?? [];
|
|
59
|
+
const next = current.includes(value)
|
|
60
|
+
? current.filter(v => v !== value)
|
|
61
|
+
: [...current, value];
|
|
62
|
+
emit("update:modelValue", { ...props.modelValue, [field]: next });
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function clearAll() {
|
|
66
|
+
emit("update:modelValue", {});
|
|
67
|
+
emit("update:priceRange", {});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function facetLabel(fieldName: string): string {
|
|
71
|
+
return t(`search.filters.facets.${fieldName}`, fieldName);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function facetValueLabel(fieldName: string, value: string): string {
|
|
75
|
+
const key = FACET_VALUE_KEY_MAP[fieldName]?.[value];
|
|
76
|
+
return key ? t(key) : value;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* ---- price range (euros, debounced) ------------------------------- */
|
|
80
|
+
const localPriceMin = ref<number | undefined>(props.priceRange.min);
|
|
81
|
+
const localPriceMax = ref<number | undefined>(props.priceRange.max);
|
|
82
|
+
|
|
83
|
+
watch(
|
|
84
|
+
() => props.priceRange,
|
|
85
|
+
(val) => {
|
|
86
|
+
localPriceMin.value = val.min;
|
|
87
|
+
localPriceMax.value = val.max;
|
|
88
|
+
},
|
|
89
|
+
{ deep: true },
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
const emitPrice = useDebounceFn(() => {
|
|
93
|
+
emit("update:priceRange", {
|
|
94
|
+
min: typeof localPriceMin.value === "number" && !isNaN(localPriceMin.value)
|
|
95
|
+
? localPriceMin.value
|
|
96
|
+
: undefined,
|
|
97
|
+
max: typeof localPriceMax.value === "number" && !isNaN(localPriceMax.value)
|
|
98
|
+
? localPriceMax.value
|
|
99
|
+
: undefined,
|
|
100
|
+
});
|
|
101
|
+
}, 400);
|
|
102
|
+
|
|
103
|
+
function onPriceChange() {
|
|
104
|
+
void emitPrice();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const priceActive = computed(() =>
|
|
108
|
+
props.priceRange.min !== undefined || props.priceRange.max !== undefined,
|
|
109
|
+
);
|
|
110
|
+
</script>
|
|
111
|
+
|
|
112
|
+
<template>
|
|
113
|
+
<aside :aria-label="t('search.filters.title')">
|
|
114
|
+
<div class="flex items-center justify-between pb-3">
|
|
115
|
+
<h2 class="text-sm font-semibold text-highlighted">
|
|
116
|
+
{{ t('search.filters.title') }}
|
|
117
|
+
</h2>
|
|
118
|
+
<button
|
|
119
|
+
v-if="hasActiveFilters"
|
|
120
|
+
type="button"
|
|
121
|
+
tabindex="0"
|
|
122
|
+
class="text-xs text-muted hover:text-highlighted underline underline-offset-4
|
|
123
|
+
decoration-2 transition-colors cursor-pointer"
|
|
124
|
+
@click="clearAll"
|
|
125
|
+
>
|
|
126
|
+
{{ t('search.filters.clearAll') }}
|
|
127
|
+
</button>
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<div class="divide-y divide-(--ui-border) border-y border-(--ui-border)">
|
|
131
|
+
<!-- Facet groups -->
|
|
132
|
+
<section
|
|
133
|
+
v-for="facet in visibleFacets"
|
|
134
|
+
:key="facet.fieldName"
|
|
135
|
+
class="py-1"
|
|
136
|
+
>
|
|
137
|
+
<button
|
|
138
|
+
type="button"
|
|
139
|
+
tabindex="0"
|
|
140
|
+
class="flex w-full items-center justify-between py-2.5 text-sm
|
|
141
|
+
text-highlighted cursor-pointer group"
|
|
142
|
+
:aria-expanded="isOpen(facet.fieldName)"
|
|
143
|
+
@click="toggleGroup(facet.fieldName)"
|
|
144
|
+
>
|
|
145
|
+
<span class="font-medium flex items-center gap-2">
|
|
146
|
+
{{ facetLabel(facet.fieldName) }}
|
|
147
|
+
<UBadge
|
|
148
|
+
v-if="activeCount(facet.fieldName)"
|
|
149
|
+
color="primary"
|
|
150
|
+
variant="subtle"
|
|
151
|
+
size="sm"
|
|
152
|
+
:label="String(activeCount(facet.fieldName))"
|
|
153
|
+
/>
|
|
154
|
+
</span>
|
|
155
|
+
<UIcon
|
|
156
|
+
:name="icon(isOpen(facet.fieldName) ? 'minus' : 'plus')"
|
|
157
|
+
class="size-4 text-dimmed group-hover:text-muted transition-colors"
|
|
158
|
+
/>
|
|
159
|
+
</button>
|
|
160
|
+
<ul
|
|
161
|
+
v-show="isOpen(facet.fieldName)"
|
|
162
|
+
class="pb-3 space-y-2"
|
|
163
|
+
>
|
|
164
|
+
<li
|
|
165
|
+
v-for="item in facet.counts"
|
|
166
|
+
:key="item.value"
|
|
167
|
+
>
|
|
168
|
+
<label class="flex items-center gap-2.5 cursor-pointer group/row">
|
|
169
|
+
<UCheckbox
|
|
170
|
+
:model-value="isChecked(facet.fieldName, item.value)"
|
|
171
|
+
tabindex="0"
|
|
172
|
+
:aria-label="facetValueLabel(facet.fieldName, item.value)"
|
|
173
|
+
@update:model-value="toggle(facet.fieldName, item.value)"
|
|
174
|
+
/>
|
|
175
|
+
<span
|
|
176
|
+
class="text-sm flex-1 text-muted group-hover/row:text-highlighted
|
|
177
|
+
transition-colors"
|
|
178
|
+
>
|
|
179
|
+
{{ facetValueLabel(facet.fieldName, item.value) }}
|
|
180
|
+
</span>
|
|
181
|
+
<span class="text-xs text-dimmed tabular-nums">{{ item.count }}</span>
|
|
182
|
+
</label>
|
|
183
|
+
</li>
|
|
184
|
+
</ul>
|
|
185
|
+
</section>
|
|
186
|
+
|
|
187
|
+
<!-- Price range -->
|
|
188
|
+
<section class="py-1">
|
|
189
|
+
<button
|
|
190
|
+
type="button"
|
|
191
|
+
tabindex="0"
|
|
192
|
+
class="flex w-full items-center justify-between py-2.5 text-sm
|
|
193
|
+
text-highlighted cursor-pointer group"
|
|
194
|
+
:aria-expanded="isOpen('__price')"
|
|
195
|
+
@click="toggleGroup('__price')"
|
|
196
|
+
>
|
|
197
|
+
<span class="font-medium flex items-center gap-2">
|
|
198
|
+
{{ t('search.filters.price.label') }}
|
|
199
|
+
<UBadge
|
|
200
|
+
v-if="priceActive"
|
|
201
|
+
color="primary"
|
|
202
|
+
variant="subtle"
|
|
203
|
+
size="sm"
|
|
204
|
+
label="1"
|
|
205
|
+
/>
|
|
206
|
+
</span>
|
|
207
|
+
<UIcon
|
|
208
|
+
:name="icon(isOpen('__price') ? 'minus' : 'plus')"
|
|
209
|
+
class="size-4 text-dimmed group-hover:text-muted transition-colors"
|
|
210
|
+
/>
|
|
211
|
+
</button>
|
|
212
|
+
<div
|
|
213
|
+
v-show="isOpen('__price')"
|
|
214
|
+
class="pb-3 flex items-center gap-2"
|
|
215
|
+
>
|
|
216
|
+
<UInput
|
|
217
|
+
v-model.number="localPriceMin"
|
|
218
|
+
type="number"
|
|
219
|
+
:placeholder="t('search.filters.price.min')"
|
|
220
|
+
size="sm"
|
|
221
|
+
min="0"
|
|
222
|
+
class="w-full"
|
|
223
|
+
:aria-label="t('search.filters.price.min')"
|
|
224
|
+
@input="onPriceChange"
|
|
225
|
+
>
|
|
226
|
+
<template #trailing>
|
|
227
|
+
<span class="text-xs text-dimmed">€</span>
|
|
228
|
+
</template>
|
|
229
|
+
</UInput>
|
|
230
|
+
<span class="text-dimmed shrink-0">–</span>
|
|
231
|
+
<UInput
|
|
232
|
+
v-model.number="localPriceMax"
|
|
233
|
+
type="number"
|
|
234
|
+
:placeholder="t('search.filters.price.max')"
|
|
235
|
+
size="sm"
|
|
236
|
+
min="0"
|
|
237
|
+
class="w-full"
|
|
238
|
+
:aria-label="t('search.filters.price.max')"
|
|
239
|
+
@input="onPriceChange"
|
|
240
|
+
>
|
|
241
|
+
<template #trailing>
|
|
242
|
+
<span class="text-xs text-dimmed">€</span>
|
|
243
|
+
</template>
|
|
244
|
+
</UInput>
|
|
245
|
+
</div>
|
|
246
|
+
</section>
|
|
247
|
+
</div>
|
|
248
|
+
|
|
249
|
+
<p
|
|
250
|
+
v-if="visibleFacets.length === 0"
|
|
251
|
+
class="text-xs text-muted pt-3"
|
|
252
|
+
>
|
|
253
|
+
{{ t('search.filters.noFilters') }}
|
|
254
|
+
</p>
|
|
255
|
+
</aside>
|
|
256
|
+
</template>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PriceRange, SearchFacet } from "../../../interfaces/search-facets";
|
|
3
|
+
|
|
4
|
+
const { icon } = useIcons();
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
facets: SearchFacet[];
|
|
8
|
+
modelValue: Record<string, string[]>;
|
|
9
|
+
priceRange: PriceRange;
|
|
10
|
+
}>();
|
|
11
|
+
|
|
12
|
+
const emit = defineEmits<{
|
|
13
|
+
"update:modelValue": [value: Record<string, string[]>];
|
|
14
|
+
"update:priceRange": [value: PriceRange];
|
|
15
|
+
}>();
|
|
16
|
+
|
|
17
|
+
const { t } = useI18n();
|
|
18
|
+
const isOpen = ref(false);
|
|
19
|
+
|
|
20
|
+
const filtersProxy = computed({
|
|
21
|
+
get: () => props.modelValue,
|
|
22
|
+
set: (val: Record<string, string[]>) => emit("update:modelValue", val),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const priceRangeProxy = computed({
|
|
26
|
+
get: () => props.priceRange,
|
|
27
|
+
set: (val: PriceRange) => emit("update:priceRange", val),
|
|
28
|
+
});
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<div class="lg:hidden mb-4">
|
|
33
|
+
<UButton
|
|
34
|
+
variant="outline"
|
|
35
|
+
:icon="icon('filters')"
|
|
36
|
+
size="sm"
|
|
37
|
+
@click="isOpen = true"
|
|
38
|
+
>
|
|
39
|
+
{{ t('search.filters.openDrawer') }}
|
|
40
|
+
</UButton>
|
|
41
|
+
|
|
42
|
+
<UDrawer
|
|
43
|
+
v-model:open="isOpen"
|
|
44
|
+
direction="left"
|
|
45
|
+
:ui="{ content: 'w-72 h-full' }"
|
|
46
|
+
>
|
|
47
|
+
<template #content>
|
|
48
|
+
<div class="p-4 h-full overflow-y-auto">
|
|
49
|
+
<SearchFilterSearchFacets
|
|
50
|
+
v-model="filtersProxy"
|
|
51
|
+
v-model:price-range="priceRangeProxy"
|
|
52
|
+
:facets="facets"
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|
|
56
|
+
</UDrawer>
|
|
57
|
+
</div>
|
|
58
|
+
</template>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
interface FlatEntry {
|
|
3
|
+
key: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function formatValue(value: unknown): string {
|
|
8
|
+
if (typeof value === "string") {
|
|
9
|
+
return value;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (
|
|
13
|
+
typeof value === "number"
|
|
14
|
+
|| typeof value === "boolean"
|
|
15
|
+
|| value === null
|
|
16
|
+
|| value === undefined
|
|
17
|
+
) {
|
|
18
|
+
return String(value);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
try {
|
|
22
|
+
return JSON.stringify(value);
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return "[unserializable]";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function flattenState(value: unknown, prefix = ""): FlatEntry[] {
|
|
30
|
+
if (Array.isArray(value)) {
|
|
31
|
+
if (value.length === 0) {
|
|
32
|
+
return [{ key: prefix, value: "[]" }];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return value.flatMap((item, index) => {
|
|
36
|
+
const nextPrefix = `${prefix}[${index}]`;
|
|
37
|
+
return flattenState(item, nextPrefix);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (value && typeof value === "object") {
|
|
42
|
+
const entries = Object.entries(value as Record<string, unknown>);
|
|
43
|
+
if (entries.length === 0) {
|
|
44
|
+
return [{ key: prefix, value: "{}" }];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return entries.flatMap(([key, nestedValue]) => {
|
|
48
|
+
const nextPrefix = prefix ? `${prefix}.${key}` : key;
|
|
49
|
+
return flattenState(nestedValue, nextPrefix);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return [{ key: prefix || "root", value: formatValue(value) }];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const title = "Pinia Debug State";
|
|
57
|
+
const keyLabel = "Key";
|
|
58
|
+
const valueLabel = "Value";
|
|
59
|
+
const pinia = usePinia();
|
|
60
|
+
|
|
61
|
+
const flatEntries = computed<FlatEntry[]>(() => {
|
|
62
|
+
const state = pinia.state.value as Record<string, unknown>;
|
|
63
|
+
return flattenState(state);
|
|
64
|
+
});
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<template>
|
|
68
|
+
<UContainer class="py-3">
|
|
69
|
+
<UCard>
|
|
70
|
+
<template #header>
|
|
71
|
+
<div class="text-sm font-semibold text-highlighted">
|
|
72
|
+
{{ title }}
|
|
73
|
+
</div>
|
|
74
|
+
</template>
|
|
75
|
+
|
|
76
|
+
<div class="max-h-80 overflow-auto">
|
|
77
|
+
<table class="w-full text-xs">
|
|
78
|
+
<thead>
|
|
79
|
+
<tr class="text-left text-muted border-b border-(--ui-border)">
|
|
80
|
+
<th class="w-[250px] py-2 pr-4 font-medium">
|
|
81
|
+
{{ keyLabel }}
|
|
82
|
+
</th>
|
|
83
|
+
<th class="py-2 font-medium">
|
|
84
|
+
{{ valueLabel }}
|
|
85
|
+
</th>
|
|
86
|
+
</tr>
|
|
87
|
+
</thead>
|
|
88
|
+
<tbody>
|
|
89
|
+
<tr
|
|
90
|
+
v-for="entry in flatEntries"
|
|
91
|
+
:key="entry.key"
|
|
92
|
+
class="align-top border-b border-(--ui-border)/60"
|
|
93
|
+
>
|
|
94
|
+
<td class="w-[250px] py-1.5 pr-4 font-mono text-xs text-highlighted break-all">
|
|
95
|
+
{{ entry.key }}
|
|
96
|
+
</td>
|
|
97
|
+
<td class="py-1.5 font-mono text-xs text-muted break-all">
|
|
98
|
+
{{ entry.value }}
|
|
99
|
+
</td>
|
|
100
|
+
</tr>
|
|
101
|
+
</tbody>
|
|
102
|
+
</table>
|
|
103
|
+
</div>
|
|
104
|
+
</UCard>
|
|
105
|
+
</UContainer>
|
|
106
|
+
</template>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps<{
|
|
3
|
+
/** Cover icon token, Solar basename, or full Iconify name. */
|
|
4
|
+
icon: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const { icon: resolveIcon } = useIcons();
|
|
10
|
+
const resolvedIcon = computed(() => resolveIcon(props.icon));
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div class="mt-12 text-center text-muted">
|
|
15
|
+
<UIcon
|
|
16
|
+
:name="resolvedIcon"
|
|
17
|
+
class="size-12 mx-auto mb-3 text-primary"
|
|
18
|
+
/>
|
|
19
|
+
<p class="text-lg font-medium text-highlighted">
|
|
20
|
+
{{ title }}
|
|
21
|
+
</p>
|
|
22
|
+
<p
|
|
23
|
+
v-if="description"
|
|
24
|
+
class="text-sm text-muted mt-1"
|
|
25
|
+
>
|
|
26
|
+
{{ description }}
|
|
27
|
+
</p>
|
|
28
|
+
<slot />
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const { icon } = useIcons();
|
|
3
|
+
|
|
4
|
+
const { t } = useI18n();
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
showRetry?: boolean;
|
|
10
|
+
}>();
|
|
11
|
+
|
|
12
|
+
const resolvedTitle = computed(() => props.title ?? t("error.title"));
|
|
13
|
+
const resolvedDescription = computed(() => props.description ?? t("error.description"));
|
|
14
|
+
const resolvedShowRetry = computed(() => props.showRetry ?? true);
|
|
15
|
+
|
|
16
|
+
const emit = defineEmits<{
|
|
17
|
+
retry: [];
|
|
18
|
+
}>();
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<UAlert
|
|
23
|
+
class="mt-3"
|
|
24
|
+
color="error"
|
|
25
|
+
variant="soft"
|
|
26
|
+
:icon="icon('error')"
|
|
27
|
+
:title="resolvedTitle"
|
|
28
|
+
:description="resolvedDescription"
|
|
29
|
+
>
|
|
30
|
+
<template
|
|
31
|
+
v-if="resolvedShowRetry"
|
|
32
|
+
#actions
|
|
33
|
+
>
|
|
34
|
+
<UButton
|
|
35
|
+
color="error"
|
|
36
|
+
variant="outline"
|
|
37
|
+
class="cursor-pointer"
|
|
38
|
+
tabindex="0"
|
|
39
|
+
:label="t('actions.tryAgain')"
|
|
40
|
+
@click="emit('retry')"
|
|
41
|
+
/>
|
|
42
|
+
</template>
|
|
43
|
+
</UAlert>
|
|
44
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const { icon } = useIcons();
|
|
3
|
+
|
|
4
|
+
const { t } = useI18n();
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
}>();
|
|
10
|
+
|
|
11
|
+
const resolvedTitle = computed(() => props.title ?? t("notFound.title"));
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div class="mt-12 text-center">
|
|
16
|
+
<p class="text-6xl font-bold text-(--ui-primary) mb-4">
|
|
17
|
+
404
|
|
18
|
+
</p>
|
|
19
|
+
<UIcon
|
|
20
|
+
:name="icon('no-results')"
|
|
21
|
+
class="size-12 mx-auto mb-3 text-primary"
|
|
22
|
+
/>
|
|
23
|
+
<p class="text-lg font-medium text-highlighted">
|
|
24
|
+
{{ resolvedTitle }}
|
|
25
|
+
</p>
|
|
26
|
+
<p
|
|
27
|
+
v-if="description"
|
|
28
|
+
class="text-sm text-muted mt-1"
|
|
29
|
+
>
|
|
30
|
+
{{ description }}
|
|
31
|
+
</p>
|
|
32
|
+
<slot />
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { COUNTRIES } from "../../../config/countries";
|
|
3
|
+
|
|
4
|
+
const modelValue = defineModel<string>({ required: true });
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<USelect
|
|
9
|
+
v-model="modelValue"
|
|
10
|
+
:items="COUNTRIES"
|
|
11
|
+
value-key="value"
|
|
12
|
+
v-bind="$attrs"
|
|
13
|
+
/>
|
|
14
|
+
</template>
|