PluginProbe ʕ •ᴥ•ʔ
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / 2.13.0
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments v2.13.0
4.4.2 4.4.1 4.4.0 4.3.3 4.3.2 4.3.1 4.3.0 4.2.3 4.2.2 4.2.1 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.11.0 1.11.1 1.11.2 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.7.0 1.7.1 1.7.2 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.9.0 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5 2.0.0 2.0.1 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.10.0 2.10.1 2.11.0 2.11.1 2.11.2 2.11.3 2.11.4 2.12.0 2.13.0 2.14.0 2.14.1 2.15.0 2.15.1 2.16.0 2.16.1 2.16.2 2.16.3 2.17.0 2.17.1 2.17.2 2.18.0 2.19.0 2.19.2 2.19.3 2.19.4 2.2.0 2.2.1 2.20.0 2.20.1 2.20.2 2.20.3 2.20.4 2.20.5 2.20.6 2.21.0 2.22.0 2.22.1 2.23.0 2.24.0 2.25.0 2.25.1 2.25.2 2.26.0 2.27.0 2.27.1 2.28.0 2.29.0 2.29.1 2.29.2 2.29.3 2.29.4 2.3.0 2.3.1 2.30.0 2.31.0 2.31.1 2.31.2 2.31.3 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.40.0 2.40.1 2.5.0 2.5.1 2.5.2 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.9.0 3.0.0 3.0.0-RC1 3.0.0-RC2 3.0.0-beta1 3.0.0-beta2 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.10.0 3.10.1 3.11.0 3.12.0 3.13.0 3.13.1 3.13.2 3.13.3 3.13.4 3.14.0 3.15.0 3.15.1 3.15.2 3.15.3 3.15.4 3.15.5 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.16.5 3.16.6 3.16.7 3.16.8 3.17.0 3.17.1 3.17.2 3.17.3 3.17.4 3.17.5 3.17.6 3.18.0 3.19.0 3.19.1 3.19.2 3.2.0 3.2.1 3.2.2 3.20.0 3.20.1 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1 3.7.2 3.7.3 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 4.0.0 4.0.1 4.0.2 4.0.3 trunk 4.1.0 0.2.19.1 4.1.1 1.0.0 4.2.0 1.0.1 1.0.2
surecart / dist / components / esm / sc-order.entry.js
surecart / dist / components / esm Last commit date
polyfills 3 years ago ManualPaymentMethods-43200e03.js 2 years ago ManualPaymentMethods-43200e03.js.map 2 years ago _commonjsHelpers-9943807e.js 3 years ago _commonjsHelpers-9943807e.js.map 3 years ago add-query-args-f4c5962b.js 3 years ago add-query-args-f4c5962b.js.map 3 years ago address-30ec68e0.js 3 years ago address-30ec68e0.js.map 3 years ago animation-registry-510ac4b9.js 3 years ago animation-registry-510ac4b9.js.map 3 years ago consumer-32cc6385.js 2 years ago consumer-32cc6385.js.map 2 years ago countries-dfee7456.js 3 years ago countries-dfee7456.js.map 3 years ago currency-728311ef.js 2 years ago currency-728311ef.js.map 2 years ago fetch-2525e763.js 2 years ago fetch-2525e763.js.map 2 years ago form-data-dd63c61f.js 3 years ago form-data-dd63c61f.js.map 3 years ago functions-b67a547b.js 3 years ago functions-b67a547b.js.map 3 years ago get-query-arg-cb6b8763.js 3 years ago get-query-arg-cb6b8763.js.map 3 years ago getters-26bb263b.js 2 years ago getters-26bb263b.js.map 2 years ago getters-90634f5f.js 2 years ago getters-90634f5f.js.map 2 years ago getters-d7809a0e.js 2 years ago getters-d7809a0e.js.map 2 years ago getters-fe6648a2.js 2 years ago getters-fe6648a2.js.map 2 years ago global-3bde269f.js 3 years ago global-3bde269f.js.map 3 years ago google-cb3a19c3.js 2 years ago google-cb3a19c3.js.map 2 years ago index-1046c77e.js 2 years ago index-1046c77e.js.map 2 years ago index-3d803feb.js 3 years ago index-3d803feb.js.map 3 years ago index-644f5478.js 2 years ago index-644f5478.js.map 2 years ago index-74024349.js 2 years ago index-74024349.js.map 2 years ago index-b0f661a7.js 2 years ago index-b0f661a7.js.map 2 years ago index-d8b1c389.js 2 years ago index-d8b1c389.js.map 2 years ago index.js 2 years ago index.js.map 2 years ago inline-ce9572f1.js 2 years ago inline-ce9572f1.js.map 2 years ago lazy-64c2bf3b.js 3 years ago lazy-64c2bf3b.js.map 3 years ago library-19af6c52.js 3 years ago library-19af6c52.js.map 3 years ago loader.js 2 years ago loader.js.map 3 years ago media-8435dec0.js 2 years ago media-8435dec0.js.map 2 years ago mutations-39aa07b2.js 2 years ago mutations-39aa07b2.js.map 2 years ago mutations-79f42351.js 2 years ago mutations-79f42351.js.map 2 years ago mutations-bde8c32d.js 2 years ago mutations-bde8c32d.js.map 2 years ago mutations-d654123d.js 2 years ago mutations-d654123d.js.map 2 years ago page-align-8602c4c7.js 3 years ago page-align-8602c4c7.js.map 3 years ago price-12416e4b.js 2 years ago price-12416e4b.js.map 2 years ago pure-4f52cebf.js 3 years ago pure-4f52cebf.js.map 3 years ago quantity-2718ee4f.js 2 years ago quantity-2718ee4f.js.map 2 years ago sc-address_2.entry.js 2 years ago sc-address_2.entry.js.map 2 years ago sc-alert_2.entry.js 2 years ago sc-alert_2.entry.js.map 2 years ago sc-avatar.entry.js 2 years ago sc-avatar.entry.js.map 3 years ago sc-badge-notice.entry.js 2 years ago sc-badge-notice.entry.js.map 3 years ago sc-block-ui_9.entry.js 2 years ago sc-block-ui_9.entry.js.map 2 years ago sc-breadcrumb.entry.js 2 years ago sc-breadcrumb.entry.js.map 3 years ago sc-breadcrumbs.entry.js 2 years ago sc-breadcrumbs.entry.js.map 3 years ago sc-button-group.entry.js 2 years ago sc-button-group.entry.js.map 3 years ago sc-button.entry.js 2 years ago sc-button.entry.js.map 2 years ago sc-cancel-dialog_2.entry.js 2 years ago sc-cancel-dialog_2.entry.js.map 2 years ago sc-cancel-discount_4.entry.js 2 years ago sc-cancel-discount_4.entry.js.map 3 years ago sc-card_2.entry.js 2 years ago sc-card_2.entry.js.map 2 years ago sc-cart-button.entry.js 2 years ago sc-cart-button.entry.js.map 2 years ago sc-cart-form-submit.entry.js 2 years ago sc-cart-form-submit.entry.js.map 2 years ago sc-cart-form.entry.js 2 years ago sc-cart-form.entry.js.map 2 years ago sc-cart-header.entry.js 2 years ago sc-cart-header.entry.js.map 2 years ago sc-cart-icon.entry.js 2 years ago sc-cart-icon.entry.js.map 2 years ago sc-cart-loader.entry.js 2 years ago sc-cart-loader.entry.js.map 2 years ago sc-cart-session-provider_3.entry.js 2 years ago sc-cart-session-provider_3.entry.js.map 2 years ago sc-cart-submit.entry.js 2 years ago sc-cart-submit.entry.js.map 2 years ago sc-cart.entry.js 2 years ago sc-cart.entry.js.map 2 years ago sc-cc-logo_3.entry.js 2 years ago sc-cc-logo_3.entry.js.map 2 years ago sc-charges-list.entry.js 2 years ago sc-charges-list.entry.js.map 3 years ago sc-checkbox.entry.js 2 years ago sc-checkbox.entry.js.map 3 years ago sc-checkout-form-errors.entry.js 2 years ago sc-checkout-form-errors.entry.js.map 2 years ago sc-checkout-mollie-payment_2.entry.js 2 years ago sc-checkout-mollie-payment_2.entry.js.map 2 years ago sc-checkout-product-price-variant-selector.entry.js 2 years ago sc-checkout-product-price-variant-selector.entry.js.map 2 years ago sc-checkout-stock-alert_8.entry.js 2 years ago sc-checkout-stock-alert_8.entry.js.map 2 years ago sc-checkout.entry.js 2 years ago sc-checkout.entry.js.map 2 years ago sc-choice-container.entry.js 2 years ago sc-choice-container.entry.js.map 2 years ago sc-choice.entry.js 2 years ago sc-choice.entry.js.map 2 years ago sc-choices.entry.js 2 years ago sc-choices.entry.js.map 3 years ago sc-column_2.entry.js 2 years ago sc-column_2.entry.js.map 2 years ago sc-compact-address_7.entry.js 2 years ago sc-compact-address_7.entry.js.map 2 years ago sc-conditional-form.entry.js 2 years ago sc-conditional-form.entry.js.map 2 years ago sc-consumer.entry.js 2 years ago sc-consumer.entry.js.map 3 years ago sc-coupon-form.entry.js 2 years ago sc-coupon-form.entry.js.map 2 years ago sc-custom-order-price-input.entry.js 2 years ago sc-custom-order-price-input.entry.js.map 3 years ago sc-customer-details.entry.js 2 years ago sc-customer-details.entry.js.map 3 years ago sc-customer-edit.entry.js 2 years ago sc-customer-edit.entry.js.map 3 years ago sc-customer-email.entry.js 2 years ago sc-customer-email.entry.js.map 2 years ago sc-customer-firstname.entry.js 2 years ago sc-customer-firstname.entry.js.map 2 years ago sc-customer-lastname.entry.js 2 years ago sc-customer-lastname.entry.js.map 2 years ago sc-customer-name.entry.js 2 years ago sc-customer-name.entry.js.map 2 years ago sc-customer-phone.entry.js 2 years ago sc-customer-phone.entry.js.map 2 years ago sc-dashboard-customer-details.entry.js 2 years ago sc-dashboard-customer-details.entry.js.map 3 years ago sc-dashboard-downloads-list.entry.js 2 years ago sc-dashboard-downloads-list.entry.js.map 3 years ago sc-dialog.entry.js 2 years ago sc-dialog.entry.js.map 3 years ago sc-divider.entry.js 2 years ago sc-divider.entry.js.map 3 years ago sc-donation-choices.entry.js 2 years ago sc-donation-choices.entry.js.map 3 years ago sc-downloads-list.entry.js 2 years ago sc-downloads-list.entry.js.map 3 years ago sc-dropdown_3.entry.js 2 years ago sc-dropdown_3.entry.js.map 2 years ago sc-empty.entry.js 2 years ago sc-empty.entry.js.map 3 years ago sc-express-payment.entry.js 2 years ago sc-express-payment.entry.js.map 3 years ago sc-feature-demo-banner.entry.js 2 years ago sc-feature-demo-banner.entry.js.map 2 years ago sc-flex.entry.js 2 years ago sc-flex.entry.js.map 3 years ago sc-form-row.entry.js 2 years ago sc-form-row.entry.js.map 3 years ago sc-format-bytes_2.entry.js 2 years ago sc-format-bytes_2.entry.js.map 3 years ago sc-format-date.entry.js 2 years ago sc-format-date.entry.js.map 3 years ago sc-format-interval.entry.js 2 years ago sc-format-interval.entry.js.map 3 years ago sc-fulfillment-shipping-status-badge.entry.js 2 years ago sc-fulfillment-shipping-status-badge.entry.js.map 3 years ago sc-fulfillments.entry.js 2 years ago sc-fulfillments.entry.js.map 3 years ago sc-heading_2.entry.js 2 years ago sc-heading_2.entry.js.map 2 years ago sc-image-slider.entry.js 2 years ago sc-image-slider.entry.js.map 2 years ago sc-input.entry.js 2 years ago sc-input.entry.js.map 2 years ago sc-invoices-list.entry.js 2 years ago sc-invoices-list.entry.js.map 3 years ago sc-licenses-list.entry.js 2 years ago sc-licenses-list.entry.js.map 3 years ago sc-line-item-bump.entry.js 2 years ago sc-line-item-bump.entry.js.map 3 years ago sc-line-item-total.entry.js 2 years ago sc-line-item-total.entry.js.map 2 years ago sc-line-item.entry.js 2 years ago sc-line-item.entry.js.map 3 years ago sc-line-items-provider.entry.js 2 years ago sc-line-items-provider.entry.js.map 3 years ago sc-line-items.entry.js 2 years ago sc-line-items.entry.js.map 2 years ago sc-login-form.entry.js 2 years ago sc-login-form.entry.js.map 3 years ago sc-menu-divider.entry.js 2 years ago sc-menu-divider.entry.js.map 3 years ago sc-menu-label_2.entry.js 2 years ago sc-menu-label_2.entry.js.map 2 years ago sc-mollie-add-method.entry.js 2 years ago sc-mollie-add-method.entry.js.map 2 years ago sc-order-confirmation-customer.entry.js 2 years ago sc-order-confirmation-customer.entry.js.map 3 years ago sc-order-confirmation-details.entry.js 2 years ago sc-order-confirmation-details.entry.js.map 3 years ago sc-order-confirmation-line-items_2.entry.js 2 years ago sc-order-confirmation-line-items_2.entry.js.map 2 years ago sc-order-confirmation.entry.js 2 years ago sc-order-confirmation.entry.js.map 3 years ago sc-order-coupon-form.entry.js 2 years ago sc-order-coupon-form.entry.js.map 2 years ago sc-order-detail.entry.js 2 years ago sc-order-detail.entry.js.map 3 years ago sc-order-fulfillment-badge.entry.js 2 years ago sc-order-fulfillment-badge.entry.js.map 3 years ago sc-order-manual-instructions.entry.js 2 years ago sc-order-manual-instructions.entry.js.map 3 years ago sc-order-password.entry.js 2 years ago sc-order-password.entry.js.map 2 years ago sc-order-return-badge.entry.js 2 years ago sc-order-return-badge.entry.js.map 2 years ago sc-order-shipment-badge.entry.js 2 years ago sc-order-shipment-badge.entry.js.map 3 years ago sc-order-status-badge.entry.js 2 years ago sc-order-status-badge.entry.js.map 2 years ago sc-order-submit.entry.js 2 years ago sc-order-submit.entry.js.map 2 years ago sc-order-summary.entry.js 2 years ago sc-order-summary.entry.js.map 2 years ago sc-order.entry.js 2 years ago sc-order.entry.js.map 2 years ago sc-orders-list.entry.js 2 years ago sc-orders-list.entry.js.map 2 years ago sc-pagination.entry.js 2 years ago sc-pagination.entry.js.map 2 years ago sc-password-nag.entry.js 2 years ago sc-password-nag.entry.js.map 2 years ago sc-password.entry.js 2 years ago sc-password.entry.js.map 2 years ago sc-payment-method-choice_2.entry.js 2 years ago sc-payment-method-choice_2.entry.js.map 3 years ago sc-payment-methods-list.entry.js 2 years ago sc-payment-methods-list.entry.js.map 2 years ago sc-payment.entry.js 2 years ago sc-payment.entry.js.map 2 years ago sc-paypal-add-method.entry.js 2 years ago sc-paypal-add-method.entry.js.map 3 years ago sc-paypal-buttons_2.entry.js 2 years ago sc-paypal-buttons_2.entry.js.map 2 years ago sc-paystack-add-method.entry.js 2 years ago sc-paystack-add-method.entry.js.map 2 years ago sc-phone-input.entry.js 2 years ago sc-phone-input.entry.js.map 2 years ago sc-pill-option.entry.js 2 years ago sc-pill-option.entry.js.map 2 years ago sc-premium-tag.entry.js 2 years ago sc-premium-tag.entry.js.map 3 years ago sc-price-choice-container.entry.js 2 years ago sc-price-choice-container.entry.js.map 2 years ago sc-price-choice.entry.js 2 years ago sc-price-choice.entry.js.map 2 years ago sc-price-choices.entry.js 2 years ago sc-price-choices.entry.js.map 2 years ago sc-price-input.entry.js 2 years ago sc-price-input.entry.js.map 2 years ago sc-price-range.entry.js 2 years ago sc-price-range.entry.js.map 2 years ago sc-product-buy-button.entry.js 2 years ago sc-product-buy-button.entry.js.map 2 years ago sc-product-item-image_3.entry.js 2 years ago sc-product-item-image_3.entry.js.map 2 years ago sc-product-item-list.entry.js 2 years ago sc-product-item-list.entry.js.map 2 years ago sc-product-item.entry.js 2 years ago sc-product-item.entry.js.map 2 years ago sc-product-line-item_2.entry.js 2 years ago sc-product-line-item_2.entry.js.map 2 years ago sc-product-pills-variant-option.entry.js 2 years ago sc-product-pills-variant-option.entry.js.map 2 years ago sc-product-price-choices.entry.js 2 years ago sc-product-price-choices.entry.js.map 2 years ago sc-product-price-modal.entry.js 2 years ago sc-product-price-modal.entry.js.map 2 years ago sc-product-price.entry.js 2 years ago sc-product-price.entry.js.map 2 years ago sc-product-quantity.entry.js 2 years ago sc-product-quantity.entry.js.map 2 years ago sc-product-selected-price.entry.js 2 years ago sc-product-selected-price.entry.js.map 2 years ago sc-product-text.entry.js 2 years ago sc-product-text.entry.js.map 2 years ago sc-prose.entry.js 2 years ago sc-prose.entry.js.map 3 years ago sc-provider.entry.js 2 years ago sc-provider.entry.js.map 3 years ago sc-provisional-banner.entry.js 2 years ago sc-provisional-banner.entry.js.map 2 years ago sc-purchase-downloads-list.entry.js 2 years ago sc-purchase-downloads-list.entry.js.map 3 years ago sc-rich-text.entry.js 2 years ago sc-rich-text.entry.js.map 3 years ago sc-skeleton.entry.js 2 years ago sc-skeleton.entry.js.map 3 years ago sc-stacked-list_2.entry.js 2 years ago sc-stacked-list_2.entry.js.map 3 years ago sc-stripe-add-method.entry.js 2 years ago sc-stripe-add-method.entry.js.map 3 years ago sc-stripe-element.entry.js 2 years ago sc-stripe-element.entry.js.map 2 years ago sc-stripe-payment-element.entry.js 2 years ago sc-stripe-payment-element.entry.js.map 2 years ago sc-stripe-payment-request.entry.js 2 years ago sc-stripe-payment-request.entry.js.map 2 years ago sc-subscription-ad-hoc-confirm.entry.js 2 years ago sc-subscription-ad-hoc-confirm.entry.js.map 3 years ago sc-subscription-details_2.entry.js 2 years ago sc-subscription-details_2.entry.js.map 2 years ago sc-subscription-payment-method.entry.js 2 years ago sc-subscription-payment-method.entry.js.map 3 years ago sc-subscription-payment.entry.js 2 years ago sc-subscription-payment.entry.js.map 3 years ago sc-subscription-switch.entry.js 2 years ago sc-subscription-switch.entry.js.map 2 years ago sc-subscription-variation-confirm.entry.js 2 years ago sc-subscription-variation-confirm.entry.js.map 2 years ago sc-subscription.entry.js 2 years ago sc-subscription.entry.js.map 2 years ago sc-subscriptions-list.entry.js 2 years ago sc-subscriptions-list.entry.js.map 2 years ago sc-switch.entry.js 2 years ago sc-switch.entry.js.map 3 years ago sc-tab-group.entry.js 2 years ago sc-tab-group.entry.js.map 3 years ago sc-tab-panel.entry.js 2 years ago sc-tab-panel.entry.js.map 3 years ago sc-tab.entry.js 2 years ago sc-tab.entry.js.map 2 years ago sc-table-head.entry.js 2 years ago sc-table-head.entry.js.map 3 years ago sc-table_3.entry.js 2 years ago sc-table_3.entry.js.map 3 years ago sc-tag.entry.js 2 years ago sc-tag.entry.js.map 2 years ago sc-text.entry.js 2 years ago sc-text.entry.js.map 3 years ago sc-toggle.entry.js 2 years ago sc-toggle.entry.js.map 2 years ago sc-toggles.entry.js 2 years ago sc-toggles.entry.js.map 3 years ago sc-total.entry.js 2 years ago sc-total.entry.js.map 3 years ago sc-upcoming-invoice.entry.js 2 years ago sc-upcoming-invoice.entry.js.map 2 years ago sc-upgrade-required.entry.js 2 years ago sc-upgrade-required.entry.js.map 3 years ago sc-wordpress-password-edit.entry.js 2 years ago sc-wordpress-password-edit.entry.js.map 2 years ago sc-wordpress-user-edit.entry.js 2 years ago sc-wordpress-user-edit.entry.js.map 3 years ago sc-wordpress-user.entry.js 2 years ago sc-wordpress-user.entry.js.map 3 years ago store-222fb2c1.js 2 years ago store-222fb2c1.js.map 2 years ago store-b85bbb50.js 2 years ago store-b85bbb50.js.map 2 years ago surecart.js 2 years ago surecart.js.map 3 years ago tax-83f264de.js 3 years ago tax-83f264de.js.map 3 years ago ui-bc1aa80c.js 2 years ago ui-bc1aa80c.js.map 2 years ago universe-0f7e3f08.js 2 years ago universe-0f7e3f08.js.map 2 years ago util-60cd51cc.js 2 years ago util-60cd51cc.js.map 2 years ago utils-f20e895e.js 2 years ago utils-f20e895e.js.map 2 years ago watchers-43678d50.js 2 years ago watchers-43678d50.js.map 2 years ago watchers-d5c82204.js 2 years ago watchers-d5c82204.js.map 2 years ago watchers-f761bdb6.js 2 years ago watchers-f761bdb6.js.map 2 years ago
sc-order.entry.js
149 lines
1 import { r as registerInstance, h, F as Fragment, a as getElement } from './index-644f5478.js';
2 import { a as apiFetch } from './fetch-2525e763.js';
3 import { o as onFirstVisible } from './lazy-64c2bf3b.js';
4 import { i as intervalString } from './price-12416e4b.js';
5 import { f as formatTaxDisplay } from './tax-83f264de.js';
6 import { a as addQueryArgs } from './add-query-args-f4c5962b.js';
7 import './currency-728311ef.js';
8
9 const scOrderCss = ":host{display:block}.order__row{padding:var(--sc-spacing-large);display:grid;gap:var(--sc-spacing-small)}";
10
11 const ScOrder = class {
12 constructor(hostRef) {
13 registerInstance(this, hostRef);
14 this.orderId = undefined;
15 this.customerIds = undefined;
16 this.heading = undefined;
17 this.order = undefined;
18 this.purchases = undefined;
19 this.loading = undefined;
20 this.busy = undefined;
21 this.error = undefined;
22 }
23 /** Only fetch if visible */
24 componentDidLoad() {
25 onFirstVisible(this.el, () => {
26 this.fetchOrder();
27 this.fetchDownloads();
28 });
29 }
30 async fetchOrder() {
31 try {
32 this.loading = true;
33 await this.getOrder();
34 }
35 catch (e) {
36 console.error(this.error);
37 this.error = (e === null || e === void 0 ? void 0 : e.message) || wp.i18n.__('Something went wrong', 'surecart');
38 }
39 finally {
40 this.loading = false;
41 }
42 }
43 async fetchDownloads() {
44 try {
45 this.busy = true;
46 this.purchases = (await apiFetch({
47 path: addQueryArgs(`surecart/v1/purchases`, {
48 expand: ['product', 'product.downloads', 'download.media'],
49 order_ids: [this.orderId],
50 customer_ids: this.customerIds,
51 downloadable: true,
52 }),
53 }));
54 }
55 catch (e) {
56 console.error(this.error);
57 this.error = (e === null || e === void 0 ? void 0 : e.message) || wp.i18n.__('Something went wrong', 'surecart');
58 }
59 finally {
60 this.busy = false;
61 }
62 }
63 /** Get order */
64 async getOrder() {
65 this.order = (await apiFetch({
66 path: addQueryArgs(`surecart/v1/orders/${this.orderId}`, {
67 expand: [
68 'checkout',
69 'checkout.line_items',
70 'line_item.price',
71 'price.product',
72 'checkout.manual_payment_method',
73 'checkout.payment_method',
74 'payment_method.card',
75 'payment_method.payment_instrument',
76 'payment_method.paypal_account',
77 'payment_method.bank_account',
78 'checkout.discount',
79 'discount.promotion',
80 'checkout.charge',
81 ],
82 }),
83 }));
84 }
85 renderLoading() {
86 return (h("sc-flex", { flexDirection: "column", style: { gap: '1em' } }, h("sc-skeleton", { style: { width: '20%', display: 'inline-block' } }), h("sc-skeleton", { style: { width: '60%', display: 'inline-block' } }), h("sc-skeleton", { style: { width: '40%', display: 'inline-block' } })));
87 }
88 renderEmpty() {
89 return h("sc-empty", { icon: "shopping-bag" }, wp.i18n.__('Order not found.', 'surecart'));
90 }
91 renderContent() {
92 var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
93 if (this.loading) {
94 return this.renderLoading();
95 }
96 if (!((_a = this.order) === null || _a === void 0 ? void 0 : _a.id)) {
97 return this.renderEmpty();
98 }
99 const checkout = (_b = this.order) === null || _b === void 0 ? void 0 : _b.checkout;
100 return (h(Fragment, null, (((_c = checkout === null || checkout === void 0 ? void 0 : checkout.line_items) === null || _c === void 0 ? void 0 : _c.data) || []).map(item => {
101 var _a, _b, _c, _d, _e, _f, _g;
102 return (h("sc-product-line-item", { key: item.id, imageUrl: (_b = (_a = item === null || item === void 0 ? void 0 : item.price) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.image_url, name: (_d = (_c = item === null || item === void 0 ? void 0 : item.price) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.name, priceName: (_e = item === null || item === void 0 ? void 0 : item.price) === null || _e === void 0 ? void 0 : _e.name, variantLabel: ((item === null || item === void 0 ? void 0 : item.variant_options) || []).filter(Boolean).join(' / ') || null, editable: false, removable: false, quantity: item.quantity, amount: item.subtotal_amount, currency: (_f = item === null || item === void 0 ? void 0 : item.price) === null || _f === void 0 ? void 0 : _f.currency, trialDurationDays: (_g = item === null || item === void 0 ? void 0 : item.price) === null || _g === void 0 ? void 0 : _g.trial_duration_days, interval: intervalString(item === null || item === void 0 ? void 0 : item.price) }));
103 }), h("sc-divider", { style: { '--spacing': 'var(--sc-spacing-x-small)' } }), h("sc-line-item", null, h("span", { slot: "description" }, wp.i18n.__('Subtotal', 'surecart')), h("sc-format-number", { slot: "price", style: {
104 'font-weight': 'var(--sc-font-weight-semibold)',
105 'color': 'var(--sc-color-gray-800)',
106 }, type: "currency", currency: checkout === null || checkout === void 0 ? void 0 : checkout.currency, value: checkout === null || checkout === void 0 ? void 0 : checkout.subtotal_amount })), !!(checkout === null || checkout === void 0 ? void 0 : checkout.proration_amount) && (h("sc-line-item", null, h("span", { slot: "description" }, wp.i18n.__('Proration', 'surecart')), h("sc-format-number", { slot: "price", style: {
107 'font-weight': 'var(--sc-font-weight-semibold)',
108 'color': 'var(--sc-color-gray-800)',
109 }, type: "currency", currency: checkout === null || checkout === void 0 ? void 0 : checkout.currency, value: checkout === null || checkout === void 0 ? void 0 : checkout.proration_amount }))), !!(checkout === null || checkout === void 0 ? void 0 : checkout.applied_balance_amount) && (h("sc-line-item", null, h("span", { slot: "description" }, wp.i18n.__('Applied Balance', 'surecart')), h("sc-format-number", { slot: "price", style: {
110 'font-weight': 'var(--sc-font-weight-semibold)',
111 'color': 'var(--sc-color-gray-800)',
112 }, type: "currency", currency: checkout === null || checkout === void 0 ? void 0 : checkout.currency, value: checkout === null || checkout === void 0 ? void 0 : checkout.applied_balance_amount }))), !!(checkout === null || checkout === void 0 ? void 0 : checkout.discounts) && (h("sc-line-item", null, h("span", { slot: "description" }, wp.i18n.__('Discount', 'surecart')), h("sc-format-number", { slot: "price", style: {
113 'font-weight': 'var(--sc-font-weight-semibold)',
114 'color': 'var(--sc-color-gray-800)',
115 }, type: "currency", currency: checkout === null || checkout === void 0 ? void 0 : checkout.currency, value: checkout === null || checkout === void 0 ? void 0 : checkout.discounts }))), !!((_e = (_d = checkout === null || checkout === void 0 ? void 0 : checkout.discount) === null || _d === void 0 ? void 0 : _d.promotion) === null || _e === void 0 ? void 0 : _e.code) && (h("sc-line-item", null, h("span", { slot: "description" }, wp.i18n.__('Discount', 'surecart'), h("br", null), h("sc-tag", { type: "success" }, wp.i18n.__('Coupon:', 'surecart'), " ", (_g = (_f = checkout === null || checkout === void 0 ? void 0 : checkout.discount) === null || _f === void 0 ? void 0 : _f.promotion) === null || _g === void 0 ? void 0 :
116 _g.code)), h("sc-format-number", { slot: "price", style: {
117 'font-weight': 'var(--sc-font-weight-semibold)',
118 'color': 'var(--sc-color-gray-800)',
119 }, type: "currency", currency: checkout === null || checkout === void 0 ? void 0 : checkout.currency, value: checkout === null || checkout === void 0 ? void 0 : checkout.discount_amount }))), !!(checkout === null || checkout === void 0 ? void 0 : checkout.shipping_amount) && (h("sc-line-item", null, h("span", { slot: "description" }, wp.i18n.__('Shipping', 'surecart')), h("sc-format-number", { slot: "price", style: {
120 'font-weight': 'var(--sc-font-weight-semibold)',
121 'color': 'var(--sc-color-gray-800)',
122 }, type: "currency", currency: checkout === null || checkout === void 0 ? void 0 : checkout.currency, value: checkout === null || checkout === void 0 ? void 0 : checkout.shipping_amount }))), !!(checkout === null || checkout === void 0 ? void 0 : checkout.tax_amount) && (h("sc-line-item", null, h("span", { slot: "description" }, formatTaxDisplay(checkout === null || checkout === void 0 ? void 0 : checkout.tax_label), " (", checkout === null || checkout === void 0 ? void 0 :
123 checkout.tax_percent, "%)"), h("sc-format-number", { slot: "price", style: {
124 'font-weight': 'var(--sc-font-weight-semibold)',
125 'color': 'var(--sc-color-gray-800)',
126 }, type: "currency", currency: checkout === null || checkout === void 0 ? void 0 : checkout.currency, value: checkout === null || checkout === void 0 ? void 0 : checkout.tax_amount }))), h("sc-divider", { style: { '--spacing': 'var(--sc-spacing-x-small)' } }), h("sc-line-item", { style: {
127 'width': '100%',
128 '--price-size': 'var(--sc-font-size-x-large)',
129 } }, h("span", { slot: "title" }, wp.i18n.__('Total', 'surecart')), h("span", { slot: "price" }, h("sc-format-number", { type: "currency", currency: checkout === null || checkout === void 0 ? void 0 : checkout.currency, value: checkout === null || checkout === void 0 ? void 0 : checkout.total_amount })), h("span", { slot: "currency" }, checkout === null || checkout === void 0 ? void 0 : checkout.currency)), (checkout === null || checkout === void 0 ? void 0 : checkout.amount_due) !== (checkout === null || checkout === void 0 ? void 0 : checkout.total_amount) && (h("sc-line-item", { style: {
130 'width': '100%',
131 '--price-size': 'var(--sc-font-size-x-large)',
132 } }, h("span", { slot: "title" }, wp.i18n.__('Amount Due', 'surecart')), h("span", { slot: "price" }, h("sc-format-number", { type: "currency", currency: checkout === null || checkout === void 0 ? void 0 : checkout.currency, value: checkout === null || checkout === void 0 ? void 0 : checkout.amount_due })), h("span", { slot: "currency" }, checkout === null || checkout === void 0 ? void 0 : checkout.currency))), !!(checkout === null || checkout === void 0 ? void 0 : checkout.charge) && (h("sc-line-item", { style: {
133 'width': '100%',
134 '--price-size': 'var(--sc-font-size-x-large)',
135 } }, h("span", { slot: "title" }, wp.i18n.__('Amount Paid', 'surecart')), h("span", { slot: "price" }, h("sc-format-number", { type: "currency", currency: (_h = checkout === null || checkout === void 0 ? void 0 : checkout.charge) === null || _h === void 0 ? void 0 : _h.currency, value: ((_j = checkout === null || checkout === void 0 ? void 0 : checkout.charge) === null || _j === void 0 ? void 0 : _j.amount) ? ((_k = checkout === null || checkout === void 0 ? void 0 : checkout.charge) === null || _k === void 0 ? void 0 : _k.amount) - ((_l = checkout === null || checkout === void 0 ? void 0 : checkout.charge) === null || _l === void 0 ? void 0 : _l.refunded_amount) : 0 })), h("span", { slot: "currency" }, (_m = checkout === null || checkout === void 0 ? void 0 : checkout.charge) === null || _m === void 0 ? void 0 : _m.currency)))));
136 }
137 render() {
138 var _a, _b, _c, _d, _e, _f, _g;
139 const checkout = (_a = this === null || this === void 0 ? void 0 : this.order) === null || _a === void 0 ? void 0 : _a.checkout;
140 const manualPaymentMethod = checkout === null || checkout === void 0 ? void 0 : checkout.manual_payment_method;
141 return (h("sc-spacing", { style: { '--spacing': 'var(--sc-spacing-large)' } }, h("sc-dashboard-module", { error: this.error }, h("span", { slot: "heading" }, this.loading ? h("sc-skeleton", { style: { width: '120px' } }) : `#${(_b = this === null || this === void 0 ? void 0 : this.order) === null || _b === void 0 ? void 0 : _b.number}`), !this.loading && !(checkout === null || checkout === void 0 ? void 0 : checkout.live_mode) && (h("sc-tag", { type: "warning", slot: "end" }, wp.i18n.__('Test Mode', 'surecart'))), !!(manualPaymentMethod === null || manualPaymentMethod === void 0 ? void 0 : manualPaymentMethod.name) && !!(manualPaymentMethod === null || manualPaymentMethod === void 0 ? void 0 : manualPaymentMethod.instructions) && (h("sc-order-manual-instructions", { manualPaymentTitle: manualPaymentMethod === null || manualPaymentMethod === void 0 ? void 0 : manualPaymentMethod.name, manualPaymentInstructions: manualPaymentMethod === null || manualPaymentMethod === void 0 ? void 0 : manualPaymentMethod.instructions })), h("sc-card", { "no-padding": !this.loading }, this.loading ? (this.renderLoading()) : (h(Fragment, null, h("sc-stacked-list", null, h("sc-stacked-list-row", { style: { '--columns': '2' } }, h("div", null, wp.i18n.__('Order Status', 'surecart')), h("sc-order-status-badge", { status: (_c = this === null || this === void 0 ? void 0 : this.order) === null || _c === void 0 ? void 0 : _c.status })), h("sc-stacked-list-row", { style: { '--columns': '2' } }, h("div", null, wp.i18n.__('Date', 'surecart')), h("sc-format-date", { type: "timestamp", date: (_d = this.order) === null || _d === void 0 ? void 0 : _d.created_at, month: "short", day: "numeric", year: "numeric" })), h("sc-stacked-list-row", { style: { '--columns': '2' } }, h("div", null, wp.i18n.__('Payment Method', 'surecart')), h("sc-payment-method", { paymentMethod: checkout === null || checkout === void 0 ? void 0 : checkout.payment_method })), h("div", { class: "order__row" }, this.renderContent())))))), ((_e = this.order) === null || _e === void 0 ? void 0 : _e.statement_url) && (h("sc-button", { type: "primary", href: (_f = this.order) === null || _f === void 0 ? void 0 : _f.statement_url, target: "_blank" }, h("sc-icon", { name: "inbox", slot: "prefix" }), wp.i18n.__('Download Receipt/Invoice', 'surecart'))), !!((_g = this.purchases) === null || _g === void 0 ? void 0 : _g.length) && h("sc-purchase-downloads-list", { heading: wp.i18n.__('Downloads', 'surecart'), purchases: this.purchases })));
142 }
143 get el() { return getElement(this); }
144 };
145 ScOrder.style = scOrderCss;
146
147 export { ScOrder as sc_order };
148
149 //# sourceMappingURL=sc-order.entry.js.map