basklee-nuxt 0.0.0-stage → 0.8.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.
Files changed (538) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1190 -2
  3. package/bin/basklee-nuxt.mjs +173 -0
  4. package/package.json +69 -4
  5. package/runtime/api.mjs +14 -0
  6. package/runtime/domain.mjs +15 -0
  7. package/runtime/marketplace.mjs +905 -0
  8. package/runtime/seo.mjs +17 -0
  9. package/src/asset-loading-plugin.mjs +10 -0
  10. package/src/favicon-handler.mjs +12 -0
  11. package/src/install.mjs +361 -0
  12. package/src/migrate.mjs +124 -0
  13. package/src/module.d.ts +3 -0
  14. package/src/module.mjs +88 -0
  15. package/src/project-readme.mjs +702 -0
  16. package/src/service.mjs +186 -0
  17. package/src/setup.mjs +250 -0
  18. package/src/sitemap.mjs +93 -0
  19. package/src/update.mjs +54 -0
  20. package/src/validation.mjs +33 -0
  21. package/templates/.vscode/settings.json +5 -0
  22. package/templates/app/app.vue +52 -0
  23. package/templates/app/assets/css/basklee-tokens.css +21 -0
  24. package/templates/app/assets/css/basklee.css +28 -0
  25. package/templates/app/components/basklee/account/AccountActivity.README.md +31 -0
  26. package/templates/app/components/basklee/account/AccountActivity.vue +61 -0
  27. package/templates/app/components/basklee/account/AccountPromocodes.README.md +50 -0
  28. package/templates/app/components/basklee/account/AccountPromocodes.vue +267 -0
  29. package/templates/app/components/basklee/account/AccountSection.README.md +31 -0
  30. package/templates/app/components/basklee/account/AccountSection.vue +132 -0
  31. package/templates/app/components/basklee/account/ProfileAvatar.vue +139 -0
  32. package/templates/app/components/basklee/account/ProfileDeleteAccount.vue +161 -0
  33. package/templates/app/components/basklee/account/ProfileDetailsForm.vue +182 -0
  34. package/templates/app/components/basklee/account/ProfileEmailSettings.vue +269 -0
  35. package/templates/app/components/basklee/account/ProfilePasswordForm.vue +201 -0
  36. package/templates/app/components/basklee/account/ProfileSignIn.vue +446 -0
  37. package/templates/app/components/basklee/account/SignInHistory.README.md +27 -0
  38. package/templates/app/components/basklee/account/SignInHistory.vue +218 -0
  39. package/templates/app/components/basklee/account/StorefrontLogout.README.md +15 -0
  40. package/templates/app/components/basklee/account/StorefrontLogout.vue +109 -0
  41. package/templates/app/components/basklee/account/StorefrontProfile.README.md +145 -0
  42. package/templates/app/components/basklee/account/StorefrontProfile.vue +168 -0
  43. package/templates/app/components/basklee/account/account.css +1047 -0
  44. package/templates/app/components/basklee/account/profile.css +696 -0
  45. package/templates/app/components/basklee/address/AddressForm.README.md +67 -0
  46. package/templates/app/components/basklee/address/AddressForm.vue +537 -0
  47. package/templates/app/components/basklee/address/StorefrontAddresses.README.md +44 -0
  48. package/templates/app/components/basklee/address/StorefrontAddresses.vue +438 -0
  49. package/templates/app/components/basklee/banners/MainBanner.vue +171 -0
  50. package/templates/app/components/basklee/banners/examples/BannerExample.vue +6 -0
  51. package/templates/app/components/basklee/blog/BlogArticle.README.md +44 -0
  52. package/templates/app/components/basklee/blog/BlogArticle.vue +1023 -0
  53. package/templates/app/components/basklee/blog/BlogCommentForm.README.md +28 -0
  54. package/templates/app/components/basklee/blog/BlogCommentForm.vue +129 -0
  55. package/templates/app/components/basklee/blog/BlogComments.README.md +36 -0
  56. package/templates/app/components/basklee/blog/BlogComments.vue +373 -0
  57. package/templates/app/components/basklee/blog/BlogPostCard.vue +307 -0
  58. package/templates/app/components/basklee/blog/BlogPostGroup.vue +108 -0
  59. package/templates/app/components/basklee/blog/StorefrontJournal.README.md +42 -0
  60. package/templates/app/components/basklee/blog/StorefrontJournal.vue +670 -0
  61. package/templates/app/components/basklee/branding/BrandLogos.vue +25 -0
  62. package/templates/app/components/basklee/branding/examples/BrandLogosExample.vue +6 -0
  63. package/templates/app/components/basklee/cart/CartCheckoutDetails.README.md +85 -0
  64. package/templates/app/components/basklee/cart/CartCheckoutDetails.vue +377 -0
  65. package/templates/app/components/basklee/cart/CartDeliverySelector.README.md +95 -0
  66. package/templates/app/components/basklee/cart/CartDeliverySelector.vue +724 -0
  67. package/templates/app/components/basklee/cart/CartItemOptions.README.md +98 -0
  68. package/templates/app/components/basklee/cart/CartItemOptions.vue +693 -0
  69. package/templates/app/components/basklee/cart/CartLineItem.README.md +70 -0
  70. package/templates/app/components/basklee/cart/CartLineItem.vue +271 -0
  71. package/templates/app/components/basklee/cart/CartPreview.README.md +43 -0
  72. package/templates/app/components/basklee/cart/CartPreview.vue +263 -0
  73. package/templates/app/components/basklee/cart/DeliveryMap.README.md +48 -0
  74. package/templates/app/components/basklee/cart/DeliveryMap.vue +155 -0
  75. package/templates/app/components/basklee/cart/StorefrontCart.README.md +89 -0
  76. package/templates/app/components/basklee/cart/StorefrontCart.vue +689 -0
  77. package/templates/app/components/basklee/catalog/CatalogHeader.vue +681 -0
  78. package/templates/app/components/basklee/catalog/CatalogRepresentative.vue +59 -0
  79. package/templates/app/components/basklee/catalog/StorefrontCatalog.README.md +35 -0
  80. package/templates/app/components/basklee/catalog/StorefrontCatalog.vue +179 -0
  81. package/templates/app/components/basklee/catalog/examples/CatalogHeaderExample.vue +6 -0
  82. package/templates/app/components/basklee/categories/CategoryGroup.vue +125 -0
  83. package/templates/app/components/basklee/categories/StorefrontCategory.README.md +60 -0
  84. package/templates/app/components/basklee/categories/StorefrontCategory.vue +277 -0
  85. package/templates/app/components/basklee/categories/examples/CategoryGroupExample.vue +7 -0
  86. package/templates/app/components/basklee/contact/AboutPage.README.md +23 -0
  87. package/templates/app/components/basklee/contact/AboutPage.vue +409 -0
  88. package/templates/app/components/basklee/contact/ContactForm.README.md +29 -0
  89. package/templates/app/components/basklee/contact/ContactForm.vue +289 -0
  90. package/templates/app/components/basklee/contact/EmailUnsubscribe.README.md +27 -0
  91. package/templates/app/components/basklee/contact/EmailUnsubscribe.vue +95 -0
  92. package/templates/app/components/basklee/contact/StorefrontContact.README.md +18 -0
  93. package/templates/app/components/basklee/contact/StorefrontContact.vue +89 -0
  94. package/templates/app/components/basklee/contact/examples/ContactExample.vue +6 -0
  95. package/templates/app/components/basklee/currencies/MainCurrencySwitcher.vue +80 -0
  96. package/templates/app/components/basklee/currencies/examples/CurrencyExample.vue +6 -0
  97. package/templates/app/components/basklee/events/EventEnrollmentDialog.README.md +58 -0
  98. package/templates/app/components/basklee/events/EventEnrollmentDialog.vue +294 -0
  99. package/templates/app/components/basklee/events/EventsBlock.vue +138 -0
  100. package/templates/app/components/basklee/events/examples/EventsExample.vue +6 -0
  101. package/templates/app/components/basklee/legal/CookieNotice.README.md +34 -0
  102. package/templates/app/components/basklee/legal/CookieNotice.vue +84 -0
  103. package/templates/app/components/basklee/legal/StorefrontPrivacy.README.md +35 -0
  104. package/templates/app/components/basklee/legal/StorefrontPrivacy.vue +124 -0
  105. package/templates/app/components/basklee/locale/MainLanguageSwitcher.vue +506 -0
  106. package/templates/app/components/basklee/locale/examples/LocaleExample.vue +6 -0
  107. package/templates/app/components/basklee/manufacturers/ManufacturerIndex.README.md +36 -0
  108. package/templates/app/components/basklee/manufacturers/ManufacturerIndex.vue +495 -0
  109. package/templates/app/components/basklee/manufacturers/StorefrontManufacturers.README.md +30 -0
  110. package/templates/app/components/basklee/manufacturers/StorefrontManufacturers.vue +263 -0
  111. package/templates/app/components/basklee/orders/OrderDetails.README.md +39 -0
  112. package/templates/app/components/basklee/orders/OrderDetails.vue +1074 -0
  113. package/templates/app/components/basklee/orders/OrderPaymentForm.README.md +59 -0
  114. package/templates/app/components/basklee/orders/OrderPaymentForm.vue +73 -0
  115. package/templates/app/components/basklee/orders/StorefrontOrders.README.md +39 -0
  116. package/templates/app/components/basklee/orders/StorefrontOrders.vue +869 -0
  117. package/templates/app/components/basklee/orders/orders.css +612 -0
  118. package/templates/app/components/basklee/payments/PaymentPanel.README.md +76 -0
  119. package/templates/app/components/basklee/payments/PaymentPanel.vue +108 -0
  120. package/templates/app/components/basklee/products/HoverImageViewer.vue +190 -0
  121. package/templates/app/components/basklee/products/ProductCard.README.md +63 -0
  122. package/templates/app/components/basklee/products/ProductCard.vue +911 -0
  123. package/templates/app/components/basklee/products/ProductCardActions.README.md +33 -0
  124. package/templates/app/components/basklee/products/ProductCardActions.vue +412 -0
  125. package/templates/app/components/basklee/products/ProductCardBadges.vue +83 -0
  126. package/templates/app/components/basklee/products/ProductCardDescription.vue +46 -0
  127. package/templates/app/components/basklee/products/ProductCardFavorite.vue +99 -0
  128. package/templates/app/components/basklee/products/ProductCardPrice.vue +66 -0
  129. package/templates/app/components/basklee/products/ProductCardRating.vue +65 -0
  130. package/templates/app/components/basklee/products/ProductCardSeller.vue +66 -0
  131. package/templates/app/components/basklee/products/ProductCardStockNotice.vue +43 -0
  132. package/templates/app/components/basklee/products/ProductCardTitle.vue +46 -0
  133. package/templates/app/components/basklee/products/ProductCardVariants.vue +388 -0
  134. package/templates/app/components/basklee/products/ProductGroup.vue +259 -0
  135. package/templates/app/components/basklee/products/ProductPreorderDialog.README.md +22 -0
  136. package/templates/app/components/basklee/products/ProductPreorderDialog.vue +471 -0
  137. package/templates/app/components/basklee/products/ProductReviewForm.README.md +39 -0
  138. package/templates/app/components/basklee/products/ProductReviewForm.vue +312 -0
  139. package/templates/app/components/basklee/products/ProductReviewGallery.README.md +28 -0
  140. package/templates/app/components/basklee/products/ProductReviewGallery.vue +141 -0
  141. package/templates/app/components/basklee/products/ProductReviewImageViewer.README.md +52 -0
  142. package/templates/app/components/basklee/products/ProductReviewImageViewer.vue +425 -0
  143. package/templates/app/components/basklee/products/ProductReviews.README.md +70 -0
  144. package/templates/app/components/basklee/products/ProductReviews.vue +1025 -0
  145. package/templates/app/components/basklee/products/ProductSecondaryVariantModal.vue +460 -0
  146. package/templates/app/components/basklee/products/ProductSpecificationsDialog.README.md +65 -0
  147. package/templates/app/components/basklee/products/ProductSpecificationsDialog.vue +174 -0
  148. package/templates/app/components/basklee/products/StorefrontProduct.README.md +52 -0
  149. package/templates/app/components/basklee/products/StorefrontProduct.vue +1468 -0
  150. package/templates/app/components/basklee/products/StorefrontWishlist.README.md +33 -0
  151. package/templates/app/components/basklee/products/StorefrontWishlist.vue +290 -0
  152. package/templates/app/components/basklee/products/examples/FeaturedExample.vue +6 -0
  153. package/templates/app/components/basklee/products/examples/FeaturedHoverImageViewerExample.vue +14 -0
  154. package/templates/app/components/basklee/products/examples/FeaturedProductCardActionsExample.vue +14 -0
  155. package/templates/app/components/basklee/products/examples/FeaturedProductCardBadgesExample.vue +14 -0
  156. package/templates/app/components/basklee/products/examples/FeaturedProductCardDescriptionExample.vue +14 -0
  157. package/templates/app/components/basklee/products/examples/FeaturedProductCardExample.vue +14 -0
  158. package/templates/app/components/basklee/products/examples/FeaturedProductCardFavoriteExample.vue +14 -0
  159. package/templates/app/components/basklee/products/examples/FeaturedProductCardPriceExample.vue +14 -0
  160. package/templates/app/components/basklee/products/examples/FeaturedProductCardRatingExample.vue +14 -0
  161. package/templates/app/components/basklee/products/examples/FeaturedProductCardSellerExample.vue +14 -0
  162. package/templates/app/components/basklee/products/examples/FeaturedProductCardStockNoticeExample.vue +14 -0
  163. package/templates/app/components/basklee/products/examples/FeaturedProductCardTitleExample.vue +14 -0
  164. package/templates/app/components/basklee/products/examples/FeaturedProductCardVariantsExample.vue +14 -0
  165. package/templates/app/components/basklee/products/examples/ProductsExample.vue +6 -0
  166. package/templates/app/components/basklee/products/examples/ProductsHoverImageViewerExample.vue +13 -0
  167. package/templates/app/components/basklee/products/examples/ProductsProductCardActionsExample.vue +13 -0
  168. package/templates/app/components/basklee/products/examples/ProductsProductCardBadgesExample.vue +13 -0
  169. package/templates/app/components/basklee/products/examples/ProductsProductCardDescriptionExample.vue +13 -0
  170. package/templates/app/components/basklee/products/examples/ProductsProductCardExample.vue +13 -0
  171. package/templates/app/components/basklee/products/examples/ProductsProductCardFavoriteExample.vue +13 -0
  172. package/templates/app/components/basklee/products/examples/ProductsProductCardPriceExample.vue +13 -0
  173. package/templates/app/components/basklee/products/examples/ProductsProductCardRatingExample.vue +13 -0
  174. package/templates/app/components/basklee/products/examples/ProductsProductCardSellerExample.vue +13 -0
  175. package/templates/app/components/basklee/products/examples/ProductsProductCardStockNoticeExample.vue +13 -0
  176. package/templates/app/components/basklee/products/examples/ProductsProductCardTitleExample.vue +13 -0
  177. package/templates/app/components/basklee/products/examples/ProductsProductCardVariantsExample.vue +13 -0
  178. package/templates/app/components/basklee/promo/PromoProducts.README.md +45 -0
  179. package/templates/app/components/basklee/promo/PromoProducts.vue +287 -0
  180. package/templates/app/components/basklee/search/MainSearch.vue +340 -0
  181. package/templates/app/components/basklee/search/ProductSearchResults.README.md +81 -0
  182. package/templates/app/components/basklee/search/ProductSearchResults.vue +506 -0
  183. package/templates/app/components/basklee/search/SearchFilters.vue +546 -0
  184. package/templates/app/components/basklee/search/examples/MainSearchExample.vue +6 -0
  185. package/templates/app/components/basklee/sellers/SellerFilters.README.md +32 -0
  186. package/templates/app/components/basklee/sellers/SellerFilters.vue +317 -0
  187. package/templates/app/components/basklee/sellers/SellerPhotoGallery.README.md +45 -0
  188. package/templates/app/components/basklee/sellers/SellerPhotoGallery.vue +406 -0
  189. package/templates/app/components/basklee/sellers/SellerSummary.README.md +33 -0
  190. package/templates/app/components/basklee/sellers/SellerSummary.vue +162 -0
  191. package/templates/app/components/basklee/sellers/StorefrontSellers.README.md +73 -0
  192. package/templates/app/components/basklee/sellers/StorefrontSellers.vue +300 -0
  193. package/templates/app/components/basklee/shared/BaskleeAvatar.README.md +30 -0
  194. package/templates/app/components/basklee/shared/BaskleeAvatar.vue +83 -0
  195. package/templates/app/components/basklee/shared/BaskleeBreadcrumbs.README.md +65 -0
  196. package/templates/app/components/basklee/shared/BaskleeBreadcrumbs.vue +118 -0
  197. package/templates/app/components/basklee/shared/BaskleeEmptyState.README.md +38 -0
  198. package/templates/app/components/basklee/shared/BaskleeEmptyState.vue +143 -0
  199. package/templates/app/components/basklee/shared/BaskleeImage.vue +84 -0
  200. package/templates/app/components/basklee/shared/BaskleeInfoHint.README.md +32 -0
  201. package/templates/app/components/basklee/shared/BaskleeInfoHint.vue +158 -0
  202. package/templates/app/components/basklee/shared/BaskleePasswordInput.README.md +30 -0
  203. package/templates/app/components/basklee/shared/BaskleePasswordInput.vue +197 -0
  204. package/templates/app/components/basklee/shared/BaskleeSearchSelect.README.md +38 -0
  205. package/templates/app/components/basklee/shared/BaskleeSearchSelect.vue +411 -0
  206. package/templates/app/components/basklee/shared/BaskleeSelect.README.md +31 -0
  207. package/templates/app/components/basklee/shared/BaskleeSelect.vue +525 -0
  208. package/templates/app/components/basklee/shared/StorefrontErrorPage.README.md +55 -0
  209. package/templates/app/components/basklee/shared/StorefrontErrorPage.vue +151 -0
  210. package/templates/app/components/basklee/shared/StorefrontPagination.README.md +50 -0
  211. package/templates/app/components/basklee/shared/StorefrontPagination.vue +148 -0
  212. package/templates/app/components/basklee/shared/dialogs.css +36 -0
  213. package/templates/app/components/basklee/shared/features.css +364 -0
  214. package/templates/app/components/basklee/social/SocialLinks.vue +72 -0
  215. package/templates/app/components/basklee/social/examples/SocialLinksExample.vue +6 -0
  216. package/templates/app/components/basklee/storefront/StorefrontAccount.README.md +47 -0
  217. package/templates/app/components/basklee/storefront/StorefrontAccount.vue +332 -0
  218. package/templates/app/components/basklee/storefront/StorefrontCartButton.vue +68 -0
  219. package/templates/app/components/basklee/storefront/StorefrontFooter.README.md +26 -0
  220. package/templates/app/components/basklee/storefront/StorefrontFooter.vue +236 -0
  221. package/templates/app/components/basklee/storefront/StorefrontHeader.README.md +93 -0
  222. package/templates/app/components/basklee/storefront/StorefrontHeader.vue +509 -0
  223. package/templates/app/components/basklee/storefront/StorefrontHome.README.md +79 -0
  224. package/templates/app/components/basklee/storefront/StorefrontHome.vue +315 -0
  225. package/templates/app/components/basklee/storefront/StorefrontWishlistButton.vue +105 -0
  226. package/templates/app/components/basklee/storefront/examples/StorefrontAccountExample.vue +7 -0
  227. package/templates/app/components/basklee/stores/StorefrontStores.README.md +41 -0
  228. package/templates/app/components/basklee/stores/StorefrontStores.vue +346 -0
  229. package/templates/app/components/basklee/subscriptions/StorefrontSubscriptions.README.md +151 -0
  230. package/templates/app/components/basklee/subscriptions/StorefrontSubscriptions.vue +851 -0
  231. package/templates/app/components/basklee/subscriptions/StorefrontTariff.README.md +38 -0
  232. package/templates/app/components/basklee/subscriptions/StorefrontTariff.vue +555 -0
  233. package/templates/app/components/basklee/subscriptions/StorefrontTariffs.README.md +36 -0
  234. package/templates/app/components/basklee/subscriptions/StorefrontTariffs.vue +416 -0
  235. package/templates/app/components/basklee/subscriptions/SubscriptionCancelDialog.README.md +39 -0
  236. package/templates/app/components/basklee/subscriptions/SubscriptionCancelDialog.vue +292 -0
  237. package/templates/app/components/basklee/subscriptions/SubscriptionChangeDialog.README.md +85 -0
  238. package/templates/app/components/basklee/subscriptions/SubscriptionChangeDialog.vue +874 -0
  239. package/templates/app/components/basklee/subscriptions/SubscriptionExtendDialog.README.md +53 -0
  240. package/templates/app/components/basklee/subscriptions/SubscriptionExtendDialog.vue +536 -0
  241. package/templates/app/components/basklee/subscriptions/SubscriptionPlanSummary.README.md +101 -0
  242. package/templates/app/components/basklee/subscriptions/SubscriptionPlanSummary.vue +286 -0
  243. package/templates/app/components/basklee/subscriptions/SubscriptionRemoteDetails.README.md +138 -0
  244. package/templates/app/components/basklee/subscriptions/SubscriptionRemoteDetails.vue +134 -0
  245. package/templates/app/components/basklee/subscriptions/SubscriptionRenewalDialog.README.md +85 -0
  246. package/templates/app/components/basklee/subscriptions/SubscriptionRenewalDialog.vue +364 -0
  247. package/templates/app/components/basklee/support/StorefrontSupport.README.md +39 -0
  248. package/templates/app/components/basklee/support/StorefrontSupport.vue +484 -0
  249. package/templates/app/components/basklee/support/TicketConversation.README.md +38 -0
  250. package/templates/app/components/basklee/support/TicketConversation.vue +524 -0
  251. package/templates/app/components/basklee/support/TicketImage.README.md +27 -0
  252. package/templates/app/components/basklee/support/TicketImage.vue +186 -0
  253. package/templates/app/components/basklee/support/TicketItemCard.README.md +59 -0
  254. package/templates/app/components/basklee/support/TicketItemCard.vue +177 -0
  255. package/templates/app/components/basklee/support/TicketMessageForm.README.md +35 -0
  256. package/templates/app/components/basklee/support/TicketMessageForm.vue +258 -0
  257. package/templates/app/components/basklee/support/TicketSubscriptionCard.README.md +40 -0
  258. package/templates/app/components/basklee/support/TicketSubscriptionCard.vue +154 -0
  259. package/templates/app/components/basklee/tariffs/TariffCard.README.md +12 -0
  260. package/templates/app/components/basklee/tariffs/TariffCard.vue +251 -0
  261. package/templates/app/components/basklee/tariffs/TariffCardDescription.README.md +12 -0
  262. package/templates/app/components/basklee/tariffs/TariffCardDescription.vue +97 -0
  263. package/templates/app/components/basklee/tariffs/TariffCardFeatures.README.md +14 -0
  264. package/templates/app/components/basklee/tariffs/TariffCardFeatures.vue +172 -0
  265. package/templates/app/components/basklee/tariffs/TariffCardImage.README.md +12 -0
  266. package/templates/app/components/basklee/tariffs/TariffCardImage.vue +33 -0
  267. package/templates/app/components/basklee/tariffs/TariffCardPrices.README.md +12 -0
  268. package/templates/app/components/basklee/tariffs/TariffCardPrices.vue +300 -0
  269. package/templates/app/components/basklee/tariffs/TariffCardTitle.README.md +12 -0
  270. package/templates/app/components/basklee/tariffs/TariffCardTitle.vue +30 -0
  271. package/templates/app/components/basklee/tariffs/TariffCards.README.md +12 -0
  272. package/templates/app/components/basklee/tariffs/TariffCards.vue +94 -0
  273. package/templates/app/components/basklee/tariffs/TariffSubscriptionModal.README.md +31 -0
  274. package/templates/app/components/basklee/tariffs/TariffSubscriptionModal.vue +411 -0
  275. package/templates/app/components/basklee/tariffs/examples/TariffCardDescriptionExample.vue +13 -0
  276. package/templates/app/components/basklee/tariffs/examples/TariffCardExample.vue +13 -0
  277. package/templates/app/components/basklee/tariffs/examples/TariffCardFeaturesExample.vue +14 -0
  278. package/templates/app/components/basklee/tariffs/examples/TariffCardImageExample.vue +13 -0
  279. package/templates/app/components/basklee/tariffs/examples/TariffCardPricesExample.vue +13 -0
  280. package/templates/app/components/basklee/tariffs/examples/TariffCardTitleExample.vue +13 -0
  281. package/templates/app/components/basklee/tariffs/examples/TariffCardsExample.vue +6 -0
  282. package/templates/app/components/basklee/theme/BaskleeThemeProvider.vue +38 -0
  283. package/templates/app/components/basklee/units/UnitSwitcher.vue +71 -0
  284. package/templates/app/components/basklee/units/examples/LengthExample.vue +6 -0
  285. package/templates/app/components/basklee/units/examples/WeightExample.vue +6 -0
  286. package/templates/app/components/basklee/wallet/StorefrontWallet.README.md +117 -0
  287. package/templates/app/components/basklee/wallet/StorefrontWallet.vue +863 -0
  288. package/templates/app/components/basklee/wallet/WalletBalance.vue +47 -0
  289. package/templates/app/components/basklee/wallet/WalletTopUpForm.README.md +32 -0
  290. package/templates/app/components/basklee/wallet/WalletTopUpForm.vue +224 -0
  291. package/templates/app/components/basklee/wallet/examples/WalletExample.vue +6 -0
  292. package/templates/app/composables/useBaskleeActionMenu.ts +126 -0
  293. package/templates/app/composables/useBaskleeAddressEditor.ts +343 -0
  294. package/templates/app/composables/useBaskleeAddresses.ts +75 -0
  295. package/templates/app/composables/useBaskleeApi.ts +190 -0
  296. package/templates/app/composables/useBaskleeAppLoad.ts +83 -0
  297. package/templates/app/composables/useBaskleeBlogComments.ts +325 -0
  298. package/templates/app/composables/useBaskleeBlogReading.ts +270 -0
  299. package/templates/app/composables/useBaskleeCart.ts +226 -0
  300. package/templates/app/composables/useBaskleeCartPreview.ts +142 -0
  301. package/templates/app/composables/useBaskleeCategoryLink.ts +24 -0
  302. package/templates/app/composables/useBaskleeCategoryProducts.ts +16 -0
  303. package/templates/app/composables/useBaskleeFeature.ts +100 -0
  304. package/templates/app/composables/useBaskleeFeaturedProducts.ts +14 -0
  305. package/templates/app/composables/useBaskleeGeolocation.ts +28 -0
  306. package/templates/app/composables/useBaskleeHomeProducts.ts +90 -0
  307. package/templates/app/composables/useBaskleeManufacturerIndex.ts +83 -0
  308. package/templates/app/composables/useBaskleeMap.ts +240 -0
  309. package/templates/app/composables/useBaskleeMediaFormat.ts +24 -0
  310. package/templates/app/composables/useBaskleeMissingPage.ts +67 -0
  311. package/templates/app/composables/useBaskleeOrders.ts +185 -0
  312. package/templates/app/composables/useBaskleePageSeo.ts +133 -0
  313. package/templates/app/composables/useBaskleeProductActions.ts +116 -0
  314. package/templates/app/composables/useBaskleeProductLink.ts +24 -0
  315. package/templates/app/composables/useBaskleeProductSearch.ts +363 -0
  316. package/templates/app/composables/useBaskleeProductVariants.ts +176 -0
  317. package/templates/app/composables/useBaskleeProfile.ts +309 -0
  318. package/templates/app/composables/useBaskleeProgress.ts +89 -0
  319. package/templates/app/composables/useBaskleeReviews.ts +242 -0
  320. package/templates/app/composables/useBaskleeSearchHistory.ts +23 -0
  321. package/templates/app/composables/useBaskleeSearchScopeNames.ts +99 -0
  322. package/templates/app/composables/useBaskleeServerData.ts +72 -0
  323. package/templates/app/composables/useBaskleeSignIn.ts +66 -0
  324. package/templates/app/composables/useBaskleeStableHeight.ts +69 -0
  325. package/templates/app/composables/useBaskleeStorefront.ts +29 -0
  326. package/templates/app/composables/useBaskleeSubscriptions.ts +260 -0
  327. package/templates/app/composables/useBaskleeTheme.ts +27 -0
  328. package/templates/app/composables/useBaskleeTicketSubject.ts +180 -0
  329. package/templates/app/composables/useBaskleeTickets.ts +335 -0
  330. package/templates/app/composables/useBaskleeWallet.ts +166 -0
  331. package/templates/app/error.vue +108 -0
  332. package/templates/app/interfaces/basklee/accounts/IContact.ts +21 -0
  333. package/templates/app/interfaces/basklee/accounts/IEmailNotificationLocale.ts +17 -0
  334. package/templates/app/interfaces/basklee/accounts/IEmailVerification.ts +59 -0
  335. package/templates/app/interfaces/basklee/accounts/IProfileActions.ts +38 -0
  336. package/templates/app/interfaces/basklee/accounts/IProfileData.ts +125 -0
  337. package/templates/app/interfaces/basklee/accounts/IProfileMedia.ts +17 -0
  338. package/templates/app/interfaces/basklee/accounts/IStorefrontProfile.ts +54 -0
  339. package/templates/app/interfaces/basklee/address/IAddressCitySuggestion.ts +19 -0
  340. package/templates/app/interfaces/basklee/address/IAddressEditor.ts +9 -0
  341. package/templates/app/interfaces/basklee/address/IAddressLocationSuggestion.ts +22 -0
  342. package/templates/app/interfaces/basklee/address/IAddressRegionSearch.ts +30 -0
  343. package/templates/app/interfaces/basklee/address/IAddressSuggestion.ts +20 -0
  344. package/templates/app/interfaces/basklee/address/IUserAddress.ts +87 -0
  345. package/templates/app/interfaces/basklee/apiBase/TMethod.ts +1 -0
  346. package/templates/app/interfaces/basklee/appBase/IAppLoad.ts +16 -0
  347. package/templates/app/interfaces/basklee/appBase/IAppLoadCommon.ts +47 -0
  348. package/templates/app/interfaces/basklee/appBase/IApploadUserProfile.ts +15 -0
  349. package/templates/app/interfaces/basklee/appBase/IForm.ts +21 -0
  350. package/templates/app/interfaces/basklee/appBase/ISEO.ts +21 -0
  351. package/templates/app/interfaces/basklee/appBase/appLoadCommon/IAppLoadCommonBanner.ts +11 -0
  352. package/templates/app/interfaces/basklee/appBase/appLoadCommon/IAppLoadCommonContact.ts +8 -0
  353. package/templates/app/interfaces/basklee/appBase/appLoadCommon/IAppLoadCommonCurrency.ts +15 -0
  354. package/templates/app/interfaces/basklee/appBase/appLoadCommon/IAppLoadCommonEvents.ts +18 -0
  355. package/templates/app/interfaces/basklee/appBase/appLoadCommon/IAppLoadCommonLocale.ts +14 -0
  356. package/templates/app/interfaces/basklee/appBase/appLoadCommon/IAppLoadCommonLogos.ts +6 -0
  357. package/templates/app/interfaces/basklee/appBase/appLoadCommon/IAppLoadCommonPath.ts +22 -0
  358. package/templates/app/interfaces/basklee/appBase/appLoadCommon/IAppLoadCommonSEO.ts +26 -0
  359. package/templates/app/interfaces/basklee/appBase/appLoadCommon/IAppLoadCommonSocial.ts +15 -0
  360. package/templates/app/interfaces/basklee/appBase/appLoadCommon/IAppLoadCommonTariff.ts +7 -0
  361. package/templates/app/interfaces/basklee/appBase/appLoadCommon/IAppLoadCommonUnit.ts +12 -0
  362. package/templates/app/interfaces/basklee/appBase/appLoadCommon/IAppLoadCommonVariables.ts +8 -0
  363. package/templates/app/interfaces/basklee/appBase/appLoadCommon/IAppLoadCommonVisualSettings.ts +11 -0
  364. package/templates/app/interfaces/basklee/appBase/appLoadCommon/IAppLoadCommonWalletValue.ts +3 -0
  365. package/templates/app/interfaces/basklee/blog/IBlogApi.ts +247 -0
  366. package/templates/app/interfaces/basklee/blog/IBlogPostPreview.ts +30 -0
  367. package/templates/app/interfaces/basklee/cart/ICartActions.ts +67 -0
  368. package/templates/app/interfaces/basklee/cart/ICartData.ts +382 -0
  369. package/templates/app/interfaces/basklee/cart/ICartDeliveryActions.ts +68 -0
  370. package/templates/app/interfaces/basklee/cart/ICartModal.ts +22 -0
  371. package/templates/app/interfaces/basklee/cart/IDeliveryMap.ts +29 -0
  372. package/templates/app/interfaces/basklee/catalog/ICatalogDirectory.ts +75 -0
  373. package/templates/app/interfaces/basklee/category/ICategory.ts +41 -0
  374. package/templates/app/interfaces/basklee/domains/IDomain.ts +13 -0
  375. package/templates/app/interfaces/basklee/forms/ICustomerSubfilter.ts +19 -0
  376. package/templates/app/interfaces/basklee/index.ts +57 -0
  377. package/templates/app/interfaces/basklee/marketing/IPromoActions.ts +51 -0
  378. package/templates/app/interfaces/basklee/orders/IOrderActions.ts +99 -0
  379. package/templates/app/interfaces/basklee/orders/IOrderHistory.ts +259 -0
  380. package/templates/app/interfaces/basklee/orders/IProductPreorder.ts +31 -0
  381. package/templates/app/interfaces/basklee/payments/IInvoice.ts +147 -0
  382. package/templates/app/interfaces/basklee/products/IProduct.ts +262 -0
  383. package/templates/app/interfaces/basklee/products/IProductFeedbackApi.ts +218 -0
  384. package/templates/app/interfaces/basklee/products/IProductSearchApi.ts +146 -0
  385. package/templates/app/interfaces/basklee/products/IProductSearchFacets.ts +35 -0
  386. package/templates/app/interfaces/basklee/products/IProductSecondaryVariantRequest.ts +15 -0
  387. package/templates/app/interfaces/basklee/products/IProductSpecification.ts +14 -0
  388. package/templates/app/interfaces/basklee/products/IWishlist.ts +22 -0
  389. package/templates/app/interfaces/basklee/sellers/ISellerDirectory.ts +70 -0
  390. package/templates/app/interfaces/basklee/shared/IBreadcrumb.ts +10 -0
  391. package/templates/app/interfaces/basklee/shared/IGeoCoordinates.ts +4 -0
  392. package/templates/app/interfaces/basklee/shared/IStorefrontControls.ts +13 -0
  393. package/templates/app/interfaces/basklee/shared/ITransformValue.ts +3 -0
  394. package/templates/app/interfaces/basklee/state.ts +4 -0
  395. package/templates/app/interfaces/basklee/stores/IStoreDirectory.ts +63 -0
  396. package/templates/app/interfaces/basklee/subscribeOptions/ISubscribeOption.ts +9 -0
  397. package/templates/app/interfaces/basklee/subscribeTariff/ISubscribeTariff.ts +56 -0
  398. package/templates/app/interfaces/basklee/subscribeTariff/ITariffSelection.ts +11 -0
  399. package/templates/app/interfaces/basklee/subscribes/ISubscribe.ts +28 -0
  400. package/templates/app/interfaces/basklee/subscribes/ISubscriptionApi.ts +127 -0
  401. package/templates/app/interfaces/basklee/tickets/ICustomerTicketApi.ts +223 -0
  402. package/templates/app/interfaces/basklee/transport.ts +34 -0
  403. package/templates/app/layouts/default.vue +382 -0
  404. package/templates/app/middleware/00.basklee.global.ts +27 -0
  405. package/templates/app/middleware/01.basklee-sellers.global.ts +15 -0
  406. package/templates/app/middleware/basklee-account.ts +40 -0
  407. package/templates/app/pages/activity.vue +19 -0
  408. package/templates/app/pages/addresses.vue +23 -0
  409. package/templates/app/pages/browse.vue +253 -0
  410. package/templates/app/pages/cart.vue +20 -0
  411. package/templates/app/pages/catalog.vue +17 -0
  412. package/templates/app/pages/category/[id].vue +150 -0
  413. package/templates/app/pages/contact.vue +17 -0
  414. package/templates/app/pages/featured.vue +152 -0
  415. package/templates/app/pages/index.vue +194 -0
  416. package/templates/app/pages/journal/[id].vue +164 -0
  417. package/templates/app/pages/journal/index.vue +74 -0
  418. package/templates/app/pages/logout.vue +71 -0
  419. package/templates/app/pages/manufacturers.vue +33 -0
  420. package/templates/app/pages/orders.vue +40 -0
  421. package/templates/app/pages/privacy.vue +17 -0
  422. package/templates/app/pages/product/[id].vue +150 -0
  423. package/templates/app/pages/profile.vue +118 -0
  424. package/templates/app/pages/promo/[id].vue +67 -0
  425. package/templates/app/pages/promocodes.vue +21 -0
  426. package/templates/app/pages/sellers.vue +203 -0
  427. package/templates/app/pages/stores.vue +36 -0
  428. package/templates/app/pages/subscriptions.vue +21 -0
  429. package/templates/app/pages/tariffs/[slug]/[id].vue +126 -0
  430. package/templates/app/pages/tariffs/index.vue +50 -0
  431. package/templates/app/pages/tickets.vue +56 -0
  432. package/templates/app/pages/unsubscribe.vue +32 -0
  433. package/templates/app/pages/wallet.vue +23 -0
  434. package/templates/app/pages/wishlist.vue +48 -0
  435. package/templates/app/stores/basklee.ts +493 -0
  436. package/templates/app/stores/baskleeBrowse.ts +79 -0
  437. package/templates/app/stores/baskleeCatalog.ts +141 -0
  438. package/templates/app/stores/baskleeDomainAccess.ts +55 -0
  439. package/templates/app/stores/baskleeProducts.ts +249 -0
  440. package/templates/app/stores/baskleeSelections.ts +132 -0
  441. package/templates/app/themes/basklee.ts +108 -0
  442. package/templates/app/utils/basklee/accountLabels.ts +29 -0
  443. package/templates/app/utils/basklee/activityLabels.ts +96 -0
  444. package/templates/app/utils/basklee/activityPresentation.ts +16 -0
  445. package/templates/app/utils/basklee/addressChanges.ts +26 -0
  446. package/templates/app/utils/basklee/addressRegions.ts +17 -0
  447. package/templates/app/utils/basklee/api.ts +333 -0
  448. package/templates/app/utils/basklee/blogArticleHtml.ts +318 -0
  449. package/templates/app/utils/basklee/blogComments.ts +133 -0
  450. package/templates/app/utils/basklee/blogImageViewer.ts +84 -0
  451. package/templates/app/utils/basklee/blogLabels.ts +167 -0
  452. package/templates/app/utils/basklee/blogLayout.ts +108 -0
  453. package/templates/app/utils/basklee/blogProductPlacements.ts +105 -0
  454. package/templates/app/utils/basklee/breadcrumbLabels.ts +14 -0
  455. package/templates/app/utils/basklee/browseLabels.ts +145 -0
  456. package/templates/app/utils/basklee/cartAddress.ts +94 -0
  457. package/templates/app/utils/basklee/cartLabels.ts +390 -0
  458. package/templates/app/utils/basklee/cartOptions.ts +143 -0
  459. package/templates/app/utils/basklee/cartPreview.ts +123 -0
  460. package/templates/app/utils/basklee/cartPromo.ts +150 -0
  461. package/templates/app/utils/basklee/cartShipment.ts +74 -0
  462. package/templates/app/utils/basklee/cartSnapshot.ts +20 -0
  463. package/templates/app/utils/basklee/catalog.ts +106 -0
  464. package/templates/app/utils/basklee/category.ts +52 -0
  465. package/templates/app/utils/basklee/categoryLabels.ts +44 -0
  466. package/templates/app/utils/basklee/contactLabels.ts +152 -0
  467. package/templates/app/utils/basklee/currency.ts +128 -0
  468. package/templates/app/utils/basklee/deliveryMap.ts +89 -0
  469. package/templates/app/utils/basklee/directoryLabels.ts +196 -0
  470. package/templates/app/utils/basklee/emptyStateArt.ts +231 -0
  471. package/templates/app/utils/basklee/errorPageLabels.ts +95 -0
  472. package/templates/app/utils/basklee/featureData.ts +25 -0
  473. package/templates/app/utils/basklee/featureLabels.ts +406 -0
  474. package/templates/app/utils/basklee/featuredLabels.ts +38 -0
  475. package/templates/app/utils/basklee/files.ts +71 -0
  476. package/templates/app/utils/basklee/footerLabels.ts +53 -0
  477. package/templates/app/utils/basklee/guestSession.ts +50 -0
  478. package/templates/app/utils/basklee/headerLabels.ts +98 -0
  479. package/templates/app/utils/basklee/homeContent.ts +129 -0
  480. package/templates/app/utils/basklee/homeLabels.ts +74 -0
  481. package/templates/app/utils/basklee/htmlText.ts +59 -0
  482. package/templates/app/utils/basklee/links.ts +14 -0
  483. package/templates/app/utils/basklee/manufacturerIndex.ts +108 -0
  484. package/templates/app/utils/basklee/modalWindow.ts +109 -0
  485. package/templates/app/utils/basklee/nativeApp.ts +361 -0
  486. package/templates/app/utils/basklee/notice.ts +22 -0
  487. package/templates/app/utils/basklee/orderLabels.ts +454 -0
  488. package/templates/app/utils/basklee/orderPresentation.ts +629 -0
  489. package/templates/app/utils/basklee/pageSeo.ts +662 -0
  490. package/templates/app/utils/basklee/paginationScroll.ts +131 -0
  491. package/templates/app/utils/basklee/phone.ts +22 -0
  492. package/templates/app/utils/basklee/presentation.ts +72 -0
  493. package/templates/app/utils/basklee/privacyLabels.ts +273 -0
  494. package/templates/app/utils/basklee/productActionLabels.ts +108 -0
  495. package/templates/app/utils/basklee/productActions.ts +574 -0
  496. package/templates/app/utils/basklee/productAvailability.ts +36 -0
  497. package/templates/app/utils/basklee/productGallery.ts +72 -0
  498. package/templates/app/utils/basklee/productLabels.ts +119 -0
  499. package/templates/app/utils/basklee/productListLocation.ts +130 -0
  500. package/templates/app/utils/basklee/productManufacturer.ts +30 -0
  501. package/templates/app/utils/basklee/productPage.ts +46 -0
  502. package/templates/app/utils/basklee/productPhotos.ts +67 -0
  503. package/templates/app/utils/basklee/productSearchScope.ts +237 -0
  504. package/templates/app/utils/basklee/productSeller.ts +51 -0
  505. package/templates/app/utils/basklee/productStructuredData.ts +221 -0
  506. package/templates/app/utils/basklee/profile.ts +148 -0
  507. package/templates/app/utils/basklee/profileLabels.ts +229 -0
  508. package/templates/app/utils/basklee/promoLabels.ts +111 -0
  509. package/templates/app/utils/basklee/promoPresentation.ts +381 -0
  510. package/templates/app/utils/basklee/reviewLabels.ts +256 -0
  511. package/templates/app/utils/basklee/reviewScope.ts +41 -0
  512. package/templates/app/utils/basklee/richText.ts +13 -0
  513. package/templates/app/utils/basklee/searchFilters.ts +99 -0
  514. package/templates/app/utils/basklee/searchHistory.ts +144 -0
  515. package/templates/app/utils/basklee/sellerDirectory.ts +134 -0
  516. package/templates/app/utils/basklee/seo.ts +52 -0
  517. package/templates/app/utils/basklee/serverCookies.ts +88 -0
  518. package/templates/app/utils/basklee/sessionLabels.ts +38 -0
  519. package/templates/app/utils/basklee/signInReturn.ts +89 -0
  520. package/templates/app/utils/basklee/storeDirectory.ts +50 -0
  521. package/templates/app/utils/basklee/subscriptionChanges.ts +167 -0
  522. package/templates/app/utils/basklee/subscriptionLabels.ts +100 -0
  523. package/templates/app/utils/basklee/subscriptionManageLabels.ts +424 -0
  524. package/templates/app/utils/basklee/subscriptionPlans.ts +162 -0
  525. package/templates/app/utils/basklee/subscriptionRemote.ts +110 -0
  526. package/templates/app/utils/basklee/subscriptionUsage.ts +82 -0
  527. package/templates/app/utils/basklee/tariffLabels.ts +182 -0
  528. package/templates/app/utils/basklee/tariffPage.ts +77 -0
  529. package/templates/app/utils/basklee/tariffVariables.ts +203 -0
  530. package/templates/app/utils/basklee/tariffs.ts +333 -0
  531. package/templates/app/utils/basklee/ticketItems.ts +87 -0
  532. package/templates/app/utils/basklee/ticketLabels.ts +428 -0
  533. package/templates/app/utils/basklee/ticketLocation.ts +79 -0
  534. package/templates/app/utils/basklee/walletTransaction.ts +135 -0
  535. package/templates/app/utils/baskleeAppLoad.ts +83 -0
  536. package/templates/basklee/COMPONENT-DOWNLOAD.md +40 -0
  537. package/templates/basklee/COMPONENTS.md +1993 -0
  538. package/templates/basklee/THEMES.md +94 -0
