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,286 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue';
|
|
3
|
+
import { useOrionplaceCatalogStore } from '@/stores/orionplaceCatalog';
|
|
4
|
+
import { useOrionplaceSelectionsStore } from '@/stores/orionplaceSelections';
|
|
5
|
+
import { tariffFeatures } from '@/utils/orionplace/tariffs';
|
|
6
|
+
import { subscriptionUsageMeters } from '@/utils/orionplace/subscriptionUsage';
|
|
7
|
+
import { subscriptionManageLabels } from '@/utils/orionplace/subscriptionManageLabels';
|
|
8
|
+
import {
|
|
9
|
+
getAvailableNestedValueFromObject,
|
|
10
|
+
plainText,
|
|
11
|
+
} from '@/utils/orionplace/presentation';
|
|
12
|
+
import type { ISubscribeTariff } from '@/interfaces/orionplace/subscribeTariff/ISubscribeTariff';
|
|
13
|
+
import type { ICustomerSubscription } from '@/interfaces/orionplace/subscribes/ISubscriptionApi';
|
|
14
|
+
import OrionplaceImage from '@/components/orionplace/shared/OrionplaceImage.vue';
|
|
15
|
+
import OrionplaceInfoHint from '@/components/orionplace/shared/OrionplaceInfoHint.vue';
|
|
16
|
+
|
|
17
|
+
const props = defineProps<{
|
|
18
|
+
plan?: ISubscribeTariff;
|
|
19
|
+
subscription?: ICustomerSubscription;
|
|
20
|
+
}>();
|
|
21
|
+
const catalogStore = useOrionplaceCatalogStore();
|
|
22
|
+
const selectionStore = useOrionplaceSelectionsStore();
|
|
23
|
+
const copy = computed(() => subscriptionManageLabels(selectionStore.localeCode));
|
|
24
|
+
const planName = computed(
|
|
25
|
+
() =>
|
|
26
|
+
getAvailableNestedValueFromObject(
|
|
27
|
+
props.plan?.locales,
|
|
28
|
+
selectionStore.localeCode,
|
|
29
|
+
'tariff_name',
|
|
30
|
+
) || '',
|
|
31
|
+
);
|
|
32
|
+
const description = computed(() =>
|
|
33
|
+
plainText(
|
|
34
|
+
getAvailableNestedValueFromObject(
|
|
35
|
+
props.plan?.locales,
|
|
36
|
+
selectionStore.localeCode,
|
|
37
|
+
'tariff_short_description',
|
|
38
|
+
),
|
|
39
|
+
),
|
|
40
|
+
);
|
|
41
|
+
const picture = computed(() => props.plan?.tariff_image?.small?.[0]);
|
|
42
|
+
const meters = computed(() =>
|
|
43
|
+
subscriptionUsageMeters(
|
|
44
|
+
props.subscription?.plugin?.remote_subscription_tariff_usages ?? null,
|
|
45
|
+
props.plan,
|
|
46
|
+
selectionStore.localeCode,
|
|
47
|
+
),
|
|
48
|
+
);
|
|
49
|
+
// A limit that already has a usage bar is not repeated in the plan list.
|
|
50
|
+
const features = computed(() => {
|
|
51
|
+
if (!props.plan) {
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const measured = new Set(meters.value.map((meter) => meter.limitKey));
|
|
56
|
+
|
|
57
|
+
return tariffFeatures(
|
|
58
|
+
props.plan,
|
|
59
|
+
catalogStore.storeTariffs?.subscriptions,
|
|
60
|
+
selectionStore.localeCode,
|
|
61
|
+
).filter((feature) => !measured.has(feature.key));
|
|
62
|
+
});
|
|
63
|
+
const hasPlan = computed(
|
|
64
|
+
() =>
|
|
65
|
+
Boolean(picture.value || description.value) ||
|
|
66
|
+
features.value.length > 0,
|
|
67
|
+
);
|
|
68
|
+
const visible = computed(() => hasPlan.value || meters.value.length > 0);
|
|
69
|
+
|
|
70
|
+
// 24 × 24 stroke icons for the known usage values.
|
|
71
|
+
const usageIcons: Record<string, string> = {
|
|
72
|
+
files_size:
|
|
73
|
+
'M4 7c0-1.7 3.6-3 8-3s8 1.3 8 3-3.6 3-8 3-8-1.3-8-3Zm0 0v10c0 1.7 3.6 3 8 3s8-1.3 8-3V7M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3',
|
|
74
|
+
api_requests: 'M13 3 5 14h6l-1 7 8-11h-6l1-7Z',
|
|
75
|
+
front_hosts:
|
|
76
|
+
'M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm-9-9h18M12 3c2.5 2.5 3.5 5.5 3.5 9s-1 6.5-3.5 9c-2.5-2.5-3.5-5.5-3.5-9s1-6.5 3.5-9Z',
|
|
77
|
+
};
|
|
78
|
+
const gaugeIcon = 'M4 19h16M7 16V9M12 16V5M17 16v-4';
|
|
79
|
+
const planIcon = 'M4 7.5 12 3l8 4.5v9L12 21l-8-4.5zM4 7.5 12 12l8-4.5M12 12v9';
|
|
80
|
+
|
|
81
|
+
function usageIcon(key: string) {
|
|
82
|
+
return usageIcons[key] ?? gaugeIcon;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// The bar turns to the attention color near the limit and to the danger
|
|
86
|
+
// color at it, so a nearly full storage is noticed before an upload fails.
|
|
87
|
+
function tone(share: number) {
|
|
88
|
+
if (share >= 1) {
|
|
89
|
+
return 'bg-orionplace-danger';
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return share >= 0.8 ? 'bg-orionplace-attention' : 'bg-orionplace-accent';
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function usageText(used: string, limit: string) {
|
|
96
|
+
return limit
|
|
97
|
+
? copy.value.usageOf.replace('{used}', used).replace('{limit}', limit)
|
|
98
|
+
: used;
|
|
99
|
+
}
|
|
100
|
+
</script>
|
|
101
|
+
<template>
|
|
102
|
+
<!--
|
|
103
|
+
Two titled blocks: the plan and the usage the service reported. They sit
|
|
104
|
+
side by side from 48rem when both are present; the extend dialog passes
|
|
105
|
+
no subscription, so it shows the plan block alone.
|
|
106
|
+
-->
|
|
107
|
+
<section
|
|
108
|
+
v-if="visible"
|
|
109
|
+
class="grid min-w-0 gap-6 text-sm text-orionplace-text"
|
|
110
|
+
:class="{ '@min-[720px]:grid-cols-2 @min-[720px]:gap-8': hasPlan && meters.length }"
|
|
111
|
+
data-subscription-plan
|
|
112
|
+
>
|
|
113
|
+
<div
|
|
114
|
+
v-if="hasPlan"
|
|
115
|
+
class="grid min-w-0 content-start gap-4"
|
|
116
|
+
data-subscription-plan-block
|
|
117
|
+
>
|
|
118
|
+
<h4 class="op-feature-muted m-0 flex items-center gap-2 text-sm font-normal leading-5">
|
|
119
|
+
<svg
|
|
120
|
+
viewBox="0 0 24 24"
|
|
121
|
+
fill="none"
|
|
122
|
+
stroke="currentColor"
|
|
123
|
+
stroke-width="1.5"
|
|
124
|
+
stroke-linecap="round"
|
|
125
|
+
stroke-linejoin="round"
|
|
126
|
+
aria-hidden="true"
|
|
127
|
+
class="h-4 w-4 shrink-0"
|
|
128
|
+
>
|
|
129
|
+
<path :d="planIcon" />
|
|
130
|
+
</svg>
|
|
131
|
+
{{ copy.planTitle }}
|
|
132
|
+
</h4>
|
|
133
|
+
<div
|
|
134
|
+
v-if="picture || description"
|
|
135
|
+
class="flex min-w-0 items-start gap-3"
|
|
136
|
+
>
|
|
137
|
+
<div
|
|
138
|
+
v-if="picture"
|
|
139
|
+
class="
|
|
140
|
+
box-border h-12 w-12 shrink-0 overflow-hidden
|
|
141
|
+
border border-solid border-orionplace-border
|
|
142
|
+
bg-orionplace-surface
|
|
143
|
+
"
|
|
144
|
+
>
|
|
145
|
+
<OrionplaceImage
|
|
146
|
+
:src="picture"
|
|
147
|
+
:alt="planName"
|
|
148
|
+
class="h-full w-full object-contain"
|
|
149
|
+
/>
|
|
150
|
+
</div>
|
|
151
|
+
<p
|
|
152
|
+
v-if="description"
|
|
153
|
+
class="m-0 min-w-0 leading-6 text-orionplace-muted"
|
|
154
|
+
>
|
|
155
|
+
{{ description }}
|
|
156
|
+
</p>
|
|
157
|
+
</div>
|
|
158
|
+
<ul
|
|
159
|
+
v-if="features.length"
|
|
160
|
+
class="m-0 grid list-none gap-2 p-0"
|
|
161
|
+
:class="{ '@min-[592px]:grid-cols-2 @min-[592px]:gap-x-8': !meters.length }"
|
|
162
|
+
:aria-label="copy.planIncludes"
|
|
163
|
+
data-subscription-plan-features
|
|
164
|
+
>
|
|
165
|
+
<li
|
|
166
|
+
v-for="feature in features"
|
|
167
|
+
:key="feature.key"
|
|
168
|
+
class="flex min-w-0 items-start gap-2 leading-5"
|
|
169
|
+
:class="
|
|
170
|
+
feature.value === false
|
|
171
|
+
? 'text-orionplace-muted'
|
|
172
|
+
: 'text-orionplace-text'
|
|
173
|
+
"
|
|
174
|
+
>
|
|
175
|
+
<svg
|
|
176
|
+
viewBox="0 0 16 16"
|
|
177
|
+
fill="none"
|
|
178
|
+
stroke="currentColor"
|
|
179
|
+
stroke-width="1.5"
|
|
180
|
+
stroke-linecap="round"
|
|
181
|
+
stroke-linejoin="round"
|
|
182
|
+
aria-hidden="true"
|
|
183
|
+
class="mt-0.5 h-4 w-4 shrink-0"
|
|
184
|
+
>
|
|
185
|
+
<path
|
|
186
|
+
v-if="feature.value !== false"
|
|
187
|
+
d="m3 8.5 3 3 7-7"
|
|
188
|
+
/>
|
|
189
|
+
<path
|
|
190
|
+
v-else
|
|
191
|
+
d="M4 8h8"
|
|
192
|
+
/>
|
|
193
|
+
</svg>
|
|
194
|
+
<span class="min-w-0">
|
|
195
|
+
{{ feature.label
|
|
196
|
+
}}<template v-if="feature.detail">: {{ feature.detail }}</template>
|
|
197
|
+
<OrionplaceInfoHint
|
|
198
|
+
v-if="feature.hint"
|
|
199
|
+
:label="feature.label"
|
|
200
|
+
:text="feature.hint"
|
|
201
|
+
class="ml-1"
|
|
202
|
+
/>
|
|
203
|
+
<span
|
|
204
|
+
v-if="feature.value === false"
|
|
205
|
+
class="sr-only"
|
|
206
|
+
>
|
|
207
|
+
({{ copy.planNotIncluded }})
|
|
208
|
+
</span>
|
|
209
|
+
</span>
|
|
210
|
+
</li>
|
|
211
|
+
</ul>
|
|
212
|
+
</div>
|
|
213
|
+
<div
|
|
214
|
+
v-if="meters.length"
|
|
215
|
+
class="grid min-w-0 content-start gap-4"
|
|
216
|
+
data-subscription-usage
|
|
217
|
+
>
|
|
218
|
+
<h4 class="op-feature-muted m-0 flex items-center gap-2 text-sm font-normal leading-5">
|
|
219
|
+
<svg
|
|
220
|
+
viewBox="0 0 24 24"
|
|
221
|
+
fill="none"
|
|
222
|
+
stroke="currentColor"
|
|
223
|
+
stroke-width="1.5"
|
|
224
|
+
stroke-linecap="round"
|
|
225
|
+
stroke-linejoin="round"
|
|
226
|
+
aria-hidden="true"
|
|
227
|
+
class="h-4 w-4 shrink-0"
|
|
228
|
+
>
|
|
229
|
+
<path :d="gaugeIcon" />
|
|
230
|
+
</svg>
|
|
231
|
+
{{ copy.usageTitle }}
|
|
232
|
+
</h4>
|
|
233
|
+
<div
|
|
234
|
+
v-for="meter in meters"
|
|
235
|
+
:key="meter.key"
|
|
236
|
+
class="grid min-w-0 gap-2"
|
|
237
|
+
:data-subscription-usage-key="meter.key"
|
|
238
|
+
>
|
|
239
|
+
<div class="flex min-w-0 items-center justify-between gap-3">
|
|
240
|
+
<span class="flex min-w-0 items-center gap-2">
|
|
241
|
+
<svg
|
|
242
|
+
viewBox="0 0 24 24"
|
|
243
|
+
fill="none"
|
|
244
|
+
stroke="currentColor"
|
|
245
|
+
stroke-width="1.5"
|
|
246
|
+
stroke-linecap="round"
|
|
247
|
+
stroke-linejoin="round"
|
|
248
|
+
aria-hidden="true"
|
|
249
|
+
class="h-4 w-4 shrink-0 text-orionplace-muted"
|
|
250
|
+
>
|
|
251
|
+
<path :d="usageIcon(meter.key)" />
|
|
252
|
+
</svg>
|
|
253
|
+
<span class="min-w-0">
|
|
254
|
+
{{ meter.label
|
|
255
|
+
}}<OrionplaceInfoHint
|
|
256
|
+
v-if="meter.hint"
|
|
257
|
+
:label="meter.label"
|
|
258
|
+
:text="meter.hint"
|
|
259
|
+
class="ml-1"
|
|
260
|
+
/>
|
|
261
|
+
</span>
|
|
262
|
+
</span>
|
|
263
|
+
<span class="shrink-0 tabular-nums">
|
|
264
|
+
{{ usageText(meter.used, meter.limit) }}
|
|
265
|
+
</span>
|
|
266
|
+
</div>
|
|
267
|
+
<div
|
|
268
|
+
v-if="meter.share !== null"
|
|
269
|
+
role="meter"
|
|
270
|
+
aria-valuemin="0"
|
|
271
|
+
aria-valuemax="100"
|
|
272
|
+
:aria-valuenow="Math.round(meter.share * 100)"
|
|
273
|
+
:aria-valuetext="usageText(meter.used, meter.limit)"
|
|
274
|
+
:aria-label="meter.label"
|
|
275
|
+
class="h-1.5 w-full overflow-hidden bg-orionplace-muted-surface"
|
|
276
|
+
>
|
|
277
|
+
<div
|
|
278
|
+
class="h-full"
|
|
279
|
+
:class="tone(meter.share)"
|
|
280
|
+
:style="{ width: `${meter.share * 100}%` }"
|
|
281
|
+
/>
|
|
282
|
+
</div>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
</section>
|
|
286
|
+
</template>
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Subscription service details · Nuxt
|
|
2
|
+
|
|
3
|
+
The [subscription service details](https://orionmarket.place/en/sandbox/components/nuxt/subscription-remote)
|
|
4
|
+
are `app/components/orionplace/subscriptions/SubscriptionRemoteDetails.vue`,
|
|
5
|
+
nested under My subscriptions in Components. The subscriptions page renders
|
|
6
|
+
one for each subscription and the block appears only for a subscription that a
|
|
7
|
+
subscription service runs. The block has no frame of its own; the subscription
|
|
8
|
+
card places it in its footer, under the plan and usage.
|
|
9
|
+
|
|
10
|
+
## Contract and dependencies
|
|
11
|
+
|
|
12
|
+
`subscription` is the item of `subscriptions_get` to describe. Everything the
|
|
13
|
+
block shows comes from that item's `plugin` object:
|
|
14
|
+
|
|
15
|
+
- `remote_subscription_id` is the subscription's identifier on the service.
|
|
16
|
+
- `remote_subscription_last_sync` is the moment the service last confirmed the
|
|
17
|
+
subscription. The storefront backend clears it while a change is waiting for
|
|
18
|
+
that confirmation, and the block then says the confirmation is still
|
|
19
|
+
awaited. The card separately checks `remote_subscription_sync_pending` before its end date.
|
|
20
|
+
- `remote_subscription_data_user` is the package the service returned for the
|
|
21
|
+
customer.
|
|
22
|
+
|
|
23
|
+
That package is written by the subscription service, so its keys belong to
|
|
24
|
+
that service and are not part of the storefront contract. Without further
|
|
25
|
+
configuration the component shows the plain text, number and true/false values
|
|
26
|
+
it finds and shows nothing for a nested object, an empty value or a key that
|
|
27
|
+
names a credential or a storage location. `host` is shown as Host (Хост in
|
|
28
|
+
Russian); any other key keeps the name the service used. The package's `id`
|
|
29
|
+
repeats `remote_subscription_id`, so an equal value is shown once.
|
|
30
|
+
|
|
31
|
+
The usage the service reported in `remote_subscription_tariff_usages` is shown
|
|
32
|
+
by [SubscriptionPlanSummary](./SubscriptionPlanSummary.README.md), next to
|
|
33
|
+
the plan limits.
|
|
34
|
+
|
|
35
|
+
## Rendering one service's own fields
|
|
36
|
+
|
|
37
|
+
Pass `fields` to choose which keys are shown, in which order and under which
|
|
38
|
+
label:
|
|
39
|
+
|
|
40
|
+
```vue
|
|
41
|
+
<SubscriptionRemoteDetails
|
|
42
|
+
:subscription="subscription"
|
|
43
|
+
:fields="[
|
|
44
|
+
{ key: 'host', label: 'Application address' },
|
|
45
|
+
{ key: 'id', label: 'Service record' },
|
|
46
|
+
]"
|
|
47
|
+
/>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
For a package that needs its own markup, the `details` slot replaces the
|
|
51
|
+
generated rows. It receives `data`, the package as the service returned it,
|
|
52
|
+
and `entries`, the values the component prepared from it:
|
|
53
|
+
|
|
54
|
+
```vue
|
|
55
|
+
<SubscriptionRemoteDetails :subscription="subscription">
|
|
56
|
+
<template #details="{ data }">
|
|
57
|
+
<div class="flex flex-col gap-1">
|
|
58
|
+
<dt>Application address</dt>
|
|
59
|
+
<dd>{{ data?.host }}</dd>
|
|
60
|
+
</div>
|
|
61
|
+
</template>
|
|
62
|
+
</SubscriptionRemoteDetails>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
A credential or a storage location must not reach the page. The component
|
|
66
|
+
drops those keys itself, and a slot that reads `data` directly is responsible
|
|
67
|
+
for the same restraint.
|
|
68
|
+
|
|
69
|
+
## Endpoint coverage
|
|
70
|
+
|
|
71
|
+
- `subscriptions_get`
|
|
72
|
+
|
|
73
|
+
## Related components
|
|
74
|
+
|
|
75
|
+
[My subscriptions](https://orionmarket.place/en/sandbox/components/nuxt/subscriptions),
|
|
76
|
+
[Plan and usage](https://orionmarket.place/en/sandbox/components/nuxt/subscription-plan),
|
|
77
|
+
[Plan and option change](https://orionmarket.place/en/sandbox/components/nuxt/subscription-change).
|
|
78
|
+
## Response fields and application actions
|
|
79
|
+
|
|
80
|
+
The following tables describe the response and the supplied composition’s follow-up actions. The framework-specific props and events above identify which work belongs to the component and which belongs to its parent.
|
|
81
|
+
|
|
82
|
+
### English
|
|
83
|
+
|
|
84
|
+
### Remote identity, details and confirmation
|
|
85
|
+
|
|
86
|
+
`subscription.plugin` — The stable plugin fields come from `subscriptions_get`. Keys inside the service’s data packages are defined by that service.
|
|
87
|
+
|
|
88
|
+
| Field or condition | Meaning and application action |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| `remote_subscription_id` | The subscription ID in the connected service. A numeric value makes the block visible even without detail rows. |
|
|
91
|
+
| `remote_subscription_data_user` | Customer-facing service data. Without `fields`, eligible primitive values become rows. `host` gets a translated label; other keys keep their own names. |
|
|
92
|
+
| `remote_subscription_tariff_usages` | Reported usage for `SubscriptionPlanSummary`. Displayable values here also make this remote block visible, but usage is not repeated in its details list. |
|
|
93
|
+
| `remote_subscription_last_sync` | Last confirmed date/time. An absent date makes the confirmation row say confirmation is pending; it cannot establish the card’s access state. |
|
|
94
|
+
| `remote_subscription_sync_pending` | The separate flag used by the subscription card to choose Pending before checking `active_until`. |
|
|
95
|
+
| No numeric remote ID and no eligible values | The block is hidden, including when `plugin` is absent. A timestamp alone does not make it visible. |
|
|
96
|
+
|
|
97
|
+
### Which package values become rows
|
|
98
|
+
|
|
99
|
+
| Field or condition | Meaning and application action |
|
|
100
|
+
| --- | --- |
|
|
101
|
+
| Strings, numbers and booleans | Show nonblank strings, finite numbers and booleans, including zero and false. Omit null, nested objects, arrays and credential/storage-location keys. |
|
|
102
|
+
| `fields[].key` and `fields[].label` | Select keys in the supplied order and optionally replace labels. Missing or ineligible values stay omitted; selecting a key does not bypass the filtering. |
|
|
103
|
+
| Package `id` equals `remote_subscription_id` | Hide the repeated package ID; the dedicated remote ID row already shows it. |
|
|
104
|
+
| Example package | `host: shop.example` and `enabled: false` produce two rows. A nested `settings` object produces no default row. An explicit fields list containing only `host` shows only that detail. |
|
|
105
|
+
| Custom details | The details slot receives raw service `data` and the filtered `entries`. Custom rendering must choose the fields it intends to display. |
|
|
106
|
+
|
|
107
|
+
### Русский
|
|
108
|
+
|
|
109
|
+
### ID, сведения и подтверждение сервиса
|
|
110
|
+
|
|
111
|
+
`subscription.plugin` — Постоянные поля plugin приходят из `subscriptions_get`. Ключи внутри пакетов данных определяются самим сервисом.
|
|
112
|
+
|
|
113
|
+
| Поле или условие | Значение и действие приложения |
|
|
114
|
+
| --- | --- |
|
|
115
|
+
| `remote_subscription_id` | ID подписки в подключённом сервисе. Числовое значение делает блок видимым даже без дополнительных сведений. |
|
|
116
|
+
| `remote_subscription_data_user` | Данные сервиса для покупателя. Без `fields` подходящие простые значения становятся строками. `host` получает переведённую подпись, другие ключи сохраняют своё имя. |
|
|
117
|
+
| `remote_subscription_tariff_usages` | Показатели для `SubscriptionPlanSummary`. Подходящие значения здесь тоже делают блок сервиса видимым, но не повторяются в его списке сведений. |
|
|
118
|
+
| `remote_subscription_last_sync` | Дата и время последнего подтверждения. Без даты строка сообщает об ожидании подтверждения; состояние доступа по ней не определяется. |
|
|
119
|
+
| `remote_subscription_sync_pending` | Отдельный признак, по которому карточка выбирает ожидание до проверки `active_until`. |
|
|
120
|
+
| Нет числового ID сервиса и подходящих значений | Блок скрывается, в том числе при отсутствии `plugin`. Одной даты подтверждения для видимости недостаточно. |
|
|
121
|
+
|
|
122
|
+
### Какие значения становятся строками
|
|
123
|
+
|
|
124
|
+
| Поле или условие | Значение и действие приложения |
|
|
125
|
+
| --- | --- |
|
|
126
|
+
| Строки, числа и логические значения | Выводятся непустые строки, конечные числа и логические значения, включая ноль и false. Пропускаются null, вложенные объекты, массивы, ключи учётных данных и расположения хранилищ. |
|
|
127
|
+
| `fields[].key` и `fields[].label` | Выбирают ключи в заданном порядке и при необходимости заменяют подпись. Отсутствующие и неподходящие значения пропускаются; выбор ключа не отменяет фильтрацию. |
|
|
128
|
+
| `id` пакета равен `remote_subscription_id` | Повторный ID пакета скрывается: его уже показывает отдельная строка ID сервиса. |
|
|
129
|
+
| Пример пакета | `host: shop.example` и `enabled: false` дают две строки. Вложенный объект `settings` по умолчанию не выводится. Явный список fields только с `host` оставляет лишь это сведение. |
|
|
130
|
+
| Собственные сведения | Слот details получает исходные `data` сервиса и отфильтрованные `entries`. Собственный вывод должен выбирать предназначенные для отображения поля. |
|
|
131
|
+
|
|
132
|
+
[English guide](https://orionmarket.place/en/sandbox/components/nuxt/subscription-remote) · [Русский](https://orionmarket.place/ru/sandbox/components/nuxt/subscription-remote)
|
|
133
|
+
|
|
134
|
+
## Initial service setup / Первичная настройка сервиса
|
|
135
|
+
|
|
136
|
+
Success confirms that the subscription and its paid or trial period are saved. For a connected service, setup continues in the background; a temporary provider outage keeps the purchased period and is retried automatically. Refresh `subscriptions_get` and the wallet balance. Show Pending while `plugin.remote_subscription_sync_pending` is true; `remote_subscription_id` can be null before the service accepts setup. Use this existing subscription instead of submitting another purchase. Automatic renewal is initially disabled.
|
|
137
|
+
|
|
138
|
+
Успех подтверждает сохранение подписки и её оплаченного или пробного периода. Подключённый сервис настраивается в фоне; при временной недоступности сервиса купленный период сохраняется, а настройка повторяется автоматически. Обновите `subscriptions_get` и баланс кошелька. Пока `plugin.remote_subscription_sync_pending` равен true, показывайте ожидание; до принятия настройки сервисом `remote_subscription_id` может быть null. Используйте существующую подписку вместо повторной покупки. Автоматическое продление изначально отключено.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue';
|
|
3
|
+
import { useOrionplaceSelectionsStore } from '@/stores/orionplaceSelections';
|
|
4
|
+
import { subscriptionManageLabels } from '@/utils/orionplace/subscriptionManageLabels';
|
|
5
|
+
import {
|
|
6
|
+
subscriptionHasRemote,
|
|
7
|
+
subscriptionRemoteEntries,
|
|
8
|
+
} from '@/utils/orionplace/subscriptionRemote';
|
|
9
|
+
import type { ISubscriptionRemoteField } from '@/utils/orionplace/subscriptionRemote';
|
|
10
|
+
import type { ICustomerSubscription } from '@/interfaces/orionplace/subscribes/ISubscriptionApi';
|
|
11
|
+
import '@/components/orionplace/shared/features.css';
|
|
12
|
+
|
|
13
|
+
defineSlots<{
|
|
14
|
+
details(properties: {
|
|
15
|
+
data: unknown;
|
|
16
|
+
entries: ReturnType<typeof subscriptionRemoteEntries>;
|
|
17
|
+
}): unknown;
|
|
18
|
+
}>();
|
|
19
|
+
|
|
20
|
+
const props = defineProps<{
|
|
21
|
+
subscription: ICustomerSubscription;
|
|
22
|
+
fields?: ISubscriptionRemoteField[];
|
|
23
|
+
}>();
|
|
24
|
+
const selectionStore = useOrionplaceSelectionsStore();
|
|
25
|
+
const copy = computed(() => subscriptionManageLabels(selectionStore.localeCode));
|
|
26
|
+
const plugin = computed(() => props.subscription.plugin);
|
|
27
|
+
const present = computed(() => subscriptionHasRemote(props.subscription));
|
|
28
|
+
// Keys of the service package that the storefront names itself.
|
|
29
|
+
const named = computed<Record<string, string>>(() => ({
|
|
30
|
+
host: copy.value.remoteHost,
|
|
31
|
+
}));
|
|
32
|
+
/*
|
|
33
|
+
* `remote_subscription_data_user` is the package the subscription service
|
|
34
|
+
* itself returned, so its keys differ from one service to another. Without
|
|
35
|
+
* a declared `fields` list the component shows the plain values; a key the
|
|
36
|
+
* storefront knows, such as `host`, gets its translated name, and any other
|
|
37
|
+
* key keeps its own name. The package's `id` repeats
|
|
38
|
+
* `remote_subscription_id`, which already has its own row, so an equal
|
|
39
|
+
* value is shown once. The usage the service reported belongs to
|
|
40
|
+
* SubscriptionPlanSummary, beside the limits of the plan.
|
|
41
|
+
*/
|
|
42
|
+
const details = computed(() => {
|
|
43
|
+
const remoteId = plugin.value?.remote_subscription_id;
|
|
44
|
+
const entries = subscriptionRemoteEntries(
|
|
45
|
+
plugin.value?.remote_subscription_data_user ?? null,
|
|
46
|
+
props.fields,
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
return entries
|
|
50
|
+
.filter(
|
|
51
|
+
(entry) =>
|
|
52
|
+
!(entry.key === 'id' && entry.value === String(remoteId)),
|
|
53
|
+
)
|
|
54
|
+
.map((entry) => ({
|
|
55
|
+
...entry,
|
|
56
|
+
label:
|
|
57
|
+
entry.label === entry.key
|
|
58
|
+
? (named.value[entry.key] ?? entry.label)
|
|
59
|
+
: entry.label,
|
|
60
|
+
}));
|
|
61
|
+
});
|
|
62
|
+
/*
|
|
63
|
+
* The service clears the sync time while a change is waiting for its
|
|
64
|
+
* confirmation, which is the same condition the card's “being set up”
|
|
65
|
+
* state uses, so the row says that instead of showing an empty date.
|
|
66
|
+
*/
|
|
67
|
+
const synced = computed(() => {
|
|
68
|
+
const moment = plugin.value?.remote_subscription_last_sync;
|
|
69
|
+
|
|
70
|
+
if (!moment?.date) {
|
|
71
|
+
return copy.value.remoteSyncPending;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return `${moment.date} ${moment.time}`.trim();
|
|
75
|
+
});
|
|
76
|
+
</script>
|
|
77
|
+
<template>
|
|
78
|
+
<!--
|
|
79
|
+
The block has no frame of its own: the subscription card places it in its
|
|
80
|
+
footer, so one border separates it from the plan above.
|
|
81
|
+
-->
|
|
82
|
+
<section
|
|
83
|
+
v-if="present"
|
|
84
|
+
class="grid gap-3"
|
|
85
|
+
data-subscription-remote-details
|
|
86
|
+
>
|
|
87
|
+
<h3 class="op-feature-muted m-0 flex items-center gap-2 text-sm font-normal leading-5">
|
|
88
|
+
<svg
|
|
89
|
+
viewBox="0 0 24 24"
|
|
90
|
+
fill="none"
|
|
91
|
+
stroke="currentColor"
|
|
92
|
+
stroke-width="1.5"
|
|
93
|
+
stroke-linecap="round"
|
|
94
|
+
stroke-linejoin="round"
|
|
95
|
+
aria-hidden="true"
|
|
96
|
+
class="h-4 w-4 shrink-0"
|
|
97
|
+
>
|
|
98
|
+
<path
|
|
99
|
+
d="M4 5h16v6H4zM4 13h16v6H4zM8 8h.01M8 16h.01"
|
|
100
|
+
/>
|
|
101
|
+
</svg>
|
|
102
|
+
{{ copy.remoteTitle }}
|
|
103
|
+
</h3>
|
|
104
|
+
<dl class="m-0 grid gap-x-8 gap-y-3 @min-[592px]:grid-cols-2">
|
|
105
|
+
<div
|
|
106
|
+
v-if="typeof plugin?.remote_subscription_id === 'number'"
|
|
107
|
+
class="flex flex-col gap-1"
|
|
108
|
+
>
|
|
109
|
+
<dt class="op-feature-muted">{{ copy.remoteId }}</dt>
|
|
110
|
+
<dd class="m-0 text-sm tabular-nums">
|
|
111
|
+
{{ plugin.remote_subscription_id }}
|
|
112
|
+
</dd>
|
|
113
|
+
</div>
|
|
114
|
+
<div class="flex flex-col gap-1">
|
|
115
|
+
<dt class="op-feature-muted">{{ copy.remoteSync }}</dt>
|
|
116
|
+
<dd class="m-0 text-sm">{{ synced }}</dd>
|
|
117
|
+
</div>
|
|
118
|
+
<slot
|
|
119
|
+
name="details"
|
|
120
|
+
:data="plugin?.remote_subscription_data_user"
|
|
121
|
+
:entries="details"
|
|
122
|
+
>
|
|
123
|
+
<div
|
|
124
|
+
v-for="entry in details"
|
|
125
|
+
:key="entry.key"
|
|
126
|
+
class="flex flex-col gap-1"
|
|
127
|
+
>
|
|
128
|
+
<dt class="op-feature-muted">{{ entry.label }}</dt>
|
|
129
|
+
<dd class="m-0 break-words text-sm">{{ entry.value }}</dd>
|
|
130
|
+
</div>
|
|
131
|
+
</slot>
|
|
132
|
+
</dl>
|
|
133
|
+
</section>
|
|
134
|
+
</template>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Automatic renewal · Nuxt
|
|
2
|
+
|
|
3
|
+
The [automatic renewal dialog](https://orionmarket.place/en/sandbox/components/nuxt/subscription-renewal)
|
|
4
|
+
is `app/components/orionplace/subscriptions/SubscriptionRenewalDialog.vue`,
|
|
5
|
+
nested under My subscriptions in Components. The subscriptions page opens it
|
|
6
|
+
for the `Automatic renewal` action of one subscription.
|
|
7
|
+
|
|
8
|
+
## Contract and dependencies
|
|
9
|
+
|
|
10
|
+
`subscription` is the item of `subscriptions_get` the customer opened. The
|
|
11
|
+
parent passes the resolved plan in `plan`; the dialog reads the selected currency.
|
|
12
|
+
|
|
13
|
+
The choices are “turn automatic renewal off” and every paid period of the plan.
|
|
14
|
+
The current setting is preselected, and the dialog states what the chosen
|
|
15
|
+
option does: renewal stops and the paid period stays available, or the amount
|
|
16
|
+
is charged from the account balance when the paid period ends and the
|
|
17
|
+
subscription continues for the chosen length. An ended subscription starts a paid period immediately only when the balance is sufficient. Otherwise the renewal choice is saved without purchasing a period.
|
|
18
|
+
|
|
19
|
+
`plan` is the plan the subscriptions page read from the subscription's
|
|
20
|
+
`tariff`, and it supplies the paid periods. Without a plan the dialog offers
|
|
21
|
+
turning renewal off, which needs no plan period.
|
|
22
|
+
|
|
23
|
+
`submit` emits `{ existed_subscription, renew_period? }` for
|
|
24
|
+
`subscriptions_change_renew`; a request without `renew_period` turns automatic
|
|
25
|
+
renewal off. The host sends the request and reloads the subscriptions from the
|
|
26
|
+
confirmed response.
|
|
27
|
+
|
|
28
|
+
While the request runs, the controls stay visible and disabled and the dialog
|
|
29
|
+
cannot be dismissed. Field and general errors from `form_errors` stay beside
|
|
30
|
+
the form. `modal` defaults to true; false renders the same dialog inside its
|
|
31
|
+
container. Changing `modal` while the dialog is open switches it in place and
|
|
32
|
+
keeps the entered values and the focused field.
|
|
33
|
+
|
|
34
|
+
## Endpoint coverage
|
|
35
|
+
|
|
36
|
+
- `subscriptions_change_renew`
|
|
37
|
+
|
|
38
|
+
## Related components
|
|
39
|
+
|
|
40
|
+
[My subscriptions](https://orionmarket.place/en/sandbox/components/nuxt/subscriptions),
|
|
41
|
+
[Subscription renewal payment](https://orionmarket.place/en/sandbox/components/nuxt/subscription-extend),
|
|
42
|
+
[Subscription plans](https://orionmarket.place/en/sandbox/components/nuxt/subscription-plans).
|
|
43
|
+
## Response fields and application actions
|
|
44
|
+
|
|
45
|
+
The following tables describe the response and the supplied composition’s follow-up actions. The framework-specific props and events above identify which work belongs to the component and which belongs to its parent.
|
|
46
|
+
|
|
47
|
+
### English
|
|
48
|
+
|
|
49
|
+
### What the dialog submits
|
|
50
|
+
|
|
51
|
+
| Field or condition | Meaning and application action |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| `existed_subscription` | Purchased subscription ID from `subscriptions_get` → `page_data.data[].id`. |
|
|
54
|
+
| `renew_period` | The selected plan price’s `tariff_cost_id`. The optional `plan` prop supplies the choices. Omit the field to turn renewal off; without a plan, the dialog can still offer disabling an existing setting. |
|
|
55
|
+
|
|
56
|
+
### What a successful save means
|
|
57
|
+
|
|
58
|
+
| Field or condition | Meaning and application action |
|
|
59
|
+
| --- | --- |
|
|
60
|
+
| No `renew_period` | Automatic renewal is disabled. This request purchases no period; already paid access continues to its end date. |
|
|
61
|
+
| An active or future paid period exists | The renewal choice is saved. This request does not purchase another period immediately. |
|
|
62
|
+
| No available paid period; sufficient balance | The selected period, including its applicable option charge, is paid from the balance and starts immediately. |
|
|
63
|
+
| No available paid period; insufficient balance | The renewal choice is saved successfully, but no period is purchased. Show the current end date and balance; the customer needs to fund the balance before a renewal can be paid. |
|
|
64
|
+
| After `submit` | The host sends the request and reloads `subscriptions_get` and `profile_get`. `renew_period` confirms the saved choice; `active_until` and the synchronization flag determine access status. Success alone confirms the setting, not renewed access. |
|
|
65
|
+
|
|
66
|
+
### Русский
|
|
67
|
+
|
|
68
|
+
### Что передаёт окно
|
|
69
|
+
|
|
70
|
+
| Поле или условие | Значение и действие приложения |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| `existed_subscription` | ID купленной подписки из `subscriptions_get` → `page_data.data[].id`. |
|
|
73
|
+
| `renew_period` | `tariff_cost_id` выбранной цены тарифа. Варианты берутся из необязательного свойства `plan`. Пропустите поле для отключения продления; без тарифа окно всё ещё позволяет отключить существующую настройку. |
|
|
74
|
+
|
|
75
|
+
### Что означает успешное сохранение
|
|
76
|
+
|
|
77
|
+
| Поле или условие | Значение и действие приложения |
|
|
78
|
+
| --- | --- |
|
|
79
|
+
| Нет `renew_period` | Автопродление отключается. Запрос не покупает период; оплаченный доступ сохраняется до своей даты окончания. |
|
|
80
|
+
| Есть активный или будущий оплаченный период | Выбор продления сохраняется. Этот запрос не покупает дополнительный период немедленно. |
|
|
81
|
+
| Нет доступного оплаченного периода; средств достаточно | Выбранный период с применимой доплатой за опцию оплачивается с баланса и начинается сразу. |
|
|
82
|
+
| Нет доступного оплаченного периода; средств недостаточно | Настройка продления успешно сохраняется, но период не покупается. Покажите текущую дату окончания и баланс; для оплаты продления покупателю нужно пополнить баланс. |
|
|
83
|
+
| После `submit` | Родитель отправляет запрос и загружает `subscriptions_get` и `profile_get`. `renew_period` подтверждает настройку; `active_until` и признак синхронизации определяют состояние доступа. Успех сам по себе подтверждает сохранение настройки, но не новый оплаченный доступ. |
|
|
84
|
+
|
|
85
|
+
[English guide](https://orionmarket.place/en/sandbox/components/nuxt/subscription-renewal) · [Русский](https://orionmarket.place/ru/sandbox/components/nuxt/subscription-renewal)
|