PluginProbe ʕ •ᴥ•ʔ
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / 3.0.0-beta2
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments v3.0.0-beta2
4.7.0 4.6.6 4.6.5 4.6.4 4.6.3 4.6.2 4.6.1 4.6.0 4.5.1 4.5.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 / cjs / sc-cancel-discount_4.cjs.entry.js
surecart / dist / components / cjs Last commit date
MockProcessor-48b83649.js 1 year ago MockProcessor-48b83649.js.map 1 year ago add-query-args-49dcb630.js 1 year ago add-query-args-49dcb630.js.map 1 year ago address-4c70d641.js 1 year ago address-4c70d641.js.map 1 year ago animation-registry-f7f1a08b.js 1 year ago animation-registry-f7f1a08b.js.map 1 year ago app-globals-9f96f14c.js 1 year ago app-globals-9f96f14c.js.map 1 year ago consumer-9f4ee0e3.js 1 year ago consumer-9f4ee0e3.js.map 1 year ago countries-367b507a.js 1 year ago countries-367b507a.js.map 1 year ago currency-71fce0f0.js 1 year ago currency-71fce0f0.js.map 1 year ago error-b46e23c3.js 1 year ago error-b46e23c3.js.map 1 year ago fetch-6192c074.js 1 year ago fetch-6192c074.js.map 1 year ago form-data-0da9940f.js 1 year ago form-data-0da9940f.js.map 1 year ago functions-b63256c8.js 1 year ago functions-b63256c8.js.map 1 year ago getters-305b8266.js 1 year ago getters-305b8266.js.map 1 year ago getters-36e9dc10.js 1 year ago getters-36e9dc10.js.map 1 year ago getters-3f9f8286.js 1 year ago getters-3f9f8286.js.map 1 year ago getters-810d572b.js 1 year ago getters-810d572b.js.map 1 year ago getters-f6bbfe30.js 1 year ago getters-f6bbfe30.js.map 1 year ago google-03835677.js 1 year ago google-03835677.js.map 1 year ago google-59d23803.js 1 year ago google-59d23803.js.map 1 year ago index-252211ea.js 1 year ago index-252211ea.js.map 1 year ago index-6c7d178b.js 1 year ago index-6c7d178b.js.map 1 year ago index-8acc3c89.js 1 year ago index-8acc3c89.js.map 1 year ago index-adacfa36.js 1 year ago index-adacfa36.js.map 1 year ago index-bcdafe6e.js 1 year ago index-bcdafe6e.js.map 1 year ago index-fb76df07.js 2 years ago index-fb76df07.js.map 2 years ago index.cjs.js 1 year ago index.cjs.js.map 2 years ago inline-aa15f113.js 1 year ago inline-aa15f113.js.map 1 year ago lazy-2b509fa7.js 1 year ago lazy-2b509fa7.js.map 1 year ago library-b4e9d7e3.js 1 year ago library-b4e9d7e3.js.map 1 year ago loader.cjs.js 1 year ago loader.cjs.js.map 1 year ago media-43b85f3d.js 1 year ago media-43b85f3d.js.map 1 year ago mutations-11c8f9a8.js 1 year ago mutations-11c8f9a8.js.map 1 year ago mutations-14b05e96.js 1 year ago mutations-14b05e96.js.map 1 year ago mutations-35e01219.js 1 year ago mutations-35e01219.js.map 1 year ago mutations-76f337c0.js 1 year ago mutations-76f337c0.js.map 1 year ago mutations-a920eef8.js 1 year ago mutations-a920eef8.js.map 1 year ago page-align-5a2ab493.js 1 year ago page-align-5a2ab493.js.map 1 year ago price-653ec1cb.js 1 year ago price-653ec1cb.js.map 1 year ago pure-bd6f0a6e.js 1 year ago pure-bd6f0a6e.js.map 1 year ago quantity-bff7f892.js 1 year ago quantity-bff7f892.js.map 1 year ago remove-query-args-b57e8cd3.js 1 year ago remove-query-args-b57e8cd3.js.map 1 year ago sc-address_3.cjs.entry.js 1 year ago sc-address_3.cjs.entry.js.map 1 year ago sc-alert_13.cjs.entry.js 1 year ago sc-alert_13.cjs.entry.js.map 1 year ago sc-avatar.cjs.entry.js 1 year ago sc-avatar.cjs.entry.js.map 1 year ago sc-badge-notice.cjs.entry.js 1 year ago sc-badge-notice.cjs.entry.js.map 1 year ago sc-breadcrumb.cjs.entry.js 1 year ago sc-breadcrumb.cjs.entry.js.map 1 year ago sc-breadcrumbs.cjs.entry.js 1 year ago sc-breadcrumbs.cjs.entry.js.map 1 year ago sc-button-group.cjs.entry.js 1 year ago sc-button-group.cjs.entry.js.map 1 year ago sc-cancel-dialog_2.cjs.entry.js 1 year ago sc-cancel-dialog_2.cjs.entry.js.map 1 year ago sc-cancel-discount_4.cjs.entry.js 1 year ago sc-cancel-discount_4.cjs.entry.js.map 1 year ago sc-card.cjs.entry.js 1 year ago sc-card.cjs.entry.js.map 1 year ago sc-cart-button.cjs.entry.js 1 year ago sc-cart-button.cjs.entry.js.map 1 year ago sc-cart-form-submit.cjs.entry.js 1 year ago sc-cart-form-submit.cjs.entry.js.map 1 year ago sc-cart-form.cjs.entry.js 1 year ago sc-cart-form.cjs.entry.js.map 1 year ago sc-cart-header.cjs.entry.js 1 year ago sc-cart-header.cjs.entry.js.map 1 year ago sc-cart-icon.cjs.entry.js 1 year ago sc-cart-icon.cjs.entry.js.map 1 year ago sc-cart-loader.cjs.entry.js 1 year ago sc-cart-loader.cjs.entry.js.map 1 year ago sc-cart-session-provider_3.cjs.entry.js 1 year ago sc-cart-session-provider_3.cjs.entry.js.map 1 year ago sc-cart-submit.cjs.entry.js 1 year ago sc-cart-submit.cjs.entry.js.map 1 year ago sc-cart.cjs.entry.js 1 year ago sc-cart.cjs.entry.js.map 1 year ago sc-cc-logo_2.cjs.entry.js 1 year ago sc-cc-logo_2.cjs.entry.js.map 1 year ago sc-charges-list.cjs.entry.js 1 year ago sc-charges-list.cjs.entry.js.map 1 year ago sc-checkout-form-errors.cjs.entry.js 1 year ago sc-checkout-form-errors.cjs.entry.js.map 1 year ago sc-checkout-mollie-payment_2.cjs.entry.js 1 year ago sc-checkout-mollie-payment_2.cjs.entry.js.map 1 year ago sc-checkout-product-price-variant-selector.cjs.entry.js 1 year ago sc-checkout-product-price-variant-selector.cjs.entry.js.map 1 year ago sc-checkout-stock-alert_8.cjs.entry.js 1 year ago sc-checkout-stock-alert_8.cjs.entry.js.map 1 year ago sc-checkout.cjs.entry.js 1 year ago sc-checkout.cjs.entry.js.map 1 year ago sc-choice-container.cjs.entry.js 1 year ago sc-choice-container.cjs.entry.js.map 1 year ago sc-choice.cjs.entry.js 1 year ago sc-choice.cjs.entry.js.map 1 year ago sc-choices.cjs.entry.js 1 year ago sc-choices.cjs.entry.js.map 1 year ago sc-column_2.cjs.entry.js 1 year ago sc-column_2.cjs.entry.js.map 1 year ago sc-compact-address_11.cjs.entry.js 1 year ago sc-compact-address_11.cjs.entry.js.map 1 year ago sc-conditional-form.cjs.entry.js 1 year ago sc-conditional-form.cjs.entry.js.map 1 year ago sc-consumer.cjs.entry.js 1 year ago sc-consumer.cjs.entry.js.map 1 year ago sc-coupon-form.cjs.entry.js 1 year ago sc-coupon-form.cjs.entry.js.map 1 year ago sc-custom-order-price-input.cjs.entry.js 1 year ago sc-custom-order-price-input.cjs.entry.js.map 1 year ago sc-customer-details.cjs.entry.js 1 year ago sc-customer-details.cjs.entry.js.map 1 year ago sc-customer-edit.cjs.entry.js 1 year ago sc-customer-edit.cjs.entry.js.map 1 year ago sc-customer-email.cjs.entry.js 1 year ago sc-customer-email.cjs.entry.js.map 1 year ago sc-customer-firstname.cjs.entry.js 1 year ago sc-customer-firstname.cjs.entry.js.map 1 year ago sc-customer-lastname.cjs.entry.js 1 year ago sc-customer-lastname.cjs.entry.js.map 1 year ago sc-customer-name.cjs.entry.js 1 year ago sc-customer-name.cjs.entry.js.map 1 year ago sc-customer-phone.cjs.entry.js 1 year ago sc-customer-phone.cjs.entry.js.map 1 year ago sc-dashboard-customer-details.cjs.entry.js 1 year ago sc-dashboard-customer-details.cjs.entry.js.map 1 year ago sc-dashboard-downloads-list.cjs.entry.js 1 year ago sc-dashboard-downloads-list.cjs.entry.js.map 1 year ago sc-divider.cjs.entry.js 1 year ago sc-divider.cjs.entry.js.map 1 year ago sc-donation-choices.cjs.entry.js 1 year ago sc-donation-choices.cjs.entry.js.map 1 year ago sc-downloads-list.cjs.entry.js 1 year ago sc-downloads-list.cjs.entry.js.map 1 year ago sc-dropdown_3.cjs.entry.js 1 year ago sc-dropdown_3.cjs.entry.js.map 1 year ago sc-empty.cjs.entry.js 1 year ago sc-empty.cjs.entry.js.map 1 year ago sc-express-payment.cjs.entry.js 1 year ago sc-express-payment.cjs.entry.js.map 1 year ago sc-feature-demo-banner.cjs.entry.js 1 year ago sc-feature-demo-banner.cjs.entry.js.map 1 year ago sc-form-control_2.cjs.entry.js 1 year ago sc-form-control_2.cjs.entry.js.map 1 year ago sc-form-row.cjs.entry.js 1 year ago sc-form-row.cjs.entry.js.map 1 year ago sc-form.cjs.entry.js 1 year ago sc-form.cjs.entry.js.map 1 year ago sc-format-bytes.cjs.entry.js 1 year ago sc-format-bytes.cjs.entry.js.map 1 year ago sc-format-interval.cjs.entry.js 1 year ago sc-format-interval.cjs.entry.js.map 1 year ago sc-fulfillment-shipping-status-badge.cjs.entry.js 1 year ago sc-fulfillment-shipping-status-badge.cjs.entry.js.map 1 year ago sc-fulfillments.cjs.entry.js 1 year ago sc-fulfillments.cjs.entry.js.map 1 year ago sc-heading_2.cjs.entry.js 1 year ago sc-heading_2.cjs.entry.js.map 1 year ago sc-image-slider.cjs.entry.js 1 year ago sc-image-slider.cjs.entry.js.map 1 year ago sc-invoices-list.cjs.entry.js 1 year ago sc-invoices-list.cjs.entry.js.map 1 year ago sc-license.cjs.entry.js 1 year ago sc-license.cjs.entry.js.map 1 year ago sc-licenses-list.cjs.entry.js 1 year ago sc-licenses-list.cjs.entry.js.map 1 year ago sc-line-item-bump.cjs.entry.js 1 year ago sc-line-item-bump.cjs.entry.js.map 1 year ago sc-line-item-total.cjs.entry.js 1 year ago sc-line-item-total.cjs.entry.js.map 1 year ago sc-line-item.cjs.entry.js 1 year ago sc-line-item.cjs.entry.js.map 1 year ago sc-line-items-provider.cjs.entry.js 1 year ago sc-line-items-provider.cjs.entry.js.map 1 year ago sc-line-items.cjs.entry.js 1 year ago sc-line-items.cjs.entry.js.map 1 year ago sc-login-form.cjs.entry.js 1 year ago sc-login-form.cjs.entry.js.map 1 year ago sc-manual-payment-method_3.cjs.entry.js 1 year ago sc-manual-payment-method_3.cjs.entry.js.map 1 year ago sc-menu-divider.cjs.entry.js 1 year ago sc-menu-divider.cjs.entry.js.map 1 year ago sc-menu-label_2.cjs.entry.js 1 year ago sc-menu-label_2.cjs.entry.js.map 1 year ago sc-mollie-add-method.cjs.entry.js 1 year ago sc-mollie-add-method.cjs.entry.js.map 1 year ago sc-order-confirmation-customer.cjs.entry.js 1 year ago sc-order-confirmation-customer.cjs.entry.js.map 1 year ago sc-order-confirmation-details.cjs.entry.js 1 year ago sc-order-confirmation-details.cjs.entry.js.map 1 year ago sc-order-confirmation-line-items_2.cjs.entry.js 1 year ago sc-order-confirmation-line-items_2.cjs.entry.js.map 1 year ago sc-order-confirmation.cjs.entry.js 1 year ago sc-order-confirmation.cjs.entry.js.map 1 year ago sc-order-coupon-form.cjs.entry.js 1 year ago sc-order-coupon-form.cjs.entry.js.map 1 year ago sc-order-detail.cjs.entry.js 1 year ago sc-order-detail.cjs.entry.js.map 1 year ago sc-order-fulfillment-badge.cjs.entry.js 1 year ago sc-order-fulfillment-badge.cjs.entry.js.map 1 year ago sc-order-manual-instructions.cjs.entry.js 1 year ago sc-order-manual-instructions.cjs.entry.js.map 1 year ago sc-order-password.cjs.entry.js 1 year ago sc-order-password.cjs.entry.js.map 1 year ago sc-order-return-badge.cjs.entry.js 1 year ago sc-order-return-badge.cjs.entry.js.map 1 year ago sc-order-shipment-badge.cjs.entry.js 1 year ago sc-order-shipment-badge.cjs.entry.js.map 1 year ago sc-order-status-badge.cjs.entry.js 1 year ago sc-order-status-badge.cjs.entry.js.map 1 year ago sc-order-submit.cjs.entry.js 1 year ago sc-order-submit.cjs.entry.js.map 1 year ago sc-order-summary.cjs.entry.js 1 year ago sc-order-summary.cjs.entry.js.map 1 year ago sc-order.cjs.entry.js 1 year ago sc-order.cjs.entry.js.map 1 year ago sc-orders-list.cjs.entry.js 1 year ago sc-orders-list.cjs.entry.js.map 1 year ago sc-pagination.cjs.entry.js 1 year ago sc-pagination.cjs.entry.js.map 1 year ago sc-password-nag.cjs.entry.js 1 year ago sc-password-nag.cjs.entry.js.map 1 year ago sc-password.cjs.entry.js 1 year ago sc-password.cjs.entry.js.map 1 year ago sc-payment-method-choice_2.cjs.entry.js 1 year ago sc-payment-method-choice_2.cjs.entry.js.map 1 year ago sc-payment-method-details.cjs.entry.js 1 year ago sc-payment-method-details.cjs.entry.js.map 1 year ago sc-payment-methods-list.cjs.entry.js 1 year ago sc-payment-methods-list.cjs.entry.js.map 1 year ago sc-payment.cjs.entry.js 1 year ago sc-payment.cjs.entry.js.map 1 year ago sc-paypal-add-method.cjs.entry.js 1 year ago sc-paypal-add-method.cjs.entry.js.map 1 year ago sc-paypal-buttons_2.cjs.entry.js 1 year ago sc-paypal-buttons_2.cjs.entry.js.map 1 year ago sc-paystack-add-method.cjs.entry.js 1 year ago sc-paystack-add-method.cjs.entry.js.map 1 year ago sc-phone-input.cjs.entry.js 1 year ago sc-phone-input.cjs.entry.js.map 1 year ago sc-pill-option.cjs.entry.js 1 year ago sc-pill-option.cjs.entry.js.map 1 year ago sc-premium-tag.cjs.entry.js 1 year ago sc-premium-tag.cjs.entry.js.map 1 year ago sc-price-choice-container.cjs.entry.js 1 year ago sc-price-choice-container.cjs.entry.js.map 1 year ago sc-price-choice.cjs.entry.js 1 year ago sc-price-choice.cjs.entry.js.map 1 year ago sc-price-choices.cjs.entry.js 1 year ago sc-price-choices.cjs.entry.js.map 1 year ago sc-price-input.cjs.entry.js 1 year ago sc-price-input.cjs.entry.js.map 1 year ago sc-price-range.cjs.entry.js 1 year ago sc-price-range.cjs.entry.js.map 1 year ago sc-price.cjs.entry.js 1 year ago sc-price.cjs.entry.js.map 1 year ago sc-product-buy-button.cjs.entry.js 1 year ago sc-product-buy-button.cjs.entry.js.map 1 year ago sc-product-donation-amount-choice.cjs.entry.js 1 year ago sc-product-donation-amount-choice.cjs.entry.js.map 1 year ago sc-product-donation-choices.cjs.entry.js 1 year ago sc-product-donation-choices.cjs.entry.js.map 1 year ago sc-product-donation-custom-amount.cjs.entry.js 1 year ago sc-product-donation-custom-amount.cjs.entry.js.map 1 year ago sc-product-item-image_3.cjs.entry.js 1 year ago sc-product-item-image_3.cjs.entry.js.map 1 year ago sc-product-item-list.cjs.entry.js 1 year ago sc-product-item-list.cjs.entry.js.map 1 year ago sc-product-item.cjs.entry.js 1 year ago sc-product-item.cjs.entry.js.map 1 year ago sc-product-line-item_2.cjs.entry.js 1 year ago sc-product-line-item_2.cjs.entry.js.map 1 year ago sc-product-pills-variant-option.cjs.entry.js 1 year ago sc-product-pills-variant-option.cjs.entry.js.map 1 year ago sc-product-price-choices.cjs.entry.js 1 year ago sc-product-price-choices.cjs.entry.js.map 1 year ago sc-product-price-modal.cjs.entry.js 1 year ago sc-product-price-modal.cjs.entry.js.map 1 year ago sc-product-price.cjs.entry.js 1 year ago sc-product-price.cjs.entry.js.map 1 year ago sc-product-quantity.cjs.entry.js 1 year ago sc-product-quantity.cjs.entry.js.map 1 year ago sc-product-selected-price.cjs.entry.js 1 year ago sc-product-selected-price.cjs.entry.js.map 1 year ago sc-product-text.cjs.entry.js 1 year ago sc-product-text.cjs.entry.js.map 1 year ago sc-provider.cjs.entry.js 1 year ago sc-provider.cjs.entry.js.map 1 year ago sc-provisional-banner.cjs.entry.js 1 year ago sc-provisional-banner.cjs.entry.js.map 1 year ago sc-purchase-downloads-list.cjs.entry.js 1 year ago sc-purchase-downloads-list.cjs.entry.js.map 1 year ago sc-recurring-price-choice-container.cjs.entry.js 1 year ago sc-recurring-price-choice-container.cjs.entry.js.map 1 year ago sc-rich-text.cjs.entry.js 1 year ago sc-rich-text.cjs.entry.js.map 1 year ago sc-spacing.cjs.entry.js 1 year ago sc-spacing.cjs.entry.js.map 1 year ago sc-stacked-list_2.cjs.entry.js 1 year ago sc-stacked-list_2.cjs.entry.js.map 1 year ago sc-stripe-add-method.cjs.entry.js 1 year ago sc-stripe-add-method.cjs.entry.js.map 1 year ago sc-stripe-element.cjs.entry.js 1 year ago sc-stripe-element.cjs.entry.js.map 1 year ago sc-stripe-payment-element.cjs.entry.js 1 year ago sc-stripe-payment-element.cjs.entry.js.map 1 year ago sc-stripe-payment-request.cjs.entry.js 1 year ago sc-stripe-payment-request.cjs.entry.js.map 1 year ago sc-subscription-ad-hoc-confirm.cjs.entry.js 1 year ago sc-subscription-ad-hoc-confirm.cjs.entry.js.map 1 year ago sc-subscription-details_2.cjs.entry.js 1 year ago sc-subscription-details_2.cjs.entry.js.map 1 year ago sc-subscription-payment-method.cjs.entry.js 1 year ago sc-subscription-payment-method.cjs.entry.js.map 1 year ago sc-subscription-payment.cjs.entry.js 1 year ago sc-subscription-payment.cjs.entry.js.map 1 year ago sc-subscription-switch.cjs.entry.js 1 year ago sc-subscription-switch.cjs.entry.js.map 1 year ago sc-subscription-variation-confirm.cjs.entry.js 1 year ago sc-subscription-variation-confirm.cjs.entry.js.map 1 year ago sc-subscription.cjs.entry.js 1 year ago sc-subscription.cjs.entry.js.map 1 year ago sc-subscriptions-list.cjs.entry.js 1 year ago sc-subscriptions-list.cjs.entry.js.map 1 year ago sc-summary.cjs.entry.js 1 year ago sc-summary.cjs.entry.js.map 1 year ago sc-switch.cjs.entry.js 1 year ago sc-switch.cjs.entry.js.map 1 year ago sc-tab-group.cjs.entry.js 1 year ago sc-tab-group.cjs.entry.js.map 1 year ago sc-tab-panel.cjs.entry.js 1 year ago sc-tab-panel.cjs.entry.js.map 1 year ago sc-tab.cjs.entry.js 1 year ago sc-tab.cjs.entry.js.map 1 year ago sc-table-head.cjs.entry.js 1 year ago sc-table-head.cjs.entry.js.map 1 year ago sc-table_3.cjs.entry.js 1 year ago sc-table_3.cjs.entry.js.map 1 year ago sc-tag.cjs.entry.js 1 year ago sc-tag.cjs.entry.js.map 1 year ago sc-toggle.cjs.entry.js 1 year ago sc-toggle.cjs.entry.js.map 1 year ago sc-toggles.cjs.entry.js 1 year ago sc-toggles.cjs.entry.js.map 1 year ago sc-total.cjs.entry.js 1 year ago sc-total.cjs.entry.js.map 1 year ago sc-upcoming-invoice.cjs.entry.js 1 year ago sc-upcoming-invoice.cjs.entry.js.map 1 year ago sc-upgrade-required.cjs.entry.js 1 year ago sc-upgrade-required.cjs.entry.js.map 1 year ago sc-upsell-countdown-timer.cjs.entry.js 1 year ago sc-upsell-countdown-timer.cjs.entry.js.map 1 year ago sc-upsell-no-thanks-button.cjs.entry.js 1 year ago sc-upsell-no-thanks-button.cjs.entry.js.map 1 year ago sc-upsell-submit-button.cjs.entry.js 1 year ago sc-upsell-submit-button.cjs.entry.js.map 1 year ago sc-upsell-totals.cjs.entry.js 1 year ago sc-upsell-totals.cjs.entry.js.map 1 year ago sc-upsell.cjs.entry.js 1 year ago sc-upsell.cjs.entry.js.map 1 year ago sc-visually-hidden.cjs.entry.js 1 year ago sc-visually-hidden.cjs.entry.js.map 1 year ago sc-wordpress-password-edit.cjs.entry.js 1 year ago sc-wordpress-password-edit.cjs.entry.js.map 1 year ago sc-wordpress-user-edit.cjs.entry.js 1 year ago sc-wordpress-user-edit.cjs.entry.js.map 1 year ago sc-wordpress-user.cjs.entry.js 1 year ago sc-wordpress-user.cjs.entry.js.map 1 year ago store-34d62f12.js 1 year ago store-34d62f12.js.map 1 year ago store-7e035943.js 1 year ago store-7e035943.js.map 1 year ago store-d24717c6.js 1 year ago store-d24717c6.js.map 1 year ago surecart.cjs.js 1 year ago surecart.cjs.js.map 1 year ago tax-736ff458.js 1 year ago tax-736ff458.js.map 1 year ago universe-0cf1168a.js 1 year ago universe-0cf1168a.js.map 1 year ago util-b877b2bd.js 1 year ago util-b877b2bd.js.map 1 year ago utils-ee1bb9d3.js 1 year ago utils-ee1bb9d3.js.map 1 year ago watchers-2ad3abd1.js 1 year ago watchers-2ad3abd1.js.map 1 year ago watchers-758e6979.js 1 year ago watchers-758e6979.js.map 1 year ago watchers-cb566474.js 1 year ago watchers-cb566474.js.map 1 year ago watchers-dc559477.js 1 year ago watchers-dc559477.js.map 1 year ago watchers-fb1bab08.js 1 year ago watchers-fb1bab08.js.map 1 year ago
sc-cancel-discount_4.cjs.entry.js
422 lines
1 'use strict';
2
3 Object.defineProperty(exports, '__esModule', { value: true });
4
5 const index = require('./index-8acc3c89.js');
6 const fetch = require('./fetch-6192c074.js');
7 const price = require('./price-653ec1cb.js');
8 const addQueryArgs = require('./add-query-args-49dcb630.js');
9 const formData = require('./form-data-0da9940f.js');
10 require('./remove-query-args-b57e8cd3.js');
11 require('./currency-71fce0f0.js');
12
13 /**
14 * Replace the {{ name }} in a string with a new value
15 */
16 const replaceAmount = (string, replace, name = 'amount') => {
17 return string.replaceAll('{{' + name + '}}', replace).replaceAll('{{ ' + name + ' }}', replace);
18 };
19 /**
20 * Replace the amount in a string with discount.
21 */
22 const replaceAmountFromString = (amountStr, protocol) => (protocol === null || protocol === void 0 ? void 0 : protocol.preservation_coupon) ? replaceAmount(amountStr, price.getHumanDiscount(protocol === null || protocol === void 0 ? void 0 : protocol.preservation_coupon)) : amountStr;
23 /**
24 *
25 */
26 const getCurrentBehaviourContent = (protocol, hasDiscount) => {
27 const { preserve_title, preserve_description, preserve_button, cancel_link } = (protocol === null || protocol === void 0 ? void 0 : protocol.preservation_locales) || {};
28 if (hasDiscount) {
29 const discountLocales = {
30 title: replaceAmountFromString(wp.i18n.__('Your {{ amount }} discount is still active.', 'surecart'), protocol),
31 description: replaceAmountFromString(wp.i18n.__('You have a {{ amount }} discount active. Cancelling now will forfeit this discount forever. Are you sure you wish to cancel?', 'surecart'), protocol),
32 button: wp.i18n.__('Keep My Discount', 'surecart'),
33 cancel_link: wp.i18n.__('Cancel Anyway', 'surecart'),
34 };
35 return discountLocales;
36 }
37 const defaultLocales = {
38 title: replaceAmountFromString(preserve_title, protocol),
39 description: replaceAmountFromString(preserve_description, protocol),
40 button: preserve_button,
41 cancel_link: cancel_link,
42 };
43 return defaultLocales;
44 };
45
46 const scCancelDiscountCss = ".cancel-discount__abort-link{color:var(--sc-color-gray-500)}";
47 const ScCancelDiscountStyle0 = scCancelDiscountCss;
48
49 const ScCancelDiscount = class {
50 constructor(hostRef) {
51 index.registerInstance(this, hostRef);
52 this.scCancel = index.createEvent(this, "scCancel", 7);
53 this.scPreserved = index.createEvent(this, "scPreserved", 7);
54 this.subscription = undefined;
55 this.reason = undefined;
56 this.comment = undefined;
57 this.protocol = undefined;
58 this.loading = undefined;
59 this.error = undefined;
60 }
61 async addDiscount() {
62 var _a, _b;
63 try {
64 this.loading = true;
65 this.subscription = (await fetch.apiFetch({
66 method: 'PATCH',
67 path: addQueryArgs.addQueryArgs(`surecart/v1/subscriptions/${(_a = this.subscription) === null || _a === void 0 ? void 0 : _a.id}/preserve`, {
68 cancellation_act: {
69 ...(!!this.comment ? { comment: this.comment } : {}),
70 cancellation_reason_id: (_b = this.reason) === null || _b === void 0 ? void 0 : _b.id,
71 },
72 }),
73 }));
74 this.scPreserved.emit();
75 }
76 catch (e) {
77 console.error(e);
78 this.error = e;
79 }
80 finally {
81 this.loading = false;
82 }
83 }
84 hasDiscount() {
85 var _a, _b;
86 return !!((_b = (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.discount) === null || _b === void 0 ? void 0 : _b.id);
87 }
88 render() {
89 var _a, _b;
90 const { title, description, button, cancel_link } = getCurrentBehaviourContent(this.protocol, (_b = (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.discount) === null || _b === void 0 ? void 0 : _b.id);
91 return (index.h("div", { key: 'b0a2829ea2bdaf9229ad48cdd9cf5a03fac94d67', class: "cancel-discount" }, index.h("sc-dashboard-module", { key: '355cf0c4a851b8401ef066fe0d3086d692b89fdb', heading: title, style: { '--sc-dashboard-module-spacing': '2em' } }, index.h("span", { key: '1d15f870471875f902020230ac5bf1d431c393a5', slot: "description" }, description), index.h("sc-flex", { key: 'ad7f5336c0592b35c454f552922dc387aa21114d', justifyContent: "flex-start" }, index.h("sc-button", { key: '4708a11995f9e3a4a7fd791d6de72c9b562bf290', type: "primary", onClick: () => this.addDiscount() }, button), index.h("sc-button", { key: '6ad1134cdfbfefa4708451454dd9a395880fe5af', class: "cancel-discount__abort-link", type: "text", onClick: () => this.scCancel.emit() }, cancel_link)), !!this.loading && index.h("sc-block-ui", { key: '25eff6f9f995b1265409f466a3a5ebc9d1528894', spinner: true }))));
92 }
93 };
94 ScCancelDiscount.style = ScCancelDiscountStyle0;
95
96 const scCancelSurveyCss = ".cancel-survey{color:var(--sc-color-gray-900)}.cancel-survey__abort-link{color:var(--sc-color-gray-500)}";
97 const ScCancelSurveyStyle0 = scCancelSurveyCss;
98
99 const ScCancelSurvey = class {
100 constructor(hostRef) {
101 index.registerInstance(this, hostRef);
102 this.scAbandon = index.createEvent(this, "scAbandon", 7);
103 this.scSubmitReason = index.createEvent(this, "scSubmitReason", 7);
104 this.protocol = undefined;
105 this.reasons = undefined;
106 this.loading = undefined;
107 this.selectedReason = undefined;
108 this.comment = undefined;
109 this.error = undefined;
110 }
111 componentWillLoad() {
112 if (!this.reasons) {
113 this.fetchReasons();
114 }
115 }
116 handleSelectedReasonChange() {
117 var _a;
118 if ((_a = this.selectedReason) === null || _a === void 0 ? void 0 : _a.comment_enabled) {
119 setTimeout(() => {
120 this.textArea.triggerFocus();
121 }, 50);
122 }
123 }
124 async fetchReasons() {
125 try {
126 this.loading = true;
127 this.reasons = await fetch.apiFetch({
128 path: 'surecart/v1/cancellation_reasons',
129 });
130 }
131 catch (e) {
132 console.error(e);
133 this.error = e;
134 }
135 finally {
136 this.loading = false;
137 }
138 }
139 async handleSubmit(e) {
140 e.preventDefault();
141 e.stopImmediatePropagation();
142 try {
143 this.scSubmitReason.emit({ reason: this.selectedReason, comment: this.comment });
144 }
145 catch (e) {
146 console.error(e);
147 this.error = e;
148 }
149 }
150 renderReasons() {
151 if (this.loading) {
152 return (index.h("sc-choice", null, index.h("sc-skeleton", null)));
153 }
154 return (this.reasons || []).map(reason => (index.h("sc-choice", { value: reason === null || reason === void 0 ? void 0 : reason.id, name: "reason", onScChange: e => {
155 if (e.target.checked) {
156 this.selectedReason = reason;
157 }
158 } }, reason === null || reason === void 0 ? void 0 : reason.label)));
159 }
160 render() {
161 var _a, _b, _c;
162 const { reasons_title, reasons_description, skip_link } = ((_a = this.protocol) === null || _a === void 0 ? void 0 : _a.preservation_locales) || {};
163 if (this.loading) {
164 return index.h("sc-skeleton", null);
165 }
166 return (index.h("div", { class: "cancel-survey" }, index.h("sc-dashboard-module", { heading: reasons_title, style: { '--sc-dashboard-module-spacing': '2em' } }, index.h("span", { slot: "description" }, reasons_description), index.h("sc-form", { onScSubmit: e => this.handleSubmit(e), style: { '--sc-form-row-spacing': '2em' } }, index.h("sc-choices", { showLabel: false, label: wp.i18n.__('Choose a reason', 'surecart'), style: { '--columns': '2' }, required: true }, this.renderReasons()), ((_b = this.selectedReason) === null || _b === void 0 ? void 0 : _b.comment_enabled) && (index.h("sc-textarea", { label: ((_c = this.selectedReason) === null || _c === void 0 ? void 0 : _c.comment_prompt) || wp.i18n.__('Additional Comments', 'surecart'), required: true, ref: el => (this.textArea = el), onScInput: e => (this.comment = e.target.value) })), index.h("sc-flex", { justifyContent: "flex-start" }, index.h("sc-button", { type: "primary", submit: true }, wp.i18n.__('Continue', 'surecart'), index.h("sc-icon", { name: "arrow-right", slot: "suffix" })), !!skip_link && (index.h("sc-button", { class: "cancel-survey__abort-link", type: "text", onClick: () => this.scAbandon.emit() }, skip_link)))))));
167 }
168 static get watchers() { return {
169 "selectedReason": ["handleSelectedReasonChange"]
170 }; }
171 };
172 ScCancelSurvey.style = ScCancelSurveyStyle0;
173
174 const scSubscriptionCancelCss = ":host{display:block;position:relative}.subscription-cancel{display:grid;gap:0.5em}.subscription-cancel__terms{color:var(--sc-color-gray-600);font-size:var(--sc-font-size-small)}";
175 const ScSubscriptionCancelStyle0 = scSubscriptionCancelCss;
176
177 const ScSubscriptionCancel = class {
178 constructor(hostRef) {
179 index.registerInstance(this, hostRef);
180 this.scAbandon = index.createEvent(this, "scAbandon", 7);
181 this.scCancelled = index.createEvent(this, "scCancelled", 7);
182 this.heading = undefined;
183 this.backUrl = undefined;
184 this.successUrl = undefined;
185 this.subscription = undefined;
186 this.protocol = undefined;
187 this.reason = undefined;
188 this.comment = undefined;
189 this.loading = undefined;
190 this.busy = undefined;
191 this.error = undefined;
192 }
193 async cancelSubscription() {
194 var _a, _b;
195 try {
196 this.error = '';
197 this.busy = true;
198 await fetch.apiFetch({
199 path: addQueryArgs.addQueryArgs(`/surecart/v1/subscriptions/${(_a = this.subscription) === null || _a === void 0 ? void 0 : _a.id}/cancel`, {
200 cancellation_act: {
201 ...(!!this.comment ? { comment: this.comment } : {}),
202 cancellation_reason_id: (_b = this.reason) === null || _b === void 0 ? void 0 : _b.id,
203 },
204 }),
205 method: 'PATCH',
206 });
207 this.scCancelled.emit();
208 }
209 catch (e) {
210 this.error = (e === null || e === void 0 ? void 0 : e.message) || wp.i18n.__('Something went wrong', 'surecart');
211 this.busy = false;
212 }
213 }
214 renderContent() {
215 var _a, _b;
216 if (this.loading) {
217 return this.renderLoading();
218 }
219 return (index.h(index.Fragment, null, ((_a = this === null || this === void 0 ? void 0 : this.protocol) === null || _a === void 0 ? void 0 : _a.cancel_behavior) === 'pending' ? (index.h("div", { slot: "description" }, wp.i18n.__('Your plan will be canceled, but is still available until the end of your billing period on', 'surecart'), ' ', index.h("strong", null, index.h("sc-format-date", { type: "timestamp", date: (_b = this === null || this === void 0 ? void 0 : this.subscription) === null || _b === void 0 ? void 0 : _b.current_period_end_at, month: "long", day: "numeric", year: "numeric" })), ". ", wp.i18n.__('If you change your mind, you can renew your subscription.', 'surecart'))) : (index.h("div", { slot: "description" }, wp.i18n.__('Your plan will be canceled immediately and cannot be modified later.', 'surecart')))));
220 }
221 renderLoading() {
222 return (index.h("div", { style: { padding: '0.5em' } }, index.h("sc-skeleton", { style: { width: '30%', marginBottom: '0.75em' } }), index.h("sc-skeleton", { style: { width: '20%', marginBottom: '0.75em' } }), index.h("sc-skeleton", { style: { width: '40%' } })));
223 }
224 render() {
225 return (index.h("sc-dashboard-module", { key: 'b00ea4327e6ef1815aab6b22276e1ee1a42160a1', heading: this.heading || wp.i18n.__('Cancel your plan', 'surecart'), class: "subscription-cancel", error: this.error, style: { '--sc-dashboard-module-spacing': '1em' } }, this.renderContent(), index.h("sc-flex", { key: 'd02612f3037068221a8af8514ccbfe825ecccabf', justifyContent: "flex-start" }, index.h("sc-button", { key: '568f730cfa7bf239dc31c3b2cc1a1aa8ab19597d', type: "primary", loading: this.loading || this.busy, disabled: this.loading || this.busy, onClick: () => this.cancelSubscription() }, wp.i18n.__('Cancel Plan', 'surecart')), index.h("sc-button", { key: 'c07b56254689a8c3030f2f7c14f8ca787aea717b', style: { color: 'var(--sc-color-gray-500' }, type: "text", onClick: () => this.scAbandon.emit(), loading: this.loading || this.busy, disabled: this.loading || this.busy }, wp.i18n.__('Keep My Plan', 'surecart'))), this.busy && index.h("sc-block-ui", { key: 'e976959c2b7c009dd8e0d16ffb3ec7b6639e6edd' })));
226 }
227 };
228 ScSubscriptionCancel.style = ScSubscriptionCancelStyle0;
229
230 const scTextareaCss = ":host{display:block}.textarea{display:flex;align-items:center;position:relative;width:100%;font-family:var(--sc-input-font-family);font-weight:var(--sc-input-font-weight);line-height:var(--sc-line-height-normal);letter-spacing:var(--sc-input-letter-spacing);vertical-align:middle;transition:var(--sc-input-transition, var(--sc-transition-medium)) color, var(--sc-input-transition, var(--sc-transition-medium)) border, var(--sc-input-transition, var(--sc-transition-medium)) box-shadow,\n var(--sc-input-transition, var(--sc-transition-medium)) background-color;cursor:text}.textarea--standard{background-color:var(--sc-input-background-color);border:solid var(--sc-input-border-width) var(--sc-input-border-color)}.textarea--standard:hover:not(.textarea--disabled){background-color:var(--sc-input-background-color-hover);border-color:var(--sc-input-border-color-hover)}.textarea--standard:hover:not(.textarea--disabled) .textarea__control{color:var(--sc-input-color-hover)}.textarea--standard.textarea--focused:not(.textarea--disabled){background-color:var(--sc-input-background-color-focus);border-color:var(--sc-input-border-color-focus);color:var(--sc-input-color-focus);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-input-focus-ring-color)}.textarea--standard.textarea--focused:not(.textarea--disabled) .textarea__control{color:var(--sc-input-color-focus)}.textarea--standard.textarea--disabled{background-color:var(--sc-input-background-color-disabled);border-color:var(--sc-input-border-color-disabled);opacity:0.5;cursor:not-allowed}.textarea--standard.textarea--disabled .textarea__control{color:var(--sc-input-color-disabled)}.textarea--standard.textarea--disabled .textarea__control::placeholder{color:var(--sc-input-placeholder-color-disabled)}.textarea--filled{border:none;background-color:var(--sc-input-filled-background-color);color:var(--sc-input-color)}.textarea--filled:hover:not(.textarea--disabled){background-color:var(--sc-input-filled-background-color-hover)}.textarea--filled.textarea--focused:not(.textarea--disabled){background-color:var(--sc-input-filled-background-color-focus);outline:var(--sc-focus-ring);outline-offset:var(--sc-focus-ring-offset)}.textarea--filled.textarea--disabled{background-color:var(--sc-input-filled-background-color-disabled);opacity:0.5;cursor:not-allowed}.textarea__control{flex:1 1 auto;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1.4;color:var(--sc-input-color);border:none;background:none;box-shadow:none;cursor:inherit;-webkit-appearance:none}.textarea__control::-webkit-search-decoration,.textarea__control::-webkit-search-cancel-button,.textarea__control::-webkit-search-results-button,.textarea__control::-webkit-search-results-decoration{-webkit-appearance:none}.textarea__control::placeholder{color:var(--sc-input-placeholder-color);user-select:none}.textarea__control:focus{outline:none}.textarea--small{border-radius:var(--sc-input-border-radius-small);font-size:var(--sc-input-font-size-small)}.textarea--small .textarea__control{padding:0.5em var(--sc-input-spacing-small)}.textarea--medium{border-radius:var(--sc-input-border-radius-medium);font-size:var(--sc-input-font-size-medium)}.textarea--medium .textarea__control{padding:0.5em var(--sc-input-spacing-medium)}.textarea--large{border-radius:var(--sc-input-border-radius-large);font-size:var(--sc-input-font-size-large)}.textarea--large .textarea__control{padding:0.5em var(--sc-input-spacing-large)}.textarea--resize-none .textarea__control{resize:none}.textarea--resize-vertical .textarea__control{resize:vertical}.textarea--resize-auto .textarea__control{height:auto;resize:none}.textarea__char-limit-warning{margin-top:var(--sc-input-spacing-small);color:var(--sc-input-help-text-color);font-size:var(--sc-input-help-text-font-size-medium)}";
231 const ScTextareaStyle0 = scTextareaCss;
232
233 const CHAR_LIMIT_THRESHOLD = 20;
234 let id = 0;
235 const ScTextarea = class {
236 constructor(hostRef) {
237 index.registerInstance(this, hostRef);
238 this.scChange = index.createEvent(this, "scChange", 7);
239 this.scInput = index.createEvent(this, "scInput", 7);
240 this.scBlur = index.createEvent(this, "scBlur", 7);
241 this.scFocus = index.createEvent(this, "scFocus", 7);
242 this.inputId = `textarea-${++id}`;
243 this.helpId = `textarea-help-text-${id}`;
244 this.labelId = `textarea-label-${id}`;
245 this.hasFocus = false;
246 this.showCharLimit = false;
247 this.size = 'medium';
248 this.name = undefined;
249 this.value = '';
250 this.filled = false;
251 this.label = '';
252 this.showLabel = true;
253 this.help = '';
254 this.placeholder = undefined;
255 this.rows = 4;
256 this.resize = 'vertical';
257 this.disabled = false;
258 this.readonly = false;
259 this.minlength = undefined;
260 this.maxlength = undefined;
261 this.required = false;
262 this.invalid = false;
263 this.autocapitalize = undefined;
264 this.autocorrect = undefined;
265 this.autocomplete = undefined;
266 this.autofocus = undefined;
267 this.enterkeyhint = undefined;
268 this.spellcheck = undefined;
269 this.inputmode = undefined;
270 }
271 handleRowsChange() {
272 this.setTextareaHeight();
273 }
274 handleValueChange() {
275 this.invalid = !this.input.checkValidity();
276 this.showCharLimit = this.maxlength - this.value.length <= CHAR_LIMIT_THRESHOLD;
277 }
278 handleDisabledChange() {
279 // Disabled form controls are always valid, so we need to recheck validity when the state changes
280 this.input.disabled = this.disabled;
281 this.invalid = !this.input.checkValidity();
282 }
283 /** Sets focus on the input. */
284 async triggerFocus(options) {
285 return this.input.focus(options);
286 }
287 /** Sets focus on the textarea. */
288 focus(options) {
289 this.input.focus(options);
290 }
291 /** Removes focus from the textarea. */
292 blur() {
293 this.input.blur();
294 }
295 /** Selects all the text in the textarea. */
296 select() {
297 this.input.select();
298 }
299 /** Gets or sets the textarea's scroll position. */
300 scrollPosition(position) {
301 if (position) {
302 if (typeof position.top === 'number')
303 this.input.scrollTop = position.top;
304 if (typeof position.left === 'number')
305 this.input.scrollLeft = position.left;
306 return;
307 }
308 // eslint-disable-next-line consistent-return
309 return {
310 top: this.input.scrollTop,
311 left: this.input.scrollTop,
312 };
313 }
314 /** Sets the start and end positions of the text selection (0-based). */
315 setSelectionRange(selectionStart, selectionEnd, selectionDirection = 'none') {
316 this.input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);
317 }
318 /** Replaces a range of text with a new string. */
319 setRangeText(replacement, start, end, selectMode = 'preserve') {
320 this.input.setRangeText(replacement, start, end, selectMode);
321 if (this.value !== this.input.value) {
322 this.value = this.input.value;
323 this.scInput.emit();
324 }
325 if (this.value !== this.input.value) {
326 this.value = this.input.value;
327 this.setTextareaHeight();
328 this.scInput.emit();
329 this.scChange.emit();
330 }
331 }
332 /** Checks for validity and shows the browser's validation message if the control is invalid. */
333 async reportValidity() {
334 return this.input.reportValidity();
335 }
336 /** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */
337 setCustomValidity(message) {
338 this.input.setCustomValidity(message);
339 this.invalid = !this.input.checkValidity();
340 }
341 handleBlur() {
342 this.hasFocus = false;
343 this.scBlur.emit();
344 }
345 handleChange() {
346 this.value = this.input.value;
347 this.setTextareaHeight();
348 this.scChange.emit();
349 }
350 handleFocus() {
351 this.hasFocus = true;
352 this.scFocus.emit();
353 }
354 handleInput() {
355 this.value = this.input.value;
356 this.setTextareaHeight();
357 this.scInput.emit();
358 }
359 componentWillLoad() {
360 if (!(window === null || window === void 0 ? void 0 : window.ResizeObserver)) {
361 return;
362 }
363 this.resizeObserver = new window.ResizeObserver(() => this.setTextareaHeight());
364 }
365 componentDidLoad() {
366 this.formController = new formData.FormSubmitController(this.el).addFormData();
367 if (!(window === null || window === void 0 ? void 0 : window.ResizeObserver)) {
368 return;
369 }
370 this.resizeObserver.observe(this.input);
371 }
372 disconnectedCallback() {
373 var _a;
374 (_a = this.formController) === null || _a === void 0 ? void 0 : _a.removeFormData();
375 this.resizeObserver.unobserve(this.input);
376 }
377 setTextareaHeight() {
378 if (this.resize === 'auto') {
379 this.input.style.height = 'auto';
380 this.input.style.height = `${this.input.scrollHeight}px`;
381 }
382 else {
383 this.input.style.height = undefined;
384 }
385 }
386 render() {
387 return (index.h("div", { key: '27c543f54353efba4c61759b99ec23f434822b7a', part: "form-control", class: {
388 'form-control': true,
389 'form-control--small': this.size === 'small',
390 'form-control--medium': this.size === 'medium',
391 'form-control--large': this.size === 'large',
392 } }, index.h("sc-form-control", { key: '635f3c0299ffcdd95ccc8186e46d3db4b8d91136', exportparts: "label, help-text, form-control", size: this.size, required: this.required, label: this.label, showLabel: this.showLabel, help: this.help, inputId: this.inputId, helpId: this.helpId, labelId: this.labelId, name: this.name }, index.h("div", { key: '2969c666f526c4238751f55f91310fad3397b217', part: "form-control-input", class: "form-control-input" }, index.h("div", { key: '755bb26337d9e512d4e622057bd8f66399e89fd8', part: "base", class: {
393 'textarea': true,
394 'textarea--small': this.size === 'small',
395 'textarea--medium': this.size === 'medium',
396 'textarea--large': this.size === 'large',
397 'textarea--standard': !this.filled,
398 'textarea--filled': this.filled,
399 'textarea--disabled': this.disabled,
400 'textarea--focused': this.hasFocus,
401 'textarea--empty': !this.value,
402 'textarea--invalid': this.invalid,
403 'textarea--resize-none': this.resize === 'none',
404 'textarea--resize-vertical': this.resize === 'vertical',
405 'textarea--resize-auto': this.resize === 'auto',
406 } }, index.h("textarea", { key: '1711be9fc3fbabc9ae4021548219e1bcd7d78bdb', part: "textarea", ref: el => (this.input = el), id: "input", class: "textarea__control", name: this.name, value: this.value, disabled: this.disabled, readonly: this.readonly, required: this.required, placeholder: this.placeholder, rows: this.rows, minlength: this.minlength, maxlength: this.maxlength, autocapitalize: this.autocapitalize, autocorrect: this.autocorrect, autofocus: this.autofocus, spellcheck: this.spellcheck, enterkeyhint: this.enterkeyhint, inputmode: this.inputmode, "aria-describedby": "help-text", onChange: () => this.handleChange(), onInput: () => this.handleInput(), onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur(), onKeyDown: (e) => e.stopPropagation() })), this.showCharLimit && (index.h("div", { key: '6c0791969b5ae22f80de7d5a3076e2fe55d3a630', slot: "help", class: 'textarea__char-limit-warning' }, wp.i18n.sprintf(wp.i18n.__('%d characters remaining', 'surecart'), this.maxlength - this.input.value.length)))))));
407 }
408 get el() { return index.getElement(this); }
409 static get watchers() { return {
410 "rows": ["handleRowsChange"],
411 "value": ["handleValueChange"],
412 "disabled": ["handleDisabledChange"]
413 }; }
414 };
415 ScTextarea.style = ScTextareaStyle0;
416
417 exports.sc_cancel_discount = ScCancelDiscount;
418 exports.sc_cancel_survey = ScCancelSurvey;
419 exports.sc_subscription_cancel = ScSubscriptionCancel;
420 exports.sc_textarea = ScTextarea;
421
422 //# sourceMappingURL=sc-cancel-discount_4.cjs.entry.js.map