@@ -0,0 +1,1468 @@
1
+ <script setup lang="ts">
2
+ import {
3
+ computed,
4
+ nextTick,
5
+ onBeforeUnmount,
6
+ onMounted,
7
+ ref,
8
+ watch,
9
+ } from 'vue';
10
+ import { NuxtLink } from '#components';
11
+ import { useBaskleeStore } from '@/stores/basklee';
12
+ import { useBaskleeProductsStore } from '@/stores/baskleeProducts';
13
+ import { useBaskleeCatalogStore } from '@/stores/baskleeCatalog';
14
+ import { useBaskleeSelectionsStore } from '@/stores/baskleeSelections';
15
+ import {
16
+ useBaskleeFeatureApi,
17
+ useBaskleeTask,
18
+ } from '@/composables/useBaskleeFeature';
19
+ import { useBaskleeProductActions } from '@/composables/useBaskleeProductActions';
20
+ import { useBaskleeProductVariants } from '@/composables/useBaskleeProductVariants';
21
+ import { reviewLabels } from '@/utils/basklee/reviewLabels';
22
+ import { featureLabels } from '@/utils/basklee/featureLabels';
23
+ import { productLabels } from '@/utils/basklee/productLabels';
24
+ import { productActionLabels } from '@/utils/basklee/productActionLabels';
25
+ import { categoryLabels } from '@/utils/basklee/categoryLabels';
26
+ import { categoryTrail } from '@/utils/basklee/category';
27
+ import {
28
+ getAvailableNestedValueFromObject,
29
+ getAvailableValueFromObject,
30
+ } from '@/utils/basklee/presentation';
31
+ import { safeArticleHtml } from '@/utils/basklee/richText';
32
+ import { htmlTextParagraphs } from '@/utils/basklee/htmlText';
33
+ import {
34
+ thumbnailKeyTarget,
35
+ thumbnailRailEdges,
36
+ thumbnailScrollTarget,
37
+ } from '@/utils/basklee/productGallery';
38
+ import type { IThumbnailRailMetrics } from '@/utils/basklee/productGallery';
39
+ import { productPhotoAfterSwipe } from '@/utils/basklee/productPhotos';
40
+ import { productManufacturer } from '@/utils/basklee/productManufacturer';
41
+ import { requestProductPage } from '@/utils/basklee/productPage';
42
+ import type { IAppLoadCommonUnit } from '@/interfaces/basklee/appBase/appLoadCommon/IAppLoadCommonUnit';
43
+ import type { IBreadcrumb } from '@/interfaces/basklee/shared/IBreadcrumb';
44
+ import type { ITransformValue } from '@/interfaces/basklee/shared/ITransformValue';
45
+ import type {
46
+ IProduct,
47
+ IProductAttribute,
48
+ IProductAttributeName,
49
+ IProductSeller,
50
+ } from '@/interfaces/basklee/products/IProduct';
51
+ import { EProductStatus } from '@/interfaces/basklee/products/IProduct';
52
+ import type {
53
+ IProductSpecificationGroup,
54
+ IProductSpecificationRow,
55
+ } from '@/interfaces/basklee/products/IProductSpecification';
56
+ import ProductCard from '@/components/basklee/products/ProductCard.vue';
57
+ import ProductReviews from '@/components/basklee/products/ProductReviews.vue';
58
+ import ProductPreorderDialog from '@/components/basklee/products/ProductPreorderDialog.vue';
59
+ import ProductSpecificationsDialog from '@/components/basklee/products/ProductSpecificationsDialog.vue';
60
+ import ProductReviewImageViewer from '@/components/basklee/products/ProductReviewImageViewer.vue';
61
+ import BaskleeBreadcrumbs from '@/components/basklee/shared/BaskleeBreadcrumbs.vue';
62
+ import BaskleeImage from '@/components/basklee/shared/BaskleeImage.vue';
63
+ import BaskleeAvatar from '@/components/basklee/shared/BaskleeAvatar.vue';
64
+ import '@/components/basklee/shared/features.css';
65
+ import BaskleeEmptyState from '@/components/basklee/shared/BaskleeEmptyState.vue';
66
+
67
+ const props = withDefaults(
68
+ defineProps<{
69
+ productId: number;
70
+ preloaded?: boolean;
71
+ previewKey?: string;
72
+ }>(),
73
+ { preloaded: false, previewKey: '' },
74
+ );
75
+ const emit = defineEmits<{
76
+ loaded: [product: IProduct];
77
+ missing: [];
78
+ seller: [seller: IProductSeller];
79
+ }>();
80
+ const store = useBaskleeStore();
81
+ const productStore = useBaskleeProductsStore();
82
+ const catalogStore = useBaskleeCatalogStore();
83
+ const selectionStore = useBaskleeSelectionsStore();
84
+ const api = useBaskleeFeatureApi();
85
+ const task = useBaskleeTask();
86
+ const actions = useBaskleeProductActions({ api });
87
+ const variants = useBaskleeProductVariants({ api });
88
+ const labels = computed(() => reviewLabels(selectionStore.localeCode));
89
+ const common = computed(() => featureLabels(selectionStore.localeCode));
90
+ const cardLabels = computed(() => productLabels(selectionStore.localeCode));
91
+ const actionLabels = computed(() =>
92
+ productActionLabels(selectionStore.localeCode),
93
+ );
94
+ const categoryNames = computed(() =>
95
+ categoryLabels(selectionStore.localeCode),
96
+ );
97
+ const currentId = ref(props.productId);
98
+ // The page loaded this product during the server render and put it in
99
+ // the store: the browser shows it without another request.
100
+ const confirmed = ref(
101
+ props.preloaded && Boolean(productStore.getProduct(props.productId)),
102
+ );
103
+ const settled = ref(confirmed.value);
104
+ const image = ref(0);
105
+ const product = computed(() =>
106
+ confirmed.value ? productStore.getProduct(currentId.value) : undefined,
107
+ );
108
+ const title = computed(
109
+ () =>
110
+ getAvailableNestedValueFromObject(
111
+ product.value?.locale,
112
+ selectionStore.localeCode,
113
+ 'product_name',
114
+ ) || labels.value.product,
115
+ );
116
+ // The path above the product comes from `main_category`: the category the
117
+ // seller marked as the product's place in the catalog. Its ancestors are
118
+ // read from the catalog tree that Application Load already delivered, so
119
+ // the trail needs no request. A category outside that tree, for example a
120
+ // category that is not public, leaves the trail at the storefront home
121
+ // page and the product itself.
122
+ const categoryPath = computed(() => {
123
+ const category = product.value?.main_category;
124
+
125
+ return typeof category === 'number'
126
+ ? categoryTrail(catalogStore.catalog, category)
127
+ : [];
128
+ });
129
+ const breadcrumbs = computed<IBreadcrumb[]>(() => [
130
+ {
131
+ id: 'catalog',
132
+ label: categoryNames.value.catalog,
133
+ to: {
134
+ path: '/catalog',
135
+ query: { locale: selectionStore.localeCode },
136
+ },
137
+ },
138
+ ...categoryPath.value.map((category) => ({
139
+ id: category.id,
140
+ label:
141
+ getAvailableNestedValueFromObject(
142
+ category.locale,
143
+ selectionStore.localeCode,
144
+ 'cg_name',
145
+ ) || `${categoryNames.value.category} ${category.id}`,
146
+ to: {
147
+ path: `/category/${category.id}`,
148
+ query: { locale: selectionStore.localeCode },
149
+ },
150
+ })),
151
+ { id: `product-${currentId.value}`, label: title.value },
152
+ ]);
153
+ const descriptionSource = computed(
154
+ () =>
155
+ getAvailableNestedValueFromObject(
156
+ product.value?.locale,
157
+ selectionStore.localeCode,
158
+ 'product_description',
159
+ ) || '',
160
+ );
161
+ const description = computed(() => safeArticleHtml(descriptionSource.value));
162
+ // The server render and hydration show the description as plain
163
+ // paragraphs; the sanitized HTML replaces them once mounted.
164
+ const mounted = ref(false);
165
+ const descriptionText = computed(() =>
166
+ htmlTextParagraphs(descriptionSource.value),
167
+ );
168
+ const hasDescription = computed(() =>
169
+ mounted.value
170
+ ? Boolean(description.value)
171
+ : descriptionText.value.length > 0,
172
+ );
173
+ const photos = computed(() => {
174
+ const images = product.value?.images;
175
+ return images?.full?.length ? images.full : (images?.small ?? []);
176
+ });
177
+ // The first request in the browser shows a placeholder with the page
178
+ // layout; a later retry after an error shows it again. A product loaded
179
+ // during the server render is shown at once.
180
+ const showSkeleton = computed(
181
+ () =>
182
+ !product.value &&
183
+ !task.state.error &&
184
+ (!settled.value || Boolean(task.state.pending)),
185
+ );
186
+ const actionMessage = computed(() => {
187
+ const error = actions.error.value;
188
+ if (error) {
189
+ return (
190
+ error.message ||
191
+ actionLabels.value[error.kind as keyof typeof actionLabels.value] ||
192
+ actionLabels.value.failed
193
+ );
194
+ }
195
+ return actions.success.value
196
+ ? actionLabels.value[actions.done.value ?? 'saved']
197
+ : '';
198
+ });
199
+ const previewStatus = computed(() => {
200
+ if (!props.previewKey || !product.value) {
201
+ return '';
202
+ }
203
+
204
+ const status = product.value.status.status;
205
+ if (status === EProductStatus.PUBLISHED_AS_OPTION) {
206
+ return cardLabels.value.previewOption;
207
+ }
208
+ if (
209
+ status !== EProductStatus.PUBLISHED &&
210
+ status !== EProductStatus.LOW_STOCK &&
211
+ status !== EProductStatus.LOW_SALE_STOCK
212
+ ) {
213
+ return cardLabels.value.previewUnpublished;
214
+ }
215
+
216
+ return '';
217
+ });
218
+
219
+ const reviewStat = computed(() => {
220
+ const stat = product.value?.feedback_stat;
221
+ const count = Number(stat?.c_feedbacks ?? 0);
222
+ const average = Number(stat?.avg_raiting ?? 0);
223
+
224
+ if (!count || !Number.isFinite(average)) {
225
+ return undefined;
226
+ }
227
+
228
+ return { count, average: Math.round(average * 10) / 10 };
229
+ });
230
+ const reviewCaption = computed(() =>
231
+ pluralWord(reviewStat.value?.count ?? 0, cardLabels.value.reviews),
232
+ );
233
+ const summaryLabel = computed(() => {
234
+ const stat = reviewStat.value;
235
+ const rating = `${stat?.average} ${labels.value.ofFive}`;
236
+ const count = `${stat?.count} ${reviewCaption.value}`;
237
+
238
+ return `${labels.value.showReviews}: ${rating}, ${count}`;
239
+ });
240
+
241
+ const seller = computed(() =>
242
+ store.init?.visual_settings?.single_seller_mode
243
+ ? undefined
244
+ : product.value?.seller,
245
+ );
246
+ const sellerHref = computed(() => {
247
+ const query = new URLSearchParams({
248
+ locale: selectionStore.localeCode,
249
+ seller: String(seller.value?.id ?? ''),
250
+ });
251
+
252
+ return `/sellers?${query}`;
253
+ });
254
+ const sellerRating = computed(() => Number(seller.value?.raiting ?? 0));
255
+
256
+ const manufacturer = computed(() =>
257
+ productManufacturer(product.value, selectionStore.localeCode),
258
+ );
259
+
260
+ // The arrow buttons overlay both ends of the thumbnail rail; a revealed
261
+ // thumbnail keeps this many pixels clear of them.
262
+ const railInset = 40;
263
+ const rail = ref<HTMLElement>();
264
+ const railEdges = ref({ back: false, forward: false });
265
+ let railObserver: ResizeObserver | undefined;
266
+
267
+ // A long description is shortened in the purchase column until More.
268
+ const descriptionBody = ref<HTMLElement>();
269
+ const descriptionOpen = ref(false);
270
+ const descriptionLong = ref(false);
271
+ let descriptionObserver: ResizeObserver | undefined;
272
+
273
+ // The characteristics keep a fixed height in the purchase column, so the
274
+ // price and the purchase controls stay where the reader expects them. A
275
+ // list that does not fit that height fades out at its lower edge and the
276
+ // control below it opens every characteristic in a dialog.
277
+ const specificationsBody = ref<HTMLElement>();
278
+ const specificationsLong = ref(false);
279
+ const specificationsOpen = ref(false);
280
+ let specificationsObserver: ResizeObserver | undefined;
281
+
282
+ const returns = computed(() => {
283
+ const refunds = product.value?.refunds;
284
+
285
+ if (!refunds || product.value?.is_digital) {
286
+ return [];
287
+ }
288
+
289
+ return [
290
+ {
291
+ key: 'regular',
292
+ label: labels.value.returnRegular,
293
+ days: refunds.customer_max_refund_days,
294
+ },
295
+ {
296
+ key: 'defect',
297
+ label: labels.value.returnDefect,
298
+ days: refunds.max_refund_days_with_defect,
299
+ },
300
+ ]
301
+ .filter((entry) => entry.days > 0)
302
+ .map((entry) => ({
303
+ ...entry,
304
+ value: `${labels.value.within} ${entry.days} ${pluralWord(
305
+ entry.days,
306
+ labels.value.days,
307
+ )}`,
308
+ }));
309
+ });
310
+
311
+ const generalRows = computed(() => {
312
+ const value = product.value;
313
+ const rows: IProductSpecificationRow[] = [];
314
+
315
+ if (!value) {
316
+ return rows;
317
+ }
318
+
319
+ if (manufacturer.value) {
320
+ rows.push({
321
+ key: 'manufacturer',
322
+ label: labels.value.manufacturer,
323
+ value: manufacturer.value.name,
324
+ to: manufacturer.value.to,
325
+ });
326
+ }
327
+
328
+ const weight = measurement(
329
+ value.weight_dict,
330
+ selectionStore.weights,
331
+ selectionStore.weightId,
332
+ );
333
+ const dimensions = [
334
+ value.length_dict?.length,
335
+ value.length_dict?.width,
336
+ value.length_dict?.height,
337
+ ].map((entry) =>
338
+ measurement(entry, selectionStore.lengths, selectionStore.lengthId),
339
+ );
340
+
341
+ if (weight) {
342
+ rows.push({
343
+ key: 'weight',
344
+ label: labels.value.weight,
345
+ value: `${weight.amount} ${weight.unit}`,
346
+ });
347
+ }
348
+
349
+ if (dimensions.every(Boolean)) {
350
+ const unit = dimensions[0]!.unit;
351
+ const amounts = dimensions.map((entry) => entry!.amount).join(' × ');
352
+ rows.push({
353
+ key: 'dimensions',
354
+ label: labels.value.dimensions,
355
+ value: `${amounts} ${unit}`,
356
+ });
357
+ }
358
+
359
+ if (value.is_digital) {
360
+ rows.push({
361
+ key: 'type',
362
+ label: labels.value.type,
363
+ value: labels.value.digital,
364
+ });
365
+ }
366
+
367
+ return rows;
368
+ });
369
+
370
+ const specifications = computed<IProductSpecificationGroup[]>(() => {
371
+ const groups: IProductSpecificationGroup[] = [];
372
+
373
+ if (generalRows.value.length) {
374
+ groups.push({ key: 'general', title: '', rows: generalRows.value });
375
+ }
376
+
377
+ for (const attribute of attributeList(product.value?.attributes)) {
378
+ const rows = attribute.names
379
+ .map((name) => attributeRow(name))
380
+ .filter((row): row is IProductSpecificationRow => Boolean(row));
381
+
382
+ if (rows.length) {
383
+ groups.push({
384
+ key: `attribute-${attribute.id}`,
385
+ title:
386
+ getAvailableValueFromObject(
387
+ attribute.locales,
388
+ selectionStore.localeCode,
389
+ ) ?? '',
390
+ rows,
391
+ });
392
+ }
393
+ }
394
+
395
+ return groups;
396
+ });
397
+
398
+ function pluralWord(count: number, forms: string[]) {
399
+ let rule: string;
400
+
401
+ try {
402
+ rule = new Intl.PluralRules(selectionStore.localeCode).select(count);
403
+ } catch {
404
+ // Backend locale codes are not always valid BCP 47 tags.
405
+ rule = new Intl.PluralRules('en').select(count);
406
+ }
407
+
408
+ if (rule === 'one') {
409
+ return forms[0];
410
+ }
411
+ if (rule === 'few' && forms.length > 2) {
412
+ return forms[1];
413
+ }
414
+
415
+ return forms[forms.length - 1];
416
+ }
417
+
418
+ function formatNumber(value: number) {
419
+ try {
420
+ return new Intl.NumberFormat(selectionStore.localeCode, {
421
+ maximumFractionDigits: 2,
422
+ }).format(value);
423
+ } catch {
424
+ return String(value);
425
+ }
426
+ }
427
+
428
+ // Values arrive converted for every unit; the selected unit is shown.
429
+ function measurement(
430
+ values: Record<string, ITransformValue> | undefined,
431
+ units: Record<string, IAppLoadCommonUnit>,
432
+ selectedId: string,
433
+ ) {
434
+ const unitId = values?.[selectedId]
435
+ ? selectedId
436
+ : Object.keys(values ?? {})[0];
437
+ const amount = unitId ? values?.[unitId]?.transform_value : undefined;
438
+
439
+ if (!unitId || !amount || amount <= 0) {
440
+ return undefined;
441
+ }
442
+
443
+ const unit = units[unitId];
444
+ const label =
445
+ getAvailableNestedValueFromObject(
446
+ unit?.locales,
447
+ selectionStore.localeCode,
448
+ 'unit',
449
+ ) ||
450
+ unit?.unit ||
451
+ '';
452
+
453
+ return { amount: formatNumber(amount), unit: label };
454
+ }
455
+
456
+ function attributeList(value: IProduct['attributes']): IProductAttribute[] {
457
+ if (!value) {
458
+ return [];
459
+ }
460
+
461
+ return Array.isArray(value) ? value : Object.values(value);
462
+ }
463
+
464
+ function attributeRow(
465
+ name: IProductAttributeName,
466
+ ): IProductSpecificationRow | undefined {
467
+ const localized = getAvailableValueFromObject(
468
+ name.locale,
469
+ selectionStore.localeCode,
470
+ false,
471
+ );
472
+ const values =
473
+ localized && Object.keys(localized).length
474
+ ? localized
475
+ : Object.values(name.locale ?? {}).find(
476
+ (entry) => entry && Object.keys(entry).length,
477
+ );
478
+ const entry = values ? Object.entries(values)[0] : undefined;
479
+
480
+ if (!entry) {
481
+ return undefined;
482
+ }
483
+
484
+ return { key: `name-${name.id}`, label: entry[0], value: entry[1] };
485
+ }
486
+
487
+ // A tap on the main photo opens it full screen; the page keeps the photo
488
+ // chosen there.
489
+ const viewerOpen = ref(false);
490
+ const viewerPhotos = computed(() =>
491
+ photos.value.map((photo, id) => ({ id, image: photo })),
492
+ );
493
+
494
+ function openViewerKey(event: KeyboardEvent) {
495
+ if (event.key === 'Enter' || event.key === ' ') {
496
+ event.preventDefault();
497
+ viewerOpen.value = true;
498
+ }
499
+ }
500
+
501
+ function showImage(index: number) {
502
+ const count = photos.value.length;
503
+ image.value = (index + count) % count;
504
+ }
505
+
506
+ let swipeStart: { x: number; y: number } | undefined;
507
+
508
+ // A sideways swipe on a touch screen steps to the next or previous photo,
509
+ // as on the product cards.
510
+ function startSwipe(event: TouchEvent) {
511
+ const touch = event.touches[0];
512
+ swipeStart =
513
+ touch && event.touches.length === 1
514
+ ? { x: touch.clientX, y: touch.clientY }
515
+ : undefined;
516
+ }
517
+
518
+ function endSwipe(event: TouchEvent) {
519
+ const touch = event.changedTouches[0];
520
+ const start = swipeStart;
521
+
522
+ swipeStart = undefined;
523
+ if (!start || !touch) {
524
+ return;
525
+ }
526
+ showImage(
527
+ productPhotoAfterSwipe(
528
+ image.value,
529
+ photos.value.length,
530
+ touch.clientX - start.x,
531
+ touch.clientY - start.y,
532
+ ),
533
+ );
534
+ }
535
+
536
+ // The rail is a column beside the main image on wide containers and a row
537
+ // below it on narrow ones; CSS decides, so the direction is read from it.
538
+ function railIsVertical(element: HTMLElement) {
539
+ return getComputedStyle(element).flexDirection === 'column';
540
+ }
541
+
542
+ function railMetrics(element: HTMLElement): IThumbnailRailMetrics {
543
+ if (railIsVertical(element)) {
544
+ return {
545
+ position: element.scrollTop,
546
+ size: element.scrollHeight,
547
+ viewport: element.clientHeight,
548
+ };
549
+ }
550
+
551
+ return {
552
+ position: element.scrollLeft,
553
+ size: element.scrollWidth,
554
+ viewport: element.clientWidth,
555
+ };
556
+ }
557
+
558
+ function updateRail() {
559
+ const element = rail.value;
560
+
561
+ railEdges.value = element
562
+ ? thumbnailRailEdges(railMetrics(element))
563
+ : { back: false, forward: false };
564
+ }
565
+
566
+ function scrollRail(element: HTMLElement, position: number) {
567
+ const reduced = window.matchMedia(
568
+ '(prefers-reduced-motion: reduce)',
569
+ ).matches;
570
+ const behavior = reduced ? 'auto' : 'smooth';
571
+
572
+ if (railIsVertical(element)) {
573
+ element.scrollTo({ top: position, behavior });
574
+ } else {
575
+ element.scrollTo({ left: position, behavior });
576
+ }
577
+ }
578
+
579
+ // Each arrow press moves the rail by one thumbnail and the gap after it.
580
+ function stepRail(direction: 1 | -1) {
581
+ const element = rail.value;
582
+ const thumbnail = element?.firstElementChild;
583
+
584
+ if (!element || !(thumbnail instanceof HTMLElement)) {
585
+ return;
586
+ }
587
+
588
+ const style = getComputedStyle(element);
589
+ const step = railIsVertical(element)
590
+ ? thumbnail.offsetHeight + parseFloat(style.rowGap || '0')
591
+ : thumbnail.offsetWidth + parseFloat(style.columnGap || '0');
592
+
593
+ scrollRail(element, railMetrics(element).position + direction * step);
594
+ }
595
+
596
+ function revealThumbnail(index: number) {
597
+ const element = rail.value;
598
+ const thumbnail = element?.children[index];
599
+
600
+ if (!element || !(thumbnail instanceof HTMLElement)) {
601
+ return;
602
+ }
603
+
604
+ const bounds = railIsVertical(element)
605
+ ? { start: thumbnail.offsetTop, length: thumbnail.offsetHeight }
606
+ : { start: thumbnail.offsetLeft, length: thumbnail.offsetWidth };
607
+ const target = thumbnailScrollTarget(
608
+ bounds,
609
+ railMetrics(element),
610
+ railInset,
611
+ );
612
+
613
+ if (target !== undefined) {
614
+ scrollRail(element, target);
615
+ }
616
+ }
617
+
618
+ // Only the shortened text is measured: an opened description keeps Less.
619
+ function measureDescription() {
620
+ const element = descriptionBody.value;
621
+
622
+ if (element && !descriptionOpen.value) {
623
+ descriptionLong.value = element.scrollHeight > element.clientHeight + 1;
624
+ }
625
+ }
626
+
627
+ // The characteristics that do not fit the reserved height are the ones the
628
+ // dialog exists for: a list that fits keeps every row on the page.
629
+ function measureSpecifications() {
630
+ const element = specificationsBody.value;
631
+
632
+ if (element) {
633
+ specificationsLong.value =
634
+ element.scrollHeight > element.clientHeight + 1;
635
+ }
636
+ }
637
+
638
+ // Arrow keys, Home and End move between thumbnails, which form one tab stop.
639
+ function thumbnailKeydown(event: KeyboardEvent, index: number) {
640
+ const target = thumbnailKeyTarget(event.key, index, photos.value.length);
641
+
642
+ if (target === undefined) {
643
+ return;
644
+ }
645
+
646
+ event.preventDefault();
647
+ image.value = target;
648
+
649
+ const button = rail.value?.children[target];
650
+ if (button instanceof HTMLElement) {
651
+ button.focus({ preventScroll: true });
652
+ }
653
+ }
654
+
655
+ function showReviews() {
656
+ document
657
+ .getElementById('product-reviews')
658
+ ?.scrollIntoView({ behavior: 'smooth', block: 'start' });
659
+ }
660
+
661
+ function openSeller() {
662
+ if (seller.value) {
663
+ emit('seller', seller.value);
664
+ }
665
+ }
666
+
667
+ async function load() {
668
+ await task.run('load', async (signal) => {
669
+ const { product: found, sellers } = await requestProductPage(
670
+ api,
671
+ props.productId,
672
+ props.previewKey,
673
+ signal,
674
+ );
675
+ confirmed.value = Boolean(found);
676
+ if (found) {
677
+ productStore.setProduct(found, 'products', sellers);
678
+ } else {
679
+ // products_search returns an empty list for an unknown or hidden ID.
680
+ emit('missing');
681
+ }
682
+ });
683
+ settled.value = true;
684
+ }
685
+
686
+ async function selectVariant(
687
+ selection: Parameters<typeof variants.select>[0],
688
+ ) {
689
+ await variants.select(selection);
690
+ const target = selection.variant.reload_product;
691
+ if (target && productStore.getProduct(target)) {
692
+ currentId.value = target;
693
+ image.value = 0;
694
+ }
695
+ }
696
+ function selectSecondary(selection: { variant: { product: IProduct } }) {
697
+ currentId.value = selection.variant.product.id;
698
+ image.value = 0;
699
+ }
700
+ onMounted(() => {
701
+ mounted.value = true;
702
+ if (!confirmed.value) {
703
+ void load();
704
+ }
705
+ });
706
+ onBeforeUnmount(() => {
707
+ railObserver?.disconnect();
708
+ descriptionObserver?.disconnect();
709
+ specificationsObserver?.disconnect();
710
+ });
711
+
712
+ // The rail appears after the product loads and is replaced on variant
713
+ // changes; its size changes when the layout switches between column and row.
714
+ watch(rail, (element) => {
715
+ railObserver?.disconnect();
716
+ railObserver = undefined;
717
+
718
+ if (element) {
719
+ railObserver = new ResizeObserver(updateRail);
720
+ railObserver.observe(element);
721
+ }
722
+
723
+ updateRail();
724
+ });
725
+ watch(descriptionBody, (element) => {
726
+ descriptionObserver?.disconnect();
727
+ descriptionObserver = undefined;
728
+
729
+ if (element) {
730
+ descriptionObserver = new ResizeObserver(measureDescription);
731
+ descriptionObserver.observe(element);
732
+ }
733
+
734
+ measureDescription();
735
+ });
736
+ watch(description, async () => {
737
+ descriptionOpen.value = false;
738
+ descriptionLong.value = false;
739
+ await nextTick();
740
+ measureDescription();
741
+ });
742
+ watch(specificationsBody, (element) => {
743
+ specificationsObserver?.disconnect();
744
+ specificationsObserver = undefined;
745
+
746
+ if (element) {
747
+ specificationsObserver = new ResizeObserver(measureSpecifications);
748
+ specificationsObserver.observe(element);
749
+ }
750
+
751
+ measureSpecifications();
752
+ });
753
+ // Another variant, another language or another unit replaces the rows, so
754
+ // the list is measured again. A product without characteristics has
755
+ // nothing left to show in the dialog.
756
+ watch(specifications, async (groups) => {
757
+ specificationsLong.value = false;
758
+
759
+ if (!groups.length) {
760
+ specificationsOpen.value = false;
761
+ }
762
+
763
+ await nextTick();
764
+ measureSpecifications();
765
+ });
766
+ watch(image, async (index) => {
767
+ await nextTick();
768
+ revealThumbnail(index);
769
+ });
770
+ // Another variant's photos start from the first thumbnail.
771
+ watch(photos, async () => {
772
+ await nextTick();
773
+
774
+ if (rail.value) {
775
+ rail.value.scrollTop = 0;
776
+ rail.value.scrollLeft = 0;
777
+ }
778
+
779
+ updateRail();
780
+ });
781
+ watch(product, (value) => {
782
+ if (value) {
783
+ emit('loaded', value);
784
+ }
785
+ });
786
+ </script>
787
+
788
+ <template>
789
+ <section
790
+ class="op-feature @container/product font-basklee"
791
+ data-feature-part="StorefrontProduct"
792
+ :aria-busy="showSkeleton || undefined"
793
+ >
794
+ <div
795
+ v-if="task.state.error"
796
+ class="op-notice op-notice-error"
797
+ role="alert"
798
+ >
799
+ {{ task.state.error }}
800
+ <button
801
+ class="op-feature-button"
802
+ type="button"
803
+ :disabled="Boolean(task.state.pending)"
804
+ @click="load"
805
+ >
806
+ {{ common.retry }}
807
+ </button>
808
+ </div>
809
+ <p
810
+ class="op-feature-loading"
811
+ v-if="task.state.pending || showSkeleton"
812
+ role="status"
813
+ >
814
+ <span class="sr-only">{{ common.loading }}</span>
815
+ </p>
816
+ <BaskleeBreadcrumbs
817
+ v-if="product || showSkeleton"
818
+ class="mb-6"
819
+ :items="breadcrumbs"
820
+ :loading="!product"
821
+ />
822
+ <template v-if="product">
823
+ <div
824
+ class="grid items-start gap-8 @min-[960px]/product:grid-cols-[minmax(0,7fr)_minmax(0,5fr)] @min-[960px]/product:items-stretch @min-[960px]/product:gap-x-12 @min-[1200px]/product:gap-x-20"
825
+ >
826
+ <section
827
+ v-if="photos.length"
828
+ class="grid min-w-0 gap-3 @min-[560px]/product:grid-cols-[72px_minmax(0,1fr)] @min-[560px]/product:gap-4 @min-[960px]/product:col-start-1 @min-[960px]/product:row-start-1"
829
+ :aria-label="labels.gallery"
830
+ data-product-gallery
831
+ >
832
+ <div
833
+ class="relative min-w-0 @min-[560px]/product:col-start-2 @min-[560px]/product:row-start-1 @min-[960px]/product:min-h-96"
834
+ :class="{ 'touch-pan-y': photos.length > 1 }"
835
+ data-product-main-image
836
+ @touchstart.passive="startSwipe"
837
+ @touchend="endSwipe"
838
+ >
839
+ <BaskleeImage
840
+ :src="photos[image]"
841
+ :alt="title"
842
+ :width="800"
843
+ :height="1000"
844
+ loading="eager"
845
+ role="button"
846
+ tabindex="0"
847
+ :aria-label="labels.openProductPhoto"
848
+ data-product-photo-open
849
+ @click="viewerOpen = true"
850
+ @keydown="openViewerKey"
851
+ class="
852
+ box-border aspect-square h-auto max-h-[70vh] w-full
853
+ cursor-zoom-in outline-none
854
+ focus-visible:outline-1 focus-visible:outline-solid
855
+ focus-visible:outline-basklee-text
856
+ bg-basklee-surface object-contain
857
+ @min-[560px]/product:aspect-[4/5]
858
+ @min-[960px]/product:absolute @min-[960px]/product:inset-0
859
+ @min-[960px]/product:m-auto @min-[960px]/product:aspect-auto
860
+ @min-[960px]/product:h-full
861
+ @min-[960px]/product:max-h-[calc(100vh-12rem)]
862
+ "
863
+ />
864
+ <template v-if="photos.length > 1">
865
+ <button
866
+ type="button"
867
+ class="absolute left-2 top-1/2 -translate-y-1/2 grid h-10 w-10 place-items-center rounded-full p-0 cursor-pointer border border-solid border-basklee-border bg-basklee-surface/90 text-basklee-text outline-none transition-colors motion-reduce:transition-none hover:border-basklee-text focus-visible:border-basklee-text"
868
+ :aria-label="labels.previousImage"
869
+ data-product-image-previous
870
+ @click="showImage(image - 1)"
871
+ >
872
+ <svg
873
+ viewBox="0 0 24 24"
874
+ class="h-4 w-4"
875
+ fill="none"
876
+ stroke="currentColor"
877
+ stroke-width="1.5"
878
+ aria-hidden="true"
879
+ >
880
+ <path d="m15 5-7 7 7 7" />
881
+ </svg>
882
+ </button>
883
+ <button
884
+ type="button"
885
+ class="absolute right-2 top-1/2 -translate-y-1/2 grid h-10 w-10 place-items-center rounded-full p-0 cursor-pointer border border-solid border-basklee-border bg-basklee-surface/90 text-basklee-text outline-none transition-colors motion-reduce:transition-none hover:border-basklee-text focus-visible:border-basklee-text"
886
+ :aria-label="labels.nextImage"
887
+ data-product-image-next
888
+ @click="showImage(image + 1)"
889
+ >
890
+ <svg
891
+ viewBox="0 0 24 24"
892
+ class="h-4 w-4"
893
+ fill="none"
894
+ stroke="currentColor"
895
+ stroke-width="1.5"
896
+ aria-hidden="true"
897
+ >
898
+ <path d="m9 5 7 7-7 7" />
899
+ </svg>
900
+ </button>
901
+ </template>
902
+ </div>
903
+ <div
904
+ v-if="photos.length > 1"
905
+ class="relative min-w-0 @min-[560px]/product:col-start-1 @min-[560px]/product:row-start-1 @min-[560px]/product:h-0 @min-[560px]/product:min-h-full"
906
+ data-product-thumbnail-rail
907
+ >
908
+ <div
909
+ ref="rail"
910
+ class="product-thumbnails relative flex h-full min-w-0 gap-2 overflow-x-auto overflow-y-hidden overscroll-contain @min-[560px]/product:flex-col @min-[560px]/product:overflow-x-hidden @min-[560px]/product:overflow-y-auto"
911
+ data-product-thumbnails
912
+ @scroll.passive="updateRail"
913
+ >
914
+ <button
915
+ v-for="(photo, index) in photos"
916
+ :key="photo"
917
+ type="button"
918
+ class="box-border h-[70px] w-14 shrink-0 p-1 @min-[560px]/product:h-[90px] @min-[560px]/product:w-[72px] cursor-pointer border border-solid bg-basklee-surface outline-none transition-[opacity,border-color] motion-reduce:transition-none hover:opacity-100 focus-visible:border-2 focus-visible:border-basklee-text"
919
+ :class="
920
+ index === image
921
+ ? 'border-basklee-text opacity-100'
922
+ : 'border-transparent opacity-75'
923
+ "
924
+ :aria-label="`${labels.gallery} ${index + 1}`"
925
+ :aria-pressed="index === image"
926
+ :tabindex="index === image ? 0 : -1"
927
+ :data-product-thumbnail="index"
928
+ @click="image = index"
929
+ @keydown="thumbnailKeydown($event, index)"
930
+ >
931
+ <BaskleeImage
932
+ :src="photo"
933
+ alt=""
934
+ class="h-full w-full object-contain"
935
+ />
936
+ </button>
937
+ </div>
938
+ <button
939
+ type="button"
940
+ class="group absolute left-0 top-0 bottom-0 grid w-10 place-items-center p-0 @min-[560px]/product:right-0 @min-[560px]/product:bottom-auto @min-[560px]/product:h-10 @min-[560px]/product:w-auto cursor-pointer border-0 outline-none bg-linear-to-r from-basklee-surface from-40% to-transparent @min-[560px]/product:bg-linear-to-b transition-opacity motion-reduce:transition-none disabled:pointer-events-none disabled:opacity-0"
941
+ :aria-label="labels.thumbnailsBack"
942
+ :disabled="!railEdges.back"
943
+ data-product-thumbnails-previous
944
+ @click="stepRail(-1)"
945
+ >
946
+ <span
947
+ class="grid h-7 w-7 place-items-center rounded-full border border-solid border-basklee-border bg-basklee-surface text-basklee-text transition-colors motion-reduce:transition-none group-hover:border-basklee-text group-focus-visible:border-basklee-text"
948
+ >
949
+ <svg
950
+ viewBox="0 0 24 24"
951
+ class="h-3.5 w-3.5 @min-[560px]/product:rotate-90"
952
+ fill="none"
953
+ stroke="currentColor"
954
+ stroke-width="1.5"
955
+ aria-hidden="true"
956
+ >
957
+ <path d="m15 5-7 7 7 7" />
958
+ </svg>
959
+ </span>
960
+ </button>
961
+ <button
962
+ type="button"
963
+ class="group absolute right-0 top-0 bottom-0 grid w-10 place-items-center p-0 @min-[560px]/product:left-0 @min-[560px]/product:top-auto @min-[560px]/product:h-10 @min-[560px]/product:w-auto cursor-pointer border-0 outline-none bg-linear-to-l from-basklee-surface from-40% to-transparent @min-[560px]/product:bg-linear-to-t transition-opacity motion-reduce:transition-none disabled:pointer-events-none disabled:opacity-0"
964
+ :aria-label="labels.thumbnailsForward"
965
+ :disabled="!railEdges.forward"
966
+ data-product-thumbnails-next
967
+ @click="stepRail(1)"
968
+ >
969
+ <span
970
+ class="grid h-7 w-7 place-items-center rounded-full border border-solid border-basklee-border bg-basklee-surface text-basklee-text transition-colors motion-reduce:transition-none group-hover:border-basklee-text group-focus-visible:border-basklee-text"
971
+ >
972
+ <svg
973
+ viewBox="0 0 24 24"
974
+ class="h-3.5 w-3.5 @min-[560px]/product:rotate-90"
975
+ fill="none"
976
+ stroke="currentColor"
977
+ stroke-width="1.5"
978
+ aria-hidden="true"
979
+ >
980
+ <path d="m9 5 7 7-7 7" />
981
+ </svg>
982
+ </span>
983
+ </button>
984
+ </div>
985
+ </section>
986
+
987
+ <div
988
+ class="grid min-w-0 content-start gap-6 @min-[960px]/product:col-start-2 @min-[960px]/product:row-start-1"
989
+ data-product-summary
990
+ >
991
+ <header class="grid min-w-0 gap-3">
992
+ <h1
993
+ class="m-0 break-words text-2xl font-medium leading-tight text-basklee-text @min-[560px]/product:text-[28px]"
994
+ >
995
+ {{ title }}
996
+ </h1>
997
+ <a
998
+ v-if="reviewStat"
999
+ href="#product-reviews"
1000
+ class="inline-flex items-center gap-2 justify-self-start text-xs text-basklee-muted no-underline tabular-nums outline-none transition-colors motion-reduce:transition-none hover:text-basklee-text focus-visible:text-basklee-text"
1001
+ :aria-label="summaryLabel"
1002
+ data-product-review-summary
1003
+ @click.prevent="showReviews"
1004
+ >
1005
+ <span
1006
+ class="inline-flex text-sm tracking-[0.06em]"
1007
+ aria-hidden="true"
1008
+ >
1009
+ <span
1010
+ v-for="star in 5"
1011
+ :key="star"
1012
+ :class="
1013
+ star <= Math.round(reviewStat.average)
1014
+ ? 'text-basklee-text'
1015
+ : 'text-basklee-border'
1016
+ "
1017
+ >
1018
+ ★
1019
+ </span>
1020
+ </span>
1021
+ <span class="text-basklee-text">
1022
+ {{ reviewStat.average }}
1023
+ </span>
1024
+ <span>· {{ reviewStat.count }} {{ reviewCaption }}</span>
1025
+ </a>
1026
+ </header>
1027
+
1028
+ <p
1029
+ v-if="previewStatus"
1030
+ class="op-notice op-notice-attention"
1031
+ role="status"
1032
+ data-product-preview-status
1033
+ >
1034
+ {{ previewStatus }}
1035
+ </p>
1036
+
1037
+ <ProductCard
1038
+ :product-id="currentId"
1039
+ details
1040
+ :actions-disabled="
1041
+ actions.pending.value || actions.needsRefresh.value
1042
+ "
1043
+ @select-seller="emit('seller', $event)"
1044
+ @add="actions.run('add', $event)"
1045
+ @remove="actions.run('remove', $event)"
1046
+ @toggle-favorite="actions.run('toggleFavorite', $event)"
1047
+ @subscribe="actions.run('subscribe', $event)"
1048
+ @unsubscribe="actions.run('unsubscribe', $event)"
1049
+ @preorder="actions.openPreorder"
1050
+ @request-secondary-variants="variants.requestSecondary"
1051
+ @select-variant="selectVariant"
1052
+ @select-secondary-variant="selectSecondary"
1053
+ >
1054
+ <template #afterPrice>
1055
+ <div
1056
+ v-if="hasDescription || specifications.length"
1057
+ class="grid gap-6 py-1"
1058
+ data-product-information
1059
+ >
1060
+ <section
1061
+ v-if="hasDescription"
1062
+ class="grid gap-3"
1063
+ data-product-description
1064
+ >
1065
+ <h2
1066
+ class="m-0 text-xs font-medium uppercase tracking-[0.08em] text-basklee-text"
1067
+ >
1068
+ {{ labels.description }}
1069
+ </h2>
1070
+ <div
1071
+ v-if="mounted"
1072
+ id="product-description-text"
1073
+ ref="descriptionBody"
1074
+ class="product-description text-sm text-basklee-text"
1075
+ :class="{
1076
+ 'product-description-short': !descriptionOpen,
1077
+ 'product-description-fade':
1078
+ !descriptionOpen && descriptionLong,
1079
+ }"
1080
+ v-html="description"
1081
+ />
1082
+ <div
1083
+ v-else
1084
+ id="product-description-text"
1085
+ ref="descriptionBody"
1086
+ class="product-description text-sm text-basklee-text"
1087
+ :class="{
1088
+ 'product-description-short': !descriptionOpen,
1089
+ 'product-description-fade':
1090
+ !descriptionOpen && descriptionLong,
1091
+ }"
1092
+ >
1093
+ <p
1094
+ v-for="(paragraph, index) in descriptionText"
1095
+ :key="index"
1096
+ >
1097
+ {{ paragraph }}
1098
+ </p>
1099
+ </div>
1100
+ <button
1101
+ v-if="descriptionLong"
1102
+ type="button"
1103
+ class="justify-self-start p-0 cursor-pointer border-0 bg-transparent text-xs uppercase tracking-[0.08em] text-basklee-text outline-none transition-colors motion-reduce:transition-none hover:text-basklee-muted focus-visible:text-basklee-muted"
1104
+ aria-controls="product-description-text"
1105
+ :aria-expanded="descriptionOpen"
1106
+ data-product-description-toggle
1107
+ @click="descriptionOpen = !descriptionOpen"
1108
+ >
1109
+ {{ descriptionOpen ? labels.less : labels.more }}
1110
+ </button>
1111
+ </section>
1112
+ <section
1113
+ v-if="specifications.length"
1114
+ class="grid gap-3"
1115
+ data-product-specifications
1116
+ >
1117
+ <h2
1118
+ class="m-0 text-xs font-medium uppercase tracking-[0.08em] text-basklee-text"
1119
+ >
1120
+ {{ labels.characteristics }}
1121
+ </h2>
1122
+ <div
1123
+ id="product-specifications-list"
1124
+ ref="specificationsBody"
1125
+ class="product-specifications grid gap-4"
1126
+ :class="{
1127
+ 'product-specifications-fade': specificationsLong,
1128
+ }"
1129
+ >
1130
+ <div
1131
+ v-for="group in specifications"
1132
+ :key="group.key"
1133
+ class="grid gap-1"
1134
+ >
1135
+ <h3
1136
+ v-if="group.title"
1137
+ class="m-0 text-sm font-normal text-basklee-muted"
1138
+ >
1139
+ {{ group.title }}
1140
+ </h3>
1141
+ <dl class="m-0 grid">
1142
+ <div
1143
+ v-for="row in group.rows"
1144
+ :key="row.key"
1145
+ class="grid grid-cols-[minmax(0,2fr)_minmax(0,3fr)] gap-4 py-2.5 text-sm border-0 border-b border-solid border-basklee-border"
1146
+ >
1147
+ <dt class="break-words text-basklee-muted">
1148
+ {{ row.label }}
1149
+ </dt>
1150
+ <dd
1151
+ class="m-0 whitespace-pre-line break-words text-basklee-text"
1152
+ >
1153
+ <NuxtLink
1154
+ v-if="row.to"
1155
+ class="op-feature-link"
1156
+ :to="row.to"
1157
+ >
1158
+ {{ row.value }}
1159
+ </NuxtLink>
1160
+ <template v-else>{{ row.value }}</template>
1161
+ </dd>
1162
+ </div>
1163
+ </dl>
1164
+ </div>
1165
+ </div>
1166
+ <button
1167
+ v-if="specificationsLong"
1168
+ type="button"
1169
+ class="justify-self-start p-0 cursor-pointer border-0 bg-transparent text-xs uppercase tracking-[0.08em] text-basklee-text outline-none transition-colors motion-reduce:transition-none hover:text-basklee-muted focus-visible:text-basklee-muted"
1170
+ aria-haspopup="dialog"
1171
+ data-product-specifications-toggle
1172
+ @click="specificationsOpen = true"
1173
+ >
1174
+ {{ labels.allCharacteristics }}
1175
+ </button>
1176
+ </section>
1177
+ </div>
1178
+ </template>
1179
+ </ProductCard>
1180
+ <p
1181
+ v-if="variants.error.value"
1182
+ role="alert"
1183
+ class="op-notice op-notice-error"
1184
+ >
1185
+ {{ common.failed }}
1186
+ </p>
1187
+ <!-- While the preorder window is open, it shows its own messages. -->
1188
+ <div
1189
+ v-if="actionMessage && actions.preorder.value === undefined"
1190
+ :role="actions.error.value ? 'alert' : 'status'"
1191
+ class="op-notice"
1192
+ :class="
1193
+ actions.error.value ? 'op-notice-error' : 'op-notice-success'
1194
+ "
1195
+ >
1196
+ {{ actionMessage }}
1197
+ <button
1198
+ class="op-feature-button"
1199
+ v-if="actions.needsRefresh.value"
1200
+ type="button"
1201
+ :disabled="actions.pending.value"
1202
+ @click="actions.retryRefresh()"
1203
+ >
1204
+ {{ actionLabels.retry }}
1205
+ </button>
1206
+ <NuxtLink
1207
+ v-if="actions.error.value?.kind === 'email'"
1208
+ class="op-feature-link op-feature-button"
1209
+ :to="{
1210
+ path: '/profile',
1211
+ query: { locale: selectionStore.localeCode },
1212
+ }"
1213
+ >
1214
+ {{ common.navigation.profile }}
1215
+ </NuxtLink>
1216
+ </div>
1217
+
1218
+ <section
1219
+ v-if="returns.length"
1220
+ class="grid gap-3 pt-5 border-0 border-t border-solid border-basklee-border"
1221
+ data-product-returns
1222
+ >
1223
+ <h2
1224
+ class="m-0 text-xs font-medium uppercase tracking-[0.08em] text-basklee-text"
1225
+ >
1226
+ {{ labels.returns }}
1227
+ </h2>
1228
+ <dl class="m-0 grid gap-2 text-sm">
1229
+ <div
1230
+ v-for="entry in returns"
1231
+ :key="entry.key"
1232
+ class="flex flex-wrap items-baseline justify-between gap-x-4"
1233
+ >
1234
+ <dt class="text-basklee-muted">{{ entry.label }}</dt>
1235
+ <dd class="m-0 text-basklee-text tabular-nums">
1236
+ {{ entry.value }}
1237
+ </dd>
1238
+ </div>
1239
+ </dl>
1240
+ </section>
1241
+
1242
+ <div
1243
+ v-if="manufacturer || seller"
1244
+ class="grid gap-3"
1245
+ >
1246
+ <NuxtLink
1247
+ v-if="manufacturer"
1248
+ :to="manufacturer.to"
1249
+ class="flex min-w-0 items-center gap-3 p-4 border border-solid border-basklee-border text-basklee-text no-underline outline-none transition-colors motion-reduce:transition-none hover:border-basklee-text focus-visible:border-basklee-text"
1250
+ :aria-label="`${labels.manufacturerHint}: ${manufacturer.name}`"
1251
+ data-product-manufacturer
1252
+ >
1253
+ <BaskleeImage
1254
+ v-if="manufacturer.logo"
1255
+ :src="manufacturer.logo"
1256
+ alt=""
1257
+ class="h-10 w-16 shrink-0 bg-basklee-surface object-contain"
1258
+ data-product-manufacturer-logo
1259
+ />
1260
+ <BaskleeAvatar
1261
+ v-else
1262
+ :name="manufacturer.name"
1263
+ />
1264
+ <span class="grid min-w-0 flex-1 gap-0.5">
1265
+ <span
1266
+ class="text-[11px] leading-4 uppercase tracking-[0.08em] text-basklee-muted"
1267
+ >
1268
+ {{ labels.manufacturer }}
1269
+ </span>
1270
+ <span class="min-w-0 truncate text-sm">
1271
+ {{ manufacturer.name }}
1272
+ </span>
1273
+ </span>
1274
+ <svg
1275
+ viewBox="0 0 24 24"
1276
+ class="h-4 w-4 shrink-0"
1277
+ fill="none"
1278
+ stroke="currentColor"
1279
+ stroke-width="1.5"
1280
+ aria-hidden="true"
1281
+ >
1282
+ <path d="m9 5 7 7-7 7" />
1283
+ </svg>
1284
+ </NuxtLink>
1285
+
1286
+ <a
1287
+ v-if="seller"
1288
+ :href="sellerHref"
1289
+ class="flex min-w-0 items-center gap-3 p-4 border border-solid border-basklee-border text-basklee-text no-underline outline-none transition-colors motion-reduce:transition-none hover:border-basklee-text focus-visible:border-basklee-text"
1290
+ :aria-label="`${labels.sellerHint}: ${seller.name}`"
1291
+ data-product-seller-link
1292
+ @click.prevent="openSeller"
1293
+ >
1294
+ <BaskleeAvatar
1295
+ :src="seller.avatar"
1296
+ :name="seller.name"
1297
+ />
1298
+ <span class="grid min-w-0 flex-1 gap-0.5">
1299
+ <span
1300
+ class="text-[11px] leading-4 uppercase tracking-[0.08em] text-basklee-muted"
1301
+ >
1302
+ {{ labels.seller }}
1303
+ </span>
1304
+ <span class="flex min-w-0 items-center gap-2 text-sm">
1305
+ <span class="min-w-0 truncate">{{ seller.name }}</span>
1306
+ <span
1307
+ v-if="sellerRating > 0"
1308
+ class="shrink-0 text-xs text-basklee-muted tabular-nums"
1309
+ >
1310
+ ★ {{ seller.raiting }}
1311
+ </span>
1312
+ </span>
1313
+ </span>
1314
+ <svg
1315
+ viewBox="0 0 24 24"
1316
+ class="h-4 w-4 shrink-0"
1317
+ fill="none"
1318
+ stroke="currentColor"
1319
+ stroke-width="1.5"
1320
+ aria-hidden="true"
1321
+ >
1322
+ <path d="m9 5 7 7-7 7" />
1323
+ </svg>
1324
+ </a>
1325
+ </div>
1326
+ </div>
1327
+ </div>
1328
+ <div
1329
+ id="product-reviews"
1330
+ class="mt-14 scroll-mt-6 pt-10 border-0 border-t border-solid border-basklee-border @min-[592px]/product:mt-20"
1331
+ >
1332
+ <ProductReviews
1333
+ :key="currentId"
1334
+ :product-id="currentId"
1335
+ />
1336
+ </div>
1337
+ <ProductPreorderDialog
1338
+ :product-id="actions.preorder.value"
1339
+ :pending="actions.pending.value"
1340
+ :error="actions.error.value ? actionMessage : ''"
1341
+ :field-errors="actions.error.value?.fields"
1342
+ :suggest-sign-in="Boolean(actions.error.value?.signIn)"
1343
+ @submit="actions.submitPreorder($event.email, $event.phone)"
1344
+ @close="actions.preorder.value = undefined"
1345
+ />
1346
+ <ProductSpecificationsDialog
1347
+ v-if="specificationsOpen"
1348
+ :groups="specifications"
1349
+ @close="specificationsOpen = false"
1350
+ />
1351
+ <ProductReviewImageViewer
1352
+ v-if="viewerOpen && photos.length"
1353
+ :images="viewerPhotos"
1354
+ :index="image"
1355
+ :label="labels.productPhotos"
1356
+ :alt="title"
1357
+ @change="image = $event.index"
1358
+ @close="viewerOpen = false"
1359
+ />
1360
+ </template>
1361
+ <div
1362
+ v-else-if="showSkeleton"
1363
+ class="grid items-start gap-8 animate-pulse motion-reduce:animate-none @min-[960px]/product:grid-cols-[minmax(0,7fr)_minmax(0,5fr)] @min-[960px]/product:items-stretch @min-[960px]/product:gap-x-12 @min-[1200px]/product:gap-x-20"
1364
+ aria-hidden="true"
1365
+ data-product-skeleton
1366
+ >
1367
+ <div
1368
+ class="grid min-w-0 gap-3 @min-[560px]/product:grid-cols-[72px_minmax(0,1fr)] @min-[560px]/product:gap-4 @min-[960px]/product:col-start-1 @min-[960px]/product:row-start-1"
1369
+ >
1370
+ <div
1371
+ class="box-border aspect-square max-h-[70vh] w-full border border-solid border-basklee-border @min-[560px]/product:col-start-2 @min-[560px]/product:row-start-1 @min-[560px]/product:aspect-[4/5] @min-[960px]/product:aspect-auto @min-[960px]/product:max-h-none @min-[960px]/product:min-h-96"
1372
+ />
1373
+ <div
1374
+ class="flex min-w-0 gap-2 overflow-hidden @min-[560px]/product:col-start-1 @min-[560px]/product:row-start-1 @min-[560px]/product:flex-col"
1375
+ >
1376
+ <span
1377
+ v-for="index in 4"
1378
+ :key="index"
1379
+ class="box-border h-[70px] w-14 shrink-0 border border-solid border-basklee-border @min-[560px]/product:h-[90px] @min-[560px]/product:w-[72px]"
1380
+ />
1381
+ </div>
1382
+ </div>
1383
+ <div
1384
+ class="grid min-w-0 content-start gap-6 @min-[960px]/product:col-start-2 @min-[960px]/product:row-start-1"
1385
+ >
1386
+ <div class="grid gap-3">
1387
+ <span class="h-7 w-4/5 bg-basklee-border" />
1388
+ <span class="h-7 w-1/2 bg-basklee-border" />
1389
+ </div>
1390
+ <span class="h-6 w-28 bg-basklee-border" />
1391
+ <div class="grid gap-3">
1392
+ <span class="h-3 w-32 bg-basklee-border" />
1393
+ <span class="h-3 w-full bg-basklee-border" />
1394
+ <span class="h-3 w-full bg-basklee-border" />
1395
+ <span class="h-3 w-2/3 bg-basklee-border" />
1396
+ </div>
1397
+ <div class="grid">
1398
+ <span class="mb-2 h-3 w-36 bg-basklee-border" />
1399
+ <span
1400
+ v-for="index in 3"
1401
+ :key="index"
1402
+ class="box-border h-10 w-full border-0 border-b border-solid border-basklee-border"
1403
+ />
1404
+ </div>
1405
+ <div class="grid gap-3">
1406
+ <span class="h-3 w-36 bg-basklee-border" />
1407
+ <div class="flex gap-2">
1408
+ <span class="h-6 w-6 rounded-full bg-basklee-border" />
1409
+ <span class="h-6 w-6 rounded-full bg-basklee-border" />
1410
+ </div>
1411
+ </div>
1412
+ <span class="h-11 w-full bg-basklee-border" />
1413
+ <div class="grid gap-3">
1414
+ <span
1415
+ v-for="index in 2"
1416
+ :key="index"
1417
+ class="box-border h-[74px] w-full border border-solid border-basklee-border"
1418
+ />
1419
+ </div>
1420
+ </div>
1421
+ </div>
1422
+ <BaskleeEmptyState
1423
+ v-else-if="!task.state.pending && !task.state.error"
1424
+ kind="search"
1425
+ :message="labels.notFound"
1426
+ />
1427
+ </section>
1428
+ </template>
1429
+
1430
+ <style scoped>
1431
+ /* The arrow buttons replace the native scrollbar of the thumbnail rail. */
1432
+ .product-thumbnails {
1433
+ scrollbar-width: none;
1434
+ }
1435
+ .product-thumbnails::-webkit-scrollbar {
1436
+ display: none;
1437
+ }
1438
+ .product-description {
1439
+ line-height: 1.7;
1440
+ overflow-wrap: anywhere;
1441
+ }
1442
+ .product-description :deep(p) {
1443
+ margin: 0.75rem 0;
1444
+ }
1445
+ .product-description :deep(p:first-child) {
1446
+ margin-top: 0;
1447
+ }
1448
+ .product-description :deep(img) {
1449
+ max-width: 100%;
1450
+ height: auto;
1451
+ }
1452
+ .product-description-short {
1453
+ max-height: 10rem;
1454
+ overflow: hidden;
1455
+ }
1456
+ .product-description-fade {
1457
+ mask-image: linear-gradient(to bottom, currentColor 65%, transparent);
1458
+ }
1459
+ /* The reserved height keeps the purchase controls in place; the rows that
1460
+ do not fit are read in the characteristics dialog. */
1461
+ .product-specifications {
1462
+ max-height: 14rem;
1463
+ overflow: hidden;
1464
+ }
1465
+ .product-specifications-fade {
1466
+ mask-image: linear-gradient(to bottom, currentColor 80%, transparent);
1467
+ }
1468
+ </style>