orionplace-nuxt 0.1.2 → 0.2.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/README.md +711 -24
- package/bin/orionplace-nuxt.mjs +39 -11
- package/package.json +26 -6
- package/runtime/api.mjs +4 -1
- package/runtime/domain.mjs +4 -2
- package/runtime/marketplace.mjs +287 -211
- package/src/asset-loading-plugin.mjs +10 -0
- package/src/module.mjs +44 -14
- package/src/project-readme.mjs +507 -35
- package/src/setup.mjs +100 -51
- package/src/update.mjs +36 -0
- package/src/validation.mjs +6 -0
- package/templates/.vscode/settings.json +5 -0
- package/templates/app/app.vue +48 -0
- package/templates/app/assets/css/orionplace-tokens.css +21 -0
- package/templates/app/assets/css/orionplace.css +28 -0
- package/templates/app/components/orionplace/account/AccountActivity.README.md +31 -0
- package/templates/app/components/orionplace/account/AccountActivity.vue +61 -0
- package/templates/app/components/orionplace/account/AccountPromocodes.README.md +50 -0
- package/templates/app/components/orionplace/account/AccountPromocodes.vue +267 -0
- package/templates/app/components/orionplace/account/AccountSection.README.md +31 -0
- package/templates/app/components/orionplace/account/AccountSection.vue +132 -0
- package/templates/app/components/orionplace/account/ProfileAvatar.vue +139 -0
- package/templates/app/components/orionplace/account/ProfileDeleteAccount.vue +161 -0
- package/templates/app/components/orionplace/account/ProfileDetailsForm.vue +172 -0
- package/templates/app/components/orionplace/account/ProfileEmailSettings.vue +269 -0
- package/templates/app/components/orionplace/account/ProfilePasswordForm.vue +201 -0
- package/templates/app/components/orionplace/account/ProfileSignIn.vue +446 -0
- package/templates/app/components/orionplace/account/SignInHistory.README.md +27 -0
- package/templates/app/components/orionplace/account/SignInHistory.vue +218 -0
- package/templates/app/components/orionplace/account/StorefrontLogout.README.md +15 -0
- package/templates/app/components/orionplace/account/StorefrontLogout.vue +109 -0
- package/templates/app/components/orionplace/account/StorefrontProfile.README.md +145 -0
- package/templates/app/components/orionplace/account/StorefrontProfile.vue +168 -0
- package/templates/app/components/orionplace/account/account.css +1047 -0
- package/templates/app/components/orionplace/account/profile.css +696 -0
- package/templates/app/components/orionplace/address/AddressForm.README.md +67 -0
- package/templates/app/components/orionplace/address/AddressForm.vue +537 -0
- package/templates/app/components/orionplace/address/StorefrontAddresses.README.md +44 -0
- package/templates/app/components/orionplace/address/StorefrontAddresses.vue +438 -0
- package/templates/app/components/orionplace/banners/MainBanner.vue +171 -0
- package/templates/app/components/orionplace/banners/examples/BannerExample.vue +6 -0
- package/templates/app/components/orionplace/blog/BlogArticle.README.md +44 -0
- package/templates/app/components/orionplace/blog/BlogArticle.vue +829 -0
- package/templates/app/components/orionplace/blog/BlogCommentForm.README.md +28 -0
- package/templates/app/components/orionplace/blog/BlogCommentForm.vue +129 -0
- package/templates/app/components/orionplace/blog/BlogComments.README.md +36 -0
- package/templates/app/components/orionplace/blog/BlogComments.vue +373 -0
- package/templates/app/components/orionplace/blog/BlogPostCard.vue +307 -0
- package/templates/app/components/orionplace/blog/BlogPostGroup.vue +108 -0
- package/templates/app/components/orionplace/blog/StorefrontJournal.README.md +42 -0
- package/templates/app/components/orionplace/blog/StorefrontJournal.vue +669 -0
- package/templates/app/components/orionplace/branding/BrandLogos.vue +25 -0
- package/templates/app/components/orionplace/branding/examples/BrandLogosExample.vue +6 -0
- package/templates/app/components/orionplace/cart/CartCheckoutDetails.README.md +81 -0
- package/templates/app/components/orionplace/cart/CartCheckoutDetails.vue +367 -0
- package/templates/app/components/orionplace/cart/CartDeliverySelector.README.md +95 -0
- package/templates/app/components/orionplace/cart/CartDeliverySelector.vue +724 -0
- package/templates/app/components/orionplace/cart/CartItemOptions.README.md +98 -0
- package/templates/app/components/orionplace/cart/CartItemOptions.vue +693 -0
- package/templates/app/components/orionplace/cart/CartLineItem.README.md +70 -0
- package/templates/app/components/orionplace/cart/CartLineItem.vue +271 -0
- package/templates/app/components/orionplace/cart/CartPreview.README.md +43 -0
- package/templates/app/components/orionplace/cart/CartPreview.vue +263 -0
- package/templates/app/components/orionplace/cart/DeliveryMap.README.md +48 -0
- package/templates/app/components/orionplace/cart/DeliveryMap.vue +155 -0
- package/templates/app/components/orionplace/cart/StorefrontCart.README.md +89 -0
- package/templates/app/components/orionplace/cart/StorefrontCart.vue +689 -0
- package/templates/app/components/orionplace/catalog/CatalogHeader.vue +681 -0
- package/templates/app/components/orionplace/catalog/CatalogRepresentative.vue +59 -0
- package/templates/app/components/orionplace/catalog/StorefrontCatalog.README.md +35 -0
- package/templates/app/components/orionplace/catalog/StorefrontCatalog.vue +179 -0
- package/templates/app/components/orionplace/catalog/examples/CatalogHeaderExample.vue +6 -0
- package/templates/app/components/orionplace/categories/CategoryGroup.vue +125 -0
- package/templates/app/components/orionplace/categories/StorefrontCategory.README.md +60 -0
- package/templates/app/components/orionplace/categories/StorefrontCategory.vue +277 -0
- package/templates/app/components/orionplace/categories/examples/CategoryGroupExample.vue +7 -0
- package/templates/app/components/orionplace/contact/AboutPage.README.md +23 -0
- package/templates/app/components/orionplace/contact/AboutPage.vue +409 -0
- package/templates/app/components/orionplace/contact/ContactForm.README.md +29 -0
- package/templates/app/components/orionplace/contact/ContactForm.vue +289 -0
- package/templates/app/components/orionplace/contact/EmailUnsubscribe.README.md +27 -0
- package/templates/app/components/orionplace/contact/EmailUnsubscribe.vue +95 -0
- package/templates/app/components/orionplace/contact/StorefrontContact.README.md +18 -0
- package/templates/app/components/orionplace/contact/StorefrontContact.vue +89 -0
- package/templates/app/components/orionplace/contact/examples/ContactExample.vue +6 -0
- package/templates/app/components/orionplace/currencies/MainCurrencySwitcher.vue +80 -0
- package/templates/app/components/orionplace/currencies/examples/CurrencyExample.vue +6 -0
- package/templates/app/components/orionplace/events/EventEnrollmentDialog.README.md +58 -0
- package/templates/app/components/orionplace/events/EventEnrollmentDialog.vue +294 -0
- package/templates/app/components/orionplace/events/EventsBlock.vue +138 -0
- package/templates/app/components/orionplace/events/examples/EventsExample.vue +6 -0
- package/templates/app/components/orionplace/locale/MainLanguageSwitcher.vue +506 -0
- package/templates/app/components/orionplace/locale/examples/LocaleExample.vue +6 -0
- package/templates/app/components/orionplace/manufacturers/ManufacturerIndex.README.md +36 -0
- package/templates/app/components/orionplace/manufacturers/ManufacturerIndex.vue +495 -0
- package/templates/app/components/orionplace/manufacturers/StorefrontManufacturers.README.md +30 -0
- package/templates/app/components/orionplace/manufacturers/StorefrontManufacturers.vue +263 -0
- package/templates/app/components/orionplace/orders/OrderDetails.README.md +39 -0
- package/templates/app/components/orionplace/orders/OrderDetails.vue +1074 -0
- package/templates/app/components/orionplace/orders/OrderPaymentForm.README.md +59 -0
- package/templates/app/components/orionplace/orders/OrderPaymentForm.vue +73 -0
- package/templates/app/components/orionplace/orders/StorefrontOrders.README.md +39 -0
- package/templates/app/components/orionplace/orders/StorefrontOrders.vue +869 -0
- package/templates/app/components/orionplace/orders/orders.css +612 -0
- package/templates/app/components/orionplace/payments/PaymentPanel.README.md +76 -0
- package/templates/app/components/orionplace/payments/PaymentPanel.vue +108 -0
- package/templates/app/components/orionplace/products/HoverImageViewer.vue +190 -0
- package/templates/app/components/orionplace/products/ProductCard.README.md +63 -0
- package/templates/app/components/orionplace/products/ProductCard.vue +897 -0
- package/templates/app/components/orionplace/products/ProductCardActions.README.md +33 -0
- package/templates/app/components/orionplace/products/ProductCardActions.vue +412 -0
- package/templates/app/components/orionplace/products/ProductCardBadges.vue +83 -0
- package/templates/app/components/orionplace/products/ProductCardDescription.vue +46 -0
- package/templates/app/components/orionplace/products/ProductCardFavorite.vue +99 -0
- package/templates/app/components/orionplace/products/ProductCardPrice.vue +66 -0
- package/templates/app/components/orionplace/products/ProductCardRating.vue +65 -0
- package/templates/app/components/orionplace/products/ProductCardSeller.vue +66 -0
- package/templates/app/components/orionplace/products/ProductCardStockNotice.vue +43 -0
- package/templates/app/components/orionplace/products/ProductCardTitle.vue +46 -0
- package/templates/app/components/orionplace/products/ProductCardVariants.vue +388 -0
- package/templates/app/components/orionplace/products/ProductGroup.vue +257 -0
- package/templates/app/components/orionplace/products/ProductPreorderDialog.README.md +22 -0
- package/templates/app/components/orionplace/products/ProductPreorderDialog.vue +471 -0
- package/templates/app/components/orionplace/products/ProductReviewForm.README.md +39 -0
- package/templates/app/components/orionplace/products/ProductReviewForm.vue +312 -0
- package/templates/app/components/orionplace/products/ProductReviewGallery.README.md +28 -0
- package/templates/app/components/orionplace/products/ProductReviewGallery.vue +141 -0
- package/templates/app/components/orionplace/products/ProductReviewImageViewer.README.md +51 -0
- package/templates/app/components/orionplace/products/ProductReviewImageViewer.vue +351 -0
- package/templates/app/components/orionplace/products/ProductReviews.README.md +70 -0
- package/templates/app/components/orionplace/products/ProductReviews.vue +1025 -0
- package/templates/app/components/orionplace/products/ProductSecondaryVariantModal.vue +460 -0
- package/templates/app/components/orionplace/products/ProductSpecificationsDialog.README.md +65 -0
- package/templates/app/components/orionplace/products/ProductSpecificationsDialog.vue +174 -0
- package/templates/app/components/orionplace/products/StorefrontProduct.README.md +52 -0
- package/templates/app/components/orionplace/products/StorefrontProduct.vue +1466 -0
- package/templates/app/components/orionplace/products/StorefrontWishlist.README.md +33 -0
- package/templates/app/components/orionplace/products/StorefrontWishlist.vue +290 -0
- package/templates/app/components/orionplace/products/examples/FeaturedExample.vue +6 -0
- package/templates/app/components/orionplace/products/examples/FeaturedHoverImageViewerExample.vue +14 -0
- package/templates/app/components/orionplace/products/examples/FeaturedProductCardActionsExample.vue +14 -0
- package/templates/app/components/orionplace/products/examples/FeaturedProductCardBadgesExample.vue +14 -0
- package/templates/app/components/orionplace/products/examples/FeaturedProductCardDescriptionExample.vue +14 -0
- package/templates/app/components/orionplace/products/examples/FeaturedProductCardExample.vue +14 -0
- package/templates/app/components/orionplace/products/examples/FeaturedProductCardFavoriteExample.vue +14 -0
- package/templates/app/components/orionplace/products/examples/FeaturedProductCardPriceExample.vue +14 -0
- package/templates/app/components/orionplace/products/examples/FeaturedProductCardRatingExample.vue +14 -0
- package/templates/app/components/orionplace/products/examples/FeaturedProductCardSellerExample.vue +14 -0
- package/templates/app/components/orionplace/products/examples/FeaturedProductCardStockNoticeExample.vue +14 -0
- package/templates/app/components/orionplace/products/examples/FeaturedProductCardTitleExample.vue +14 -0
- package/templates/app/components/orionplace/products/examples/FeaturedProductCardVariantsExample.vue +14 -0
- package/templates/app/components/orionplace/products/examples/ProductsExample.vue +6 -0
- package/templates/app/components/orionplace/products/examples/ProductsHoverImageViewerExample.vue +13 -0
- package/templates/app/components/orionplace/products/examples/ProductsProductCardActionsExample.vue +13 -0
- package/templates/app/components/orionplace/products/examples/ProductsProductCardBadgesExample.vue +13 -0
- package/templates/app/components/orionplace/products/examples/ProductsProductCardDescriptionExample.vue +13 -0
- package/templates/app/components/orionplace/products/examples/ProductsProductCardExample.vue +13 -0
- package/templates/app/components/orionplace/products/examples/ProductsProductCardFavoriteExample.vue +13 -0
- package/templates/app/components/orionplace/products/examples/ProductsProductCardPriceExample.vue +13 -0
- package/templates/app/components/orionplace/products/examples/ProductsProductCardRatingExample.vue +13 -0
- package/templates/app/components/orionplace/products/examples/ProductsProductCardSellerExample.vue +13 -0
- package/templates/app/components/orionplace/products/examples/ProductsProductCardStockNoticeExample.vue +13 -0
- package/templates/app/components/orionplace/products/examples/ProductsProductCardTitleExample.vue +13 -0
- package/templates/app/components/orionplace/products/examples/ProductsProductCardVariantsExample.vue +13 -0
- package/templates/app/components/orionplace/promo/PromoProducts.README.md +45 -0
- package/templates/app/components/orionplace/promo/PromoProducts.vue +287 -0
- package/templates/app/components/orionplace/search/MainSearch.vue +342 -0
- package/templates/app/components/orionplace/search/ProductSearchResults.README.md +81 -0
- package/templates/app/components/orionplace/search/ProductSearchResults.vue +458 -0
- package/templates/app/components/orionplace/search/SearchFilters.vue +546 -0
- package/templates/app/components/orionplace/search/examples/MainSearchExample.vue +6 -0
- package/templates/app/components/orionplace/sellers/SellerFilters.README.md +32 -0
- package/templates/app/components/orionplace/sellers/SellerFilters.vue +317 -0
- package/templates/app/components/orionplace/sellers/SellerPhotoGallery.README.md +45 -0
- package/templates/app/components/orionplace/sellers/SellerPhotoGallery.vue +406 -0
- package/templates/app/components/orionplace/sellers/SellerSummary.README.md +33 -0
- package/templates/app/components/orionplace/sellers/SellerSummary.vue +162 -0
- package/templates/app/components/orionplace/sellers/StorefrontSellers.README.md +73 -0
- package/templates/app/components/orionplace/sellers/StorefrontSellers.vue +300 -0
- package/templates/app/components/orionplace/shared/OrionplaceAvatar.README.md +30 -0
- package/templates/app/components/orionplace/shared/OrionplaceAvatar.vue +83 -0
- package/templates/app/components/orionplace/shared/OrionplaceBreadcrumbs.README.md +65 -0
- package/templates/app/components/orionplace/shared/OrionplaceBreadcrumbs.vue +118 -0
- package/templates/app/components/orionplace/shared/OrionplaceEmptyState.README.md +38 -0
- package/templates/app/components/orionplace/shared/OrionplaceEmptyState.vue +143 -0
- package/templates/app/components/orionplace/shared/OrionplaceImage.vue +84 -0
- package/templates/app/components/orionplace/shared/OrionplaceInfoHint.README.md +32 -0
- package/templates/app/components/orionplace/shared/OrionplaceInfoHint.vue +158 -0
- package/templates/app/components/orionplace/shared/OrionplacePasswordInput.README.md +30 -0
- package/templates/app/components/orionplace/shared/OrionplacePasswordInput.vue +197 -0
- package/templates/app/components/orionplace/shared/OrionplaceSearchSelect.README.md +38 -0
- package/templates/app/components/orionplace/shared/OrionplaceSearchSelect.vue +411 -0
- package/templates/app/components/orionplace/shared/OrionplaceSelect.README.md +31 -0
- package/templates/app/components/orionplace/shared/OrionplaceSelect.vue +525 -0
- package/templates/app/components/orionplace/shared/StorefrontErrorPage.README.md +55 -0
- package/templates/app/components/orionplace/shared/StorefrontErrorPage.vue +151 -0
- package/templates/app/components/orionplace/shared/StorefrontPagination.README.md +45 -0
- package/templates/app/components/orionplace/shared/StorefrontPagination.vue +101 -0
- package/templates/app/components/orionplace/shared/dialogs.css +36 -0
- package/templates/app/components/orionplace/shared/features.css +364 -0
- package/templates/app/components/orionplace/social/SocialLinks.vue +72 -0
- package/templates/app/components/orionplace/social/examples/SocialLinksExample.vue +6 -0
- package/templates/app/components/orionplace/storefront/StorefrontAccount.README.md +47 -0
- package/templates/app/components/orionplace/storefront/StorefrontAccount.vue +332 -0
- package/templates/app/components/orionplace/storefront/StorefrontCartButton.vue +68 -0
- package/templates/app/components/orionplace/storefront/StorefrontFooter.README.md +26 -0
- package/templates/app/components/orionplace/storefront/StorefrontFooter.vue +222 -0
- package/templates/app/components/orionplace/storefront/StorefrontHeader.README.md +93 -0
- package/templates/app/components/orionplace/storefront/StorefrontHeader.vue +509 -0
- package/templates/app/components/orionplace/storefront/StorefrontHome.README.md +79 -0
- package/templates/app/components/orionplace/storefront/StorefrontHome.vue +315 -0
- package/templates/app/components/orionplace/storefront/StorefrontWishlistButton.vue +105 -0
- package/templates/app/components/orionplace/storefront/examples/StorefrontAccountExample.vue +7 -0
- package/templates/app/components/orionplace/stores/StorefrontStores.README.md +41 -0
- package/templates/app/components/orionplace/stores/StorefrontStores.vue +345 -0
- package/templates/app/components/orionplace/subscriptions/StorefrontSubscriptions.README.md +151 -0
- package/templates/app/components/orionplace/subscriptions/StorefrontSubscriptions.vue +851 -0
- package/templates/app/components/orionplace/subscriptions/StorefrontTariff.README.md +38 -0
- package/templates/app/components/orionplace/subscriptions/StorefrontTariff.vue +535 -0
- package/templates/app/components/orionplace/subscriptions/StorefrontTariffs.README.md +36 -0
- package/templates/app/components/orionplace/subscriptions/StorefrontTariffs.vue +395 -0
- package/templates/app/components/orionplace/subscriptions/SubscriptionCancelDialog.README.md +39 -0
- package/templates/app/components/orionplace/subscriptions/SubscriptionCancelDialog.vue +292 -0
- package/templates/app/components/orionplace/subscriptions/SubscriptionChangeDialog.README.md +85 -0
- package/templates/app/components/orionplace/subscriptions/SubscriptionChangeDialog.vue +874 -0
- package/templates/app/components/orionplace/subscriptions/SubscriptionExtendDialog.README.md +53 -0
- package/templates/app/components/orionplace/subscriptions/SubscriptionExtendDialog.vue +536 -0
- package/templates/app/components/orionplace/subscriptions/SubscriptionPlanSummary.README.md +101 -0
- package/templates/app/components/orionplace/subscriptions/SubscriptionPlanSummary.vue +286 -0
- package/templates/app/components/orionplace/subscriptions/SubscriptionRemoteDetails.README.md +138 -0
- package/templates/app/components/orionplace/subscriptions/SubscriptionRemoteDetails.vue +134 -0
- package/templates/app/components/orionplace/subscriptions/SubscriptionRenewalDialog.README.md +85 -0
- package/templates/app/components/orionplace/subscriptions/SubscriptionRenewalDialog.vue +364 -0
- package/templates/app/components/orionplace/support/StorefrontSupport.README.md +39 -0
- package/templates/app/components/orionplace/support/StorefrontSupport.vue +484 -0
- package/templates/app/components/orionplace/support/TicketConversation.README.md +38 -0
- package/templates/app/components/orionplace/support/TicketConversation.vue +524 -0
- package/templates/app/components/orionplace/support/TicketImage.README.md +27 -0
- package/templates/app/components/orionplace/support/TicketImage.vue +186 -0
- package/templates/app/components/orionplace/support/TicketItemCard.README.md +59 -0
- package/templates/app/components/orionplace/support/TicketItemCard.vue +177 -0
- package/templates/app/components/orionplace/support/TicketMessageForm.README.md +35 -0
- package/templates/app/components/orionplace/support/TicketMessageForm.vue +258 -0
- package/templates/app/components/orionplace/support/TicketSubscriptionCard.README.md +40 -0
- package/templates/app/components/orionplace/support/TicketSubscriptionCard.vue +154 -0
- package/templates/app/components/orionplace/tariffs/TariffCard.README.md +12 -0
- package/templates/app/components/orionplace/tariffs/TariffCard.vue +241 -0
- package/templates/app/components/orionplace/tariffs/TariffCardDescription.README.md +12 -0
- package/templates/app/components/orionplace/tariffs/TariffCardDescription.vue +97 -0
- package/templates/app/components/orionplace/tariffs/TariffCardFeatures.README.md +14 -0
- package/templates/app/components/orionplace/tariffs/TariffCardFeatures.vue +172 -0
- package/templates/app/components/orionplace/tariffs/TariffCardImage.README.md +12 -0
- package/templates/app/components/orionplace/tariffs/TariffCardImage.vue +33 -0
- package/templates/app/components/orionplace/tariffs/TariffCardPrices.README.md +12 -0
- package/templates/app/components/orionplace/tariffs/TariffCardPrices.vue +280 -0
- package/templates/app/components/orionplace/tariffs/TariffCardTitle.README.md +12 -0
- package/templates/app/components/orionplace/tariffs/TariffCardTitle.vue +30 -0
- package/templates/app/components/orionplace/tariffs/TariffCards.README.md +12 -0
- package/templates/app/components/orionplace/tariffs/TariffCards.vue +94 -0
- package/templates/app/components/orionplace/tariffs/TariffSubscriptionModal.README.md +31 -0
- package/templates/app/components/orionplace/tariffs/TariffSubscriptionModal.vue +411 -0
- package/templates/app/components/orionplace/tariffs/examples/TariffCardDescriptionExample.vue +13 -0
- package/templates/app/components/orionplace/tariffs/examples/TariffCardExample.vue +13 -0
- package/templates/app/components/orionplace/tariffs/examples/TariffCardFeaturesExample.vue +14 -0
- package/templates/app/components/orionplace/tariffs/examples/TariffCardImageExample.vue +13 -0
- package/templates/app/components/orionplace/tariffs/examples/TariffCardPricesExample.vue +13 -0
- package/templates/app/components/orionplace/tariffs/examples/TariffCardTitleExample.vue +13 -0
- package/templates/app/components/orionplace/tariffs/examples/TariffCardsExample.vue +6 -0
- package/templates/app/components/orionplace/theme/OrionplaceThemeProvider.vue +38 -0
- package/templates/app/components/orionplace/units/UnitSwitcher.vue +71 -0
- package/templates/app/components/orionplace/units/examples/LengthExample.vue +6 -0
- package/templates/app/components/orionplace/units/examples/WeightExample.vue +6 -0
- package/templates/app/components/orionplace/wallet/StorefrontWallet.README.md +117 -0
- package/templates/app/components/orionplace/wallet/StorefrontWallet.vue +863 -0
- package/templates/app/components/orionplace/wallet/WalletBalance.vue +47 -0
- package/templates/app/components/orionplace/wallet/WalletTopUpForm.README.md +32 -0
- package/templates/app/components/orionplace/wallet/WalletTopUpForm.vue +224 -0
- package/templates/app/components/orionplace/wallet/examples/WalletExample.vue +6 -0
- package/templates/app/composables/useOrionplaceActionMenu.ts +126 -0
- package/templates/app/composables/useOrionplaceAddressEditor.ts +343 -0
- package/templates/app/composables/useOrionplaceAddresses.ts +75 -0
- package/templates/app/composables/useOrionplaceApi.ts +174 -0
- package/templates/app/composables/useOrionplaceAppLoad.ts +74 -0
- package/templates/app/composables/useOrionplaceBlogComments.ts +325 -0
- package/templates/app/composables/useOrionplaceBlogReading.ts +270 -0
- package/templates/app/composables/useOrionplaceCart.ts +226 -0
- package/templates/app/composables/useOrionplaceCartPreview.ts +142 -0
- package/templates/app/composables/useOrionplaceCategoryLink.ts +24 -0
- package/templates/app/composables/useOrionplaceCategoryProducts.ts +16 -0
- package/templates/app/composables/useOrionplaceFeature.ts +100 -0
- package/templates/app/composables/useOrionplaceFeaturedProducts.ts +14 -0
- package/templates/app/composables/useOrionplaceGeolocation.ts +28 -0
- package/templates/app/composables/useOrionplaceHomeProducts.ts +90 -0
- package/templates/app/composables/useOrionplaceManufacturerIndex.ts +83 -0
- package/templates/app/composables/useOrionplaceMap.ts +240 -0
- package/templates/app/composables/useOrionplaceMediaFormat.ts +24 -0
- package/templates/app/composables/useOrionplaceMissingPage.ts +67 -0
- package/templates/app/composables/useOrionplaceOrders.ts +185 -0
- package/templates/app/composables/useOrionplacePageSeo.ts +38 -0
- package/templates/app/composables/useOrionplaceProductActions.ts +116 -0
- package/templates/app/composables/useOrionplaceProductLink.ts +24 -0
- package/templates/app/composables/useOrionplaceProductSearch.ts +259 -0
- package/templates/app/composables/useOrionplaceProductVariants.ts +176 -0
- package/templates/app/composables/useOrionplaceProfile.ts +309 -0
- package/templates/app/composables/useOrionplaceProgress.ts +89 -0
- package/templates/app/composables/useOrionplaceReviews.ts +242 -0
- package/templates/app/composables/useOrionplaceSearchHistory.ts +23 -0
- package/templates/app/composables/useOrionplaceSearchScopeNames.ts +99 -0
- package/templates/app/composables/useOrionplaceServerData.ts +72 -0
- package/templates/app/composables/useOrionplaceSignIn.ts +66 -0
- package/templates/app/composables/useOrionplaceStableHeight.ts +69 -0
- package/templates/app/composables/useOrionplaceStorefront.ts +29 -0
- package/templates/app/composables/useOrionplaceSubscriptions.ts +217 -0
- package/templates/app/composables/useOrionplaceTheme.ts +27 -0
- package/templates/app/composables/useOrionplaceTicketSubject.ts +180 -0
- package/templates/app/composables/useOrionplaceTickets.ts +335 -0
- package/templates/app/composables/useOrionplaceWallet.ts +166 -0
- package/templates/app/error.vue +108 -0
- package/templates/app/interfaces/orionplace/accounts/IContact.ts +21 -0
- package/templates/app/interfaces/orionplace/accounts/IEmailNotificationLocale.ts +17 -0
- package/templates/app/interfaces/orionplace/accounts/IEmailVerification.ts +59 -0
- package/templates/app/interfaces/orionplace/accounts/IProfileActions.ts +38 -0
- package/templates/app/interfaces/orionplace/accounts/IProfileData.ts +123 -0
- package/templates/app/interfaces/orionplace/accounts/IProfileMedia.ts +17 -0
- package/templates/app/interfaces/orionplace/accounts/IStorefrontProfile.ts +54 -0
- package/templates/app/interfaces/orionplace/address/IAddressCitySuggestion.ts +19 -0
- package/templates/app/interfaces/orionplace/address/IAddressEditor.ts +9 -0
- package/templates/app/interfaces/orionplace/address/IAddressLocationSuggestion.ts +22 -0
- package/templates/app/interfaces/orionplace/address/IAddressRegionSearch.ts +30 -0
- package/templates/app/interfaces/orionplace/address/IAddressSuggestion.ts +20 -0
- package/templates/app/interfaces/orionplace/address/IUserAddress.ts +87 -0
- package/templates/app/interfaces/orionplace/apiBase/TMethod.ts +1 -0
- package/templates/app/interfaces/orionplace/appBase/IAppLoad.ts +16 -0
- package/templates/app/interfaces/orionplace/appBase/IAppLoadCommon.ts +45 -0
- package/templates/app/interfaces/orionplace/appBase/IApploadUserProfile.ts +13 -0
- package/templates/app/interfaces/orionplace/appBase/IForm.ts +21 -0
- package/templates/app/interfaces/orionplace/appBase/ISEO.ts +21 -0
- package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonBanner.ts +11 -0
- package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonContact.ts +8 -0
- package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonCurrency.ts +15 -0
- package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonEvents.ts +18 -0
- package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonLocale.ts +14 -0
- package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonLogos.ts +6 -0
- package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonPath.ts +22 -0
- package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonSEO.ts +26 -0
- package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonSocial.ts +15 -0
- package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonTariff.ts +7 -0
- package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonUnit.ts +12 -0
- package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonVariables.ts +8 -0
- package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonVisualSettings.ts +11 -0
- package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonWalletValue.ts +3 -0
- package/templates/app/interfaces/orionplace/blog/IBlogApi.ts +247 -0
- package/templates/app/interfaces/orionplace/blog/IBlogPostPreview.ts +30 -0
- package/templates/app/interfaces/orionplace/cart/ICartActions.ts +67 -0
- package/templates/app/interfaces/orionplace/cart/ICartData.ts +382 -0
- package/templates/app/interfaces/orionplace/cart/ICartDeliveryActions.ts +68 -0
- package/templates/app/interfaces/orionplace/cart/ICartModal.ts +22 -0
- package/templates/app/interfaces/orionplace/cart/IDeliveryMap.ts +29 -0
- package/templates/app/interfaces/orionplace/catalog/ICatalogDirectory.ts +75 -0
- package/templates/app/interfaces/orionplace/category/ICategory.ts +41 -0
- package/templates/app/interfaces/orionplace/domains/IDomain.ts +13 -0
- package/templates/app/interfaces/orionplace/forms/ICustomerSubfilter.ts +19 -0
- package/templates/app/interfaces/orionplace/index.ts +57 -0
- package/templates/app/interfaces/orionplace/marketing/IPromoActions.ts +51 -0
- package/templates/app/interfaces/orionplace/orders/IOrderActions.ts +99 -0
- package/templates/app/interfaces/orionplace/orders/IOrderHistory.ts +259 -0
- package/templates/app/interfaces/orionplace/orders/IProductPreorder.ts +31 -0
- package/templates/app/interfaces/orionplace/payments/IInvoice.ts +147 -0
- package/templates/app/interfaces/orionplace/products/IProduct.ts +262 -0
- package/templates/app/interfaces/orionplace/products/IProductFeedbackApi.ts +218 -0
- package/templates/app/interfaces/orionplace/products/IProductSearchApi.ts +146 -0
- package/templates/app/interfaces/orionplace/products/IProductSearchFacets.ts +35 -0
- package/templates/app/interfaces/orionplace/products/IProductSecondaryVariantRequest.ts +15 -0
- package/templates/app/interfaces/orionplace/products/IProductSpecification.ts +14 -0
- package/templates/app/interfaces/orionplace/products/IWishlist.ts +22 -0
- package/templates/app/interfaces/orionplace/sellers/ISellerDirectory.ts +70 -0
- package/templates/app/interfaces/orionplace/shared/IBreadcrumb.ts +10 -0
- package/templates/app/interfaces/orionplace/shared/IGeoCoordinates.ts +4 -0
- package/templates/app/interfaces/orionplace/shared/IStorefrontControls.ts +13 -0
- package/templates/app/interfaces/orionplace/shared/ITransformValue.ts +3 -0
- package/templates/app/interfaces/orionplace/state.ts +4 -0
- package/templates/app/interfaces/orionplace/stores/IStoreDirectory.ts +63 -0
- package/templates/app/interfaces/orionplace/subscribeOptions/ISubscribeOption.ts +9 -0
- package/templates/app/interfaces/orionplace/subscribeTariff/ISubscribeTariff.ts +56 -0
- package/templates/app/interfaces/orionplace/subscribeTariff/ITariffSelection.ts +11 -0
- package/templates/app/interfaces/orionplace/subscribes/ISubscribe.ts +28 -0
- package/templates/app/interfaces/orionplace/subscribes/ISubscriptionApi.ts +125 -0
- package/templates/app/interfaces/orionplace/tickets/ICustomerTicketApi.ts +223 -0
- package/templates/app/interfaces/orionplace/transport.ts +34 -0
- package/templates/app/layouts/default.vue +376 -0
- package/templates/app/middleware/00.orionplace.global.ts +27 -0
- package/templates/app/middleware/01.orionplace-sellers.global.ts +15 -0
- package/templates/app/middleware/orionplace-account.ts +40 -0
- package/templates/app/pages/activity.vue +19 -0
- package/templates/app/pages/addresses.vue +23 -0
- package/templates/app/pages/browse.vue +246 -0
- package/templates/app/pages/cart.vue +20 -0
- package/templates/app/pages/catalog.vue +17 -0
- package/templates/app/pages/category/[id].vue +142 -0
- package/templates/app/pages/contact.vue +17 -0
- package/templates/app/pages/featured.vue +144 -0
- package/templates/app/pages/index.vue +194 -0
- package/templates/app/pages/journal/[id].vue +128 -0
- package/templates/app/pages/journal/index.vue +67 -0
- package/templates/app/pages/logout.vue +71 -0
- package/templates/app/pages/manufacturers.vue +33 -0
- package/templates/app/pages/orders.vue +40 -0
- package/templates/app/pages/product/[id].vue +126 -0
- package/templates/app/pages/profile.vue +118 -0
- package/templates/app/pages/promo/[id].vue +67 -0
- package/templates/app/pages/promocodes.vue +21 -0
- package/templates/app/pages/sellers.vue +203 -0
- package/templates/app/pages/stores.vue +36 -0
- package/templates/app/pages/subscriptions.vue +21 -0
- package/templates/app/pages/tariffs/[slug]/[id].vue +126 -0
- package/templates/app/pages/tariffs/index.vue +50 -0
- package/templates/app/pages/tickets.vue +56 -0
- package/templates/app/pages/unsubscribe.vue +32 -0
- package/templates/app/pages/wallet.vue +23 -0
- package/templates/app/pages/wishlist.vue +48 -0
- package/templates/app/stores/orionplace.ts +493 -0
- package/templates/app/stores/orionplaceBrowse.ts +79 -0
- package/templates/app/stores/orionplaceCatalog.ts +121 -0
- package/templates/app/stores/orionplaceDomainAccess.ts +55 -0
- package/templates/app/stores/orionplaceProducts.ts +249 -0
- package/templates/app/stores/orionplaceSelections.ts +132 -0
- package/templates/app/themes/orionplace.ts +108 -0
- package/templates/app/utils/orionplace/accountLabels.ts +22 -0
- package/templates/app/utils/orionplace/activityLabels.ts +65 -0
- package/templates/app/utils/orionplace/activityPresentation.ts +16 -0
- package/templates/app/utils/orionplace/addressChanges.ts +26 -0
- package/templates/app/utils/orionplace/addressRegions.ts +17 -0
- package/templates/app/utils/orionplace/api.ts +333 -0
- package/templates/app/utils/orionplace/blogArticleHtml.ts +318 -0
- package/templates/app/utils/orionplace/blogComments.ts +133 -0
- package/templates/app/utils/orionplace/blogLabels.ts +111 -0
- package/templates/app/utils/orionplace/blogLayout.ts +95 -0
- package/templates/app/utils/orionplace/breadcrumbLabels.ts +11 -0
- package/templates/app/utils/orionplace/browseLabels.ts +98 -0
- package/templates/app/utils/orionplace/cartAddress.ts +94 -0
- package/templates/app/utils/orionplace/cartLabels.ts +261 -0
- package/templates/app/utils/orionplace/cartOptions.ts +143 -0
- package/templates/app/utils/orionplace/cartPreview.ts +108 -0
- package/templates/app/utils/orionplace/cartPromo.ts +150 -0
- package/templates/app/utils/orionplace/cartShipment.ts +74 -0
- package/templates/app/utils/orionplace/cartSnapshot.ts +20 -0
- package/templates/app/utils/orionplace/catalog.ts +106 -0
- package/templates/app/utils/orionplace/category.ts +52 -0
- package/templates/app/utils/orionplace/categoryLabels.ts +31 -0
- package/templates/app/utils/orionplace/contactLabels.ts +102 -0
- package/templates/app/utils/orionplace/currency.ts +128 -0
- package/templates/app/utils/orionplace/deliveryMap.ts +89 -0
- package/templates/app/utils/orionplace/directoryLabels.ts +131 -0
- package/templates/app/utils/orionplace/emptyStateArt.ts +231 -0
- package/templates/app/utils/orionplace/errorPageLabels.ts +80 -0
- package/templates/app/utils/orionplace/featureData.ts +25 -0
- package/templates/app/utils/orionplace/featureLabels.ts +271 -0
- package/templates/app/utils/orionplace/featuredLabels.ts +28 -0
- package/templates/app/utils/orionplace/files.ts +71 -0
- package/templates/app/utils/orionplace/footerLabels.ts +35 -0
- package/templates/app/utils/orionplace/guestSession.ts +50 -0
- package/templates/app/utils/orionplace/headerLabels.ts +68 -0
- package/templates/app/utils/orionplace/homeContent.ts +129 -0
- package/templates/app/utils/orionplace/homeLabels.ts +52 -0
- package/templates/app/utils/orionplace/htmlText.ts +59 -0
- package/templates/app/utils/orionplace/links.ts +14 -0
- package/templates/app/utils/orionplace/manufacturerIndex.ts +91 -0
- package/templates/app/utils/orionplace/modalWindow.ts +109 -0
- package/templates/app/utils/orionplace/nativeApp.ts +361 -0
- package/templates/app/utils/orionplace/notice.ts +22 -0
- package/templates/app/utils/orionplace/orderLabels.ts +309 -0
- package/templates/app/utils/orionplace/orderPresentation.ts +586 -0
- package/templates/app/utils/orionplace/pageSeo.ts +274 -0
- package/templates/app/utils/orionplace/paginationScroll.ts +131 -0
- package/templates/app/utils/orionplace/phone.ts +22 -0
- package/templates/app/utils/orionplace/presentation.ts +72 -0
- package/templates/app/utils/orionplace/productActionLabels.ts +60 -0
- package/templates/app/utils/orionplace/productActions.ts +547 -0
- package/templates/app/utils/orionplace/productAvailability.ts +36 -0
- package/templates/app/utils/orionplace/productGallery.ts +72 -0
- package/templates/app/utils/orionplace/productLabels.ts +82 -0
- package/templates/app/utils/orionplace/productManufacturer.ts +30 -0
- package/templates/app/utils/orionplace/productPage.ts +46 -0
- package/templates/app/utils/orionplace/productPhotos.ts +67 -0
- package/templates/app/utils/orionplace/productSearchScope.ts +237 -0
- package/templates/app/utils/orionplace/productSeller.ts +51 -0
- package/templates/app/utils/orionplace/profile.ts +136 -0
- package/templates/app/utils/orionplace/profileLabels.ts +151 -0
- package/templates/app/utils/orionplace/promoLabels.ts +75 -0
- package/templates/app/utils/orionplace/promoPresentation.ts +381 -0
- package/templates/app/utils/orionplace/reviewLabels.ts +172 -0
- package/templates/app/utils/orionplace/reviewScope.ts +41 -0
- package/templates/app/utils/orionplace/richText.ts +13 -0
- package/templates/app/utils/orionplace/searchFilters.ts +99 -0
- package/templates/app/utils/orionplace/searchHistory.ts +144 -0
- package/templates/app/utils/orionplace/sellerDirectory.ts +134 -0
- package/templates/app/utils/orionplace/seo.ts +52 -0
- package/templates/app/utils/orionplace/serverCookies.ts +88 -0
- package/templates/app/utils/orionplace/sessionLabels.ts +27 -0
- package/templates/app/utils/orionplace/signInReturn.ts +89 -0
- package/templates/app/utils/orionplace/storeDirectory.ts +50 -0
- package/templates/app/utils/orionplace/subscriptionChanges.ts +167 -0
- package/templates/app/utils/orionplace/subscriptionLabels.ts +67 -0
- package/templates/app/utils/orionplace/subscriptionManageLabels.ts +307 -0
- package/templates/app/utils/orionplace/subscriptionPlans.ts +162 -0
- package/templates/app/utils/orionplace/subscriptionRemote.ts +110 -0
- package/templates/app/utils/orionplace/subscriptionUsage.ts +82 -0
- package/templates/app/utils/orionplace/tariffLabels.ts +130 -0
- package/templates/app/utils/orionplace/tariffPage.ts +77 -0
- package/templates/app/utils/orionplace/tariffVariables.ts +165 -0
- package/templates/app/utils/orionplace/tariffs.ts +284 -0
- package/templates/app/utils/orionplace/ticketItems.ts +87 -0
- package/templates/app/utils/orionplace/ticketLabels.ts +335 -0
- package/templates/app/utils/orionplace/ticketLocation.ts +79 -0
- package/templates/app/utils/orionplace/walletTransaction.ts +135 -0
- package/templates/app/utils/orionplaceAppLoad.ts +73 -0
- package/templates/orionplace/COMPONENT-DOWNLOAD.md +40 -0
- package/templates/orionplace/COMPONENTS.md +1983 -0
- package/templates/orionplace/THEMES.md +94 -0
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, onMounted, reactive, ref, watch } from 'vue';
|
|
3
|
+
import { useOrionplaceStore } from '@/stores/orionplace';
|
|
4
|
+
import { useOrionplaceSelectionsStore } from '@/stores/orionplaceSelections';
|
|
5
|
+
import {
|
|
6
|
+
useOrionplaceFeatureApi,
|
|
7
|
+
useOrionplaceTask,
|
|
8
|
+
} from '@/composables/useOrionplaceFeature';
|
|
9
|
+
import { contactLabels } from '@/utils/orionplace/contactLabels';
|
|
10
|
+
import { featureLabels } from '@/utils/orionplace/featureLabels';
|
|
11
|
+
import type {
|
|
12
|
+
ICaptchaResponse,
|
|
13
|
+
IContactRequest,
|
|
14
|
+
} from '@/interfaces/orionplace/accounts/IContact';
|
|
15
|
+
import '@/components/orionplace/shared/features.css';
|
|
16
|
+
|
|
17
|
+
const store = useOrionplaceStore();
|
|
18
|
+
const selectionStore = useOrionplaceSelectionsStore();
|
|
19
|
+
const api = useOrionplaceFeatureApi();
|
|
20
|
+
const task = useOrionplaceTask();
|
|
21
|
+
const labels = computed(() => contactLabels(selectionStore.localeCode));
|
|
22
|
+
const common = computed(() => featureLabels(selectionStore.localeCode));
|
|
23
|
+
const image = ref('');
|
|
24
|
+
const sent = ref(false);
|
|
25
|
+
const fields = reactive<IContactRequest>({
|
|
26
|
+
full_name: '',
|
|
27
|
+
email: '',
|
|
28
|
+
message: '',
|
|
29
|
+
captcha: '',
|
|
30
|
+
});
|
|
31
|
+
const busy = computed(() => Boolean(task.state.pending));
|
|
32
|
+
|
|
33
|
+
// A signed-in customer starts with their own name and email; what they
|
|
34
|
+
// already typed stays.
|
|
35
|
+
watch(
|
|
36
|
+
() => store.profile,
|
|
37
|
+
(profile) => {
|
|
38
|
+
if (profile) {
|
|
39
|
+
fields.full_name ||= [profile.first_name, profile.last_name]
|
|
40
|
+
.filter(Boolean)
|
|
41
|
+
.join(' ');
|
|
42
|
+
fields.email ||= profile.email ?? '';
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{ immediate: true },
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
async function refreshCaptcha(signal: AbortSignal) {
|
|
49
|
+
const data = await api.request<
|
|
50
|
+
NonNullable<ICaptchaResponse['page_data']>
|
|
51
|
+
>('misc_captcha', {}, signal);
|
|
52
|
+
image.value = `data:image/png;base64,${data.image}`;
|
|
53
|
+
fields.captcha = '';
|
|
54
|
+
}
|
|
55
|
+
function loadCaptcha() {
|
|
56
|
+
return task.run('captcha', refreshCaptcha);
|
|
57
|
+
}
|
|
58
|
+
function submit() {
|
|
59
|
+
return task.run('submit', async (signal) => {
|
|
60
|
+
try {
|
|
61
|
+
await api.request('misc_contact', { ...fields }, signal);
|
|
62
|
+
} catch (error) {
|
|
63
|
+
// Every attempt uses up the CAPTCHA answer, so a failed send needs a
|
|
64
|
+
// new image. The send error stays the one shown.
|
|
65
|
+
await refreshCaptcha(signal).catch(() => undefined);
|
|
66
|
+
throw error;
|
|
67
|
+
}
|
|
68
|
+
sent.value = true;
|
|
69
|
+
fields.message = '';
|
|
70
|
+
fields.captcha = '';
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function another() {
|
|
74
|
+
sent.value = false;
|
|
75
|
+
void loadCaptcha();
|
|
76
|
+
}
|
|
77
|
+
onMounted(() => void loadCaptcha());
|
|
78
|
+
</script>
|
|
79
|
+
|
|
80
|
+
<template>
|
|
81
|
+
<section
|
|
82
|
+
class="
|
|
83
|
+
op-feature flex w-full flex-col gap-6
|
|
84
|
+
box-border p-5 @min-[592px]:p-8
|
|
85
|
+
rounded-none border border-solid border-orionplace-border
|
|
86
|
+
bg-orionplace-surface
|
|
87
|
+
"
|
|
88
|
+
data-feature-part="ContactForm"
|
|
89
|
+
:aria-busy="busy"
|
|
90
|
+
>
|
|
91
|
+
<header class="grid gap-2">
|
|
92
|
+
<h2 class="op-feature-subtitle">{{ labels.title }}</h2>
|
|
93
|
+
<p class="op-feature-copy op-feature-muted">{{ labels.description }}</p>
|
|
94
|
+
</header>
|
|
95
|
+
<p
|
|
96
|
+
v-if="task.state.error"
|
|
97
|
+
class="op-notice op-notice-error"
|
|
98
|
+
role="alert"
|
|
99
|
+
>
|
|
100
|
+
{{ task.state.error }}
|
|
101
|
+
</p>
|
|
102
|
+
<div
|
|
103
|
+
v-if="sent"
|
|
104
|
+
class="op-notice op-notice-success"
|
|
105
|
+
role="status"
|
|
106
|
+
>
|
|
107
|
+
<p class="op-feature-copy">{{ labels.sent }}</p>
|
|
108
|
+
<button
|
|
109
|
+
class="op-feature-button"
|
|
110
|
+
type="button"
|
|
111
|
+
:aria-label="labels.anotherHint"
|
|
112
|
+
@click="another"
|
|
113
|
+
>
|
|
114
|
+
{{ labels.another }}
|
|
115
|
+
</button>
|
|
116
|
+
</div>
|
|
117
|
+
<form
|
|
118
|
+
v-else
|
|
119
|
+
class="op-feature-stack"
|
|
120
|
+
@submit.prevent="submit"
|
|
121
|
+
>
|
|
122
|
+
<div class="op-feature-fields">
|
|
123
|
+
<label class="op-feature-label">
|
|
124
|
+
<span>
|
|
125
|
+
{{ labels.name }}
|
|
126
|
+
<span
|
|
127
|
+
class="op-feature-required"
|
|
128
|
+
aria-hidden="true"
|
|
129
|
+
>*</span>
|
|
130
|
+
</span>
|
|
131
|
+
<input
|
|
132
|
+
class="op-feature-input"
|
|
133
|
+
v-model.trim="fields.full_name"
|
|
134
|
+
autocomplete="name"
|
|
135
|
+
minlength="3"
|
|
136
|
+
maxlength="32"
|
|
137
|
+
required
|
|
138
|
+
:disabled="busy"
|
|
139
|
+
/>
|
|
140
|
+
<span
|
|
141
|
+
v-if="task.state.fields.full_name"
|
|
142
|
+
class="op-feature-error text-xs"
|
|
143
|
+
>
|
|
144
|
+
{{ task.state.fields.full_name }}
|
|
145
|
+
</span>
|
|
146
|
+
</label>
|
|
147
|
+
<label class="op-feature-label">
|
|
148
|
+
<span>
|
|
149
|
+
{{ labels.email }}
|
|
150
|
+
<span
|
|
151
|
+
class="op-feature-required"
|
|
152
|
+
aria-hidden="true"
|
|
153
|
+
>*</span>
|
|
154
|
+
</span>
|
|
155
|
+
<input
|
|
156
|
+
class="op-feature-input"
|
|
157
|
+
v-model.trim="fields.email"
|
|
158
|
+
type="email"
|
|
159
|
+
autocomplete="email"
|
|
160
|
+
required
|
|
161
|
+
:disabled="busy"
|
|
162
|
+
/>
|
|
163
|
+
<span
|
|
164
|
+
v-if="task.state.fields.email"
|
|
165
|
+
class="op-feature-error text-xs"
|
|
166
|
+
>
|
|
167
|
+
{{ task.state.fields.email }}
|
|
168
|
+
</span>
|
|
169
|
+
</label>
|
|
170
|
+
</div>
|
|
171
|
+
<label class="op-feature-label">
|
|
172
|
+
<span>
|
|
173
|
+
{{ labels.message }}
|
|
174
|
+
<span
|
|
175
|
+
class="op-feature-required"
|
|
176
|
+
aria-hidden="true"
|
|
177
|
+
>*</span>
|
|
178
|
+
</span>
|
|
179
|
+
<textarea
|
|
180
|
+
class="op-feature-input"
|
|
181
|
+
v-model="fields.message"
|
|
182
|
+
rows="7"
|
|
183
|
+
minlength="15"
|
|
184
|
+
maxlength="2048"
|
|
185
|
+
required
|
|
186
|
+
:disabled="busy"
|
|
187
|
+
/>
|
|
188
|
+
<span
|
|
189
|
+
class="
|
|
190
|
+
flex flex-wrap justify-between gap-x-4
|
|
191
|
+
text-xs op-feature-muted
|
|
192
|
+
"
|
|
193
|
+
>
|
|
194
|
+
<span>{{ labels.messageHint }}</span>
|
|
195
|
+
<span>{{ fields.message.length }} / 2048</span>
|
|
196
|
+
</span>
|
|
197
|
+
<span
|
|
198
|
+
v-if="task.state.fields.message"
|
|
199
|
+
class="op-feature-error text-xs"
|
|
200
|
+
>
|
|
201
|
+
{{ task.state.fields.message }}
|
|
202
|
+
</span>
|
|
203
|
+
</label>
|
|
204
|
+
<div class="flex flex-wrap items-start gap-4">
|
|
205
|
+
<div class="flex min-w-0 items-center gap-2 @min-[592px]:mt-6">
|
|
206
|
+
<div
|
|
207
|
+
class="
|
|
208
|
+
box-border flex h-11 w-44 min-w-0 shrink items-center
|
|
209
|
+
justify-center
|
|
210
|
+
rounded-none border border-solid border-orionplace-border
|
|
211
|
+
"
|
|
212
|
+
>
|
|
213
|
+
<img
|
|
214
|
+
v-if="image"
|
|
215
|
+
:src="image"
|
|
216
|
+
:alt="labels.captcha"
|
|
217
|
+
width="176"
|
|
218
|
+
height="44"
|
|
219
|
+
decoding="async"
|
|
220
|
+
class="h-full w-full object-contain"
|
|
221
|
+
/>
|
|
222
|
+
</div>
|
|
223
|
+
<button
|
|
224
|
+
class="op-feature-button"
|
|
225
|
+
type="button"
|
|
226
|
+
:disabled="busy"
|
|
227
|
+
:aria-label="labels.refreshCaptchaHint"
|
|
228
|
+
@click="loadCaptcha"
|
|
229
|
+
>
|
|
230
|
+
<svg
|
|
231
|
+
class="h-4 w-4 shrink-0"
|
|
232
|
+
viewBox="0 0 24 24"
|
|
233
|
+
fill="none"
|
|
234
|
+
stroke="currentColor"
|
|
235
|
+
stroke-width="1.5"
|
|
236
|
+
stroke-linecap="round"
|
|
237
|
+
stroke-linejoin="round"
|
|
238
|
+
aria-hidden="true"
|
|
239
|
+
>
|
|
240
|
+
<path d="M20 12a8 8 0 1 1-2.3-5.6" />
|
|
241
|
+
<path d="M20 4v5h-5" />
|
|
242
|
+
</svg>
|
|
243
|
+
<span>{{ labels.refreshCaptcha }}</span>
|
|
244
|
+
</button>
|
|
245
|
+
</div>
|
|
246
|
+
<!-- The code field keeps a usable width and moves to its own line
|
|
247
|
+
when the picture and the refresh action fill the container. -->
|
|
248
|
+
<div class="min-w-48 flex-1">
|
|
249
|
+
<label class="op-feature-label">
|
|
250
|
+
<span>
|
|
251
|
+
{{ labels.captcha }}
|
|
252
|
+
<span
|
|
253
|
+
class="op-feature-required"
|
|
254
|
+
aria-hidden="true"
|
|
255
|
+
>*</span>
|
|
256
|
+
</span>
|
|
257
|
+
<input
|
|
258
|
+
class="op-feature-input"
|
|
259
|
+
v-model.trim="fields.captcha"
|
|
260
|
+
autocomplete="off"
|
|
261
|
+
maxlength="8"
|
|
262
|
+
required
|
|
263
|
+
:disabled="busy || !image"
|
|
264
|
+
/>
|
|
265
|
+
<span
|
|
266
|
+
v-if="task.state.fields.captcha"
|
|
267
|
+
class="op-feature-error text-xs"
|
|
268
|
+
>
|
|
269
|
+
{{ task.state.fields.captcha }}
|
|
270
|
+
</span>
|
|
271
|
+
</label>
|
|
272
|
+
</div>
|
|
273
|
+
</div>
|
|
274
|
+
<button
|
|
275
|
+
type="submit"
|
|
276
|
+
class="op-feature-button op-feature-primary w-full @min-[592px]:w-auto @min-[592px]:self-start"
|
|
277
|
+
:disabled="busy || !image"
|
|
278
|
+
>
|
|
279
|
+
{{ labels.send }}
|
|
280
|
+
</button>
|
|
281
|
+
<span
|
|
282
|
+
class="sr-only"
|
|
283
|
+
role="status"
|
|
284
|
+
>
|
|
285
|
+
{{ busy ? common.loading : '' }}
|
|
286
|
+
</span>
|
|
287
|
+
</form>
|
|
288
|
+
</section>
|
|
289
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# EmailUnsubscribe · Nuxt
|
|
2
|
+
|
|
3
|
+
Confirming an unsubscribe request from an email link.
|
|
4
|
+
|
|
5
|
+
The supplied storefront uses this component at `/unsubscribe`.
|
|
6
|
+
[English guide](https://orionmarket.place/en/sandbox/components/nuxt/email-unsubscribe) ·
|
|
7
|
+
[Russian guide](https://orionmarket.place/ru/sandbox/components/nuxt/email-unsubscribe)
|
|
8
|
+
|
|
9
|
+
## Contract and dependencies
|
|
10
|
+
|
|
11
|
+
The `/unsubscribe` route passes `t` and `ut` as `token` and `kind`. The button sends them to `misc_unsubscribe` as `hash` and `unsubcribe_type`. `newsletter` turns off promotional emails only (order, preorder, support-reply and subscription emails stay on); `products` deletes the product availability subscriptions.
|
|
12
|
+
|
|
13
|
+
The request starts on button press. Incomplete links show an error. Confirmed completion replaces the button with the result; failure allows retry.
|
|
14
|
+
|
|
15
|
+
The guide describes its inputs and events. Source is maintained in
|
|
16
|
+
`app/components/orionplace/contact/EmailUnsubscribe.vue`; the primary interface is `app/interfaces/orionplace/accounts/IContact.ts`.
|
|
17
|
+
|
|
18
|
+
The configured Nuxt starter initializes Application Load and its named API client.
|
|
19
|
+
Component-source ZIPs contain imported children, types,
|
|
20
|
+
composables, labels and styles. The included `orionplace/COMPONENT-DOWNLOAD.md`
|
|
21
|
+
describes dependencies, theme and consumer configuration. Standalone file
|
|
22
|
+
copying requires the same dependencies. Links to storefront routes use the
|
|
23
|
+
pages supplied by the full starter.
|
|
24
|
+
|
|
25
|
+
## Endpoint coverage
|
|
26
|
+
|
|
27
|
+
- `misc_unsubscribe`
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, onMounted, ref } from 'vue';
|
|
3
|
+
import { useOrionplaceSelectionsStore } from '@/stores/orionplaceSelections';
|
|
4
|
+
import {
|
|
5
|
+
useOrionplaceFeatureApi,
|
|
6
|
+
useOrionplaceTask,
|
|
7
|
+
} from '@/composables/useOrionplaceFeature';
|
|
8
|
+
import { contactLabels } from '@/utils/orionplace/contactLabels';
|
|
9
|
+
import { featureLabels } from '@/utils/orionplace/featureLabels';
|
|
10
|
+
import type { IUnsubscribeRequest } from '@/interfaces/orionplace/accounts/IContact';
|
|
11
|
+
import '@/components/orionplace/shared/features.css';
|
|
12
|
+
|
|
13
|
+
const props = defineProps<{ token: string; kind: string }>();
|
|
14
|
+
const selectionStore = useOrionplaceSelectionsStore();
|
|
15
|
+
const api = useOrionplaceFeatureApi();
|
|
16
|
+
const task = useOrionplaceTask();
|
|
17
|
+
const labels = computed(() => contactLabels(selectionStore.localeCode));
|
|
18
|
+
const common = computed(() => featureLabels(selectionStore.localeCode));
|
|
19
|
+
const valid = computed(() =>
|
|
20
|
+
Boolean(
|
|
21
|
+
props.token &&
|
|
22
|
+
props.token.length <= 64 &&
|
|
23
|
+
['newsletter', 'products'].includes(props.kind),
|
|
24
|
+
),
|
|
25
|
+
);
|
|
26
|
+
const done = ref(false);
|
|
27
|
+
const ready = ref(false);
|
|
28
|
+
onMounted(() => {
|
|
29
|
+
ready.value = true;
|
|
30
|
+
});
|
|
31
|
+
function submit() {
|
|
32
|
+
if (!valid.value || done.value) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
return task.run('unsubscribe', async (signal) => {
|
|
36
|
+
const input: IUnsubscribeRequest = {
|
|
37
|
+
hash: props.token,
|
|
38
|
+
unsubcribe_type: props.kind as IUnsubscribeRequest['unsubcribe_type'],
|
|
39
|
+
};
|
|
40
|
+
await api.request('misc_unsubscribe', { ...input }, signal);
|
|
41
|
+
done.value = true;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
45
|
+
<template>
|
|
46
|
+
<section
|
|
47
|
+
class="
|
|
48
|
+
op-feature op-feature-panel op-feature-stack @container
|
|
49
|
+
mx-auto max-w-xl
|
|
50
|
+
p-[clamp(1.25rem,calc((100%_-_591px)*1000),2rem)]!
|
|
51
|
+
"
|
|
52
|
+
data-feature-part="EmailUnsubscribe"
|
|
53
|
+
>
|
|
54
|
+
<!--
|
|
55
|
+
The padding grows to 2rem once the column around the panel is 592px
|
|
56
|
+
wide (a padding percentage is a share of that column), so a narrow
|
|
57
|
+
preview frame and a wide page show the same panel.
|
|
58
|
+
-->
|
|
59
|
+
<h1 class="op-feature-title">{{ labels.unsubscribe }}</h1>
|
|
60
|
+
<p
|
|
61
|
+
class="op-notice op-notice-success"
|
|
62
|
+
v-if="done"
|
|
63
|
+
role="status"
|
|
64
|
+
>
|
|
65
|
+
{{ labels.unsubscribeDone }}
|
|
66
|
+
</p>
|
|
67
|
+
<p
|
|
68
|
+
class="op-notice op-notice-error"
|
|
69
|
+
v-else-if="!valid"
|
|
70
|
+
role="alert"
|
|
71
|
+
>
|
|
72
|
+
{{ labels.invalidLink }}
|
|
73
|
+
</p>
|
|
74
|
+
<template v-else>
|
|
75
|
+
<p class="op-feature-copy">
|
|
76
|
+
{{ kind === 'products' ? labels.products : labels.newsletter }}
|
|
77
|
+
</p>
|
|
78
|
+
<button
|
|
79
|
+
type="button"
|
|
80
|
+
class="op-feature-button op-feature-primary"
|
|
81
|
+
:disabled="!ready || Boolean(task.state.pending)"
|
|
82
|
+
@click="submit"
|
|
83
|
+
>
|
|
84
|
+
{{ task.state.pending ? common.loading : labels.unsubscribeAction }}
|
|
85
|
+
</button>
|
|
86
|
+
</template>
|
|
87
|
+
<p
|
|
88
|
+
v-if="task.state.error"
|
|
89
|
+
role="alert"
|
|
90
|
+
class="op-notice op-notice-error"
|
|
91
|
+
>
|
|
92
|
+
{{ task.state.error }}
|
|
93
|
+
</p>
|
|
94
|
+
</section>
|
|
95
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Contact page · Nuxt
|
|
2
|
+
|
|
3
|
+
`StorefrontContact.vue` renders the native `/contact` page: a title with a short
|
|
4
|
+
introduction, then company details beside the maintained `ContactForm` on wide
|
|
5
|
+
screens. The columns stack on narrow screens, details first. The details column
|
|
6
|
+
combines `store.init.contact` (through `AboutPage`) with social links from
|
|
7
|
+
`store.init.sm` (through `SocialLinks`). Empty details are hidden; without them
|
|
8
|
+
the page shows only the form, which remains available to guests and signed-in
|
|
9
|
+
customers. The footer links to this page.
|
|
10
|
+
|
|
11
|
+
The component has no inputs or emitted events. `AboutPage` displays contact data;
|
|
12
|
+
`ContactForm` uses `misc_captcha` and `misc_contact` through the named API client.
|
|
13
|
+
Use the configured Nuxt starter after Application Load completes.
|
|
14
|
+
The downloadable source bundle includes these components, their styles, types and
|
|
15
|
+
API helpers. Follow `orionplace/COMPONENT-DOWNLOAD.md` for installation requirements.
|
|
16
|
+
|
|
17
|
+
[English guide](https://orionmarket.place/en/sandbox/components/nuxt/contact-page) ·
|
|
18
|
+
[Russian guide](https://orionmarket.place/ru/sandbox/components/nuxt/contact-page)
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue';
|
|
3
|
+
|
|
4
|
+
import { useOrionplaceStore } from '@/stores/orionplace';
|
|
5
|
+
import { useOrionplaceSelectionsStore } from '@/stores/orionplaceSelections';
|
|
6
|
+
import { contactLabels } from '@/utils/orionplace/contactLabels';
|
|
7
|
+
import { safePublicUrl } from '@/utils/orionplace/presentation';
|
|
8
|
+
import AboutPage from '@/components/orionplace/contact/AboutPage.vue';
|
|
9
|
+
import ContactForm from '@/components/orionplace/contact/ContactForm.vue';
|
|
10
|
+
import SocialLinks from '@/components/orionplace/social/SocialLinks.vue';
|
|
11
|
+
import '@/components/orionplace/shared/features.css';
|
|
12
|
+
|
|
13
|
+
const store = useOrionplaceStore();
|
|
14
|
+
const selectionStore = useOrionplaceSelectionsStore();
|
|
15
|
+
const labels = computed(() => contactLabels(selectionStore.localeCode));
|
|
16
|
+
const hasContact = computed(() =>
|
|
17
|
+
Object.values(store.init?.contact ?? {}).some((value) =>
|
|
18
|
+
String(value ?? '').trim(),
|
|
19
|
+
),
|
|
20
|
+
);
|
|
21
|
+
// SocialLinks hides links without a safe public address; match that here.
|
|
22
|
+
const hasSocial = computed(() =>
|
|
23
|
+
(store.init?.sm ?? []).some((item) => safePublicUrl(item.link)),
|
|
24
|
+
);
|
|
25
|
+
const hasDetails = computed(() => hasContact.value || hasSocial.value);
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<section
|
|
30
|
+
data-feature-part="StorefrontContact"
|
|
31
|
+
class="
|
|
32
|
+
op-feature grid w-full @container
|
|
33
|
+
"
|
|
34
|
+
>
|
|
35
|
+
<header
|
|
36
|
+
class="
|
|
37
|
+
grid gap-3
|
|
38
|
+
border-0 border-b border-solid border-orionplace-border
|
|
39
|
+
mb-8 pb-6 @min-[592px]:mb-12 @min-[592px]:pb-8
|
|
40
|
+
"
|
|
41
|
+
>
|
|
42
|
+
<h1 class="op-feature-title">{{ labels.pageTitle }}</h1>
|
|
43
|
+
<p class="op-feature-copy op-feature-muted max-w-2xl">{{ labels.intro }}</p>
|
|
44
|
+
</header>
|
|
45
|
+
|
|
46
|
+
<div
|
|
47
|
+
class="
|
|
48
|
+
grid items-start
|
|
49
|
+
gap-10 @min-[960px]:gap-16
|
|
50
|
+
"
|
|
51
|
+
:class="{
|
|
52
|
+
'@min-[960px]:grid-cols-[minmax(0,5fr)_minmax(0,7fr)]': hasDetails,
|
|
53
|
+
}"
|
|
54
|
+
>
|
|
55
|
+
<section
|
|
56
|
+
v-if="hasDetails"
|
|
57
|
+
aria-labelledby="orionplace-contact-details"
|
|
58
|
+
class="grid min-w-0 gap-6"
|
|
59
|
+
>
|
|
60
|
+
<h2
|
|
61
|
+
id="orionplace-contact-details"
|
|
62
|
+
class="op-feature-subtitle"
|
|
63
|
+
>
|
|
64
|
+
{{ labels.company }}
|
|
65
|
+
</h2>
|
|
66
|
+
<AboutPage v-if="hasContact" />
|
|
67
|
+
<div
|
|
68
|
+
v-if="hasSocial"
|
|
69
|
+
class="grid gap-3"
|
|
70
|
+
>
|
|
71
|
+
<h3
|
|
72
|
+
class="
|
|
73
|
+
m-0
|
|
74
|
+
text-xs font-normal uppercase tracking-[0.08em]
|
|
75
|
+
text-orionplace-muted
|
|
76
|
+
"
|
|
77
|
+
>
|
|
78
|
+
{{ labels.social }}
|
|
79
|
+
</h3>
|
|
80
|
+
<SocialLinks />
|
|
81
|
+
</div>
|
|
82
|
+
</section>
|
|
83
|
+
|
|
84
|
+
<ContactForm
|
|
85
|
+
:class="{ 'max-w-2xl': !hasDetails }"
|
|
86
|
+
/>
|
|
87
|
+
</div>
|
|
88
|
+
</section>
|
|
89
|
+
</template>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<OrionplaceSelect
|
|
3
|
+
v-model="model"
|
|
4
|
+
:options="options"
|
|
5
|
+
:label="label"
|
|
6
|
+
:compact="codeOnly"
|
|
7
|
+
borderless
|
|
8
|
+
:display-value="displayValue"
|
|
9
|
+
:disabled="disabled"
|
|
10
|
+
@change="selectCurrency"
|
|
11
|
+
/>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import { computed } from 'vue';
|
|
16
|
+
|
|
17
|
+
import OrionplaceSelect from '@/components/orionplace/shared/OrionplaceSelect.vue';
|
|
18
|
+
import { useOrionplaceSelectionsStore } from '@/stores/orionplaceSelections';
|
|
19
|
+
import { currencyLabel } from '@/utils/orionplace/currency';
|
|
20
|
+
import { getAvailableNestedValueFromObject } from '@/utils/orionplace/presentation';
|
|
21
|
+
|
|
22
|
+
import type { IAppLoadCommonCurrency } from '@/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonCurrency';
|
|
23
|
+
|
|
24
|
+
const props = withDefaults(
|
|
25
|
+
defineProps<{
|
|
26
|
+
label?: string;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
codeOnly?: boolean;
|
|
29
|
+
}>(),
|
|
30
|
+
{
|
|
31
|
+
label: 'Currency',
|
|
32
|
+
disabled: false,
|
|
33
|
+
codeOnly: false,
|
|
34
|
+
},
|
|
35
|
+
);
|
|
36
|
+
const emit = defineEmits<{
|
|
37
|
+
change: [currency: IAppLoadCommonCurrency];
|
|
38
|
+
}>();
|
|
39
|
+
|
|
40
|
+
const selectionStore = useOrionplaceSelectionsStore();
|
|
41
|
+
const currencies = computed(() => selectionStore.currencies);
|
|
42
|
+
|
|
43
|
+
const options = computed(() =>
|
|
44
|
+
Object.fromEntries(
|
|
45
|
+
Object.entries(currencies.value)
|
|
46
|
+
.filter(([, currency]) => currency.allowed_select)
|
|
47
|
+
.map(([id, currency]) => {
|
|
48
|
+
const title = getAvailableNestedValueFromObject(
|
|
49
|
+
currency.locales,
|
|
50
|
+
selectionStore.localeCode,
|
|
51
|
+
'currency_title',
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
return [id, currencyLabel(currency, title)];
|
|
55
|
+
}),
|
|
56
|
+
),
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
// The compact control shows only the symbols or code of the selection.
|
|
60
|
+
const displayValue = computed(() =>
|
|
61
|
+
props.codeOnly
|
|
62
|
+
? currencyLabel(selectionStore.currentCurrency)
|
|
63
|
+
: undefined,
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
const model = computed({
|
|
67
|
+
get: () => selectionStore.currencyId,
|
|
68
|
+
set: (value: string) => {
|
|
69
|
+
selectionStore.setCurrency(value);
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
function selectCurrency(id: string) {
|
|
74
|
+
const currency = currencies.value[id];
|
|
75
|
+
|
|
76
|
+
if (currency?.allowed_select) {
|
|
77
|
+
emit('change', currency);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
</script>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# EventEnrollmentDialog · Nuxt
|
|
2
|
+
|
|
3
|
+
Confirming participation in a selected store promotion.
|
|
4
|
+
|
|
5
|
+
The supplied storefront uses this component at `/`.
|
|
6
|
+
[English guide](https://orionmarket.place/en/sandbox/components/nuxt/event-enrollment) ·
|
|
7
|
+
[Russian guide](https://orionmarket.place/ru/sandbox/components/nuxt/event-enrollment)
|
|
8
|
+
|
|
9
|
+
## Contract and dependencies
|
|
10
|
+
|
|
11
|
+
The homepage opens this dialog when a signed-in user selects an event with
|
|
12
|
+
`promo = true`. A guest's selection opens `/profile` at once instead; its
|
|
13
|
+
`redirect` returns to the current page with `event=<id>`, and the supplied home
|
|
14
|
+
page then opens the dialog for that event. A guest who opens such an address
|
|
15
|
+
directly sees the dialog, and Participate opens the sign-in page the same way.
|
|
16
|
+
The customer needs only a confirmed email; `ProfileEmailSettings` lets them
|
|
17
|
+
confirm one before the participation button becomes available. The backend
|
|
18
|
+
turns the account's email messages on when the customer enrolls.
|
|
19
|
+
|
|
20
|
+
The button calls `profile_event_subscribe` with the event ID. A confirmed
|
|
21
|
+
response records enrollment but contains no promo code. The dialog presents a
|
|
22
|
+
success panel with the confirmed delivery address and emits `enrolled`; repeat
|
|
23
|
+
submission is disabled. The store creates the code later and sends it to that
|
|
24
|
+
address while the event and promo type remain active and the customer does not
|
|
25
|
+
turn promotional messages off. Closing emits `close`. Modal mode uses native dialog focus handling,
|
|
26
|
+
locks page scrolling and restores focus on closing. Changing `modal` while the
|
|
27
|
+
dialog is open switches it in place and keeps the focused control.
|
|
28
|
+
|
|
29
|
+
The event fields support two independent placements. `is_layout` makes an
|
|
30
|
+
event eligible for `EventsBlock`. A separate host controller can use `is_modal`,
|
|
31
|
+
wait `model_delay_sec`, and limit rendered popups with `modal_display_count`
|
|
32
|
+
over `modal_display_count_days`. Its first-party cookie is named
|
|
33
|
+
`eventModalDisplayCount_<event ID>` and stores the display count with the fixed
|
|
34
|
+
end of the counting period. Closing a popup does not clear that count. The
|
|
35
|
+
dialog itself opens immediately when its host renders it and does not start the
|
|
36
|
+
visit timer or write the display cookie.
|
|
37
|
+
|
|
38
|
+
The guide describes its inputs and events. Source is maintained in
|
|
39
|
+
`app/components/orionplace/events/EventEnrollmentDialog.vue`; the primary interface is `app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonEvents.ts`.
|
|
40
|
+
The component belongs to the `events` composition; render it with that
|
|
41
|
+
parent's controller and context.
|
|
42
|
+
|
|
43
|
+
The guide's carousel and event-field editors use events returned by Application
|
|
44
|
+
Load. Selecting an event with `promo: true` opens the physical dialog for that
|
|
45
|
+
event. If no event is available for the selected language and page display,
|
|
46
|
+
the preview shows an unavailable message. Profile data and enrollment responses
|
|
47
|
+
are simulated; preview actions do not send account requests.
|
|
48
|
+
|
|
49
|
+
The configured Nuxt starter initializes Application Load and its named API client.
|
|
50
|
+
Component-source ZIPs contain imported children, types,
|
|
51
|
+
composables, labels and styles. The included `orionplace/COMPONENT-DOWNLOAD.md`
|
|
52
|
+
describes dependencies, theme and consumer configuration. Standalone file
|
|
53
|
+
copying requires the same dependencies. Links to storefront routes use the
|
|
54
|
+
pages supplied by the full starter.
|
|
55
|
+
|
|
56
|
+
## Endpoint coverage
|
|
57
|
+
|
|
58
|
+
- `profile_event_subscribe`
|