@aglyn/plugins-commerce 1.0.0-beta.143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +10 -0
- package/package.json +57 -0
- package/src/index.d.ts +38 -0
- package/src/index.js +38 -0
- package/src/index.js.map +1 -0
- package/src/lib/components/account.d.ts +31 -0
- package/src/lib/components/account.js +645 -0
- package/src/lib/components/account.js.map +1 -0
- package/src/lib/components/cart.d.ts +38 -0
- package/src/lib/components/cart.js +851 -0
- package/src/lib/components/cart.js.map +1 -0
- package/src/lib/components/commerce-console-page.d.ts +32 -0
- package/src/lib/components/commerce-console-page.js +296 -0
- package/src/lib/components/commerce-console-page.js.map +1 -0
- package/src/lib/components/commerce-console-sections.d.ts +34 -0
- package/src/lib/components/commerce-console-sections.js +62 -0
- package/src/lib/components/commerce-console-sections.js.map +1 -0
- package/src/lib/components/console/catalog-organization-card.component.d.ts +14 -0
- package/src/lib/components/console/catalog-organization-card.component.js +1087 -0
- package/src/lib/components/console/catalog-organization-card.component.js.map +1 -0
- package/src/lib/components/console/commerce-analytics-card.component.d.ts +27 -0
- package/src/lib/components/console/commerce-analytics-card.component.js +310 -0
- package/src/lib/components/console/commerce-analytics-card.component.js.map +1 -0
- package/src/lib/components/console/commerce-glance-card.component.d.ts +20 -0
- package/src/lib/components/console/commerce-glance-card.component.js +340 -0
- package/src/lib/components/console/commerce-glance-card.component.js.map +1 -0
- package/src/lib/components/console/commerce-stat-tile.component.d.ts +37 -0
- package/src/lib/components/console/commerce-stat-tile.component.js +72 -0
- package/src/lib/components/console/commerce-stat-tile.component.js.map +1 -0
- package/src/lib/components/console/discounts-card.component.d.ts +14 -0
- package/src/lib/components/console/discounts-card.component.js +443 -0
- package/src/lib/components/console/discounts-card.component.js.map +1 -0
- package/src/lib/components/console/entitlement-gate.component.d.ts +76 -0
- package/src/lib/components/console/entitlement-gate.component.js +115 -0
- package/src/lib/components/console/entitlement-gate.component.js.map +1 -0
- package/src/lib/components/console/gift-cards-card.component.d.ts +29 -0
- package/src/lib/components/console/gift-cards-card.component.js +379 -0
- package/src/lib/components/console/gift-cards-card.component.js.map +1 -0
- package/src/lib/components/console/host-coupons-card.component.d.ts +14 -0
- package/src/lib/components/console/host-coupons-card.component.js +252 -0
- package/src/lib/components/console/host-coupons-card.component.js.map +1 -0
- package/src/lib/components/console/host-orders-card.component.d.ts +13 -0
- package/src/lib/components/console/host-orders-card.component.js +861 -0
- package/src/lib/components/console/host-orders-card.component.js.map +1 -0
- package/src/lib/components/console/locations-card.component.d.ts +14 -0
- package/src/lib/components/console/locations-card.component.js +256 -0
- package/src/lib/components/console/locations-card.component.js.map +1 -0
- package/src/lib/components/console/member-posts-card.component.d.ts +8 -0
- package/src/lib/components/console/member-posts-card.component.js +283 -0
- package/src/lib/components/console/member-posts-card.component.js.map +1 -0
- package/src/lib/components/console/newest-site-users-card.component.d.ts +36 -0
- package/src/lib/components/console/newest-site-users-card.component.js +126 -0
- package/src/lib/components/console/newest-site-users-card.component.js.map +1 -0
- package/src/lib/components/console/order-detail-dialog.component.d.ts +28 -0
- package/src/lib/components/console/order-detail-dialog.component.js +976 -0
- package/src/lib/components/console/order-detail-dialog.component.js.map +1 -0
- package/src/lib/components/console/paid-media.d.ts +127 -0
- package/src/lib/components/console/paid-media.js +397 -0
- package/src/lib/components/console/paid-media.js.map +1 -0
- package/src/lib/components/console/payments-settings-card.component.d.ts +13 -0
- package/src/lib/components/console/payments-settings-card.component.js +295 -0
- package/src/lib/components/console/payments-settings-card.component.js.map +1 -0
- package/src/lib/components/console/pos-page.component.d.ts +13 -0
- package/src/lib/components/console/pos-page.component.js +916 -0
- package/src/lib/components/console/pos-page.component.js.map +1 -0
- package/src/lib/components/console/product-editor-dialog.component.d.ts +32 -0
- package/src/lib/components/console/product-editor-dialog.component.js +1374 -0
- package/src/lib/components/console/product-editor-dialog.component.js.map +1 -0
- package/src/lib/components/console/products-hub-card.component.d.ts +16 -0
- package/src/lib/components/console/products-hub-card.component.js +1280 -0
- package/src/lib/components/console/products-hub-card.component.js.map +1 -0
- package/src/lib/components/console/products-hub-zone.component.d.ts +50 -0
- package/src/lib/components/console/products-hub-zone.component.js +200 -0
- package/src/lib/components/console/products-hub-zone.component.js.map +1 -0
- package/src/lib/components/console/recovery-queue-card.component.d.ts +39 -0
- package/src/lib/components/console/recovery-queue-card.component.js +262 -0
- package/src/lib/components/console/recovery-queue-card.component.js.map +1 -0
- package/src/lib/components/console/registers-card.component.d.ts +21 -0
- package/src/lib/components/console/registers-card.component.js +296 -0
- package/src/lib/components/console/registers-card.component.js.map +1 -0
- package/src/lib/components/console/reservations-card.component.d.ts +14 -0
- package/src/lib/components/console/reservations-card.component.js +650 -0
- package/src/lib/components/console/reservations-card.component.js.map +1 -0
- package/src/lib/components/console/reviews-moderation-card.component.d.ts +8 -0
- package/src/lib/components/console/reviews-moderation-card.component.js +235 -0
- package/src/lib/components/console/reviews-moderation-card.component.js.map +1 -0
- package/src/lib/components/console/shipping-settings-card.component.d.ts +38 -0
- package/src/lib/components/console/shipping-settings-card.component.js +560 -0
- package/src/lib/components/console/shipping-settings-card.component.js.map +1 -0
- package/src/lib/components/console/stock-movements-card.component.d.ts +31 -0
- package/src/lib/components/console/stock-movements-card.component.js +333 -0
- package/src/lib/components/console/stock-movements-card.component.js.map +1 -0
- package/src/lib/components/console/store-settings-card.component.d.ts +14 -0
- package/src/lib/components/console/store-settings-card.component.js +300 -0
- package/src/lib/components/console/store-settings-card.component.js.map +1 -0
- package/src/lib/components/console/storefront-tax-summary-card.component.d.ts +73 -0
- package/src/lib/components/console/storefront-tax-summary-card.component.js +408 -0
- package/src/lib/components/console/storefront-tax-summary-card.component.js.map +1 -0
- package/src/lib/components/console/suppliers-card.component.d.ts +8 -0
- package/src/lib/components/console/suppliers-card.component.js +328 -0
- package/src/lib/components/console/suppliers-card.component.js.map +1 -0
- package/src/lib/components/console/tax-settings-card.component.d.ts +14 -0
- package/src/lib/components/console/tax-settings-card.component.js +473 -0
- package/src/lib/components/console/tax-settings-card.component.js.map +1 -0
- package/src/lib/components/gate.d.ts +39 -0
- package/src/lib/components/gate.js +202 -0
- package/src/lib/components/gate.js.map +1 -0
- package/src/lib/components/gated-video.d.ts +40 -0
- package/src/lib/components/gated-video.js +366 -0
- package/src/lib/components/gated-video.js.map +1 -0
- package/src/lib/components/member-feed.d.ts +32 -0
- package/src/lib/components/member-feed.js +198 -0
- package/src/lib/components/member-feed.js.map +1 -0
- package/src/lib/components/member-recovery.d.ts +35 -0
- package/src/lib/components/member-recovery.js +313 -0
- package/src/lib/components/member-recovery.js.map +1 -0
- package/src/lib/components/member-signin.d.ts +35 -0
- package/src/lib/components/member-signin.js +257 -0
- package/src/lib/components/member-signin.js.map +1 -0
- package/src/lib/components/member-signup.d.ts +34 -0
- package/src/lib/components/member-signup.js +287 -0
- package/src/lib/components/member-signup.js.map +1 -0
- package/src/lib/components/newsletter-signup.d.ts +39 -0
- package/src/lib/components/newsletter-signup.js +229 -0
- package/src/lib/components/newsletter-signup.js.map +1 -0
- package/src/lib/components/product-detail.d.ts +38 -0
- package/src/lib/components/product-detail.js +1022 -0
- package/src/lib/components/product-detail.js.map +1 -0
- package/src/lib/components/product-grid.d.ts +67 -0
- package/src/lib/components/product-grid.js +909 -0
- package/src/lib/components/product-grid.js.map +1 -0
- package/src/lib/components/product-reviews.d.ts +32 -0
- package/src/lib/components/product-reviews.js +349 -0
- package/src/lib/components/product-reviews.js.map +1 -0
- package/src/lib/components/related-products.d.ts +33 -0
- package/src/lib/components/related-products.js +232 -0
- package/src/lib/components/related-products.js.map +1 -0
- package/src/lib/components/reservation-widget.d.ts +33 -0
- package/src/lib/components/reservation-widget.js +418 -0
- package/src/lib/components/reservation-widget.js.map +1 -0
- package/src/lib/components/storefront-payment-element-fallback.d.ts +18 -0
- package/src/lib/components/storefront-payment-element-fallback.js +51 -0
- package/src/lib/components/storefront-payment-element-fallback.js.map +1 -0
- package/src/lib/components/storefront-payment-element.d.ts +78 -0
- package/src/lib/components/storefront-payment-element.js +156 -0
- package/src/lib/components/storefront-payment-element.js.map +1 -0
- package/src/lib/components/wishlist.d.ts +46 -0
- package/src/lib/components/wishlist.js +304 -0
- package/src/lib/components/wishlist.js.map +1 -0
- package/src/lib/constants/bundle-common.d.ts +18 -0
- package/src/lib/constants/bundle-common.js +18 -0
- package/src/lib/constants/bundle-common.js.map +1 -0
- package/src/lib/constants/product-filters.d.ts +35 -0
- package/src/lib/constants/product-filters.js +109 -0
- package/src/lib/constants/product-filters.js.map +1 -0
- package/src/lib/model/commerce-cart.d.ts +52 -0
- package/src/lib/model/commerce-cart.js +102 -0
- package/src/lib/model/commerce-cart.js.map +1 -0
- package/src/lib/model/commerce-connect-transfer.d.ts +243 -0
- package/src/lib/model/commerce-connect-transfer.js +231 -0
- package/src/lib/model/commerce-connect-transfer.js.map +1 -0
- package/src/lib/model/commerce-discounts.d.ts +164 -0
- package/src/lib/model/commerce-discounts.js +231 -0
- package/src/lib/model/commerce-discounts.js.map +1 -0
- package/src/lib/model/commerce-dispute.d.ts +124 -0
- package/src/lib/model/commerce-dispute.js +225 -0
- package/src/lib/model/commerce-dispute.js.map +1 -0
- package/src/lib/model/commerce-gift-cards.d.ts +107 -0
- package/src/lib/model/commerce-gift-cards.js +121 -0
- package/src/lib/model/commerce-gift-cards.js.map +1 -0
- package/src/lib/model/commerce-io.d.ts +36 -0
- package/src/lib/model/commerce-io.js +245 -0
- package/src/lib/model/commerce-io.js.map +1 -0
- package/src/lib/model/commerce-orders.d.ts +1040 -0
- package/src/lib/model/commerce-orders.js +1022 -0
- package/src/lib/model/commerce-orders.js.map +1 -0
- package/src/lib/model/commerce-promotions.d.ts +188 -0
- package/src/lib/model/commerce-promotions.js +199 -0
- package/src/lib/model/commerce-promotions.js.map +1 -0
- package/src/lib/model/commerce-reservations.d.ts +175 -0
- package/src/lib/model/commerce-reservations.js +157 -0
- package/src/lib/model/commerce-reservations.js.map +1 -0
- package/src/lib/model/commerce-shipping.d.ts +316 -0
- package/src/lib/model/commerce-shipping.js +484 -0
- package/src/lib/model/commerce-shipping.js.map +1 -0
- package/src/lib/model/commerce-stock-holds.d.ts +199 -0
- package/src/lib/model/commerce-stock-holds.js +190 -0
- package/src/lib/model/commerce-stock-holds.js.map +1 -0
- package/src/lib/model/commerce-subscription-status.d.ts +67 -0
- package/src/lib/model/commerce-subscription-status.js +76 -0
- package/src/lib/model/commerce-subscription-status.js.map +1 -0
- package/src/lib/model/commerce-tax-decision.d.ts +222 -0
- package/src/lib/model/commerce-tax-decision.js +165 -0
- package/src/lib/model/commerce-tax-decision.js.map +1 -0
- package/src/lib/model/commerce-tax.d.ts +176 -0
- package/src/lib/model/commerce-tax.js +92 -0
- package/src/lib/model/commerce-tax.js.map +1 -0
- package/src/lib/model/commerce.d.ts +551 -0
- package/src/lib/model/commerce.js +739 -0
- package/src/lib/model/commerce.js.map +1 -0
- package/src/lib/model/index.d.ts +40 -0
- package/src/lib/model/index.js +40 -0
- package/src/lib/model/index.js.map +1 -0
- package/src/lib/model/order-figures.d.ts +48 -0
- package/src/lib/model/order-figures.js +74 -0
- package/src/lib/model/order-figures.js.map +1 -0
- package/src/lib/model/plugin-permissions.d.ts +23 -0
- package/src/lib/model/plugin-permissions.js +34 -0
- package/src/lib/model/plugin-permissions.js.map +1 -0
- package/src/lib/model/purchase-analytics.d.ts +186 -0
- package/src/lib/model/purchase-analytics.js +216 -0
- package/src/lib/model/purchase-analytics.js.map +1 -0
- package/src/lib/plugin-config.d.ts +62 -0
- package/src/lib/plugin-config.js +78 -0
- package/src/lib/plugin-config.js.map +1 -0
- package/src/lib/plugin.d.ts +28 -0
- package/src/lib/plugin.js +147 -0
- package/src/lib/plugin.js.map +1 -0
- package/src/lib/server/billing-webhook.d.ts +26 -0
- package/src/lib/server/billing-webhook.js +4011 -0
- package/src/lib/server/billing-webhook.js.map +1 -0
- package/src/lib/server/cancel-order.d.ts +87 -0
- package/src/lib/server/cancel-order.js +368 -0
- package/src/lib/server/cancel-order.js.map +1 -0
- package/src/lib/server/cart-checkout.d.ts +25 -0
- package/src/lib/server/cart-checkout.js +976 -0
- package/src/lib/server/cart-checkout.js.map +1 -0
- package/src/lib/server/cart-cookie.d.ts +32 -0
- package/src/lib/server/cart-cookie.js +77 -0
- package/src/lib/server/cart-cookie.js.map +1 -0
- package/src/lib/server/cart.d.ts +34 -0
- package/src/lib/server/cart.js +181 -0
- package/src/lib/server/cart.js.map +1 -0
- package/src/lib/server/catalog.d.ts +127 -0
- package/src/lib/server/catalog.js +277 -0
- package/src/lib/server/catalog.js.map +1 -0
- package/src/lib/server/checkout.d.ts +36 -0
- package/src/lib/server/checkout.js +915 -0
- package/src/lib/server/checkout.js.map +1 -0
- package/src/lib/server/connect.d.ts +26 -0
- package/src/lib/server/connect.js +238 -0
- package/src/lib/server/connect.js.map +1 -0
- package/src/lib/server/contact-refund.d.ts +117 -0
- package/src/lib/server/contact-refund.js +196 -0
- package/src/lib/server/contact-refund.js.map +1 -0
- package/src/lib/server/download.d.ts +39 -0
- package/src/lib/server/download.js +206 -0
- package/src/lib/server/download.js.map +1 -0
- package/src/lib/server/draft-order.d.ts +26 -0
- package/src/lib/server/draft-order.js +706 -0
- package/src/lib/server/draft-order.js.map +1 -0
- package/src/lib/server/feed.d.ts +24 -0
- package/src/lib/server/feed.js +59 -0
- package/src/lib/server/feed.js.map +1 -0
- package/src/lib/server/fulfill-order.d.ts +97 -0
- package/src/lib/server/fulfill-order.js +235 -0
- package/src/lib/server/fulfill-order.js.map +1 -0
- package/src/lib/server/gate.d.ts +36 -0
- package/src/lib/server/gate.js +112 -0
- package/src/lib/server/gate.js.map +1 -0
- package/src/lib/server/gift-cards.d.ts +42 -0
- package/src/lib/server/gift-cards.js +219 -0
- package/src/lib/server/gift-cards.js.map +1 -0
- package/src/lib/server/low-stock.d.ts +49 -0
- package/src/lib/server/low-stock.js +60 -0
- package/src/lib/server/low-stock.js.map +1 -0
- package/src/lib/server/manual-tax-rate.d.ts +82 -0
- package/src/lib/server/manual-tax-rate.js +113 -0
- package/src/lib/server/manual-tax-rate.js.map +1 -0
- package/src/lib/server/member-feed.d.ts +24 -0
- package/src/lib/server/member-feed.js +72 -0
- package/src/lib/server/member-feed.js.map +1 -0
- package/src/lib/server/member-name-search.d.ts +37 -0
- package/src/lib/server/member-name-search.js +42 -0
- package/src/lib/server/member-name-search.js.map +1 -0
- package/src/lib/server/member-post.d.ts +23 -0
- package/src/lib/server/member-post.js +166 -0
- package/src/lib/server/member-post.js.map +1 -0
- package/src/lib/server/membership-account.d.ts +37 -0
- package/src/lib/server/membership-account.js +148 -0
- package/src/lib/server/membership-account.js.map +1 -0
- package/src/lib/server/membership-admin-password.d.ts +33 -0
- package/src/lib/server/membership-admin-password.js +202 -0
- package/src/lib/server/membership-admin-password.js.map +1 -0
- package/src/lib/server/membership-content.d.ts +23 -0
- package/src/lib/server/membership-content.js +105 -0
- package/src/lib/server/membership-content.js.map +1 -0
- package/src/lib/server/membership-login.d.ts +19 -0
- package/src/lib/server/membership-login.js +137 -0
- package/src/lib/server/membership-login.js.map +1 -0
- package/src/lib/server/membership-logout.d.ts +19 -0
- package/src/lib/server/membership-logout.js +35 -0
- package/src/lib/server/membership-logout.js.map +1 -0
- package/src/lib/server/membership-recover.d.ts +60 -0
- package/src/lib/server/membership-recover.js +244 -0
- package/src/lib/server/membership-recover.js.map +1 -0
- package/src/lib/server/membership-register.d.ts +22 -0
- package/src/lib/server/membership-register.js +241 -0
- package/src/lib/server/membership-register.js.map +1 -0
- package/src/lib/server/membership-reset.d.ts +26 -0
- package/src/lib/server/membership-reset.js +88 -0
- package/src/lib/server/membership-reset.js.map +1 -0
- package/src/lib/server/membership-wishlist.d.ts +23 -0
- package/src/lib/server/membership-wishlist.js +89 -0
- package/src/lib/server/membership-wishlist.js.map +1 -0
- package/src/lib/server/membership.d.ts +96 -0
- package/src/lib/server/membership.js +222 -0
- package/src/lib/server/membership.js.map +1 -0
- package/src/lib/server/native-checkout.d.ts +170 -0
- package/src/lib/server/native-checkout.js +193 -0
- package/src/lib/server/native-checkout.js.map +1 -0
- package/src/lib/server/newsletter.d.ts +23 -0
- package/src/lib/server/newsletter.js +323 -0
- package/src/lib/server/newsletter.js.map +1 -0
- package/src/lib/server/notify-restock.d.ts +22 -0
- package/src/lib/server/notify-restock.js +84 -0
- package/src/lib/server/notify-restock.js.map +1 -0
- package/src/lib/server/order-analytics.d.ts +134 -0
- package/src/lib/server/order-analytics.js +263 -0
- package/src/lib/server/order-analytics.js.map +1 -0
- package/src/lib/server/order-figures.d.ts +33 -0
- package/src/lib/server/order-figures.js +220 -0
- package/src/lib/server/order-figures.js.map +1 -0
- package/src/lib/server/paid-media-delivery.d.ts +173 -0
- package/src/lib/server/paid-media-delivery.js +212 -0
- package/src/lib/server/paid-media-delivery.js.map +1 -0
- package/src/lib/server/pos-order.d.ts +54 -0
- package/src/lib/server/pos-order.js +1137 -0
- package/src/lib/server/pos-order.js.map +1 -0
- package/src/lib/server/process-abandoned.d.ts +54 -0
- package/src/lib/server/process-abandoned.js +222 -0
- package/src/lib/server/process-abandoned.js.map +1 -0
- package/src/lib/server/process-restock.d.ts +42 -0
- package/src/lib/server/process-restock.js +219 -0
- package/src/lib/server/process-restock.js.map +1 -0
- package/src/lib/server/product-card.d.ts +29 -0
- package/src/lib/server/product-card.js +54 -0
- package/src/lib/server/product-card.js.map +1 -0
- package/src/lib/server/product.d.ts +70 -0
- package/src/lib/server/product.js +105 -0
- package/src/lib/server/product.js.map +1 -0
- package/src/lib/server/promotion-hold.d.ts +144 -0
- package/src/lib/server/promotion-hold.js +174 -0
- package/src/lib/server/promotion-hold.js.map +1 -0
- package/src/lib/server/reconcile-stock.d.ts +106 -0
- package/src/lib/server/reconcile-stock.js +349 -0
- package/src/lib/server/reconcile-stock.js.map +1 -0
- package/src/lib/server/refund.d.ts +45 -0
- package/src/lib/server/refund.js +607 -0
- package/src/lib/server/refund.js.map +1 -0
- package/src/lib/server/related.d.ts +24 -0
- package/src/lib/server/related.js +104 -0
- package/src/lib/server/related.js.map +1 -0
- package/src/lib/server/reservation-availability.d.ts +23 -0
- package/src/lib/server/reservation-availability.js +111 -0
- package/src/lib/server/reservation-availability.js.map +1 -0
- package/src/lib/server/reserve-stock.d.ts +156 -0
- package/src/lib/server/reserve-stock.js +146 -0
- package/src/lib/server/reserve-stock.js.map +1 -0
- package/src/lib/server/reserve.d.ts +25 -0
- package/src/lib/server/reserve.js +426 -0
- package/src/lib/server/reserve.js.map +1 -0
- package/src/lib/server/restock-flag.d.ts +202 -0
- package/src/lib/server/restock-flag.js +449 -0
- package/src/lib/server/restock-flag.js.map +1 -0
- package/src/lib/server/reviews.d.ts +51 -0
- package/src/lib/server/reviews.js +132 -0
- package/src/lib/server/reviews.js.map +1 -0
- package/src/lib/server/site-page-enricher.d.ts +42 -0
- package/src/lib/server/site-page-enricher.js +149 -0
- package/src/lib/server/site-page-enricher.js.map +1 -0
- package/src/lib/server/site-page-resolver.d.ts +26 -0
- package/src/lib/server/site-page-resolver.js +223 -0
- package/src/lib/server/site-page-resolver.js.map +1 -0
- package/src/lib/server/stock-hold.d.ts +127 -0
- package/src/lib/server/stock-hold.js +258 -0
- package/src/lib/server/stock-hold.js.map +1 -0
- package/src/lib/server/storefront-tax-record.d.ts +22 -0
- package/src/lib/server/storefront-tax-record.js +218 -0
- package/src/lib/server/storefront-tax-record.js.map +1 -0
- package/src/lib/server/storefront-tax.d.ts +197 -0
- package/src/lib/server/storefront-tax.js +245 -0
- package/src/lib/server/storefront-tax.js.map +1 -0
- package/src/lib/server/stream.d.ts +25 -0
- package/src/lib/server/stream.js +191 -0
- package/src/lib/server/stream.js.map +1 -0
- package/src/lib/server/subscription-portal.d.ts +24 -0
- package/src/lib/server/subscription-portal.js +91 -0
- package/src/lib/server/subscription-portal.js.map +1 -0
- package/src/lib/server/supplier-outbox.d.ts +190 -0
- package/src/lib/server/supplier-outbox.js +342 -0
- package/src/lib/server/supplier-outbox.js.map +1 -0
- package/src/lib/server/supplier-update.d.ts +23 -0
- package/src/lib/server/supplier-update.js +289 -0
- package/src/lib/server/supplier-update.js.map +1 -0
- package/src/lib/server/tax-profile.d.ts +29 -0
- package/src/lib/server/tax-profile.js +40 -0
- package/src/lib/server/tax-profile.js.map +1 -0
- package/src/lib/server.d.ts +32 -0
- package/src/lib/server.js +311 -0
- package/src/lib/server.js.map +1 -0
- package/src/lib/site.d.ts +27 -0
- package/src/lib/site.js +134 -0
- package/src/lib/site.js.map +1 -0
- package/src/lib/utils/escape-html.d.ts +41 -0
- package/src/lib/utils/escape-html.js +41 -0
- package/src/lib/utils/escape-html.js.map +1 -0
- package/src/lib/utils/generate-preset-id.d.ts +19 -0
- package/src/lib/utils/generate-preset-id.js +25 -0
- package/src/lib/utils/generate-preset-id.js.map +1 -0
- package/src/lib/utils/member-continue.d.ts +45 -0
- package/src/lib/utils/member-continue.js +49 -0
- package/src/lib/utils/member-continue.js.map +1 -0
- package/src/lib/utils/use-storefront-purchase-event.d.ts +60 -0
- package/src/lib/utils/use-storefront-purchase-event.js +142 -0
- package/src/lib/utils/use-storefront-purchase-event.js.map +1 -0
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ 'use client';
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
18
|
+
import { PLATFORM_BRAND_NAME } from "@aglyn/aglyn/app-utils/platform-brand";
|
|
19
|
+
import { pluginDocsHelp } from "@aglyn/aglyn";
|
|
20
|
+
import { CardDisplay } from "@aglyn/shared-ui-jsx";
|
|
21
|
+
import { ScrollTable } from "@aglyn/shared-ui-jsx/components/scroll-table.component";
|
|
22
|
+
import { Alert, Box, Button, Divider, MenuItem, Stack, TableBody, TableCell, TableHead, TableRow, TextField, Typography } from "@mui/material";
|
|
23
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
24
|
+
import { useUser } from "@aglyn/tenant-feature-instance";
|
|
25
|
+
import { authorizedFetch } from "@aglyn/shared-util-http/authorized-token";
|
|
26
|
+
const usd = (cents)=>`$${(cents / 100).toFixed(2)}`;
|
|
27
|
+
/** The last twelve calendar months, newest first, as UTC month bounds. */ function monthOptions() {
|
|
28
|
+
const now = new Date();
|
|
29
|
+
return Array.from({
|
|
30
|
+
length: 12
|
|
31
|
+
}, (_item, index)=>{
|
|
32
|
+
const start = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth() - index, 1));
|
|
33
|
+
const end = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth() - index + 1, 1));
|
|
34
|
+
return {
|
|
35
|
+
value: start.toISOString(),
|
|
36
|
+
label: start.toLocaleDateString(undefined, {
|
|
37
|
+
month: 'long',
|
|
38
|
+
year: 'numeric',
|
|
39
|
+
timeZone: 'UTC'
|
|
40
|
+
}),
|
|
41
|
+
from: start.toISOString(),
|
|
42
|
+
to: end.toISOString()
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The sales tax this merchant's own storefront collected (AGL-2440).
|
|
48
|
+
*
|
|
49
|
+
* `storefrontTaxCollected` has recorded every taxed storefront sale since
|
|
50
|
+
* AGL-1904 and every reader of it was Aglyn's — the staff tax return, the DSAR
|
|
51
|
+
* export. The merchant, whose sales these are, could see one order's
|
|
52
|
+
* `totals.taxCents` at a time and nothing else. This card is that absence
|
|
53
|
+
* closed, and closing it is all it does.
|
|
54
|
+
*
|
|
55
|
+
* ## THE NUMBER, NOT THE LABEL
|
|
56
|
+
*
|
|
57
|
+
* This card presents the buckets SEPARATELY and prints no per-row verdict on
|
|
58
|
+
* who must remit which one.
|
|
59
|
+
*
|
|
60
|
+
* The copy may not say that Aglyn makes no determination: Aglyn IS a
|
|
61
|
+
* marketplace facilitator for storefront sales and the Terms publish that at
|
|
62
|
+
* §10.7 (AGL-1956), so such a line would contradict the company's own
|
|
63
|
+
* contract.
|
|
64
|
+
*
|
|
65
|
+
* Separate buckets and no per-row verdict still hold, because §10.7 is
|
|
66
|
+
* narrow: it binds Aglyn only where applicable law gives it a collection
|
|
67
|
+
* obligation for the transaction in question, which is a per-sale,
|
|
68
|
+
* per-jurisdiction test and not a fact about a merchant. So the copy still
|
|
69
|
+
* describes HOW each figure was computed — who calculated the rate, and
|
|
70
|
+
* against whose registration — and adds only what §10.7 itself says about the
|
|
71
|
+
* bucket Aglyn holds. There is still no "yours to remit" column and no total
|
|
72
|
+
* across the buckets. A merged "tax collected" figure would be the
|
|
73
|
+
* banned determination wearing a neutral name: it would sum tax Aglyn holds
|
|
74
|
+
* and remits with tax the merchant owes, the exact conflation the module warns
|
|
75
|
+
* about in bold — *the two store modes are DIFFERENT FACTS and must never be
|
|
76
|
+
* summed*. That is why the three groups never share a total row, and why the
|
|
77
|
+
* grand total in the header is a TRANSACTION COUNT rather than an amount.
|
|
78
|
+
*
|
|
79
|
+
* ## Why the caveats are on the card and not in a tooltip
|
|
80
|
+
*
|
|
81
|
+
* Both are properties of the DATA, not of the law, and both change what a
|
|
82
|
+
* merchant should do with the number: refunds are not yet reflected, so the
|
|
83
|
+
* figure over-states whenever they have refunded; and a row whose taxable base
|
|
84
|
+
* Stripe did not state is counted out loud rather than treated as a zero-base
|
|
85
|
+
* sale. A figure someone may file from cannot carry its completeness caveats
|
|
86
|
+
* behind a hover.
|
|
87
|
+
*
|
|
88
|
+
* ## Why it is route-backed and not a listener
|
|
89
|
+
*
|
|
90
|
+
* `storefrontTaxCollected` is denied to every client in the rules — the
|
|
91
|
+
* collection spans every merchant and a row carries a shopper's address. The
|
|
92
|
+
* server route applies the `hostId` boundary. Nothing here can read another
|
|
93
|
+
* merchant's sales because nothing here reads the collection at all.
|
|
94
|
+
*/ export function StorefrontTaxSummaryCard(props) {
|
|
95
|
+
var _months_find;
|
|
96
|
+
const { hostId } = props;
|
|
97
|
+
const { data: user } = useUser();
|
|
98
|
+
const months = useMemo(()=>monthOptions(), []);
|
|
99
|
+
const [period, setPeriod] = useState(months[0].value);
|
|
100
|
+
const [payload, setPayload] = useState(null);
|
|
101
|
+
/**
|
|
102
|
+
* Three outcomes, not two (the AGL-1380 rule). "No tax collected" is a claim
|
|
103
|
+
* about this merchant's sales; rendering it because a request FAILED would
|
|
104
|
+
* tell a merchant who collected tax that they collected none — on the one
|
|
105
|
+
* surface where that mistake could reach a filing.
|
|
106
|
+
*/ const [loadState, setLoadState] = useState('pending');
|
|
107
|
+
const [retryNonce, setRetryNonce] = useState(0);
|
|
108
|
+
const selected = (_months_find = months.find((month)=>month.value === period)) != null ? _months_find : months[0];
|
|
109
|
+
const load = useCallback(async ()=>{
|
|
110
|
+
const search = new URLSearchParams({
|
|
111
|
+
hostId,
|
|
112
|
+
from: selected.from,
|
|
113
|
+
to: selected.to
|
|
114
|
+
});
|
|
115
|
+
const response = await authorizedFetch(user, `/api/hosts/tax-summary?${search.toString()}`);
|
|
116
|
+
if (!response.ok) throw new Error('tax summary failed');
|
|
117
|
+
return await response.json();
|
|
118
|
+
}, [
|
|
119
|
+
user,
|
|
120
|
+
hostId,
|
|
121
|
+
selected.from,
|
|
122
|
+
selected.to
|
|
123
|
+
]);
|
|
124
|
+
useEffect(()=>{
|
|
125
|
+
if (!user) return;
|
|
126
|
+
let cancelled = false;
|
|
127
|
+
setLoadState('pending');
|
|
128
|
+
load().then((next)=>{
|
|
129
|
+
if (cancelled) return;
|
|
130
|
+
setPayload(next);
|
|
131
|
+
setLoadState('loaded');
|
|
132
|
+
}).catch(()=>{
|
|
133
|
+
if (!cancelled) setLoadState('error');
|
|
134
|
+
});
|
|
135
|
+
return ()=>{
|
|
136
|
+
cancelled = true;
|
|
137
|
+
};
|
|
138
|
+
}, [
|
|
139
|
+
load,
|
|
140
|
+
user,
|
|
141
|
+
retryNonce
|
|
142
|
+
]);
|
|
143
|
+
const groups = payload ? [
|
|
144
|
+
{
|
|
145
|
+
key: 'aglynLiable',
|
|
146
|
+
bucket: payload.summary.aglynLiable,
|
|
147
|
+
title: `Tax Stripe calculated against ${PLATFORM_BRAND_NAME}’s registrations`,
|
|
148
|
+
how: 'Automatic tax was on for these sales. Stripe computed the rate ' + `against the tax registrations on ${PLATFORM_BRAND_NAME}’s platform ` + `account, and ${PLATFORM_BRAND_NAME} holds what was collected.`
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
key: 'merchantManual',
|
|
152
|
+
bucket: payload.summary.merchantManual,
|
|
153
|
+
title: 'Tax your store calculated at your own rate',
|
|
154
|
+
how: 'Automatic tax was off for these sales. The rate came from the ' + 'tax settings you configured on this store, applied to your own ' + 'declared origin.'
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
key: 'connectedAccountLiable',
|
|
158
|
+
bucket: payload.summary.connectedAccountLiable,
|
|
159
|
+
title: 'Tax Stripe calculated against your connected account',
|
|
160
|
+
how: 'Automatic tax was on and Stripe named your connected account ' + 'as the liable party for these sales.'
|
|
161
|
+
}
|
|
162
|
+
] : [];
|
|
163
|
+
return /*#__PURE__*/ _jsx(CardDisplay, {
|
|
164
|
+
header: 'Storefront sales tax',
|
|
165
|
+
subheader: 'What your storefront collected, grouped by how it was calculated.',
|
|
166
|
+
help: pluginDocsHelp('commerce', {
|
|
167
|
+
anchor: '#storefront-sales-tax',
|
|
168
|
+
excerpt: 'What your storefront collected in sales tax, grouped by how each ' + `figure was calculated. ${PLATFORM_BRAND_NAME} does not provide tax advice.`
|
|
169
|
+
}),
|
|
170
|
+
contentGutterX: true,
|
|
171
|
+
contentGutterY: true,
|
|
172
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
173
|
+
spacing: 2,
|
|
174
|
+
children: [
|
|
175
|
+
/*#__PURE__*/ _jsx(TextField, {
|
|
176
|
+
select: true,
|
|
177
|
+
size: "small",
|
|
178
|
+
label: "Period",
|
|
179
|
+
value: period,
|
|
180
|
+
onChange: (event)=>setPeriod(event.target.value),
|
|
181
|
+
sx: {
|
|
182
|
+
maxWidth: '16rem'
|
|
183
|
+
},
|
|
184
|
+
children: months.map((month)=>/*#__PURE__*/ _jsx(MenuItem, {
|
|
185
|
+
value: month.value,
|
|
186
|
+
children: month.label
|
|
187
|
+
}, month.value))
|
|
188
|
+
}),
|
|
189
|
+
loadState === 'pending' ? /*#__PURE__*/ _jsx(Typography, {
|
|
190
|
+
variant: "body2",
|
|
191
|
+
color: "text.secondary",
|
|
192
|
+
children: "Loading your sales tax…"
|
|
193
|
+
}) : loadState === 'error' || !payload ? /*#__PURE__*/ _jsx(Alert, {
|
|
194
|
+
severity: "warning",
|
|
195
|
+
action: /*#__PURE__*/ _jsx(Button, {
|
|
196
|
+
size: "small",
|
|
197
|
+
color: "inherit",
|
|
198
|
+
onClick: ()=>setRetryNonce((nonce)=>nonce + 1),
|
|
199
|
+
children: "Retry"
|
|
200
|
+
}),
|
|
201
|
+
children: "We couldn’t load your sales tax for this period. This figure is blank because the request failed, not because no tax was collected."
|
|
202
|
+
}) : /*#__PURE__*/ _jsxs(_Fragment, {
|
|
203
|
+
children: [
|
|
204
|
+
/*#__PURE__*/ _jsxs(Alert, {
|
|
205
|
+
severity: "info",
|
|
206
|
+
children: [
|
|
207
|
+
"These figures show what was collected and how each was calculated. For storefront sales ",
|
|
208
|
+
PLATFORM_BRAND_NAME,
|
|
209
|
+
" acts as a marketplace facilitator: where applicable law gives",
|
|
210
|
+
' ',
|
|
211
|
+
PLATFORM_BRAND_NAME,
|
|
212
|
+
" a collection obligation, the tax it calculated is added on top at checkout, held by",
|
|
213
|
+
' ',
|
|
214
|
+
PLATFORM_BRAND_NAME,
|
|
215
|
+
" rather than transferred to your connected payment account, and remitted by ",
|
|
216
|
+
PLATFORM_BRAND_NAME,
|
|
217
|
+
". Tax calculated at a rate you configured yourself stays yours. See Terms of Service §10.7.",
|
|
218
|
+
' ',
|
|
219
|
+
/*#__PURE__*/ _jsxs("strong", {
|
|
220
|
+
children: [
|
|
221
|
+
PLATFORM_BRAND_NAME,
|
|
222
|
+
" does not provide tax advice."
|
|
223
|
+
]
|
|
224
|
+
}),
|
|
225
|
+
' ',
|
|
226
|
+
"Please confirm your obligations with a qualified tax professional."
|
|
227
|
+
]
|
|
228
|
+
}),
|
|
229
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
230
|
+
variant: "body2",
|
|
231
|
+
color: "text.secondary",
|
|
232
|
+
children: `${payload.summary.transactionCount} taxed ${payload.summary.transactionCount === 1 ? 'sale' : 'sales'} in this period.`
|
|
233
|
+
}),
|
|
234
|
+
payload.summary.transactionCount === 0 ? /*#__PURE__*/ _jsx(Typography, {
|
|
235
|
+
variant: "body2",
|
|
236
|
+
color: "text.secondary",
|
|
237
|
+
children: "No storefront sale carried tax in this period."
|
|
238
|
+
}) : null,
|
|
239
|
+
groups.filter((group)=>group.bucket.transactionCount > 0).map((group)=>/*#__PURE__*/ _jsxs(Box, {
|
|
240
|
+
children: [
|
|
241
|
+
/*#__PURE__*/ _jsx(Divider, {
|
|
242
|
+
sx: {
|
|
243
|
+
mb: 1.5
|
|
244
|
+
}
|
|
245
|
+
}),
|
|
246
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
247
|
+
variant: "subtitle2",
|
|
248
|
+
children: group.title
|
|
249
|
+
}),
|
|
250
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
251
|
+
variant: "caption",
|
|
252
|
+
color: "text.secondary",
|
|
253
|
+
component: "div",
|
|
254
|
+
sx: {
|
|
255
|
+
mb: 1
|
|
256
|
+
},
|
|
257
|
+
children: group.how
|
|
258
|
+
}),
|
|
259
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
260
|
+
direction: "row",
|
|
261
|
+
spacing: 3,
|
|
262
|
+
sx: {
|
|
263
|
+
flexWrap: 'wrap',
|
|
264
|
+
rowGap: 1,
|
|
265
|
+
mb: 1
|
|
266
|
+
},
|
|
267
|
+
children: [
|
|
268
|
+
/*#__PURE__*/ _jsxs(Box, {
|
|
269
|
+
children: [
|
|
270
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
271
|
+
variant: "h6",
|
|
272
|
+
children: usd(group.bucket.taxCollectedCents)
|
|
273
|
+
}),
|
|
274
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
275
|
+
variant: "caption",
|
|
276
|
+
color: "text.secondary",
|
|
277
|
+
children: "tax collected"
|
|
278
|
+
})
|
|
279
|
+
]
|
|
280
|
+
}),
|
|
281
|
+
/*#__PURE__*/ _jsxs(Box, {
|
|
282
|
+
children: [
|
|
283
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
284
|
+
variant: "h6",
|
|
285
|
+
children: usd(group.bucket.grossCents)
|
|
286
|
+
}),
|
|
287
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
288
|
+
variant: "caption",
|
|
289
|
+
color: "text.secondary",
|
|
290
|
+
children: "gross, tax included"
|
|
291
|
+
})
|
|
292
|
+
]
|
|
293
|
+
}),
|
|
294
|
+
/*#__PURE__*/ _jsxs(Box, {
|
|
295
|
+
children: [
|
|
296
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
297
|
+
variant: "h6",
|
|
298
|
+
children: group.bucket.transactionCount
|
|
299
|
+
}),
|
|
300
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
301
|
+
variant: "caption",
|
|
302
|
+
color: "text.secondary",
|
|
303
|
+
children: group.bucket.transactionCount === 1 ? 'sale' : 'sales'
|
|
304
|
+
})
|
|
305
|
+
]
|
|
306
|
+
})
|
|
307
|
+
]
|
|
308
|
+
}),
|
|
309
|
+
/*#__PURE__*/ _jsxs(ScrollTable, {
|
|
310
|
+
size: "small",
|
|
311
|
+
children: [
|
|
312
|
+
/*#__PURE__*/ _jsx(TableHead, {
|
|
313
|
+
children: /*#__PURE__*/ _jsxs(TableRow, {
|
|
314
|
+
children: [
|
|
315
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
316
|
+
children: 'Jurisdiction'
|
|
317
|
+
}),
|
|
318
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
319
|
+
align: "right",
|
|
320
|
+
children: 'Sales'
|
|
321
|
+
}),
|
|
322
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
323
|
+
align: "right",
|
|
324
|
+
children: 'Taxable base'
|
|
325
|
+
}),
|
|
326
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
327
|
+
align: "right",
|
|
328
|
+
children: 'Tax'
|
|
329
|
+
})
|
|
330
|
+
]
|
|
331
|
+
})
|
|
332
|
+
}),
|
|
333
|
+
/*#__PURE__*/ _jsx(TableBody, {
|
|
334
|
+
children: Object.entries(group.bucket.byJurisdiction).map(([code, jurisdiction])=>/*#__PURE__*/ _jsxs(TableRow, {
|
|
335
|
+
children: [
|
|
336
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
337
|
+
children: code === 'unknown' ? 'Not stated' : code
|
|
338
|
+
}),
|
|
339
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
340
|
+
align: "right",
|
|
341
|
+
children: usd(jurisdiction.totalSalesCents)
|
|
342
|
+
}),
|
|
343
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
344
|
+
align: "right",
|
|
345
|
+
children: usd(jurisdiction.taxableSalesCents)
|
|
346
|
+
}),
|
|
347
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
348
|
+
align: "right",
|
|
349
|
+
children: usd(jurisdiction.taxCollectedCents)
|
|
350
|
+
})
|
|
351
|
+
]
|
|
352
|
+
}, code))
|
|
353
|
+
})
|
|
354
|
+
]
|
|
355
|
+
})
|
|
356
|
+
]
|
|
357
|
+
}, group.key)),
|
|
358
|
+
/*#__PURE__*/ _jsx(Divider, {}),
|
|
359
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
360
|
+
spacing: 0.5,
|
|
361
|
+
children: [
|
|
362
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
363
|
+
variant: "caption",
|
|
364
|
+
color: "text.secondary",
|
|
365
|
+
children: 'Refunds are not reflected. A refunded sale keeps its full ' + 'tax here, so these figures over-state whenever you have ' + 'refunded in this period.'
|
|
366
|
+
}),
|
|
367
|
+
payload.summary.attention.rowsMissingTaxableBase > 0 ? /*#__PURE__*/ _jsx(Typography, {
|
|
368
|
+
variant: "caption",
|
|
369
|
+
color: "text.secondary",
|
|
370
|
+
children: `${payload.summary.attention.rowsMissingTaxableBase} sale(s) collected tax but Stripe did not state the amount the rate was applied to. Their tax is counted; their taxable base is not, so “Taxable base” above is understated.`
|
|
371
|
+
}) : null,
|
|
372
|
+
payload.summary.attention.rowsMissingAddress > 0 ? /*#__PURE__*/ _jsx(Typography, {
|
|
373
|
+
variant: "caption",
|
|
374
|
+
color: "text.secondary",
|
|
375
|
+
children: `${payload.summary.attention.rowsMissingAddress} sale(s) carried no customer address and are grouped under “Not stated”.`
|
|
376
|
+
}) : null,
|
|
377
|
+
payload.summary.attention.nonUsdRows > 0 ? /*#__PURE__*/ _jsx(Typography, {
|
|
378
|
+
variant: "caption",
|
|
379
|
+
color: "text.secondary",
|
|
380
|
+
children: `${payload.summary.attention.nonUsdRows} sale(s) were in a currency other than USD and are summed here without conversion.`
|
|
381
|
+
}) : null,
|
|
382
|
+
payload.summary.attention.rowsUnclassified > 0 ? /*#__PURE__*/ _jsx(Typography, {
|
|
383
|
+
variant: "caption",
|
|
384
|
+
color: "text.secondary",
|
|
385
|
+
children: `${payload.summary.attention.rowsUnclassified} sale(s) could not be classified and are excluded from every group above rather than guessed into one.`
|
|
386
|
+
}) : null,
|
|
387
|
+
payload.undatedRows > 0 ? /*#__PURE__*/ _jsx(Typography, {
|
|
388
|
+
variant: "caption",
|
|
389
|
+
color: "text.secondary",
|
|
390
|
+
children: `${payload.undatedRows} recorded sale(s) carry no payment date and fall outside every period, including this one.`
|
|
391
|
+
}) : null,
|
|
392
|
+
payload.truncated ? /*#__PURE__*/ _jsx(Typography, {
|
|
393
|
+
variant: "caption",
|
|
394
|
+
color: "warning.main",
|
|
395
|
+
children: 'This period has more sales than one report can read. The ' + 'figures above are PARTIAL — narrow the period.'
|
|
396
|
+
}) : null
|
|
397
|
+
]
|
|
398
|
+
})
|
|
399
|
+
]
|
|
400
|
+
})
|
|
401
|
+
]
|
|
402
|
+
})
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
StorefrontTaxSummaryCard.displayName = 'StorefrontTaxSummaryCard';
|
|
406
|
+
export default StorefrontTaxSummaryCard;
|
|
407
|
+
|
|
408
|
+
//# sourceMappingURL=storefront-tax-summary-card.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/plugins/commerce/src/lib/components/console/storefront-tax-summary-card.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n'use client'\n\nimport { PLATFORM_BRAND_NAME } from '@aglyn/aglyn/app-utils/platform-brand'\n\nimport { pluginDocsHelp } from '@aglyn/aglyn'\nimport { CardDisplay } from '@aglyn/shared-ui-jsx'\nimport { ScrollTable } from '@aglyn/shared-ui-jsx/components/scroll-table.component'\nimport {\n Alert,\n Box,\n Button,\n Divider,\n MenuItem,\n Stack,\n TableBody,\n TableCell,\n TableHead,\n TableRow,\n TextField,\n Typography,\n} from '@mui/material'\nimport { useCallback, useEffect, useMemo, useState } from 'react'\nimport { useUser } from '@aglyn/tenant-feature-instance'\nimport { authorizedFetch } from '@aglyn/shared-util-http/authorized-token'\n\nexport interface StorefrontTaxSummaryCardProps {\n hostId: string\n}\n\nconst usd = (cents: number) => `$${(cents / 100).toFixed(2)}`\n\ninterface Jurisdiction {\n transactionCount: number\n totalSalesCents: number\n taxableSalesCents: number\n taxCollectedCents: number\n}\n\ninterface Bucket {\n transactionCount: number\n grossCents: number\n taxableSalesCents: number\n taxCollectedCents: number\n byJurisdiction: Record<string, Jurisdiction>\n}\n\ninterface Summary {\n periodStart: string\n periodEnd: string\n transactionCount: number\n aglynLiable: Bucket\n merchantManual: Bucket\n connectedAccountLiable: Bucket\n attention: {\n rowsMissingTaxableBase: number\n rowsMissingAddress: number\n nonUsdRows: number\n rowsMissingPaidAt: number\n rowsUnclassified: number\n }\n}\n\ninterface Payload {\n summary: Summary\n truncated: boolean\n undatedRows: number\n caveats: { refundsNotReflected: boolean }\n}\n\n/** The last twelve calendar months, newest first, as UTC month bounds. */\nfunction monthOptions(): Array<{ value: string; label: string; from: string; to: string }> {\n const now = new Date()\n return Array.from({ length: 12 }, (_item, index) => {\n const start = new Date(\n Date.UTC(now.getUTCFullYear(), now.getUTCMonth() - index, 1),\n )\n const end = new Date(\n Date.UTC(now.getUTCFullYear(), now.getUTCMonth() - index + 1, 1),\n )\n return {\n value: start.toISOString(),\n label: start.toLocaleDateString(undefined, {\n month: 'long',\n year: 'numeric',\n timeZone: 'UTC',\n }),\n from: start.toISOString(),\n to: end.toISOString(),\n }\n })\n}\n\n/**\n * The sales tax this merchant's own storefront collected (AGL-2440).\n *\n * `storefrontTaxCollected` has recorded every taxed storefront sale since\n * AGL-1904 and every reader of it was Aglyn's — the staff tax return, the DSAR\n * export. The merchant, whose sales these are, could see one order's\n * `totals.taxCents` at a time and nothing else. This card is that absence\n * closed, and closing it is all it does.\n *\n * ## THE NUMBER, NOT THE LABEL\n *\n * This card presents the buckets SEPARATELY and prints no per-row verdict on\n * who must remit which one.\n *\n * The copy may not say that Aglyn makes no determination: Aglyn IS a\n * marketplace facilitator for storefront sales and the Terms publish that at\n * §10.7 (AGL-1956), so such a line would contradict the company's own\n * contract.\n *\n * Separate buckets and no per-row verdict still hold, because §10.7 is\n * narrow: it binds Aglyn only where applicable law gives it a collection\n * obligation for the transaction in question, which is a per-sale,\n * per-jurisdiction test and not a fact about a merchant. So the copy still\n * describes HOW each figure was computed — who calculated the rate, and\n * against whose registration — and adds only what §10.7 itself says about the\n * bucket Aglyn holds. There is still no \"yours to remit\" column and no total\n * across the buckets. A merged \"tax collected\" figure would be the\n * banned determination wearing a neutral name: it would sum tax Aglyn holds\n * and remits with tax the merchant owes, the exact conflation the module warns\n * about in bold — *the two store modes are DIFFERENT FACTS and must never be\n * summed*. That is why the three groups never share a total row, and why the\n * grand total in the header is a TRANSACTION COUNT rather than an amount.\n *\n * ## Why the caveats are on the card and not in a tooltip\n *\n * Both are properties of the DATA, not of the law, and both change what a\n * merchant should do with the number: refunds are not yet reflected, so the\n * figure over-states whenever they have refunded; and a row whose taxable base\n * Stripe did not state is counted out loud rather than treated as a zero-base\n * sale. A figure someone may file from cannot carry its completeness caveats\n * behind a hover.\n *\n * ## Why it is route-backed and not a listener\n *\n * `storefrontTaxCollected` is denied to every client in the rules — the\n * collection spans every merchant and a row carries a shopper's address. The\n * server route applies the `hostId` boundary. Nothing here can read another\n * merchant's sales because nothing here reads the collection at all.\n */\nexport function StorefrontTaxSummaryCard(props: StorefrontTaxSummaryCardProps) {\n const { hostId } = props\n const { data: user } = useUser()\n const months = useMemo(() => monthOptions(), [])\n const [period, setPeriod] = useState(months[0].value)\n const [payload, setPayload] = useState<Payload | null>(null)\n /**\n * Three outcomes, not two (the AGL-1380 rule). \"No tax collected\" is a claim\n * about this merchant's sales; rendering it because a request FAILED would\n * tell a merchant who collected tax that they collected none — on the one\n * surface where that mistake could reach a filing.\n */\n const [loadState, setLoadState] = useState<'pending' | 'error' | 'loaded'>(\n 'pending',\n )\n const [retryNonce, setRetryNonce] = useState(0)\n\n const selected = months.find((month) => month.value === period) ?? months[0]\n\n const load = useCallback(async () => {\n const search = new URLSearchParams({\n hostId,\n from: selected.from,\n to: selected.to,\n })\n const response = await authorizedFetch(\n user,\n `/api/hosts/tax-summary?${search.toString()}`,\n )\n if (!response.ok) throw new Error('tax summary failed')\n return (await response.json()) as Payload\n }, [user, hostId, selected.from, selected.to])\n\n useEffect(() => {\n if (!user) return\n let cancelled = false\n setLoadState('pending')\n load()\n .then((next) => {\n if (cancelled) return\n setPayload(next)\n setLoadState('loaded')\n })\n .catch(() => {\n if (!cancelled) setLoadState('error')\n })\n return () => {\n cancelled = true\n }\n }, [load, user, retryNonce])\n\n const groups = payload\n ? ([\n {\n key: 'aglynLiable',\n bucket: payload.summary.aglynLiable,\n title: `Tax Stripe calculated against ${PLATFORM_BRAND_NAME}’s registrations`,\n how:\n 'Automatic tax was on for these sales. Stripe computed the rate ' +\n `against the tax registrations on ${PLATFORM_BRAND_NAME}’s platform ` +\n `account, and ${PLATFORM_BRAND_NAME} holds what was collected.`,\n },\n {\n key: 'merchantManual',\n bucket: payload.summary.merchantManual,\n title: 'Tax your store calculated at your own rate',\n how:\n 'Automatic tax was off for these sales. The rate came from the ' +\n 'tax settings you configured on this store, applied to your own ' +\n 'declared origin.',\n },\n {\n key: 'connectedAccountLiable',\n bucket: payload.summary.connectedAccountLiable,\n title: 'Tax Stripe calculated against your connected account',\n how:\n 'Automatic tax was on and Stripe named your connected account ' +\n 'as the liable party for these sales.',\n },\n ] as const)\n : []\n\n return (\n <CardDisplay\n header={'Storefront sales tax'}\n subheader={'What your storefront collected, grouped by how it was calculated.'}\n help={pluginDocsHelp('commerce', {\n anchor: '#storefront-sales-tax',\n excerpt:\n 'What your storefront collected in sales tax, grouped by how each ' +\n `figure was calculated. ${PLATFORM_BRAND_NAME} does not provide tax advice.`,\n })}\n contentGutterX\n contentGutterY\n >\n <Stack spacing={2}>\n <TextField\n select\n size=\"small\"\n label=\"Period\"\n value={period}\n onChange={(event) => setPeriod(event.target.value)}\n sx={{ maxWidth: '16rem' }}\n >\n {months.map((month) => (\n <MenuItem key={month.value} value={month.value}>\n {month.label}\n </MenuItem>\n ))}\n </TextField>\n\n {loadState === 'pending' ? (\n <Typography variant=\"body2\" color=\"text.secondary\">\n Loading your sales tax…\n </Typography>\n ) : loadState === 'error' || !payload ? (\n <Alert\n severity=\"warning\"\n action={\n <Button\n size=\"small\"\n color=\"inherit\"\n onClick={() => setRetryNonce((nonce) => nonce + 1)}\n >\n Retry\n </Button>\n }\n >\n We couldn’t load your sales tax for this period. This figure is\n blank because the request failed, not because no tax was collected.\n </Alert>\n ) : (\n <>\n {/*\n THE NON-ADVISORY NOTE, first and unmissable. Rendered ABOVE the\n numbers because it governs how all of them should be read.\n\n It now states the position Terms §10.7 publishes (AGL-1956)\n instead of the sentence it used to carry — \"Aglyn does not make\n that determination for you\" — which the Terms themselves have\n contradicted since 2026-08-24. What it still does NOT do is\n reach a per-merchant or per-jurisdiction verdict: §10.7 binds\n Aglyn only where applicable law gives it an obligation, so the\n note describes which bucket Aglyn holds and remits and leaves\n the rest where the merchant's own rate put it.\n */}\n <Alert severity=\"info\">\n These figures show what was collected and how each was\n calculated. For storefront sales {PLATFORM_BRAND_NAME} acts as a\n marketplace facilitator: where applicable law gives{' '}\n {PLATFORM_BRAND_NAME} a collection obligation, the tax it\n calculated is added on top at checkout, held by{' '}\n {PLATFORM_BRAND_NAME} rather than transferred to your connected\n payment account, and remitted by {PLATFORM_BRAND_NAME}. Tax\n calculated at a rate you configured yourself stays yours. See\n Terms of Service §10.7.{' '}\n <strong>\n {PLATFORM_BRAND_NAME} does not provide tax advice.\n </strong>{' '}\n Please confirm your obligations with a qualified tax\n professional.\n </Alert>\n\n <Typography variant=\"body2\" color=\"text.secondary\">\n {`${payload.summary.transactionCount} taxed ${\n payload.summary.transactionCount === 1 ? 'sale' : 'sales'\n } in this period.`}\n </Typography>\n\n {payload.summary.transactionCount === 0 ? (\n <Typography variant=\"body2\" color=\"text.secondary\">\n No storefront sale carried tax in this period.\n </Typography>\n ) : null}\n\n {groups\n .filter((group) => group.bucket.transactionCount > 0)\n .map((group) => (\n <Box key={group.key}>\n <Divider sx={{ mb: 1.5 }} />\n <Typography variant=\"subtitle2\">{group.title}</Typography>\n <Typography\n variant=\"caption\"\n color=\"text.secondary\"\n component=\"div\"\n sx={{ mb: 1 }}\n >\n {group.how}\n </Typography>\n <Stack\n direction=\"row\"\n spacing={3}\n sx={{ flexWrap: 'wrap', rowGap: 1, mb: 1 }}\n >\n <Box>\n <Typography variant=\"h6\">\n {usd(group.bucket.taxCollectedCents)}\n </Typography>\n <Typography variant=\"caption\" color=\"text.secondary\">\n tax collected\n </Typography>\n </Box>\n <Box>\n <Typography variant=\"h6\">\n {usd(group.bucket.grossCents)}\n </Typography>\n <Typography variant=\"caption\" color=\"text.secondary\">\n gross, tax included\n </Typography>\n </Box>\n <Box>\n <Typography variant=\"h6\">\n {group.bucket.transactionCount}\n </Typography>\n <Typography variant=\"caption\" color=\"text.secondary\">\n {group.bucket.transactionCount === 1\n ? 'sale'\n : 'sales'}\n </Typography>\n </Box>\n </Stack>\n <ScrollTable size=\"small\">\n <TableHead>\n <TableRow>\n <TableCell>{'Jurisdiction'}</TableCell>\n <TableCell align=\"right\">{'Sales'}</TableCell>\n <TableCell align=\"right\">{'Taxable base'}</TableCell>\n <TableCell align=\"right\">{'Tax'}</TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {Object.entries(\n group.bucket.byJurisdiction as Record<\n string,\n Jurisdiction\n >,\n ).map(([code, jurisdiction]) => (\n <TableRow key={code}>\n <TableCell>\n {code === 'unknown' ? 'Not stated' : code}\n </TableCell>\n <TableCell align=\"right\">\n {usd(jurisdiction.totalSalesCents)}\n </TableCell>\n <TableCell align=\"right\">\n {usd(jurisdiction.taxableSalesCents)}\n </TableCell>\n <TableCell align=\"right\">\n {usd(jurisdiction.taxCollectedCents)}\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </ScrollTable>\n </Box>\n ))}\n\n {/*\n WHAT THE NUMBER DOES NOT YET INCLUDE. Facts about the data, on\n the card rather than behind a hover, because each one changes\n what a merchant should do with the figure.\n */}\n <Divider />\n <Stack spacing={0.5}>\n <Typography variant=\"caption\" color=\"text.secondary\">\n {'Refunds are not reflected. A refunded sale keeps its full ' +\n 'tax here, so these figures over-state whenever you have ' +\n 'refunded in this period.'}\n </Typography>\n {payload.summary.attention.rowsMissingTaxableBase > 0 ? (\n <Typography variant=\"caption\" color=\"text.secondary\">\n {`${payload.summary.attention.rowsMissingTaxableBase} sale(s) collected tax but Stripe did not state the amount the rate was applied to. Their tax is counted; their taxable base is not, so “Taxable base” above is understated.`}\n </Typography>\n ) : null}\n {payload.summary.attention.rowsMissingAddress > 0 ? (\n <Typography variant=\"caption\" color=\"text.secondary\">\n {`${payload.summary.attention.rowsMissingAddress} sale(s) carried no customer address and are grouped under “Not stated”.`}\n </Typography>\n ) : null}\n {payload.summary.attention.nonUsdRows > 0 ? (\n <Typography variant=\"caption\" color=\"text.secondary\">\n {`${payload.summary.attention.nonUsdRows} sale(s) were in a currency other than USD and are summed here without conversion.`}\n </Typography>\n ) : null}\n {payload.summary.attention.rowsUnclassified > 0 ? (\n <Typography variant=\"caption\" color=\"text.secondary\">\n {`${payload.summary.attention.rowsUnclassified} sale(s) could not be classified and are excluded from every group above rather than guessed into one.`}\n </Typography>\n ) : null}\n {payload.undatedRows > 0 ? (\n <Typography variant=\"caption\" color=\"text.secondary\">\n {`${payload.undatedRows} recorded sale(s) carry no payment date and fall outside every period, including this one.`}\n </Typography>\n ) : null}\n {payload.truncated ? (\n <Typography variant=\"caption\" color=\"warning.main\">\n {'This period has more sales than one report can read. The ' +\n 'figures above are PARTIAL — narrow the period.'}\n </Typography>\n ) : null}\n </Stack>\n </>\n )}\n </Stack>\n </CardDisplay>\n )\n}\nStorefrontTaxSummaryCard.displayName = 'StorefrontTaxSummaryCard'\n\nexport default StorefrontTaxSummaryCard\n"],"names":["PLATFORM_BRAND_NAME","pluginDocsHelp","CardDisplay","ScrollTable","Alert","Box","Button","Divider","MenuItem","Stack","TableBody","TableCell","TableHead","TableRow","TextField","Typography","useCallback","useEffect","useMemo","useState","useUser","authorizedFetch","usd","cents","toFixed","monthOptions","now","Date","Array","from","length","_item","index","start","UTC","getUTCFullYear","getUTCMonth","end","value","toISOString","label","toLocaleDateString","undefined","month","year","timeZone","to","StorefrontTaxSummaryCard","props","months","hostId","data","user","period","setPeriod","payload","setPayload","loadState","setLoadState","retryNonce","setRetryNonce","selected","find","load","search","URLSearchParams","response","toString","ok","Error","json","cancelled","then","next","catch","groups","key","bucket","summary","aglynLiable","title","how","merchantManual","connectedAccountLiable","header","subheader","help","anchor","excerpt","contentGutterX","contentGutterY","spacing","select","size","onChange","event","target","sx","maxWidth","map","variant","color","severity","action","onClick","nonce","strong","transactionCount","filter","group","mb","component","direction","flexWrap","rowGap","taxCollectedCents","grossCents","align","Object","entries","byJurisdiction","code","jurisdiction","totalSalesCents","taxableSalesCents","attention","rowsMissingTaxableBase","rowsMissingAddress","nonUsdRows","rowsUnclassified","undatedRows","truncated","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;AAEA,SAASA,mBAAmB,QAAQ,wCAAuC;AAE3E,SAASC,cAAc,QAAQ,eAAc;AAC7C,SAASC,WAAW,QAAQ,uBAAsB;AAClD,SAASC,WAAW,QAAQ,yDAAwD;AACpF,SACEC,KAAK,EACLC,GAAG,EACHC,MAAM,EACNC,OAAO,EACPC,QAAQ,EACRC,KAAK,EACLC,SAAS,EACTC,SAAS,EACTC,SAAS,EACTC,QAAQ,EACRC,SAAS,EACTC,UAA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