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,863 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue';
|
|
3
|
+
import { NuxtLink } from '#components';
|
|
4
|
+
import { useOrionplaceSelectionsStore } from '@/stores/orionplaceSelections';
|
|
5
|
+
import { useOrionplaceWallet } from '@/composables/useOrionplaceWallet';
|
|
6
|
+
import { featureLabels } from '@/utils/orionplace/featureLabels';
|
|
7
|
+
import { formatCurrency } from '@/utils/orionplace/currency';
|
|
8
|
+
import { getAvailableNestedValueFromObject } from '@/utils/orionplace/presentation';
|
|
9
|
+
import {
|
|
10
|
+
walletComment,
|
|
11
|
+
walletOutgoing,
|
|
12
|
+
walletPurpose,
|
|
13
|
+
walletRelation,
|
|
14
|
+
} from '@/utils/orionplace/walletTransaction';
|
|
15
|
+
import { EInvoiceStatus } from '@/interfaces/orionplace/payments/IInvoice';
|
|
16
|
+
import WalletBalance from '@/components/orionplace/wallet/WalletBalance.vue';
|
|
17
|
+
import WalletTopUpForm from '@/components/orionplace/wallet/WalletTopUpForm.vue';
|
|
18
|
+
import PaymentPanel from '@/components/orionplace/payments/PaymentPanel.vue';
|
|
19
|
+
import StorefrontPagination from '@/components/orionplace/shared/StorefrontPagination.vue';
|
|
20
|
+
import '@/components/orionplace/shared/features.css';
|
|
21
|
+
import OrionplaceEmptyState from '@/components/orionplace/shared/OrionplaceEmptyState.vue';
|
|
22
|
+
import OrionplaceImage from '@/components/orionplace/shared/OrionplaceImage.vue';
|
|
23
|
+
import type {
|
|
24
|
+
IWalletRelation,
|
|
25
|
+
WalletPurpose,
|
|
26
|
+
} from '@/utils/orionplace/walletTransaction';
|
|
27
|
+
import type { IInvoiceRefund } from '@/interfaces/orionplace/payments/IInvoice';
|
|
28
|
+
|
|
29
|
+
const selectionStore = useOrionplaceSelectionsStore();
|
|
30
|
+
const wallet = useOrionplaceWallet();
|
|
31
|
+
const labels = computed(() => featureLabels(selectionStore.localeCode));
|
|
32
|
+
const tabs = ['wallet', 'orders', 'paid_subs'] as const;
|
|
33
|
+
const busy = computed(() => Boolean(wallet.task.state.pending));
|
|
34
|
+
// 24 × 24 stroke icons: the wallet itself and one per kind of payment.
|
|
35
|
+
const icons = {
|
|
36
|
+
wallet: 'M3 7h16v12H3zM3 7l12-3v3M16 13h.01M19 11h-4v4h4',
|
|
37
|
+
history: 'M12 7v5l3 2M3 12a9 9 0 1 0 3-6.7M3 4v4h4',
|
|
38
|
+
invoice: 'M6 3h12v18l-3-2-3 2-3-2-3 2zM9 8h6M9 12h6',
|
|
39
|
+
topUp: 'M3 7h16v12H3zM11 10v6M8 13h6',
|
|
40
|
+
deduction: 'M3 7h16v12H3zM8 13h6',
|
|
41
|
+
orderPayment: 'M5 8h14l-1 12H6zM9 8V6a3 3 0 0 1 6 0v2',
|
|
42
|
+
subscriptionPayment:
|
|
43
|
+
'M4 12a8 8 0 0 1 14-5.3L20 9M20 4v5h-5M20 12a8 8 0 0 1-14 5.3L4 15M4 20v-5h5',
|
|
44
|
+
bonus: 'M4 11h16v9H4zM3 7h18v4H3zM12 7v13M12 7c-2-4-6-3-5 0M12 7c2-4 6-3 5 0',
|
|
45
|
+
refund: 'M9 14 4 9l5-5M4 9h11a5 5 0 0 1 0 10h-3',
|
|
46
|
+
} as const;
|
|
47
|
+
|
|
48
|
+
/*
|
|
49
|
+
* The record a payment belongs to keeps the selected language, like every
|
|
50
|
+
* other storefront address. An order opens its own details; a subscription
|
|
51
|
+
* payment opens the subscriptions section, because the response names the
|
|
52
|
+
* paid subscription without a page of its own.
|
|
53
|
+
*/
|
|
54
|
+
function relationLink(relation: IWalletRelation) {
|
|
55
|
+
const locale = selectionStore.localeCode;
|
|
56
|
+
const wording = labels.value.wallet;
|
|
57
|
+
|
|
58
|
+
if (relation.kind === 'order') {
|
|
59
|
+
return {
|
|
60
|
+
to: { path: '/orders', query: { order: relation.id, locale } },
|
|
61
|
+
label: `${wording.relatedOrder} #${relation.id}`,
|
|
62
|
+
hint: wording.openOrder,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
to: { path: '/subscriptions', query: { locale } },
|
|
68
|
+
label: `${wording.relatedSubscription} #${relation.id}`,
|
|
69
|
+
hint: wording.openSubscription,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function purposeIcon(purpose: WalletPurpose | null) {
|
|
74
|
+
return purpose ? icons[purpose] : icons.invoice;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// The badge colour follows the invoice state: paid, waiting for payment,
|
|
78
|
+
// refused by the payment provider, or closed without payment. A refund
|
|
79
|
+
// carries the same states.
|
|
80
|
+
function statusTone(status: EInvoiceStatus) {
|
|
81
|
+
if (status === EInvoiceStatus.COMPLETED) {
|
|
82
|
+
return 'success';
|
|
83
|
+
}
|
|
84
|
+
if (status === EInvoiceStatus.CREATED) {
|
|
85
|
+
return 'attention';
|
|
86
|
+
}
|
|
87
|
+
if (
|
|
88
|
+
status === EInvoiceStatus.FAILED ||
|
|
89
|
+
status === EInvoiceStatus.FRAUD
|
|
90
|
+
) {
|
|
91
|
+
return 'danger';
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return 'neutral';
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// The state name in the reader's language; a state the storefront does
|
|
98
|
+
// not know yet keeps the backend's name.
|
|
99
|
+
function statusLabel(status: IInvoiceRefund['status']) {
|
|
100
|
+
return labels.value.wallet.statuses[status.int] ?? status.text;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function money(amounts: IInvoiceRefund['amount']) {
|
|
104
|
+
return formatCurrency(
|
|
105
|
+
amounts[selectionStore.currencyId]?.transform_value,
|
|
106
|
+
selectionStore.currentCurrency,
|
|
107
|
+
selectionStore.localeCode,
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// A positive amount reads green and a negative amount red; zero and an
|
|
112
|
+
// amount missing in the selected currency keep the text colour.
|
|
113
|
+
function amountTone(amounts: IInvoiceRefund['amount']) {
|
|
114
|
+
const value = Number(amounts[selectionStore.currencyId]?.transform_value);
|
|
115
|
+
|
|
116
|
+
if (!Number.isFinite(value) || value === 0) {
|
|
117
|
+
return '';
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return value < 0 ? 'text-orionplace-danger' : 'text-orionplace-success';
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// A payment reads as money going out: a minus and the text colour.
|
|
124
|
+
function invoiceAmount(amounts: IInvoiceRefund['amount'], outgoing: boolean) {
|
|
125
|
+
const value = amounts[selectionStore.currencyId]?.transform_value;
|
|
126
|
+
const text = formatCurrency(
|
|
127
|
+
outgoing && value != null ? Math.abs(Number(value)) : value,
|
|
128
|
+
selectionStore.currentCurrency,
|
|
129
|
+
selectionStore.localeCode,
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
return outgoing && Number(value) ? `−${text}` : text;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function refundDestination(refund: IInvoiceRefund) {
|
|
136
|
+
return refund.to_balance
|
|
137
|
+
? labels.value.wallet.refundToBalance
|
|
138
|
+
: labels.value.wallet.refundToMethod;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const rows = computed(() =>
|
|
142
|
+
wallet.invoices.value.map((invoice) => {
|
|
143
|
+
const relation = walletRelation(invoice);
|
|
144
|
+
const purpose = walletPurpose(invoice);
|
|
145
|
+
|
|
146
|
+
return {
|
|
147
|
+
invoice,
|
|
148
|
+
link: relation ? relationLink(relation) : null,
|
|
149
|
+
comment: walletComment(invoice),
|
|
150
|
+
title: purpose
|
|
151
|
+
? labels.value.wallet.purpose[purpose]
|
|
152
|
+
: labels.value.wallet.invoice,
|
|
153
|
+
icon: purposeIcon(purpose),
|
|
154
|
+
outgoing: walletOutgoing(purpose),
|
|
155
|
+
tone: statusTone(invoice.status.int),
|
|
156
|
+
method: getAvailableNestedValueFromObject(
|
|
157
|
+
invoice.payment_method?.locale,
|
|
158
|
+
selectionStore.localeCode,
|
|
159
|
+
'payment_name',
|
|
160
|
+
),
|
|
161
|
+
methodLogo: invoice.payment_method?.logo || '',
|
|
162
|
+
};
|
|
163
|
+
}),
|
|
164
|
+
);
|
|
165
|
+
</script>
|
|
166
|
+
|
|
167
|
+
<template>
|
|
168
|
+
<section
|
|
169
|
+
class="op-feature @container flex flex-col gap-6"
|
|
170
|
+
:aria-busy="busy"
|
|
171
|
+
>
|
|
172
|
+
<div class="flex min-w-0 flex-col gap-2">
|
|
173
|
+
<h1 class="commerce-title">{{ labels.wallet.title }}</h1>
|
|
174
|
+
<p class="op-feature-copy op-feature-muted">
|
|
175
|
+
{{ labels.wallet.description }}
|
|
176
|
+
</p>
|
|
177
|
+
</div>
|
|
178
|
+
<!-- The balance card carries the top-up, the action it leads to. -->
|
|
179
|
+
<div class="commerce-balance">
|
|
180
|
+
<div class="flex min-w-0 items-center gap-4">
|
|
181
|
+
<span
|
|
182
|
+
class="commerce-icon-tile h-12 w-12"
|
|
183
|
+
aria-hidden="true"
|
|
184
|
+
>
|
|
185
|
+
<svg
|
|
186
|
+
viewBox="0 0 24 24"
|
|
187
|
+
fill="none"
|
|
188
|
+
stroke="currentColor"
|
|
189
|
+
stroke-width="1.5"
|
|
190
|
+
stroke-linecap="round"
|
|
191
|
+
stroke-linejoin="round"
|
|
192
|
+
class="h-6 w-6"
|
|
193
|
+
>
|
|
194
|
+
<path :d="icons.wallet" />
|
|
195
|
+
</svg>
|
|
196
|
+
</span>
|
|
197
|
+
<WalletBalance :label="labels.balance" />
|
|
198
|
+
</div>
|
|
199
|
+
<button
|
|
200
|
+
type="button"
|
|
201
|
+
class="commerce-button commerce-primary"
|
|
202
|
+
data-wallet-top-up
|
|
203
|
+
:disabled="busy"
|
|
204
|
+
:aria-label="labels.wallet.topUp"
|
|
205
|
+
@click="wallet.openTopUp()"
|
|
206
|
+
>
|
|
207
|
+
<svg
|
|
208
|
+
viewBox="0 0 20 20"
|
|
209
|
+
fill="none"
|
|
210
|
+
stroke="currentColor"
|
|
211
|
+
stroke-width="1.5"
|
|
212
|
+
stroke-linecap="round"
|
|
213
|
+
stroke-linejoin="round"
|
|
214
|
+
aria-hidden="true"
|
|
215
|
+
class="h-4 w-4 shrink-0"
|
|
216
|
+
>
|
|
217
|
+
<path d="M10 4.5v11M4.5 10h11" />
|
|
218
|
+
</svg>
|
|
219
|
+
{{ labels.wallet.topUpAction }}
|
|
220
|
+
</button>
|
|
221
|
+
</div>
|
|
222
|
+
<p
|
|
223
|
+
v-if="wallet.task.state.error"
|
|
224
|
+
class="op-notice op-notice-error"
|
|
225
|
+
role="alert"
|
|
226
|
+
>
|
|
227
|
+
{{ wallet.task.state.error }}
|
|
228
|
+
</p>
|
|
229
|
+
<WalletTopUpForm
|
|
230
|
+
v-if="wallet.topUp.value"
|
|
231
|
+
:methods="wallet.methods.value"
|
|
232
|
+
:pending="busy"
|
|
233
|
+
:errors="wallet.task.state.fields"
|
|
234
|
+
data-feature-part="WalletTopUpForm"
|
|
235
|
+
@submit="wallet.create"
|
|
236
|
+
@cancel="wallet.topUp.value = false"
|
|
237
|
+
/>
|
|
238
|
+
<PaymentPanel
|
|
239
|
+
v-if="wallet.payment.value"
|
|
240
|
+
:payment="wallet.payment.value"
|
|
241
|
+
:pending="busy"
|
|
242
|
+
data-feature-part="PaymentPanel"
|
|
243
|
+
@refresh="wallet.refreshPayment()"
|
|
244
|
+
@close="wallet.closePayment()"
|
|
245
|
+
/>
|
|
246
|
+
<section class="commerce-panel">
|
|
247
|
+
<div class="commerce-panel-head">
|
|
248
|
+
<h2 class="commerce-subtitle flex items-center gap-2">
|
|
249
|
+
<svg
|
|
250
|
+
viewBox="0 0 24 24"
|
|
251
|
+
fill="none"
|
|
252
|
+
stroke="currentColor"
|
|
253
|
+
stroke-width="1.5"
|
|
254
|
+
stroke-linecap="round"
|
|
255
|
+
stroke-linejoin="round"
|
|
256
|
+
aria-hidden="true"
|
|
257
|
+
class="h-4 w-4 shrink-0"
|
|
258
|
+
>
|
|
259
|
+
<path :d="icons.history" />
|
|
260
|
+
</svg>
|
|
261
|
+
{{ labels.wallet.history }}
|
|
262
|
+
</h2>
|
|
263
|
+
<button
|
|
264
|
+
class="commerce-text-button"
|
|
265
|
+
type="button"
|
|
266
|
+
:disabled="busy"
|
|
267
|
+
@click="wallet.load(wallet.pagination.value.page)"
|
|
268
|
+
>
|
|
269
|
+
<svg
|
|
270
|
+
viewBox="0 0 20 20"
|
|
271
|
+
fill="none"
|
|
272
|
+
stroke="currentColor"
|
|
273
|
+
stroke-width="1.5"
|
|
274
|
+
stroke-linecap="round"
|
|
275
|
+
stroke-linejoin="round"
|
|
276
|
+
aria-hidden="true"
|
|
277
|
+
class="h-3.5 w-3.5 shrink-0"
|
|
278
|
+
>
|
|
279
|
+
<path d="M15.5 8A6 6 0 0 0 4.7 6.5M4.5 3.5v3h3" />
|
|
280
|
+
<path d="M4.5 12a6 6 0 0 0 10.8 1.5M15.5 16.5v-3h-3" />
|
|
281
|
+
</svg>
|
|
282
|
+
{{ labels.refresh }}
|
|
283
|
+
</button>
|
|
284
|
+
</div>
|
|
285
|
+
<nav class="commerce-tabs">
|
|
286
|
+
<button
|
|
287
|
+
class="commerce-tab"
|
|
288
|
+
v-for="tab in tabs"
|
|
289
|
+
:key="tab"
|
|
290
|
+
type="button"
|
|
291
|
+
:aria-current="wallet.category.value === tab ? 'page' : undefined"
|
|
292
|
+
:disabled="busy"
|
|
293
|
+
@click="wallet.selectCategory(tab)"
|
|
294
|
+
>
|
|
295
|
+
{{ labels.wallet[tab] }}
|
|
296
|
+
</button>
|
|
297
|
+
</nav>
|
|
298
|
+
<p
|
|
299
|
+
v-if="busy && !wallet.loaded.value"
|
|
300
|
+
class="op-feature-loading min-h-40 m-0 px-5 @min-[592px]:px-6"
|
|
301
|
+
role="status"
|
|
302
|
+
>
|
|
303
|
+
<span class="sr-only">{{ labels.loading }}</span>
|
|
304
|
+
</p>
|
|
305
|
+
<OrionplaceEmptyState
|
|
306
|
+
v-else-if="wallet.loaded.value && !wallet.invoices.value.length"
|
|
307
|
+
class="px-5 py-8 @min-[592px]:px-6"
|
|
308
|
+
kind="wallet"
|
|
309
|
+
:message="labels.wallet.empty"
|
|
310
|
+
/>
|
|
311
|
+
<ul class="commerce-rows">
|
|
312
|
+
<li
|
|
313
|
+
v-for="{
|
|
314
|
+
invoice,
|
|
315
|
+
link,
|
|
316
|
+
comment,
|
|
317
|
+
title,
|
|
318
|
+
icon,
|
|
319
|
+
outgoing,
|
|
320
|
+
tone,
|
|
321
|
+
method,
|
|
322
|
+
methodLogo,
|
|
323
|
+
} in rows"
|
|
324
|
+
:key="invoice.id"
|
|
325
|
+
class="
|
|
326
|
+
commerce-row grid items-start gap-x-3 gap-y-3
|
|
327
|
+
grid-cols-[auto_minmax(0,1fr)_auto] @min-[592px]:gap-x-4
|
|
328
|
+
"
|
|
329
|
+
data-wallet-invoice
|
|
330
|
+
>
|
|
331
|
+
<span
|
|
332
|
+
class="commerce-icon-tile h-10 w-10 overflow-hidden"
|
|
333
|
+
aria-hidden="true"
|
|
334
|
+
>
|
|
335
|
+
<!--
|
|
336
|
+
The logo of the payment method identifies the payment; a
|
|
337
|
+
method without a logo keeps the icon of what the money did.
|
|
338
|
+
-->
|
|
339
|
+
<OrionplaceImage
|
|
340
|
+
v-if="methodLogo"
|
|
341
|
+
:src="methodLogo"
|
|
342
|
+
alt=""
|
|
343
|
+
class="box-border h-full w-full object-contain p-1"
|
|
344
|
+
data-wallet-method-logo
|
|
345
|
+
/>
|
|
346
|
+
<svg
|
|
347
|
+
v-else
|
|
348
|
+
viewBox="0 0 24 24"
|
|
349
|
+
fill="none"
|
|
350
|
+
stroke="currentColor"
|
|
351
|
+
stroke-width="1.5"
|
|
352
|
+
stroke-linecap="round"
|
|
353
|
+
stroke-linejoin="round"
|
|
354
|
+
class="h-5 w-5"
|
|
355
|
+
>
|
|
356
|
+
<path :d="icon" />
|
|
357
|
+
</svg>
|
|
358
|
+
</span>
|
|
359
|
+
<div class="flex min-w-0 flex-col gap-2">
|
|
360
|
+
<!--
|
|
361
|
+
The invoice number opens the row with the date and the payment
|
|
362
|
+
method beside it; what the money did is the line below.
|
|
363
|
+
-->
|
|
364
|
+
<div class="flex flex-wrap items-center gap-x-3 gap-y-1">
|
|
365
|
+
<span
|
|
366
|
+
class="commerce-number"
|
|
367
|
+
data-wallet-invoice-number
|
|
368
|
+
>
|
|
369
|
+
{{ labels.wallet.invoice }} #{{ invoice.id }}
|
|
370
|
+
</span>
|
|
371
|
+
<span class="commerce-meta">
|
|
372
|
+
{{ invoice.dates.created.date }}
|
|
373
|
+
{{ invoice.dates.created.time }}
|
|
374
|
+
<template v-if="method">
|
|
375
|
+
· <span data-wallet-method>{{ method }}</span>
|
|
376
|
+
</template>
|
|
377
|
+
</span>
|
|
378
|
+
</div>
|
|
379
|
+
<p
|
|
380
|
+
class="m-0 text-sm text-orionplace-text"
|
|
381
|
+
data-wallet-purpose
|
|
382
|
+
>
|
|
383
|
+
{{ title }}
|
|
384
|
+
</p>
|
|
385
|
+
<NuxtLink
|
|
386
|
+
v-if="link"
|
|
387
|
+
class="commerce-link"
|
|
388
|
+
:to="link.to"
|
|
389
|
+
:aria-label="link.hint"
|
|
390
|
+
:title="link.hint"
|
|
391
|
+
>
|
|
392
|
+
{{ link.label }}
|
|
393
|
+
</NuxtLink>
|
|
394
|
+
</div>
|
|
395
|
+
<!--
|
|
396
|
+
The references, refunds and actions start where the invoice
|
|
397
|
+
number starts, so every line of the payment shares one left edge;
|
|
398
|
+
they also use the width under the amount.
|
|
399
|
+
-->
|
|
400
|
+
<div class="col-start-2 col-span-2 flex min-w-0 flex-col gap-3">
|
|
401
|
+
<dl
|
|
402
|
+
v-if="invoice.merchant_transaction_id || comment"
|
|
403
|
+
class="commerce-reference"
|
|
404
|
+
>
|
|
405
|
+
<div
|
|
406
|
+
v-if="invoice.merchant_transaction_id"
|
|
407
|
+
class="commerce-reference-item"
|
|
408
|
+
>
|
|
409
|
+
<dt>{{ labels.wallet.transactionId }}</dt>
|
|
410
|
+
<dd>{{ invoice.merchant_transaction_id }}</dd>
|
|
411
|
+
</div>
|
|
412
|
+
<div
|
|
413
|
+
v-if="comment"
|
|
414
|
+
class="commerce-reference-item commerce-reference-note"
|
|
415
|
+
>
|
|
416
|
+
<dt>{{ labels.wallet.comment }}</dt>
|
|
417
|
+
<dd>{{ comment }}</dd>
|
|
418
|
+
</div>
|
|
419
|
+
</dl>
|
|
420
|
+
<!--
|
|
421
|
+
Refunds of this payment stay inside it, so the money returned
|
|
422
|
+
is read next to the payment it came from.
|
|
423
|
+
-->
|
|
424
|
+
<ul
|
|
425
|
+
v-if="invoice.refunds?.length"
|
|
426
|
+
class="commerce-refunds"
|
|
427
|
+
:aria-label="labels.wallet.refunds"
|
|
428
|
+
data-wallet-refunds
|
|
429
|
+
>
|
|
430
|
+
<li
|
|
431
|
+
v-for="refund in invoice.refunds"
|
|
432
|
+
:key="refund.id"
|
|
433
|
+
class="commerce-refund"
|
|
434
|
+
data-wallet-refund
|
|
435
|
+
>
|
|
436
|
+
<svg
|
|
437
|
+
viewBox="0 0 24 24"
|
|
438
|
+
fill="none"
|
|
439
|
+
stroke="currentColor"
|
|
440
|
+
stroke-width="1.5"
|
|
441
|
+
stroke-linecap="round"
|
|
442
|
+
stroke-linejoin="round"
|
|
443
|
+
aria-hidden="true"
|
|
444
|
+
class="mt-0.5 h-4 w-4 shrink-0 text-orionplace-muted"
|
|
445
|
+
>
|
|
446
|
+
<path :d="icons.refund" />
|
|
447
|
+
</svg>
|
|
448
|
+
<div class="flex min-w-0 flex-col gap-1">
|
|
449
|
+
<div class="flex flex-wrap items-center gap-x-3 gap-y-1">
|
|
450
|
+
<span class="commerce-number">
|
|
451
|
+
{{ labels.wallet.invoice }} #{{ refund.id }}
|
|
452
|
+
</span>
|
|
453
|
+
<span class="commerce-meta">
|
|
454
|
+
{{ refund.dates.created.date }}
|
|
455
|
+
{{ refund.dates.created.time }}
|
|
456
|
+
</span>
|
|
457
|
+
</div>
|
|
458
|
+
<p class="m-0 text-sm text-orionplace-text">
|
|
459
|
+
{{ labels.wallet.purpose.refund }}
|
|
460
|
+
<span class="text-orionplace-muted">
|
|
461
|
+
· {{ refundDestination(refund) }}
|
|
462
|
+
</span>
|
|
463
|
+
</p>
|
|
464
|
+
</div>
|
|
465
|
+
<div class="flex flex-col items-end gap-1.5 text-right">
|
|
466
|
+
<span
|
|
467
|
+
class="commerce-badge"
|
|
468
|
+
:data-tone="statusTone(refund.status.int)"
|
|
469
|
+
>
|
|
470
|
+
{{ statusLabel(refund.status) }}
|
|
471
|
+
</span>
|
|
472
|
+
<span
|
|
473
|
+
class="text-sm font-medium tabular-nums"
|
|
474
|
+
:class="amountTone(refund.amount)"
|
|
475
|
+
>
|
|
476
|
+
{{ money(refund.amount) }}
|
|
477
|
+
</span>
|
|
478
|
+
</div>
|
|
479
|
+
<dl
|
|
480
|
+
v-if="refund.merchant_transaction_id || refund.comment"
|
|
481
|
+
class="commerce-reference col-start-2 col-span-2 mt-2"
|
|
482
|
+
>
|
|
483
|
+
<div
|
|
484
|
+
v-if="refund.merchant_transaction_id"
|
|
485
|
+
class="commerce-reference-item"
|
|
486
|
+
>
|
|
487
|
+
<dt>{{ labels.wallet.transactionId }}</dt>
|
|
488
|
+
<dd>{{ refund.merchant_transaction_id }}</dd>
|
|
489
|
+
</div>
|
|
490
|
+
<div
|
|
491
|
+
v-if="refund.comment"
|
|
492
|
+
class="commerce-reference-item commerce-reference-note"
|
|
493
|
+
>
|
|
494
|
+
<dt>{{ labels.wallet.comment }}</dt>
|
|
495
|
+
<dd>{{ refund.comment }}</dd>
|
|
496
|
+
</div>
|
|
497
|
+
</dl>
|
|
498
|
+
</li>
|
|
499
|
+
</ul>
|
|
500
|
+
<div class="op-feature-actions">
|
|
501
|
+
<button
|
|
502
|
+
class="commerce-button"
|
|
503
|
+
v-if="
|
|
504
|
+
invoice.status.int === EInvoiceStatus.CREATED &&
|
|
505
|
+
invoice.payment_generated_link
|
|
506
|
+
"
|
|
507
|
+
type="button"
|
|
508
|
+
data-invoice-pay
|
|
509
|
+
:disabled="busy"
|
|
510
|
+
@click="
|
|
511
|
+
wallet.payment.value = {
|
|
512
|
+
link: invoice.payment_generated_link,
|
|
513
|
+
link_type: invoice.link_type,
|
|
514
|
+
}
|
|
515
|
+
"
|
|
516
|
+
>
|
|
517
|
+
<svg
|
|
518
|
+
viewBox="0 0 20 20"
|
|
519
|
+
fill="none"
|
|
520
|
+
stroke="currentColor"
|
|
521
|
+
stroke-width="1.5"
|
|
522
|
+
stroke-linecap="round"
|
|
523
|
+
stroke-linejoin="round"
|
|
524
|
+
aria-hidden="true"
|
|
525
|
+
class="h-4 w-4 shrink-0"
|
|
526
|
+
>
|
|
527
|
+
<rect
|
|
528
|
+
x="2.5"
|
|
529
|
+
y="4.5"
|
|
530
|
+
width="15"
|
|
531
|
+
height="11"
|
|
532
|
+
/>
|
|
533
|
+
<path d="M2.5 8h15M5.5 12.5h3" />
|
|
534
|
+
</svg>
|
|
535
|
+
{{ labels.wallet.pay }}
|
|
536
|
+
</button>
|
|
537
|
+
<button
|
|
538
|
+
class="commerce-button"
|
|
539
|
+
v-if="
|
|
540
|
+
invoice.status.int === EInvoiceStatus.CREATED &&
|
|
541
|
+
invoice.transaction_type === 'wallet'
|
|
542
|
+
"
|
|
543
|
+
type="button"
|
|
544
|
+
:disabled="busy"
|
|
545
|
+
data-invoice-cancel
|
|
546
|
+
@click="wallet.confirmation.value = invoice.id"
|
|
547
|
+
>
|
|
548
|
+
<svg
|
|
549
|
+
viewBox="0 0 20 20"
|
|
550
|
+
fill="none"
|
|
551
|
+
stroke="currentColor"
|
|
552
|
+
stroke-width="1.5"
|
|
553
|
+
stroke-linecap="round"
|
|
554
|
+
stroke-linejoin="round"
|
|
555
|
+
aria-hidden="true"
|
|
556
|
+
class="h-4 w-4 shrink-0"
|
|
557
|
+
>
|
|
558
|
+
<circle
|
|
559
|
+
cx="10"
|
|
560
|
+
cy="10"
|
|
561
|
+
r="7.5"
|
|
562
|
+
/>
|
|
563
|
+
<path d="M7.5 7.5l5 5m0-5-5 5" />
|
|
564
|
+
</svg>
|
|
565
|
+
{{ labels.wallet.cancelInvoice }}
|
|
566
|
+
</button>
|
|
567
|
+
</div>
|
|
568
|
+
<div
|
|
569
|
+
v-if="wallet.confirmation.value === invoice.id"
|
|
570
|
+
class="op-feature-stack"
|
|
571
|
+
>
|
|
572
|
+
<p class="op-feature-copy">{{ labels.wallet.cancelQuestion }}</p>
|
|
573
|
+
<div class="op-feature-actions">
|
|
574
|
+
<button
|
|
575
|
+
class="commerce-button"
|
|
576
|
+
type="button"
|
|
577
|
+
:disabled="busy"
|
|
578
|
+
@click="wallet.cancel(invoice)"
|
|
579
|
+
>
|
|
580
|
+
<svg
|
|
581
|
+
viewBox="0 0 20 20"
|
|
582
|
+
fill="none"
|
|
583
|
+
stroke="currentColor"
|
|
584
|
+
stroke-width="1.5"
|
|
585
|
+
stroke-linecap="round"
|
|
586
|
+
stroke-linejoin="round"
|
|
587
|
+
aria-hidden="true"
|
|
588
|
+
class="h-4 w-4 shrink-0"
|
|
589
|
+
>
|
|
590
|
+
<circle
|
|
591
|
+
cx="10"
|
|
592
|
+
cy="10"
|
|
593
|
+
r="7.5"
|
|
594
|
+
/>
|
|
595
|
+
<path d="M7.5 7.5l5 5m0-5-5 5" />
|
|
596
|
+
</svg>
|
|
597
|
+
{{ labels.wallet.cancelInvoice }}
|
|
598
|
+
</button>
|
|
599
|
+
<button
|
|
600
|
+
class="commerce-button"
|
|
601
|
+
type="button"
|
|
602
|
+
:disabled="busy"
|
|
603
|
+
@click="wallet.confirmation.value = undefined"
|
|
604
|
+
>
|
|
605
|
+
<svg
|
|
606
|
+
viewBox="0 0 20 20"
|
|
607
|
+
fill="none"
|
|
608
|
+
stroke="currentColor"
|
|
609
|
+
stroke-width="1.5"
|
|
610
|
+
stroke-linecap="round"
|
|
611
|
+
stroke-linejoin="round"
|
|
612
|
+
aria-hidden="true"
|
|
613
|
+
class="h-4 w-4 shrink-0"
|
|
614
|
+
>
|
|
615
|
+
<path d="M16 10H4m4-4-4 4 4 4" />
|
|
616
|
+
</svg>
|
|
617
|
+
{{ labels.back }}
|
|
618
|
+
</button>
|
|
619
|
+
</div>
|
|
620
|
+
</div>
|
|
621
|
+
</div>
|
|
622
|
+
<!--
|
|
623
|
+
The state of the payment stands level with the invoice number,
|
|
624
|
+
and its amount level with the description below.
|
|
625
|
+
-->
|
|
626
|
+
<div
|
|
627
|
+
class="
|
|
628
|
+
col-start-3 row-start-1
|
|
629
|
+
flex flex-col items-end gap-1.5 text-right
|
|
630
|
+
"
|
|
631
|
+
>
|
|
632
|
+
<span
|
|
633
|
+
class="commerce-badge"
|
|
634
|
+
:data-tone="tone"
|
|
635
|
+
>
|
|
636
|
+
{{ statusLabel(invoice.status) }}
|
|
637
|
+
</span>
|
|
638
|
+
<span
|
|
639
|
+
class="text-base font-medium tabular-nums"
|
|
640
|
+
:class="outgoing ? '' : amountTone(invoice.amount)"
|
|
641
|
+
>
|
|
642
|
+
{{ invoiceAmount(invoice.amount, outgoing) }}
|
|
643
|
+
</span>
|
|
644
|
+
</div>
|
|
645
|
+
</li>
|
|
646
|
+
</ul>
|
|
647
|
+
</section>
|
|
648
|
+
<StorefrontPagination
|
|
649
|
+
:pagination="wallet.pagination.value"
|
|
650
|
+
:pending="busy"
|
|
651
|
+
data-feature-part="StorefrontPagination"
|
|
652
|
+
@change="wallet.load"
|
|
653
|
+
/>
|
|
654
|
+
</section>
|
|
655
|
+
</template>
|
|
656
|
+
|
|
657
|
+
<style scoped>
|
|
658
|
+
@reference "@/assets/css/orionplace.css";
|
|
659
|
+
|
|
660
|
+
.commerce-title {
|
|
661
|
+
@apply m-0 text-2xl font-medium uppercase leading-tight;
|
|
662
|
+
@apply tracking-[0.04em] @min-[592px]:text-3xl;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
.commerce-subtitle {
|
|
666
|
+
@apply m-0 p-0 text-sm font-medium uppercase tracking-[0.08em];
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
.commerce-meta {
|
|
670
|
+
@apply m-0 text-xs uppercase tracking-[0.08em] text-orionplace-muted;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
/*
|
|
674
|
+
* The payment references are a two-column table: the label on a tinted
|
|
675
|
+
* column, the value beside it, one row per reference.
|
|
676
|
+
*/
|
|
677
|
+
.commerce-reference {
|
|
678
|
+
@apply m-0 grid grid-cols-1 @min-[592px]:grid-cols-[11rem_minmax(0,1fr)];
|
|
679
|
+
@apply border border-solid border-orionplace-border text-xs;
|
|
680
|
+
@apply bg-orionplace-surface;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
.commerce-reference-item {
|
|
684
|
+
@apply contents;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
.commerce-reference dt,
|
|
688
|
+
.commerce-reference dd {
|
|
689
|
+
@apply m-0 px-3 py-1.5 leading-5;
|
|
690
|
+
@apply border-0 border-solid border-orionplace-border;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
/*
|
|
694
|
+
* The label column has one width in every payment, so the tables of
|
|
695
|
+
* consecutive payments line up; a rule separates it from the value.
|
|
696
|
+
*/
|
|
697
|
+
.commerce-reference dt {
|
|
698
|
+
@apply bg-orionplace-muted-surface text-[11px] uppercase;
|
|
699
|
+
@apply tracking-[0.06em] text-orionplace-muted @min-[592px]:border-r;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
.commerce-reference dd {
|
|
703
|
+
@apply min-w-0 break-all text-orionplace-text;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
/*
|
|
707
|
+
* Rows are separated by one rule; a narrow table puts each label above
|
|
708
|
+
* its value.
|
|
709
|
+
*/
|
|
710
|
+
.commerce-reference-item + .commerce-reference-item > dt {
|
|
711
|
+
@apply border-t;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.commerce-reference-item + .commerce-reference-item > dd {
|
|
715
|
+
@apply @min-[592px]:border-t;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/* A comment is written text, so it wraps between words like ordinary copy. */
|
|
719
|
+
.commerce-reference-note dd {
|
|
720
|
+
word-break: normal;
|
|
721
|
+
overflow-wrap: anywhere;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
.commerce-badge {
|
|
725
|
+
@apply inline-flex items-center px-2 py-0.5;
|
|
726
|
+
@apply border border-solid border-orionplace-border;
|
|
727
|
+
@apply bg-orionplace-muted-surface text-orionplace-muted;
|
|
728
|
+
@apply text-[11px] uppercase leading-4 tracking-[0.08em];
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.commerce-badge[data-tone='success'] {
|
|
732
|
+
@apply border-orionplace-success bg-orionplace-success-surface;
|
|
733
|
+
@apply text-orionplace-success;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.commerce-badge[data-tone='attention'] {
|
|
737
|
+
@apply border-orionplace-attention bg-orionplace-attention-surface;
|
|
738
|
+
@apply text-orionplace-attention;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
.commerce-badge[data-tone='danger'] {
|
|
742
|
+
@apply border-orionplace-danger bg-orionplace-danger-surface;
|
|
743
|
+
@apply text-orionplace-danger;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
/*
|
|
747
|
+
* The invoice number opens every payment and refund: it is the reference a
|
|
748
|
+
* customer quotes to support, so it stands apart from the title.
|
|
749
|
+
*/
|
|
750
|
+
.commerce-number {
|
|
751
|
+
@apply inline-flex items-center whitespace-nowrap px-2 py-0.5;
|
|
752
|
+
@apply border border-solid border-orionplace-text;
|
|
753
|
+
@apply text-[11px] font-medium uppercase leading-4 tracking-[0.08em];
|
|
754
|
+
@apply tabular-nums text-orionplace-text;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
/* The balance card: the icon and the amount beside the top-up action. */
|
|
758
|
+
.commerce-balance {
|
|
759
|
+
@apply box-border flex flex-wrap items-center justify-between gap-4;
|
|
760
|
+
@apply px-5 py-6 @min-[592px]:px-6;
|
|
761
|
+
@apply border border-solid border-orionplace-border;
|
|
762
|
+
@apply bg-orionplace-muted-surface;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.commerce-icon-tile {
|
|
766
|
+
@apply box-border grid shrink-0 place-items-center;
|
|
767
|
+
@apply border border-solid border-orionplace-border;
|
|
768
|
+
@apply bg-orionplace-surface text-orionplace-text;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
/*
|
|
772
|
+
* The payment history is one framed panel: its heading, the tabs and the
|
|
773
|
+
* payments, each separated by a single rule.
|
|
774
|
+
*/
|
|
775
|
+
.commerce-panel {
|
|
776
|
+
@apply flex min-w-0 flex-col;
|
|
777
|
+
@apply border border-solid border-orionplace-border;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
.commerce-panel-head {
|
|
781
|
+
@apply flex flex-wrap items-center justify-between gap-4;
|
|
782
|
+
@apply px-5 pt-5 pb-3 @min-[592px]:px-6;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
.commerce-button {
|
|
786
|
+
@apply box-border inline-flex h-11 items-center justify-center gap-2 px-6;
|
|
787
|
+
@apply cursor-pointer rounded-none border border-solid;
|
|
788
|
+
@apply border-orionplace-text bg-transparent text-orionplace-text;
|
|
789
|
+
@apply text-xs font-medium uppercase tracking-[0.08em] no-underline;
|
|
790
|
+
@apply outline-none hover:bg-orionplace-hover;
|
|
791
|
+
@apply focus-visible:bg-orionplace-hover;
|
|
792
|
+
@apply disabled:cursor-not-allowed disabled:opacity-40;
|
|
793
|
+
font-family: inherit;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
.commerce-primary {
|
|
797
|
+
@apply border-orionplace-accent bg-orionplace-accent;
|
|
798
|
+
@apply text-orionplace-surface hover:bg-orionplace-accent;
|
|
799
|
+
@apply hover:opacity-85 focus-visible:bg-orionplace-accent;
|
|
800
|
+
@apply focus-visible:opacity-85;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
.commerce-text-button,
|
|
804
|
+
.commerce-link {
|
|
805
|
+
@apply inline-flex cursor-pointer items-center gap-1 self-start;
|
|
806
|
+
@apply border-0 border-b border-solid border-current bg-transparent;
|
|
807
|
+
@apply px-0 pt-0 pb-0.5 text-xs uppercase tracking-[0.08em];
|
|
808
|
+
@apply text-orionplace-text no-underline outline-none;
|
|
809
|
+
@apply hover:opacity-70 focus-visible:opacity-70;
|
|
810
|
+
@apply disabled:cursor-not-allowed disabled:opacity-40;
|
|
811
|
+
font-family: inherit;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
.commerce-tabs {
|
|
815
|
+
@apply flex flex-wrap gap-x-6 px-5 @min-[592px]:px-6;
|
|
816
|
+
@apply border-0 border-b border-solid border-orionplace-border;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
.commerce-tab {
|
|
820
|
+
@apply -mb-px cursor-pointer bg-transparent px-0 py-3;
|
|
821
|
+
@apply border-0 border-b-2 border-solid border-transparent;
|
|
822
|
+
@apply text-xs font-medium uppercase tracking-[0.08em];
|
|
823
|
+
@apply text-orionplace-muted outline-none;
|
|
824
|
+
@apply hover:text-orionplace-text focus-visible:text-orionplace-text;
|
|
825
|
+
@apply disabled:cursor-not-allowed disabled:opacity-40;
|
|
826
|
+
font-family: inherit;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
.commerce-tab[aria-current="page"] {
|
|
830
|
+
@apply border-orionplace-text text-orionplace-text;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.commerce-rows {
|
|
834
|
+
@apply m-0 flex list-none flex-col p-0;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
.commerce-row {
|
|
838
|
+
@apply border-0 border-b border-solid border-orionplace-border;
|
|
839
|
+
@apply px-5 py-5 last:border-b-0 @min-[592px]:px-6;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
/*
|
|
843
|
+
* The refunds of a payment form one tinted block inside its row; each
|
|
844
|
+
* refund is separated from the next by a single rule.
|
|
845
|
+
*/
|
|
846
|
+
.commerce-refunds {
|
|
847
|
+
@apply m-0 flex list-none flex-col p-0;
|
|
848
|
+
@apply bg-orionplace-muted-surface;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
.commerce-refund {
|
|
852
|
+
@apply grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-x-3;
|
|
853
|
+
@apply gap-y-1;
|
|
854
|
+
@apply px-4 py-3;
|
|
855
|
+
@apply border-0 border-t border-solid border-orionplace-border;
|
|
856
|
+
@apply first:border-t-0;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
/* Row actions are secondary to the payment, so they are compact. */
|
|
860
|
+
.commerce-row .commerce-button {
|
|
861
|
+
@apply h-9 px-4;
|
|
862
|
+
}
|
|
863
|
+
</style>
|